aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2021-02-15 10:07:39 +0100
committerLibravatar Tudor Brindus <me@tbrindus.ca>2021-02-15 13:49:47 -0500
commit31a01bb80df29fa7afd48741bc8fe1a948314eab (patch)
treeded69fbed2180b33c550d9517f37878151f8a693 /sway/input/seatop_default.c
parentinput: Only commit transactions when necessary (diff)
downloadsway-31a01bb80df29fa7afd48741bc8fe1a948314eab.tar.gz
sway-31a01bb80df29fa7afd48741bc8fe1a948314eab.tar.zst
sway-31a01bb80df29fa7afd48741bc8fe1a948314eab.zip
input: Commit transactions in seatop_default
This is needed for focus_follows_mouse, and was accidentally omitted in the previous transaction commit shuffle.
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index a583ed62..3f974e84 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -4,6 +4,7 @@
4#include <wlr/types/wlr_cursor.h> 4#include <wlr/types/wlr_cursor.h>
5#include <wlr/types/wlr_tablet_v2.h> 5#include <wlr/types/wlr_tablet_v2.h>
6#include <wlr/types/wlr_xcursor_manager.h> 6#include <wlr/types/wlr_xcursor_manager.h>
7#include "sway/desktop/transaction.h"
7#include "sway/input/cursor.h" 8#include "sway/input/cursor.h"
8#include "sway/input/seat.h" 9#include "sway/input/seat.h"
9#include "sway/input/tablet.h" 10#include "sway/input/tablet.h"
@@ -530,6 +531,7 @@ static void check_focus_follows_mouse(struct sway_seat *seat,
530 if (focus && hovered_output != node_get_output(focus)) { 531 if (focus && hovered_output != node_get_output(focus)) {
531 struct sway_workspace *ws = output_get_active_workspace(hovered_output); 532 struct sway_workspace *ws = output_get_active_workspace(hovered_output);
532 seat_set_focus(seat, &ws->node); 533 seat_set_focus(seat, &ws->node);
534 transaction_commit_dirty();
533 } 535 }
534 return; 536 return;
535 } 537 }
@@ -541,6 +543,7 @@ static void check_focus_follows_mouse(struct sway_seat *seat,
541 struct sway_output *hovered_output = node_get_output(hovered_node); 543 struct sway_output *hovered_output = node_get_output(hovered_node);
542 if (hovered_output != focused_output) { 544 if (hovered_output != focused_output) {
543 seat_set_focus(seat, seat_get_focus_inactive(seat, hovered_node)); 545 seat_set_focus(seat, seat_get_focus_inactive(seat, hovered_node));
546 transaction_commit_dirty();
544 } 547 }
545 return; 548 return;
546 } 549 }
@@ -556,6 +559,7 @@ static void check_focus_follows_mouse(struct sway_seat *seat,
556 if (hovered_node != e->previous_node || 559 if (hovered_node != e->previous_node ||
557 config->focus_follows_mouse == FOLLOWS_ALWAYS) { 560 config->focus_follows_mouse == FOLLOWS_ALWAYS) {
558 seat_set_focus(seat, hovered_node); 561 seat_set_focus(seat, hovered_node);
562 transaction_commit_dirty();
559 } 563 }
560 } 564 }
561} 565}