Map linux mouse buttons to win32 XBUTTON1 and XBUTTON2. Although BTN_SIDE and BTN_EXTRA are the typical event codes for these buttons, some drivers use BTN_BACK and BTN_FORWARD, so map both pairs.
From: Alexandros Frantzis alexandros.frantzis@collabora.com
Map linux mouse buttons to win32 XBUTTON1 and XBUTTON2. Although BTN_SIDE and BTN_EXTRA are the typical event codes for these buttons, some drivers use BTN_BACK and BTN_FORWARD, so map both pairs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56026 --- dlls/winewayland.drv/wayland_pointer.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/dlls/winewayland.drv/wayland_pointer.c b/dlls/winewayland.drv/wayland_pointer.c index ccd477b3c91..a357c36b394 100644 --- a/dlls/winewayland.drv/wayland_pointer.c +++ b/dlls/winewayland.drv/wayland_pointer.c @@ -164,6 +164,16 @@ static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer, case BTN_LEFT: input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN; break; case BTN_RIGHT: input.mi.dwFlags = MOUSEEVENTF_RIGHTDOWN; break; case BTN_MIDDLE: input.mi.dwFlags = MOUSEEVENTF_MIDDLEDOWN; break; + case BTN_SIDE: + case BTN_BACK: + input.mi.dwFlags = MOUSEEVENTF_XDOWN; + input.mi.mouseData = XBUTTON1; + break; + case BTN_EXTRA: + case BTN_FORWARD: + input.mi.dwFlags = MOUSEEVENTF_XDOWN; + input.mi.mouseData = XBUTTON2; + break; default: break; }