diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2010-10-08 14:51:00 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2010-10-08 14:54:05 +0200 |
commit | f171c99af330eaeec1fe071f2f29300f27331536 (patch) | |
tree | 7a43c52b75f96a523beb33b342288baca41d9cb0 /vcl | |
parent | 2cfd3b8d42ed403e1a307252eed0e5b62c719a06 (diff) |
Revert "remove filtering of Qt's X11 events by our core"
This reverts commit 84def8400a146ba815d5e6cb6dc22496c9411a27.
My mistake, there is just one X connection, created by Qt in this case.
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/kde4/KDEXLib.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/kde4/VCLKDEApplication.cxx | 13 | ||||
-rw-r--r-- | vcl/unx/kde4/VCLKDEApplication.hxx | 6 |
3 files changed, 20 insertions, 1 deletions
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index 4f32025e0d96..4cb54761892e 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -146,6 +146,8 @@ void KDEXLib::Init() Display* pDisp = QX11Info::display(); SalKDEDisplay *pSalDisplay = new SalKDEDisplay(pDisp); + m_pApplication->disp = pSalDisplay; + pInputMethod->CreateMethod( pDisp ); pInputMethod->AddConnectionWatch( pDisp, (void*)this ); pSalDisplay->SetInputMethod( pInputMethod ); diff --git a/vcl/unx/kde4/VCLKDEApplication.cxx b/vcl/unx/kde4/VCLKDEApplication.cxx index ccd0b8463750..2cfb071e96ae 100644 --- a/vcl/unx/kde4/VCLKDEApplication.cxx +++ b/vcl/unx/kde4/VCLKDEApplication.cxx @@ -36,4 +36,17 @@ VCLKDEApplication::VCLKDEApplication() : KApplication() { + disp = 0; } + +bool VCLKDEApplication::x11EventFilter(XEvent* event) +{ + //if we have a display and the display consumes the event + //do not process the event in qt + if (disp && disp->Dispatch(event) > 0) + { + return true; + } + + return false; +}
\ No newline at end of file diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx index 838d43356e2b..2edfddd69a9c 100644 --- a/vcl/unx/kde4/VCLKDEApplication.hxx +++ b/vcl/unx/kde4/VCLKDEApplication.hxx @@ -46,4 +46,8 @@ class VCLKDEApplication : public KApplication VCLKDEApplication(); virtual void commitData(QSessionManager&) {}; -}; + + virtual bool x11EventFilter(XEvent* event); + + SalKDEDisplay* disp; +};
\ No newline at end of file |