From edcd353a0068d9175191363b3a7ce0b3837adc3d Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Sun, 29 Sep 2019 18:35:47 +0200 Subject: [PATCH] layer-shell: Fix damage tracking of nested popups Popups are positioned relative to local surface coordinates of the parent surface. There's no need to consider values set with xdg_surface.set_window_geometry for parent surfaces. --- sway/desktop/layer_shell.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index c881919d..a9803d21 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -373,10 +373,8 @@ static void popup_damage(struct sway_layer_popup *layer_popup, bool whole) { while (true) { if (layer_popup->parent_type == LAYER_PARENT_POPUP) { layer_popup = layer_popup->parent_popup; - ox += layer_popup->wlr_popup->base->geometry.x + - layer_popup->wlr_popup->geometry.x; - oy += layer_popup->wlr_popup->base->geometry.y + - layer_popup->wlr_popup->geometry.y; + ox += layer_popup->wlr_popup->geometry.x; + oy += layer_popup->wlr_popup->geometry.y; } else { layer = layer_popup->parent_layer; ox += layer->geo.x;