Prevent the parent from drawing over OpenGL context.
authorAshod Nakashian <ashodnakashian@yahoo.com>
Sat, 9 May 2015 16:23:09 +0000 (12:23 -0400)
committerAshod Nakashian <ashodnakashian@yahoo.com>
Sat, 9 May 2015 16:23:09 +0000 (12:23 -0400)
modules/highgui/src/window_w32.cpp

index 29b1e41..a644f31 100644 (file)
@@ -739,6 +739,11 @@ CV_IMPL int cvNamedWindow( const char* name, int flags )
     if( !(flags & CV_WINDOW_AUTOSIZE))//YV add border in order to resize the window
        defStyle |= WS_SIZEBOX;
 
+#ifdef HAVE_OPENGL
+    if (flags & CV_WINDOW_OPENGL)
+        defStyle |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
+#endif
+
     icvLoadWindowPos( name, rect );
 
     mainhWnd = CreateWindow( "Main HighGUI class", name, defStyle | WS_OVERLAPPED,