aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Rouven Czerwinski <rouven@czerwinskis.de>2022-01-18 19:13:01 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2022-01-21 13:13:16 +0100
commit0adcf77f3f19dccd7cc50f303c7708a22c5f33b4 (patch)
treebd92ad500245260afc89ee84726031fc1ceddee6
parenttreat fullscreen windows as 'tiled' for commands/focus (diff)
downloadsway-0adcf77f3f19dccd7cc50f303c7708a22c5f33b4.tar.gz
sway-0adcf77f3f19dccd7cc50f303c7708a22c5f33b4.tar.zst
sway-0adcf77f3f19dccd7cc50f303c7708a22c5f33b4.zip
transaction: destroying nodes aren't hidden
Commit 37d7bc69986f ("transaction: Only wait for ack from visible views") introduced a check which uses view_is_visible() to check if a view is still visible on the screen. However view_is_visible() will early return in case the node is in the destroying state. This is incorrect for transactions, since a destroying view which is visible will trigger configure events for other clients. This bug was visible when repeatedly opening and closing two views side by side, since we ignore the destroying node we get a frame where the still open view is shown with the old configure values and the rest is the desktop background. The next frame is than correct again. Fix this by considering destroying views as visible, we correctly wait for them and send the configure events to other views in time, fixing the background flicker. Fixes #6473 (cherry picked from commit e4909ab4a3514d9b3bfb01473cd3cd1704c8cd05)
-rw-r--r--sway/desktop/transaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index b1f3fb32..f5a3a053 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -402,7 +402,7 @@ static void transaction_commit(struct sway_transaction *transaction) {
402 struct sway_transaction_instruction *instruction = 402 struct sway_transaction_instruction *instruction =
403 transaction->instructions->items[i]; 403 transaction->instructions->items[i];
404 struct sway_node *node = instruction->node; 404 struct sway_node *node = instruction->node;
405 bool hidden = node_is_view(node) && 405 bool hidden = node_is_view(node) && !node->destroying &&
406 !view_is_visible(node->sway_container->view); 406 !view_is_visible(node->sway_container->view);
407 if (should_configure(node, instruction)) { 407 if (should_configure(node, instruction)) {
408 instruction->serial = view_configure(node->sway_container->view, 408 instruction->serial = view_configure(node->sway_container->view,