Fix : keep fullscreen mode on timeout notification.

- Come back to fullscreen when clicking on fullscreen icon in call.
This commit is contained in:
Julien Wadel 2021-10-25 13:40:02 +02:00
parent ecf6c9dfd1
commit 1959e90632
3 changed files with 14 additions and 2 deletions

View file

@ -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();

View file

@ -60,6 +60,7 @@ public:
void notifyRecordingCompleted (const QString &filePath);
public slots:
void deleteNotificationOnTimeout(QVariant notification);
void deleteNotification (QVariant notification);
private:

View file

@ -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