Summary: | left handed option for mouse broken with xorg-7.3 | ||
---|---|---|---|
Product: | [Unmaintained] kcontrol | Reporter: | Sascha Jüngling <sjuengling> |
Component: | kcmmouse | Assignee: | Marie Loise Nolden <nolden> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | maksim |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Sascha Jüngling
2007-09-30 21:15:13 UTC
It's actually a bit of both --- for some reasons X is claiming that your (and mine, etc., etc.) mouse has ~32 buttons. And the code in KDE screws up when X claims > 20 buttons. Both need to be fixed. The below fixes the KDE part --- mouse.cpp (revision 758405) +++ mouse.cpp (working copy) @@ -767,8 +767,12 @@ XChangePointerControl( QX11Info::display(), true, true, int(qRound(accelRate*10)), 10, thresholdMove); - unsigned char map[20]; - num_buttons = XGetPointerMapping(QX11Info::display(), map, 20); + // 256 might seems extreme, but X has already been known to return 32, + // and we don't want to truncate things. Xlib limits the table to 256 bytes, + // so it's a good uper bound.. + unsigned char map[256]; + num_buttons = XGetPointerMapping(QX11Info::display(), map, 256); + int remap=(num_buttons>=1); if (handedEnabled && (m_handedNeedsApply || force)) { if( num_buttons == 1 ) Ahhh, great news. Will that fix be included in the next KDE 3.5 release (if there will be any), or will it only be in KDE4 (or will it make its way to KDE4 at all? :P). Regarding the X thing: How are we going to proceed with this? Did you guys already report this to Xorg, or am I supposed to report that to them...? I can't test your patch yet, as my Laptop is broken and being serviced, I'm currently not on my own laptop and this one runs Windows :P SVN commit 760911 by orlovich: Ubreak support for left-handed mice on recent X versions. This code assumed that all mice had less than 20 buttons, but for some reason new Xorg thinks that lots of mice have 32(!!) CCBUG: 150361 M +6 -2 mouse.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=760911 SVN commit 760917 by orlovich: automatically merged revision 760911: Ubreak support for left-handed mice on recent X versions. This code assumed that all mice had less than 20 buttons, but for some reason new Xorg thinks that lots of mice have 32(!!) CCBUG: 150361 M +6 -2 mouse.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=760917 SVN commit 760922 by orlovich: Backport fix for left-handed mice and recent X.. BUG: 150361 M +6 -2 mouse.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=760922 That's fixed for 3.5.9, 4.0.1, and 4.1... Okay cool, thanks for the heads up. How about Xorg? Are they aware of the issue? |