Bug 154357 - can't switch left and right mouse buttons
Summary: can't switch left and right mouse buttons
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: X.Org (show other bugs)
Version: Beta 6
Hardware: Other Other
: P4 - Low : Enhancement (vote)
Target Milestone: ---
Assignee: Matthias Hopf
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-01 13:32 UTC by Steffen Winterfeldt
Modified: 2006-03-22 15:15 UTC (History)
4 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Patch (695 bytes, patch)
2006-03-06 15:32 UTC, Stefan Dirsch
Details | Diff
Updated patch (653 bytes, patch)
2006-03-22 14:18 UTC, Matthias Hopf
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Winterfeldt 2006-03-01 13:32:31 UTC
If I click with the right mouse button into the timezone dialog, I get a
popup that says 'You clicked the right mouse button ... (blah blah)'.
It offers to switch left and right buttons - but it does not work.
Comment 1 Michael Gross 2006-03-01 14:43:30 UTC
Stanislav: If this is nothing for you, please assign it back to us.
Comment 2 Stefan Hundhammer 2006-03-01 14:53:18 UTC
Hm - it did work in previous versions. The y2log should have a line like this:

    Switching mouse buttons: xmodmap -e "pointer = 1 2 3"
or
    Switching mouse buttons: xmodmap -e "pointer = 3 2 1"

This is the command that is executed.

Do you have a line like this in the y2logs?
And is "xmodmap" available in the inst-sys at all?
    
Comment 3 Steffen Winterfeldt 2006-03-01 15:11:41 UTC
no
no
Comment 4 Stefan Hundhammer 2006-03-01 16:40:38 UTC
No log line like this -> you must have hit "cancel" in that dialog.
No xmodmap in the inst-sys -> even if invoked, this cannot work. :-(

So at least we need xmodmap in the inst-sys. This only adds another 25 k to it and no new libraries AFAICS.

So please add it and then let's test this again.
Comment 5 Steffen Winterfeldt 2006-03-02 10:59:29 UTC
> No log line like this -> you must have hit "cancel" in that dialog.

Actually it was the 'hit huha's head hard' button. Seems not to
work either.

Ok, I've added xmodmap. And it sure does still not work because the
command in comment 2 is wrong (try it on your local machine - don't
worry it will do no harm as it doesn't work).

My bet is that it is impossible to put together the real command in YCP.
Comment 6 Steffen Winterfeldt 2006-03-06 13:24:32 UTC
It would be nice to have xmodmap changed to work without having to specify
all buttons explicitly. E.g. it could change just the button assignments
that are given. (Comment 2 did not work on my machine because it wanted
the complete mapping of 11 buttons.)
Comment 7 Stefan Dirsch 2006-03-06 13:35:05 UTC
Any volunteers to improve xmodmap?
Comment 8 Stefan Dirsch 2006-03-06 13:37:10 UTC
Example with my 9 button (really?) mouse:

# xmodmap -e "pointer = 1 2 3"
xmodmap:  commandline:1:  bad number of buttons, must have 9 instead of 3
xmodmap:  1 error encountered, aborting.
# xmodmap -e "pointer = 1 2 3 4 5 6 7 8 9"
#
Comment 9 Stefan Dirsch 2006-03-06 15:32:52 UTC
Created attachment 71396 [details]
Patch

# ./xmodmap -e "pointer = 3 2 1"
Warning: Wrong number of buttons given (should be 9 instead of 3).
Warning: Only setting the first 3 buttons.
Warning: Using the old values for the remaining buttons.
# echo $?
0
Comment 10 Stefan Dirsch 2006-03-06 16:57:37 UTC
Submitted for STABLE. Fixed for Beta8.
Comment 11 Matthias Hopf 2006-03-08 14:51:34 UTC
Should be patched upstream.
Reopening and assigning to myself.
Comment 12 Stefan Dirsch 2006-03-08 14:58:37 UTC
Thanks for taking care of this one.
Comment 13 Matthias Hopf 2006-03-22 14:18:58 UTC
Created attachment 74467 [details]
Updated patch

Simpler warning message.
This is going upstream.
Comment 14 Stefan Dirsch 2006-03-22 14:42:08 UTC
I'll use this patch as well for our xorg-x11 package.
Comment 15 Matthias Hopf 2006-03-22 15:15:13 UTC
Submitted upstream.