aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Erik Reider <35975961+ErikReider@users.noreply.github.com>2023-06-05 15:31:16 +0200
committerLibravatar Kenny Levinsen <kl@kl.wtf>2023-06-06 09:07:05 +0200
commit913a7679cbde98df0722b326d8c3cfc0f0576f6d (patch)
tree752fea000515bcd93a40fc175dbbace5221ee9c4 /include
parentchase wlroots wlr_renderer_begin_buffer_pass change (diff)
downloadsway-913a7679cbde98df0722b326d8c3cfc0f0576f6d.tar.gz
sway-913a7679cbde98df0722b326d8c3cfc0f0576f6d.tar.zst
sway-913a7679cbde98df0722b326d8c3cfc0f0576f6d.zip
Add support for wlr-layer-shell ON_DEMAND keyboard interactivity
This allows for layer shell surfaces to receive focus while the surface is explicitly focused, i.e allowing text fields to receive keyboard input just like a regular surface.
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/seat.h3
-rw-r--r--include/sway/layers.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 5ef8e2f3..35a96ace 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -104,8 +104,9 @@ struct sway_seat {
104 struct sway_workspace *workspace; 104 struct sway_workspace *workspace;
105 char *prev_workspace_name; // for workspace back_and_forth 105 char *prev_workspace_name; // for workspace back_and_forth
106 106
107 // If the focused layer is set, views cannot receive keyboard focus
108 struct wlr_layer_surface_v1 *focused_layer; 107 struct wlr_layer_surface_v1 *focused_layer;
108 // If the exclusive layer is set, views cannot receive keyboard focus
109 bool has_exclusive_layer;
109 110
110 // If exclusive_client is set, no other clients will receive input events 111 // If exclusive_client is set, no other clients will receive input events
111 struct wl_client *exclusive_client; 112 struct wl_client *exclusive_client;
diff --git a/include/sway/layers.h b/include/sway/layers.h
index f8508493..9220bdb5 100644
--- a/include/sway/layers.h
+++ b/include/sway/layers.h
@@ -55,6 +55,10 @@ struct sway_layer_subsurface {
55}; 55};
56 56
57struct sway_output; 57struct sway_output;
58
59struct wlr_layer_surface_v1 *toplevel_layer_surface_from_surface(
60 struct wlr_surface *surface);
61
58void arrange_layers(struct sway_output *output); 62void arrange_layers(struct sway_output *output);
59 63
60struct sway_layer_surface *layer_from_wlr_layer_surface_v1( 64struct sway_layer_surface *layer_from_wlr_layer_surface_v1(