mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-15 04:27:47 -05:00
fix: headless backend cant use keybarod and pointer
This commit is contained in:
parent
90e0f49797
commit
afe44ff457
1 changed files with 7 additions and 2 deletions
|
|
@ -3368,7 +3368,9 @@ void requestmonstate(struct wl_listener *listener, void *data) {
|
|||
|
||||
void inputdevice(struct wl_listener *listener, void *data) {
|
||||
/* This event is raised by the backend when a new input device becomes
|
||||
* available. */
|
||||
* available.
|
||||
* when the backend is a headless backend, this event will never be triggered.
|
||||
*/
|
||||
struct wlr_input_device *device = data;
|
||||
uint32_t caps;
|
||||
|
||||
|
|
@ -5926,6 +5928,8 @@ void handle_keyboard_shortcuts_inhibit_new_inhibitor(
|
|||
void virtualkeyboard(struct wl_listener *listener, void *data) {
|
||||
struct wlr_virtual_keyboard_v1 *kb = data;
|
||||
/* virtual keyboards shouldn't share keyboard group */
|
||||
wlr_seat_set_capabilities(seat,
|
||||
seat->capabilities | WL_SEAT_CAPABILITY_KEYBOARD);
|
||||
KeyboardGroup *group = createkeyboardgroup();
|
||||
/* Set the keymap to match the group keymap */
|
||||
wlr_keyboard_set_keymap(&kb->keyboard, group->wlr_group->keyboard.keymap);
|
||||
|
|
@ -5956,7 +5960,8 @@ void warp_cursor_to_selmon(Monitor *m) {
|
|||
void virtualpointer(struct wl_listener *listener, void *data) {
|
||||
struct wlr_virtual_pointer_v1_new_pointer_event *event = data;
|
||||
struct wlr_input_device *device = &event->new_pointer->pointer.base;
|
||||
|
||||
wlr_seat_set_capabilities(seat,
|
||||
seat->capabilities | WL_SEAT_CAPABILITY_POINTER);
|
||||
wlr_cursor_attach_input_device(cursor, device);
|
||||
if (event->suggested_output)
|
||||
wlr_cursor_map_input_to_output(cursor, device, event->suggested_output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue