Bug 652109 - SetProcessDPIAware is called regardless if the process is really DPI aware r=roc

This commit is contained in:
Jacek Caban 2011-06-02 14:38:27 +02:00
parent 99a4dc0b0b
commit 5816bc1751
2 changed files with 11 additions and 9 deletions

View File

@ -2751,6 +2751,17 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
#endif
#endif
#ifdef XP_WIN
// Vista API. Mozilla is DPI Aware.
typedef BOOL (*SetProcessDPIAwareFunc)(VOID);
SetProcessDPIAwareFunc setDPIAware = (SetProcessDPIAwareFunc)
GetProcAddress(LoadLibraryW(L"user32.dll"), "SetProcessDPIAware");
if (setDPIAware)
setDPIAware();
#endif
SetupErrorHandling(argv[0]);
#ifdef CAIRO_HAS_DWRITE_FONT

View File

@ -177,15 +177,6 @@ nsToolkit::Startup(HMODULE hModule)
VERIFY(::RegisterClassW(&wc) ||
GetLastError() == ERROR_CLASS_ALREADY_EXISTS);
// Vista API. Mozilla is DPI Aware.
typedef BOOL (*SetProcessDPIAwareFunc)(VOID);
SetProcessDPIAwareFunc setDPIAware = (SetProcessDPIAwareFunc)
GetProcAddress(LoadLibraryW(L"user32.dll"), "SetProcessDPIAware");
if (setDPIAware)
setDPIAware();
nsUXThemeData::Initialize();
}