XdgToplevel: don't update geometry if configure inflight

This commit is contained in:
Isaac Freund 2024-04-18 10:48:59 +02:00
parent 6b86af4f85
commit d1dc873408
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -319,11 +319,11 @@ fn handleCommit(listener: *wl.Listener(*wlr.Surface), _: *wlr.Surface) void {
}; };
} }
switch (toplevel.configure_state) {
.idle, .committed, .timed_out => {
const old_geometry = toplevel.geometry; const old_geometry = toplevel.geometry;
toplevel.wlr_toplevel.base.getGeometry(&toplevel.geometry); toplevel.wlr_toplevel.base.getGeometry(&toplevel.geometry);
switch (toplevel.configure_state) {
.idle, .committed, .timed_out => {
const size_changed = toplevel.geometry.width != old_geometry.width or const size_changed = toplevel.geometry.width != old_geometry.width or
toplevel.geometry.height != old_geometry.height; toplevel.geometry.height != old_geometry.height;
const no_layout = view.current.output != null and view.current.output.?.layout == null; const no_layout = view.current.output != null and view.current.output.?.layout == null;
@ -360,6 +360,8 @@ fn handleCommit(listener: *wl.Listener(*wlr.Surface), _: *wlr.Surface) void {
// stashed buffer from when the transaction started. // stashed buffer from when the transaction started.
.inflight => view.sendFrameDone(), .inflight => view.sendFrameDone(),
.acked, .timed_out_acked => { .acked, .timed_out_acked => {
toplevel.wlr_toplevel.base.getGeometry(&toplevel.geometry);
if (view.inflight.resizing) { if (view.inflight.resizing) {
view.resizeUpdatePosition(toplevel.geometry.width, toplevel.geometry.height); view.resizeUpdatePosition(toplevel.geometry.width, toplevel.geometry.height);
} }