mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-17 08:56:28 -05:00
types/wlr_keyboard: add base wlr_input_device
wlr_keyboard owns its base wlr_input_device. It will be initialized when the keyboard is initialized, and finished when the keyboard is destroyed.
This commit is contained in:
parent
130c3bcf63
commit
a1978b1299
12 changed files with 66 additions and 85 deletions
|
|
@ -336,5 +336,10 @@ void update_x11_pointer_position(struct wlr_x11_output *output,
|
|||
}
|
||||
|
||||
bool wlr_input_device_is_x11(struct wlr_input_device *wlr_dev) {
|
||||
return wlr_dev->impl == &input_device_impl;
|
||||
switch (wlr_dev->type) {
|
||||
case WLR_INPUT_DEVICE_KEYBOARD:
|
||||
return wlr_dev->keyboard->impl == &keyboard_impl;
|
||||
default:
|
||||
return wlr_dev->impl == &input_device_impl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue