summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-02-28 14:07:04 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-28 17:11:02 +0100
commit05a61de622917ba67986afff6288c05a34ff5a90 (patch)
tree679a54a4352c6c602e9ab4189d86a6a2cf98ede6 /src/gui/kernel/qwindowsysteminterface_p.h
parentdedec0b305baabe894e53bf3b70560cec68e3464 (diff)
Allow flushing window system events from other thread
For platform plugins such as the Android plugin, we need to make sure an event is delivered and handled before continuing execution (e.g. when doing an expose event to report that the EGL surface has been destroyed when the app goes into the background.) Change-Id: Ibd381baafa93f111dbc887d4cf9d9ca37429b186 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_p.h')
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index 8336c3d63c..431b2cbe1e 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -58,6 +58,7 @@
#include <QPointer>
#include <QMutex>
#include <QList>
+#include <QWaitCondition>
QT_BEGIN_NAMESPACE
@@ -89,7 +90,8 @@ public:
TabletLeaveProximity = UserInputEvent | 0x16,
PlatformPanel = UserInputEvent | 0x17,
ContextMenu = UserInputEvent | 0x18,
- ApplicationStateChanged = 0x19
+ ApplicationStateChanged = 0x19,
+ FlushEvents = 0x20
};
class WindowSystemEvent {
@@ -162,6 +164,13 @@ public:
Qt::ApplicationState newState;
};
+ class FlushEventsEvent : public WindowSystemEvent {
+ public:
+ FlushEventsEvent()
+ : WindowSystemEvent(FlushEvents)
+ { }
+ };
+
class UserEvent : public WindowSystemEvent {
public:
UserEvent(QWindow * w, ulong time, EventType t)
@@ -432,6 +441,9 @@ public:
static QElapsedTimer eventTime;
static bool synchronousWindowsSystemEvents;
+ static QWaitCondition eventsFlushed;
+ static QMutex flushEventMutex;
+
static QList<QTouchEvent::TouchPoint> convertTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points, QEvent::Type *type);
};