mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-07 19:54:50 +00:00
ipc: 2024-07-15
This commit is contained in:
parent
5252fe728e
commit
413f6251ad
@ -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-30](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/ipc/ipc.patch)
|
||||
- [2024-07-15](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/ipc/ipc.patch)
|
||||
- [2024-06-30](https://codeberg.org/dwl/dwl-patches/raw/commit/9a751e5020133d3ab9219e68a43109c6f3c931a7/patches/ipc/ipc.patch)
|
||||
- [2024-06-21](https://codeberg.org/dwl/dwl-patches/raw/commit/f96ee44cbaef06bd38b8fa29ac7ecba8b1b5abd5/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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From dc4dc1965732d0995cd8c202c3daa7ab087399a2 Mon Sep 17 00:00:00 2001
|
||||
From 74015b683466c5f1eace0a336f9418eaefdf0133 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
|
||||
@ -7,17 +7,17 @@ Subject: [PATCH] implement dwl-ipc-unstable-v2
|
||||
---
|
||||
Makefile | 14 +-
|
||||
config.def.h | 1 +
|
||||
dwl.c | 257 ++++++++++++++++++++++++++----
|
||||
dwl.c | 259 ++++++++++++++++++++++++++----
|
||||
protocols/dwl-ipc-unstable-v2.xml | 181 +++++++++++++++++++++
|
||||
4 files changed, 416 insertions(+), 37 deletions(-)
|
||||
4 files changed, 417 insertions(+), 38 deletions(-)
|
||||
create mode 100644 protocols/dwl-ipc-unstable-v2.xml
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 9308656..941d4ad 100644
|
||||
index f955e7b..10f3c98 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -17,12 +17,14 @@ DWLCFLAGS = `$(PKG_CONFIG) --cflags $(PKGS)` $(DWLCPPFLAGS) $(DWLDEVCFLAGS) $(CF
|
||||
LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS)
|
||||
LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` -lm $(LIBS)
|
||||
|
||||
all: dwl
|
||||
-dwl: dwl.o util.o
|
||||
@ -60,10 +60,10 @@ index 22d2171..1593033 100644
|
||||
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
|
||||
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9fb50a7..dfd7298 100644
|
||||
index 5bf995e..fbdf13a 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -65,6 +65,7 @@
|
||||
@@ -67,6 +67,7 @@
|
||||
#include <xcb/xcb_icccm.h>
|
||||
#endif
|
||||
|
||||
@ -84,7 +84,7 @@ index 9fb50a7..dfd7298 100644
|
||||
typedef struct {
|
||||
uint32_t mod;
|
||||
xkb_keysym_t keysym;
|
||||
@@ -189,6 +196,7 @@ typedef struct {
|
||||
@@ -188,6 +195,7 @@ typedef struct {
|
||||
|
||||
struct Monitor {
|
||||
struct wl_list link;
|
||||
@ -92,7 +92,7 @@ index 9fb50a7..dfd7298 100644
|
||||
struct wlr_output *wlr_output;
|
||||
struct wlr_scene_output *scene_output;
|
||||
struct wlr_scene_rect *fullscreen_bg; /* See createmon() for info */
|
||||
@@ -284,6 +292,17 @@ static void destroysessionlock(struct wl_listener *listener, void *data);
|
||||
@@ -285,6 +293,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);
|
||||
@ -110,7 +110,7 @@ index 9fb50a7..dfd7298 100644
|
||||
static void focusclient(Client *c, int lift);
|
||||
static void focusmon(const Arg *arg);
|
||||
static void focusstack(const Arg *arg);
|
||||
@@ -337,6 +356,7 @@ static void startdrag(struct wl_listener *listener, void *data);
|
||||
@@ -338,6 +357,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);
|
||||
@ -118,7 +118,7 @@ index 9fb50a7..dfd7298 100644
|
||||
static void togglefloating(const Arg *arg);
|
||||
static void togglefullscreen(const Arg *arg);
|
||||
static void toggletag(const Arg *arg);
|
||||
@@ -411,6 +431,9 @@ static struct wlr_box sgeom;
|
||||
@@ -413,6 +433,9 @@ static struct wlr_box sgeom;
|
||||
static struct wl_list mons;
|
||||
static Monitor *selmon;
|
||||
|
||||
@ -128,7 +128,7 @@ index 9fb50a7..dfd7298 100644
|
||||
#ifdef XWAYLAND
|
||||
static void activatex11(struct wl_listener *listener, void *data);
|
||||
static void associatex11(struct wl_listener *listener, void *data);
|
||||
@@ -700,6 +723,10 @@ cleanupmon(struct wl_listener *listener, void *data)
|
||||
@@ -706,6 +729,10 @@ cleanupmon(struct wl_listener *listener, void *data)
|
||||
LayerSurface *l, *tmp;
|
||||
size_t i;
|
||||
|
||||
@ -139,7 +139,7 @@ index 9fb50a7..dfd7298 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)
|
||||
@@ -934,6 +961,8 @@ createmon(struct wl_listener *listener, void *data)
|
||||
@@ -985,6 +1012,8 @@ createmon(struct wl_listener *listener, void *data)
|
||||
m = wlr_output->data = ecalloc(1, sizeof(*m));
|
||||
m->wlr_output = wlr_output;
|
||||
|
||||
@ -148,7 +148,7 @@ index 9fb50a7..dfd7298 100644
|
||||
for (i = 0; i < LENGTH(m->layers); i++)
|
||||
wl_list_init(&m->layers[i]);
|
||||
|
||||
@@ -1303,6 +1332,190 @@ dirtomon(enum wlr_direction dir)
|
||||
@@ -1335,6 +1364,190 @@ dirtomon(enum wlr_direction dir)
|
||||
return selmon;
|
||||
}
|
||||
|
||||
@ -339,14 +339,14 @@ index 9fb50a7..dfd7298 100644
|
||||
void
|
||||
focusclient(Client *c, int lift)
|
||||
{
|
||||
@@ -1984,41 +2197,9 @@ void
|
||||
@@ -2035,41 +2248,9 @@ void
|
||||
printstatus(void)
|
||||
{
|
||||
Monitor *m = NULL;
|
||||
- Client *c;
|
||||
- uint32_t occ, urg, sel;
|
||||
- const char *appid, *title;
|
||||
|
||||
-
|
||||
- wl_list_for_each(m, &mons, link) {
|
||||
- occ = urg = 0;
|
||||
- wl_list_for_each(c, &clients, link) {
|
||||
@ -371,7 +371,7 @@ index 9fb50a7..dfd7298 100644
|
||||
- printf("%s floating \n", m->wlr_output->name);
|
||||
- sel = 0;
|
||||
- }
|
||||
-
|
||||
|
||||
- printf("%s selmon %u\n", m->wlr_output->name, m == selmon);
|
||||
- printf("%s tags %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32"\n",
|
||||
- m->wlr_output->name, occ, m->tagset[m->seltags], sel, urg);
|
||||
@ -383,15 +383,21 @@ index 9fb50a7..dfd7298 100644
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2562,6 +2743,7 @@ setup(void)
|
||||
@@ -2624,11 +2805,12 @@ setup(void)
|
||||
LISTEN_STATIC(&output_mgr->events.apply, outputmgrapply);
|
||||
LISTEN_STATIC(&output_mgr->events.test, outputmgrtest);
|
||||
|
||||
wlr_scene_set_presentation(scene, wlr_presentation_create(dpy, backend));
|
||||
+ wl_global_create(dpy, &zdwl_ipc_manager_v2_interface, 2, NULL, dwl_ipc_manager_bind);
|
||||
|
||||
+
|
||||
/* 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
|
||||
@@ -2660,6 +2842,13 @@ tile(Monitor *m)
|
||||
* compositor has Xwayland support */
|
||||
unsetenv("DISPLAY");
|
||||
-#ifdef XWAYLAND
|
||||
/*
|
||||
* Initialise the XWayland X server.
|
||||
* It will be started when the first X client is started.
|
||||
@@ -2721,6 +2903,13 @@ tile(Monitor *m)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user