From 1e6f20b154dbc3bca27d745528982c57238eff89 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 22 Dec 2024 20:56:02 +0000 Subject: [PATCH] pointer: Add forward and back buttons --- src/pointer.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pointer.c b/src/pointer.c index fd23f702..e0e1bdcb 100644 --- a/src/pointer.c +++ b/src/pointer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Andri Yngvason + * Copyright (c) 2019 - 2024 Andri Yngvason * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -50,6 +50,14 @@ static void pointer_set_button_mask(struct pointer* self, uint32_t t, zwlr_virtual_pointer_v1_button(self->pointer, t, BTN_RIGHT, !!(mask & NVNC_BUTTON_RIGHT)); + if (diff & NVNC_BUTTON_BACK) + zwlr_virtual_pointer_v1_button(self->pointer, t, BTN_BACK, + !!(mask & NVNC_BUTTON_BACK)); + + if (diff & NVNC_BUTTON_FORWARD) + zwlr_virtual_pointer_v1_button(self->pointer, t, BTN_FORWARD, + !!(mask & NVNC_BUTTON_FORWARD)); + int vaxis = WL_POINTER_AXIS_VERTICAL_SCROLL; int haxis = WL_POINTER_AXIS_HORIZONTAL_SCROLL;