From 0f2ade2d09ec4a606a5c3ceee91ab2ea7d784f64442eb63a176e909983a0cf49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 15 Apr 2014 08:33:27 +0000 Subject: [PATCH] - Fix haning in KDE by applying upstream fix. Will be included in next release. - added patches: * kde4-4.2.3.3-timer-mutex.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=139 --- kde4-4.2.3.3-timer-mutex.patch | 46 ++++++++++++++++++++++++++++++++++ libreoffice.changes | 8 ++++++ libreoffice.spec | 3 +++ 3 files changed, 57 insertions(+) create mode 100644 kde4-4.2.3.3-timer-mutex.patch diff --git a/kde4-4.2.3.3-timer-mutex.patch b/kde4-4.2.3.3-timer-mutex.patch new file mode 100644 index 0000000..025550a --- /dev/null +++ b/kde4-4.2.3.3-timer-mutex.patch @@ -0,0 +1,46 @@ +From 7dba6e0a71d090f06a6a1a39e87572674593b48a Mon Sep 17 00:00:00 2001 +From: Jan-Marek Glogowski +Date: Mon, 10 Mar 2014 14:44:05 +0000 +Subject: fdo#73115: Always run timeouts as events + +Right-click popup menus run click events throught the LO main loop. +In case of KDE4 the LO main loop is run by a timer in the main thread, +with Qt::DirectConnection execution. + +If the timeout actually starts a nested event loop for a new dialog, +the timer is blocked, the nested mainloop detects it was started +from the timeout and drops the blocked timout from polling, which +blocks any further LibreOffice event loop processing. + +This changes the timers to Qt::QueuedConnection, so they always +generate an event and are processed by the Qt event loop. + +Change-Id: Ie626b22be3d8f9b8934bcc5e9e0e67a365549cfc +(cherry picked from commit aeda478a02523cec146f6af69710f0391061db56) +Reviewed-on: https://gerrit.libreoffice.org/8514 +Reviewed-by: Caolán McNamara +Tested-by: Caolán McNamara +--- +diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx +index b4be6d6..4a9b70b 100644 +--- a/vcl/unx/kde4/KDEXLib.cxx ++++ b/vcl/unx/kde4/KDEXLib.cxx +@@ -67,9 +67,13 @@ KDEXLib::KDEXLib() : + eventLoopType( LibreOfficeEventLoop ), + m_bYieldFrozen( false ) + { +- // the timers created here means they belong to the main thread +- connect( &timeoutTimer, SIGNAL( timeout()), this, SLOT( timeoutActivated())); +- connect( &userEventTimer, SIGNAL( timeout()), this, SLOT( userEventActivated())); ++ // the timers created here means they belong to the main thread. ++ // As the timeoutTimer runs the LO event queue, which may block on a dialog, ++ // the timer has to use a Qt::QueuedConnection, otherwise the nested event ++ // loop will detect the blocking timer and drop it from the polling ++ // freezing LO X11 processing. ++ connect( &timeoutTimer, SIGNAL( timeout()), this, SLOT( timeoutActivated()), Qt::QueuedConnection ); ++ connect( &userEventTimer, SIGNAL( timeout()), this, SLOT( userEventActivated()), Qt::QueuedConnection ); + + // QTimer::start() can be called only in its (here main) thread, so this will + // forward between threads if needed +-- +cgit v0.9.0.2-2-gbebe diff --git a/libreoffice.changes b/libreoffice.changes index 592415b..2efcd02 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 15 08:32:38 UTC 2014 - tchvatal@suse.com + +- Fix haning in KDE by applying upstream fix. Will be included + in next release. +- added patches: + * kde4-4.2.3.3-timer-mutex.patch + ------------------------------------------------------------------- Mon Apr 14 20:00:00 UTC 2014 - tbehrens@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index 7fca4e9..4961d53 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -89,6 +89,8 @@ Patch13: jvmfwk-disable-gcj.diff Patch16: wizards-create-temlates-with-python-2.6.diff # Fix fdo#74697 add Bluez 5 support for impress remote. Patch17: bluez5-support-for-impress-remote.diff +# PATCH-FIX-UPSTREAM: fix kde hanging in 4.2.3.3 +Patch18: kde4-4.2.3.3-timer-mutex.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: ImageMagick @@ -840,6 +842,7 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch13 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 %patch990 -p1 # 256x256 icons tar -xjf %{SOURCE20}