ipc: update patch

This commit is contained in:
choc 2024-06-08 17:57:14 +08:00
parent 69dc463030
commit f8598a91b4
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
From 5bbb9d70ab0a8322d1556ac0983eb3140b1c5dcd Mon Sep 17 00:00:00 2001
From 8f08405c8b620f00be765d98edc2ee4bd0b71e58 Mon Sep 17 00:00:00 2001
From: choc <notchoc@proton.me>
Date: Mon, 23 Oct 2023 10:35:17 +0800
Subject: [PATCH] implement dwl-ipc-unstable-v2
@ -45,10 +45,10 @@ index a67fdd3..2b45b2c 100644
config.h:
cp config.def.h $@
diff --git a/config.def.h b/config.def.h
index 9009517..3467fed 100644
index a784eb4..d615bf2 100644
--- a/config.def.h
+++ b/config.def.h
@@ -122,6 +122,7 @@ static const Key keys[] = {
@@ -124,6 +124,7 @@ static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
@ -57,7 +57,7 @@ index 9009517..3467fed 100644
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
diff --git a/dwl.c b/dwl.c
index d508d79..5f8af37 100644
index 6f041a0..5e7f342 100644
--- a/dwl.c
+++ b/dwl.c
@@ -64,6 +64,7 @@
@ -81,7 +81,7 @@ index d508d79..5f8af37 100644
typedef struct {
uint32_t mod;
xkb_keysym_t keysym;
@@ -186,6 +193,7 @@ typedef struct {
@@ -187,6 +194,7 @@ typedef struct {
struct Monitor {
struct wl_list link;
@ -89,9 +89,9 @@ index d508d79..5f8af37 100644
struct wlr_output *wlr_output;
struct wlr_scene_output *scene_output;
struct wlr_scene_rect *fullscreen_bg; /* See createmon() for info */
@@ -278,6 +286,17 @@ static void destroypointerconstraint(struct wl_listener *listener, void *data);
static void destroysessionlock(struct wl_listener *listener, void *data);
@@ -281,6 +289,17 @@ static void destroysessionlock(struct wl_listener *listener, void *data);
static void destroysessionmgr(struct wl_listener *listener, void *data);
static void destroykeyboardgroup(struct wl_listener *listener, void *data);
static Monitor *dirtomon(enum wlr_direction dir);
+static void dwl_ipc_manager_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id);
+static void dwl_ipc_manager_destroy(struct wl_resource *resource);
@ -107,7 +107,7 @@ index d508d79..5f8af37 100644
static void focusclient(Client *c, int lift);
static void focusmon(const Arg *arg);
static void focusstack(const Arg *arg);
@@ -330,6 +349,7 @@ static void startdrag(struct wl_listener *listener, void *data);
@@ -333,6 +352,7 @@ static void startdrag(struct wl_listener *listener, void *data);
static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
static void tile(Monitor *m);
@ -115,7 +115,7 @@ index d508d79..5f8af37 100644
static void togglefloating(const Arg *arg);
static void togglefullscreen(const Arg *arg);
static void toggletag(const Arg *arg);
@@ -405,6 +425,9 @@ static struct wlr_box sgeom;
@@ -407,6 +427,9 @@ static struct wlr_box sgeom;
static struct wl_list mons;
static Monitor *selmon;
@ -125,7 +125,7 @@ index d508d79..5f8af37 100644
#ifdef XWAYLAND
static void activatex11(struct wl_listener *listener, void *data);
static void associatex11(struct wl_listener *listener, void *data);
@@ -684,6 +707,10 @@ cleanupmon(struct wl_listener *listener, void *data)
@@ -698,6 +721,10 @@ cleanupmon(struct wl_listener *listener, void *data)
LayerSurface *l, *tmp;
size_t i;
@ -136,7 +136,7 @@ index d508d79..5f8af37 100644
/* m->layers[i] are intentionally not unlinked */
for (i = 0; i < LENGTH(m->layers); i++) {
wl_list_for_each_safe(l, tmp, &m->layers[i], link)
@@ -876,6 +903,8 @@ createmon(struct wl_listener *listener, void *data)
@@ -927,6 +954,8 @@ createmon(struct wl_listener *listener, void *data)
m = wlr_output->data = ecalloc(1, sizeof(*m));
m->wlr_output = wlr_output;
@ -145,7 +145,7 @@ index d508d79..5f8af37 100644
for (i = 0; i < LENGTH(m->layers); i++)
wl_list_init(&m->layers[i]);
@@ -1233,6 +1262,190 @@ dirtomon(enum wlr_direction dir)
@@ -1296,6 +1325,190 @@ dirtomon(enum wlr_direction dir)
return selmon;
}
@ -336,7 +336,7 @@ index d508d79..5f8af37 100644
void
focusclient(Client *c, int lift)
{
@@ -1905,41 +2118,9 @@ void
@@ -1971,41 +2184,9 @@ void
printstatus(void)
{
Monitor *m = NULL;
@ -380,7 +380,7 @@ index d508d79..5f8af37 100644
}
void
@@ -2502,6 +2683,7 @@ setup(void)
@@ -2522,6 +2703,7 @@ setup(void)
LISTEN_STATIC(&output_mgr->events.test, outputmgrtest);
wlr_scene_set_presentation(scene, wlr_presentation_create(dpy, backend));
@ -388,7 +388,7 @@ index d508d79..5f8af37 100644
/* Make sure XWayland clients don't connect to the parent X server,
* e.g when running in the x11 backend or the wayland backend and the
@@ -2600,6 +2782,13 @@ tile(Monitor *m)
@@ -2620,6 +2802,13 @@ tile(Monitor *m)
}
}
@ -590,5 +590,5 @@ index 0000000..0a6e7e5
+ </interface>
+</protocol>
--
2.44.0
2.43.0