sticky: update for 0.8

This commit is contained in:
nate zhou 2026-03-08 10:58:28 +08:00
parent f8d1cfad11
commit d1faa1059c
No known key found for this signature in database
GPG Key ID: F7476912AA224CAC
2 changed files with 16 additions and 15 deletions

View File

@ -4,7 +4,8 @@ Adds a toggleable function that makes a sticky client that is visible on all tag
Originally based on [dwm sticky patch](https://dwm.suckless.org/patches/sticky).
### Download
- [2024-07-26](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/sticky/sticky.patch)
- [v0.8](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/sticky/sticky.patch)
- [2024-07-26](https://codeberg.org/dwl/dwl-patches/src/commit/f8d1cfad116c19c01593f7436468ec0cb7a3297b/patches/sticky/sticky.patch)
- [v0.4](https://github.com/djpohly/dwl/compare/main...dm1tz:04-sticky.patch)
- [git branch](https://codeberg.org/Rutherther/dwl/src/branch/v0.7/sticky)

View File

@ -1,17 +1,17 @@
From f113cdc0b4cecceaaf28679489852ae61a1aa3f5 Mon Sep 17 00:00:00 2001
From: Rutherther <rutherther@proton.me>
Date: Fri, 19 Jul 2024 16:29:43 +0200
Subject: [PATCH] sticky
From d36eee35fdc4b0e666fb04a580200e8c5d2b1f9e Mon Sep 17 00:00:00 2001
From: nate zhou <gnuunixchad@outlook.com>
Date: Sat, 28 Feb 2026 22:55:33 +0800
Subject: [PATCH] Update sticky patch to v0.8
---
dwl.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/dwl.c b/dwl.c
index 5bf995e..820f4af 100644
index 44f3ad9..05070ef 100644
--- a/dwl.c
+++ b/dwl.c
@@ -73,7 +73,7 @@
@@ -74,7 +74,7 @@
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define CLEANMASK(mask) (mask & ~WLR_MODIFIER_CAPS)
@ -20,7 +20,7 @@ index 5bf995e..820f4af 100644
#define LENGTH(X) (sizeof X / sizeof X[0])
#define END(A) ((A) + LENGTH(A))
#define TAGMASK ((1u << TAGCOUNT) - 1)
@@ -139,7 +139,7 @@ typedef struct {
@@ -137,7 +137,7 @@ typedef struct {
#endif
unsigned int bw;
uint32_t tags;
@ -29,15 +29,15 @@ index 5bf995e..820f4af 100644
uint32_t resize; /* configure serial of a pending resize */
} Client;
@@ -326,6 +326,7 @@ static void setcursor(struct wl_listener *listener, void *data);
@@ -323,6 +323,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);
+static void setsticky(Client *c, int sticky);
static void setgamma(struct wl_listener *listener, void *data);
static void setlayout(const Arg *arg);
static void setmfact(const Arg *arg);
@@ -339,6 +340,7 @@ static void tag(const Arg *arg);
static void setmon(Client *c, Monitor *m, uint32_t newtags);
@@ -335,6 +336,7 @@ static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
static void tile(Monitor *m);
static void togglefloating(const Arg *arg);
@ -45,8 +45,8 @@ index 5bf995e..820f4af 100644
static void togglefullscreen(const Arg *arg);
static void toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
@@ -2351,6 +2353,17 @@ setgamma(struct wl_listener *listener, void *data)
wlr_output_schedule_frame(m->wlr_output);
@@ -2368,6 +2370,17 @@ setfullscreen(Client *c, int fullscreen)
printstatus();
}
+void
@ -63,7 +63,7 @@ index 5bf995e..820f4af 100644
void
setlayout(const Arg *arg)
{
@@ -2738,6 +2751,16 @@ togglefullscreen(const Arg *arg)
@@ -2760,6 +2773,16 @@ togglefullscreen(const Arg *arg)
setfullscreen(sel, !sel->isfullscreen);
}
@ -81,5 +81,5 @@ index 5bf995e..820f4af 100644
toggletag(const Arg *arg)
{
--
2.45.2
2.53.0