From 619254db76e5a0c87750f075afccb608b32f9c48 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 14 Jan 2018 10:50:20 -0500 Subject: [PATCH] subsurface input --- sway/tree/container.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sway/tree/container.c b/sway/tree/container.c index 82f68519..862406cf 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -288,6 +288,19 @@ swayc_t *swayc_at(swayc_t *parent, double lx, double ly, break; } + // check for subsurfaces + double sub_x, sub_y; + struct wlr_subsurface *subsurface = + wlr_surface_subsurface_at(sview->surface, + view_sx, view_sy, &sub_x, &sub_y); + if (subsurface) { + *sx = view_sx - sub_x; + *sy = view_sy - sub_y; + *surface = subsurface->surface; + list_free(queue); + return swayc; + } + if (view_sx > 0 && view_sx < width && view_sy > 0 && view_sy < height && pixman_region32_contains_point(