2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 15:05:56 +00:00

Fixed Xcode build. When hiding fullscreen window first exit fullscreen.

This commit is contained in:
John Preston
2016-06-16 18:17:39 +03:00
parent fd91893b51
commit 8e78cfed85
11 changed files with 551 additions and 1498 deletions

View File

@@ -417,7 +417,9 @@ void MainWindow::onInactiveTimer() {
inactivePress(false);
}
void MainWindow::stateChanged(Qt::WindowState state) {
void MainWindow::onStateChanged(Qt::WindowState state) {
stateChangedHook(state);
psUserActionDone();
updateIsActive((state == Qt::WindowMinimized) ? Global::OfflineBlurTimeout() : Global::OnlineFocusTimeout());
@@ -1069,7 +1071,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *e) {
case QEvent::WindowStateChange:
if (obj == this) {
Qt::WindowState state = (windowState() & Qt::WindowMinimized) ? Qt::WindowMinimized : ((windowState() & Qt::WindowMaximized) ? Qt::WindowMaximized : ((windowState() & Qt::WindowFullScreen) ? Qt::WindowFullScreen : Qt::WindowNoState));
stateChanged(state);
onStateChanged(state);
}
break;
@@ -1107,7 +1109,7 @@ void MainWindow::mouseReleaseEvent(QMouseEvent *e) {
bool MainWindow::minimizeToTray() {
if (App::quitting() || !psHasTrayIcon()) return false;
hide();
closeWithoutDestroy();
if (cPlatform() == dbipWindows && trayIcon && !cSeenTrayTooltip()) {
trayIcon->showMessage(str_const_toString(AppName), lang(lng_tray_icon_text), QSystemTrayIcon::Information, 10000);
cSetSeenTrayTooltip(true);