From d77ac5ac7a5c7801fb1099447f2158591b7c27fd Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Wed, 8 Jul 2020 02:39:17 +0200 Subject: [PATCH] cursor: close view on middleclick when pointer_modifier is active --- river/Cursor.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/river/Cursor.zig b/river/Cursor.zig index e6add16..7b72729 100644 --- a/river/Cursor.zig +++ b/river/Cursor.zig @@ -246,12 +246,12 @@ fn handleButton(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void { if (event.state == .WLR_BUTTON_PRESSED) { // If the button is pressed and the pointer modifier is - // active, enter cursor mode and return. + // active, enter cursor mode or close view and return. if (self.seat.pointer_modifier) { switch (event.button) { c.BTN_LEFT => enterCursorMode(self, event, view, CursorMode.Move), + c.BTN_MIDDLE => view.close(), c.BTN_RIGHT => {}, // TODO Resize - c.BTN_MIDDLE => {}, // TODO Some useful operation, maybe kill // TODO Some mice have additional buttons. These // could also be bound to some useful action.