summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2010-10-08 14:51:00 +0200
committerLuboš Luňák <l.lunak@suse.cz>2010-10-08 14:54:05 +0200
commitf171c99af330eaeec1fe071f2f29300f27331536 (patch)
tree7a43c52b75f96a523beb33b342288baca41d9cb0
parent2cfd3b8d42ed403e1a307252eed0e5b62c719a06 (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.
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx2
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.cxx13
-rw-r--r--vcl/unx/kde4/VCLKDEApplication.hxx6
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