Deny move/resize requests from tiled XdgToplevel Views

This commit is contained in:
Leon Henrik Plickat 2021-02-17 14:30:24 +01:00 committed by Isaac Freund
parent 870f0b746e
commit 5887d54f04

View file

@ -296,14 +296,14 @@ fn handleRequestMove(
) void {
const self = @fieldParentPtr(Self, "request_move", listener);
const seat = @intToPtr(*Seat, event.seat.seat.data);
seat.cursor.enterMode(.move, self.view);
if (self.view.pending.float) seat.cursor.enterMode(.move, self.view);
}
/// Called when the client asks to be resized via the cursor.
fn handleRequestResize(listener: *wl.Listener(*wlr.XdgToplevel.event.Resize), event: *wlr.XdgToplevel.event.Resize) void {
const self = @fieldParentPtr(Self, "request_resize", listener);
const seat = @intToPtr(*Seat, event.seat.seat.data);
seat.cursor.enterMode(.resize, self.view);
if (self.view.pending.float) seat.cursor.enterMode(.resize, self.view);
}
/// Called when the client sets / updates its title