diff options
author | Francois Andriot <francois.andriot@free.fr> | 2012-04-28 12:45:19 +0200 |
---|---|---|
committer | Francois Andriot <francois.andriot@free.fr> | 2012-04-28 12:45:19 +0200 |
commit | a1ed0f8df1f57a436617c83e0d17a010033fd172 (patch) | |
tree | 5b088c57ebd06dcc7cdeba076ef21c68e049cb5d /redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch | |
parent | 15ce26197ee572979f11cec6d12122923a81e8dc (diff) | |
download | tde-packaging-a1ed0f8df1f57a436617c83e0d17a010033fd172.tar.gz tde-packaging-a1ed0f8df1f57a436617c83e0d17a010033fd172.zip |
RHEL/Fedora: updates kdebase 3.5.13
Diffstat (limited to 'redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch')
-rw-r--r-- | redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch b/redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch new file mode 100644 index 000000000..73220e70d --- /dev/null +++ b/redhat/kdebase/kdebase-3.5.13-fix_lock_failure.patch @@ -0,0 +1,84 @@ +commit 67a3a8f34892a6491ba0073a3f583503b44e58e7 +Author: Timothy Pearson <kb9vqf@pearsoncomputing.net> +Date: 1335211141 -0500 + + Fix desktop lock failure due to race condition within signal handler between qt and xcb + +diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc +index c0050d3..3c67ac0 100644 +--- a/kdesktop/lock/lockprocess.cc ++++ b/kdesktop/lock/lockprocess.cc +@@ -659,6 +659,7 @@ void LockProcess::startSecureDialog() + mBusy = false; + trinity_desktop_lock_in_sec_dlg = false; + if (ret == 0) { ++ trinity_desktop_lock_closing_windows = 1; + kapp->quit(); + } + if (ret == 1) { +@@ -687,6 +688,7 @@ void LockProcess::startSecureDialog() + mBusy = false; + } + if (ret == 2) { ++ trinity_desktop_lock_closing_windows = 1; + if (system("ksysguard &") == -1) { + // Error handler to shut up gcc warnings + } +diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc +index 5853da1..225d9c5 100644 +--- a/kdesktop/lock/main.cc ++++ b/kdesktop/lock/main.cc +@@ -168,7 +168,7 @@ int main( int argc, char **argv ) + + bool rt; + bool sig = false; +- if( !child && args->isSet( "forcelock" )) ++ if( (!child) && (args->isSet( "forcelock" ))) + { + rt = process.lock(); + sig = true; +diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc +index 9eb88e1..f24d02f 100644 +--- a/kdesktop/lockeng.cc ++++ b/kdesktop/lockeng.cc +@@ -34,7 +34,7 @@ SaverEngine* m_masterSaverEngine = NULL; + static void sigusr1_handler(int) + { + if (m_masterSaverEngine) { +- m_masterSaverEngine->lockProcessWaiting(); ++ m_masterSaverEngine->slotLockProcessWaiting(); + } + } + +@@ -445,6 +445,13 @@ void SaverEngine::lockProcessExited() + } + } + ++void SaverEngine::slotLockProcessWaiting() ++{ ++ // lockProcessWaiting cannot be called directly from a signal handler, as it will hang in certain obscure circumstances ++ // Instead we use a single-shot timer to immediately call lockProcessWaiting once control has returned to the Qt main loop ++ TQTimer::singleShot(0, this, SLOT(lockProcessWaiting())); ++} ++ + void SaverEngine::lockProcessWaiting() + { + kdDebug(1204) << "SaverEngine: lock exited" << endl; +diff --git a/kdesktop/lockeng.h b/kdesktop/lockeng.h +index ae08e9a..e42a048 100644 +--- a/kdesktop/lockeng.h ++++ b/kdesktop/lockeng.h +@@ -79,11 +79,12 @@ public: + virtual void saverLockReady(); + + public slots: +- void lockProcessWaiting(); ++ void slotLockProcessWaiting(); + + protected slots: + void idleTimeout(); + void lockProcessExited(); ++ void lockProcessWaiting(); + + private slots: + void handleSecureDialog(); |