Invert the logic for Mouse Tracking events

Authored by ahmadsamir on May 28 2018, 12:19 PM.

Description

Invert the logic for Mouse Tracking events

Summary:
Previously the logic was to set "usesMouse" (Emulation
MODE_Mouse100{0,1,2,3}) to false to indicate that the program running
in the terminal supports handling mouse events itself, i.e. the program
is interested in receiving Mouse Tracking events; or set to true otherwise.

Since this was confusing, use the inverse logic by replacing "usesMouse"
with "usesMouseTracking".

"usesMouseTracking" is set to true when the program running in the shell
indicates it's interested in receiving Mouse Tracking events. Or false
otherwise.

For example, vim indicates it's interested in receiving Mouse Tracking
evnets when using visual mouse mode:
http://vimdoc.sourceforge.net/htmldoc/intro.html#Normal

Mouse Tracking is an XTerm extension, for more information examine:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking

Test Plan:
Before:

  • Execute printf '\e[?1003h' to enable mouse tracking mode in konsole, now when you move the mouse events will be sent to the terminal when you move, click, drag the mouse
  • Pressing and holding the Shift key should let the mouse act as normal
  • Open a new tab or execute printf 'e[?1003l', then open any file in vim, :set mouse=a then select some text with the mouse, note that VISUAL is displayed at the bottom of the window; right clicking _doesn't_ show the context menu as you'd expecte
  • Pressing and holding the Shift key should let the mouse act as normal

Apply the diff, build, and try again, everything should work as before.

Reviewers: Konsole, hindenburg

Reviewed By: Konsole, hindenburg

Subscribers: hindenburg, konsole-devel, Konsole

Tags: Konsole

Differential Revision: https://phabricator.kde.org/D13134

Details

Committed
hindenburgMay 28 2018, 1:27 PM
Reviewer
Konsole
Differential Revision
D13134: Invert the logic for Mouse Tracking events
Parents
R319:3e42f1177ae2: Refine tab bar settings UI string
Branches
Unknown
Tags
Unknown