aboutsummaryrefslogtreecommitdiff
path: root/tinywl
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2022-01-14 20:46:20 +0100
committerSimon Ser <contact@emersion.fr>2022-01-14 20:17:22 +0000
commit89dc9a44968fbd3fe8a08a41858d1537ee145668 (patch)
tree8a9eeded989ce5c391a2838406afe84d8f22777d /tinywl
parent50827ed7f5f01ed2f03f67c5e9e55e13ede06748 (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.
Diffstat (limited to 'tinywl')
-rw-r--r--tinywl/tinywl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tinywl/tinywl.c b/tinywl/tinywl.c
index 722abd10..6f628836 100644
--- a/tinywl/tinywl.c
+++ b/tinywl/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;
}