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

This commit is contained in:
Leonardo Hernández Hernández 2023-10-09 22:37:36 -06:00
commit 8781f4dbf5
No known key found for this signature in database
GPG Key ID: E538897EE11B9624
1 changed files with 10 additions and 6 deletions

16
dwl.c
View File

@ -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();
}