xdg-toplevel: ignore redundant move/resize requests

Such requests currently lead to an assertion failure.

I don't know what changed in nautilus 45.0 that caused it to start doing
this and I probably don't want to know.
This commit is contained in:
Isaac Freund 2023-11-08 13:16:50 +01:00
parent c4fe1e1a3f
commit 6c81990163
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -381,7 +381,10 @@ fn handleRequestMove(
if (view.pending.fullscreen) return; if (view.pending.fullscreen) return;
if (!(view.pending.float or view.pending.output.?.layout == null)) return; if (!(view.pending.float or view.pending.output.?.layout == null)) return;
seat.cursor.startMove(view); switch (seat.cursor.mode) {
.passthrough, .down => seat.cursor.startMove(view),
.move, .resize => {},
}
} }
fn handleRequestResize(listener: *wl.Listener(*wlr.XdgToplevel.event.Resize), event: *wlr.XdgToplevel.event.Resize) void { fn handleRequestResize(listener: *wl.Listener(*wlr.XdgToplevel.event.Resize), event: *wlr.XdgToplevel.event.Resize) void {
@ -406,7 +409,10 @@ fn handleRequestResize(listener: *wl.Listener(*wlr.XdgToplevel.event.Resize), ev
if (view.pending.fullscreen) return; if (view.pending.fullscreen) return;
if (!(view.pending.float or view.pending.output.?.layout == null)) return; if (!(view.pending.float or view.pending.output.?.layout == null)) return;
seat.cursor.startResize(view, event.edges); switch (seat.cursor.mode) {
.passthrough, .down => seat.cursor.startResize(view, event.edges),
.move, .resize => {},
}
} }
/// Called when the client sets / updates its title /// Called when the client sets / updates its title