Send Expose event when top level window becomes visible
authorKevin Krammer <kevin.krammer.qnx@kdab.com>
Fri, 20 Apr 2012 15:53:54 +0000 (17:53 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 23 Apr 2012 05:30:02 +0000 (07:30 +0200)
Change-Id: I0b45c27fa03bbe073c88ce8d01d9fb283f4051c1
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
src/plugins/platforms/qnx/qqnxwindow.cpp
src/plugins/platforms/qnx/qqnxwindow.h

index 2b41631..85c3e49 100644 (file)
@@ -240,6 +240,9 @@ void QQnxWindow::setVisible(bool visible)
     root->updateVisibility(root->m_visible);
 
     window()->requestActivateWindow();
+
+    if (window()->isTopLevel() && visible)
+        QWindowSystemInterface::handleExposeEvent(window(), window()->geometry());
 }
 
 void QQnxWindow::updateVisibility(bool parentVisible)
@@ -278,6 +281,11 @@ void QQnxWindow::setOpacity(qreal level)
     //       the transparency will look wrong...
 }
 
+bool QQnxWindow::isExposed() const
+{
+    return m_visible;
+}
+
 void QQnxWindow::setBufferSize(const QSize &size)
 {
 #if defined(QQNXWINDOW_DEBUG)
index 63e71c0..fc27c12 100644 (file)
@@ -73,6 +73,8 @@ public:
     void setVisible(bool visible);
     void setOpacity(qreal level);
 
+    bool isExposed() const;
+
     WId winId() const { return (WId)m_window; }
     screen_window_t nativeHandle() const { return m_window; }