Skip to content

Commit

Permalink
fix: window blink on startup (#447)
Browse files Browse the repository at this point in the history
  • Loading branch information
No06 authored Jul 4, 2024
1 parent 5ce1310 commit 43cebd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion windows/runner/win32_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 43cebd0

Please sign in to comment.