[libreoffice] Related: rhbz#1085916 kde startup woes
Caolán McNamara
caolanm at fedoraproject.org
Fri Apr 11 13:58:15 UTC 2014
commit cfa27a3547cd41dd0636ac64890d7e44cafb4f9c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Apr 11 14:57:58 2014 +0100
Related: rhbz#1085916 kde startup woes
...-Qt-from-interfering-with-the-session-man.patch | 76 ++++++++++++++++++++
libreoffice.spec | 4 +-
2 files changed, 79 insertions(+), 1 deletions(-)
---
diff --git a/0001-prevent-KDE-Qt-from-interfering-with-the-session-man.patch b/0001-prevent-KDE-Qt-from-interfering-with-the-session-man.patch
new file mode 100644
index 0000000..2b48b45
--- /dev/null
+++ b/0001-prevent-KDE-Qt-from-interfering-with-the-session-man.patch
@@ -0,0 +1,76 @@
+From 71f2aff7a56cef4e133abad3c2e447c76c5ee1fe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak at collabora.com>
+Date: Tue, 25 Mar 2014 12:20:16 +0100
+Subject: [PATCH] prevent KDE/Qt from interfering with the session manager
+
+I occassionally get lockups in IceProcessMessages() called from QtCore,
+I'm actually not exactly sure why, as theoretically two connections
+from one app shouldn't be a problem, but since LO does its own
+session handling, there's no need to the KDE/Qt code to be involved,
+so prevent it from connecting to the session manager altogether.
+
+Change-Id: Iebe20d4cb5403e5fea8bd5d8c1f69b62d1c2907b
+---
+ vcl/unx/kde4/KDEXLib.cxx | 17 ++++++++++++++++-
+ vcl/unx/kde4/VCLKDEApplication.hxx | 8 --------
+ 2 files changed, 16 insertions(+), 9 deletions(-)
+
+diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
+index 820d39a..e4900a7 100644
+--- a/vcl/unx/kde4/KDEXLib.cxx
++++ b/vcl/unx/kde4/KDEXLib.cxx
+@@ -166,8 +166,23 @@ void KDEXLib::Init()
+
+ KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData );
+
++ // LO does its own session management, so prevent KDE/Qt from interfering
++ // (QApplication::disableSessionManagement(false) wouldn't quite do,
++ // since that still actually connects to the session manager, it just
++ // won't save the application data on session shutdown).
++ char* session_manager = NULL;
++ if( getenv( "SESSION_MANAGER" ) != NULL )
++ {
++ session_manager = strdup( getenv( "SESSION_MANAGER" ));
++ unsetenv( "SESSION_MANAGER" );
++ }
+ m_pApplication = new VCLKDEApplication();
+- kapp->disableSessionManagement();
++ if( session_manager != NULL )
++ {
++ setenv( "SESSION_MANAGER", session_manager, 1 );
++ free( session_manager );
++ }
++
+ KApplication::setQuitOnLastWindowClosed(false);
+
+ #if KDE_HAVE_GLIB
+diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx
+index 412ee34..4ce0b2c 100644
+--- a/vcl/unx/kde4/VCLKDEApplication.hxx
++++ b/vcl/unx/kde4/VCLKDEApplication.hxx
+@@ -21,22 +21,14 @@
+
+ #define Region QtXRegion
+
+-#include <QSessionManager>
+-
+ #include <kapplication.h>
+
+ #undef Region
+
+-/* #i59042# override KApplications method for session management
+- * since it will interfere badly with our own.
+- */
+ class VCLKDEApplication : public KApplication
+ {
+ public:
+ VCLKDEApplication();
+-
+- virtual void commitData(QSessionManager&) {};
+-
+ virtual bool x11EventFilter(XEvent* event);
+ };
+
+--
+1.8.5.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 6f7f2e4..84d1ca0 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -291,6 +291,7 @@ Patch27: 0001-rhbz-1080196-Delete-the-destination-first-then-paste.patch
Patch28: 0001-Related-rhbz-1075951-abrt-crash-in-MSWordExportBase-.patch
Patch29: 0001-drop-OnlyShowIn-from-.desktop-files.patch
Patch30: 0001-Resolves-rhbz-1081176-don-t-jump-to-cursor-pos-when.patch
+Patch31: 0001-prevent-KDE-Qt-from-interfering-with-the-session-man.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@@ -2187,7 +2188,8 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%changelog
* Fri Apr 11 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.2.3.3-2
-- Related: rhbz#1081176 don't jump to cursor pos when we don't want to
+- Resolves: rhbz#1081176 don't jump to cursor pos when we don't want to
+- Related: rhbz#1085916 kde startup woes
* Sat Apr 05 2014 David Tardon <dtardon at redhat.com> - 1:4.2.3.3-1
- update to 4.2.3 rc3
More information about the scm-commits
mailing list