aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tadeo Kondrak <me@tadeo.ca>2021-01-26 13:47:54 -0700
committerLibravatar Tudor Brindus <me@tbrindus.ca>2021-02-21 17:30:49 -0500
commitf58f054c87843eb27acc94cc19914d369738a671 (patch)
tree30e278c06f5ed0563800dcb922550b1bc93541d6
parentbuild: use wlroots dependency variables (diff)
downloadsway-f58f054c87843eb27acc94cc19914d369738a671.tar.gz
sway-f58f054c87843eb27acc94cc19914d369738a671.tar.zst
sway-f58f054c87843eb27acc94cc19914d369738a671.zip
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,
258 } 258 }
259 } 259 }
260 260
261 // If the view hasn't responded to the configure, center it within
262 // the container. This is important for fullscreen views which
263 // refuse to resize to the size of the output.
264 if (view && view->surface) {
265 view_center_surface(view);
266 }
267
261 // Damage the new location 268 // Damage the new location
262 desktop_damage_whole_container(container); 269 desktop_damage_whole_container(container);
263 if (view && view->surface) { 270 if (view && view->surface) {
@@ -271,13 +278,6 @@ static void apply_container_state(struct sway_container *container,
271 desktop_damage_box(&box); 278 desktop_damage_box(&box);
272 } 279 }
273 280
274 // If the view hasn't responded to the configure, center it within
275 // the container. This is important for fullscreen views which
276 // refuse to resize to the size of the output.
277 if (view && view->surface) {
278 view_center_surface(view);
279 }
280
281 if (!container->node.destroying) { 281 if (!container->node.destroying) {
282 container_discover_outputs(container); 282 container_discover_outputs(container);
283 } 283 }