mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-16 07:21:04 -04:00
Fix flickering & not restoring from tray on some Linuxes (#1595).
Fix/work around KeePassXC flickering and not restoring from tray on some Linux systems, which happens if the window is hidden and minimized by code at the same time (see issue #1595).
This commit is contained in:
parent
f620ad979f
commit
319c8201be
2 changed files with 1 additions and 4 deletions
|
@ -971,9 +971,6 @@ void MainWindow::trayIconTriggered(QSystemTrayIcon::ActivationReason reason)
|
||||||
void MainWindow::hideWindow()
|
void MainWindow::hideWindow()
|
||||||
{
|
{
|
||||||
saveWindowInformation();
|
saveWindowInformation();
|
||||||
#ifndef Q_OS_MAC
|
|
||||||
setWindowState(windowState() | Qt::WindowMinimized);
|
|
||||||
#endif
|
|
||||||
QTimer::singleShot(0, this, SLOT(hide()));
|
QTimer::singleShot(0, this, SLOT(hide()));
|
||||||
|
|
||||||
if (config()->get("security/lockdatabaseminimize").toBool()) {
|
if (config()->get("security/lockdatabaseminimize").toBool()) {
|
||||||
|
|
|
@ -127,7 +127,7 @@ int main(int argc, char** argv)
|
||||||
// start minimized if configured
|
// start minimized if configured
|
||||||
bool minimizeOnStartup = config()->get("GUI/MinimizeOnStartup").toBool();
|
bool minimizeOnStartup = config()->get("GUI/MinimizeOnStartup").toBool();
|
||||||
bool minimizeToTray = config()->get("GUI/MinimizeToTray").toBool();
|
bool minimizeToTray = config()->get("GUI/MinimizeToTray").toBool();
|
||||||
if (minimizeOnStartup) {
|
if (minimizeOnStartup && !minimizeToTray) {
|
||||||
mainWindow.setWindowState(Qt::WindowMinimized);
|
mainWindow.setWindowState(Qt::WindowMinimized);
|
||||||
}
|
}
|
||||||
if (!(minimizeOnStartup && minimizeToTray)) {
|
if (!(minimizeOnStartup && minimizeToTray)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue