aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.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/input/cursor.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/input/cursor.c')
-rw-r--r--sway/input/cursor.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index b498a517..7390816f 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -30,16 +30,8 @@ static struct wlr_surface *layer_surface_at(struct sway_output *output,
30 sway_layer->layer_surface->surface; 30 sway_layer->layer_surface->surface;
31 double _sx = ox - sway_layer->geo.x; 31 double _sx = ox - sway_layer->geo.x;
32 double _sy = oy - sway_layer->geo.y; 32 double _sy = oy - sway_layer->geo.y;
33 struct wlr_box box = {
34 .x = sway_layer->geo.x,
35 .y = sway_layer->geo.y,
36 .width = wlr_surface->current->width,
37 .height = wlr_surface->current->height,
38 };
39 // TODO: Test popups/subsurfaces 33 // TODO: Test popups/subsurfaces
40 if (wlr_box_contains_point(&box, ox, oy) && 34 if (wlr_surface_point_accepts_input(wlr_surface, _sx, _sy)) {
41 pixman_region32_contains_point(
42 &wlr_surface->current->input, _sx, _sy, NULL)) {
43 *sx = _sx; 35 *sx = _sx;
44 *sy = _sy; 36 *sy = _sy;
45 return wlr_surface; 37 return wlr_surface;