aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xdg_shell_v6.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-10-20 15:38:25 +0200
committerGitHub <noreply@github.com>2018-10-20 15:38:25 +0200
commit64534d2fd17c08ad9fb32b27d3924114fa929b9f (patch)
treea997eab6c3b108779b7fd0f6fe2ad50f47551718 /sway/desktop/xdg_shell_v6.c
parent551e05ba90feb497723bbc214781ba58b60562a7 (diff)
parent93ec1af4d9980288a3264c985fb8e5b8755b384a (diff)
Merge pull request #2895 from RyanDwyer/fix-popup-damage
Fix popup damage issues when toplevel and/or popup uses geometry
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r--sway/desktop/xdg_shell_v6.c7
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,
struct sway_xdg_popup_v6 *popup = (struct sway_xdg_popup_v6 *)child;
struct wlr_xdg_surface_v6 *surface = popup->wlr_xdg_surface_v6;
+ int x_offset = -child->view->geometry.x - surface->geometry.x;
+ int y_offset = -child->view->geometry.y - surface->geometry.y;
+
wlr_xdg_popup_v6_get_toplevel_coords(surface->popup,
- -surface->geometry.x + surface->popup->geometry.x,
- -surface->geometry.y + surface->popup->geometry.y,
+ x_offset + surface->popup->geometry.x,
+ y_offset + surface->popup->geometry.y,
root_sx, root_sy);
}