hiding, not destroying window on close on OS X, fixed app event filter

This commit is contained in:
John Preston
2016-02-10 14:39:48 +03:00
parent 19d395a946
commit f2c45df524
5 changed files with 23 additions and 12 deletions
+2 -2
View File
@@ -990,7 +990,7 @@ bool Window::eventFilter(QObject *obj, QEvent *evt) {
} else if (t == QEvent::MouseButtonRelease) {
Ui::hideStickerPreview();
}
if (obj == App::app()) {
if (obj == Application::instance()) {
if (t == QEvent::ApplicationActivate) {
psUserActionDone();
QTimer::singleShot(1, this, SLOT(checkHistoryActivation()));
@@ -1214,7 +1214,7 @@ void Window::toggleDisplayNotifyFromTray() {
}
void Window::closeEvent(QCloseEvent *e) {
if (MTP::authedId() && !Sandbox::isSavingSession() && minimizeToTray()) {
if (MTP::authedId() && !Sandbox::isSavingSession() && Ui::hideWindowNoQuit()) {
e->ignore();
} else {
App::quit();