Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.cpp
Show First 20 Lines • Show All 993 Lines • ▼ Show 20 Lines | #ifndef Q_OS_MAC // Ignored on Mac | ||||
if (e->type() == QEvent::WindowStateChange) { | if (e->type() == QEvent::WindowStateChange) { | ||||
if (clientModel && clientModel->getOptionsModel() && | if (clientModel && clientModel->getOptionsModel() && | ||||
clientModel->getOptionsModel()->getMinimizeToTray()) { | clientModel->getOptionsModel()->getMinimizeToTray()) { | ||||
QWindowStateChangeEvent *wsevt = | QWindowStateChangeEvent *wsevt = | ||||
static_cast<QWindowStateChangeEvent *>(e); | static_cast<QWindowStateChangeEvent *>(e); | ||||
if (!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized()) { | if (!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized()) { | ||||
QTimer::singleShot(0, this, SLOT(hide())); | QTimer::singleShot(0, this, SLOT(hide())); | ||||
e->ignore(); | e->ignore(); | ||||
} else if ((wsevt->oldState() & Qt::WindowMinimized) && | |||||
!isMinimized()) { | |||||
QTimer::singleShot(0, this, SLOT(show())); | |||||
e->ignore(); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
void BitcoinGUI::closeEvent(QCloseEvent *event) { | void BitcoinGUI::closeEvent(QCloseEvent *event) { | ||||
#ifndef Q_OS_MAC // Ignored on Mac | #ifndef Q_OS_MAC // Ignored on Mac | ||||
▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines |