Currently keycodes are always converted using xkbcommons
`State::key_get_one_sym` function. This may be not what the compositor
wants, e.g. if it represents keybindings with explicit modifiers.
Applying Shift in this case changes the sym, making it necessary for
the compositor to *undo* this transformation, which is hard or even
impossible and very unnecessary, when we have all the necessary
information in smithay.
Therefor this commit replaces the `Keysym` argument of the filter
closure with a `KeysymHandle`, which allows for different variants of
keysyms to be received. Modified (as previously), unmodified or even
as a raw keycode.
The previous commit added a new worker thread. This thread might sit in
wait_for_event() indefinitely even after the X11Source was dropped. This
is because nothing guarantees that an X11 event will come in "soonish".
And only then would the thread notice that its main thread is gone.
This commit cleans that up by having X11Source explicitly wake up the
event thread and wait for it to exit in its Drop implementation.
Signed-off-by: Uli Schlachter <psychon@znc.in>
x11rb caches X11 events internally. This cache is used when waiting for
the reply of a request and an event is received first. This cache is
however also used when sending a request, because the X11 client may
never block and stop reading while writing a request. Doing so could
cause a deadlock with the X11 server.
Thus, this commit changes X11Source to spawn a thread internally. This
thread calls wait_for_event() in a loop and uses a calloop channel to
forward these events to the main loop. x11rb's RustConnection internally
uses a ConditionVariable to make sure this thread will wake up when
needed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
expose output from output map and return a reference
in find
change scale with keyboard shortcut
scale input coordinates and render location
according to output_scale
scale buffers during rendering
adapt window locations on output scale
change to that the location will appear
to be stable
scale udev pointer location on output scale
change to make the pointer location appear stable
Use a UserDataMap to store the udev output id
Short names for udev outputs for easier output
scale configuration
Add debug logging to egl via the `EGL_KHR_debug` extension similar to our
support for `GL_KHR_debug`. Sadly unlike the GL-extensions the EGL-extension
does not let us provide any user-data for the callback, so we fall back to
using `slog-stdlog`, when available.
Since we only want to initialize this once, when libEGL gets loaded and
not per display, but we need to query the list of supported extensions
first, some initialization steps where moved around.