view: sidestep transaction for float/fullscreen

Transactions are only useful when multiple views need to atomically
change size together. Float/fullscreen views are independant of the
layout and should bypass the transaction system.
This commit is contained in:
Isaac Freund
2020-07-31 12:16:11 +02:00
parent ecef8c2dc4
commit 7a244092e5
5 changed files with 37 additions and 21 deletions

View File

@ -245,14 +245,14 @@ fn handleCommit(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
view.surface_box = new_box;
if (s == self.wlr_xdg_surface.configure_serial) {
// If this commit is in response to our configure, either notify
// the transaction code or apply the pending state immediately,
// depending on whether or not the view is floating.
// If this commit is in response to our configure and the view is
// part of the layout, notify the transaction code. If floating or
// fullscreen apply the pending state immediately.
view.pending_serial = null;
if (view.current.float and view.pending.float)
view.current = view.pending
if (!view.pending.float and !view.pending.fullscreen)
view.output.root.notifyConfigured()
else
view.output.root.notifyConfigured();
view.current = view.pending;
} else {
// If the client has not yet acked our configure, we need to send a
// frame done event so that it commits another buffer. These