diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-06-28 19:05:04 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-06-30 10:59:33 +0200 |
commit | d0f7e0f481a2b2e03a700d55570a3f85655ef03c (patch) | |
tree | 881dfd93f9ec0e76393324346d9fa94712c8f942 /sway/desktop/transaction.c | |
parent | bb85b9070d05cc707146aafec56b7452441a4bd2 (diff) |
transaction: Mark client resize immediately ready
If a client commits a new size on its own, we create a transaction for
the resize like any other. However, this involves sending a configure
and waiting for the ack, and wlroots will not send configure events when
there has been no change. This leads to transactions timing out.
Instead, just mark the view ready immediately by size when the client
is already ready, so that we avoid waiting for an ack that will never
come.
Closes: https://github.com/swaywm/sway/issues/5490
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r-- | sway/desktop/transaction.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 7b9ab586..2b268e2c 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -501,7 +501,7 @@ void transaction_notify_view_ready_by_serial(struct sway_view *view, uint32_t serial) { struct sway_transaction_instruction *instruction = view->container->node.instruction; - if (instruction->serial == serial) { + if (instruction != NULL && instruction->serial == serial) { set_instruction_ready(instruction); } } @@ -510,7 +510,8 @@ void transaction_notify_view_ready_by_size(struct sway_view *view, int width, int height) { struct sway_transaction_instruction *instruction = view->container->node.instruction; - if (instruction->container_state.content_width == width && + if (instruction != NULL && + instruction->container_state.content_width == width && instruction->container_state.content_height == height) { set_instruction_ready(instruction); } |