diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-14 10:50:20 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-14 10:50:20 -0500 |
commit | 619254db76e5a0c87750f075afccb608b32f9c48 (patch) | |
tree | 65e2f53654c0051805320628ae80f100f9ea593b /sway/tree/container.c | |
parent | 76ce62919830b2917c696f599e7710ce05d109c0 (diff) |
subsurface input
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 13 |
1 files changed, 13 insertions, 0 deletions
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( |