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

Do not swallow right button presses on double-click

As explained by magiblot at the bug below, "When double clicking with
the right button, the sequences sent to the application in the terminal
are DOWN-UP-UP instead of DOWN-UP-DOWN-UP."

BUG: 425926
parent 16d0df1f
......@@ -1576,9 +1576,6 @@ void TerminalDisplay::mouseDoubleClickEvent(QMouseEvent* ev)
return;
}
if (ev->button() != Qt::LeftButton) {
return;
}
if (_screenWindow.isNull()) {
return;
}
......@@ -1592,13 +1589,17 @@ void TerminalDisplay::mouseDoubleClickEvent(QMouseEvent* ev)
if(!_readOnly) {
// Send just _ONE_ click event, since the first click of the double click
// was already sent by the click handler
Q_EMIT mouseSignal(0, charColumn + 1,
Q_EMIT mouseSignal(ev->button() == Qt::LeftButton ? 0 : 2, charColumn + 1,
charLine + 1 + _scrollBar->value() - _scrollBar->maximum(),
0); // left button
0);
}
return;
}
if (ev->button() != Qt::LeftButton) {
return;
}
_screenWindow->clearSelection();
_iPntSel = pos;
_iPntSel.ry() += _scrollBar->value();
......
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