From 5c9b2476677acbc15d4b83ff11f22e93b453ab07 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sun, 2 Jan 2011 16:04:15 +0000 Subject: [PATCH] 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. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40070 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/Desktop.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index c64b870421..2028e9da67 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -189,6 +189,8 @@ KeyboardFilter::Filter(BMessage* message, EventTarget** _target, 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 @@ KeyboardFilter::Filter(BMessage* message, EventTarget** _target, { 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 @@ KeyboardFilter::Filter(BMessage* message, EventTarget** _target, && (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; } }