mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
systray: allow systray icons to survive a restart by handing systray icons over to the root window before destroying the systray window
This commit is contained in:
parent
82c72835f6
commit
39fde74dfd
3
dwm.c
3
dwm.c
@ -1234,9 +1234,6 @@ cleanup(void)
|
|||||||
removesystrayicon(systray->icons);
|
removesystrayicon(systray->icons);
|
||||||
if (systray->win) {
|
if (systray->win) {
|
||||||
XUnmapWindow(dpy, systray->win);
|
XUnmapWindow(dpy, systray->win);
|
||||||
#if RESTARTSIG_PATCH
|
|
||||||
if (!restart)
|
|
||||||
#endif // RESTARTSIG_PATCH
|
|
||||||
XDestroyWindow(dpy, systray->win);
|
XDestroyWindow(dpy, systray->win);
|
||||||
}
|
}
|
||||||
free(systray);
|
free(systray);
|
||||||
|
@ -111,6 +111,7 @@ removesystrayicon(Client *i)
|
|||||||
for (ii = &systray->icons; *ii && *ii != i; ii = &(*ii)->next);
|
for (ii = &systray->icons; *ii && *ii != i; ii = &(*ii)->next);
|
||||||
if (ii)
|
if (ii)
|
||||||
*ii = i->next;
|
*ii = i->next;
|
||||||
|
XReparentWindow(dpy, i->win, root, 0, 0);
|
||||||
free(i);
|
free(i);
|
||||||
drawbarwin(systray->bar);
|
drawbarwin(systray->bar);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user