xwayland: Expose all NBUTTONS buttons on the pointer

The call to 'InitButtonClassDeviceStruct' which initializes the pointer
buttons only results in the first three buttons being created due to a
hardcoded '3'. In order to expose all the buttons defined in the
btn_labels array, we subtitute 'NBUTTONS' in its place.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Jason Gerecke 2016-06-17 08:44:41 -07:00 committed by Peter Hutterer
parent 72df6e2a3a
commit 6f2a5b8cdf

View File

@ -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;