aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2020-06-28 19:05:04 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2020-06-30 10:59:33 +0200
commitd0f7e0f481a2b2e03a700d55570a3f85655ef03c (patch)
tree881dfd93f9ec0e76393324346d9fa94712c8f942 /sway/desktop/xdg_shell.c
parenttree/view: fix smart borders with tabbed/stacked ancestor (diff)
downloadsway-d0f7e0f481a2b2e03a700d55570a3f85655ef03c.tar.gz
sway-d0f7e0f481a2b2e03a700d55570a3f85655ef03c.tar.zst
sway-d0f7e0f481a2b2e03a700d55570a3f85655ef03c.zip
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/xdg_shell.c')
-rw-r--r--sway/desktop/xdg_shell.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 2bf026f7..df751ef6 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -293,6 +293,8 @@ static void handle_commit(struct wl_listener *listener, void *data) {
293 memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); 293 memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box));
294 desktop_damage_view(view); 294 desktop_damage_view(view);
295 transaction_commit_dirty(); 295 transaction_commit_dirty();
296 transaction_notify_view_ready_by_size(view,
297 new_geo.width, new_geo.height);
296 } else { 298 } else {
297 memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); 299 memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box));
298 } 300 }