[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.

svn path=/trunk/; revision=68580
This commit is contained in:
David Quintana 2015-07-29 01:29:29 +00:00
parent 184bf48b97
commit 0dfcc314e5
3 changed files with 22 additions and 12 deletions

View file

@ -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<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 @@ 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;

View file

@ -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>

View file

@ -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)