Commit b5d17438 authored by Luis Javier Merino's avatar Luis Javier Merino Committed by Tomaz Canabrava
Browse files

Support DECSET 1003 mouse move tracking

Mode 1003 reports all mouse movement.  Support it in Konsole.

BUG: 391967
BUG: 416530
BUG: 423333
parent 027e8c15
......@@ -855,9 +855,9 @@ void Vt102Emulation::processToken(int token, int p, int q)
//Note about mouse modes:
//There are four mouse modes which xterm-compatible terminals can support - 1000,1001,1002,1003
//Konsole currently supports mode 1000 (basic mouse press and release) and mode 1002 (dragging the mouse).
//TODO: Implementation of mouse modes 1001 (something called hilight tracking) and
//1003 (a slight variation on dragging the mouse)
//Konsole currently supports mode 1000 (basic mouse press and release), mode 1002 (dragging the mouse)
//and mode 1003 (moving the mouse).
//TODO: Implementation of mouse mode 1001 (something called hilight tracking).
//
case token_csi_pr('h', 1000) : setMode (MODE_Mouse1000); break; //XTERM
......@@ -1068,6 +1068,10 @@ void Vt102Emulation::sendMouseEvent(int cb, int cx, int cy, int eventType)
return;
}
if (cb == 3 && getMode(MODE_Mouse1002)) {
return;
}
// With the exception of the 1006 mode, button release is encoded in cb.
// Note that if multiple extensions are enabled, the 1006 is used, so it's okay to check for only that.
if (eventType == 2 && !getMode(MODE_Mouse1006)) {
......
......@@ -1255,10 +1255,6 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
processFilters();
_filterChain->mouseMoveEvent(this, ev, charLine, charColumn);
// for auto-hiding the cursor, we need mouseTracking
if (ev->buttons() == Qt::NoButton) {
return;
}
// if the program running in the terminal is interested in Mouse Tracking
// events then emit a mouse movement signal, unless the shift key is
......@@ -1285,6 +1281,11 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
return;
}
// for auto-hiding the cursor, we need mouseTracking
if (ev->buttons() == Qt::NoButton) {
return;
}
if (_dragInfo.state == diPending) {
// we had a mouse down, but haven't confirmed a drag yet
// if the mouse has moved sufficiently, we will confirm
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment