From 7cd198623ee03b318b0b5a7e5e0b2c7550305a84 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sat, 9 May 2015 12:23:09 -0400 Subject: [PATCH] Prevent the parent from drawing over OpenGL context. --- modules/highgui/src/window_w32.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/highgui/src/window_w32.cpp b/modules/highgui/src/window_w32.cpp index 29b1e41ed0..a644f31bae 100644 --- a/modules/highgui/src/window_w32.cpp +++ b/modules/highgui/src/window_w32.cpp @@ -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,