GNOME Bugzilla – Bug 338194
during fast wheel scrolling application gets double click signals
Last modified: 2007-02-05 17:17:16 UTC
Please describe the problem: When application handles scroll wheel events and user scrolls quickly by the scroll wheel, application gets double-click events in addition to scroll wheel events. In xterm it works correctly. Steps to reproduce: 1. run mc in gnome-terminal 2. Scroll quickly over long listing Actual results: MC gets scrolling events and some double click events. It causes opening of some directories or files in mc. Expected results: Only scrolling events. Does this happen every time? Yes. Other information: With xterm the same works: 1. run mc in xterm 2. Scroll quickly over long listing
In addition to this fact, gnome-terminal should probably scroll, if Shift+mouse wheel is used. Related: bug 13299
I'm not sure if it's a gnome-terminal/vte bug or an mc bug. mc has this false behavior in linux console (gpm) too. Anyway, I just happened to create a patch for this yesterday, I'll post to the mc-devel list soon.
It's already fixed in mc cvs, however, it really only occurs with mc-4.6.1 under gnome-terminal (and console with gpm), not under other terminals. Since it may affect other applications too, it would be nice to see it fixed in vte, so that it doesn't send double-triple click events for the scroll buttons.
Whaat is the mc fix? Does that give us a clue of what's going wrong?
What's going wrong? Other terminal emulators only send single click events for the mouse wheel buttons. Even if you scroll very quickly, they only send lots of single click events. vte sends double, triple click events for the scroll buttons if you scroll quickly. mc 4.6.1 doesn't care which button you double click with, so a double click with the scroll button also causes it to enter a directory. This is a kind of event it never receives under xterm or konsole, only under vte. (I haven't succeeded in configuring mouse wheel in gpm, so I don't know if gpm suffers from this problem or not, anyway, I fixed mc for gpm, too). My patch for mc 4.6.1 is here: https://svn.uhulinux.hu/packages/dev/mc/patches/09-double-click-only-with-first-button.patch It tells mc to only handle double click events if it occurs with the first button. This issue was fixed in mc cvs independently from this and most likely earlier than I created the above patch. I didn't track down this change in cvs, I only tried the cvs version and found that it was working okay.
A fix for this also went into vte for Bug 161479 in r1489.