diff options
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index eb8ba853..7159f1ed 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -24,9 +24,12 @@ static void popup_get_root_coords(struct sway_view_child *child, | |||
24 | struct sway_xdg_popup_v6 *popup = (struct sway_xdg_popup_v6 *)child; | 24 | struct sway_xdg_popup_v6 *popup = (struct sway_xdg_popup_v6 *)child; |
25 | struct wlr_xdg_surface_v6 *surface = popup->wlr_xdg_surface_v6; | 25 | struct wlr_xdg_surface_v6 *surface = popup->wlr_xdg_surface_v6; |
26 | 26 | ||
27 | int x_offset = -child->view->geometry.x - surface->geometry.x; | ||
28 | int y_offset = -child->view->geometry.y - surface->geometry.y; | ||
29 | |||
27 | wlr_xdg_popup_v6_get_toplevel_coords(surface->popup, | 30 | wlr_xdg_popup_v6_get_toplevel_coords(surface->popup, |
28 | -surface->geometry.x + surface->popup->geometry.x, | 31 | x_offset + surface->popup->geometry.x, |
29 | -surface->geometry.y + surface->popup->geometry.y, | 32 | y_offset + surface->popup->geometry.y, |
30 | root_sx, root_sy); | 33 | root_sx, root_sy); |
31 | } | 34 | } |
32 | 35 | ||