aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-01-14 10:50:20 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-01-14 10:50:20 -0500
commit619254db76e5a0c87750f075afccb608b32f9c48 (patch)
tree65e2f53654c0051805320628ae80f100f9ea593b /sway
parentxdg-popups (diff)
downloadsway-619254db76e5a0c87750f075afccb608b32f9c48.tar.gz
sway-619254db76e5a0c87750f075afccb608b32f9c48.tar.zst
sway-619254db76e5a0c87750f075afccb608b32f9c48.zip
subsurface input
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/container.c13
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,
288 break; 288 break;
289 } 289 }
290 290
291 // check for subsurfaces
292 double sub_x, sub_y;
293 struct wlr_subsurface *subsurface =
294 wlr_surface_subsurface_at(sview->surface,
295 view_sx, view_sy, &sub_x, &sub_y);
296 if (subsurface) {
297 *sx = view_sx - sub_x;
298 *sy = view_sy - sub_y;
299 *surface = subsurface->surface;
300 list_free(queue);
301 return swayc;
302 }
303
291 if (view_sx > 0 && view_sx < width && 304 if (view_sx > 0 && view_sx < width &&
292 view_sy > 0 && view_sy < height && 305 view_sy > 0 && view_sy < height &&
293 pixman_region32_contains_point( 306 pixman_region32_contains_point(