summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-11-17 11:03:02 +0100
committerMichael Stahl <mstahl@redhat.com>2015-11-17 11:04:07 +0100
commit472c81fa62b7cc27a583beb99e6cbc70ab0de733 (patch)
tree2975d4805e6841c9fac52ac8be7e3195af63c6c5 /vcl
parent2085d5dcbc2c2158996e52e84c50ca5d5d100be7 (diff)
vcl: fix the kde4 build
... after eca4c54e52363f80db26e228e586aeb7732c7100 - not sure if it's correct but at least it builds for me. Change-Id: I36083fac98c830560cdc799923d309f96e8cdd6d
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/kde4/KDESalDisplay.cxx9
-rw-r--r--vcl/unx/kde4/KDESalDisplay.hxx2
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx15
-rw-r--r--vcl/unx/kde4/KDEXLib.hxx4
4 files changed, 18 insertions, 12 deletions
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index 105393fd9b54..33a36e45d5b0 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -46,14 +46,14 @@ SalKDEDisplay::~SalKDEDisplay()
pDisp_ = nullptr;
}
-void SalKDEDisplay::Yield()
+bool SalKDEDisplay::Yield()
{
if( DispatchInternalEvent() )
- return;
+ return true;
// Prevent blocking from Drag'n'Drop events, which may have already have processed the event
if (XEventsQueued( pDisp_, QueuedAfterReading ) == 0)
- return;
+ return false;
DBG_ASSERT( static_cast<SalYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() ==
osl::Thread::getCurrentIdentifier(),
@@ -62,8 +62,9 @@ void SalKDEDisplay::Yield()
XEvent event;
XNextEvent( pDisp_, &event );
if( checkDirectInputEvent( &event ))
- return;
+ return true;
qApp->x11ProcessEvent( &event );
+ return true;
}
// HACK: When using Qt event loop, input methods (japanese, etc.) will get broken because
diff --git a/vcl/unx/kde4/KDESalDisplay.hxx b/vcl/unx/kde4/KDESalDisplay.hxx
index a262a6a57ef1..59734c7d806e 100644
--- a/vcl/unx/kde4/KDESalDisplay.hxx
+++ b/vcl/unx/kde4/KDESalDisplay.hxx
@@ -27,7 +27,7 @@ class SalKDEDisplay : public SalX11Display
explicit SalKDEDisplay( Display* pDisp );
virtual ~SalKDEDisplay();
static SalKDEDisplay* self();
- virtual void Yield() override;
+ virtual bool Yield() override;
bool checkDirectInputEvent( XEvent* ev );
private:
Atom xim_protocol;
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 6c3023b9ab77..653ce40c9abe 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -278,22 +278,25 @@ void KDEXLib::socketNotifierActivated( int fd )
sdata.handle( fd, sdata.data );
}
-void KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
+bool KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
if( !m_isGlibEventLoopType )
{
+ bool wasEvent = false;
if( qApp->thread() == QThread::currentThread())
{
// even if we use the LO event loop, still process Qt's events,
// otherwise they can remain unhandled for quite a long while
- processYield( false, bHandleAllCurrentEvents );
+ wasEvent = processYield( false, bHandleAllCurrentEvents );
}
- return SalXLib::Yield( bWait, bHandleAllCurrentEvents );
+ return SalXLib::Yield(bWait, bHandleAllCurrentEvents) || wasEvent;
}
// if we are the main thread (which is where the event processing is done),
// good, just do it
if( qApp->thread() == QThread::currentThread())
- processYield( bWait, bHandleAllCurrentEvents );
+ {
+ return processYield( bWait, bHandleAllCurrentEvents );
+ }
else
{
// we were called from another thread;
@@ -302,10 +305,11 @@ void KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
// temporarily do it while checking for new events)
SalYieldMutexReleaser aReleaser;
Q_EMIT processYieldSignal( bWait, bHandleAllCurrentEvents );
+ return false;
}
}
-void KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
+bool KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
{
blockIdleTimeout = !bWait;
QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance( qApp->thread());
@@ -321,6 +325,7 @@ void KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
if( bWait && !wasEvent )
dispatcher->processEvents( QEventLoop::WaitForMoreEvents );
blockIdleTimeout = false;
+ return wasEvent;
}
void KDEXLib::StartTimer( sal_uLong nMS )
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 951acb9a917f..4593298c34c6 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -67,7 +67,7 @@ class KDEXLib : public QObject, public SalXLib
void userEventActivated();
void startTimeoutTimer();
void startUserEventTimer();
- void processYield( bool bWait, bool bHandleAllCurrentEvents );
+ bool processYield( bool bWait, bool bHandleAllCurrentEvents );
Q_SIGNALS:
void startTimeoutTimerSignal();
void startUserEventTimerSignal();
@@ -82,7 +82,7 @@ class KDEXLib : public QObject, public SalXLib
virtual ~KDEXLib();
virtual void Init() override;
- virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ) override;
+ virtual bool Yield( bool bWait, bool bHandleAllCurrentEvents ) override;
virtual void Insert( int fd, void* data, YieldFunc pending, YieldFunc queued, YieldFunc handle ) override;
virtual void Remove( int fd ) override;
virtual void StartTimer( sal_uLong nMS ) override;