Device classes split out of Seat class
The Wrapland::Server::Seat
class is too large, a lot of functionality is crammed into it that could instead be split out into new free functions or classes in separate files.
This holds in particular for everything about the common input devices:
- wl_keyboard
- wl_pointer
Instead for such devices separate classes could be introduced that are created by the compositor once per physical device. All state and resource tracking then happens in these classes instead of the Seat class.
This means in detail for example for keyboards:
- Rename
Wrapland::Server::Keyboard
toWrapland::Server::keyboard_res
. - Create a new class
Wrapland::Server::keyboard
which is created by the compositor representing the single keyboard input scheme of a Seat. - Associate that new keyboard class with a Seat (either directly in ctor, factory function or worse a separate member function call).
- Calls like
get_keyboard
are executed in the new keyboard class. - The keys struct in the Seat is gone.