mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-26 17:54:17 +00:00
Compare commits
14 Commits
6b4729e357
...
4a869141fa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a869141fa | ||
|
|
9d5c84d2b0 | ||
|
|
ff8105d1d2 | ||
|
|
e92e2ebbe0 | ||
|
|
a87342897a | ||
|
|
9d90b0ac9d | ||
|
|
7d997b2b83 | ||
|
|
078d201431 | ||
|
|
e85e1a7af7 | ||
|
|
9ac9bad1af | ||
|
|
fb94ea5fd4 | ||
|
|
481477cbe5 | ||
|
|
d4dc85dbe8 | ||
|
|
bfdd644ffe |
@ -5,7 +5,7 @@ Note: Commands from array are executed using execvp(). So if you need to execute
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/autostart)
|
||||
- [2024-06-07](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/autostart/autostart.patch)
|
||||
- [2025-01-20](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/autostart/autostart.patch)
|
||||
- [0.7](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/autostart/autostart-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From d2829ed5c970c7e7692e39c451526b3860dabb2f Mon Sep 17 00:00:00 2001
|
||||
From 3b0b0249d900121a90528616f4d11f733c7a5ca2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@proton.me>
|
||||
Date: Sat, 8 Jul 2023 17:11:36 -0600
|
||||
@ -11,11 +11,11 @@ https://dwm.suckless.org/patches/cool_autostart/
|
||||
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||
---
|
||||
config.def.h | 7 +++++++
|
||||
dwl.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++-----
|
||||
2 files changed, 61 insertions(+), 5 deletions(-)
|
||||
dwl.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 62 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 22d2171..1d0f935 100644
|
||||
index 22d2171d..8dc6502c 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -20,6 +20,13 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
||||
@ -33,10 +33,10 @@ index 22d2171..1d0f935 100644
|
||||
static const Rule rules[] = {
|
||||
/* app_id title tags mask isfloating monitor */
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 00e9cc1e..5de32831 100644
|
||||
index ad21e1ba..3118e07f 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -249,6 +249,7 @@ static void arrange(Monitor *m);
|
||||
@@ -246,6 +246,7 @@ static void arrange(Monitor *m);
|
||||
static void arrangelayer(Monitor *m, struct wl_list *list,
|
||||
struct wlr_box *usable_area, int exclusive);
|
||||
static void arrangelayers(Monitor *m);
|
||||
@ -44,7 +44,7 @@ index 00e9cc1e..5de32831 100644
|
||||
static void axisnotify(struct wl_listener *listener, void *data);
|
||||
static void buttonpress(struct wl_listener *listener, void *data);
|
||||
static void chvt(const Arg *arg);
|
||||
@@ -429,6 +430,9 @@ static xcb_atom_t netatom[NetLast];
|
||||
@@ -455,6 +456,9 @@ static struct wlr_xwayland *xwayland;
|
||||
/* attempt to encapsulate suck into one file */
|
||||
#include "client.h"
|
||||
|
||||
@ -54,7 +54,7 @@ index 00e9cc1e..5de32831 100644
|
||||
/* function implementations */
|
||||
void
|
||||
applybounds(Client *c, struct wlr_box *bbox)
|
||||
@@ -577,6 +581,27 @@ arrangelayers(Monitor *m)
|
||||
@@ -599,6 +603,27 @@ arrangelayers(Monitor *m)
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,11 +82,13 @@ index 00e9cc1e..5de32831 100644
|
||||
void
|
||||
axisnotify(struct wl_listener *listener, void *data)
|
||||
{
|
||||
@@ -672,11 +697,21 @@ checkidleinhibitor(struct wlr_surface *exclude)
|
||||
@@ -695,12 +720,23 @@ checkidleinhibitor(struct wlr_surface *exclude)
|
||||
void
|
||||
cleanup(void)
|
||||
{
|
||||
+ size_t i;
|
||||
+
|
||||
cleanuplisteners();
|
||||
#ifdef XWAYLAND
|
||||
wlr_xwayland_destroy(xwayland);
|
||||
xwayland = NULL;
|
||||
@ -104,44 +106,36 @@ index 00e9cc1e..5de32831 100644
|
||||
if (child_pid > 0) {
|
||||
kill(-child_pid, SIGTERM);
|
||||
waitpid(child_pid, NULL, 0);
|
||||
@@ -1438,18 +1473,31 @@ void
|
||||
@@ -1551,10 +1587,25 @@ gpureset(struct wl_listener *listener, void *data)
|
||||
void
|
||||
handlesig(int signo)
|
||||
{
|
||||
if (signo == SIGCHLD) {
|
||||
-#ifdef XWAYLAND
|
||||
siginfo_t in;
|
||||
/* wlroots expects to reap the XWayland process itself, so we
|
||||
* use WNOWAIT to keep the child waitable until we know it's not
|
||||
* XWayland.
|
||||
*/
|
||||
while (!waitid(P_ALL, 0, &in, WEXITED|WNOHANG|WNOWAIT) && in.si_pid
|
||||
- && (!xwayland || in.si_pid != xwayland->server->pid))
|
||||
- waitpid(in.si_pid, NULL, 0);
|
||||
-#else
|
||||
- if (signo == SIGCHLD)
|
||||
- while (waitpid(-1, NULL, WNOHANG) > 0);
|
||||
+#ifdef XWAYLAND
|
||||
+ && (!xwayland || in.si_pid != xwayland->server->pid)
|
||||
#endif
|
||||
+ ) {
|
||||
+ pid_t *p, *lim;
|
||||
+ waitpid(in.si_pid, NULL, 0);
|
||||
+ if (in.si_pid == child_pid)
|
||||
- else if (signo == SIGINT || signo == SIGTERM)
|
||||
+ if (signo == SIGCHLD) {
|
||||
+ pid_t pid, *p, *lim;
|
||||
+ while ((pid = waitpid(-1, NULL, WNOHANG)) > 0) {
|
||||
+ if (pid == child_pid)
|
||||
+ child_pid = -1;
|
||||
+ if (!(p = autostart_pids))
|
||||
+ continue;
|
||||
+ lim = &p[autostart_len];
|
||||
+
|
||||
+ for (; p < lim; p++) {
|
||||
+ if (*p == in.si_pid) {
|
||||
+ if (*p == pid) {
|
||||
+ *p = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
} else if (signo == SIGINT || signo == SIGTERM) {
|
||||
+ } else if (signo == SIGINT || signo == SIGTERM) {
|
||||
quit(NULL);
|
||||
}
|
||||
@@ -2169,6 +2217,7 @@ run(char *startup_cmd)
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2241,6 +2292,7 @@ run(char *startup_cmd)
|
||||
die("startup: backend_start");
|
||||
|
||||
/* Now that the socket exists and the backend is started, run the startup command */
|
||||
@ -150,5 +144,5 @@ index 00e9cc1e..5de32831 100644
|
||||
int piperw[2];
|
||||
if (pipe(piperw) < 0)
|
||||
--
|
||||
2.45.2
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ Additionally, it adds some shortcuts:
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/client-opacity)
|
||||
- [2024-06-07](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/client-opacity/client-opacity.patch)
|
||||
- [2025-01-20](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/client-opacity/client-opacity.patch)
|
||||
|
||||
### Authors
|
||||
- [sevz](https://codeberg.org/sevz)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 652fd0f8c03724fc7addaa2822913790cbbe89f0 Mon Sep 17 00:00:00 2001
|
||||
From ba3172875d379ff4f2db69753f50067cecfc8293 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@proton.me>
|
||||
Date: Tue, 25 Jul 2023 12:48:22 -0600
|
||||
@ -11,11 +11,11 @@ Content-Transfer-Encoding: 8bit
|
||||
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||
---
|
||||
config.def.h | 9 ++++++---
|
||||
dwl.c | 38 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 44 insertions(+), 3 deletions(-)
|
||||
dwl.c | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 45 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index a784eb4f..2e3cdfbb 100644
|
||||
index 22d2171d..0eb86874 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -13,6 +13,7 @@ static const float focuscolor[] = COLOR(0x005577ff);
|
||||
@ -26,9 +26,9 @@ index a784eb4f..2e3cdfbb 100644
|
||||
|
||||
/* tagging - TAGCOUNT must be no greater than 31 */
|
||||
#define TAGCOUNT (9)
|
||||
@@ -21,10 +22,10 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
||||
static int log_level = WLR_ERROR;
|
||||
@@ -22,10 +23,10 @@ static int log_level = WLR_ERROR;
|
||||
|
||||
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
|
||||
static const Rule rules[] = {
|
||||
- /* app_id title tags mask isfloating monitor */
|
||||
+ /* app_id title tags mask isfloating alpha monitor */
|
||||
@ -40,7 +40,7 @@ index a784eb4f..2e3cdfbb 100644
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
@@ -130,6 +131,8 @@ static const Key keys[] = {
|
||||
@@ -133,6 +134,8 @@ static const Key keys[] = {
|
||||
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
|
||||
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
|
||||
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
|
||||
@ -50,7 +50,7 @@ index a784eb4f..2e3cdfbb 100644
|
||||
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 6f041a0d..83c3cd23 100644
|
||||
index ad21e1ba..0554fcdf 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -138,6 +138,7 @@ typedef struct {
|
||||
@ -61,7 +61,7 @@ index 6f041a0d..83c3cd23 100644
|
||||
uint32_t resize; /* configure serial of a pending resize */
|
||||
} Client;
|
||||
|
||||
@@ -228,6 +229,7 @@ typedef struct {
|
||||
@@ -227,6 +228,7 @@ typedef struct {
|
||||
const char *title;
|
||||
uint32_t tags;
|
||||
int isfloating;
|
||||
@ -69,7 +69,7 @@ index 6f041a0d..83c3cd23 100644
|
||||
int monitor;
|
||||
} Rule;
|
||||
|
||||
@@ -317,6 +319,7 @@ static void requeststartdrag(struct wl_listener *listener, void *data);
|
||||
@@ -319,6 +321,7 @@ static void requeststartdrag(struct wl_listener *listener, void *data);
|
||||
static void requestmonstate(struct wl_listener *listener, void *data);
|
||||
static void resize(Client *c, struct wlr_box geo, int interact);
|
||||
static void run(char *startup_cmd);
|
||||
@ -77,7 +77,7 @@ index 6f041a0d..83c3cd23 100644
|
||||
static void setcursor(struct wl_listener *listener, void *data);
|
||||
static void setcursorshape(struct wl_listener *listener, void *data);
|
||||
static void setfloating(Client *c, int floating);
|
||||
@@ -325,6 +328,7 @@ static void setgamma(struct wl_listener *listener, void *data);
|
||||
@@ -326,6 +329,7 @@ static void setfullscreen(Client *c, int fullscreen);
|
||||
static void setlayout(const Arg *arg);
|
||||
static void setmfact(const Arg *arg);
|
||||
static void setmon(Client *c, Monitor *m, uint32_t newtags);
|
||||
@ -85,7 +85,7 @@ index 6f041a0d..83c3cd23 100644
|
||||
static void setpsel(struct wl_listener *listener, void *data);
|
||||
static void setsel(struct wl_listener *listener, void *data);
|
||||
static void setup(void);
|
||||
@@ -464,6 +468,7 @@ applyrules(Client *c)
|
||||
@@ -491,6 +495,7 @@ applyrules(Client *c)
|
||||
if ((!r->title || strstr(title, r->title))
|
||||
&& (!r->id || strstr(appid, r->id))) {
|
||||
c->isfloating = r->isfloating;
|
||||
@ -93,17 +93,18 @@ index 6f041a0d..83c3cd23 100644
|
||||
newtags |= r->tags;
|
||||
i = 0;
|
||||
wl_list_for_each(m, &mons, link) {
|
||||
@@ -472,6 +477,7 @@ applyrules(Client *c)
|
||||
@@ -499,6 +504,8 @@ applyrules(Client *c)
|
||||
}
|
||||
}
|
||||
}
|
||||
+ wlr_scene_node_for_each_buffer(&c->scene_surface->node, scenebuffersetopacity, c);
|
||||
+ if (c->scene_surface)
|
||||
+ wlr_scene_node_for_each_buffer(&c->scene_surface->node, scenebuffersetopacity, c);
|
||||
setmon(c, mon, newtags);
|
||||
}
|
||||
|
||||
@@ -773,6 +779,9 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||
if (client_surface(c)->mapped && c->mon)
|
||||
resize(c, c->geom, (c->isfloating && !c->isfullscreen));
|
||||
@@ -874,6 +881,9 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||
|
||||
resize(c, c->geom, (c->isfloating && !c->isfullscreen));
|
||||
|
||||
+ if (c->scene_surface)
|
||||
+ wlr_scene_node_for_each_buffer(&c->scene_surface->node, scenebuffersetopacity, c);
|
||||
@ -111,15 +112,15 @@ index 6f041a0d..83c3cd23 100644
|
||||
/* mark a pending resize as completed */
|
||||
if (c->resize && c->resize <= c->surface.xdg->current.configure_serial)
|
||||
c->resize = 0;
|
||||
@@ -1024,6 +1033,7 @@ createnotify(struct wl_listener *listener, void *data)
|
||||
c = xdg_surface->data = ecalloc(1, sizeof(*c));
|
||||
c->surface.xdg = xdg_surface;
|
||||
@@ -1120,6 +1130,7 @@ createnotify(struct wl_listener *listener, void *data)
|
||||
c = toplevel->base->data = ecalloc(1, sizeof(*c));
|
||||
c->surface.xdg = toplevel->base;
|
||||
c->bw = borderpx;
|
||||
+ c->opacity = default_opacity;
|
||||
|
||||
wlr_xdg_toplevel_set_wm_capabilities(xdg_surface->toplevel,
|
||||
WLR_XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN);
|
||||
@@ -2173,6 +2183,15 @@ run(char *startup_cmd)
|
||||
LISTEN(&toplevel->base->surface->events.commit, &c->commit, commitnotify);
|
||||
LISTEN(&toplevel->base->surface->events.map, &c->map, mapnotify);
|
||||
@@ -2285,6 +2296,15 @@ run(char *startup_cmd)
|
||||
wl_display_run(dpy);
|
||||
}
|
||||
|
||||
@ -135,7 +136,7 @@ index 6f041a0d..83c3cd23 100644
|
||||
void
|
||||
setcursor(struct wl_listener *listener, void *data)
|
||||
{
|
||||
@@ -2241,6 +2260,7 @@ setfullscreen(Client *c, int fullscreen)
|
||||
@@ -2353,6 +2373,7 @@ setfullscreen(Client *c, int fullscreen)
|
||||
* client positions are set by the user and cannot be recalculated */
|
||||
resize(c, c->prev, 0);
|
||||
}
|
||||
@ -143,7 +144,7 @@ index 6f041a0d..83c3cd23 100644
|
||||
arrange(c->mon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2308,6 +2328,23 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
@@ -2409,6 +2430,23 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
focusclient(focustop(selmon), 1);
|
||||
}
|
||||
|
||||
@ -156,10 +157,10 @@ index 6f041a0d..83c3cd23 100644
|
||||
+
|
||||
+ sel->opacity += arg->f;
|
||||
+ if (sel->opacity > 1.0)
|
||||
+ sel->opacity = 1.0;
|
||||
+ sel->opacity = 1.0f;
|
||||
+
|
||||
+ if (sel->opacity < 0.1)
|
||||
+ sel->opacity = 0.1;
|
||||
+ sel->opacity = 0.1f;
|
||||
+
|
||||
+ wlr_scene_node_for_each_buffer(&sel->scene_surface->node, scenebuffersetopacity, sel);
|
||||
+}
|
||||
@ -167,14 +168,14 @@ index 6f041a0d..83c3cd23 100644
|
||||
void
|
||||
setpsel(struct wl_listener *listener, void *data)
|
||||
{
|
||||
@@ -2997,6 +3034,7 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
||||
@@ -3120,6 +3158,7 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
||||
c->surface.xwayland = xsurface;
|
||||
c->type = X11;
|
||||
c->bw = borderpx;
|
||||
c->bw = client_is_unmanaged(c) ? 0 : borderpx;
|
||||
+ c->opacity = default_opacity;
|
||||
|
||||
/* Listen to the various events it can emit */
|
||||
LISTEN(&xsurface->events.associate, &c->associate, associatex11);
|
||||
--
|
||||
2.45.2
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ compile dwl and wlroots with debug symbols)
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/coredump)
|
||||
- [main 2024-09-01](/dwl/dwl-patches/raw/branch/main/patches/coredump/coredump.patch)
|
||||
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/coredump/coredump.patch)
|
||||
- [coredump-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/coredump/coredump-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From ab8abc0186ad74e24bdf9e4f3af00d03ac269631 Mon Sep 17 00:00:00 2001
|
||||
From 6d5017888891957615160fe7c015adf7a6f0fd45 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@proton.me>
|
||||
Date: Wed, 5 Oct 2022 23:07:13 -0500
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..3af09d54 100644
|
||||
index ad21e1ba..940fbeff 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -8,6 +8,7 @@
|
||||
@ -24,7 +24,7 @@ index 9021e442..3af09d54 100644
|
||||
#include <sys/wait.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
@@ -357,6 +358,8 @@ static void xytonode(double x, double y, struct wlr_surface **psurface,
|
||||
@@ -353,6 +354,8 @@ static void xytonode(double x, double y, struct wlr_surface **psurface,
|
||||
static void zoom(const Arg *arg);
|
||||
|
||||
/* variables */
|
||||
@ -33,7 +33,7 @@ index 9021e442..3af09d54 100644
|
||||
static pid_t child_pid = -1;
|
||||
static int locked;
|
||||
static void *exclusive_focus;
|
||||
@@ -2201,6 +2204,7 @@ run(char *startup_cmd)
|
||||
@@ -2248,6 +2251,7 @@ run(char *startup_cmd)
|
||||
if ((child_pid = fork()) < 0)
|
||||
die("startup: fork:");
|
||||
if (child_pid == 0) {
|
||||
@ -41,7 +41,7 @@ index 9021e442..3af09d54 100644
|
||||
setsid();
|
||||
dup2(piperw[0], STDIN_FILENO);
|
||||
close(piperw[0]);
|
||||
@@ -2609,6 +2613,7 @@ void
|
||||
@@ -2659,6 +2663,7 @@ void
|
||||
spawn(const Arg *arg)
|
||||
{
|
||||
if (fork() == 0) {
|
||||
@ -49,7 +49,7 @@ index 9021e442..3af09d54 100644
|
||||
dup2(STDERR_FILENO, STDOUT_FILENO);
|
||||
setsid();
|
||||
execvp(((char **)arg->v)[0], (char **)arg->v);
|
||||
@@ -3156,6 +3161,10 @@ main(int argc, char *argv[])
|
||||
@@ -3178,6 +3183,10 @@ main(int argc, char *argv[])
|
||||
char *startup_cmd = NULL;
|
||||
int c;
|
||||
|
||||
@ -61,5 +61,5 @@ index 9021e442..3af09d54 100644
|
||||
if (c == 's')
|
||||
startup_cmd = optarg;
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ be shown
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/hide-behind-fullscreen)
|
||||
- [main 2024-09-01](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-fullscreen/hide-behind-fullscreen.patch)
|
||||
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-fullscreen/hide-behind-fullscreen.patch)
|
||||
- [hide-behind-fullscreen-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-fullscreen/hide-behind-fullscreen-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From a102d5220bbfcd74e345011ca0ccf908a9f6668b Mon Sep 17 00:00:00 2001
|
||||
From ac1537f068ea626f1984803ed8db08faf7943b18 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@proton.me>
|
||||
Date: Sun, 10 Apr 2022 22:38:53 -0500
|
||||
@ -27,10 +27,10 @@ index 22d2171d..1d5a4c84 100644
|
||||
/* tagging - TAGCOUNT must be no greater than 31 */
|
||||
#define TAGCOUNT (9)
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..111be796 100644
|
||||
index ad21e1ba..f5395fe6 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -480,7 +480,9 @@ applyrules(Client *c)
|
||||
@@ -505,7 +505,9 @@ applyrules(Client *c)
|
||||
void
|
||||
arrange(Monitor *m)
|
||||
{
|
||||
@ -41,7 +41,7 @@ index 9021e442..111be796 100644
|
||||
|
||||
if (!m->wlr_output->enabled)
|
||||
return;
|
||||
@@ -511,6 +513,26 @@ arrange(Monitor *m)
|
||||
@@ -536,6 +538,26 @@ arrange(Monitor *m)
|
||||
: c->scene->node.parent);
|
||||
}
|
||||
|
||||
@ -69,5 +69,5 @@ index 9021e442..111be796 100644
|
||||
m->lt[m->sellt]->arrange(m);
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ Hide all clients behind the focused one in the monocle layout
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/hide-behind-monocle)
|
||||
- [main 2024-09-01](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-monocle/hide-behind-monocle.patch)
|
||||
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-monocle/hide-behind-monocle.patch)
|
||||
- [hide-behind-monocle-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/hide-behind-monocle/hide-behind-monocle-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From b6eb491465e7d7023c0fd127a20507855f985731 Mon Sep 17 00:00:00 2001
|
||||
From 8022376ee59d616831271dbc9f289a8bfd4fedda Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@proton.me>
|
||||
Date: Sat, 8 Jul 2023 17:25:16 -0600
|
||||
@ -13,10 +13,10 @@ Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||
1 file changed, 55 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..d44f97de 100644
|
||||
index ad21e1ba..cad3b0b2 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -289,10 +289,11 @@ static Monitor *dirtomon(enum wlr_direction dir);
|
||||
@@ -285,10 +285,11 @@ static Monitor *dirtomon(enum wlr_direction dir);
|
||||
static void focusclient(Client *c, int lift);
|
||||
static void focusmon(const Arg *arg);
|
||||
static void focusstack(const Arg *arg);
|
||||
@ -29,7 +29,7 @@ index 9021e442..d44f97de 100644
|
||||
static void incnmaster(const Arg *arg);
|
||||
static void inputdevice(struct wl_listener *listener, void *data);
|
||||
static int keybinding(uint32_t mods, xkb_keysym_t sym);
|
||||
@@ -493,7 +494,7 @@ arrange(Monitor *m)
|
||||
@@ -518,7 +519,7 @@ arrange(Monitor *m)
|
||||
}
|
||||
|
||||
wlr_scene_node_set_enabled(&m->fullscreen_bg->node,
|
||||
@ -38,7 +38,7 @@ index 9021e442..d44f97de 100644
|
||||
|
||||
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
|
||||
|
||||
@@ -744,7 +745,7 @@ closemon(Monitor *m)
|
||||
@@ -807,7 +808,7 @@ closemon(Monitor *m)
|
||||
if (c->mon == m)
|
||||
setmon(c, selmon, c->tags);
|
||||
}
|
||||
@ -47,16 +47,16 @@ index 9021e442..d44f97de 100644
|
||||
printstatus();
|
||||
}
|
||||
|
||||
@@ -1181,7 +1182,7 @@ void
|
||||
@@ -1243,7 +1244,7 @@ void
|
||||
destroydragicon(struct wl_listener *listener, void *data)
|
||||
{
|
||||
/* Focus enter isn't sent during drag, so refocus the focused node. */
|
||||
- focusclient(focustop(selmon), 1);
|
||||
+ focusclient(focustop(selmon, 0), 1);
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
wl_list_remove(&listener->link);
|
||||
}
|
||||
|
||||
@@ -1216,7 +1217,7 @@ destroylock(SessionLock *lock, int unlock)
|
||||
@@ -1280,7 +1281,7 @@ destroylock(SessionLock *lock, int unlock)
|
||||
|
||||
wlr_scene_node_set_enabled(&locked_bg->node, 0);
|
||||
|
||||
@ -65,7 +65,7 @@ index 9021e442..d44f97de 100644
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
|
||||
destroy:
|
||||
@@ -1245,7 +1246,7 @@ destroylocksurface(struct wl_listener *listener, void *data)
|
||||
@@ -1309,7 +1310,7 @@ destroylocksurface(struct wl_listener *listener, void *data)
|
||||
surface = wl_container_of(cur_lock->surfaces.next, surface, link);
|
||||
client_notify_enter(surface->surface, wlr_seat_get_keyboard(seat));
|
||||
} else if (!locked) {
|
||||
@ -74,7 +74,7 @@ index 9021e442..d44f97de 100644
|
||||
} else {
|
||||
wlr_seat_keyboard_clear_focus(seat);
|
||||
}
|
||||
@@ -1363,6 +1364,7 @@ focusclient(Client *c, int lift)
|
||||
@@ -1420,6 +1421,7 @@ focusclient(Client *c, int lift)
|
||||
wl_list_insert(&fstack, &c->flink);
|
||||
selmon = c->mon;
|
||||
c->isurgent = 0;
|
||||
@ -82,7 +82,7 @@ index 9021e442..d44f97de 100644
|
||||
|
||||
/* Don't change border color if there is an exclusive focus or we are
|
||||
* handling a drag operation */
|
||||
@@ -1416,14 +1418,14 @@ focusmon(const Arg *arg)
|
||||
@@ -1473,14 +1475,14 @@ focusmon(const Arg *arg)
|
||||
selmon = dirtomon(arg->i);
|
||||
while (!selmon->wlr_output->enabled && i++ < nmons);
|
||||
}
|
||||
@ -99,7 +99,7 @@ index 9021e442..d44f97de 100644
|
||||
if (!sel || (sel->isfullscreen && !client_has_children(sel)))
|
||||
return;
|
||||
if (arg->i > 0) {
|
||||
@@ -1449,12 +1451,15 @@ focusstack(const Arg *arg)
|
||||
@@ -1506,12 +1508,15 @@ focusstack(const Arg *arg)
|
||||
* will focus the topmost client of this mon, when actually will
|
||||
* only return that client */
|
||||
Client *
|
||||
@ -117,8 +117,8 @@ index 9021e442..d44f97de 100644
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1511,6 +1516,25 @@ handlesig(int signo)
|
||||
}
|
||||
@@ -1557,6 +1562,25 @@ handlesig(int signo)
|
||||
quit(NULL);
|
||||
}
|
||||
|
||||
+void
|
||||
@ -143,7 +143,7 @@ index 9021e442..d44f97de 100644
|
||||
void
|
||||
incnmaster(const Arg *arg)
|
||||
{
|
||||
@@ -1649,7 +1673,7 @@ keyrepeat(void *data)
|
||||
@@ -1695,7 +1719,7 @@ keyrepeat(void *data)
|
||||
void
|
||||
killclient(const Arg *arg)
|
||||
{
|
||||
@ -152,7 +152,7 @@ index 9021e442..d44f97de 100644
|
||||
if (sel)
|
||||
client_send_close(sel);
|
||||
}
|
||||
@@ -1778,8 +1802,7 @@ monocle(Monitor *m)
|
||||
@@ -1824,8 +1848,7 @@ monocle(Monitor *m)
|
||||
}
|
||||
if (n)
|
||||
snprintf(m->ltsymbol, LENGTH(m->ltsymbol), "[%d]", n);
|
||||
@ -162,7 +162,7 @@ index 9021e442..d44f97de 100644
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2046,7 +2069,7 @@ printstatus(void)
|
||||
@@ -2092,7 +2115,7 @@ printstatus(void)
|
||||
if (c->isurgent)
|
||||
urg |= c->tags;
|
||||
}
|
||||
@ -171,7 +171,7 @@ index 9021e442..d44f97de 100644
|
||||
printf("%s title %s\n", m->wlr_output->name, client_get_title(c));
|
||||
printf("%s appid %s\n", m->wlr_output->name, client_get_appid(c));
|
||||
printf("%s fullscreen %d\n", m->wlr_output->name, c->isfullscreen);
|
||||
@@ -2359,7 +2382,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
@@ -2406,7 +2429,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
||||
setfloating(c, c->isfloating);
|
||||
}
|
||||
@ -180,7 +180,7 @@ index 9021e442..d44f97de 100644
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2630,12 +2653,12 @@ startdrag(struct wl_listener *listener, void *data)
|
||||
@@ -2680,12 +2703,12 @@ startdrag(struct wl_listener *listener, void *data)
|
||||
void
|
||||
tag(const Arg *arg)
|
||||
{
|
||||
@ -195,7 +195,7 @@ index 9021e442..d44f97de 100644
|
||||
arrange(selmon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2643,7 +2666,7 @@ tag(const Arg *arg)
|
||||
@@ -2693,7 +2716,7 @@ tag(const Arg *arg)
|
||||
void
|
||||
tagmon(const Arg *arg)
|
||||
{
|
||||
@ -204,7 +204,7 @@ index 9021e442..d44f97de 100644
|
||||
if (sel)
|
||||
setmon(sel, dirtomon(arg->i), 0);
|
||||
}
|
||||
@@ -2685,7 +2708,7 @@ tile(Monitor *m)
|
||||
@@ -2735,7 +2758,7 @@ tile(Monitor *m)
|
||||
void
|
||||
togglefloating(const Arg *arg)
|
||||
{
|
||||
@ -213,7 +213,7 @@ index 9021e442..d44f97de 100644
|
||||
/* return if fullscreen */
|
||||
if (sel && !sel->isfullscreen)
|
||||
setfloating(sel, !sel->isfloating);
|
||||
@@ -2694,7 +2717,7 @@ togglefloating(const Arg *arg)
|
||||
@@ -2744,7 +2767,7 @@ togglefloating(const Arg *arg)
|
||||
void
|
||||
togglefullscreen(const Arg *arg)
|
||||
{
|
||||
@ -222,7 +222,7 @@ index 9021e442..d44f97de 100644
|
||||
if (sel)
|
||||
setfullscreen(sel, !sel->isfullscreen);
|
||||
}
|
||||
@@ -2703,12 +2726,12 @@ void
|
||||
@@ -2753,12 +2776,12 @@ void
|
||||
toggletag(const Arg *arg)
|
||||
{
|
||||
uint32_t newtags;
|
||||
@ -237,7 +237,7 @@ index 9021e442..d44f97de 100644
|
||||
arrange(selmon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2721,7 +2744,7 @@ toggleview(const Arg *arg)
|
||||
@@ -2771,7 +2794,7 @@ toggleview(const Arg *arg)
|
||||
return;
|
||||
|
||||
selmon->tagset[selmon->seltags] = newtagset;
|
||||
@ -246,7 +246,7 @@ index 9021e442..d44f97de 100644
|
||||
arrange(selmon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2745,7 +2768,7 @@ unmaplayersurfacenotify(struct wl_listener *listener, void *data)
|
||||
@@ -2795,7 +2818,7 @@ unmaplayersurfacenotify(struct wl_listener *listener, void *data)
|
||||
if (l->layer_surface->output && (l->mon = l->layer_surface->output->data))
|
||||
arrangelayers(l->mon);
|
||||
if (l->layer_surface->surface == seat->keyboard_state.focused_surface)
|
||||
@ -255,7 +255,7 @@ index 9021e442..d44f97de 100644
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -2762,7 +2785,7 @@ unmapnotify(struct wl_listener *listener, void *data)
|
||||
@@ -2812,7 +2835,7 @@ unmapnotify(struct wl_listener *listener, void *data)
|
||||
if (client_is_unmanaged(c)) {
|
||||
if (c == exclusive_focus) {
|
||||
exclusive_focus = NULL;
|
||||
@ -264,7 +264,7 @@ index 9021e442..d44f97de 100644
|
||||
}
|
||||
} else {
|
||||
wl_list_remove(&c->link);
|
||||
@@ -2843,7 +2866,7 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
@@ -2893,7 +2916,7 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
/* Don't move clients to the left output when plugging monitors */
|
||||
arrange(m);
|
||||
/* make sure fullscreen clients have the right size */
|
||||
@ -273,7 +273,7 @@ index 9021e442..d44f97de 100644
|
||||
resize(c, m->m, 0);
|
||||
|
||||
/* Try to re-set the gamma LUT when updating monitors,
|
||||
@@ -2863,7 +2886,7 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
@@ -2913,7 +2936,7 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
if (!c->mon && client_surface(c)->mapped)
|
||||
setmon(c, selmon, c->tags);
|
||||
}
|
||||
@ -282,7 +282,7 @@ index 9021e442..d44f97de 100644
|
||||
if (selmon->lock_surface) {
|
||||
client_notify_enter(selmon->lock_surface->surface,
|
||||
wlr_seat_get_keyboard(seat));
|
||||
@@ -2885,7 +2908,7 @@ void
|
||||
@@ -2935,7 +2958,7 @@ void
|
||||
updatetitle(struct wl_listener *listener, void *data)
|
||||
{
|
||||
Client *c = wl_container_of(listener, c, set_title);
|
||||
@ -291,7 +291,7 @@ index 9021e442..d44f97de 100644
|
||||
printstatus();
|
||||
}
|
||||
|
||||
@@ -2895,7 +2918,7 @@ urgent(struct wl_listener *listener, void *data)
|
||||
@@ -2945,7 +2968,7 @@ urgent(struct wl_listener *listener, void *data)
|
||||
struct wlr_xdg_activation_v1_request_activate_event *event = data;
|
||||
Client *c = NULL;
|
||||
toplevel_from_wlr_surface(event->surface, &c, NULL);
|
||||
@ -300,7 +300,7 @@ index 9021e442..d44f97de 100644
|
||||
return;
|
||||
|
||||
c->isurgent = 1;
|
||||
@@ -2913,7 +2936,7 @@ view(const Arg *arg)
|
||||
@@ -2963,7 +2986,7 @@ view(const Arg *arg)
|
||||
selmon->seltags ^= 1; /* toggle sel tagset */
|
||||
if (arg->ui & TAGMASK)
|
||||
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
|
||||
@ -309,7 +309,7 @@ index 9021e442..d44f97de 100644
|
||||
arrange(selmon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2984,7 +3007,7 @@ xytonode(double x, double y, struct wlr_surface **psurface,
|
||||
@@ -3034,7 +3057,7 @@ xytonode(double x, double y, struct wlr_surface **psurface,
|
||||
void
|
||||
zoom(const Arg *arg)
|
||||
{
|
||||
@ -318,7 +318,7 @@ index 9021e442..d44f97de 100644
|
||||
|
||||
if (!sel || !selmon || !selmon->lt[selmon->sellt]->arrange || sel->isfloating)
|
||||
return;
|
||||
@@ -3108,7 +3131,7 @@ sethints(struct wl_listener *listener, void *data)
|
||||
@@ -3145,7 +3168,7 @@ sethints(struct wl_listener *listener, void *data)
|
||||
{
|
||||
Client *c = wl_container_of(listener, c, set_hints);
|
||||
struct wlr_surface *surface = client_surface(c);
|
||||
@ -328,5 +328,5 @@ index 9021e442..d44f97de 100644
|
||||
|
||||
c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints);
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ layout (you can use the keys.h file to customize, or get the keycodes with
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/keycodes)
|
||||
- [main 2024-09-01](/dwl/dwl-patches/raw/branch/main/patches/keycodes/keycodes.patch)
|
||||
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/keycodes/keycodes.patch)
|
||||
- [keycodes-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/keycodes/keycodes-0.7.patch)
|
||||
|
||||
### Config after patching
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 477b53a171133ff7fb2144270b30dd4a86e61f0d Mon Sep 17 00:00:00 2001
|
||||
From 308eda668e1d6496a605e44be34fd44c841a1133 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@proton.me>
|
||||
Date: Fri, 4 Jun 2021 16:51:01 -0500
|
||||
@ -127,10 +127,10 @@ index 22d2171d..87a6e60f 100644
|
||||
|
||||
static const Button buttons[] = {
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..ea9d134c 100644
|
||||
index ad21e1ba..1c9e0ae5 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -147,7 +147,7 @@ typedef struct {
|
||||
@@ -143,7 +143,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
uint32_t mod;
|
||||
@ -139,7 +139,7 @@ index 9021e442..ea9d134c 100644
|
||||
void (*func)(const Arg *);
|
||||
const Arg arg;
|
||||
} Key;
|
||||
@@ -155,9 +155,8 @@ typedef struct {
|
||||
@@ -151,9 +151,8 @@ typedef struct {
|
||||
typedef struct {
|
||||
struct wlr_keyboard_group *wlr_group;
|
||||
|
||||
@ -151,7 +151,7 @@ index 9021e442..ea9d134c 100644
|
||||
struct wl_event_source *key_repeat_source;
|
||||
|
||||
struct wl_listener modifiers;
|
||||
@@ -295,7 +294,7 @@ static void gpureset(struct wl_listener *listener, void *data);
|
||||
@@ -291,7 +290,7 @@ static void gpureset(struct wl_listener *listener, void *data);
|
||||
static void handlesig(int signo);
|
||||
static void incnmaster(const Arg *arg);
|
||||
static void inputdevice(struct wl_listener *listener, void *data);
|
||||
@ -160,7 +160,7 @@ index 9021e442..ea9d134c 100644
|
||||
static void keypress(struct wl_listener *listener, void *data);
|
||||
static void keypressmod(struct wl_listener *listener, void *data);
|
||||
static int keyrepeat(void *data);
|
||||
@@ -1551,7 +1550,7 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||
@@ -1597,7 +1596,7 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||
}
|
||||
|
||||
int
|
||||
@ -169,7 +169,7 @@ index 9021e442..ea9d134c 100644
|
||||
{
|
||||
/*
|
||||
* Here we handle compositor keybindings. This is when the compositor is
|
||||
@@ -1561,7 +1560,7 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
|
||||
@@ -1607,7 +1606,7 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
|
||||
const Key *k;
|
||||
for (k = keys; k < END(keys); k++) {
|
||||
if (CLEANMASK(mods) == CLEANMASK(k->mod)
|
||||
@ -178,7 +178,7 @@ index 9021e442..ea9d134c 100644
|
||||
k->func(&k->arg);
|
||||
return 1;
|
||||
}
|
||||
@@ -1572,17 +1571,12 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
|
||||
@@ -1618,17 +1617,12 @@ keybinding(uint32_t mods, xkb_keysym_t sym)
|
||||
void
|
||||
keypress(struct wl_listener *listener, void *data)
|
||||
{
|
||||
@ -196,7 +196,7 @@ index 9021e442..ea9d134c 100644
|
||||
|
||||
int handled = 0;
|
||||
uint32_t mods = wlr_keyboard_get_modifiers(&group->wlr_group->keyboard);
|
||||
@@ -1591,19 +1585,16 @@ keypress(struct wl_listener *listener, void *data)
|
||||
@@ -1637,19 +1631,16 @@ keypress(struct wl_listener *listener, void *data)
|
||||
|
||||
/* On _press_ if there is no active screen locker,
|
||||
* attempt to process a compositor keybinding. */
|
||||
@ -220,7 +220,7 @@ index 9021e442..ea9d134c 100644
|
||||
wl_event_source_timer_update(group->key_repeat_source, 0);
|
||||
}
|
||||
|
||||
@@ -1633,15 +1624,13 @@ int
|
||||
@@ -1679,15 +1670,13 @@ int
|
||||
keyrepeat(void *data)
|
||||
{
|
||||
KeyboardGroup *group = data;
|
||||
@ -759,10 +759,10 @@ index 00000000..047b76b0
|
||||
+#define Key_XF86KbdLcdMenu4 0x2c3
|
||||
+#define Key_XF86KbdLcdMenu5 0x2c4
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
From c4cd9dae5d38ebbb96231da2afa85652444163df Mon Sep 17 00:00:00 2001
|
||||
From 16c0b9be41ba111bf551fd2e5e2bdaa537c6990d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@proton.me>
|
||||
Date: Sun, 19 Mar 2023 15:50:07 -0600
|
||||
@ -879,5 +879,5 @@ index 00000000..37655611
|
||||
+ return !ok;
|
||||
+}
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ Allows activating numlock or capslock at startup.
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/numlock-capslock)
|
||||
- [main 2024-09-02](/dwl/dwl-patches/raw/branch/main/patches/numlock-capslock/numlock-capslock.patch)
|
||||
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/numlock-capslock/numlock-capslock.patch)
|
||||
- [numlock-capslock.patch](/dwl/dwl-patches/raw/branch/main/patches/numlock-capslock/numlock-capslock-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From ba9733fa956ec37a3e7a47c8023d6751df948141 Mon Sep 17 00:00:00 2001
|
||||
From ec5dbcd9f4629549d3d14b1791305a42479a935f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@proton.me>
|
||||
Date: Sun, 4 Apr 2021 19:56:09 -0500
|
||||
@ -29,7 +29,7 @@ index 22d2171d..21dc6201 100644
|
||||
static const int repeat_delay = 600;
|
||||
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..c1ddee88 100644
|
||||
index ad21e1ba..d0059ec8 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -14,6 +14,7 @@
|
||||
@ -40,7 +40,7 @@ index 9021e442..c1ddee88 100644
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_alpha_modifier_v1.h>
|
||||
@@ -359,6 +360,7 @@ static void zoom(const Arg *arg);
|
||||
@@ -355,6 +356,7 @@ static void zoom(const Arg *arg);
|
||||
/* variables */
|
||||
static pid_t child_pid = -1;
|
||||
static int locked;
|
||||
@ -48,7 +48,7 @@ index 9021e442..c1ddee88 100644
|
||||
static void *exclusive_focus;
|
||||
static struct wl_display *dpy;
|
||||
static struct wl_event_loop *event_loop;
|
||||
@@ -873,6 +875,8 @@ createkeyboard(struct wlr_keyboard *keyboard)
|
||||
@@ -936,6 +938,8 @@ createkeyboard(struct wlr_keyboard *keyboard)
|
||||
/* Set the keymap to match the group keymap */
|
||||
wlr_keyboard_set_keymap(keyboard, kb_group->wlr_group->keyboard.keymap);
|
||||
|
||||
@ -57,7 +57,7 @@ index 9021e442..c1ddee88 100644
|
||||
/* Add the new keyboard to the group */
|
||||
wlr_keyboard_group_add_keyboard(kb_group->wlr_group, keyboard);
|
||||
}
|
||||
@@ -894,6 +898,21 @@ createkeyboardgroup(void)
|
||||
@@ -957,6 +961,21 @@ createkeyboardgroup(void)
|
||||
die("failed to compile keymap");
|
||||
|
||||
wlr_keyboard_set_keymap(&group->wlr_group->keyboard, keymap);
|
||||
@ -80,5 +80,5 @@ index 9021e442..c1ddee88 100644
|
||||
xkb_context_unref(context);
|
||||
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ Adds functions `pushup` and `pushdown` to move windows within the tiling order.
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/push)
|
||||
- [2024-09-03](/dwl/dwl-patches/raw/branch/main/patches/push/push.patch)
|
||||
- [2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/push/push.patch)
|
||||
- [push-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/push/push-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 23f9113fd746081a6c32d9c6367f19eabe9a91b3 Mon Sep 17 00:00:00 2001
|
||||
From 06d86c26da60e4196ec3c5228b04c66ac042a1f8 Mon Sep 17 00:00:00 2001
|
||||
From: "Devin J. Pohly" <djpohly@gmail.com>
|
||||
Date: Thu, 4 Mar 2021 00:45:50 -0600
|
||||
Subject: [PATCH] port dwm "push" patch to dwl
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||
create mode 100644 push.h
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 8db7409c..e742ed3f 100644
|
||||
index 578194f2..f919a61e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -19,7 +19,7 @@ LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(WLR_LIBS) -lm $(LIBS)
|
||||
@ -30,10 +30,10 @@ index 8db7409c..e742ed3f 100644
|
||||
wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h
|
||||
util.o: util.c util.h
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..f9e44f33 100644
|
||||
index ad21e1ba..69753921 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -425,7 +425,9 @@ static xcb_atom_t netatom[NetLast];
|
||||
@@ -450,7 +450,9 @@ static struct wlr_xwayland *xwayland;
|
||||
#endif
|
||||
|
||||
/* configuration, allows nested code to access above variables */
|
||||
@ -123,5 +123,5 @@ index 00000000..59c0f80e
|
||||
+static void pushdown(const Arg *arg);
|
||||
+static void pushup(const Arg *arg);
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -51,9 +51,9 @@ static const struct blur_data blur_data = {
|
||||
|
||||
- [git branch](https://codeberg.org/wochap/dwl/src/branch/v0.8-a/scenefx)
|
||||
|
||||
- [0.8](https://codeberg.org/dwl/dwl-patches/raw/commit/72c5d436abef385456877f210f1d1876c88d68e3/patches/scenefx/scenefx.patch)
|
||||
- [0.8](https://codeberg.org/dwl/dwl-patches/raw/commit/bfdd644ffe5c04924c19653869a79a96cd1e1f2e/patches/scenefx/scenefx.patch)
|
||||
|
||||
**NOTE:** This patch was tested with the `b2e0ac4beb85aa89d0357dc8fcf8762808650890` commit on the `main` branch of `SceneFX`. It supports rounded borders, blur, and shadows.
|
||||
**NOTE:** This patch was tested with the `ab17e3810ac27b2706f73e9a4aaab89fae30363a` commit on the `main` branch of `SceneFX`. It supports rounded borders, blur, and shadows.
|
||||
|
||||
**IMPORTANT:** This patch requires you to build DWL with the following dependencies
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
From 059a0c8988967e23807e4f78920816f679dbc068 Mon Sep 17 00:00:00 2001
|
||||
From b102666dc62ab49ee8205f84971a3e651283160d Mon Sep 17 00:00:00 2001
|
||||
From: wochap <gean.marroquin@gmail.com>
|
||||
Date: Thu, 2 Jan 2025 19:06:36 -0500
|
||||
Date: Sat, 18 Jan 2025 17:28:39 -0500
|
||||
Subject: [PATCH] implement scenefx
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
client.h | 14 ++-
|
||||
config.def.h | 30 ++++-
|
||||
dwl.c | 319 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 355 insertions(+), 10 deletions(-)
|
||||
dwl.c | 328 ++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
4 files changed, 364 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 3358bae..20b15bb 100644
|
||||
@ -56,7 +56,7 @@ index 42f225f..e3cef30 100644
|
||||
wlr_scene_rect_set_color(c->border[i], color);
|
||||
}
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 22d2171..d4e85c1 100644
|
||||
index 22d2171..4ec6adb 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -12,7 +12,35 @@ static const float bordercolor[] = COLOR(0x444444ff);
|
||||
@ -79,7 +79,7 @@ index 22d2171..d4e85c1 100644
|
||||
+static const char *const shadow_ignore_list[] = { NULL }; /* list of app-id to ignore */
|
||||
+
|
||||
+static const int corner_radius = 8; /* 0 disables corner_radius */
|
||||
+static const int corner_radius_inner = 8; /* 0 disables corner_radius */
|
||||
+static const int corner_radius_inner = 9; /* 0 disables corner_radius */
|
||||
+static const int corner_radius_only_floating = 0; /* only apply corner_radius and corner_radius_inner to floating windows */
|
||||
+
|
||||
+static const int blur = 1; /* flag to enable blur */
|
||||
@ -97,7 +97,7 @@ index 22d2171..d4e85c1 100644
|
||||
/* tagging - TAGCOUNT must be no greater than 31 */
|
||||
#define TAGCOUNT (9)
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 5bf995e..3c551dc 100644
|
||||
index 5bf995e..b5e8151 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -10,8 +10,13 @@
|
||||
@ -135,7 +135,7 @@ index 5bf995e..3c551dc 100644
|
||||
} Client;
|
||||
|
||||
typedef struct {
|
||||
@@ -355,6 +365,11 @@ static Monitor *xytomon(double x, double y);
|
||||
@@ -355,6 +365,12 @@ static Monitor *xytomon(double x, double y);
|
||||
static void xytonode(double x, double y, struct wlr_surface **psurface,
|
||||
Client **pc, LayerSurface **pl, double *nx, double *ny);
|
||||
static void zoom(const Arg *arg);
|
||||
@ -144,10 +144,11 @@ index 5bf995e..3c551dc 100644
|
||||
+static void iter_xdg_scene_buffers_corner_radius(struct wlr_scene_buffer *buffer, int sx, int sy, void *user_data);
|
||||
+static void output_configure_scene(struct wlr_scene_node *node, Client *c);
|
||||
+static int in_shadow_ignore_list(const char *str);
|
||||
+static void client_set_shadow_blur_sigma(Client *c, int blur_sigma);
|
||||
|
||||
/* variables */
|
||||
static const char broken[] = "broken";
|
||||
@@ -366,6 +381,8 @@ static struct wl_event_loop *event_loop;
|
||||
@@ -366,6 +382,8 @@ static struct wl_event_loop *event_loop;
|
||||
static struct wlr_backend *backend;
|
||||
static struct wlr_scene *scene;
|
||||
static struct wlr_scene_tree *layers[NUM_LAYERS];
|
||||
@ -156,7 +157,7 @@ index 5bf995e..3c551dc 100644
|
||||
static struct wlr_scene_tree *drag_icon;
|
||||
/* Map from ZWLR_LAYER_SHELL_* constants to Lyr* enum */
|
||||
static const int layermap[] = { LyrBg, LyrBottom, LyrTop, LyrOverlay };
|
||||
@@ -413,6 +430,8 @@ static struct wlr_box sgeom;
|
||||
@@ -413,6 +431,8 @@ static struct wlr_box sgeom;
|
||||
static struct wl_list mons;
|
||||
static Monitor *selmon;
|
||||
|
||||
@ -165,7 +166,7 @@ index 5bf995e..3c551dc 100644
|
||||
#ifdef XWAYLAND
|
||||
static void activatex11(struct wl_listener *listener, void *data);
|
||||
static void associatex11(struct wl_listener *listener, void *data);
|
||||
@@ -1061,6 +1080,9 @@ createnotify(struct wl_listener *listener, void *data)
|
||||
@@ -1061,6 +1081,9 @@ createnotify(struct wl_listener *listener, void *data)
|
||||
c->surface.xdg = toplevel->base;
|
||||
c->bw = borderpx;
|
||||
|
||||
@ -175,7 +176,7 @@ index 5bf995e..3c551dc 100644
|
||||
LISTEN(&toplevel->base->surface->events.commit, &c->commit, commitnotify);
|
||||
LISTEN(&toplevel->base->surface->events.map, &c->map, mapnotify);
|
||||
LISTEN(&toplevel->base->surface->events.unmap, &c->unmap, unmapnotify);
|
||||
@@ -1369,8 +1391,20 @@ focusclient(Client *c, int lift)
|
||||
@@ -1369,8 +1392,20 @@ focusclient(Client *c, int lift)
|
||||
|
||||
/* Don't change border color if there is an exclusive focus or we are
|
||||
* handling a drag operation */
|
||||
@ -184,7 +185,7 @@ index 5bf995e..3c551dc 100644
|
||||
client_set_border_color(c, focuscolor);
|
||||
+
|
||||
+ if (shadow) {
|
||||
+ wlr_scene_shadow_set_blur_sigma(c->shadow, shadow_blur_sigma_focus);
|
||||
+ client_set_shadow_blur_sigma(c, (int)round(shadow_blur_sigma_focus));
|
||||
+ if (c->has_shadow_enabled) {
|
||||
+ wlr_scene_shadow_set_color(c->shadow, shadow_color_focus);
|
||||
+ }
|
||||
@ -197,12 +198,12 @@ index 5bf995e..3c551dc 100644
|
||||
}
|
||||
|
||||
/* Deactivate old client if focus is changing */
|
||||
@@ -1389,6 +1423,17 @@ focusclient(Client *c, int lift)
|
||||
@@ -1389,6 +1424,17 @@ focusclient(Client *c, int lift)
|
||||
} else if (old_c && !client_is_unmanaged(old_c) && (!c || !client_wants_focus(c))) {
|
||||
client_set_border_color(old_c, bordercolor);
|
||||
|
||||
+ if (shadow) {
|
||||
+ wlr_scene_shadow_set_blur_sigma(old_c->shadow, shadow_blur_sigma);
|
||||
+ client_set_shadow_blur_sigma(old_c, (int)round(shadow_blur_sigma));
|
||||
+ if (old_c->has_shadow_enabled) {
|
||||
+ wlr_scene_shadow_set_color(old_c->shadow, shadow_color);
|
||||
+ }
|
||||
@ -215,7 +216,7 @@ index 5bf995e..3c551dc 100644
|
||||
client_activate_surface(old, 0);
|
||||
}
|
||||
}
|
||||
@@ -1718,6 +1763,21 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||
@@ -1718,6 +1764,21 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||
c->border[i]->node.data = c;
|
||||
}
|
||||
|
||||
@ -237,7 +238,7 @@ index 5bf995e..3c551dc 100644
|
||||
/* Initialize client geometry with room for border */
|
||||
client_set_tiled(c, WLR_EDGE_TOP | WLR_EDGE_BOTTOM | WLR_EDGE_LEFT | WLR_EDGE_RIGHT);
|
||||
c->geom.width += 2 * c->bw;
|
||||
@@ -1739,6 +1799,25 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||
@@ -1739,6 +1800,25 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||
}
|
||||
printstatus();
|
||||
|
||||
@ -246,7 +247,7 @@ index 5bf995e..3c551dc 100644
|
||||
+ if ((corner_radius_only_floating && !c->isfloating) || c->isfullscreen) {
|
||||
+ radius = 0;
|
||||
+ }
|
||||
+ wlr_scene_rect_set_corner_radius(c->round_border, radius);
|
||||
+ wlr_scene_rect_set_corner_radius(c->round_border, radius, CORNER_LOCATION_ALL);
|
||||
+ }
|
||||
+
|
||||
+ if (shadow) {
|
||||
@ -263,7 +264,7 @@ index 5bf995e..3c551dc 100644
|
||||
unset_fullscreen:
|
||||
m = c->mon ? c->mon : xytomon(c->geom.x, c->geom.y);
|
||||
wl_list_for_each(w, &clients, link) {
|
||||
@@ -2113,6 +2192,8 @@ rendermon(struct wl_listener *listener, void *data)
|
||||
@@ -2113,6 +2193,8 @@ rendermon(struct wl_listener *listener, void *data)
|
||||
goto skip;
|
||||
}
|
||||
|
||||
@ -272,7 +273,7 @@ index 5bf995e..3c551dc 100644
|
||||
/*
|
||||
* HACK: The "correct" way to set the gamma is to commit it together with
|
||||
* the rest of the state in one go, but to do that we would need to rewrite
|
||||
@@ -2181,6 +2262,8 @@ resize(Client *c, struct wlr_box geo, int interact)
|
||||
@@ -2181,6 +2263,8 @@ resize(Client *c, struct wlr_box geo, int interact)
|
||||
{
|
||||
struct wlr_box *bbox;
|
||||
struct wlr_box clip;
|
||||
@ -281,7 +282,7 @@ index 5bf995e..3c551dc 100644
|
||||
|
||||
if (!c->mon || !c->scene)
|
||||
return;
|
||||
@@ -2207,6 +2290,20 @@ resize(Client *c, struct wlr_box geo, int interact)
|
||||
@@ -2207,6 +2291,20 @@ resize(Client *c, struct wlr_box geo, int interact)
|
||||
c->geom.height - 2 * c->bw);
|
||||
client_get_clip(c, &clip);
|
||||
wlr_scene_subsurface_tree_set_clip(&c->scene_surface->node, &clip);
|
||||
@ -302,7 +303,7 @@ index 5bf995e..3c551dc 100644
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2307,6 +2404,29 @@ setfloating(Client *c, int floating)
|
||||
@@ -2307,6 +2405,29 @@ setfloating(Client *c, int floating)
|
||||
{
|
||||
Client *p = client_get_parent(c);
|
||||
c->isfloating = floating;
|
||||
@ -312,7 +313,7 @@ index 5bf995e..3c551dc 100644
|
||||
+ if ((corner_radius_only_floating && !c->isfloating) || c->isfullscreen) {
|
||||
+ radius = 0;
|
||||
+ }
|
||||
+ wlr_scene_rect_set_corner_radius(c->round_border, radius);
|
||||
+ wlr_scene_rect_set_corner_radius(c->round_border, radius, CORNER_LOCATION_ALL);
|
||||
+ }
|
||||
+ if (corner_radius_inner > 0 && c->round_border != NULL) {
|
||||
+ wlr_scene_node_for_each_buffer(&c->scene_surface->node, iter_xdg_scene_buffers_corner_radius, c);
|
||||
@ -332,7 +333,7 @@ index 5bf995e..3c551dc 100644
|
||||
/* If in floating layout do not change the client's layer */
|
||||
if (!c->mon || !client_surface(c)->mapped || !c->mon->lt[c->mon->sellt]->arrange)
|
||||
return;
|
||||
@@ -2336,6 +2456,29 @@ setfullscreen(Client *c, int fullscreen)
|
||||
@@ -2336,6 +2457,29 @@ setfullscreen(Client *c, int fullscreen)
|
||||
* client positions are set by the user and cannot be recalculated */
|
||||
resize(c, c->prev, 0);
|
||||
}
|
||||
@ -342,7 +343,7 @@ index 5bf995e..3c551dc 100644
|
||||
+ if ((corner_radius_only_floating && !c->isfloating) || c->isfullscreen) {
|
||||
+ radius = 0;
|
||||
+ }
|
||||
+ wlr_scene_rect_set_corner_radius(c->round_border, radius);
|
||||
+ wlr_scene_rect_set_corner_radius(c->round_border, radius, CORNER_LOCATION_ALL);
|
||||
+ }
|
||||
+ if (corner_radius_inner > 0 && c->round_border != NULL) {
|
||||
+ wlr_scene_node_for_each_buffer(&c->scene_surface->node, iter_xdg_scene_buffers_corner_radius, c);
|
||||
@ -362,7 +363,7 @@ index 5bf995e..3c551dc 100644
|
||||
arrange(c->mon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2457,11 +2600,17 @@ setup(void)
|
||||
@@ -2457,11 +2601,17 @@ setup(void)
|
||||
drag_icon = wlr_scene_tree_create(&scene->tree);
|
||||
wlr_scene_node_place_below(&drag_icon->node, &layers[LyrBlock]->node);
|
||||
|
||||
@ -381,7 +382,7 @@ index 5bf995e..3c551dc 100644
|
||||
die("couldn't create renderer");
|
||||
LISTEN_STATIC(&drw->events.lost, gpureset);
|
||||
|
||||
@@ -2871,6 +3020,14 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
@@ -2871,6 +3021,14 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
wlr_scene_node_set_position(&m->fullscreen_bg->node, m->m.x, m->m.y);
|
||||
wlr_scene_rect_set_size(m->fullscreen_bg, m->m.width, m->m.height);
|
||||
|
||||
@ -396,7 +397,7 @@ index 5bf995e..3c551dc 100644
|
||||
if (m->lock_surface) {
|
||||
struct wlr_scene_tree *scene_tree = m->lock_surface->surface->data;
|
||||
wlr_scene_node_set_position(&scene_tree->node, m->m.x, m->m.y);
|
||||
@@ -2940,8 +3097,16 @@ urgent(struct wl_listener *listener, void *data)
|
||||
@@ -2940,8 +3098,16 @@ urgent(struct wl_listener *listener, void *data)
|
||||
c->isurgent = 1;
|
||||
printstatus();
|
||||
|
||||
@ -405,7 +406,7 @@ index 5bf995e..3c551dc 100644
|
||||
client_set_border_color(c, urgentcolor);
|
||||
+
|
||||
+ if (shadow && c->shadow != NULL) {
|
||||
+ wlr_scene_shadow_set_blur_sigma(c->shadow, shadow_blur_sigma_focus);
|
||||
+ client_set_shadow_blur_sigma(c, (int)round(shadow_blur_sigma_focus));
|
||||
+ if (c->has_shadow_enabled) {
|
||||
+ wlr_scene_shadow_set_color(c->shadow, shadow_color_focus);
|
||||
+ }
|
||||
@ -414,7 +415,7 @@ index 5bf995e..3c551dc 100644
|
||||
}
|
||||
|
||||
void
|
||||
@@ -3053,6 +3218,152 @@ zoom(const Arg *arg)
|
||||
@@ -3053,6 +3219,160 @@ zoom(const Arg *arg)
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
@ -563,6 +564,14 @@ index 5bf995e..3c551dc 100644
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+client_set_shadow_blur_sigma(Client *c, int blur_sigma)
|
||||
+{
|
||||
+ wlr_scene_shadow_set_blur_sigma(c->shadow, blur_sigma);
|
||||
+ wlr_scene_node_set_position(&c->shadow->node, -blur_sigma, -blur_sigma);
|
||||
+ wlr_scene_shadow_set_size(c->shadow, c->geom.width + (blur_sigma) * 2, c->geom.height + (blur_sigma) * 2);
|
||||
+}
|
||||
+
|
||||
#ifdef XWAYLAND
|
||||
void
|
||||
|
||||
@ -4,7 +4,7 @@ in its tag OR if the window is in a monocle layout.
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/smartborders)
|
||||
- [main 2024-09-02](/dwl/dwl-patches/raw/branch/main/patches/smartborders/smartborders.patch)
|
||||
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/smartborders/smartborders.patch)
|
||||
- [smartborders-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/smartborders/smartborders-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From e9ae9a7da8638f6562cddee91eeb4d4d9d9545f5 Mon Sep 17 00:00:00 2001
|
||||
From 38010bdecf63bdb8acfc584825b398838310eed1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@protonmail.com>
|
||||
Date: Tue, 16 Aug 2022 15:28:00 -0500
|
||||
@ -28,10 +28,10 @@ index 22d2171d..632f151f 100644
|
||||
static const float rootcolor[] = COLOR(0x222222ff);
|
||||
static const float bordercolor[] = COLOR(0x444444ff);
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..67714759 100644
|
||||
index ad21e1ba..0c56431a 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -321,7 +321,7 @@ static void rendermon(struct wl_listener *listener, void *data);
|
||||
@@ -317,7 +317,7 @@ static void rendermon(struct wl_listener *listener, void *data);
|
||||
static void requestdecorationmode(struct wl_listener *listener, void *data);
|
||||
static void requeststartdrag(struct wl_listener *listener, void *data);
|
||||
static void requestmonstate(struct wl_listener *listener, void *data);
|
||||
@ -40,7 +40,7 @@ index 9021e442..67714759 100644
|
||||
static void run(char *startup_cmd);
|
||||
static void setcursor(struct wl_listener *listener, void *data);
|
||||
static void setcursorshape(struct wl_listener *listener, void *data);
|
||||
@@ -740,7 +740,7 @@ closemon(Monitor *m)
|
||||
@@ -803,7 +803,7 @@ closemon(Monitor *m)
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (c->isfloating && c->geom.x > m->m.width)
|
||||
resize(c, (struct wlr_box){.x = c->geom.x - m->w.width, .y = c->geom.y,
|
||||
@ -49,7 +49,7 @@ index 9021e442..67714759 100644
|
||||
if (c->mon == m)
|
||||
setmon(c, selmon, c->tags);
|
||||
}
|
||||
@@ -809,7 +809,11 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||
@@ -872,7 +872,11 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ index 9021e442..67714759 100644
|
||||
|
||||
/* mark a pending resize as completed */
|
||||
if (c->resize && c->resize <= c->surface.xdg->current.configure_serial)
|
||||
@@ -1773,7 +1777,7 @@ monocle(Monitor *m)
|
||||
@@ -1819,7 +1823,7 @@ monocle(Monitor *m)
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
||||
continue;
|
||||
@ -71,7 +71,7 @@ index 9021e442..67714759 100644
|
||||
n++;
|
||||
}
|
||||
if (n)
|
||||
@@ -1865,11 +1869,11 @@ motionnotify(uint32_t time, struct wlr_input_device *device, double dx, double d
|
||||
@@ -1911,11 +1915,11 @@ motionnotify(uint32_t time, struct wlr_input_device *device, double dx, double d
|
||||
if (cursor_mode == CurMove) {
|
||||
/* Move the grabbed client to the new position. */
|
||||
resize(grabc, (struct wlr_box){.x = (int)round(cursor->x) - grabcx, .y = (int)round(cursor->y) - grabcy,
|
||||
@ -85,7 +85,7 @@ index 9021e442..67714759 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2147,7 +2151,7 @@ requestmonstate(struct wl_listener *listener, void *data)
|
||||
@@ -2194,7 +2198,7 @@ requestmonstate(struct wl_listener *listener, void *data)
|
||||
}
|
||||
|
||||
void
|
||||
@ -94,7 +94,7 @@ index 9021e442..67714759 100644
|
||||
{
|
||||
struct wlr_box *bbox;
|
||||
struct wlr_box clip;
|
||||
@@ -2159,6 +2163,7 @@ resize(Client *c, struct wlr_box geo, int interact)
|
||||
@@ -2206,6 +2210,7 @@ resize(Client *c, struct wlr_box geo, int interact)
|
||||
|
||||
client_set_bounds(c, geo.width, geo.height);
|
||||
c->geom = geo;
|
||||
@ -102,7 +102,7 @@ index 9021e442..67714759 100644
|
||||
applybounds(c, bbox);
|
||||
|
||||
/* Update scene-graph, including borders */
|
||||
@@ -2283,6 +2288,8 @@ setfloating(Client *c, int floating)
|
||||
@@ -2330,6 +2335,8 @@ setfloating(Client *c, int floating)
|
||||
wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen ||
|
||||
(p && p->isfullscreen) ? LyrFS
|
||||
: c->isfloating ? LyrFloat : LyrTile]);
|
||||
@ -111,7 +111,7 @@ index 9021e442..67714759 100644
|
||||
arrange(c->mon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2300,11 +2307,11 @@ setfullscreen(Client *c, int fullscreen)
|
||||
@@ -2347,11 +2354,11 @@ setfullscreen(Client *c, int fullscreen)
|
||||
|
||||
if (fullscreen) {
|
||||
c->prev = c->geom;
|
||||
@ -125,7 +125,7 @@ index 9021e442..67714759 100644
|
||||
}
|
||||
arrange(c->mon);
|
||||
printstatus();
|
||||
@@ -2320,6 +2327,12 @@ setlayout(const Arg *arg)
|
||||
@@ -2367,6 +2374,12 @@ setlayout(const Arg *arg)
|
||||
if (arg && arg->v)
|
||||
selmon->lt[selmon->sellt] = (Layout *)arg->v;
|
||||
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, LENGTH(selmon->ltsymbol));
|
||||
@ -138,7 +138,7 @@ index 9021e442..67714759 100644
|
||||
arrange(selmon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2354,7 +2367,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
@@ -2401,7 +2414,7 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
arrange(oldmon);
|
||||
if (m) {
|
||||
/* Make sure window actually overlaps with the monitor */
|
||||
@ -147,7 +147,7 @@ index 9021e442..67714759 100644
|
||||
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
||||
setfloating(c, c->isfloating);
|
||||
@@ -2651,7 +2664,7 @@ tagmon(const Arg *arg)
|
||||
@@ -2701,7 +2714,7 @@ tagmon(const Arg *arg)
|
||||
void
|
||||
tile(Monitor *m)
|
||||
{
|
||||
@ -156,7 +156,7 @@ index 9021e442..67714759 100644
|
||||
int i, n = 0;
|
||||
Client *c;
|
||||
|
||||
@@ -2661,6 +2674,9 @@ tile(Monitor *m)
|
||||
@@ -2711,6 +2724,9 @@ tile(Monitor *m)
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
@ -166,7 +166,7 @@ index 9021e442..67714759 100644
|
||||
if (n > m->nmaster)
|
||||
mw = m->nmaster ? (int)roundf(m->w.width * m->mfact) : 0;
|
||||
else
|
||||
@@ -2671,11 +2687,11 @@ tile(Monitor *m)
|
||||
@@ -2721,11 +2737,11 @@ tile(Monitor *m)
|
||||
continue;
|
||||
if (i < m->nmaster) {
|
||||
resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + my, .width = mw,
|
||||
@ -180,7 +180,7 @@ index 9021e442..67714759 100644
|
||||
ty += c->geom.height;
|
||||
}
|
||||
i++;
|
||||
@@ -2844,7 +2860,7 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
@@ -2894,7 +2910,7 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
arrange(m);
|
||||
/* make sure fullscreen clients have the right size */
|
||||
if ((c = focustop(m)) && c->isfullscreen)
|
||||
@ -189,7 +189,7 @@ index 9021e442..67714759 100644
|
||||
|
||||
/* Try to re-set the gamma LUT when updating monitors,
|
||||
* it's only really needed when enabling a disabled output, but meh. */
|
||||
@@ -3053,7 +3069,7 @@ configurex11(struct wl_listener *listener, void *data)
|
||||
@@ -3103,7 +3119,7 @@ configurex11(struct wl_listener *listener, void *data)
|
||||
if ((c->isfloating && c != grabc) || !c->mon->lt[c->mon->sellt]->arrange) {
|
||||
resize(c, (struct wlr_box){.x = event->x - c->bw,
|
||||
.y = event->y - c->bw, .width = event->width + c->bw * 2,
|
||||
@ -199,5 +199,5 @@ index 9021e442..67714759 100644
|
||||
arrange(c->mon);
|
||||
}
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ KNOWN BUGS:
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/fauxmight/dwl/src/branch/touch-input)
|
||||
- [2025-01-01](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/less-simple-touch-input/less-simple-touch-input.patch)
|
||||
- [2025-01-01](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/touch-input/touch-input.patch)
|
||||
|
||||
### Authors
|
||||
- [fauxmight](https://codeberg.org/fauxmight)
|
||||
|
||||
260
patches/touch-input/touch-input-rebase-d1c2f43.patch
Normal file
260
patches/touch-input/touch-input-rebase-d1c2f43.patch
Normal file
@ -0,0 +1,260 @@
|
||||
From 49503be07eea1b4422288323aa87a9ba7ebdefc3 Mon Sep 17 00:00:00 2001
|
||||
From: Micah N Gorrell <m@minego.net>
|
||||
Date: Fri, 9 Feb 2024 17:08:20 -0700
|
||||
Subject: [PATCH] Add support for touch screen input devices, and send the
|
||||
appropriate events to clients
|
||||
|
||||
---
|
||||
dwl.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 158 insertions(+)
|
||||
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index ad21e1b..73fbd0d 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <wlr/types/wlr_session_lock_v1.h>
|
||||
#include <wlr/types/wlr_single_pixel_buffer_v1.h>
|
||||
#include <wlr/types/wlr_subcompositor.h>
|
||||
+#include <wlr/types/wlr_touch.h>
|
||||
#include <wlr/types/wlr_viewporter.h>
|
||||
#include <wlr/types/wlr_virtual_keyboard_v1.h>
|
||||
#include <wlr/types/wlr_virtual_pointer_v1.h>
|
||||
@@ -161,6 +162,12 @@ typedef struct {
|
||||
struct wl_listener destroy;
|
||||
} KeyboardGroup;
|
||||
|
||||
+typedef struct TouchGroup {
|
||||
+ struct wl_list link;
|
||||
+ struct wlr_touch *touch;
|
||||
+ Monitor *m;
|
||||
+} TouchGroup;
|
||||
+
|
||||
typedef struct {
|
||||
/* Must keep this field first */
|
||||
unsigned int type; /* LayerShell */
|
||||
@@ -268,7 +275,9 @@ static void createnotify(struct wl_listener *listener, void *data);
|
||||
static void createpointer(struct wlr_pointer *pointer);
|
||||
static void createpointerconstraint(struct wl_listener *listener, void *data);
|
||||
static void createpopup(struct wl_listener *listener, void *data);
|
||||
+static void createtouch(struct wlr_touch *touch);
|
||||
static void cursorconstrain(struct wlr_pointer_constraint_v1 *constraint);
|
||||
+static void createtouch(struct wlr_touch *touch);
|
||||
static void cursorframe(struct wl_listener *listener, void *data);
|
||||
static void cursorwarptohint(void);
|
||||
static void destroydecoration(struct wl_listener *listener, void *data);
|
||||
@@ -338,6 +347,10 @@ static void togglefloating(const Arg *arg);
|
||||
static void togglefullscreen(const Arg *arg);
|
||||
static void toggletag(const Arg *arg);
|
||||
static void toggleview(const Arg *arg);
|
||||
+static void touchdown(struct wl_listener *listener, void *data);
|
||||
+static void touchup(struct wl_listener *listener, void *data);
|
||||
+static void touchframe(struct wl_listener *listener, void *data);
|
||||
+static void touchmotion(struct wl_listener *listener, void *data);
|
||||
static void unlocksession(struct wl_listener *listener, void *data);
|
||||
static void unmaplayersurfacenotify(struct wl_listener *listener, void *data);
|
||||
static void unmapnotify(struct wl_listener *listener, void *data);
|
||||
@@ -405,6 +418,7 @@ static struct wlr_output_layout *output_layout;
|
||||
static struct wlr_box sgeom;
|
||||
static struct wl_list mons;
|
||||
static Monitor *selmon;
|
||||
+static struct wl_list touches;
|
||||
|
||||
/* global event handlers */
|
||||
static struct wl_listener cursor_axis = {.notify = axisnotify};
|
||||
@@ -434,6 +448,10 @@ static struct wl_listener request_set_sel = {.notify = setsel};
|
||||
static struct wl_listener request_set_cursor_shape = {.notify = setcursorshape};
|
||||
static struct wl_listener request_start_drag = {.notify = requeststartdrag};
|
||||
static struct wl_listener start_drag = {.notify = startdrag};
|
||||
+static struct wl_listener touch_down = {.notify = touchdown};
|
||||
+static struct wl_listener touch_frame = {.notify = touchframe};
|
||||
+static struct wl_listener touch_motion = {.notify = touchmotion};
|
||||
+static struct wl_listener touch_up = {.notify = touchup};
|
||||
static struct wl_listener new_session_lock = {.notify = locksession};
|
||||
|
||||
#ifdef XWAYLAND
|
||||
@@ -775,6 +793,10 @@ cleanuplisteners(void)
|
||||
wl_list_remove(&request_set_cursor_shape.link);
|
||||
wl_list_remove(&request_start_drag.link);
|
||||
wl_list_remove(&start_drag.link);
|
||||
+ wl_list_remove(&touch_down.link);
|
||||
+ wl_list_remove(&touch_frame.link);
|
||||
+ wl_list_remove(&touch_motion.link);
|
||||
+ wl_list_remove(&touch_up.link);
|
||||
wl_list_remove(&new_session_lock.link);
|
||||
#ifdef XWAYLAND
|
||||
wl_list_remove(&new_xwayland_surface.link);
|
||||
@@ -1192,6 +1214,16 @@ createpopup(struct wl_listener *listener, void *data)
|
||||
LISTEN_STATIC(&popup->base->surface->events.commit, commitpopup);
|
||||
}
|
||||
|
||||
+void
|
||||
+createtouch(struct wlr_touch *wlr_touch)
|
||||
+{
|
||||
+ TouchGroup *touch = ecalloc(1, sizeof(TouchGroup));
|
||||
+
|
||||
+ touch->touch = wlr_touch;
|
||||
+ wl_list_insert(&touches, &touch->link);
|
||||
+ wlr_cursor_attach_input_device(cursor, &wlr_touch->base);
|
||||
+}
|
||||
+
|
||||
void
|
||||
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
||||
{
|
||||
@@ -1581,6 +1613,9 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||
case WLR_INPUT_DEVICE_POINTER:
|
||||
createpointer(wlr_pointer_from_input_device(device));
|
||||
break;
|
||||
+ case WLR_INPUT_DEVICE_TOUCH:
|
||||
+ createtouch(wlr_touch_from_input_device(device));
|
||||
+ break;
|
||||
default:
|
||||
/* TODO handle other input device types */
|
||||
break;
|
||||
@@ -1593,6 +1628,8 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||
caps = WL_SEAT_CAPABILITY_POINTER;
|
||||
if (!wl_list_empty(&kb_group->wlr_group->devices))
|
||||
caps |= WL_SEAT_CAPABILITY_KEYBOARD;
|
||||
+ if (!wl_list_empty(&touches))
|
||||
+ caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||
wlr_seat_set_capabilities(seat, caps);
|
||||
}
|
||||
|
||||
@@ -2604,6 +2641,13 @@ setup(void)
|
||||
wl_signal_add(&cursor->events.axis, &cursor_axis);
|
||||
wl_signal_add(&cursor->events.frame, &cursor_frame);
|
||||
|
||||
+ wl_list_init(&touches);
|
||||
+
|
||||
+ wl_signal_add(&cursor->events.touch_down, &touch_down);
|
||||
+ wl_signal_add(&cursor->events.touch_frame, &touch_frame);
|
||||
+ wl_signal_add(&cursor->events.touch_motion, &touch_motion);
|
||||
+ wl_signal_add(&cursor->events.touch_up, &touch_up);
|
||||
+
|
||||
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);
|
||||
|
||||
@@ -2776,6 +2820,120 @@ toggleview(const Arg *arg)
|
||||
printstatus();
|
||||
}
|
||||
|
||||
+void
|
||||
+touchdown(struct wl_listener *listener, void *data)
|
||||
+{
|
||||
+ struct wlr_touch_down_event *event = data;
|
||||
+ double lx, ly;
|
||||
+ double sx, sy;
|
||||
+ struct wlr_surface *surface;
|
||||
+ Client *c = NULL;
|
||||
+ uint32_t serial = 0;
|
||||
+ Monitor *m;
|
||||
+
|
||||
+ wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||
+
|
||||
+ // Map the input to the appropriate output, to ensure that rotation is
|
||||
+ // handled.
|
||||
+ wl_list_for_each(m, &mons, link) {
|
||||
+ if (m == NULL || m->wlr_output == NULL) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (event->touch->output_name != NULL && 0 != strcmp(event->touch->output_name, m->wlr_output->name)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ wlr_cursor_map_input_to_output(cursor, &event->touch->base, m->wlr_output);
|
||||
+ }
|
||||
+
|
||||
+ wlr_cursor_absolute_to_layout_coords(cursor, &event->touch->base, event->x, event->y, &lx, &ly);
|
||||
+
|
||||
+ /* Find the client under the pointer and send the event along. */
|
||||
+ xytonode(lx, ly, &surface, &c, NULL, &sx, &sy);
|
||||
+ if (sloppyfocus)
|
||||
+ focusclient(c, 0);
|
||||
+
|
||||
+ if (surface != NULL) {
|
||||
+ serial = wlr_seat_touch_notify_down(seat, surface, event->time_msec, event->touch_id, sx, sy);
|
||||
+ }
|
||||
+
|
||||
+ if (serial && wlr_seat_touch_num_points(seat) == 1) {
|
||||
+ /* Emulate a mouse click if the touch event wasn't handled */
|
||||
+ struct wlr_pointer_button_event *button_event = data;
|
||||
+ struct wlr_pointer_motion_absolute_event *motion_event = data;
|
||||
+ double dx, dy;
|
||||
+
|
||||
+ wlr_cursor_absolute_to_layout_coords(cursor, &motion_event->pointer->base, motion_event->x, motion_event->y, &lx, &ly);
|
||||
+ wlr_cursor_warp_closest(cursor, &motion_event->pointer->base, lx, ly);
|
||||
+ dx = lx - cursor->x;
|
||||
+ dy = ly - cursor->y;
|
||||
+ motionnotify(motion_event->time_msec, &motion_event->pointer->base, dx, dy, dx, dy);
|
||||
+
|
||||
+ button_event->button = BTN_LEFT;
|
||||
+ button_event->state = WL_POINTER_BUTTON_STATE_PRESSED;
|
||||
+ buttonpress(listener, button_event);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+touchup(struct wl_listener *listener, void *data)
|
||||
+{
|
||||
+ struct wlr_touch_up_event *event = data;
|
||||
+
|
||||
+ if (!wlr_seat_touch_get_point(seat, event->touch_id)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (wlr_seat_touch_num_points(seat) == 1) {
|
||||
+ struct wlr_pointer_button_event *button_event = data;
|
||||
+
|
||||
+ button_event->button = BTN_LEFT;
|
||||
+ button_event->state = WL_POINTER_BUTTON_STATE_RELEASED;
|
||||
+ buttonpress(listener, button_event);
|
||||
+ }
|
||||
+
|
||||
+ wlr_seat_touch_notify_up(seat, event->time_msec, event->touch_id);
|
||||
+ wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+touchframe(struct wl_listener *listener, void *data)
|
||||
+{
|
||||
+ wlr_seat_touch_notify_frame(seat);
|
||||
+ wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+touchmotion(struct wl_listener *listener, void *data)
|
||||
+{
|
||||
+ struct wlr_touch_motion_event *event = data;
|
||||
+ double lx, ly;
|
||||
+ double sx, sy;
|
||||
+ struct wlr_surface *surface;
|
||||
+ Client *c = NULL;
|
||||
+
|
||||
+ if (!wlr_seat_touch_get_point(seat, event->touch_id)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ wlr_cursor_absolute_to_layout_coords(cursor, &event->touch->base, event->x, event->y, &lx, &ly);
|
||||
+ xytonode(lx, ly, &surface, &c, NULL, &sx, &sy);
|
||||
+
|
||||
+ if (c != NULL && surface != NULL) {
|
||||
+ if (sloppyfocus)
|
||||
+ focusclient(c, 0);
|
||||
+ wlr_seat_touch_point_focus(seat, surface, event->time_msec, event->touch_id, sx, sy);
|
||||
+ } else {
|
||||
+ if (sloppyfocus)
|
||||
+ focusclient(NULL, 0);
|
||||
+ wlr_seat_touch_point_clear_focus(seat, event->time_msec, event->touch_id);
|
||||
+ }
|
||||
+ wlr_seat_touch_notify_motion(seat, event->time_msec, event->touch_id, sx, sy);
|
||||
+
|
||||
+ wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
|
||||
+}
|
||||
+
|
||||
+
|
||||
void
|
||||
unlocksession(struct wl_listener *listener, void *data)
|
||||
{
|
||||
--
|
||||
2.47.0
|
||||
|
||||
@ -4,7 +4,7 @@ the screen edge in a flexible manner.
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/sevz/dwl/src/branch/vanitygaps)
|
||||
- [main 2024-09-01](/dwl/dwl-patches/raw/branch/main/patches/vanitygaps/vanitygaps.patch)
|
||||
- [main 2025-01-20](/dwl/dwl-patches/raw/branch/main/patches/vanitygaps/vanitygaps.patch)
|
||||
- [vanitygaps-0.7.patch](/dwl/dwl-patches/raw/branch/main/patches/vanitygaps/vanitygaps-0.7.patch)
|
||||
|
||||
### Authors
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From a66874e623f8471bf5cee7f7d64ce97fc6cd1564 Mon Sep 17 00:00:00 2001
|
||||
From 8d29d5cace06c97917fbc26c673fd37731ac4984 Mon Sep 17 00:00:00 2001
|
||||
From: Bonicgamer <44382222+Bonicgamer@users.noreply.github.com>
|
||||
Date: Mon, 17 Aug 2020 14:48:24 -0400
|
||||
Subject: [PATCH 1/2] Implement vanitygaps
|
||||
@ -9,8 +9,8 @@ Content-Transfer-Encoding: 8bit
|
||||
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||
---
|
||||
config.def.h | 21 ++++++++
|
||||
dwl.c | 150 +++++++++++++++++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 161 insertions(+), 10 deletions(-)
|
||||
dwl.c | 149 +++++++++++++++++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 160 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 22d2171d..39e528b1 100644
|
||||
@ -53,10 +53,10 @@ index 22d2171d..39e528b1 100644
|
||||
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 9021e442..14e4627a 100644
|
||||
index ad21e1ba..fa823957 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -201,6 +201,10 @@ struct Monitor {
|
||||
@@ -197,6 +197,10 @@ struct Monitor {
|
||||
struct wlr_box w; /* window area, layout-relative */
|
||||
struct wl_list layers[4]; /* LayerSurface.link */
|
||||
const Layout *lt[2];
|
||||
@ -67,7 +67,7 @@ index 9021e442..14e4627a 100644
|
||||
unsigned int seltags;
|
||||
unsigned int sellt;
|
||||
uint32_t tagset[2];
|
||||
@@ -274,6 +278,7 @@ static void createpopup(struct wl_listener *listener, void *data);
|
||||
@@ -271,6 +275,7 @@ static void createpopup(struct wl_listener *listener, void *data);
|
||||
static void cursorconstrain(struct wlr_pointer_constraint_v1 *constraint);
|
||||
static void cursorframe(struct wl_listener *listener, void *data);
|
||||
static void cursorwarptohint(void);
|
||||
@ -75,7 +75,7 @@ index 9021e442..14e4627a 100644
|
||||
static void destroydecoration(struct wl_listener *listener, void *data);
|
||||
static void destroydragicon(struct wl_listener *listener, void *data);
|
||||
static void destroyidleinhibitor(struct wl_listener *listener, void *data);
|
||||
@@ -294,6 +299,13 @@ static void fullscreennotify(struct wl_listener *listener, void *data);
|
||||
@@ -290,6 +295,13 @@ static void fullscreennotify(struct wl_listener *listener, void *data);
|
||||
static void gpureset(struct wl_listener *listener, void *data);
|
||||
static void handlesig(int signo);
|
||||
static void incnmaster(const Arg *arg);
|
||||
@ -89,7 +89,7 @@ index 9021e442..14e4627a 100644
|
||||
static void inputdevice(struct wl_listener *listener, void *data);
|
||||
static int keybinding(uint32_t mods, xkb_keysym_t sym);
|
||||
static void keypress(struct wl_listener *listener, void *data);
|
||||
@@ -327,6 +339,7 @@ static void setcursor(struct wl_listener *listener, void *data);
|
||||
@@ -323,6 +335,7 @@ static void setcursor(struct wl_listener *listener, void *data);
|
||||
static void setcursorshape(struct wl_listener *listener, void *data);
|
||||
static void setfloating(Client *c, int floating);
|
||||
static void setfullscreen(Client *c, int fullscreen);
|
||||
@ -97,7 +97,7 @@ index 9021e442..14e4627a 100644
|
||||
static void setlayout(const Arg *arg);
|
||||
static void setmfact(const Arg *arg);
|
||||
static void setmon(Client *c, Monitor *m, uint32_t newtags);
|
||||
@@ -340,6 +353,7 @@ static void tagmon(const Arg *arg);
|
||||
@@ -336,6 +349,7 @@ static void tagmon(const Arg *arg);
|
||||
static void tile(Monitor *m);
|
||||
static void togglefloating(const Arg *arg);
|
||||
static void togglefullscreen(const Arg *arg);
|
||||
@ -105,16 +105,15 @@ index 9021e442..14e4627a 100644
|
||||
static void toggletag(const Arg *arg);
|
||||
static void toggleview(const Arg *arg);
|
||||
static void unlocksession(struct wl_listener *listener, void *data);
|
||||
@@ -411,6 +425,8 @@ static struct wlr_box sgeom;
|
||||
@@ -405,6 +419,7 @@ static struct wlr_output_layout *output_layout;
|
||||
static struct wlr_box sgeom;
|
||||
static struct wl_list mons;
|
||||
static Monitor *selmon;
|
||||
|
||||
+static int enablegaps = 1; /* enables gaps, used by togglegaps */
|
||||
+
|
||||
#ifdef XWAYLAND
|
||||
static void activatex11(struct wl_listener *listener, void *data);
|
||||
static void associatex11(struct wl_listener *listener, void *data);
|
||||
@@ -985,6 +1001,11 @@ createmon(struct wl_listener *listener, void *data)
|
||||
|
||||
/* global event handlers */
|
||||
static struct wl_listener cursor_axis = {.notify = axisnotify};
|
||||
@@ -1048,6 +1063,11 @@ createmon(struct wl_listener *listener, void *data)
|
||||
for (i = 0; i < LENGTH(m->layers); i++)
|
||||
wl_list_init(&m->layers[i]);
|
||||
|
||||
@ -126,7 +125,7 @@ index 9021e442..14e4627a 100644
|
||||
wlr_output_state_init(&state);
|
||||
/* Initialize monitor state using configured rules */
|
||||
m->tagset[0] = m->tagset[1] = 1;
|
||||
@@ -1167,6 +1188,12 @@ cursorwarptohint(void)
|
||||
@@ -1230,6 +1250,12 @@ cursorwarptohint(void)
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,7 +138,7 @@ index 9021e442..14e4627a 100644
|
||||
void
|
||||
destroydecoration(struct wl_listener *listener, void *data)
|
||||
{
|
||||
@@ -1520,6 +1547,83 @@ incnmaster(const Arg *arg)
|
||||
@@ -1566,6 +1592,83 @@ incnmaster(const Arg *arg)
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
@ -223,7 +222,7 @@ index 9021e442..14e4627a 100644
|
||||
void
|
||||
inputdevice(struct wl_listener *listener, void *data)
|
||||
{
|
||||
@@ -2310,6 +2414,16 @@ setfullscreen(Client *c, int fullscreen)
|
||||
@@ -2357,6 +2460,16 @@ setfullscreen(Client *c, int fullscreen)
|
||||
printstatus();
|
||||
}
|
||||
|
||||
@ -240,7 +239,7 @@ index 9021e442..14e4627a 100644
|
||||
void
|
||||
setlayout(const Arg *arg)
|
||||
{
|
||||
@@ -2651,7 +2765,7 @@ tagmon(const Arg *arg)
|
||||
@@ -2701,7 +2814,7 @@ tagmon(const Arg *arg)
|
||||
void
|
||||
tile(Monitor *m)
|
||||
{
|
||||
@ -249,7 +248,7 @@ index 9021e442..14e4627a 100644
|
||||
int i, n = 0;
|
||||
Client *c;
|
||||
|
||||
@@ -2661,22 +2775,31 @@ tile(Monitor *m)
|
||||
@@ -2711,22 +2824,31 @@ tile(Monitor *m)
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
@ -290,7 +289,7 @@ index 9021e442..14e4627a 100644
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -2699,6 +2822,13 @@ togglefullscreen(const Arg *arg)
|
||||
@@ -2749,6 +2871,13 @@ togglefullscreen(const Arg *arg)
|
||||
setfullscreen(sel, !sel->isfullscreen);
|
||||
}
|
||||
|
||||
@ -305,10 +304,10 @@ index 9021e442..14e4627a 100644
|
||||
toggletag(const Arg *arg)
|
||||
{
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
From 333bf3c468570468ec4525f28ba40a2d8b53ca6b Mon Sep 17 00:00:00 2001
|
||||
From e3d10f01df9b7d6735ce9e43ebfdca35b8639f0e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||
<leohdz172@protonmail.com>
|
||||
Date: Wed, 20 Jul 2022 00:15:32 -0500
|
||||
@ -336,10 +335,10 @@ index 39e528b1..f4d4095d 100644
|
||||
static const unsigned int gappih = 10; /* horiz inner gap between windows */
|
||||
static const unsigned int gappiv = 10; /* vert inner gap between windows */
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 14e4627a..2428a6d1 100644
|
||||
index fa823957..59eabb54 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -1877,8 +1877,12 @@ monocle(Monitor *m)
|
||||
@@ -1922,8 +1922,12 @@ monocle(Monitor *m)
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
||||
continue;
|
||||
@ -354,5 +353,5 @@ index 14e4627a..2428a6d1 100644
|
||||
if (n)
|
||||
snprintf(m->ltsymbol, LENGTH(m->ltsymbol), "[%d]", n);
|
||||
--
|
||||
2.46.0
|
||||
2.48.0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user