From ee236afb43c8da4a65b31edad0b470d4099b3cd6 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Wed, 13 Feb 2019 23:46:20 -0500 Subject: seat: allow tree focus changes while layer focused This allows the focused inactive tree node and visible workspaces to be changed while a surface layer has focus. The layer temporarily loses focus, the tree focus changes, and the layer gets refocused. --- sway/input/seat.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sway/input/seat.c') diff --git a/sway/input/seat.c b/sway/input/seat.c index 18664d7c..df48b751 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -725,6 +725,10 @@ void seat_set_raw_focus(struct sway_seat *seat, struct sway_node *node) { void seat_set_focus(struct sway_seat *seat, struct sway_node *node) { if (seat->focused_layer) { + struct wlr_layer_surface_v1 *layer = seat->focused_layer; + seat_set_focus_layer(seat, NULL); + seat_set_focus(seat, node); + seat_set_focus_layer(seat, layer); return; } -- cgit v1.2.3-54-g00ecf