kiwmi/include/input/pointer.h
tiosgz a12e670657 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

27 lines
738 B
C

/* Copyright (c), Niclas Meyer <niclas@countingsort.com>
*
* 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_POINTER_H
#define KIWMI_INPUT_POINTER_H
#include <wayland-server.h>
#include <wlr/types/wlr_input_device.h>
#include "server.h"
struct kiwmi_pointer {
struct wlr_input_device *device;
struct wl_list link;
struct wl_listener device_destroy;
};
struct kiwmi_pointer *
pointer_create(struct kiwmi_server *server, struct wlr_input_device *device);
void pointer_destroy(struct kiwmi_pointer *pointer);
#endif /* KIWMI_INPUT_POINTER_H */