Package: imwheel
Version: 1.0.0pre12-7
Severity: normal

Hi,

I found out I get some extra ButtonRelease events when running imwheel
while inspecting why a browser behaves erratically when I click a
mouse button.

Here's my .imwheelrc:

------------------------------------------------------------
#".*Event Tester$"
#, Thumb2, Button2

".*Konqueror$"
, Thumb1, Control_L|W

".*KNode$"
, Thumb1, space

".*Iceweasel"
, Thumb1, Control_L|W
------------------------------------------------------------

When I run xev (with its entry in .imwheelrc commented out), I get
output like the following for every time I press Thumb2(=Button9):

------------------------------------------------------------
LeaveNotify event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 437302273, (165,75), root:(169,104),
    mode NotifyGrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 16

EnterNotify event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 437302282, (165,75), root:(169,104),
    mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 16

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  77  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

ButtonPress event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 437302284, (165,75), root:(169,104),
    state 0x10, button 9, same_screen YES

ButtonRelease event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 437302290, (165,75), root:(169,104),
    state 0x10, button 9, same_screen YES

ButtonRelease event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 437302399, (165,75), root:(169,104),
    state 0x10, button 9, same_screen YES
------------------------------------------------------------

Note the duplicate ButtonRelease. There should be only one. I don't
get these if I'm not running imwheel.

Now if I uncomment the xev specific thing in .imwheelrc, I get output
like this:

------------------------------------------------------------
LeaveNotify event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 438177316, (123,62), root:(127,91),
    mode NotifyGrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 16

EnterNotify event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 438177324, (123,62), root:(127,91),
    mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 16

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  77  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

ButtonPress event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 438177325, (123,62), root:(127,91),
    state 0x10, button 2, same_screen YES

ButtonRelease event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 438177332, (123,62), root:(127,91),
    state 0x210, button 2, same_screen YES

ButtonRelease event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 438177490, (123,62), root:(127,91),
    state 0x10, button 9, same_screen YES
------------------------------------------------------------

Notice how the ButtonRelease event for Thumb2 is still somehow coming
through. That's the one that should be omitted.

Here's imwheel's debug output from the case where the xev stuff is
still commented out:

------------------------------------------------------------
Allocating 6 names
display=:0.0
getRC:filename="/home/sliedes/.imwheelrc"
uid=1000 euid=1000
gid=1000 egid=1000
/home/sliedes/.imwheelrc: stats.st_uid=1000 stats.st_gid=1000 stats.st_mode=1a4
getRC:pre:line:
#".*Event Tester$"
getRC:pre:line:
#, Thumb2, Button2
getRC:pre:line:

getRC:pre:line:
".*Konqueror$"
getRC:win:line:"".*Konqueror$""
id=".*Konqueror$"
getRC:pre:line:
, Thumb1, Control_L|W
getRC:mod:line:",Thumb1,Control_L|W"
Priority: 0
Keysym mask: ""
Button: "Thumb1"
        =8
Keysyms Out: "Control_L|W"
0) "Control_L" "W"
1) "W" "(null)"
getRC:pre:line:

getRC:pre:line:
".*KNode$"
getRC:win:line:"".*KNode$""
id=".*KNode$"
getRC:pre:line:
, Thumb1, space
getRC:mod:line:",Thumb1,space"
Priority: 0
Keysym mask: ""
Button: "Thumb1"
        =8
Keysyms Out: "space"
0) "space" "(null)"
getRC:pre:line:

getRC:pre:line:
".*Iceweasel"
getRC:win:line:"".*Iceweasel""
id=".*Iceweasel"
getRC:pre:line:
, Thumb1, Control_L|W
getRC:mod:line:",Thumb1,Control_L|W"
Priority: 0
Keysym mask: ""
Button: "Thumb1"
        =8
Keysyms Out: "Control_L|W"
0) "Control_L" "W"
1) "W" "(null)"
WinAction (0x5127b0):
        Priority         : 0
        Window Regex     : ".*Konqueror$"
        Keysyms Mask (0x512730):
        Button           : 8
        Keysyms Out (0x512750) :
                "Control_L"
                "W"
        Reps: 1
        Rep Delay: 0
        Key Up Delay: 0
WinAction (0x5127e8):
        Priority         : 0
        Window Regex     : ".*KNode$"
        Keysyms Mask (0x5126b0):
        Button           : 8
        Keysyms Out (0x5126d0) :
                "space"
        Reps: 1
        Rep Delay: 0
        Key Up Delay: 0
WinAction (0x512820):
        Priority         : 0
        Window Regex     : ".*Iceweasel"
        Keysyms Mask (0x5128c0):
        Button           : 8
        Keysyms Out (0x5128e0) :
                "Control_L"
                "W"
        Reps: 1
        Rep Delay: 0
        Key Up Delay: 0
Grab buttons!
Grabbing Button 4...
Grabbing Button 5...
Grabbing Button 6...
Grabbing Button 7...
Grabbing Button 8...
Grabbing Button 9...
starting loop...
isUsedButton(9)=yes
Keymap status:

XModifierKeymap:
        [0,00] 50 0x32 "Shift_L"
        [0,01] 62 0x3e "Shift_R"
        [1,00] 66 0x42 "Caps_Lock"
        [2,00] 37 0x25 "Control_L"
        [2,01] 109 0x6d "Control_R"
        [3,00] 64 0x40 "Alt_L"
        [3,01] 125 0x7d "(null)"
        [3,02] 156 0x9c "(null)"
        [4,00] 77 0x4d "Num_Lock"
        [6,00] 127 0x7f "(null)"
        [6,01] 128 0x80 "(null)"
        [7,00] 93 0x5d "Mode_switch"
        [7,01] 113 0x71 "ISO_Level3_Shift"
        [7,02] 124 0x7c "ISO_Level3_Shift"
