Bug 45354 - XFree XInput device bug (patch included)
XFree XInput device bug (patch included)
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: XFree86 (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-06-21 10:10 EDT by Joe Krahn
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-06-21 10:10:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Joe Krahn 2001-06-21 10:10:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-SGI_XFS_1.0 i686)

Description of problem:
XFree86 internal XInput calls does not correctly process device valuator
data that does not report starting from valuator 0. Most XInput devices
report all valuators from 0, and are not affected. I have created/updated 3
XInput devices that are affected, in particular the SGI 8-knob dialbox.

Fortunately, the fix is simple. Please add the patch to the next XFree86
release so that I can distribute the new (beta) XInput drivers. See the
patch in Additional Info. section. (Bug has been reported to XFree86 as
well.)


How reproducible:
Always

Steps to Reproduce:
Install an XInput device that reports valuators staring other than zero. (I
don't think any of the current 4.x supported drivers do this)

Actual Results:  Running: xinput test dial+buttons, all knobs report as
valuator 0.


Expected Results:  XEvents should report valuators 0-7.

Additional info:

PATCH for 4.1.0 source (4.0.3 source is identical)

*** xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c.orig     Tue Jun 19
13:55:17 2001
--- xc/programs/Xserver/hw/xfree86/common/xf86Xinput.c.new      Tue Jun 19
13:55:17 2001
***************
*** 931,937 ****
      
      va_start(var, num_valuators);
  
!     loop_start = 0;
      for(loop=0; loop<num_valuators; loop++) {
  
        valuator[loop%6] = va_arg(var,int);
--- 931,937 ----
      
      va_start(var, num_valuators);
  
!     loop_start = first_valuator;
      for(loop=0; loop<num_valuators; loop++) {
  
        valuator[loop%6] = va_arg(var,int);
***************
*** 1074,1080 ****
                    axisvals[1] = y;
                }
            }
!           loop_start = loop + 1;
        }
      }
      va_end(var);
--- 1074,1080 ----
                    axisvals[1] = y;
                }
            }
!           loop_start += 6;
        }
      }
      va_end(var);
Comment 1 Mike A. Harris 2001-07-12 21:39:09 EDT
I appreciate your patch, and your efforts of submitting it to us, however
Xinput drivers are not an area I'm familiar enough with to feel confident
that this enhancement is non-intrusive.  Also, I do not want our release to be
incompatible in any way to XFree86 sources in significant ways wherever
possible.  As such I would much rather wait until the patch is accepted
into the main XFree86 codebase, then I can pick up the patches when I
code merge with XFree86 xf-4_1-branch, or if it is in head CVS, when I
pick up the next release of XFree86.

Thanks again however for your submission.

Note You need to log in before you can comment on or make changes to this bug.