aboutsummaryrefslogtreecommitdiff
path: root/sway/server.c
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-10-09 22:05:05 +0100
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2024-03-01 21:44:52 +0100
commit44a2cff3b309f181848b535857b80e2e4e7891e1 (patch)
tree4bf19210814e8b6957f620a6f8a78c2df163082a /sway/server.c
parent5e18ed3cf03eee9e83909fede46dd98dff652647 (diff)
ext-action-binder-v1: implement new protocol
and add a new command to trigger actions. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
Diffstat (limited to 'sway/server.c')
-rw-r--r--sway/server.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/server.c b/sway/server.c
index 684b1dbd..573a018b 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -350,6 +350,17 @@ bool server_init(struct sway_server *server) {
wl_list_init(&server->pending_launcher_ctxs);
+ server->action_binder = wlr_action_binder_v1_create(server->wl_display);
+ server->action_binder_bind.notify = action_binder_v1_bind;
+ wl_signal_add(&server->action_binder->events.bind,
+ &server->action_binder_bind);
+ server->action_binder_unbind.notify = action_binder_v1_unbind;
+ wl_signal_add(&server->action_binder->events.unbind,
+ &server->action_binder_unbind);
+ server->action_binder_destroy.notify = action_binder_v1_delete;
+ wl_signal_add(&server->action_binder->events.destroy,
+ &server->action_binder_destroy);
+
// Avoid using "wayland-0" as display socket
char name_candidate[16];
for (unsigned int i = 1; i <= 32; ++i) {