From: Michael Stapelberg Date: Tue, 16 Aug 2011 23:19:38 +0000 (+0200) Subject: i3bar: properly end the XEMBED protocol by reparenting the dock clients to root,... X-Git-Tag: 4.1~209^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1c2c22d11756ad7eeae0a628f0bfb2ef749c9bea;p=i3%2Fi3 i3bar: properly end the XEMBED protocol by reparenting the dock clients to root, flush connection before disconnecting --- diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index e35c4355..00d25272 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -990,15 +990,27 @@ void init_tray() { */ void clean_xcb() { i3_output *o_walk; + trayclient *trayclient; free_workspaces(); 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); + FREE(o_walk->trayclients); FREE(o_walk->workspaces); FREE(o_walk->name); } FREE_SLIST(outputs, i3_output); FREE(outputs); + xcb_flush(xcb_connection); xcb_disconnect(xcb_connection); ev_check_stop(main_loop, xcb_chk);