aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-04-05 18:48:35 -0400
committerLibravatar emersion <contact@emersion.fr>2018-04-05 18:48:35 -0400
commit641807d920854fdecc1307bd809c198db1a7dff1 (patch)
treea275dc0046e90f7b2eb4ee3195e9f44976757165 /sway/input/cursor.c
parentFix desktop_damage_whole_surface (diff)
downloadsway-641807d920854fdecc1307bd809c198db1a7dff1.tar.gz
sway-641807d920854fdecc1307bd809c198db1a7dff1.tar.zst
sway-641807d920854fdecc1307bd809c198db1a7dff1.zip
Handle unmanaged surfaces motion
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 195ddce9..b83bc9fe 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -48,17 +48,13 @@ static struct sway_container *container_at_cursor(struct sway_cursor *cursor,
48 struct wlr_surface **surface, double *sx, double *sy) { 48 struct wlr_surface **surface, double *sx, double *sy) {
49 // check for unmanaged views first 49 // check for unmanaged views first
50 struct wl_list *unmanaged = &root_container.sway_root->xwayland_unmanaged; 50 struct wl_list *unmanaged = &root_container.sway_root->xwayland_unmanaged;
51 struct sway_xwayland_unmanaged *sway_surface; 51 struct sway_xwayland_unmanaged *unmanaged_surface;
52 wl_list_for_each_reverse(sway_surface, unmanaged, link) { 52 wl_list_for_each_reverse(unmanaged_surface, unmanaged, link) {
53 struct wlr_xwayland_surface *xsurface = 53 struct wlr_xwayland_surface *xsurface =
54 sway_surface->wlr_xwayland_surface; 54 unmanaged_surface->wlr_xwayland_surface;
55 if (xsurface->surface == NULL) {
56 continue;
57 }
58
59 struct wlr_box box = { 55 struct wlr_box box = {
60 .x = xsurface->x, 56 .x = unmanaged_surface->lx,
61 .y = xsurface->y, 57 .y = unmanaged_surface->ly,
62 .width = xsurface->width, 58 .width = xsurface->width,
63 .height = xsurface->height, 59 .height = xsurface->height,
64 }; 60 };