getInput: Button=9
ButtonPress:window=4000001(4d)
resource name        ="(null)"
class name           ="(null)"
findWA:button=100
No Match for : win="Event Tester" res="(no window)" class="(no window)"
ButtonPress
findWA:button=9
input button(9) doesn't match rule-button(8)
input button(9) doesn't match rule-button(8)
input button(9) doesn't match rule-button(8)
No Match for : win="Event Tester" res="(no window)" class="(no window)"
Taking default action.
doWA:
WinAction (0x7fff7031b3b0):
        Priority         : 0
        Window Regex     : "Event Tester"
        Keysyms Mask (0x7fff7031b460):
        Button           : 9
        Keysyms Out (0x7fff7031b440) :
                "Button9 "
        Reps: 1
        Rep Delay: 0
        Key Up Delay: 0
rep=0
Ungrab buttons!
Ungrabbing Button 4...
Ungrabbing Button 5...
Ungrabbing Button 6...
Ungrabbing Button 7...
Ungrabbing Button 8...
Ungrabbing Button 9...
setbit:n=1,1 val=1
Grab buttons!
Grabbing Button 4...
Grabbing Button 5...
Grabbing Button 6...
Grabbing Button 7...
Grabbing Button 8...
Grabbing Button 9...
doWA: keyup delay=0
Ungrab buttons!
Ungrabbing Button 4...
Ungrabbing Button 5...
Ungrabbing Button 6...
Ungrabbing Button 7...
Ungrabbing Button 8...
Ungrabbing Button 9...
setbit:n=1,1 val=0
Grab buttons!
Grabbing Button 4...
Grabbing Button 5...
Grabbing Button 6...
Grabbing Button 7...
Grabbing Button 8...
Grabbing Button 9...
isUsedButton(9)=yes
Keymap status:

XModifierKeymap:
        [0,00] 50 0x32 "Shift_L"
        [0,01] 62 0x3e "Shift_R"
        [1,00] 66 0x42 "Caps_Lock"
        [2,00] 37 0x25 "Control_L"
        [2,01] 109 0x6d "Control_R"
        [3,00] 64 0x40 "Alt_L"
        [3,01] 125 0x7d "(null)"
        [3,02] 156 0x9c "(null)"
        [4,00] 77 0x4d "Num_Lock"
        [6,00] 127 0x7f "(null)"
        [6,01] 128 0x80 "(null)"
        [7,00] 93 0x5d "Mode_switch"
        [7,01] 113 0x71 "ISO_Level3_Shift"
        [7,02] 124 0x7c "ISO_Level3_Shift"
getInput: Button=9
ButtonPress:window=4000001(4d)
resource name        ="(null)"
class name           ="(null)"
findWA:button=100
No Match for : win="Event Tester" res="(no window)" class="(no window)"
ButtonPress
findWA:button=9
input button(9) doesn't match rule-button(8)
input button(9) doesn't match rule-button(8)
input button(9) doesn't match rule-button(8)
No Match for : win="Event Tester" res="(no window)" class="(no window)"
Taking default action.
doWA:
WinAction (0x7fff7031b3b0):
        Priority         : 0
        Window Regex     : "Event Tester"
        Keysyms Mask (0x7fff7031b460):
        Button           : 9
        Keysyms Out (0x7fff7031b440) :
                "Button9 "
        Reps: 1
        Rep Delay: 0
        Key Up Delay: 0
rep=0
Ungrab buttons!
Ungrabbing Button 4...
Ungrabbing Button 5...
Ungrabbing Button 6...
Ungrabbing Button 7...
Ungrabbing Button 8...
Ungrabbing Button 9...
setbit:n=1,1 val=1
Grab buttons!
Grabbing Button 4...
Grabbing Button 5...
Grabbing Button 6...
Grabbing Button 7...
Grabbing Button 8...
Grabbing Button 9...
doWA: keyup delay=0
Ungrab buttons!
Ungrabbing Button 4...
Ungrabbing Button 5...
Ungrabbing Button 6...
Ungrabbing Button 7...
Ungrabbing Button 8...
Ungrabbing Button 9...
setbit:n=1,1 val=0
Grab buttons!
Grabbing Button 4...
Grabbing Button 5...
Grabbing Button 6...
Grabbing Button 7...
Grabbing Button 8...
Grabbing Button 9...
------------------------------------------------------------

I tried to debug this myself, but it got a bit too difficult to me,
not being very familiar with libX11. However I managed to write a test
program that grabs the mouse button and discards all events to test if
there's something wrong with the X server (i.e. if I still would get
that ButtonRelease event) after I couldn't find the fault in imwheel.
With that program running, I don't get the ButtonRelease event. I get
this every time I press the grabbed button:

------------------------------------------------------------
LeaveNotify event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 438476394, (71,54), root:(75,83),
    mode NotifyGrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 16

EnterNotify event, serial 31, synthetic NO, window 0x4000001,
    root 0x4d, subw 0x0, time 438476565, (71,54), root:(75,83),
    mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 16

KeymapNotify event, serial 31, synthetic NO, window 0x0,
    keys:  77  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
------------------------------------------------------------

So it seems to me that the ButtonRelease somehow comes from imwheel or
comes through when the buttons are not grabbed.

        Sami


-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages imwheel depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libx11-6                    2:1.0.3-5    X11 client-side library
ii  libxmu6                     1:1.0.2-2    X11 miscellaneous utility library
ii  libxtst6                    1:1.0.1-5    X11 Testing -- Resource extension 

imwheel recommends no packages.

-- no debconf information

Attachment: signature.asc
Description: Digital signature

Reply via email to