mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
chore: move dark mode activation to main_win.cc (#35529)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "base/i18n/icu_util.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/win/dark_mode_support.h"
|
||||
#include "base/win/windows_version.h"
|
||||
#include "components/browser_watcher/exit_code_watcher_win.h"
|
||||
#include "components/crash/core/app/crash_switches.h"
|
||||
@@ -219,6 +220,11 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
|
||||
return crashpad_status;
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// access ui native theme here to prevent blocking calls later
|
||||
base::win::AllowDarkModeForApp(true);
|
||||
#endif
|
||||
|
||||
#if defined(ARCH_CPU_32_BITS)
|
||||
// Intentionally crash if converting to a fiber failed.
|
||||
CHECK_EQ(fiber_status, FiberStatus::kSuccess);
|
||||
|
||||
Reference in New Issue
Block a user