diff --git a/reactos/base/shell/explorer/explorer.cpp b/reactos/base/shell/explorer/explorer.cpp index e96f632f17e..4d869d181be 100644 --- a/reactos/base/shell/explorer/explorer.cpp +++ b/reactos/base/shell/explorer/explorer.cpp @@ -59,7 +59,7 @@ static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize) } } -#if !WIN7_COMPAT_MODE +#if !WIN7_DEBUG_MODE static BOOL SetShellReadyEvent(IN LPCTSTR lpEventName) { @@ -95,7 +95,9 @@ HideMinimizedWindows(IN BOOL bHide) if (!SystemParametersInfo(SPI_SETMINIMIZEDMETRICS, sizeof(mm), &mm, 0)) ERR("SystemParametersInfo failed with %lu\n", GetLastError()); } +#endif +#if !WIN7_COMPAT_MODE static INT StartWithCommandLine(IN HINSTANCE hInstance) { @@ -140,9 +142,11 @@ StartWithDesktop(IN HINSTANCE hInstance) InitCommonControls(); OleInitialize(NULL); -#if !WIN7_COMPAT_MODE +#if !WIN7_DEBUG_MODE ProcessStartupItems(); +#endif +#if !WIN7_COMPAT_MODE /* Initialize shell dde support */ _ShellDDEInit(TRUE); #endif @@ -156,7 +160,7 @@ StartWithDesktop(IN HINSTANCE hInstance) CComPtr Tray; CreateTrayWindow(&Tray); -#if !WIN7_COMPAT_MODE +#if !WIN7_DEBUG_MODE /* This not only hides the minimized window captions in the bottom left screen corner, but is also needed in order to receive HSHELL_* notification messages (which are required for taskbar @@ -175,12 +179,12 @@ StartWithDesktop(IN HINSTANCE hInstance) if (Tray != NULL) { TrayMessageLoop(Tray); -#if !WIN7_COMPAT_MODE +#if !WIN7_DEBUG_MODE HideMinimizedWindows(FALSE); #endif } -#if !WIN7_COMPAT_MODE +#if !WIN7_DEBUG_MODE if (hShellDesktop != NULL) DesktopDestroyShellWindow(hShellDesktop); #endif @@ -201,17 +205,17 @@ _tWinMain(IN HINSTANCE hInstance, IN LPTSTR lpCmdLine, IN INT nCmdShow) { -#if !WIN7_COMPAT_MODE - BOOL CreateShellDesktop = FALSE; - - TRACE("Explorer starting... Commandline: %S\n", lpCmdLine); - /* * Set our shutdown parameters: we want to shutdown the very last, * but before any TaskMgr instance (which has a shutdown level of 1). */ SetProcessShutdownParameters(2, 0); +#if !WIN7_COMPAT_MODE + BOOL CreateShellDesktop = FALSE; + + TRACE("Explorer starting... Commandline: %S\n", lpCmdLine); + if (GetShellWindow() == NULL) CreateShellDesktop = TRUE; diff --git a/reactos/base/shell/explorer/precomp.h b/reactos/base/shell/explorer/precomp.h index 1205e7d8d3d..3b8954f095d 100644 --- a/reactos/base/shell/explorer/precomp.h +++ b/reactos/base/shell/explorer/precomp.h @@ -2,6 +2,12 @@ #define _EXPLORER_PRECOMP__H_ #define WIN7_COMPAT_MODE 0 +#define WIN7_DEBUG_MODE 0 + +#if WIN7_DEBUG_MODE && !WIN7_COMPAT_MODE +#undef WIN7_COMPAT_MODE +#define WIN7_COMPAT_MODE 1 +#endif #include #include diff --git a/reactos/base/shell/explorer/traywnd.cpp b/reactos/base/shell/explorer/traywnd.cpp index 5ca04fa2418..120d7c59935 100644 --- a/reactos/base/shell/explorer/traywnd.cpp +++ b/reactos/base/shell/explorer/traywnd.cpp @@ -986,7 +986,7 @@ ChangePos: VOID ResizeWorkArea() { -#if !WIN7_COMPAT_MODE +#if !WIN7_DEBUG_MODE RECT rcTray, rcWorkArea; /* If monitor has changed then fix the previous monitors work area */ @@ -1098,7 +1098,7 @@ ChangePos: /* FIXME: Are there more flags? */ -#if WIN7_COMPAT_MODE +#if WIN7_DEBUG_MODE m_Position = ABE_LEFT; #else if (sr.Position > ABE_BOTTOM)