From eb6bc5d5ff053e65fa99ba91504b4d683ea7bb43 Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Mon, 28 Mar 2005 21:32:24 +0000 Subject: [PATCH] Started to implement workspace support. Surprisingly, with this small change changing workspaces actualy works. An it works quite well I may add. :-) So happy the new window manager which I heavily tested actualy works inside app_server. :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12109 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/RootLayer.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/servers/app/RootLayer.cpp b/src/servers/app/RootLayer.cpp index c20f3a4b45..90e2fd9659 100644 --- a/src/servers/app/RootLayer.cpp +++ b/src/servers/app/RootLayer.cpp @@ -552,6 +552,8 @@ void RootLayer::SetActiveWorkspace(int32 index) } } + desktop->Unlock(); + if (ActiveWorkspace()->Focus()) { BMessage activateMsg(B_WINDOW_ACTIVATED); @@ -609,10 +611,6 @@ void RootLayer::SetActiveWorkspace(int32 index) // TODO: if the user is holding/moving a window, *IF* the window *is not* // in future active workspace, remove from curent one and place in // future active workspace. - - // RootLayer::Invalidate(&RootLayer's fFullVisible) - - desktop->Unlock(); } void RootLayer::SetWinBorderWorskpaces(WinBorder *winBorder, uint32 newWksIndex) @@ -1360,7 +1358,19 @@ void RootLayer::KeyboardEventHandler(int32 code, BPortLink& msg) { STRACE(("Set Workspace %ld\n",scancode-1)); //TODO: SetWorkspace in KeyboardEventHandler - //SetWorkspace(scancode-2); + if (scancode - 1 > 0 && scancode -1 <= fWsCount + && scancode - 2 != fActiveWksIndex) + { + WinBorder *exFocus = FocusWinBorder(); + + SetActiveWorkspace(scancode-2); + + get_workspace_windows(); + + invalidate_layer(this, fFull); + + draw_window_tab(exFocus, FocusWinBorder()); + } if (string) free(string); break;