1 |
dilfridge 14/05/02 16:07:05 |
2 |
|
3 |
Added: libreoffice-4.2.3.3-kde4-startup.patch |
4 |
Log: |
5 |
Fix the recursive repaint bug again, bug 509390 |
6 |
|
7 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EBE6A336BE19039C!) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-office/libreoffice/files/libreoffice-4.2.3.3-kde4-startup.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.2.3.3-kde4-startup.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-4.2.3.3-kde4-startup.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: libreoffice-4.2.3.3-kde4-startup.patch |
16 |
=================================================================== |
17 |
From 71f2aff7a56cef4e133abad3c2e447c76c5ee1fe Mon Sep 17 00:00:00 2001 |
18 |
From: Luboš Luňák <l.lunak@×××××××××.com> |
19 |
Date: Tue, 25 Mar 2014 11:20:16 +0000 |
20 |
Subject: prevent KDE/Qt from interfering with the session manager |
21 |
|
22 |
I occassionally get lockups in IceProcessMessages() called from QtCore, |
23 |
I'm actually not exactly sure why, as theoretically two connections |
24 |
from one app shouldn't be a problem, but since LO does its own |
25 |
session handling, there's no need to the KDE/Qt code to be involved, |
26 |
so prevent it from connecting to the session manager altogether. |
27 |
|
28 |
Change-Id: Iebe20d4cb5403e5fea8bd5d8c1f69b62d1c2907b |
29 |
--- |
30 |
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx |
31 |
index 820d39a..e4900a7 100644 |
32 |
--- a/vcl/unx/kde4/KDEXLib.cxx |
33 |
+++ b/vcl/unx/kde4/KDEXLib.cxx |
34 |
@@ -166,8 +166,23 @@ void KDEXLib::Init() |
35 |
|
36 |
KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData ); |
37 |
|
38 |
+ // LO does its own session management, so prevent KDE/Qt from interfering |
39 |
+ // (QApplication::disableSessionManagement(false) wouldn't quite do, |
40 |
+ // since that still actually connects to the session manager, it just |
41 |
+ // won't save the application data on session shutdown). |
42 |
+ char* session_manager = NULL; |
43 |
+ if( getenv( "SESSION_MANAGER" ) != NULL ) |
44 |
+ { |
45 |
+ session_manager = strdup( getenv( "SESSION_MANAGER" )); |
46 |
+ unsetenv( "SESSION_MANAGER" ); |
47 |
+ } |
48 |
m_pApplication = new VCLKDEApplication(); |
49 |
- kapp->disableSessionManagement(); |
50 |
+ if( session_manager != NULL ) |
51 |
+ { |
52 |
+ setenv( "SESSION_MANAGER", session_manager, 1 ); |
53 |
+ free( session_manager ); |
54 |
+ } |
55 |
+ |
56 |
KApplication::setQuitOnLastWindowClosed(false); |
57 |
|
58 |
#if KDE_HAVE_GLIB |
59 |
diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx |
60 |
index 412ee34..4ce0b2c 100644 |
61 |
--- a/vcl/unx/kde4/VCLKDEApplication.hxx |
62 |
+++ b/vcl/unx/kde4/VCLKDEApplication.hxx |
63 |
@@ -21,22 +21,14 @@ |
64 |
|
65 |
#define Region QtXRegion |
66 |
|
67 |
-#include <QSessionManager> |
68 |
- |
69 |
#include <kapplication.h> |
70 |
|
71 |
#undef Region |
72 |
|
73 |
-/* #i59042# override KApplications method for session management |
74 |
- * since it will interfere badly with our own. |
75 |
- */ |
76 |
class VCLKDEApplication : public KApplication |
77 |
{ |
78 |
public: |
79 |
VCLKDEApplication(); |
80 |
- |
81 |
- virtual void commitData(QSessionManager&) {}; |
82 |
- |
83 |
virtual bool x11EventFilter(XEvent* event); |
84 |
}; |
85 |
|
86 |
-- |
87 |
cgit v0.9.0.2-2-gbebe |