aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-02 21:07:46 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-02 21:09:09 -0400
commit56078edd65d05c1db1aa5d6e72134499e907063d (patch)
tree7848b49de2f3e7493b6d88aa23d849605c5c9a6d /sway/desktop/layer_shell.c
parentIdentify topmost interactive layer post-arrange (diff)
downloadsway-56078edd65d05c1db1aa5d6e72134499e907063d.tar.gz
sway-56078edd65d05c1db1aa5d6e72134499e907063d.tar.zst
sway-56078edd65d05c1db1aa5d6e72134499e907063d.zip
Give exclusive focus to layers above shell layer
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index a187432b..3c7b45f7 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -7,6 +7,8 @@
7#include <wlr/types/wlr_output_damage.h> 7#include <wlr/types/wlr_output_damage.h>
8#include <wlr/types/wlr_output.h> 8#include <wlr/types/wlr_output.h>
9#include <wlr/util/log.h> 9#include <wlr/util/log.h>
10#include "sway/input/input-manager.h"
11#include "sway/input/seat.h"
10#include "sway/layers.h" 12#include "sway/layers.h"
11#include "sway/output.h" 13#include "sway/output.h"
12#include "sway/server.h" 14#include "sway/server.h"
@@ -208,7 +210,10 @@ void arrange_layers(struct sway_output *output) {
208 } 210 }
209 } 211 }
210 212
211 wlr_log(L_DEBUG, "topmost layer: %p", topmost); 213 struct sway_seat *seat;
214 wl_list_for_each(seat, &input_manager->seats, link) {
215 seat_set_focus_layer(seat, topmost ? topmost->layer_surface : NULL);
216 }
212} 217}
213 218
214static void handle_output_destroy(struct wl_listener *listener, void *data) { 219static void handle_output_destroy(struct wl_listener *listener, void *data) {