diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index fbb6b6b2c..45acf0c97 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -103,7 +103,7 @@ xwl_pointer_proc(DeviceIntPtr device, int what) if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control)) return BadValue; - if (!InitButtonClassDeviceStruct(device, 3, btn_labels, map)) + if (!InitButtonClassDeviceStruct(device, NBUTTONS, btn_labels, map)) return BadValue; return Success;