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
This commit is contained in:
Kenny Levinsen 2020-06-28 19:05:04 +02:00 committed by Simon Ser
parent bb85b9070d
commit d0f7e0f481
3 changed files with 7 additions and 2 deletions

View file

@ -293,6 +293,8 @@ static void handle_commit(struct wl_listener *listener, void *data) {
memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box));
desktop_damage_view(view);
transaction_commit_dirty();
transaction_notify_view_ready_by_size(view,
new_geo.width, new_geo.height);
} else {
memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box));
}