From 8d7ebc258a830dc893bef327c2e672a901ced4ed Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Mon, 17 Dec 2018 02:30:50 -0500 Subject: [PATCH] Allow tiling views to be dragged by the titlebar Enables titling views to be dragged by the titlebar. This is in addition to using the modifier and dragging them from anywhere on the container surface. Floating views already allow this behavior. --- sway/input/cursor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 14e257263..0349fa7c3 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -942,8 +942,9 @@ void dispatch_cursor_button(struct sway_cursor *cursor, } // Handle moving a tiling container - if (config->tiling_drag && mod_pressed && state == WLR_BUTTON_PRESSED && - !is_floating_or_child && cont && !cont->is_fullscreen) { + if (config->tiling_drag && (mod_pressed || on_titlebar) && + state == WLR_BUTTON_PRESSED && !is_floating_or_child && + cont && !cont->is_fullscreen) { seat_pointer_notify_button(seat, time_msec, button, state); seat_begin_move_tiling(seat, cont, button); return;