Posted to tcl by aspect at Wed Jul 01 07:32:24 GMT 2015view pretty

package require Tk
foreach ev {Enter Leave Button-1 Button-2 Button-3} {
	bind . <$ev> "puts {<$ev> on %W}"
}

# click once in the window and observe the events generated for each button.
#
# Expected:  click once with button $N -> single event:
#   Button-$N
#
# Unexpected: click once with button 1 -> extra events:
#   Leave
#   Enter
#   Button-1
#
# unexpected behaviour witnessed on linux xorg + spectrwm window manager.
# Only with Button-1.  Enter/Leave otherwise seem to behave normally.
# Could not replicate by exchanging wm for metacity or mutter.