This patch fixes a subtle bug where if you move a window in the
workspace manager that was a window who had been saved as the focus
window for a workspace, switching to the old workspace would warp into
the workspace that the window had been moved into.


============================================================
--- workmgr.c   d6938559f7c47a48948f2620a7dbf3cb94ef4adc
+++ workmgr.c   3ccd7ce36042089407233bcdf1a944dfa9d24889
@@ -1447,6 +1447,12 @@ void ChangeOccupation (TwmWindow *tmp_wi
                RemoveWindowFromRegion (tmp_win);
                if (PlaceWindowInRegion (tmp_win, &final_x, &final_y))
                    XMoveWindow (dpy, tmp_win->frame, final_x, final_y);
+
+                /* If the window being moved workspaces was the window
+                   saved in focus, reset it for that workspace. */
+                if (Scr->SaveWorkspaceFocus && ws->save_focus ==
tmp_win) {
+                    ws->save_focus = NULL;
+                }
            }
            break;
        }

Reply via email to