From 270922bf61c0c610917fb07e49b47721c8afc35d Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 25 Jul 2009 22:53:33 +0200 Subject: [PATCH] =?UTF-8?q?Bugfix:=20Don=E2=80=99t=20crash=20on=20floating?= =?UTF-8?q?=20windows,=20set=20focus=20correctly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/manage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manage.c b/src/manage.c index 9ddcab42..83c27f99 100644 --- a/src/manage.c +++ b/src/manage.c @@ -415,10 +415,10 @@ void reparent_window(xcb_connection_t *conn, xcb_window_t child, xcb_map_window(conn, child); if (CUR_CELL->workspace->fullscreen_client == NULL && !new->dock) { /* Focus the new window if we’re not in fullscreen mode and if it is not a dock window */ - if (new->container->workspace->fullscreen_client == NULL) { + if (new->workspace->fullscreen_client == NULL) { if (!client_is_floating(new)) new->container->currently_focused = new; - if (new->container == CUR_CELL) + if (new->container == CUR_CELL || client_is_floating(new)) xcb_set_input_focus(conn, XCB_INPUT_FOCUS_POINTER_ROOT, new->child, XCB_CURRENT_TIME); } }