aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r--sway/desktop/xdg_shell.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 1ed45a6b..fda1bdef 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -25,9 +25,12 @@ static void popup_get_root_coords(struct sway_view_child *child,
25 struct sway_xdg_popup *popup = (struct sway_xdg_popup *)child; 25 struct sway_xdg_popup *popup = (struct sway_xdg_popup *)child;
26 struct wlr_xdg_surface *surface = popup->wlr_xdg_surface; 26 struct wlr_xdg_surface *surface = popup->wlr_xdg_surface;
27 27
28 int x_offset = -child->view->geometry.x - surface->geometry.x;
29 int y_offset = -child->view->geometry.y - surface->geometry.y;
30
28 wlr_xdg_popup_get_toplevel_coords(surface->popup, 31 wlr_xdg_popup_get_toplevel_coords(surface->popup,
29 -surface->geometry.x + surface->popup->geometry.x, 32 x_offset + surface->popup->geometry.x,
30 -surface->geometry.y + surface->popup->geometry.y, 33 y_offset + surface->popup->geometry.y,
31 root_sx, root_sy); 34 root_sx, root_sy);
32} 35}
33 36