Merge branch 'master' into next

This commit is contained in:
Michael Stapelberg 2012-04-22 20:11:25 +02:00
commit 54222d5617
1 changed files with 12 additions and 10 deletions

View File

@ -1047,18 +1047,8 @@ void init_tray() {
*/ */
void clean_xcb() { void clean_xcb() {
i3_output *o_walk; i3_output *o_walk;
trayclient *trayclient;
free_workspaces(); free_workspaces();
SLIST_FOREACH(o_walk, outputs, slist) { SLIST_FOREACH(o_walk, outputs, slist) {
TAILQ_FOREACH(trayclient, o_walk->trayclients, tailq) {
/* Unmap, then reparent (to root) the tray client windows */
xcb_unmap_window(xcb_connection, trayclient->win);
xcb_reparent_window(xcb_connection,
trayclient->win,
xcb_root,
0,
0);
}
destroy_window(o_walk); destroy_window(o_walk);
FREE(o_walk->trayclients); FREE(o_walk->trayclients);
FREE(o_walk->workspaces); FREE(o_walk->workspaces);
@ -1108,6 +1098,18 @@ void destroy_window(i3_output *output) {
if (output->bar == XCB_NONE) { if (output->bar == XCB_NONE) {
return; return;
} }
trayclient *trayclient;
TAILQ_FOREACH(trayclient, output->trayclients, tailq) {
/* Unmap, then reparent (to root) the tray client windows */
xcb_unmap_window(xcb_connection, trayclient->win);
xcb_reparent_window(xcb_connection,
trayclient->win,
xcb_root,
0,
0);
}
xcb_destroy_window(xcb_connection, output->bar); xcb_destroy_window(xcb_connection, output->bar);
output->bar = XCB_NONE; output->bar = XCB_NONE;
} }