summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2021-01-26 13:47:54 -0700
committerFurkan Sahin <furkan-dev@proton.me>2021-01-26 13:47:54 -0700
commitea685009b661d1d0c19e3deac95eb46e66e8e7e8 (patch)
tree30e278c06f5ed0563800dcb922550b1bc93541d6
parenteedc2437492852975ffaf317e06e62f094126587 (diff)
Fix incorrect damage being applied on popups
To reproduce: - Open a floating window and a popup that hangs over the bottom or right - Move the window in the direction of the popup overhang - The previous position of the popup is damaged, not the new one
-rw-r--r--sway/desktop/transaction.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index 6c392bab..57311fe2 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -258,6 +258,13 @@ static void apply_container_state(struct sway_container *container,
}
}
+ // If the view hasn't responded to the configure, center it within
+ // the container. This is important for fullscreen views which
+ // refuse to resize to the size of the output.
+ if (view && view->surface) {
+ view_center_surface(view);
+ }
+
// Damage the new location
desktop_damage_whole_container(container);
if (view && view->surface) {
@@ -271,13 +278,6 @@ static void apply_container_state(struct sway_container *container,
desktop_damage_box(&box);
}
- // If the view hasn't responded to the configure, center it within
- // the container. This is important for fullscreen views which
- // refuse to resize to the size of the output.
- if (view && view->surface) {
- view_center_surface(view);
- }
-
if (!container->node.destroying) {
container_discover_outputs(container);
}