aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-30 23:08:24 -0400
committerDrew DeVault <sir@cmpwn.com>2018-03-30 23:08:24 -0400
commit212b5039927842f22295c95f4e0a4f914b243194 (patch)
tree35bd1abb8daf181c9c550d0b551685caf5870e46 /sway/tree
parent4b0fcde7781ec61d7d5035775a942112b70391a4 (diff)
Use wlr_surface_point_accepts_input
Diffstat (limited to 'sway/tree')
-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,
double oy = ly - output_box->y;
double view_sx = ox - swayc->x;
double view_sy = oy - swayc->y;
- int width = swayc->sway_view->surface->current->width;
- int height = swayc->sway_view->surface->current->height;
switch (sview->type) {
case SWAY_WL_SHELL_VIEW:
@@ -333,11 +331,8 @@ struct sway_container *container_at(struct sway_container *parent,
return swayc;
}
- if (view_sx > 0 && view_sx < width &&
- view_sy > 0 && view_sy < height &&
- pixman_region32_contains_point(
- &sview->surface->current->input,
- view_sx, view_sy, NULL)) {
+ if (wlr_surface_point_accepts_input(
+ sview->surface, view_sx, view_sy)) {
*sx = view_sx;
*sy = view_sy;
*surface = swayc->sway_view->surface;