mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Merge 8c9ec7ec6a
into feacfb0627
This commit is contained in:
commit
bfde3c214f
1 changed files with 17 additions and 1 deletions
|
@ -418,7 +418,23 @@ MainWindow::MainWindow(IGUIApplication *app, const WindowState initialState, con
|
||||||
if (!isVisible())
|
if (!isVisible())
|
||||||
activate();
|
activate();
|
||||||
#else
|
#else
|
||||||
toggleVisibility();
|
if (isActiveWindow())
|
||||||
|
{
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m_uiLocked && !unlockUI()) // Ask for UI lock password
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Make sure the window is not minimized
|
||||||
|
setWindowState((windowState() & ~Qt::WindowMinimized) | Qt::WindowActive);
|
||||||
|
|
||||||
|
// Then show it
|
||||||
|
show();
|
||||||
|
raise();
|
||||||
|
activateWindow();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue