Mouse tracking and mouse capture didn't work well together. Mouse capture was
also buggy in that it could release capture prematurely.
Mouse capture is now counted and tracked better, multiple requests to set
capture will only call SetCapture once. ReleaseCapture will only be called once
the same number of releases have been made as sets.
MW_MOUSELEAVE messages are now ignored if the mouse is captured.
Mouse tracking is renabled when mouse capture is released.
While the mouse is captured enter and leave events are genereated based on
tracking of the mouse inside MouseMove.
Fixes#301
GetIconInfo
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms648070(v=vs.85).aspx)
creates bitmaps that must be deleted after the call to
CreateIconIndirect, which copies the bitmaps to the icon it creates.
bmpIcon created by Bitmap.GetHicon is now destroyed after being used.
The return value of SetCursor was used to retrieve the last cursor, as
it could have been set by another library (Some UI libraries change the
cursor using the .net Cursor) this could of leaked the cursor we created
and now lost track of. We now delete the handle we had set, not the one
returned by SetCursor.
The mask part of an XIEventMask struct is actually not a pointer to an
integer containing the mask, but rather to an array of bytes each
holding 8 bits of the mask, with the first byte holding bit 0-7.
Therefore the old code would only work on little endian arches.
Adds eglQuerySurfacePointerANGLE and a number of ANGLE related
constants.
Add eglGetPlatformDisplayEXT, eglCreatePlatformWindowSurfaceEXT and
eglCreatePlatformPixmapSurfaceEXT from EGL_EXT_platform_base.
When running under NUnit GetEntryAssembly returns null. In this case we instead
search through the AppDomain for an assembly that matches the AppDomain name.
Fixes warnings [#61] by disabling unused field warnings for two structures in
HidProtocol. These fields aren't currently used by OpenTK but the stuctures are
used in native marshalling so must match the documented structures perfectly.
WinFactory.Dispose() could crash with a NRE when the joystick driver has
not been initialized. Fixed by checking for null before disposing the
input driver.
HIDInput.Dispose() would remove elements from a DeviceCollection during
iteration. This results in an exception.
We are now using a plain for-loop instead.
`DeviceCollection.GetEnumerator()` now returns a struct IEnumerable<T>
directly to avoid boxing.
Additionally, we can now use `DeviceCollection[int]` as a shortcut to
`FromIndex(int)`.
Joystick elements (axes, buttons, hats) are now reported in the same
order as SDL2. This fixes potential mismatches in the GamePad
configuration database.
Additionally, elements are now counted correctly (duplicate elements no
longer count towards the total.)