diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index b8fcfcda1cdc..ccc99d1785ff 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -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 diff --git a/widget/src/windows/nsToolkit.cpp b/widget/src/windows/nsToolkit.cpp index a15153d3b460..76c2b0eb9a65 100644 --- a/widget/src/windows/nsToolkit.cpp +++ b/widget/src/windows/nsToolkit.cpp @@ -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(); }