[PATCH 2/3] xwayland: Shape window region to clip shadow area from input
Scott Moreau
oreaus at gmail.com
Sat Jun 24 07:18:56 UTC 2017
Decorated windows were getting the size of the window including the
shadow which is correct, but causing some confusion for motion input
events. This was exhibited when one xwayland window overlaps another,
hovering over the window beneath recieves no events if within the 32
pixel shadow border area of the window above.
---
xwayland/window-manager.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 1663ad0..951a7cf 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -954,6 +954,8 @@ static void
weston_wm_window_create_frame(struct weston_wm_window *window)
{
struct weston_wm *wm = window->wm;
+ struct theme *t = window->wm->theme;
+ xcb_rectangle_t rect;
uint32_t values[3];
int x, y, width, height;
int buttons = FRAME_BUTTON_CLOSE;
@@ -1009,6 +1011,15 @@ weston_wm_window_create_frame(struct weston_wm_window *window)
&wm->format_rgba,
width, height);
+ rect.x = t->margin;
+ rect.y = t->margin;
+ rect.width = width - t->margin * 2;
+ rect.height = height - t->margin * 2;
+
+ xcb_shape_rectangles(wm->conn,
+ XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT,
+ 0, window->frame_id, 0, 0, 1, &rect);
+
hash_table_insert(wm->window_hash, window->frame_id, window);
}
--
2.7.4
More information about the wayland-devel
mailing list