TerminalDisplay: sync the primary selection as it won't be a 3x click

We'd added a delay until the 3x click is resolved, but this meant
that if the middleclick paste happened before that timeout we'd paste
something wrong. This addresses it by also syncing as soon as we realise
that it won't be a 3x click.

CCBUG: 462338
This commit is contained in:
Aleix Pol
2023-02-01 13:18:00 +01:00
parent 668e0ad705
commit a1de740b85

View File

@@ -1125,6 +1125,11 @@ void TerminalDisplay::mousePressEvent(QMouseEvent *ev)
return;
}
if (_needCopyToX11Selection && (ev->button() != Qt::LeftButton)) {
copyToX11Selection();
_needCopyToX11Selection = false;
}
if (_possibleTripleClick && (ev->button() == Qt::LeftButton)) {
_needCopyToX11Selection = false;
mouseTripleClickEvent(ev);