From 5887d54f04c2e631988c6c8ece6c4160169df0b9 Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Wed, 17 Feb 2021 14:30:24 +0100 Subject: [PATCH] Deny move/resize requests from tiled XdgToplevel Views --- river/XdgToplevel.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/river/XdgToplevel.zig b/river/XdgToplevel.zig index fa20f08..f4385e7 100644 --- a/river/XdgToplevel.zig +++ b/river/XdgToplevel.zig @@ -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