[Libreoffice-commits] .: vcl/unx
Lubos Lunak
llunak at kemper.freedesktop.org
Fri Oct 8 05:54:32 PDT 2010
vcl/unx/kde4/KDEXLib.cxx | 2 ++
vcl/unx/kde4/VCLKDEApplication.cxx | 13 +++++++++++++
vcl/unx/kde4/VCLKDEApplication.hxx | 6 +++++-
3 files changed, 20 insertions(+), 1 deletion(-)
New commits:
commit 0a0973fe5f198aad2bb5e2d6286b6043132e6bab
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Fri Oct 8 14:51:00 2010 +0200
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.
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 3b9080d..b17c72c 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 4e5bc43..bcebe4e 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 b67436e..f3d5afd 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
More information about the Libreoffice-commits
mailing list