Handle events coming from show() properly in qwindow-compositor
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Wed, 25 Jul 2012 10:55:47 +0000 (13:55 +0300)
committerJørgen Lind <jorgen.lind@nokia.com>
Wed, 25 Jul 2012 11:05:53 +0000 (13:05 +0200)
By not having the event handler set up properly before calling
show() we lose the expose events for platforms that send a sync
expose from setVisible (the default QPlatformWindow implementation).
On platforms like xcb this was not visible because the expose came
later, but with kms the initial expose was lost completely.

Change-Id: I16848be35f4d07df8053c66f7d39633a23e45df3
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
examples/qwindow-compositor/main.cpp

index fef65d4..10db0d1 100644 (file)
@@ -65,9 +65,9 @@ int main(int argc, char *argv[])
                      screenGeometry.width() / 2, screenGeometry.height() / 2);
 
     QOpenGLWindow window(format, geom);
-    window.show();
-
     QWindowCompositor compositor(&window);
 
+    window.show();
+
     return app.exec();
 }