From a268327a483206affaff74edb077a2a65e97e5bd Mon Sep 17 00:00:00 2001 From: Thomas Otto Date: Sun, 18 Aug 2013 10:20:33 +0200 Subject: [PATCH] wmaker: reset "ignore workspace change" flag in all cases When an application steals focus and switches workspaces autonomously, "ignore workspace change" does not get reset. Since I didn't want to track down the exact case I thought it best to reset the flag in all cases, as it probably should be. > How did you discover this? What was the behavior you saw? After saving files in avidemux, the "Done" dialog pops up, and with it the entire application is moved to the current workspace. After this, using the mousewheel on the root window or using the appropriate key combination does not change the workspace anymore, only using the arrows on the clip works. And, as mentioned on the mailing list, just starting emacs (22.3.1) also provokes this bug. Using a Debian/Sid system btw. --- src/actions.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/actions.c b/src/actions.c index b4eda5f0..5ceb9d57 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1211,8 +1211,10 @@ void wDeiconifyWindow(WWindow *wwin) if (!netwm_hidden) wWindowChangeWorkspace(wwin, wwin->screen_ptr->current_workspace); - if (!wwin->flags.miniaturized) + if (!wwin->flags.miniaturized) { + ignore_wks_change = 0; return; + } if (wwin->transient_for != None && wwin->transient_for != wwin->screen_ptr->root_win) { WWindow *owner = recursiveTransientFor(wwin); @@ -1221,6 +1223,7 @@ void wDeiconifyWindow(WWindow *wwin) wDeiconifyWindow(owner); wSetFocusTo(wwin->screen_ptr, wwin); wRaiseFrame(wwin->frame->core); + ignore_wks_change = 0; return; } } @@ -1308,8 +1311,10 @@ void wDeiconifyWindow(WWindow *wwin) ProcessPendingEvents(); /* the window can disappear while ProcessPendingEvents() runs */ - if (!wWindowFor(clientwin)) + if (!wWindowFor(clientwin)) { + ignore_wks_change = 0; return; + } } #endif } -- 2.11.4.GIT