mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-12-17 18:33:24 +00:00
Compare commits
3 Commits
9506523f32
...
44c02627f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44c02627f2 | ||
|
|
dee84e3ac2 | ||
|
|
4ff00b9021 |
@ -1,9 +0,0 @@
|
|||||||
### Description
|
|
||||||
Deck is a dwl-layout which is inspired by the dwm Deck layout (which is inspired by TTWM window manager). It applies the monocle-layout to the clients in the stack. The master-client is still visible. The stacked clients are like a deck of cards, hence the name.
|
|
||||||
|
|
||||||
### Download
|
|
||||||
- [git branch](https://codeberg.org/Kana/dwl/src/branch/decklayout)
|
|
||||||
- [main 2025-10-08](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/decklayout/decklayout.patch)
|
|
||||||
|
|
||||||
### Authors
|
|
||||||
- [André Desgualdo Pereira](https://codeberg.org/Kana)
|
|
||||||
@ -1,112 +0,0 @@
|
|||||||
From 095439425e64f2567f141d5d941178b148ef0d3a Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Andr=C3=A9=20Desgualdo=20Pereira?= <desgua@gmail.com>
|
|
||||||
Date: Sun, 12 Oct 2025 11:44:26 -0300
|
|
||||||
Subject: [PATCH] decklayout
|
|
||||||
|
|
||||||
---
|
|
||||||
config.def.h | 2 ++
|
|
||||||
dwl.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 63 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/config.def.h b/config.def.h
|
|
||||||
index 95c2afa..cc846eb 100644
|
|
||||||
--- a/config.def.h
|
|
||||||
+++ b/config.def.h
|
|
||||||
@@ -34,6 +34,7 @@ static const Layout layouts[] = {
|
|
||||||
{ "[]=", tile },
|
|
||||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
|
||||||
{ "[M]", monocle },
|
|
||||||
+ { "[E]", deck },
|
|
||||||
};
|
|
||||||
|
|
||||||
/* monitors */
|
|
||||||
@@ -139,6 +140,7 @@ static const Key keys[] = {
|
|
||||||
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
|
||||||
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
|
||||||
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
|
|
||||||
+ { MODKEY, XKB_KEY_a, setlayout, {.v = &layouts[3]} },
|
|
||||||
{ MODKEY, XKB_KEY_space, setlayout, {0} },
|
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
|
|
||||||
{ MODKEY, XKB_KEY_e, togglefullscreen, {0} },
|
|
||||||
diff --git a/dwl.c b/dwl.c
|
|
||||||
index 12f441e..227004f 100644
|
|
||||||
--- a/dwl.c
|
|
||||||
+++ b/dwl.c
|
|
||||||
@@ -278,6 +278,7 @@ static void destroylayersurfacenotify(struct wl_listener *listener, void *data);
|
|
||||||
static void destroylock(SessionLock *lock, int unlocked);
|
|
||||||
static void destroylocksurface(struct wl_listener *listener, void *data);
|
|
||||||
static void destroynotify(struct wl_listener *listener, void *data);
|
|
||||||
+static void deck(Monitor *m);
|
|
||||||
static void destroypointerconstraint(struct wl_listener *listener, void *data);
|
|
||||||
static void destroysessionlock(struct wl_listener *listener, void *data);
|
|
||||||
static void destroykeyboardgroup(struct wl_listener *listener, void *data);
|
|
||||||
@@ -1837,6 +1838,66 @@ monocle(Monitor *m)
|
|
||||||
wlr_scene_node_raise_to_top(&c->scene->node);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void
|
|
||||||
+deck(Monitor *m)
|
|
||||||
+{
|
|
||||||
+ unsigned int mw, my;
|
|
||||||
+ int i, n = 0;
|
|
||||||
+ Client *c;
|
|
||||||
+
|
|
||||||
+ /* count tiled clients */
|
|
||||||
+ wl_list_for_each(c, &clients, link)
|
|
||||||
+
|
|
||||||
+ /* if (VISIBLEON(c, m) && !c->isfloating && !c->isfullscreen) */
|
|
||||||
+ if (VISIBLEON(c, m) && !c->isfloating)
|
|
||||||
+ n++;
|
|
||||||
+ if (n == 0)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ /* set master width */
|
|
||||||
+ if (n > m->nmaster)
|
|
||||||
+ mw = m->nmaster ? (int)roundf(m->w.width * m->mfact) : 0;
|
|
||||||
+ else
|
|
||||||
+ mw = m->w.width;
|
|
||||||
+
|
|
||||||
+ /* update layout symbol with number of stack windows */
|
|
||||||
+ /* use the following rules to count only the windows on the deck
|
|
||||||
+ if (n > m->nmaster)
|
|
||||||
+ snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n - m->nmaster);
|
|
||||||
+ else
|
|
||||||
+ snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); */
|
|
||||||
+
|
|
||||||
+ /* or this one to count all windows on the tag */
|
|
||||||
+ snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
|
|
||||||
+
|
|
||||||
+ i = my = 0;
|
|
||||||
+ wl_list_for_each(c, &clients, link) {
|
|
||||||
+ /* if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen) */
|
|
||||||
+ if (!VISIBLEON(c, m) || c->isfloating)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ if (i < m->nmaster) {
|
|
||||||
+ /* master clients */
|
|
||||||
+ resize(c, (struct wlr_box){
|
|
||||||
+ .x = m->w.x,
|
|
||||||
+ .y = m->w.y + my,
|
|
||||||
+ .width = mw,
|
|
||||||
+ .height = (m->w.height - my) / (MIN(n, m->nmaster) - i)
|
|
||||||
+ }, 0);
|
|
||||||
+ my += c->geom.height;
|
|
||||||
+ } else {
|
|
||||||
+ /* deck clients: overlap in stack area */
|
|
||||||
+ resize(c, (struct wlr_box){
|
|
||||||
+ .x = m->w.x + mw,
|
|
||||||
+ .y = m->w.y,
|
|
||||||
+ .width = m->w.width - mw,
|
|
||||||
+ .height = m->w.height
|
|
||||||
+ }, 0);
|
|
||||||
+ }
|
|
||||||
+ i++;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void
|
|
||||||
motionabsolute(struct wl_listener *listener, void *data)
|
|
||||||
{
|
|
||||||
--
|
|
||||||
2.51.0
|
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
### Description
|
### Description
|
||||||
|
|
||||||
By default, dwl responds to client requests to client messages by setting the urgency bit on the named window.
|
By default, dwl response to client requests to client messages by setting the urgency bit on the named window.
|
||||||
This patch changes the focus to the window instead.
|
This patch changes the focus to the window instead.
|
||||||
Both behaviours are legitimate according to the cursed spec.
|
Both behaviours are legitimate according to the cursed spec.
|
||||||
This is the approximately the equivalent of the focusonactive patch of dwm.
|
This is the approximately the equivalent of the focusonactive patch of dwm.
|
||||||
@ -9,6 +9,5 @@ If you want a more controlled behavior, for example setting which clients can fo
|
|||||||
### Download
|
### Download
|
||||||
- [git branch](https://codeberg.org/Kana/dwl/src/branch/focusonurgent)
|
- [git branch](https://codeberg.org/Kana/dwl/src/branch/focusonurgent)
|
||||||
- [main 2025-10-08](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/focusonurgent/focusonurgent.patch)
|
- [main 2025-10-08](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/focusonurgent/focusonurgent.patch)
|
||||||
|
|
||||||
### Authors
|
### Authors
|
||||||
- [André Desgualdo Pereira](https://codeberg.org/Kana)
|
- [André Desgualdo Pereira](https://codeberg.org/Kana)
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
From 3613d9a6342fc85279a79ba203f25ff39fc0d8e4 Mon Sep 17 00:00:00 2001
|
From ed25e131a5994812075f29c0b16e2780a068407a Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Andr=C3=A9=20Desgualdo=20Pereira?= <desgua@gmail.com>
|
From: =?UTF-8?q?Andr=C3=A9=20Desgualdo=20Pereira?= <desgua@gmail.com>
|
||||||
Date: Wed, 29 Oct 2025 09:06:00 -0300
|
Date: Mon, 13 Oct 2025 07:49:15 -0300
|
||||||
Subject: [PATCH] add focusonurgent patch
|
Subject: [PATCH] focusonurgent
|
||||||
|
|
||||||
---
|
---
|
||||||
dwl.c | 6 ++++--
|
dwl.c | 6 ++++--
|
||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index 12f441e..5620f66 100644
|
index 12f441e..633c1eb 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -2097,8 +2097,10 @@ printstatus(void)
|
@@ -2097,8 +2097,10 @@ printstatus(void)
|
||||||
|
|||||||
@ -1,20 +1,17 @@
|
|||||||
From 672df57ab7d5b52f91a712eaf3954d580cdf8ba3 Mon Sep 17 00:00:00 2001
|
From 735440660fd2bccdde982f9c3d758e189ba35e40 Mon Sep 17 00:00:00 2001
|
||||||
From: Zuki Air <zukirust@gmail.com>
|
From: Zuki Air <zukirust@gmail.com>
|
||||||
Date: Thu, 7 Aug 2025 13:19:59 +0100
|
Date: Thu, 7 Aug 2025 13:19:59 +0100
|
||||||
Subject: [PATCH] riverctl patch
|
Subject: [PATCH] riverctl patch
|
||||||
|
|
||||||
make setborderpx apply instantly
|
|
||||||
|
|
||||||
add setting border colors via dwlctl
|
|
||||||
---
|
---
|
||||||
.gitignore | 1 +
|
.gitignore | 1 +
|
||||||
Makefile | 22 +-
|
Makefile | 22 +-
|
||||||
config.def.h | 42 +-
|
config.def.h | 36 +-
|
||||||
dwl.c | 47 +-
|
dwl.c | 47 +-
|
||||||
dwlctl.c | 133 ++++
|
dwlctl.c | 133 +++++
|
||||||
protocols/river-control-unstable-v1.xml | 85 +++
|
protocols/river-control-unstable-v1.xml | 85 +++
|
||||||
river-control.h | 789 ++++++++++++++++++++++++
|
river-control.h | 753 ++++++++++++++++++++++++
|
||||||
7 files changed, 1094 insertions(+), 25 deletions(-)
|
7 files changed, 1055 insertions(+), 22 deletions(-)
|
||||||
create mode 100644 dwlctl.c
|
create mode 100644 dwlctl.c
|
||||||
create mode 100644 protocols/river-control-unstable-v1.xml
|
create mode 100644 protocols/river-control-unstable-v1.xml
|
||||||
create mode 100644 river-control.h
|
create mode 100644 river-control.h
|
||||||
@ -78,25 +75,18 @@ index 578194f..029dfad 100644
|
|||||||
dist: clean
|
dist: clean
|
||||||
mkdir -p dwl-$(VERSION)
|
mkdir -p dwl-$(VERSION)
|
||||||
diff --git a/config.def.h b/config.def.h
|
diff --git a/config.def.h b/config.def.h
|
||||||
index 95c2afa..ccc3edb 100644
|
index 95c2afa..72afbd6 100644
|
||||||
--- a/config.def.h
|
--- a/config.def.h
|
||||||
+++ b/config.def.h
|
+++ b/config.def.h
|
||||||
@@ -6,11 +6,11 @@
|
@@ -6,7 +6,7 @@
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static const int sloppyfocus = 1; /* focus follows mouse */
|
static const int sloppyfocus = 1; /* focus follows mouse */
|
||||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||||
-static const unsigned int borderpx = 1; /* border pixel of windows */
|
-static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
+static unsigned int borderpx = 1; /* border pixel of windows */
|
+static unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
static const float rootcolor[] = COLOR(0x222222ff);
|
static const float rootcolor[] = COLOR(0x222222ff);
|
||||||
-static const float bordercolor[] = COLOR(0x444444ff);
|
static const float bordercolor[] = COLOR(0x444444ff);
|
||||||
-static const float focuscolor[] = COLOR(0x005577ff);
|
static const float focuscolor[] = COLOR(0x005577ff);
|
||||||
-static const float urgentcolor[] = COLOR(0xff0000ff);
|
|
||||||
+static float bordercolor[] = COLOR(0x444444ff);
|
|
||||||
+static float focuscolor[] = COLOR(0x005577ff);
|
|
||||||
+static float urgentcolor[] = COLOR(0xff0000ff);
|
|
||||||
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
|
|
||||||
static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You can also use glsl colors */
|
|
||||||
|
|
||||||
@@ -21,7 +21,14 @@ static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You ca
|
@@ -21,7 +21,14 @@ static const float fullscreen_bg[] = {0.0f, 0.0f, 0.0f, 1.0f}; /* You ca
|
||||||
static int log_level = WLR_ERROR;
|
static int log_level = WLR_ERROR;
|
||||||
|
|
||||||
@ -490,10 +480,10 @@ index 0000000..aa5fc4d
|
|||||||
+</protocol>
|
+</protocol>
|
||||||
diff --git a/river-control.h b/river-control.h
|
diff --git a/river-control.h b/river-control.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..599cffe
|
index 0000000..59561b6
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/river-control.h
|
+++ b/river-control.h
|
||||||
@@ -0,0 +1,789 @@
|
@@ -0,0 +1,753 @@
|
||||||
+#include "river-control-unstable-v1-private-protocol.c"
|
+#include "river-control-unstable-v1-private-protocol.c"
|
||||||
+#include "river-control-unstable-v1-protocol.h"
|
+#include "river-control-unstable-v1-protocol.h"
|
||||||
+#ifdef KEYS_USED
|
+#ifdef KEYS_USED
|
||||||
@ -505,9 +495,6 @@ index 0000000..599cffe
|
|||||||
+void clear_rules(const Arg*);
|
+void clear_rules(const Arg*);
|
||||||
+void clear_binds(const Arg*);
|
+void clear_binds(const Arg*);
|
||||||
+void setborderpx(const Arg*);
|
+void setborderpx(const Arg*);
|
||||||
+void setfocuscolor(const Arg*);
|
|
||||||
+void setbordercolor(const Arg*);
|
|
||||||
+void seturgentcolor(const Arg*);
|
|
||||||
+struct wl_list arg_str_store;
|
+struct wl_list arg_str_store;
|
||||||
+struct wl_list rule_str_store;
|
+struct wl_list rule_str_store;
|
||||||
+struct wl_list rules_list;
|
+struct wl_list rules_list;
|
||||||
@ -547,7 +534,6 @@ index 0000000..599cffe
|
|||||||
+ FUNC_STR_ARG_TYPE_INT,
|
+ FUNC_STR_ARG_TYPE_INT,
|
||||||
+ FUNC_STR_ARG_TYPE_UINT,
|
+ FUNC_STR_ARG_TYPE_UINT,
|
||||||
+ FUNC_STR_ARG_TYPE_FLOAT,
|
+ FUNC_STR_ARG_TYPE_FLOAT,
|
||||||
+ FUNC_STR_ARG_TYPE_COLOR,
|
|
||||||
+ FUNC_STR_ARG_TYPE_STRING_ARRAY,
|
+ FUNC_STR_ARG_TYPE_STRING_ARRAY,
|
||||||
+ FUNC_STR_ARG_TYPE_WLR_DIRECTION,
|
+ FUNC_STR_ARG_TYPE_WLR_DIRECTION,
|
||||||
+ FUNC_STR_ARG_TYPE_LAYOUT,
|
+ FUNC_STR_ARG_TYPE_LAYOUT,
|
||||||
@ -566,9 +552,6 @@ index 0000000..599cffe
|
|||||||
+ { enter_mode, FUNC_STR_ARG_TYPE_STRING_ARRAY, "enter-mode"},
|
+ { enter_mode, FUNC_STR_ARG_TYPE_STRING_ARRAY, "enter-mode"},
|
||||||
+ { oneshot_mode, FUNC_STR_ARG_TYPE_STRING_ARRAY, "oneshot-mode"},
|
+ { oneshot_mode, FUNC_STR_ARG_TYPE_STRING_ARRAY, "oneshot-mode"},
|
||||||
+ { create_mode_user, FUNC_STR_ARG_TYPE_STRING_ARRAY, "create-mode"},
|
+ { create_mode_user, FUNC_STR_ARG_TYPE_STRING_ARRAY, "create-mode"},
|
||||||
+ STR(setfocuscolor,FUNC_STR_ARG_TYPE_COLOR),
|
|
||||||
+ STR(setbordercolor,FUNC_STR_ARG_TYPE_COLOR),
|
|
||||||
+ STR(seturgentcolor,FUNC_STR_ARG_TYPE_COLOR),
|
|
||||||
+ STR(setborderpx,FUNC_STR_ARG_TYPE_UINT),
|
+ STR(setborderpx,FUNC_STR_ARG_TYPE_UINT),
|
||||||
+ STR(setlayout,FUNC_STR_ARG_TYPE_LAYOUT),
|
+ STR(setlayout,FUNC_STR_ARG_TYPE_LAYOUT),
|
||||||
+ STR(spawn,FUNC_STR_ARG_TYPE_STRING_ARRAY),
|
+ STR(spawn,FUNC_STR_ARG_TYPE_STRING_ARRAY),
|
||||||
@ -658,36 +641,10 @@ index 0000000..599cffe
|
|||||||
+
|
+
|
||||||
+void setborderpx(const Arg *arg) {
|
+void setborderpx(const Arg *arg) {
|
||||||
+ Client *c;
|
+ Client *c;
|
||||||
+ Monitor *m;
|
|
||||||
+ borderpx = arg->ui;
|
+ borderpx = arg->ui;
|
||||||
+ wl_list_for_each(c, &clients, link) {
|
+ wl_list_for_each(c, &clients, link) {
|
||||||
+ c->bw = borderpx;
|
+ c->bw = borderpx;
|
||||||
+ }
|
+ }
|
||||||
+ wl_list_for_each(m, &mons,link) {
|
|
||||||
+ arrange(m);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void setfocuscolor(const Arg *arg) {
|
|
||||||
+ const float color[4] = COLOR(arg->i);
|
|
||||||
+ int i;
|
|
||||||
+ for (i = 0; i < 4; i++) {
|
|
||||||
+ focuscolor[i] = color[i];
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+void setbordercolor(const Arg *arg) {
|
|
||||||
+ const float color[4] = COLOR(arg->i);
|
|
||||||
+ int i;
|
|
||||||
+ for (i = 0; i < 4; i++) {
|
|
||||||
+ bordercolor[i] = color[i];
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+void seturgentcolor(const Arg *arg) {
|
|
||||||
+ const float color[4] = COLOR(arg->i);
|
|
||||||
+ int i;
|
|
||||||
+ for (i = 0; i < 4; i++) {
|
|
||||||
+ urgentcolor[i] = color[i];
|
|
||||||
+ }
|
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+void zriver_control_destroy(struct wl_client *client,
|
+void zriver_control_destroy(struct wl_client *client,
|
||||||
@ -1141,10 +1098,7 @@ index 0000000..599cffe
|
|||||||
+ args->error = true;
|
+ args->error = true;
|
||||||
+ args->error_msg = zriver_error_out_of_range;
|
+ args->error_msg = zriver_error_out_of_range;
|
||||||
+ }
|
+ }
|
||||||
+ break;
|
+
|
||||||
+ case(FUNC_STR_ARG_TYPE_COLOR):
|
|
||||||
+ arg->i = strtol(argument,NULL,16);
|
|
||||||
+ break;
|
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ args->argc++;
|
+ args->argc++;
|
||||||
@ -1284,5 +1238,5 @@ index 0000000..599cffe
|
|||||||
+ zriver_arg_list_resource, zriver_control_handle_destory);
|
+ zriver_arg_list_resource, zriver_control_handle_destory);
|
||||||
+}
|
+}
|
||||||
--
|
--
|
||||||
2.51.0
|
2.49.1
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,16 @@
|
|||||||
From 9221dab35862605bd8768652488f8d6211f15a3e Mon Sep 17 00:00:00 2001
|
From e504dc0fccfc3994962f03dc824d8907c6afc64f Mon Sep 17 00:00:00 2001
|
||||||
From: Fernando Otto <fernandootto369@gmail.com>
|
From: choc <notchoc@proton.me>
|
||||||
Date: Tue, 14 Oct 2025 12:52:30 -0300
|
Date: Sat, 4 May 2024 01:16:12 +0800
|
||||||
Subject: [PATCH] Fixing disconnect with the graphics tablet
|
Subject: [PATCH] implement wlr-tablet-v2
|
||||||
|
|
||||||
---
|
---
|
||||||
Makefile | 6 +-
|
Makefile | 6 +-
|
||||||
config.def.h | 1 +
|
config.def.h | 1 +
|
||||||
dwl.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
dwl.c | 224 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
3 files changed, 232 insertions(+), 1 deletion(-)
|
3 files changed, 230 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index 3358bae..47a2bb2 100644
|
index f955e7b..ce1b556 100644
|
||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -21,7 +21,8 @@ dwl: dwl.o util.o
|
@@ -21,7 +21,8 @@ dwl: dwl.o util.o
|
||||||
@ -46,7 +46,7 @@ index 22d2171..3ad98ef 100644
|
|||||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index a2711f6..97d3d53 100644
|
index ac9c36b..b8d129f 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -50,6 +50,9 @@
|
@@ -50,6 +50,9 @@
|
||||||
@ -132,15 +132,13 @@ index a2711f6..97d3d53 100644
|
|||||||
void
|
void
|
||||||
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
||||||
{
|
{
|
||||||
@@ -1320,6 +1361,29 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
@@ -1321,6 +1362,27 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
||||||
free(group);
|
free(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
+void
|
+void
|
||||||
+destroytablet(struct wl_listener *listener, void *data)
|
+destroytablet(struct wl_listener *listener, void *data)
|
||||||
+{
|
+{
|
||||||
+ wl_list_remove(&tablet_device_destroy.link);
|
|
||||||
+ wlr_cursor_detach_input_device(cursor, tablet->wlr_device);
|
|
||||||
+ tablet = NULL;
|
+ tablet = NULL;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
@ -162,7 +160,7 @@ index a2711f6..97d3d53 100644
|
|||||||
Monitor *
|
Monitor *
|
||||||
dirtomon(enum wlr_direction dir)
|
dirtomon(enum wlr_direction dir)
|
||||||
{
|
{
|
||||||
@@ -1539,6 +1603,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
@@ -1540,6 +1602,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||||
case WLR_INPUT_DEVICE_POINTER:
|
case WLR_INPUT_DEVICE_POINTER:
|
||||||
createpointer(wlr_pointer_from_input_device(device));
|
createpointer(wlr_pointer_from_input_device(device));
|
||||||
break;
|
break;
|
||||||
@ -175,7 +173,7 @@ index a2711f6..97d3d53 100644
|
|||||||
default:
|
default:
|
||||||
/* TODO handle other input device types */
|
/* TODO handle other input device types */
|
||||||
break;
|
break;
|
||||||
@@ -2566,6 +2636,8 @@ setup(void)
|
@@ -2567,6 +2635,8 @@ setup(void)
|
||||||
|
|
||||||
relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy);
|
relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy);
|
||||||
|
|
||||||
@ -184,7 +182,7 @@ index a2711f6..97d3d53 100644
|
|||||||
/*
|
/*
|
||||||
* Creates a cursor, which is a wlroots utility for tracking the cursor
|
* Creates a cursor, which is a wlroots utility for tracking the cursor
|
||||||
* image shown on screen.
|
* image shown on screen.
|
||||||
@@ -2595,6 +2667,10 @@ setup(void)
|
@@ -2596,6 +2666,10 @@ setup(void)
|
||||||
LISTEN_STATIC(&cursor->events.button, buttonpress);
|
LISTEN_STATIC(&cursor->events.button, buttonpress);
|
||||||
LISTEN_STATIC(&cursor->events.axis, axisnotify);
|
LISTEN_STATIC(&cursor->events.axis, axisnotify);
|
||||||
LISTEN_STATIC(&cursor->events.frame, cursorframe);
|
LISTEN_STATIC(&cursor->events.frame, cursorframe);
|
||||||
@ -195,7 +193,7 @@ index a2711f6..97d3d53 100644
|
|||||||
|
|
||||||
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
||||||
LISTEN_STATIC(&cursor_shape_mgr->events.request_set_shape, setcursorshape);
|
LISTEN_STATIC(&cursor_shape_mgr->events.request_set_shape, setcursorshape);
|
||||||
@@ -2688,6 +2764,156 @@ tagmon(const Arg *arg)
|
@@ -2689,6 +2763,156 @@ tagmon(const Arg *arg)
|
||||||
setmon(sel, dirtomon(arg->i), 0);
|
setmon(sel, dirtomon(arg->i), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,5 +351,5 @@ index a2711f6..97d3d53 100644
|
|||||||
tile(Monitor *m)
|
tile(Monitor *m)
|
||||||
{
|
{
|
||||||
--
|
--
|
||||||
2.51.0
|
2.43.0
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
From f639289974285207be396eac085cce6a316294c0 Mon Sep 17 00:00:00 2001
|
From dd0abf07f9f3e456428b07e442b87578128da310 Mon Sep 17 00:00:00 2001
|
||||||
From: Fernando Otto <fernandootto369@gmail.com>
|
From: A Frederick Christensen <dwl@ivories.org>
|
||||||
Date: Tue, 14 Oct 2025 12:20:37 -0300
|
Date: Sat, 17 May 2025 23:26:15 -0500
|
||||||
Subject: [PATCH] Fixing disconnect with the graphics tablet
|
Subject: [PATCH] Add tablet input
|
||||||
|
|
||||||
|
Signed-off-by: Aldrik Dunbar <aldrik@gmail.com>
|
||||||
---
|
---
|
||||||
Makefile | 6 +-
|
Makefile | 6 +-
|
||||||
config.def.h | 1 +
|
config.def.h | 1 +
|
||||||
dwl.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
dwl.c | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
3 files changed, 246 insertions(+), 1 deletion(-)
|
3 files changed, 244 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
diff --git a/Makefile b/Makefile
|
||||||
index 578194f..e0d1835 100644
|
index 578194f..e0d1835 100644
|
||||||
@ -46,7 +47,7 @@ index 95c2afa..1f06356 100644
|
|||||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index 12f441e..43566fe 100644
|
index 12f441e..1f3b325 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -51,6 +51,9 @@
|
@@ -51,6 +51,9 @@
|
||||||
@ -145,15 +146,13 @@ index 12f441e..43566fe 100644
|
|||||||
void
|
void
|
||||||
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
||||||
{
|
{
|
||||||
@@ -1383,6 +1430,29 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
@@ -1383,6 +1430,27 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
||||||
free(group);
|
free(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
+void
|
+void
|
||||||
+destroytablet(struct wl_listener *listener, void *data)
|
+destroytablet(struct wl_listener *listener, void *data)
|
||||||
+{
|
+{
|
||||||
+ wl_list_remove(&tablet_device_destroy.link);
|
|
||||||
+ wlr_cursor_detach_input_device(cursor, tablet->wlr_device);
|
|
||||||
+ tablet = NULL;
|
+ tablet = NULL;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
@ -175,7 +174,7 @@ index 12f441e..43566fe 100644
|
|||||||
Monitor *
|
Monitor *
|
||||||
dirtomon(enum wlr_direction dir)
|
dirtomon(enum wlr_direction dir)
|
||||||
{
|
{
|
||||||
@@ -1590,6 +1660,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
@@ -1590,6 +1658,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||||
case WLR_INPUT_DEVICE_POINTER:
|
case WLR_INPUT_DEVICE_POINTER:
|
||||||
createpointer(wlr_pointer_from_input_device(device));
|
createpointer(wlr_pointer_from_input_device(device));
|
||||||
break;
|
break;
|
||||||
@ -188,7 +187,7 @@ index 12f441e..43566fe 100644
|
|||||||
default:
|
default:
|
||||||
/* TODO handle other input device types */
|
/* TODO handle other input device types */
|
||||||
break;
|
break;
|
||||||
@@ -2584,6 +2660,8 @@ setup(void)
|
@@ -2584,6 +2658,8 @@ setup(void)
|
||||||
|
|
||||||
relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy);
|
relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy);
|
||||||
|
|
||||||
@ -197,7 +196,7 @@ index 12f441e..43566fe 100644
|
|||||||
/*
|
/*
|
||||||
* Creates a cursor, which is a wlroots utility for tracking the cursor
|
* Creates a cursor, which is a wlroots utility for tracking the cursor
|
||||||
* image shown on screen.
|
* image shown on screen.
|
||||||
@@ -2613,6 +2691,11 @@ setup(void)
|
@@ -2613,6 +2689,11 @@ setup(void)
|
||||||
wl_signal_add(&cursor->events.button, &cursor_button);
|
wl_signal_add(&cursor->events.button, &cursor_button);
|
||||||
wl_signal_add(&cursor->events.axis, &cursor_axis);
|
wl_signal_add(&cursor->events.axis, &cursor_axis);
|
||||||
wl_signal_add(&cursor->events.frame, &cursor_frame);
|
wl_signal_add(&cursor->events.frame, &cursor_frame);
|
||||||
@ -209,7 +208,7 @@ index 12f441e..43566fe 100644
|
|||||||
|
|
||||||
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
||||||
wl_signal_add(&cursor_shape_mgr->events.request_set_shape, &request_set_cursor_shape);
|
wl_signal_add(&cursor_shape_mgr->events.request_set_shape, &request_set_cursor_shape);
|
||||||
@@ -2708,6 +2791,163 @@ tagmon(const Arg *arg)
|
@@ -2708,6 +2789,163 @@ tagmon(const Arg *arg)
|
||||||
setmon(sel, dirtomon(arg->i), 0);
|
setmon(sel, dirtomon(arg->i), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user