summaryrefslogtreecommitdiff
path: root/vcl/unx/kde4
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-09-04 17:40:13 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-09-28 17:48:37 +0200
commite310c00709ed4fe0788aeff5142e3581d8b4d319 (patch)
treeb85827742e4a93a57150b5d8d254ea85a6265379 /vcl/unx/kde4
parentdea1b649765262b2e8beac88b0977d5dead98953 (diff)
Unify SalUserEvent handling
Merges the various SalUserEvent structs and their handling into a single class. This includes a common SalFrame* hash map, as all backends use such a map to verify alive SalFrames. It also reverts the "FIXME: lousy workaround" for i#90083, which was part of commit d6f7c94e5c27ba02ff5c3229760c9808cc9b5bea. At least on my current OSX box application based window switching "just works" "out of the box", even without the code. Change-Id: I188b567e44fd79c162b2d9cabbd771d1f66c7dc4 Reviewed-on: https://gerrit.libreoffice.org/42845 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/unx/kde4')
-rw-r--r--vcl/unx/kde4/KDESalDisplay.cxx5
-rw-r--r--vcl/unx/kde4/KDESalDisplay.hxx21
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx4
-rw-r--r--vcl/unx/kde4/KDEXLib.hxx2
4 files changed, 20 insertions, 12 deletions
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index 4647b3d111c8..8a2422a3918d 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -86,4 +86,9 @@ bool SalKDEDisplay::checkDirectInputEvent( XEvent* ev )
return false;
}
+void SalKDEDisplay::TriggerUserEventProcessing()
+{
+ static_cast<KDEXLib*>(GetXLib())->TriggerUserEventProcessing();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde4/KDESalDisplay.hxx b/vcl/unx/kde4/KDESalDisplay.hxx
index 4a0458dcc5c2..07b5ca3dadf5 100644
--- a/vcl/unx/kde4/KDESalDisplay.hxx
+++ b/vcl/unx/kde4/KDESalDisplay.hxx
@@ -23,15 +23,18 @@
class SalKDEDisplay : public SalX11Display
{
- public:
- explicit SalKDEDisplay( Display* pDisp );
- virtual ~SalKDEDisplay() override;
- static SalKDEDisplay* self();
- virtual void Yield() override;
- bool checkDirectInputEvent( XEvent* ev );
- private:
- Atom xim_protocol;
- static SalKDEDisplay* selfptr;
+ Atom xim_protocol;
+ static SalKDEDisplay* selfptr;
+
+protected:
+ virtual void TriggerUserEventProcessing() override;
+
+public:
+ explicit SalKDEDisplay( Display* pDisp );
+ virtual ~SalKDEDisplay() override;
+ static SalKDEDisplay* self();
+ virtual void Yield() override;
+ bool checkDirectInputEvent( XEvent* ev );
};
inline SalKDEDisplay* SalKDEDisplay::self()
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 402461e45bc6..f047ed9fce65 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -357,10 +357,10 @@ void KDEXLib::Wakeup()
QAbstractEventDispatcher::instance( qApp->thread())->wakeUp(); // main thread event loop
}
-void KDEXLib::PostUserEvent()
+void KDEXLib::TriggerUserEventProcessing()
{
if( !m_isGlibEventLoopType )
- return SalXLib::PostUserEvent();
+ return SalXLib::TriggerUserEventProcessing();
QApplication::postEvent(this, new QEvent(QEvent::Type( m_postUserEventId )));
}
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 2fe497d019fa..4c06104b4c59 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -83,7 +83,7 @@ class KDEXLib : public QObject, public SalXLib
virtual void StartTimer( sal_uLong nMS ) override;
virtual void StopTimer() override;
virtual void Wakeup() override;
- virtual void PostUserEvent() override;
+ void TriggerUserEventProcessing();
void doStartup();
bool allowKdeDialogs() { return m_allowKdeDialogs; }