mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
systray may not always exist
This commit is contained in:
parent
018721ca76
commit
260bd11a53
2
dwm.c
2
dwm.c
@ -2160,7 +2160,7 @@ maprequest(XEvent *e)
|
|||||||
|
|
||||||
#if BAR_SYSTRAY_PATCH
|
#if BAR_SYSTRAY_PATCH
|
||||||
Client *i;
|
Client *i;
|
||||||
if (showsystray && (i = wintosystrayicon(ev->window))) {
|
if (showsystray && systray && (i = wintosystrayicon(ev->window))) {
|
||||||
sendevent(i->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0, systray->win, XEMBED_EMBEDDED_VERSION);
|
sendevent(i->win, netatom[Xembed], StructureNotifyMask, CurrentTime, XEMBED_WINDOW_ACTIVATE, 0, systray->win, XEMBED_EMBEDDED_VERSION);
|
||||||
drawbarwin(systray->bar);
|
drawbarwin(systray->bar);
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ updatesystrayiconstate(Client *i, XPropertyEvent *ev)
|
|||||||
long flags;
|
long flags;
|
||||||
int code = 0;
|
int code = 0;
|
||||||
|
|
||||||
if (!showsystray || !i || ev->atom != xatom[XembedInfo] ||
|
if (!showsystray || !systray || !i || ev->atom != xatom[XembedInfo] ||
|
||||||
!(flags = getatomprop(i, xatom[XembedInfo])))
|
!(flags = getatomprop(i, xatom[XembedInfo])))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user