diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-12-17 19:05:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-17 19:05:33 -0500 |
commit | e726b5c4458a88a3bd8880dca150f2de5c266a22 (patch) | |
tree | 3f06df32826d9c7edd7ca446a87169a33ca11786 | |
parent | Merge pull request #3305 from emersion/isue-template-stack-trace (diff) | |
parent | Focus node before tiling drag if on titlebar (diff) | |
download | sway-e726b5c4458a88a3bd8880dca150f2de5c266a22.tar.gz sway-e726b5c4458a88a3bd8880dca150f2de5c266a22.tar.zst sway-e726b5c4458a88a3bd8880dca150f2de5c266a22.zip |
Merge pull request #3308 from RedSoxFan/fix-titlebar-click
Focus node before tiling drag if on titlebar
-rw-r--r-- | sway/input/cursor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 0349fa7c..ad9b9835 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -945,6 +945,10 @@ void dispatch_cursor_button(struct sway_cursor *cursor, | |||
945 | if (config->tiling_drag && (mod_pressed || on_titlebar) && | 945 | if (config->tiling_drag && (mod_pressed || on_titlebar) && |
946 | state == WLR_BUTTON_PRESSED && !is_floating_or_child && | 946 | state == WLR_BUTTON_PRESSED && !is_floating_or_child && |
947 | cont && !cont->is_fullscreen) { | 947 | cont && !cont->is_fullscreen) { |
948 | if (on_titlebar) { | ||
949 | node = seat_get_focus_inactive(seat, &cont->node); | ||
950 | seat_set_focus(seat, node); | ||
951 | } | ||
948 | seat_pointer_notify_button(seat, time_msec, button, state); | 952 | seat_pointer_notify_button(seat, time_msec, button, state); |
949 | seat_begin_move_tiling(seat, cont, button); | 953 | seat_begin_move_tiling(seat, cont, button); |
950 | return; | 954 | return; |