aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-07-05 14:45:11 -0400
committerSimon Ser <contact@emersion.fr>2019-08-14 22:10:05 +0300
commitcb8f68d74b6c9f0b9690c44a34b8a8f1c46986be (patch)
treea49f7022c65a5a11f6fbdb4c164ac3a4c9b3c2cd /sway/input
parentf36240208c57124a88cdee18fb81fa3fc69e0f0a (diff)
downloadsway-cb8f68d74b6c9f0b9690c44a34b8a8f1c46986be.tar.xz
layer-shell: add support for popups
Diffstat (limited to 'sway/input')
-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,
struct wl_list *layer, double ox, double oy, double *sx, double *sy) {
struct sway_layer_surface *sway_layer;
wl_list_for_each_reverse(sway_layer, layer, link) {
- struct wlr_surface *wlr_surface =
- sway_layer->layer_surface->surface;
double _sx = ox - sway_layer->geo.x;
double _sy = oy - sway_layer->geo.y;
- // TODO: Test popups/subsurfaces
- if (wlr_surface_point_accepts_input(wlr_surface, _sx, _sy)) {
- *sx = _sx;
- *sy = _sy;
- return wlr_surface;
+ struct wlr_surface *sub = wlr_layer_surface_v1_surface_at(
+ sway_layer->layer_surface, _sx, _sy, sx, sy);
+ if (sub) {
+ return sub;
}
}
return NULL;