Christopher Cope ccope3@utk.edu writes:
@@ -286,8 +286,10 @@ static void enable_xinput2(void) class->number, class->min, class->max, class->resolution, class->mode, XGetAtomName( data->display, class->label )); if (class->label == x11drv_atom( Rel_X ) || class->label == x11drv_atom( Rel_Y )) count++;
/* workaround for drivers that don't provide labels */
if (!class->label && class->number <= 1 && class->mode == XIModeRelative) count++;
/* workaround for drivers that don't provide correct labels */
if (((!class->label && class->number <= 1) || class->label == x11drv_atom( Abs_X ) ||
class->label == x11drv_atom( Abs_Y ))
&& class->mode == XIModeRelative) count++;
The whole point of testing labels was because some platforms don't set the relative mode correctly, so this is going to break them again.
The way I set it was to enable with the original labels or absolute label with relative mode. My mouse has absolute labels, but with relative mode set. My mouse won't work correctly without this patch. Relative and absolute mode can be set relatively easily.
Alexandre Julliard julliard@winehq.org wrote:
Christopher Cope ccope3@utk.edu writes:
@@ -286,8 +286,10 @@ static void enable_xinput2(void) class->number, class->min, class->max,
class->resolution, class->mode,
XGetAtomName( data->display, class->label )); if (class->label == x11drv_atom( Rel_X ) || class->label
== x11drv_atom( Rel_Y )) count++;
/* workaround for drivers that don't provide labels */
if (!class->label && class->number <= 1 && class->mode
== XIModeRelative) count++;
/* workaround for drivers that don't provide correct
labels */
if (((!class->label && class->number <= 1) ||
class->label == x11drv_atom( Abs_X ) ||
class->label == x11drv_atom( Abs_Y ))
&& class->mode == XIModeRelative) count++;
The whole point of testing labels was because some platforms don't set the relative mode correctly, so this is going to break them again.
-- Alexandre Julliard julliard@winehq.org
Can someone provide some follow up on this? There is a problem with the current code. The way I fixed it allows the end user to set the mode with xinput. That seems preferable to having to apply a patch to wine if the mouse in use doesn't work.
Christopher Cope ccope3@utk.edu wrote:
The way I set it was to enable with the original labels or absolute label with relative mode. My mouse has absolute labels, but with relative mode set. My mouse won't work correctly without this patch. Relative and absolute mode can be set relatively easily.
Alexandre Julliard julliard@winehq.org wrote:
Christopher Cope ccope3@utk.edu writes:
@@ -286,8 +286,10 @@ static void enable_xinput2(void) class->number, class->min, class->max,
class->resolution, class->mode,
XGetAtomName( data->display, class->label )); if (class->label == x11drv_atom( Rel_X ) ||
class->label
== x11drv_atom( Rel_Y )) count++;
/* workaround for drivers that don't provide labels */
if (!class->label && class->number <= 1 && class->mode
== XIModeRelative) count++;
/* workaround for drivers that don't provide correct
labels */
if (((!class->label && class->number <= 1) ||
class->label == x11drv_atom( Abs_X ) ||
class->label == x11drv_atom( Abs_Y ))
&& class->mode == XIModeRelative) count++;
The whole point of testing labels was because some platforms don't set the relative mode correctly, so this is going to break them again.
-- Alexandre Julliard julliard@winehq.org
Christopher Cope ccope3@utk.edu writes:
Can someone provide some follow up on this? There is a problem with the current code. The way I fixed it allows the end user to set the mode with xinput. That seems preferable to having to apply a patch to wine if the mouse in use doesn't work.
I'd suggest to file a bug for the mouse driver and ask them to use the correct labels.