diff --git a/src/backend/wayland/wl_pointer_focus.c b/src/backend/wayland/wl_pointer_focus.c index 0025d9f..73f5b84 100644 --- a/src/backend/wayland/wl_pointer_focus.c +++ b/src/backend/wayland/wl_pointer_focus.c @@ -64,6 +64,19 @@ view_surface_at(int px, int py, double *sx_out, double *sy_out, } if (!match) continue; + /* If the window is shaded, the client surface is hidden; + * do not route pointer events to it. The pointer is over + * frame decorations (titlebar) regardless of what the scene + * graph or xdg geometry says. */ + { + WObjDescriptor *_desc = wm_backend->context_find(v->id, WM_CTX_CLIENT_WIN); + if (_desc && _desc->parent_type == WCLASS_WINDOW) { + WWindow *_wwin = (WWindow *)_desc->parent; + if (_wwin->flags.shaded) + continue; + } + } + if (v->xw_surface && v->xw_surface->surface) { double sx = px - (double)v->x; double sy = py - (double)v->y;