From 22084409e9bd56879cd2af335a6f8d27068b050e Mon Sep 17 00:00:00 2001 From: "gaelle.braud" Date: Mon, 16 Mar 2026 12:15:47 +0100 Subject: [PATCH] fix notification displaying linphone window on macos --- Linphone/core/notifier/Notifier.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Linphone/core/notifier/Notifier.cpp b/Linphone/core/notifier/Notifier.cpp index a1b8b781b..95de48c2c 100644 --- a/Linphone/core/notifier/Notifier.cpp +++ b/Linphone/core/notifier/Notifier.cpp @@ -174,8 +174,8 @@ bool Notifier::createNotification(Notifier::NotificationType type, QVariantMap d // Don't use Popup for flags : it could lead to error in geometry. On Mac, Using Tool ensure // to have the Window on Top and fullscreen independant window->setFlags((showAsTool ? Qt::Tool : Qt::WindowStaysOnTopHint) | - Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus); -#ifdef Q_OS_LINUX + Qt::FramelessWindowHint); +#ifdef Q_OS_LINUX || Q_OS_WIN window->setFlag(Qt::WindowDoesNotAcceptFocus); #endif // for (auto it = data.begin(); it != data.end(); ++it) @@ -210,6 +210,9 @@ bool Notifier::createNotification(Notifier::NotificationType type, QVariantMap d [this](QWindow::Visibility visibility) { lInfo() << log().arg("Notification visibility changed") << visibility; }); + QObject::connect(window, &QQuickWindow::flagsChanged, window, [this, window]() { + lInfo() << log().arg("Notification flags changed") << window->flags(); + }); QObject::connect(window, &QQuickWindow::widthChanged, window, [this](int width) { lInfo() << log().arg("Notification width changed") << width; }); @@ -246,14 +249,14 @@ void Notifier::showNotification(QQuickWindow *notification, int timeout) { lInfo() << log().arg("Windows : screen unlocked, force raising notification"); notification->hide(); notification->showNormal(); - notification->raise(); + // notification->raise(); lInfo() << log().arg("Notification visibility : visible =") << notification->isVisible() << "visibility =" << notification->visibility(); }); #endif notification->hide(); notification->showNormal(); - notification->raise(); + // notification->raise(); lInfo() << log().arg("Notification visibility : visible =") << notification->isVisible() << "visibility =" << notification->visibility() << "size =" << notification->width() << notification->height();