kiwmi/include/input/input.h
tiosgz 30f8469da0 input: map pointer to output if possible
This is needed in order for wlroots to interpret some values (mostly
coords of absolute input events) correctly. It for example fixes how the
pointer behaves with WLR_WL_OUTPUTS=2.

In order to also map the pointer/output pair when the pointer is created
before the output, a list of pointers has to be managed, which wasn't
needed until now.
2022-07-14 14:15:51 +00:00

28 lines
778 B
C

/* Copyright (c), Charlotte Meyer <dev@buffet.sh>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#ifndef KIWMI_INPUT_INPUT_H
#define KIWMI_INPUT_INPUT_H
#include <wayland-server.h>
struct kiwmi_input {
struct wl_list keyboards; // struct kiwmi_keyboard::link
struct wl_list pointers; // struct kiwmi_pointer::link
struct wl_listener new_input;
struct kiwmi_cursor *cursor;
struct kiwmi_seat *seat;
struct {
struct wl_signal keyboard_new;
} events;
};
bool input_init(struct kiwmi_input *input);
void input_fini(struct kiwmi_input *input);
#endif /* KIWMI_INPUT_INPUT_H */