eglfs/pi: update handles are 'local' variables
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Mon, 21 May 2012 21:59:00 +0000 (14:59 -0700)
committerQt by Nokia <qt-info@nokia.com>
Tue, 22 May 2012 03:09:11 +0000 (05:09 +0200)
Change-Id: Iec687e9cd015ed389a637b50e4e4e332478b6e1f
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp

index cdd01dc..5c5799b 100644 (file)
@@ -55,7 +55,6 @@
 QT_BEGIN_NAMESPACE
 
 static DISPMANX_DISPLAY_HANDLE_T dispman_display = 0;
-static DISPMANX_UPDATE_HANDLE_T dispman_update = 0;
 
 class QEglFSPiHooks : public QEglFSHooks
 {
@@ -126,7 +125,7 @@ EGLNativeWindowType QEglFSPiHooks::createNativeWindow(const QSize &size)
     src_rect.width = size.width() << 16;
     src_rect.height = size.height() << 16;
 
-    dispman_update = vc_dispmanx_update_start(0);
+    DISPMANX_UPDATE_HANDLE_T dispman_update = vc_dispmanx_update_start(0);
 
     VC_DISPMANX_ALPHA_T alpha;
     alpha.flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS;
@@ -150,7 +149,9 @@ EGLNativeWindowType QEglFSPiHooks::createNativeWindow(const QSize &size)
 void QEglFSPiHooks::destroyNativeWindow(EGLNativeWindowType window)
 {
     EGL_DISPMANX_WINDOW_T *eglWindow = static_cast<EGL_DISPMANX_WINDOW_T *>(window);
+    DISPMANX_UPDATE_HANDLE_T dispman_update = vc_dispmanx_update_start(0);
     vc_dispmanx_element_remove(dispman_update, eglWindow->element);
+    vc_dispmanx_update_submit_sync(dispman_update);
     delete eglWindow;
 }