Disable minimize to tray except for the ChatPage
This commit is contained in:
parent
4098cf6780
commit
72cba5d9eb
1 changed files with 5 additions and 1 deletions
|
|
@ -226,7 +226,11 @@ MainWindow::showChatPage(QString userid, QString homeserver, QString token)
|
|||
void
|
||||
MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if (isVisible() && userSettings_->isTrayEnabled()) {
|
||||
// Decide whether or not we should enable tray for the current page.
|
||||
bool pageSupportsTray =
|
||||
!welcome_page_->isVisible() && !login_page_->isVisible() && !register_page_->isVisible();
|
||||
|
||||
if (isVisible() && pageSupportsTray && userSettings_->isTrayEnabled()) {
|
||||
event->ignore();
|
||||
hide();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue