aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-08 22:27:21 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-08 22:28:13 +1000
commit4c5dc6f135ce1b46ecffb6440b0b106df0a3e18d (patch)
treefce478974abdae69ffbbf9f987aa898bed86d2f6 /sway/input/cursor.c
parentRename container_at_view to surface_at_view and make it return void (diff)
downloadsway-4c5dc6f135ce1b46ecffb6440b0b106df0a3e18d.tar.gz
sway-4c5dc6f135ce1b46ecffb6440b0b106df0a3e18d.tar.zst
sway-4c5dc6f135ce1b46ecffb6440b0b106df0a3e18d.zip
Focus floating views when beginning move/resize operations
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 80b4f9dc..39874b73 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -429,6 +429,9 @@ static void dispatch_cursor_button_floating(struct sway_cursor *cursor,
429 struct sway_container *cont) { 429 struct sway_container *cont) {
430 struct sway_seat *seat = cursor->seat; 430 struct sway_seat *seat = cursor->seat;
431 431
432 seat_set_focus(seat, cont);
433 seat_pointer_notify_button(seat, time_msec, button, state);
434
432 // Deny moving or resizing a fullscreen container 435 // Deny moving or resizing a fullscreen container
433 if (container_is_fullscreen_or_child(cont)) { 436 if (container_is_fullscreen_or_child(cont)) {
434 seat_pointer_notify_button(seat, time_msec, button, state); 437 seat_pointer_notify_button(seat, time_msec, button, state);
@@ -468,10 +471,6 @@ static void dispatch_cursor_button_floating(struct sway_cursor *cursor,
468 seat_begin_resize(seat, floater, button, edge); 471 seat_begin_resize(seat, floater, button, edge);
469 return; 472 return;
470 } 473 }
471
472 // Send event to surface
473 seat_set_focus(seat, cont);
474 seat_pointer_notify_button(seat, time_msec, button, state);
475} 474}
476 475
477/** 476/**