summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_p.h')
-rw-r--r--src/gui/kernel/qwindowsysteminterface_p.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h
index f48c75a027..32a5aaa318 100644
--- a/src/gui/kernel/qwindowsysteminterface_p.h
+++ b/src/gui/kernel/qwindowsysteminterface_p.h
@@ -93,11 +93,20 @@ public:
class WindowSystemEvent {
public:
+ enum {
+ Synthetic = 0x1,
+ NullWindow = 0x2
+ };
+
explicit WindowSystemEvent(EventType t)
- : type(t), synthetic(false) { }
+ : type(t), flags(0) { }
virtual ~WindowSystemEvent() { }
+
+ bool synthetic() const { return flags & Synthetic; }
+ bool nullWindow() const { return flags & NullWindow; }
+
EventType type;
- bool synthetic;
+ int flags;
};
class CloseEvent : public WindowSystemEvent {
@@ -186,9 +195,12 @@ public:
class UserEvent : public WindowSystemEvent {
public:
UserEvent(QWindow * w, ulong time, EventType t)
- : WindowSystemEvent(t), window(w), nullWindow(w == 0), timestamp(time) { }
+ : WindowSystemEvent(t), window(w), timestamp(time)
+ {
+ if (!w)
+ flags |= NullWindow;
+ }
QPointer<QWindow> window;
- bool nullWindow;
unsigned long timestamp;
};