diff options
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index cce0882a1d..bc4d2e3905 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -455,6 +455,15 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv QGuiApplicationPrivate::reportAvailableGeometryChange( static_cast<QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *>(e)); break; + case QWindowSystemInterfacePrivate::Map: + QGuiApplicationPrivate::processMapEvent(static_cast<QWindowSystemInterfacePrivate::MapEvent *>(e)); + break; + case QWindowSystemInterfacePrivate::Unmap: + QGuiApplicationPrivate::processUnmapEvent(static_cast<QWindowSystemInterfacePrivate::UnmapEvent *>(e)); + break; + case QWindowSystemInterfacePrivate::Expose: + QGuiApplicationPrivate::processExposeEvent(static_cast<QWindowSystemInterfacePrivate::ExposeEvent *>(e)); + break; default: qWarning() << "Unknown user input event type:" << e->type; break; @@ -659,6 +668,24 @@ void QGuiApplicationPrivate::reportAvailableGeometryChange( return; } +void QGuiApplicationPrivate::processMapEvent(QWindowSystemInterfacePrivate::MapEvent *e) +{ + QEvent event(QEvent::Map); + QCoreApplication::sendSpontaneousEvent(e->mapped.data(), &event); +} + +void QGuiApplicationPrivate::processUnmapEvent(QWindowSystemInterfacePrivate::UnmapEvent *e) +{ + QEvent event(QEvent::Unmap); + QCoreApplication::sendSpontaneousEvent(e->unmapped.data(), &event); +} + +void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent *e) +{ + QExposeEvent event(e->region); + QCoreApplication::sendSpontaneousEvent(e->exposed.data(), &event); +} + #ifndef QT_NO_CLIPBOARD QClipboard * QGuiApplication::clipboard() { |