mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-02 11:36:18 -04:00
Windows: Prevent white flicker when showing main window (#9637)
* Fixes #9603
This commit is contained in:
parent
534b61e9e8
commit
b612476c56
3 changed files with 32 additions and 7 deletions
12
src/main.cpp
12
src/main.cpp
|
@ -182,6 +182,10 @@ int main(int argc, char** argv)
|
|||
Application::bootstrap();
|
||||
|
||||
MainWindow mainWindow;
|
||||
#ifdef Q_OS_WIN
|
||||
// Qt Hack - Prevent white flicker when showing window
|
||||
mainWindow.setProperty("windowOpacity", 0.0);
|
||||
#endif
|
||||
|
||||
// Disable screen capture if not explicitly allowed
|
||||
// This ensures any top-level windows (Main Window, Modal Dialogs, etc.) are excluded from screenshots
|
||||
|
@ -203,6 +207,14 @@ int main(int argc, char** argv)
|
|||
mainWindow.openDatabase(filename, password, parser.value(keyfileOption));
|
||||
}
|
||||
|
||||
// start minimized if configured
|
||||
if (config()->get(Config::GUI_MinimizeOnStartup).toBool()) {
|
||||
mainWindow.hideWindow();
|
||||
} else {
|
||||
mainWindow.bringToFront();
|
||||
Application::processEvents();
|
||||
}
|
||||
|
||||
int exitCode = Application::exec();
|
||||
|
||||
// Check if restart was requested
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue