aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-12-17 02:30:50 -0500
committerLibravatar emersion <contact@emersion.fr>2018-12-17 09:08:26 +0100
commit8d7ebc258a830dc893bef327c2e672a901ced4ed (patch)
tree9dda447fa220551fdacf04fc2c6e50dad06a746f /sway/input/cursor.c
parentUpdate for swaywm/wlroots#1377 (diff)
downloadsway-8d7ebc258a830dc893bef327c2e672a901ced4ed.tar.gz
sway-8d7ebc258a830dc893bef327c2e672a901ced4ed.tar.zst
sway-8d7ebc258a830dc893bef327c2e672a901ced4ed.zip
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.
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 14e25726..0349fa7c 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -942,8 +942,9 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
942 } 942 }
943 943
944 // Handle moving a tiling container 944 // Handle moving a tiling container
945 if (config->tiling_drag && mod_pressed && state == WLR_BUTTON_PRESSED && 945 if (config->tiling_drag && (mod_pressed || on_titlebar) &&
946 !is_floating_or_child && cont && !cont->is_fullscreen) { 946 state == WLR_BUTTON_PRESSED && !is_floating_or_child &&
947 cont && !cont->is_fullscreen) {
947 seat_pointer_notify_button(seat, time_msec, button, state); 948 seat_pointer_notify_button(seat, time_msec, button, state);
948 seat_begin_move_tiling(seat, cont, button); 949 seat_begin_move_tiling(seat, cont, button);
949 return; 950 return;