commit 619254db76e5a0c87750f075afccb608b32f9c48
parent 76ce62919830b2917c696f599e7710ce05d109c0
Author: Tony Crisci <tony@dubstepdish.com>
Date: Sun, 14 Jan 2018 10:50:20 -0500
subsurface input
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git 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(