|
|
|
@ -30,9 +30,10 @@ static uint32_t default_pointer_button(struct wlr_seat_pointer_grab *grab,
|
|
|
|
|
|
|
|
|
|
static void default_pointer_axis(struct wlr_seat_pointer_grab *grab,
|
|
|
|
|
uint32_t time, enum wlr_axis_orientation orientation, double value,
|
|
|
|
|
int32_t value_discrete, enum wlr_axis_source source) {
|
|
|
|
|
int32_t value_discrete, enum wlr_axis_source source,
|
|
|
|
|
enum wlr_axis_relative_direction relative_direction) {
|
|
|
|
|
wlr_seat_pointer_send_axis(grab->seat, time, orientation, value,
|
|
|
|
|
value_discrete, source);
|
|
|
|
|
value_discrete, source, relative_direction);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void default_pointer_frame(struct wlr_seat_pointer_grab *grab) {
|
|
|
|
@ -321,7 +322,8 @@ static void update_value120_accumulators(struct wlr_seat_client *client,
|
|
|
|
|
|
|
|
|
|
void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|
|
enum wlr_axis_orientation orientation, double value,
|
|
|
|
|
int32_t value_discrete, enum wlr_axis_source source) {
|
|
|
|
|
int32_t value_discrete, enum wlr_axis_source source,
|
|
|
|
|
enum wlr_axis_relative_direction relative_direction) {
|
|
|
|
|
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
|
|
|
|
|
if (client == NULL) {
|
|
|
|
|
return;
|
|
|
|
@ -361,6 +363,10 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|
|
wl_pointer_send_axis_source(resource, source);
|
|
|
|
|
}
|
|
|
|
|
if (value) {
|
|
|
|
|
if (version >= WL_POINTER_AXIS_RELATIVE_DIRECTION_SINCE_VERSION) {
|
|
|
|
|
wl_pointer_send_axis_relative_direction(resource,
|
|
|
|
|
orientation, relative_direction);
|
|
|
|
|
}
|
|
|
|
|
if (value_discrete) {
|
|
|
|
|
if (version >= WL_POINTER_AXIS_VALUE120_SINCE_VERSION) {
|
|
|
|
|
// High resolution discrete scrolling
|
|
|
|
@ -479,11 +485,12 @@ uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
|
|
|
|
|
|
|
|
|
|
void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
|
|
|
|
enum wlr_axis_orientation orientation, double value,
|
|
|
|
|
int32_t value_discrete, enum wlr_axis_source source) {
|
|
|
|
|
int32_t value_discrete, enum wlr_axis_source source,
|
|
|
|
|
enum wlr_axis_relative_direction relative_direction) {
|
|
|
|
|
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
|
|
|
|
|
struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab;
|
|
|
|
|
grab->interface->axis(grab, time, orientation, value, value_discrete,
|
|
|
|
|
source);
|
|
|
|
|
source, relative_direction);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void wlr_seat_pointer_notify_frame(struct wlr_seat *wlr_seat) {
|
|
|
|
|