Fix a bug where the window would sometimes not show up after restoring from tray
After this patch, the window will not have the window manager's restore animation anymore, but will be reliably shown
This commit is contained in:
@@ -728,18 +728,19 @@ void MainWindow::toggleWindow()
|
||||
{
|
||||
if ((QApplication::activeWindow() == this) && isVisible() && !isMinimized()) {
|
||||
setWindowState(windowState() | Qt::WindowMinimized);
|
||||
hide();
|
||||
|
||||
QTimer::singleShot(0, this, SLOT(hide()));
|
||||
|
||||
if (config()->get("security/lockdatabaseminimize").toBool()) {
|
||||
m_ui->tabWidget->lockDatabases();
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
ensurePolished();
|
||||
show();
|
||||
setWindowState(windowState() & ~Qt::WindowMinimized);
|
||||
raise();
|
||||
activateWindow();
|
||||
QTimer::singleShot(0, this, [this]() {
|
||||
show();
|
||||
raise();
|
||||
activateWindow();
|
||||
});
|
||||
|
||||
#if defined(Q_OS_LINUX) && ! defined(QT_NO_DBUS)
|
||||
// re-register global D-Bus menu (needed on Ubuntu with Unity)
|
||||
|
||||
Reference in New Issue
Block a user