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.
This commit is contained in:
Brian Ashworth 2018-12-17 02:30:50 -05:00 committed by emersion
parent 1442d4e688
commit 8d7ebc258a

View file

@ -942,8 +942,9 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
} }
// Handle moving a tiling container // Handle moving a tiling container
if (config->tiling_drag && mod_pressed && state == WLR_BUTTON_PRESSED && if (config->tiling_drag && (mod_pressed || on_titlebar) &&
!is_floating_or_child && cont && !cont->is_fullscreen) { state == WLR_BUTTON_PRESSED && !is_floating_or_child &&
cont && !cont->is_fullscreen) {
seat_pointer_notify_button(seat, time_msec, button, state); seat_pointer_notify_button(seat, time_msec, button, state);
seat_begin_move_tiling(seat, cont, button); seat_begin_move_tiling(seat, cont, button);
return; return;