From 79dcc0d3271395fe1258d818718209254d846b1b Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Sat, 4 Sep 2021 13:46:58 +0200 Subject: [PATCH 1/7] reset cursor mode when grabc is unmapped --- dwl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dwl.c b/dwl.c index 2c1634b..c798685 100644 --- a/dwl.c +++ b/dwl.c @@ -2292,6 +2292,10 @@ unmapnotify(struct wl_listener *listener, void *data) { /* Called when the surface is unmapped, and should no longer be shown. */ Client *c = wl_container_of(listener, c, unmap); + if (c == grabc) { + cursor_mode = CurNormal; + grabc = NULL; + } wl_list_remove(&c->link); if (client_is_unmanaged(c)) return; From ebfefa84bad5a930df4df85b150c27f1d4fe6de6 Mon Sep 17 00:00:00 2001 From: Humm Date: Wed, 13 Oct 2021 23:11:40 +0200 Subject: [PATCH 2/7] -s: close unused fds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dup2 doesn’t close fds, it only duplicates them. The old ones weren’t closed, causing problems (like dwl blocking due to the child process never reading from the reading end, even if stdin has been closed). --- dwl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwl.c b/dwl.c index 6303c25..f84460f 100644 --- a/dwl.c +++ b/dwl.c @@ -1823,11 +1823,13 @@ run(char *startup_cmd) EBARF("startup: fork"); if (startup_pid == 0) { dup2(piperw[0], STDIN_FILENO); + close(piperw[0]); close(piperw[1]); execl("/bin/sh", "/bin/sh", "-c", startup_cmd, NULL); EBARF("startup: execl"); } dup2(piperw[1], STDOUT_FILENO); + close(piperw[1]); close(piperw[0]); } /* If nobody is reading the status output, don't terminate */ From 317175da08aedf80f0bfaf71849feea531872a88 Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Fri, 31 Dec 2021 14:51:50 -0600 Subject: [PATCH 3/7] Newly launched or closed clients ALWAYS generate status update Prior to this change, if a client whose tag(s) are not currently selected is launched or killed, no update to status was printed and status bars being fed by printstatus() did not update newly active or newly inactive (but unselected) tags. --- dwl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dwl.c b/dwl.c index 8683462..fcd7700 100644 --- a/dwl.c +++ b/dwl.c @@ -1320,6 +1320,7 @@ mapnotify(struct wl_listener *listener, void *data) /* Set initial monitor, tags, floating status, and focus */ applyrules(c); + printstatus(); } void @@ -2290,6 +2291,7 @@ unmapnotify(struct wl_listener *listener, void *data) setmon(c, NULL, 0); wl_list_remove(&c->flink); wl_list_remove(&c->slink); + printstatus(); } void From f587b2fd2c9f5967b9e8ca99fe70fbc80fb6c220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arma=C3=ABl=20Gu=C3=A9neau?= Date: Sat, 8 Jan 2022 17:41:45 +0100 Subject: [PATCH 4/7] fix client_set_tiled, which was ignoring its "edges" argument --- client.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client.h b/client.h index 4fd1863..a6b3723 100644 --- a/client.h +++ b/client.h @@ -156,8 +156,7 @@ client_set_tiled(Client *c, uint32_t edges) if (client_is_x11(c)) return; #endif - wlr_xdg_toplevel_set_tiled(c->surface.xdg, WLR_EDGE_TOP | - WLR_EDGE_BOTTOM | WLR_EDGE_LEFT | WLR_EDGE_RIGHT); + wlr_xdg_toplevel_set_tiled(c->surface.xdg, edges); } static inline struct wlr_surface * From ac896a7df4bac35d43579b450f1e4eeabe7a9d44 Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Tue, 1 Feb 2022 18:58:32 -0600 Subject: [PATCH 5/7] Shift+6 generates XKB_KEY_asciicircum --- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 089aa37..738a3ca 100644 --- a/config.def.h +++ b/config.def.h @@ -96,7 +96,7 @@ static const Key keys[] = { TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2), TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3), TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4), - TAGKEYS( XKB_KEY_6, XKB_KEY_caret, 5), + TAGKEYS( XKB_KEY_6, XKB_KEY_asciicircum, 5), TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6), TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7), TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8), From d1ff1e6f75d9c53c953957b5c0a64e0bcb40008b Mon Sep 17 00:00:00 2001 From: Leonardo Hernandez Hernandez Date: Tue, 28 Sep 2021 18:08:52 -0500 Subject: [PATCH 6/7] remove typedef `Decoration` --- dwl.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dwl.c b/dwl.c index 36a3871..9f6a2e7 100644 --- a/dwl.c +++ b/dwl.c @@ -119,11 +119,6 @@ typedef struct { int isfullscreen; } Client; -typedef struct { - struct wl_listener request_mode; - struct wl_listener destroy; -} Decoration; - typedef struct { uint32_t mod; xkb_keysym_t keysym; From 3e6d584de107a3d555d652b55bf5227d03f2f957 Mon Sep 17 00:00:00 2001 From: Leonardo Hernandez Hernandez Date: Tue, 2 Nov 2021 17:09:54 -0600 Subject: [PATCH 7/7] update URL to wlroots project (GitHub->GitLab) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 79a7d8f..1389803 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Join us on our [Discord server](https://discord.gg/jJxZnrGPWN)! -dwl is a compact, hackable compositor for Wayland based on [wlroots](https://github.com/swaywm/wlroots). It is intended to fill the same space in the Wayland world that dwm does in X11, primarily in terms of philosophy, and secondarily in terms of functionality. Like dwm, dwl is: +dwl is a compact, hackable compositor for Wayland based on [wlroots](https://gitlab.freedesktop.org/wlroots/wlroots/). It is intended to fill the same space in the Wayland world that dwm does in X11, primarily in terms of philosophy, and secondarily in terms of functionality. Like dwm, dwl is: - Easy to understand, hack on, and extend with patches - One C source file (or a very small number) configurable via `config.h`