From 67cab097df08b6125acf99f4cd30075c22399e9b Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 23 Mar 2025 19:57:55 +0800 Subject: [PATCH] feat: add quit ipc handle --- maomao.c | 9 +++++++++ protocols/dwl-ipc-unstable-v2.xml | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/maomao.c b/maomao.c index b24ffaa6..cd29391e 100644 --- a/maomao.c +++ b/maomao.c @@ -468,6 +468,8 @@ static void dwl_ipc_output_set_layout(struct wl_client *client, static void dwl_ipc_output_set_tags(struct wl_client *client, struct wl_resource *resource, uint32_t tagmask, uint32_t toggle_tagset); +static void dwl_ipc_output_quit(struct wl_client *client, + struct wl_resource *resource); static void dwl_ipc_output_release(struct wl_client *client, struct wl_resource *resource); static void focusclient(Client *c, int lift); @@ -679,6 +681,7 @@ static struct zdwl_ipc_manager_v2_interface dwl_manager_implementation = { static struct zdwl_ipc_output_v2_interface dwl_output_implementation = { .release = dwl_ipc_output_release, .set_tags = dwl_ipc_output_set_tags, + .quit = dwl_ipc_output_quit, .set_layout = dwl_ipc_output_set_layout, .set_client_tags = dwl_ipc_output_set_client_tags}; @@ -3096,6 +3099,12 @@ dwl_ipc_output_set_tags(struct wl_client *client, struct wl_resource *resource, view_in_mon(&(Arg){.ui = newtags}, true,monitor); } +void +dwl_ipc_output_quit(struct wl_client *client, struct wl_resource *resource) +{ + quit(&(Arg){0}); +} + void dwl_ipc_output_release(struct wl_client *client, struct wl_resource *resource) { diff --git a/protocols/dwl-ipc-unstable-v2.xml b/protocols/dwl-ipc-unstable-v2.xml index 0a6e7e5b..7c2fa275 100644 --- a/protocols/dwl-ipc-unstable-v2.xml +++ b/protocols/dwl-ipc-unstable-v2.xml @@ -178,4 +178,9 @@ I would probably just submit raphi's patchset but I don't think that would be po + + + + +