From 5979162878884386c7c0e147b02222ea9a1c6871 Mon Sep 17 00:00:00 2001 From: "Alexey I. Froloff" Date: Sun, 29 Mar 2009 04:14:36 +0400 Subject: [PATCH] Fix race condition during workspace changes When changing workspaces, after focusing new window, wmaker handles all pending events. If it receives another change-workspace combination, you may end up with a workspace without any focused window. Ctrf-F1 and Ctrl-F2 used to switch to 1st and 2nd workspaces. Hold Ctrl and press F1 and F2 almost at the same time. This patch ignores all change-workspace commands while workspace change is in progress. See also https://bugzilla.altlinux.org/show_bug.cgi?id=7230 [crmafra: Thanks to Alexey I. Froloff for the above explanation] --- src/workspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workspace.c b/src/workspace.c index 718bb463..b45d1691 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -439,7 +439,7 @@ static void showWorkspaceName(WScreen * scr, int workspace) void wWorkspaceChange(WScreen *scr, int workspace) { - if (scr->flags.startup || scr->flags.startup2) + if (scr->flags.startup || scr->flags.startup2 || scr->flags.ignore_focus_events) return; if (workspace != scr->current_workspace)