Fix SetCapture() to use child_window instead of window. As using window was causing spurious WM_MOUSELEAVE events. Also change other mouse events to return IntPtr.Zero when handled
This commit is contained in:
parent
d5b43fb33c
commit
3bbd31d66b
1 changed files with 9 additions and 9 deletions
|
@ -755,35 +755,35 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
case WindowMessage.LBUTTONDOWN:
|
||||
HandleLButtonDown(handle, message, wParam, lParam);
|
||||
break;
|
||||
return IntPtr.Zero;
|
||||
|
||||
case WindowMessage.MBUTTONDOWN:
|
||||
HandleMButtonDown(handle, message, wParam, lParam);
|
||||
break;
|
||||
return IntPtr.Zero;
|
||||
|
||||
case WindowMessage.RBUTTONDOWN:
|
||||
HandleRButtonDown(handle, message, wParam, lParam);
|
||||
break;
|
||||
return IntPtr.Zero;
|
||||
|
||||
case WindowMessage.XBUTTONDOWN:
|
||||
HandleXButtonDown(handle, message, wParam, lParam);
|
||||
break;
|
||||
return IntPtr.Zero;
|
||||
|
||||
case WindowMessage.LBUTTONUP:
|
||||
HandleLButtonUp(handle, message, wParam, lParam);
|
||||
break;
|
||||
return IntPtr.Zero;
|
||||
|
||||
case WindowMessage.MBUTTONUP:
|
||||
HandleMButtonUp(handle, message, wParam, lParam);
|
||||
break;
|
||||
return IntPtr.Zero;
|
||||
|
||||
case WindowMessage.RBUTTONUP:
|
||||
HandleRButtonUp(handle, message, wParam, lParam);
|
||||
break;
|
||||
return IntPtr.Zero;
|
||||
|
||||
case WindowMessage.XBUTTONUP:
|
||||
HandleXButtonUp(handle, message, wParam, lParam);
|
||||
break;
|
||||
return IntPtr.Zero;
|
||||
|
||||
// Keyboard events:
|
||||
case WindowMessage.KEYDOWN:
|
||||
|
@ -833,7 +833,7 @@ namespace OpenTK.Platform.Windows
|
|||
{
|
||||
if (mouse_capture_count == 0)
|
||||
{
|
||||
Functions.SetCapture(window.Handle);
|
||||
Functions.SetCapture(child_window.Handle);
|
||||
}
|
||||
mouse_capture_count++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue