Skip to content

Commit

Permalink
x0vncserver: support for forward mouse button
Browse files Browse the repository at this point in the history
This change adds support for an additional button in x0vncserver,
allowing the 9th bit (forward mouse button) to be used when calling
XDesktop::pointerEvent().
  • Loading branch information
CendioHalim committed Oct 22, 2024
1 parent 9426b33 commit 1c2f07f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unix/x0vncserver/XDesktop.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ void XDesktop::init(VNCServer* vs)
void XDesktop::start()
{
// Determine actual number of buttons of the X pointer device.
unsigned char btnMap[8];
int numButtons = XGetPointerMapping(dpy, btnMap, 8);
maxButtons = (numButtons > 8) ? 8 : numButtons;
unsigned char btnMap[9];
int numButtons = XGetPointerMapping(dpy, btnMap, 9);
maxButtons = (numButtons > 9) ? 9 : numButtons;
vlog.info("Enabling %d button%s of X pointer device",
maxButtons, (maxButtons != 1) ? "s" : "");

Expand Down

0 comments on commit 1c2f07f

Please sign in to comment.