summaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2019-07-05 14:45:11 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-08-20 14:53:22 +0900
commitd6846ad3afc4a77efe79443e939bb3a79708790c (patch)
treeaa3bca5254017567d58eaa77cd2c3b872439dfdc /sway/input/cursor.c
parentproperly check pixman_region32_contains_rectangle return (diff)
downloadsway-1.2-rc2.tar.gz
sway-1.2-rc2.tar.zst
sway-1.2-rc2.zip
layer-shell: add support for popups1.2-rc2
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;