dwl

My patch set and modifications to dwl
git clone git://git.ethandl.dev/dwl
Log | Files | Refs | README | LICENSE

commit 8781f4dbf5bb4507239d29cd9ae8bb5c3fa0b2c5
parent b299e01e44d0277a254ba55a030a6d205133c50b
Author: Leonardo Hernández Hernández <leohdz172@proton.me>
Date:   Mon,  9 Oct 2023 22:37:36 -0600

Merge remote-tracking branch 'upstream/main' into wlroots-next

Diffstat:
Mdwl.c | 16++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/dwl.c b/dwl.c @@ -56,7 +56,7 @@ #include <xkbcommon/xkbcommon.h> #ifdef XWAYLAND #include <wlr/xwayland.h> -#include <X11/Xlib.h> +#include <xcb/xcb.h> #include <xcb/xcb_icccm.h> #endif @@ -382,11 +382,11 @@ static void associatex11(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 void dissociatex11(struct wl_listener *listener, void *data); -static Atom getatom(xcb_connection_t *xc, const char *name); +static xcb_atom_t 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 wlr_xwayland *xwayland; -static Atom netatom[NetLast]; +static xcb_atom_t netatom[NetLast]; #endif /* configuration, allows nested code to access above variables */ @@ -2790,10 +2790,10 @@ dissociatex11(struct wl_listener *listener, void *data) wl_list_remove(&c->unmap.link); } -Atom +xcb_atom_t getatom(xcb_connection_t *xc, const char *name) { - Atom atom = 0; + xcb_atom_t atom = 0; xcb_intern_atom_reply_t *reply; xcb_intern_atom_cookie_t cookie = xcb_intern_atom(xc, 0, strlen(name), name); if ((reply = xcb_intern_atom_reply(xc, cookie, NULL))) @@ -2807,11 +2807,15 @@ void sethints(struct wl_listener *listener, void *data) { Client *c = wl_container_of(listener, c, set_hints); + struct wlr_surface *surface = client_surface(c); if (c == focustop(selmon)) return; - client_set_border_color(c, urgentcolor); c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints); + + if (c->isurgent && surface && surface->mapped) + client_set_border_color(c, urgentcolor); + printstatus(); }