diff --git a/ChangeLog b/ChangeLog index 8c9bc95..7f0885d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-03-13 Eric Wasylishen + + * Source/win32/w32_GLcontext.m: Set the WS_DISABLED flag + on the OpenGL subwindow so mouse/keyboard events get + redirected to the parent window. + Previously mouse/keyboard events were being eaten by + the OpenGL subwindow - now they work as expected. + 2010-03-13 Eric Wasylishen * Source/win32/w32_GLcontext.m: diff --git a/Source/win32/w32_GLcontext.m b/Source/win32/w32_GLcontext.m index 7822f81..650e5a4 100644 --- a/Source/win32/w32_GLcontext.m +++ b/Source/win32/w32_GLcontext.m @@ -153,9 +153,11 @@ LRESULT CALLBACK win32SubwindowProc( NSDebugMLLog(@"WGL", @"MS window creation (%d, %d, %u, %u)", x, y, width, height); + /* WS_DISABLED causes mouse/keyboard events to be forwarded to the parent window + so they can be processed normally; otherwise the OpenGL window would eat them */ winid = CreateWindow( NSOPENGLSUBWINDOWCLASS, NSOPENGLSUBWINDOWNAME, - WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE, + WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_DISABLED, x, y, width, height, (HWND)[win windowNumber], (HMENU)NULL, hInstance, (LPVOID)self);