The old code was not using `XSendEvent()` in a thread-safe manner, which could
cause messages to be corrupted. The thread-safe way to use `XSendEvent()` from
multiple threads would be to use `XLockDisplay()` and `XUnlockDisplay()` around
every call to Xlib. However, this would add unnecessary overhead to all X
communication. To avoid that, this patch changes the synchronization mechanism
of `glfwPostEmptyEvent()` on X11 from an X event to a send on a Unix pipe.
Because `glfwWaitEvents()` was already using `select()` for blocking, this
turned out to fit in quite naturally with the existing design and eliminates
the thread safety issues.
When natural scrolling is disabled on OS X, the X-axis of the scroll
offsets is inverted compared to the direction on Windows. The X11
scrolling directions are unspecified and so have been aligned with the
Windows port. Natural scrolling inverts both axes on both OS X and X11,
so the issue remains when the feature is enabled.
This inverts the provided X-axis scroll offset, making "unnatural"
scroll data align with the Windows and X11 ports and "natual" scroll
data be fully inverted and aligned with its counterpart on X11.
Fixes#239.
It was a copy paste without fully updating the coding style. There were
also some autotools macros that were no longer valid. So far its assumed
that the needed functions exist. If better portability is needed, there
needs to be some detction added to the cmake build script.
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.