mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-20 10:45:33 -05:00
Check if the tray icon is visible before minimizing to it.
This commit is contained in:
parent
9e1ea264e2
commit
7839280cb3
1 changed files with 2 additions and 1 deletions
|
|
@ -446,7 +446,8 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||||
void MainWindow::changeEvent(QEvent *event)
|
void MainWindow::changeEvent(QEvent *event)
|
||||||
{
|
{
|
||||||
if ((event->type() == QEvent::WindowStateChange) && isMinimized()
|
if ((event->type() == QEvent::WindowStateChange) && isMinimized()
|
||||||
&& isTrayIconEnabled() && config()->get("GUI/MinimizeToTray").toBool())
|
&& isTrayIconEnabled() && m_trayIcon && m_trayIcon->isVisible()
|
||||||
|
&& config()->get("GUI/MinimizeToTray").toBool())
|
||||||
{
|
{
|
||||||
event->ignore();
|
event->ignore();
|
||||||
QTimer::singleShot(0, this, SLOT(hide()));
|
QTimer::singleShot(0, this, SLOT(hide()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue