aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-30 23:08:24 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-30 23:08:24 -0400
commit212b5039927842f22295c95f4e0a4f914b243194 (patch)
tree35bd1abb8daf181c9c550d0b551685caf5870e46 /sway/tree/container.c
parentMerge pull request #1674 from swaywm/layer-input (diff)
downloadsway-212b5039927842f22295c95f4e0a4f914b243194.tar.gz
sway-212b5039927842f22295c95f4e0a4f914b243194.tar.zst
sway-212b5039927842f22295c95f4e0a4f914b243194.zip
Use wlr_surface_point_accepts_input
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 8705edc7..746dbf1f 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -290,8 +290,6 @@ struct sway_container *container_at(struct sway_container *parent,
290 double oy = ly - output_box->y; 290 double oy = ly - output_box->y;
291 double view_sx = ox - swayc->x; 291 double view_sx = ox - swayc->x;
292 double view_sy = oy - swayc->y; 292 double view_sy = oy - swayc->y;
293 int width = swayc->sway_view->surface->current->width;
294 int height = swayc->sway_view->surface->current->height;
295 293
296 switch (sview->type) { 294 switch (sview->type) {
297 case SWAY_WL_SHELL_VIEW: 295 case SWAY_WL_SHELL_VIEW:
@@ -333,11 +331,8 @@ struct sway_container *container_at(struct sway_container *parent,
333 return swayc; 331 return swayc;
334 } 332 }
335 333
336 if (view_sx > 0 && view_sx < width && 334 if (wlr_surface_point_accepts_input(
337 view_sy > 0 && view_sy < height && 335 sview->surface, view_sx, view_sy)) {
338 pixman_region32_contains_point(
339 &sview->surface->current->input,
340 view_sx, view_sy, NULL)) {
341 *sx = view_sx; 336 *sx = view_sx;
342 *sy = view_sy; 337 *sy = view_sy;
343 *surface = swayc->sway_view->surface; 338 *surface = swayc->sway_view->surface;