Skip to content

Commit

Permalink
pointer: Add forward and back buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
any1 committed Dec 22, 2024
1 parent 30d4761 commit 1e6f20b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pointer.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 1e6f20b

Please sign in to comment.