diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-07-10 09:47:03 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-07-10 09:47:03 +0000 |
commit | c8a85b55c96d40664b07d4680c3b6446de025bfa (patch) | |
tree | f689b040a7042d63383a536fbe5cd972189223e2 /dtrans | |
parent | 08c4052a6edb1f372d89b330b5fc6efbcb83bf5a (diff) |
fixed a deadlock
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/X11/X11_selection.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx index cd90b6a5e1c8..465427e31199 100644 --- a/dtrans/source/X11/X11_selection.cxx +++ b/dtrans/source/X11/X11_selection.cxx @@ -2,9 +2,9 @@ * * $RCSfile: X11_selection.cxx,v $ * - * $Revision: 1.31 $ + * $Revision: 1.32 $ * - * last change: $Author: pl $ $Date: 2001-07-09 12:47:24 $ + * last change: $Author: pl $ $Date: 2001-07-10 10:47:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2643,15 +2643,18 @@ void SelectionManager::dispatchEvent( int millisec ) // with an empty socket here if( poll( &aPollFD, 1, 0 ) > 0 ) { - int nPending = XPending( m_pDisplay ); + int nPending = 1; aOuterGuard.clear(); while( nPending ) { ClearableMutexGuard aLoopGuard(m_aMutex); - XNextEvent( m_pDisplay, &event ); nPending = XPending( m_pDisplay ); - aLoopGuard.clear(); - handleXEvent( event ); + if( nPending ) + { + XNextEvent( m_pDisplay, &event ); + aLoopGuard.clear(); + handleXEvent( event ); + } } } } |