summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <[email protected]>2022-01-14 20:46:20 +0100
committerSimon Ser <[email protected]>2022-01-14 20:17:22 +0000
commitc06da9913835dcd96c82d03658c458f660f585b6 (patch)
tree29c4801e1390c9a2e7b1d73338d35062483554e0
parentdd4ca1818a148d44e42b1504e73fe5b562af7481 (diff)
tinywl: fix check whether client is focused or not
Currently this check is too strict and denies the move/resize request if a subsurface of the client has pointer focus.
-rw-r--r--tinywl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tinywl.c b/tinywl.c
index 722abd1..6f62883 100644
--- a/tinywl.c
+++ b/tinywl.c
@@ -612,7 +612,8 @@ static void begin_interactive(struct tinywl_view *view,
struct tinywl_server *server = view->server;
struct wlr_surface *focused_surface =
server->seat->pointer_state.focused_surface;
- if (view->xdg_surface->surface != focused_surface) {
+ if (view->xdg_surface->surface !=
+ wlr_surface_get_root_surface(focused_surface)) {
/* Deny move/resize requests from unfocused clients. */
return;
}