diff --git a/linphone-app/src/components/notifier/Notifier.cpp b/linphone-app/src/components/notifier/Notifier.cpp index 0a726c80b..89fab2433 100644 --- a/linphone-app/src/components/notifier/Notifier.cpp +++ b/linphone-app/src/components/notifier/Notifier.cpp @@ -212,7 +212,7 @@ void Notifier::showNotification (QObject *notification, int timeout) { // Destroy it after timeout. QObject::connect(timer, &QTimer::timeout, this, [this, notification]() { - deleteNotification(QVariant::fromValue(notification)); + deleteNotificationOnTimeout(QVariant::fromValue(notification)); }); // Called explicitly (by a click on notification for example) @@ -222,6 +222,16 @@ void Notifier::showNotification (QObject *notification, int timeout) { } // ----------------------------------------------------------------------------- +void Notifier::deleteNotificationOnTimeout(QVariant notification) { +#ifdef Q_OS_MACOS + for(auto w : QGuiApplication::topLevelWindows()){ + if( (w->windowState()&Qt::WindowFullScreen)==Qt::WindowFullScreen){ + w->requestActivate();// Used to get focus on fullscreens on Mac in order to avoid screen switching. + } + } +#endif + deleteNotification(notification); +} void Notifier::deleteNotification (QVariant notification) { mMutex->lock(); diff --git a/linphone-app/src/components/notifier/Notifier.hpp b/linphone-app/src/components/notifier/Notifier.hpp index 79b88209f..9e508617f 100644 --- a/linphone-app/src/components/notifier/Notifier.hpp +++ b/linphone-app/src/components/notifier/Notifier.hpp @@ -60,6 +60,7 @@ public: void notifyRecordingCompleted (const QString &filePath); public slots: + void deleteNotificationOnTimeout(QVariant notification); void deleteNotification (QVariant notification); private: diff --git a/linphone-app/ui/views/App/Calls/Incall.js b/linphone-app/ui/views/App/Calls/Incall.js index 7c635801e..531b61c1e 100644 --- a/linphone-app/ui/views/App/Calls/Incall.js +++ b/linphone-app/ui/views/App/Calls/Incall.js @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2010-2020 Belledonne Communications SARL. * * This file is part of linphone-desktop @@ -132,6 +132,7 @@ function openMediaParameters (window, incall) { function showFullscreen (position) { if (incall._fullscreen) { + incall._fullscreen.raise() return } DesktopTools.DesktopTools.screenSaverStatus = false