This commit adds support for the `input_method_v2`, `text_input_v3`,
and `virtual_keyboard`. The implementation follows the one in the
anvil and catacomb, but those protocols are mostly enabled and
forget type of things.
Fixes#22.
Combine the redraw state variables into one enum, and refactor to get
rid of the requirement that a VBlank must queue a subsequent redraw.
Also fix the bug where ongoing animations that produced no damage could
stall the redrawing.
Under some circumstances, the compositor can get into a commit-frame
callback busy loop with a client. For example, if a client redraws on
frame callbacks, but the resulting frame has empty damage (e.g. the
damaged part of the client is outside the monitor). Or if the client
simply commits with empty damage (looking at you, Firefox).
This behavior is compliant with the Wayland specification and with the
intended idea of frame callbacks, but causes a lot of unnecessary CPU
usage in the client and the compositor.
To solve this problem, this commit introduces frame callback throttling.
Every surface may only receive a single frame callback in one
monitor refresh cycle. If a surface commits resulting in no KMS frame
submission, a timer is created, that will fire at the predicted would-
be-VBlank time, and send the accumulated frame callbacks.
This way, a surface that redraws on frame callbacks will not notice
any change in frame callback delivery, if its commits suddenly stop
producing KMS updates.
Add option to let the users configure the keyboard repeat delay and
rate. Also change the default values to mimic the Xorg, which is
also the values used by default by the majority of the compositors.
Fixes: #7
DmaBuf monitor screencasting through xdg-dekstop-portal-gnome!
Somewhat limited currently, e.g. the cursor is always embedded. But gets
most of the job done.