From 98f11b56e2ee7c96ed63fef4bad08ca8f58ebc0c Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 24 Aug 2023 10:19:50 +0200 Subject: [PATCH] From Qt 5.15.2 to 5.15.10, Accessibility freeze the application on Windows: Deactivate handlers. Update SDK to 5.2.97 --- CHANGELOG.md | 6 ++++++ linphone-app/src/app/main.cpp | 19 ++++++++++++++++--- linphone-sdk | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffd3a3747..6d29e1776 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 5.1.1 - 2023-08-24 + +### Fixed +- Windows freeze on Accessibility and with Qt < 5.15.10 +- Update SDK to 5.2.97 + ## 5.1.0 - 2023-08-23 ### Fixed diff --git a/linphone-app/src/app/main.cpp b/linphone-app/src/app/main.cpp index d503ff00b..ae70b10ed 100644 --- a/linphone-app/src/app/main.cpp +++ b/linphone-app/src/app/main.cpp @@ -20,6 +20,7 @@ #include "AppController.hpp" #include + #ifdef QT_QML_DEBUG #include #endif @@ -36,6 +37,15 @@ FILE * gStream = NULL; #include "components/vfs/VfsUtils.hpp" #endif +#if _WIN32 && QT_VERSION < QT_VERSION_CHECK(5, 15, 10) +// From 5.15.2 to 5.15.10, Accessibility freeze the application on Windows: Deactivate handlers. +#define ACCESSBILITY_WORKAROUND +#include +#include +void DummyUpdateHandler(QAccessibleEvent* event) {} +void DummyRootObjectHandler(QObject*) {} +#endif + // ============================================================================= void cleanStream(){ @@ -48,8 +58,6 @@ void cleanStream(){ #endif } - - int main (int argc, char *argv[]) { #ifdef __APPLE__ qputenv("QT_ENABLE_GLYPH_CACHE_WORKAROUND", "1"); // On Mac, set this workaround to avoid glitches on M1, because of https://bugreports.qt.io/browse/QTBUG-89379 @@ -83,7 +91,12 @@ int main (int argc, char *argv[]) { } qInfo() << QStringLiteral("Running app..."); - + +#ifdef ACCESSBILITY_WORKAROUND + QAccessible::installUpdateHandler(DummyUpdateHandler); + QAccessible::installRootObjectHandler(DummyRootObjectHandler); +#endif + int ret; do { app->initContentApp(); diff --git a/linphone-sdk b/linphone-sdk index 599eb672c..9d19f5688 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit 599eb672c7e7d125dcd29ff21adfcc34f0f79306 +Subproject commit 9d19f5688956ef89c65306c667a1cca8c9a8cd54