From f7e005eb834bd43dfcb74bc6d8e337b0a327105a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 21 Aug 2009 09:37:54 +0000 Subject: [PATCH] * Moved PrivateScreen.h header to headers/private/interface. * Desktop is now including it as well to be able to use the new B_CURRENT_WORKSPACE_INDEX constant. * Include order cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32558 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../private}/interface/PrivateScreen.h | 0 src/kits/interface/PrivateScreen.cpp | 9 +++-- src/kits/interface/Screen.cpp | 5 ++- src/servers/app/Desktop.cpp | 40 +++++++++---------- 4 files changed, 28 insertions(+), 26 deletions(-) rename {src/kits => headers/private}/interface/PrivateScreen.h (100%) diff --git a/src/kits/interface/PrivateScreen.h b/headers/private/interface/PrivateScreen.h similarity index 100% rename from src/kits/interface/PrivateScreen.h rename to headers/private/interface/PrivateScreen.h diff --git a/src/kits/interface/PrivateScreen.cpp b/src/kits/interface/PrivateScreen.cpp index 6ef3188ecb..dd57300a23 100644 --- a/src/kits/interface/PrivateScreen.cpp +++ b/src/kits/interface/PrivateScreen.cpp @@ -13,10 +13,7 @@ */ -#include "AppMisc.h" -#include "AppServerLink.h" -#include "PrivateScreen.h" -#include "ServerProtocol.h" +#include #include #include @@ -28,6 +25,10 @@ #include #include +#include +#include +#include + using namespace BPrivate; diff --git a/src/kits/interface/Screen.cpp b/src/kits/interface/Screen.cpp index 0ebc403378..7c75a55373 100644 --- a/src/kits/interface/Screen.cpp +++ b/src/kits/interface/Screen.cpp @@ -11,11 +11,12 @@ /*! BScreen lets you retrieve and change the display settings. */ -#include "PrivateScreen.h" - #include + #include +#include + using namespace BPrivate; diff --git a/src/servers/app/Desktop.cpp b/src/servers/app/Desktop.cpp index 4bf52158e1..d2c8a7b825 100644 --- a/src/servers/app/Desktop.cpp +++ b/src/servers/app/Desktop.cpp @@ -15,6 +15,23 @@ #include "Desktop.h" +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + #include "AppServer.h" #include "DesktopSettingsPrivate.h" #include "DrawingEngine.h" @@ -31,26 +48,11 @@ #include "Workspace.h" #include "WorkspacesView.h" -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - #if TEST_MODE # include "EventStream.h" #endif + //#define DEBUG_DESKTOP #ifdef DEBUG_DESKTOP # define STRACE(a) printf a @@ -1125,8 +1127,7 @@ status_t Desktop::SetScreenMode(int32 workspace, int32 id, const display_mode& mode, bool makeDefault) { - // ~0 is used as the current workspace in PrivateScreen - if (workspace == ~0) + if (workspace == B_CURRENT_WORKSPACE_INDEX) workspace = fCurrentWorkspace; if (workspace < 0 || workspace > kMaxWorkspaces) @@ -1184,8 +1185,7 @@ Desktop::SetScreenMode(int32 workspace, int32 id, const display_mode& mode, status_t Desktop::GetScreenMode(int32 workspace, int32 id, display_mode& mode) { - // ~0 is used as the current workspace in PrivateScreen - if (workspace == ~0) + if (workspace == B_CURRENT_WORKSPACE_INDEX) workspace = fCurrentWorkspace; if (workspace < 0 || workspace > kMaxWorkspaces)