Hello XQuartz-dev,
I noticed that XQuartz translates any button that isn't the left and
right mouse button to act as button 2. While this correctly handles the
middle mouse button, I believe it incorrectly handles additional buttons
that appear on some mice (not necessarily Apple-branded ones). These
mouse buttons normally appear as buttons 8 and higher under X11 on
recent Linux and BSD distributions.
This patch modifies the code translating the mouse buttons to continue
mapping the middle mouse button to 2, while mapping any additional
buttons to 8 and higher (skipping over buttons 4 to 7 as they are used
for scrolling). I have attached the patch, and have already opened a
merge request for it:
https://gitlab.freedesktop.org/xorg/xserver/merge_requests/239
I would appreciate any feedback or testing. One possible issue I might
need help with addressing is whether a maximum number of additional
buttons to handle should be set.
Thanks,
Christopher A. Chavez