diff --git a/Linphone/core/notifier/Notifier.cpp b/Linphone/core/notifier/Notifier.cpp index 58c3289f..8c74e847 100644 --- a/Linphone/core/notifier/Notifier.cpp +++ b/Linphone/core/notifier/Notifier.cpp @@ -135,8 +135,8 @@ bool Notifier::createNotification(Notifier::NotificationType type, QVariantMap d mMutex->unlock(); return false; } - QList allScreens = QGuiApplication::screens(); - if (allScreens.size() > 0) { // Ensure to have a screen to avoid errors + QScreen *primaryScreen = QGuiApplication::primaryScreen(); + if (primaryScreen) { // Ensure to have a screen to avoid errors QQuickItem *previousWrapper = nullptr; bool showAsTool = false; #ifdef Q_OS_MACOS @@ -149,12 +149,12 @@ bool Notifier::createNotification(Notifier::NotificationType type, QVariantMap d } } #endif - for (int i = 0; i < allScreens.size(); ++i) { - + // Only show notification on primary screen (not on all screens) + { ++mInstancesNumber; // Use QQuickView to create a visual root object that is // independant from current application Window - QScreen *screen = allScreens[i]; + QScreen *screen = primaryScreen; auto engine = App::getInstance()->mEngine; const QUrl url(QString(NotificationsPath) + Notifier::Notifications[type].filename); QObject::connect(