view: get rid of notifyConfiguredOrApplyPending()
This function is only called in one place, just inline the code.
This commit is contained in:
parent
cef6d5a0be
commit
1bacaa5b43
@ -273,22 +273,6 @@ pub fn saveBuffers(self: *Self) void {
|
||||
self.surface.?.forEachSurface(*std.ArrayList(SavedBuffer), saveBuffersIterator, &self.saved_buffers);
|
||||
}
|
||||
|
||||
/// If this commit is in response to our configure and the
|
||||
/// transaction code is tracking this configure, notify it.
|
||||
/// Otherwise, apply the pending state immediately.
|
||||
pub fn notifyConfiguredOrApplyPending(self: *Self) void {
|
||||
self.pending_serial = null;
|
||||
if (self.shouldTrackConfigure()) {
|
||||
server.root.notifyConfigured();
|
||||
} else {
|
||||
const self_tags_changed = self.pending.tags != self.current.tags;
|
||||
self.current = self.pending;
|
||||
self.commitOpacityTransition();
|
||||
if (self_tags_changed) self.output.sendViewTags();
|
||||
self.output.damage.addWhole();
|
||||
}
|
||||
}
|
||||
|
||||
fn saveBuffersIterator(
|
||||
surface: *wlr.Surface,
|
||||
surface_x: c_int,
|
||||
|
@ -261,7 +261,19 @@ fn handleCommit(listener: *wl.Listener(*wlr.Surface), surface: *wlr.Surface) voi
|
||||
view.surface_box = new_box;
|
||||
|
||||
if (s == self.xdg_surface.configure_serial) {
|
||||
view.notifyConfiguredOrApplyPending();
|
||||
// If this commit is in response to our configure and the
|
||||
// transaction code is tracking this configure, notify it.
|
||||
// Otherwise, apply the pending state immediately.
|
||||
view.pending_serial = null;
|
||||
if (view.shouldTrackConfigure()) {
|
||||
server.root.notifyConfigured();
|
||||
} else {
|
||||
const self_tags_changed = view.pending.tags != view.current.tags;
|
||||
view.current = view.pending;
|
||||
view.commitOpacityTransition();
|
||||
if (self_tags_changed) view.output.sendViewTags();
|
||||
view.output.damage.addWhole();
|
||||
}
|
||||
} 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
|
||||
|
Loading…
Reference in New Issue
Block a user