This allows EWMH full screen windows to correctly cover monitors that
overlap other monitors, such as an Oculus Rift mapped onto a section of
a larger monitor.
Fixes#175.
The library will now try to create an X input context to handle dead
keys properly on international keyboards. This makes it possible to
enter for example an e with accent grave on a German keyboard without
further efforts. A fallback mechanism is provided in case the client
does not support X input method / context creation. In that case, the
library will behave as it did before.
The display device string was used, instead of the adapter device name,
leading to the wrong incorrect physical size being returned for
non-primary monitors. The right incorrect physical size is now returned
for all monitors.
We need to invoke both [NSCursor set] and [NSView addCursorRect].
First call is responsible for changing the cursor if it's inside the
view; second call is responsible for keeping the cursor the same if it's
outside.
Don't implement resetCursorRects: this occasionally hides the cursor
since an empty cursor is assigned to the window rectangle. Implementing
this method is not required since OS displays the window cursor
correctly by default.
Don't reset cursor mode when window loses focus: once again, OS handles
this correctly, and this means that the window cursor state is restored
when window gains focus again.
This function used to enumerate all devices and capture all properties
of every device into a dictionary. This takes 180 ms on a MacBook Pro
without external devices and 280 ms with an external keyboard/mouse
attached.
Since we're only interested in a few properties, we can just get them
one by one - this reduces the time to <1 ms.
Note that we still use the dictionary to get the joystick elements.
For unknown reason this is required to get all axes/buttons - without
doing this we don't get any joystick elements in addJoystickElement.
Closes#332.