mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-05 04:06:11 -05:00
seat: support hi-res clients using lo-res backends
When the selected backend doesn't support high-resolution scroll, clients requesting high-resolution events must be handled properly. Upgrade the seat protocol to version 8 and change the defaul pointer axis handler to support new clients.
This commit is contained in:
parent
5128496ea8
commit
5eedb9ea8b
2 changed files with 9 additions and 5 deletions
|
|
@ -13,7 +13,7 @@
|
|||
#include "util/global.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
#define SEAT_VERSION 7
|
||||
#define SEAT_VERSION 8
|
||||
|
||||
static void seat_handle_get_pointer(struct wl_client *client,
|
||||
struct wl_resource *seat_resource, uint32_t id) {
|
||||
|
|
|
|||
|
|
@ -298,10 +298,14 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
|||
wl_pointer_send_axis_source(resource, source);
|
||||
}
|
||||
if (value) {
|
||||
if (value_discrete &&
|
||||
version >= WL_POINTER_AXIS_DISCRETE_SINCE_VERSION) {
|
||||
wl_pointer_send_axis_discrete(resource, orientation,
|
||||
value_discrete);
|
||||
if (value_discrete) {
|
||||
if (version >= WL_POINTER_AXIS_VALUE120_SINCE_VERSION) {
|
||||
wl_pointer_send_axis_value120(resource, orientation,
|
||||
value_discrete * 120);
|
||||
} else if (version >= WL_POINTER_AXIS_DISCRETE_SINCE_VERSION) {
|
||||
wl_pointer_send_axis_discrete(resource, orientation,
|
||||
value_discrete);
|
||||
}
|
||||
}
|
||||
|
||||
wl_pointer_send_axis(resource, time, orientation,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue