diff options
-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, | |||
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( |