Redesign keyboard interface
This is a proposal to redesign the keyboard interface to be able to fix #242 (closed).
Right now, keyboard events follow this flow:
+----> [ rootston ]
|
[ backend ] +------> [ wlroots ] +--+
|
+----> [ client ]
So rootston
has no control over keyboard events. It just selects the client to which events are sent to with wlr_seat_keyboard_notify_enter
and wlr_seat_keyboard_clear_focus
.
The idea is to change the flow to something similar to pointer events:
[ backend ] +---> [ wlroots ] +---> [ rootston ] +---> [ wlroots ] +---> [ client ]
With these functions:
-
wlr_seat_keyboard_send_key
,wlr_seat_keyboard_send_modifiers
used by backends [same as right now] -
wlr_seat_keyboard_notify_enter
andwlr_seat_keyboard_clear_focus
used by rootston [same as right now] -
wlr_seat_keyboard_notify_key
,wlr_seat_keyboard_notify_modifiers
used by rootston [new]
Keyboard events won't be forwarded automatically by wlroots anymore, it'll be the compositor's role to listen to them and to call the two new functions.