aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
authorLibravatar Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>2019-09-29 18:35:47 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2019-09-29 19:50:58 +0300
commitedcd353a0068d9175191363b3a7ce0b3837adc3d (patch)
tree7270088e0d8e27f3aa81da52bcfe05a41abd8be2 /sway/desktop/layer_shell.c
parentFix direct scan-out flickering (diff)
downloadsway-edcd353a0068d9175191363b3a7ce0b3837adc3d.tar.gz
sway-edcd353a0068d9175191363b3a7ce0b3837adc3d.tar.zst
sway-edcd353a0068d9175191363b3a7ce0b3837adc3d.zip
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.
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c6
1 files 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) {
373 while (true) { 373 while (true) {
374 if (layer_popup->parent_type == LAYER_PARENT_POPUP) { 374 if (layer_popup->parent_type == LAYER_PARENT_POPUP) {
375 layer_popup = layer_popup->parent_popup; 375 layer_popup = layer_popup->parent_popup;
376 ox += layer_popup->wlr_popup->base->geometry.x + 376 ox += layer_popup->wlr_popup->geometry.x;
377 layer_popup->wlr_popup->geometry.x; 377 oy += layer_popup->wlr_popup->geometry.y;
378 oy += layer_popup->wlr_popup->base->geometry.y +
379 layer_popup->wlr_popup->geometry.y;
380 } else { 378 } else {
381 layer = layer_popup->parent_layer; 379 layer = layer_popup->parent_layer;
382 ox += layer->geo.x; 380 ox += layer->geo.x;