fix: window blink on startup (#447)

This commit is contained in:
Noo6
2024-07-04 12:23:20 +08:00
committed by GitHub
parent 5ce13109b0
commit 43cebd0c04
2 changed files with 2 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ Future<void> _initApp() async {
final windowSize = Stores.setting.windowSize;
final hideTitleBar = Stores.setting.hideTitleBar.fetch();
SystemUIs.initDesktopWindow(
await SystemUIs.initDesktopWindow(
hideTitleBar: hideTitleBar,
size: windowSize.fetch().toSize(),
listener: WindowSizeListener(windowSize),

View File

@@ -117,7 +117,7 @@ bool Win32Window::CreateAndShow(const std::wstring& title,
double scale_factor = dpi / 96.0;
HWND window = CreateWindow(
window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE,
window_class, title.c_str(), WS_OVERLAPPEDWINDOW,
Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
Scale(size.width, scale_factor), Scale(size.height, scale_factor),
nullptr, nullptr, GetModuleHandle(nullptr), this);