forked from mirror/dwl
Merge remote-tracking branch 'upstream/main' into wlroots-next
This commit is contained in:
commit
8781f4dbf5
1 changed files with 10 additions and 6 deletions
16
dwl.c
16
dwl.c
|
@ -56,7 +56,7 @@
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
#include <wlr/xwayland.h>
|
#include <wlr/xwayland.h>
|
||||||
#include <X11/Xlib.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_icccm.h>
|
#include <xcb/xcb_icccm.h>
|
||||||
#endif
|
#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 configurex11(struct wl_listener *listener, void *data);
|
||||||
static void createnotifyx11(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 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 sethints(struct wl_listener *listener, void *data);
|
||||||
static void xwaylandready(struct wl_listener *listener, void *data);
|
static void xwaylandready(struct wl_listener *listener, void *data);
|
||||||
static struct wlr_xwayland *xwayland;
|
static struct wlr_xwayland *xwayland;
|
||||||
static Atom netatom[NetLast];
|
static xcb_atom_t netatom[NetLast];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* configuration, allows nested code to access above variables */
|
/* 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);
|
wl_list_remove(&c->unmap.link);
|
||||||
}
|
}
|
||||||
|
|
||||||
Atom
|
xcb_atom_t
|
||||||
getatom(xcb_connection_t *xc, const char *name)
|
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_reply_t *reply;
|
||||||
xcb_intern_atom_cookie_t cookie = xcb_intern_atom(xc, 0, strlen(name), name);
|
xcb_intern_atom_cookie_t cookie = xcb_intern_atom(xc, 0, strlen(name), name);
|
||||||
if ((reply = xcb_intern_atom_reply(xc, cookie, NULL)))
|
if ((reply = xcb_intern_atom_reply(xc, cookie, NULL)))
|
||||||
|
@ -2807,11 +2807,15 @@ void
|
||||||
sethints(struct wl_listener *listener, void *data)
|
sethints(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
Client *c = wl_container_of(listener, c, set_hints);
|
Client *c = wl_container_of(listener, c, set_hints);
|
||||||
|
struct wlr_surface *surface = client_surface(c);
|
||||||
if (c == focustop(selmon))
|
if (c == focustop(selmon))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
client_set_border_color(c, urgentcolor);
|
|
||||||
c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints);
|
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();
|
printstatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue