aboutsummaryrefslogtreecommitdiffstats
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 Simon Ser <contact@emersion.fr>2019-08-14 22:10:05 +0300
commitcb8f68d74b6c9f0b9690c44a34b8a8f1c46986be (patch)
treea49f7022c65a5a11f6fbdb4c164ac3a4c9b3c2cd /sway/input/cursor.c
parentworkspace_split: focus middle if workspace focused (diff)
downloadsway-cb8f68d74b6c9f0b9690c44a34b8a8f1c46986be.tar.gz
sway-cb8f68d74b6c9f0b9690c44a34b8a8f1c46986be.tar.zst
sway-cb8f68d74b6c9f0b9690c44a34b8a8f1c46986be.zip
layer-shell: add support for popups
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;