mirror of
https://github.com/NickHu/sway
synced 2024-12-30 22:23:30 +01:00
Merge pull request #3308 from RedSoxFan/fix-titlebar-click
Focus node before tiling drag if on titlebar
This commit is contained in:
commit
e726b5c445
1 changed files with 4 additions and 0 deletions
|
@ -945,6 +945,10 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
|
||||||
if (config->tiling_drag && (mod_pressed || on_titlebar) &&
|
if (config->tiling_drag && (mod_pressed || on_titlebar) &&
|
||||||
state == WLR_BUTTON_PRESSED && !is_floating_or_child &&
|
state == WLR_BUTTON_PRESSED && !is_floating_or_child &&
|
||||||
cont && !cont->is_fullscreen) {
|
cont && !cont->is_fullscreen) {
|
||||||
|
if (on_titlebar) {
|
||||||
|
node = seat_get_focus_inactive(seat, &cont->node);
|
||||||
|
seat_set_focus(seat, node);
|
||||||
|
}
|
||||||
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;
|
||||||
|
|
Loading…
Reference in a new issue