systray: allow systray icons to survive a restart by handing systray icons over to the root window before destroying the systray window

pull/271/head
bakkeby 2 years ago
parent 82c72835f6
commit 39fde74dfd

@ -1234,9 +1234,6 @@ cleanup(void)
removesystrayicon(systray->icons);
if (systray->win) {
XUnmapWindow(dpy, systray->win);
#if RESTARTSIG_PATCH
if (!restart)
#endif // RESTARTSIG_PATCH
XDestroyWindow(dpy, systray->win);
}
free(systray);

@ -111,6 +111,7 @@ removesystrayicon(Client *i)
for (ii = &systray->icons; *ii && *ii != i; ii = &(*ii)->next);
if (ii)
*ii = i->next;
XReparentWindow(dpy, i->win, root, 0, 0);
free(i);
drawbarwin(systray->bar);
}

Loading…
Cancel
Save