aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 5739aafb..c6a332b8 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -39,15 +39,12 @@ static struct wlr_surface *layer_surface_at(struct sway_output *output,
39 struct wl_list *layer, double ox, double oy, double *sx, double *sy) { 39 struct wl_list *layer, double ox, double oy, double *sx, double *sy) {
40 struct sway_layer_surface *sway_layer; 40 struct sway_layer_surface *sway_layer;
41 wl_list_for_each_reverse(sway_layer, layer, link) { 41 wl_list_for_each_reverse(sway_layer, layer, link) {
42 struct wlr_surface *wlr_surface =
43 sway_layer->layer_surface->surface;
44 double _sx = ox - sway_layer->geo.x; 42 double _sx = ox - sway_layer->geo.x;
45 double _sy = oy - sway_layer->geo.y; 43 double _sy = oy - sway_layer->geo.y;
46 // TODO: Test popups/subsurfaces 44 struct wlr_surface *sub = wlr_layer_surface_v1_surface_at(
47 if (wlr_surface_point_accepts_input(wlr_surface, _sx, _sy)) { 45 sway_layer->layer_surface, _sx, _sy, sx, sy);
48 *sx = _sx; 46 if (sub) {
49 *sy = _sy; 47 return sub;
50 return wlr_surface;
51 } 48 }
52 } 49 }
53 return NULL; 50 return NULL;