mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
back/win32: fix for mouse/keyboard events on NSOpenGLView
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@29957 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d815dfdfd3
commit
ae19896a05
2 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-03-13 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* 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 <ewasylishen@gmail.com>
|
||||
|
||||
* 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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue