Author: dquintana Date: Wed Jul 29 01:29:29 2015 New Revision: 68580
URL: http://svn.reactos.org/svn/reactos?rev=68580&view=rev Log: [EXPLORER] * Rework the WIN7_COMPAT_MODE into actually just disabling the incompatible functions, and introduce WIN7_DEBUG_MODE which does the rest of the "hacks" I used to ease development.
Modified: trunk/reactos/base/shell/explorer/explorer.cpp trunk/reactos/base/shell/explorer/precomp.h trunk/reactos/base/shell/explorer/traywnd.cpp
Modified: trunk/reactos/base/shell/explorer/explorer.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explore... ============================================================================== --- trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] Wed Jul 29 01:29:29 2015 @@ -59,7 +59,7 @@ } }
-#if !WIN7_COMPAT_MODE +#if !WIN7_DEBUG_MODE static BOOL SetShellReadyEvent(IN LPCTSTR lpEventName) { @@ -95,7 +95,9 @@ 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 @@ InitCommonControls(); OleInitialize(NULL);
+#if !WIN7_DEBUG_MODE + ProcessStartupItems(); +#endif + #if !WIN7_COMPAT_MODE - ProcessStartupItems(); - /* Initialize shell dde support */ _ShellDDEInit(TRUE); #endif @@ -156,7 +160,7 @@ CComPtr<ITrayWindow> 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 @@ 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 @@ 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;
Modified: trunk/reactos/base/shell/explorer/precomp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/precomp... ============================================================================== --- trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/precomp.h [iso-8859-1] Wed Jul 29 01:29:29 2015 @@ -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 <stdio.h> #include <tchar.h>
Modified: trunk/reactos/base/shell/explorer/traywnd.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traywnd... ============================================================================== --- trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] Wed Jul 29 01:29:29 2015 @@ -986,7 +986,7 @@
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 @@
/* FIXME: Are there more flags? */
-#if WIN7_COMPAT_MODE +#if WIN7_DEBUG_MODE m_Position = ABE_LEFT; #else if (sr.Position > ABE_BOTTOM)