From 65414190073193c6bcf40153bdd6f6603e90e77e Mon Sep 17 00:00:00 2001 From: IoIxD Date: Mon, 28 Sep 2026 14:23:32 -0700 Subject: [PATCH] wayland: only do pointer adjustments for (all subtypes) --- src/backend/wayland/interfaces.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/wayland/interfaces.c b/src/backend/wayland/interfaces.c index e86586af..c281b2ed 100644 --- a/src/backend/wayland/interfaces.c +++ b/src/backend/wayland/interfaces.c @@ -762,8 +762,9 @@ static MwBool hit_detect(MwLL child, MwLL* _topmost_parent, MwPoint* _point, MwP while(topmost_parent->wayland.parent) { topmost_parent = topmost_parent->wayland.parent; if(topmost_parent) { - /* if the topmost parent is a popup/subwindow then its x/y is irrelevant to us. */ - if(topmost_parent->wayland.type != MwLL_WAYLAND_POPUP && topmost_parent->wayland.type != MwLL_WAYLAND_TOPLEVEL) { + /* if the topmost parent is a popup/subwindow/layer surface then its x/y is irrelevant to us, + * it's the window's position on screen and pointer coordinates are relative to the window. */ + if(topmost_parent->wayland.type == MwLL_WAYLAND_SUBLEVEL || topmost_parent->wayland.type == MwLL_WAYLAND_SUBSURFACE) { absolute_pos.x += topmost_parent->wayland.x; absolute_pos.y += topmost_parent->wayland.y; }