Ignore move and resize requests from fullscreened XDG toplevels

This commit is contained in:
Leon Henrik Plickat 2021-06-16 12:20:27 +02:00 committed by Isaac Freund
parent 12c12c4b6c
commit 3405e2a87c

View file

@ -332,7 +332,7 @@ fn handleRequestMove(
) void { ) void {
const self = @fieldParentPtr(Self, "request_move", listener); const self = @fieldParentPtr(Self, "request_move", listener);
const seat = @intToPtr(*Seat, event.seat.seat.data); const seat = @intToPtr(*Seat, event.seat.seat.data);
if (self.view.pending.float or self.view.output.current.layout == null) if ((self.view.pending.float or self.view.output.current.layout == null) and !self.view.pending.fullscreen)
seat.cursor.enterMode(.move, self.view); seat.cursor.enterMode(.move, self.view);
} }
@ -340,7 +340,7 @@ fn handleRequestMove(
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 {
const self = @fieldParentPtr(Self, "request_resize", listener); const self = @fieldParentPtr(Self, "request_resize", listener);
const seat = @intToPtr(*Seat, event.seat.seat.data); const seat = @intToPtr(*Seat, event.seat.seat.data);
if (self.view.pending.float or self.view.output.current.layout == null) if ((self.view.pending.float or self.view.output.current.layout == null) and !self.view.pending.fullscreen)
seat.cursor.enterMode(.resize, self.view); seat.cursor.enterMode(.resize, self.view);
} }