View: rework configure abstraction

- Move the decision whether a configure should be tracked or not into
the xdg toplevel/xwayland code.

- Only track configures for xdg toplevels with the transaction system
if the dimensions of the view are affected.
This commit is contained in:
Isaac Freund
2023-03-04 15:51:58 +01:00
parent 915fb7ae7b
commit b4ae62cd40
4 changed files with 109 additions and 104 deletions

View File

@ -497,15 +497,10 @@ fn sendConfigures(root: *Self) void {
// This can happen if a view is unmapped while a layout demand including it is inflight
if (!view.mapped) continue;
if (view.needsConfigure()) {
view.configure();
// We don't give a damn about frame perfection for xwayland views
if (!build_options.xwayland or view.impl != .xwayland_view) {
root.inflight_configures += 1;
view.saveSurfaceTree();
view.sendFrameDone();
}
if (view.configure()) {
root.inflight_configures += 1;
view.saveSurfaceTree();
view.sendFrameDone();
}
}
}
@ -583,8 +578,6 @@ fn commitTransaction(root: *Self) void {
while (focus_stack_it.next()) |view| {
assert(view.inflight.output == output);
view.inflight_serial = null;
if (view.current.output != view.inflight.output or
(output.current.fullscreen == view and output.inflight.fullscreen != view))
{