From aace42cd7a23b7c0c6116b9591e00d4998858e06 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 10 Apr 2009 21:29:25 +0200 Subject: [PATCH] =?utf8?q?Bugfix:=20Don=E2=80=99t=20crash=20anymore=20when?= =?utf8?q?=20moving=20focus=20to=20another=20screen=20(Thanks,=20Mirko!)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes ticket #24. The crash appeared only under special conditions: - The screen on which you switch to must be empty or at least not as full as the screen on which you were before. - You switch focus using your mouse. - You previously selected a column/row which is not availably on the destination screen (for example (1,1) and switching to an empty screen). --- src/handlers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/handlers.c b/src/handlers.c index faca13bc..47766623 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -173,7 +173,11 @@ int handle_enter_notify(void *ignored, xcb_connection_t *conn, xcb_enter_notify_ LOG("ERROR: No such screen\n"); return 0; } + c_ws->current_row = current_row; + c_ws->current_col = current_col; c_ws = &workspaces[screen->current_workspace]; + current_row = c_ws->current_row; + current_col = c_ws->current_col; LOG("We're now on virtual screen number %d\n", screen->num); return 1; } -- 2.39.5