diff --git a/patches/ipc/README.md b/patches/ipc/README.md index 9827daf..1d20daf 100644 --- a/patches/ipc/README.md +++ b/patches/ipc/README.md @@ -5,7 +5,8 @@ Status information to stdout is currently disabled as dwl tends to freeze. For n ### Download - [git branch](https://codeberg.org/notchoc/dwl/src/branch/ipc) -- [2024-06-19](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/ipc/ipc.patch) +- [2024-06-21](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/ipc/ipc.patch) +- [2024-06-19](https://codeberg.org/dwl/dwl-patches/raw/commit/e69afc7263b8d982a7923e5d4910f2e1f7140bb8/patches/ipc/ipc.patch) - [2024-06-08](https://codeberg.org/dwl/dwl-patches/raw/commit/f8598a91b44acc3bd7e9041be97265bbce8fa219/patches/ipc/ipc.patch) - [2024-03-13](https://codeberg.org/dwl/dwl-patches/raw/commit/0150cfebbcd85f2d6e6728afad345a11a0c45947/ipc/ipc.patch) - [2024-02-20](https://codeberg.org/dwl/dwl-patches/raw/commit/0c5ae06e4bc1d7f641376e8fcb86b43bd48ce2ee/ipc/ipc.patch) diff --git a/patches/ipc/ipc.patch b/patches/ipc/ipc.patch index 9f3f7d6..491e69a 100644 --- a/patches/ipc/ipc.patch +++ b/patches/ipc/ipc.patch @@ -1,37 +1,35 @@ -From fd3525019b9044c385009a9c0d10ee21ebf0f41f Mon Sep 17 00:00:00 2001 +From 0d70fa63c9a76ee67968c2a6932c05b8fbe33da4 Mon Sep 17 00:00:00 2001 From: choc Date: Mon, 23 Oct 2023 10:35:17 +0800 Subject: [PATCH] implement dwl-ipc-unstable-v2 https://codeberg.org/dwl/dwl-patches/wiki/ipc --- - Makefile | 13 +- + Makefile | 11 +- config.def.h | 1 + dwl.c | 257 ++++++++++++++++++++++++++---- protocols/dwl-ipc-unstable-v2.xml | 181 +++++++++++++++++++++ - 4 files changed, 415 insertions(+), 37 deletions(-) + 4 files changed, 414 insertions(+), 36 deletions(-) create mode 100644 protocols/dwl-ipc-unstable-v2.xml diff --git a/Makefile b/Makefile -index e3e6426..15caf43 100644 +index fdc581a..9559655 100644 --- a/Makefile +++ b/Makefile -@@ -14,10 +14,11 @@ DWLCFLAGS = `$(PKG_CONFIG) --cflags $(PKGS)` $(DWLCPPFLAGS) $(DWLDEVCFLAGS) $(CF - LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS) +@@ -15,9 +15,10 @@ LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS) all: dwl --dwl: dwl.o util.o + dwl: dwl.o util.o - $(CC) dwl.o util.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ --dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h -+dwl: dwl.o util.o dwl-ipc-unstable-v2-protocol.o +-dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h + $(CC) dwl.o util.o dwl-ipc-unstable-v2-protocol.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ -+dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h xdg-shell-protocol.h dwl-ipc-unstable-v2-protocol.h ++dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h dwl-ipc-unstable-v2-protocol.h util.o: util.c util.h +dwl-ipc-unstable-v2-protocol.o: dwl-ipc-unstable-v2-protocol.c dwl-ipc-unstable-v2-protocol.h # wayland-scanner is a tool which generates C headers and rigging for Wayland # protocols, which are specified in XML. wlroots requires you to rig these up -@@ -37,6 +38,12 @@ wlr-layer-shell-unstable-v1-protocol.h: +@@ -40,6 +41,12 @@ wlr-output-power-management-unstable-v1-protocol.h: xdg-shell-protocol.h: $(WAYLAND_SCANNER) server-header \ $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ @@ -57,10 +55,10 @@ index a784eb4..d615bf2 100644 { MODKEY, XKB_KEY_k, focusstack, {.i = -1} }, { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} }, diff --git a/dwl.c b/dwl.c -index 5a31aee..e9c2075 100644 +index 2cdc819..f3a0907 100644 --- a/dwl.c +++ b/dwl.c -@@ -64,6 +64,7 @@ +@@ -65,6 +65,7 @@ #include #endif @@ -68,7 +66,7 @@ index 5a31aee..e9c2075 100644 #include "util.h" /* macros */ -@@ -141,6 +142,12 @@ typedef struct { +@@ -142,6 +143,12 @@ typedef struct { uint32_t resize; /* configure serial of a pending resize */ } Client; @@ -81,7 +79,7 @@ index 5a31aee..e9c2075 100644 typedef struct { uint32_t mod; xkb_keysym_t keysym; -@@ -187,6 +194,7 @@ typedef struct { +@@ -188,6 +195,7 @@ typedef struct { struct Monitor { struct wl_list link; @@ -89,7 +87,7 @@ index 5a31aee..e9c2075 100644 struct wlr_output *wlr_output; struct wlr_scene_output *scene_output; struct wlr_scene_rect *fullscreen_bg; /* See createmon() for info */ -@@ -281,6 +289,17 @@ static void destroysessionlock(struct wl_listener *listener, void *data); +@@ -283,6 +291,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); @@ -107,7 +105,7 @@ index 5a31aee..e9c2075 100644 static void focusclient(Client *c, int lift); static void focusmon(const Arg *arg); static void focusstack(const Arg *arg); -@@ -333,6 +352,7 @@ static void startdrag(struct wl_listener *listener, void *data); +@@ -336,6 +355,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 +113,7 @@ index 5a31aee..e9c2075 100644 static void togglefloating(const Arg *arg); static void togglefullscreen(const Arg *arg); static void toggletag(const Arg *arg); -@@ -406,6 +426,9 @@ static struct wlr_box sgeom; +@@ -410,6 +430,9 @@ static struct wlr_box sgeom; static struct wl_list mons; static Monitor *selmon; @@ -125,7 +123,7 @@ index 5a31aee..e9c2075 100644 #ifdef XWAYLAND static void activatex11(struct wl_listener *listener, void *data); static void associatex11(struct wl_listener *listener, void *data); -@@ -695,6 +718,10 @@ cleanupmon(struct wl_listener *listener, void *data) +@@ -699,6 +722,10 @@ cleanupmon(struct wl_listener *listener, void *data) LayerSurface *l, *tmp; size_t i; @@ -136,7 +134,7 @@ index 5a31aee..e9c2075 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) -@@ -924,6 +951,8 @@ createmon(struct wl_listener *listener, void *data) +@@ -931,6 +958,8 @@ createmon(struct wl_listener *listener, void *data) m = wlr_output->data = ecalloc(1, sizeof(*m)); m->wlr_output = wlr_output; @@ -145,7 +143,7 @@ index 5a31aee..e9c2075 100644 for (i = 0; i < LENGTH(m->layers); i++) wl_list_init(&m->layers[i]); -@@ -1293,6 +1322,190 @@ dirtomon(enum wlr_direction dir) +@@ -1300,6 +1329,190 @@ dirtomon(enum wlr_direction dir) return selmon; } @@ -336,7 +334,7 @@ index 5a31aee..e9c2075 100644 void focusclient(Client *c, int lift) { -@@ -1969,41 +2182,9 @@ void +@@ -1982,41 +2195,9 @@ void printstatus(void) { Monitor *m = NULL; @@ -380,7 +378,7 @@ index 5a31aee..e9c2075 100644 } void -@@ -2520,6 +2701,7 @@ setup(void) +@@ -2558,6 +2739,7 @@ setup(void) LISTEN_STATIC(&output_mgr->events.test, outputmgrtest); wlr_scene_set_presentation(scene, wlr_presentation_create(dpy, backend)); @@ -388,7 +386,7 @@ index 5a31aee..e9c2075 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 -@@ -2618,6 +2800,13 @@ tile(Monitor *m) +@@ -2656,6 +2838,13 @@ tile(Monitor *m) } }