aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
authorLibravatar David96 <david@hameipe.de>2021-02-16 14:22:57 +0100
committerLibravatar Tudor Brindus <me@tbrindus.ca>2021-02-16 09:35:48 -0500
commit28cadf558090854ace1df1a0a64f5fbc059541c0 (patch)
treee4ff8810171f8b49ed00e7167f625e4edfad077b /sway/input/seatop_default.c
parentPrevent inactive-windows-transparency.py to crash on lockscreen (diff)
downloadsway-28cadf558090854ace1df1a0a64f5fbc059541c0.tar.gz
sway-28cadf558090854ace1df1a0a64f5fbc059541c0.tar.zst
sway-28cadf558090854ace1df1a0a64f5fbc059541c0.zip
Add missing transaction commits to seatop_default
Every seat_set_focus* should be followed by a transaction_commit_dirty. In cases where the focus change is followed by a seatop_begin* this is not needed, as transaction_commit_dirty is then called by the seatop_begin* function. Fixes #6034
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index 3f974e84..10d97309 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -232,6 +232,7 @@ static void handle_tablet_tool_tip(struct sway_seat *seat,
232 wlr_layer_surface_v1_from_wlr_surface(surface); 232 wlr_layer_surface_v1_from_wlr_surface(surface);
233 if (layer->current.keyboard_interactive) { 233 if (layer->current.keyboard_interactive) {
234 seat_set_focus_layer(seat, layer); 234 seat_set_focus_layer(seat, layer);
235 transaction_commit_dirty();
235 } 236 }
236 } else if (cont) { 237 } else if (cont) {
237 bool is_floating_or_child = container_is_floating_or_child(cont); 238 bool is_floating_or_child = container_is_floating_or_child(cont);
@@ -269,6 +270,7 @@ static void handle_tablet_tool_tip(struct sway_seat *seat,
269 struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland; 270 struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland;
270 wlr_xwayland_set_seat(xwayland, seat->wlr_seat); 271 wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
271 seat_set_focus_surface(seat, xsurface->surface, false); 272 seat_set_focus_surface(seat, xsurface->surface, false);
273 transaction_commit_dirty();
272 } 274 }
273 } 275 }
274#endif 276#endif
@@ -357,6 +359,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
357 if (node && node->type == N_WORKSPACE) { 359 if (node && node->type == N_WORKSPACE) {
358 if (state == WLR_BUTTON_PRESSED) { 360 if (state == WLR_BUTTON_PRESSED) {
359 seat_set_focus(seat, node); 361 seat_set_focus(seat, node);
362 transaction_commit_dirty();
360 } 363 }
361 seat_pointer_notify_button(seat, time_msec, button, state); 364 seat_pointer_notify_button(seat, time_msec, button, state);
362 return; 365 return;
@@ -368,6 +371,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
368 wlr_layer_surface_v1_from_wlr_surface(surface); 371 wlr_layer_surface_v1_from_wlr_surface(surface);
369 if (layer->current.keyboard_interactive) { 372 if (layer->current.keyboard_interactive) {
370 seat_set_focus_layer(seat, layer); 373 seat_set_focus_layer(seat, layer);
374 transaction_commit_dirty();
371 } 375 }
372 seat_pointer_notify_button(seat, time_msec, button, state); 376 seat_pointer_notify_button(seat, time_msec, button, state);
373 return; 377 return;
@@ -488,6 +492,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
488 if (cont && state == WLR_BUTTON_PRESSED) { 492 if (cont && state == WLR_BUTTON_PRESSED) {
489 node = seat_get_focus_inactive(seat, &cont->node); 493 node = seat_get_focus_inactive(seat, &cont->node);
490 seat_set_focus(seat, node); 494 seat_set_focus(seat, node);
495 transaction_commit_dirty();
491 seat_pointer_notify_button(seat, time_msec, button, state); 496 seat_pointer_notify_button(seat, time_msec, button, state);
492 return; 497 return;
493 } 498 }
@@ -502,6 +507,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec,
502 struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland; 507 struct wlr_xwayland *xwayland = server.xwayland.wlr_xwayland;
503 wlr_xwayland_set_seat(xwayland, seat->wlr_seat); 508 wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
504 seat_set_focus_surface(seat, xsurface->surface, false); 509 seat_set_focus_surface(seat, xsurface->surface, false);
510 transaction_commit_dirty();
505 seat_pointer_notify_button(seat, time_msec, button, state); 511 seat_pointer_notify_button(seat, time_msec, button, state);
506 return; 512 return;
507 } 513 }
@@ -718,6 +724,7 @@ static void handle_pointer_axis(struct sway_seat *seat,
718 // Use the focused child of the tabbed/stacked container, not the 724 // Use the focused child of the tabbed/stacked container, not the
719 // container the user scrolled on. 725 // container the user scrolled on.
720 seat_set_focus(seat, new_focus); 726 seat_set_focus(seat, new_focus);
727 transaction_commit_dirty();
721 handled = true; 728 handled = true;
722 } 729 }
723 } 730 }