This makes vector_push return a pointer to the pushed element.
It also allows the user to push a NULL pointer, which means allocating the
memory for the element but do not copy anything into it.
It works, with the following limitations:
1. user is forced to select the monitor through platform-specific mechanisms
every time the client starts.
2. cursor is composed onto the screen, and no position can be reported.
imgui really hates it when we update the modifier key state after igNewFrame.
The result is:
void ImGui::ErrorCheckEndFrameSanityChecks(): Assertion
`(key_mod_flags == 0 || g.IO.KeyMods == key_mod_flags) &&
"Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods"'
failed.
Therefore, we buffer the modifier state information and update it in the IO
object right before we call igNewFrame.
This avoids warping the host cursor when the guest-side warp has not finished,
which will result in the host cursor exiting at the wrong position if it exits
at that moment.
Using 4x4 means that some pixels will be outside of the lanczos window. The
ideal lanczos function should in fact be zero in those areas, so we shouldn't
waste time processing those pixels.
I can't notice any difference in the results.
The signature for calloc is void *calloc(size_t num, size_t size), where num
is the number of elements to allocate, and size is the size. Therefore, to
allocate a single struct, we should pass 1 for num and the size of the struct
as size.
In some places, we use the opposite order, and we should flip it.
According to the documentation for eglQueryString:
> EGL_BAD_DISPLAY is generated if display is not an EGL display connection,
> unless display is EGL_NO_DISPLAY and name is EGL_EXTENSIONS.
Therefore, we should check EGL by doing:
eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS)
Indeed, the old way of eglQueryString(EGL_NO_DISPLAY, EGL_VERSION) works on
libglvnd but not using mesa's libEGL.so directly.
Also added a warning to make it more obvious that EGL is not available.
With the new keymap feature, we are now able to properly support letting
the user enter exact values into the sliders. This commit adds a tooltip
to help the user discover this feature.
Note that this currently only works on Wayland. The X11 backend will need
to call app_handleKeyboardModifiers.