From b0b03eedd34cb2043f2cc89bf779c76aaf2057be Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 7 Apr 2012 16:22:58 +0200 Subject: [PATCH 1/2] Force WM_TAKE_FOCUS event to be sent when clicking This fixes more problems with Eclipse. See also commit 1962c30dfb3baee0fb98589aca575ae54d1142e0 --- src/click.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/click.c b/src/click.c index f998818b..04f8d2ed 100644 --- a/src/click.c +++ b/src/click.c @@ -207,6 +207,7 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod if (ws != focused_workspace) workspace_show(ws); + focused_id = XCB_NONE; con_focus(con); /* 3: For floating containers, we also want to raise them on click. From 97d17f2f5b2324900fab669ed730eb711ba3fe6f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 22 Apr 2012 20:10:29 +0200 Subject: [PATCH 2/2] i3bar: Bugfix: Properly reparent tray clients before killing the bar window when outputs disappear Fixes: #655 --- i3bar/src/xcb.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index afcfaa39..ebc214bd 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -1055,18 +1055,8 @@ 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); @@ -1117,6 +1107,18 @@ void destroy_window(i3_output *output) { if (output->bar == XCB_NONE) { 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); output->bar = XCB_NONE; }