From 06d9230a9611ab70041c7dbb1bf3d9e9ea497271 Mon Sep 17 00:00:00 2001 From: Ben Jargowsky Date: Wed, 11 May 2022 14:30:10 +0200 Subject: Run focusclient when switching to monocle layout --- dwl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index 8088d9f..55e9f35 100644 --- a/dwl.c +++ b/dwl.c @@ -1405,6 +1405,7 @@ monocle(Monitor *m) continue; resize(c, m->w.x, m->w.y, m->w.width, m->w.height, 0); } + focusclient(focustop(m), 1); } void -- cgit v1.2.3 From 3c11ad9aa6d3d8d69c926d5c767aedfdf1cd03b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Sat, 14 May 2022 00:24:06 -0500 Subject: fix segfault when dragging chromium tabs --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index 55e9f35..abff38a 100644 --- a/dwl.c +++ b/dwl.c @@ -1121,7 +1121,7 @@ focusclient(Client *c, int lift) } else { Client *w; struct wlr_scene_node *node = old->data; - if ((w = node->data)) + if (old->role_data && (w = node->data)) for (i = 0; i < 4; i++) wlr_scene_rect_set_color(w->border[i], bordercolor); -- cgit v1.2.3 From 8870ba0bb8106a4a367bd8dee78178891b8c19db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?= Date: Tue, 17 May 2022 14:38:18 -0500 Subject: implement urgency hints for xwayland clients --- dwl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index abff38a..90a2789 100644 --- a/dwl.c +++ b/dwl.c @@ -112,6 +112,7 @@ typedef struct { #ifdef XWAYLAND struct wl_listener activate; struct wl_listener configure; + struct wl_listener set_hints; #endif int bw; unsigned int tags; @@ -358,6 +359,7 @@ static void activatex11(struct wl_listener *listener, void *data); static void configurex11(struct wl_listener *listener, void *data); static void createnotifyx11(struct wl_listener *listener, void *data); static Atom getatom(xcb_connection_t *xc, const char *name); +static void sethints(struct wl_listener *listener, void *data); static void xwaylandready(struct wl_listener *listener, void *data); static struct wl_listener new_xwayland_surface = {.notify = createnotifyx11}; static struct wl_listener xwayland_ready = {.notify = xwaylandready}; @@ -1046,6 +1048,7 @@ destroynotify(struct wl_listener *listener, void *data) #ifdef XWAYLAND if (c->type != XDGShell) { wl_list_remove(&c->configure.link); + wl_list_remove(&c->set_hints.link); wl_list_remove(&c->activate.link); } else #endif @@ -2460,6 +2463,7 @@ createnotifyx11(struct wl_listener *listener, void *data) LISTEN(&xwayland_surface->events.request_activate, &c->activate, activatex11); LISTEN(&xwayland_surface->events.request_configure, &c->configure, configurex11); + LISTEN(&xwayland_surface->events.set_hints, &c->set_hints, sethints); LISTEN(&xwayland_surface->events.set_title, &c->set_title, updatetitle); LISTEN(&xwayland_surface->events.destroy, &c->destroy, destroynotify); LISTEN(&xwayland_surface->events.request_fullscreen, &c->fullscreen, @@ -2479,6 +2483,16 @@ getatom(xcb_connection_t *xc, const char *name) return atom; } +void +sethints(struct wl_listener *listener, void *data) +{ + Client *c = wl_container_of(listener, c, set_hints); + if (c != selclient()) { + c->isurgent = c->surface.xwayland->hints_urgency; + printstatus(); + } +} + void xwaylandready(struct wl_listener *listener, void *data) { -- cgit v1.2.3