After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683729 - Spurious mouse release is reported when Shift is held down
Spurious mouse release is reported when Shift is held down
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.32.x
Other Linux
: Normal trivial
: ---
Assigned To: VTE Maintainers
VTE Maintainers
[fixed-next]
Depends on:
Blocks:
 
 
Reported: 2012-09-10 15:51 UTC by Egmont Koblinger
Modified: 2014-04-06 18:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested fix (316 bytes, patch)
2012-09-10 17:01 UTC, Egmont Koblinger
committed Details | Review

Description Egmont Koblinger 2012-09-10 15:51:32 UTC
Enable mouse reporting, e.g. by echo -n $'\e[?1000h' (or its 1002 counterpart).

Hold down the Shift modifier, click and hold the mouse button, drag the mouse, release the mouse button, release Shift -> nothing is reported in the terminal, as expected. (Highlighting is performed by the terminal itself).

Now omit the dragging part. While holding Shift, just click and release the mouse button. The release event is reported to the application (although click isn't). This might confuse applications, and is not logical at all. In accordance with xterm, such release shouldn't be reported.
Comment 1 Egmont Koblinger 2012-09-10 17:01:00 UTC
Created attachment 223932 [details] [review]
Suggested fix

I hope this patch is the right solution for the problem. Maybe a comment
 explaining what goes on, or a more explicit
  if (terminal->pvt->selecting_after_threshold) {
    return TRUE;
  }
  return FALSE;
might make it cleaner, not sure.

pvt->selecting is only set when dragging starts, but the _vte_terminal_maybe_end_selection method should also return TRUE to signal that it has done its job if this is still FALSE but vte->selecting_after_threshold is TRUE meaning that a Shift-Click has already occurred.
Comment 2 Christian Persch 2012-10-12 20:07:33 UTC
Makes sense; fixed on 0-34 and next. Thanks for the patch!