xdg-toplevel: fix configure serial checking

Currently if another configure is in flight after the one we are
tracking the serial of and the client acks the second configure as well
(or only the second configure) before committing, we will never realize
the configure we are tracking has been acked.

Instead, listen for the ack_configure signal and set a bool that we can
check on surface commit.

This probably isn't an issue that would actually be hit by well behaved
clients as river doesn't send redundant configure events. However,
having correct code is always better even if it's slightly more complex.
This commit is contained in:
Isaac Freund
2021-09-18 18:25:21 +02:00
parent ab55ab8fc2
commit b8ebbc29cf
2 changed files with 26 additions and 7 deletions

View File

@ -229,10 +229,10 @@ pub fn needsConfigure(self: Self) bool {
};
}
pub fn configure(self: Self) void {
pub fn configure(self: *Self) void {
switch (self.impl) {
.xdg_toplevel => |xdg_toplevel| xdg_toplevel.configure(),
.xwayland_view => |xwayland_view| xwayland_view.configure(),
.xdg_toplevel => |*xdg_toplevel| xdg_toplevel.configure(),
.xwayland_view => |*xwayland_view| xwayland_view.configure(),
}
}