Author: anevilyak Date: 2011-01-02 17:04:15 +0100 (Sun, 02 Jan 2011) New Revision: 40070 Changeset: http://dev.haiku-os.org/changeset/40070 Ticket: http://dev.haiku-os.org/ticket/7057 Modified: haiku/trunk/src/servers/app/Desktop.cpp Log: The cmd+` shortcut wasn't taking into account if the user was currently holding a window with the mouse, and as such didn't take it along to the new workspace as the cmd+F# shortcuts do. Fixes #7057. Modified: haiku/trunk/src/servers/app/Desktop.cpp =================================================================== --- haiku/trunk/src/servers/app/Desktop.cpp 2011-01-02 14:44:33 UTC (rev 40069) +++ haiku/trunk/src/servers/app/Desktop.cpp 2011-01-02 16:04:15 UTC (rev 40070) @@ -189,6 +189,8 @@ return B_SKIP_MESSAGE; } + bool takeWindow = (modifiers & B_SHIFT_KEY) != 0 + || fDesktop->MouseEventWindow() != NULL; if (key >= B_F1_KEY && key <= B_F12_KEY) { // workspace change @@ -201,8 +203,6 @@ { STRACE(("Set Workspace %ld\n", key - 1)); - bool takeWindow = (modifiers & B_SHIFT_KEY) != 0 - || fDesktop->MouseEventWindow() != NULL; fDesktop->SetWorkspaceAsync(key - B_F1_KEY, takeWindow); return B_SKIP_MESSAGE; } @@ -210,7 +210,7 @@ && (modifiers & (B_COMMAND_KEY | B_CONTROL_KEY | B_OPTION_KEY)) == B_COMMAND_KEY) { // switch to previous workspace (command + `) - fDesktop->SetWorkspaceAsync(-1, (modifiers & B_SHIFT_KEY) != 0); + fDesktop->SetWorkspaceAsync(-1, takeWindow); return B_SKIP_MESSAGE; } }