#1000 Spurious events received by clients on mouse click.

future release
open
Mathias Gumz
None
5
2013-03-10
2011-01-24
xlq
No

Behaviour: When a window is clicked on by the left mouse button, the window receives these events, in this order: LeaveNotify, EnterNotify, KeymapNotify, ButtonPress, ButtonRelease.
Expected result: The window should receive ButtonPress, then ButtonRelease. This is the result I get with other window managers (tried: xfce4's window manager, and lwm)

Pressing mouse buttons 2-5 produces the expected result. I have tested with a default fluxbox configuration, i.e. no ~/.fluxbox directory.)

Steps to reproduce:
1. start xev
2. click inside xev with mouse button 1

Fluxbox version: 1.1.1
X.org version: 1.9.2
Architecture: x86_64
Distro: Arch Linux

Sample xev output:

EnterNotify event, serial 34, synthetic NO, window 0x1c00001,
root 0x15a, subw 0x0, time 4230384, (2,111), root:(729,134),
mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
focus YES, state 256

KeymapNotify event, serial 34, synthetic NO, window 0x0,
keys: 90 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 34, synthetic NO, window 0x1c00001,
root 0x15a, subw 0x0, time 4230384, (2,111), root:(729,134),
state 0x0, button 1, same_screen YES

ButtonRelease event, serial 34, synthetic NO, window 0x1c00001,
root 0x15a, subw 0x0, time 4230888, (2,111), root:(729,134),
state 0x100, button 1, same_screen YES

Note: the first value in the KeymapNotify event is sometimes 2, sometimes 90 and sometimes 0. It seems to change only after changing window focus.

Discussion

  • Mathias Gumz
    Mathias Gumz
    2011-01-25

    any special stuff (mouse related) in your .fluxbox/keys?

     
  • xlq
    xlq
    2011-01-25

    I have in .fluxbox/keys lines like "OnTitlebar Mouse1 :HideMenus" - nothing more special than that.

    Besides, I started fluxbox as a different user, with no ~/.fluxbox directory at all - same problem.

     
  • arclance
    arclance
    2011-09-26

    I am also seeing this bug in Ubuntu 11.04 when using fluxbox 1.3.1 and the builds on the nightly repository.
    Here is a pastebin with the xev output for all the buttons on my mouse (Logitech G500) http://pastebin.com/yS9RNFF2 .
    Here is a link to my .fluxbox/keys file if you want to check it for something strange http://pastebin.com/kBp5cbW8 .
    This is the only cause I can think of for this bug in hugin (left click not detected when trying to drag in the fast preview window) which I only see when using fluxbox https://bugs.launchpad.net/hugin/+bug/797370 .

     
  • Mathias Gumz
    Mathias Gumz
    2013-03-10

    • assigned_to: Mathias Gumz
    • milestone: --> future release
     
  • This bug also affects me. I get the following event order when clicking the xev window:

    LeaveNotify
    EnterNotify
    KeymapNotify
    ButtonPress
    ButtonRelease

    I'm happy to do additional tests. So far I tried to disable clickRaises and enabled focus follows mouse – both didn't change anything.