From 79dcc0d3271395fe1258d818718209254d846b1b Mon Sep 17 00:00:00 2001 From: Tobias Bengfort Date: Sat, 4 Sep 2021 13:46:58 +0200 Subject: reset cursor mode when grabc is unmapped --- dwl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dwl.c') 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; -- cgit v1.2.3 From ebfefa84bad5a930df4df85b150c27f1d4fe6de6 Mon Sep 17 00:00:00 2001 From: Humm Date: Wed, 13 Oct 2021 23:11:40 +0200 Subject: -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(+) (limited to 'dwl.c') 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 */ -- cgit v1.2.3 From 317175da08aedf80f0bfaf71849feea531872a88 Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Fri, 31 Dec 2021 14:51:50 -0600 Subject: 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(+) (limited to 'dwl.c') 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 -- cgit v1.2.3 From 3300f6c9114885160706e1599801b5000de1dd31 Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Tue, 18 Jan 2022 11:33:56 -0600 Subject: Upgrade for wlroots surface refactoring See [1] for details. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3412 --- dwl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index 8683462..5020a78 100644 --- a/dwl.c +++ b/dwl.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -2029,6 +2030,7 @@ setup(void) wlr_gamma_control_manager_v1_create(dpy); wlr_primary_selection_v1_device_manager_create(dpy); wlr_viewporter_create(dpy); + wlr_subcompositor_create(dpy); /* Initializes the interface used to implement urgency hints */ activation = wlr_xdg_activation_v1_create(dpy); -- cgit v1.2.3 From ed44bc0c9069e0b55a4765bca10a5ad87732f019 Mon Sep 17 00:00:00 2001 From: A Frederick Christensen Date: Wed, 2 Feb 2022 23:18:58 -0600 Subject: update wlr-output-layout-get-box --- dwl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index 8683462..ab34d56 100644 --- a/dwl.c +++ b/dwl.c @@ -863,7 +863,7 @@ createmon(struct wl_listener *listener, void *data) * output (such as DPI, scale factor, manufacturer, etc). */ wlr_output_layout_add(output_layout, wlr_output, r->x, r->y); - sgeom = *wlr_output_layout_get_box(output_layout, NULL); + wlr_output_layout_get_box(output_layout, NULL, &sgeom); /* When adding monitors, the geometries of all monitors must be updated */ wl_list_for_each(m, &mons, link) { @@ -2305,7 +2305,7 @@ updatemons(struct wl_listener *listener, void *data) struct wlr_output_configuration_v1 *config = wlr_output_configuration_v1_create(); Monitor *m; - sgeom = *wlr_output_layout_get_box(output_layout, NULL); + wlr_output_layout_get_box(output_layout, NULL, &sgeom); wl_list_for_each(m, &mons, link) { struct wlr_output_configuration_head_v1 *config_head = wlr_output_configuration_head_v1_create(config, m->wlr_output); @@ -2314,7 +2314,8 @@ updatemons(struct wl_listener *listener, void *data) /* TODO: move focus if selmon is disabled */ /* Get the effective monitor geometry to use for surfaces */ - m->m = m->w = *wlr_output_layout_get_box(output_layout, m->wlr_output); + wlr_output_layout_get_box(output_layout, m->wlr_output, &(m->m)); + wlr_output_layout_get_box(output_layout, m->wlr_output, &(m->w)); /* Calculate the effective monitor geometry to use for clients */ arrangelayers(m); /* Don't move clients to the left output when plugging monitors */ -- cgit v1.2.3 From d1ff1e6f75d9c53c953957b5c0a64e0bcb40008b Mon Sep 17 00:00:00 2001 From: Leonardo Hernandez Hernandez Date: Tue, 28 Sep 2021 18:08:52 -0500 Subject: remove typedef `Decoration` --- dwl.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'dwl.c') 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; -- cgit v1.2.3 From 230d3432e9633da09a31ed933d8bcaff491db807 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Sat, 5 Mar 2022 21:07:25 -0600 Subject: wlr_virtual_keyboard_v1 now has its own wlr_keyboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit which has its own wlr_input_device Signed-off-by: Leonardo Hernández Hernández --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index ec4beb2..fcb00da 100644 --- a/dwl.c +++ b/dwl.c @@ -2375,7 +2375,7 @@ void virtualkeyboard(struct wl_listener *listener, void *data) { struct wlr_virtual_keyboard_v1 *keyboard = data; - struct wlr_input_device *device = &keyboard->input_device; + struct wlr_input_device *device = &keyboard->keyboard.base; createkeyboard(device); } -- cgit v1.2.3