[LyX/master] Revert "Revert "Only set dummy X11 selection if we do not own it""
Scott Kostyshak
skostysh at lyx.org
Tue May 4 16:25:37 UTC 2021
commit 5d96ee69eb9173779932575cb6d6ce70db9860b9
Author: Scott Kostyshak <skostysh at lyx.org>
Date: Tue May 4 12:33:30 2021 -0400
Revert "Revert "Only set dummy X11 selection if we do not own it""
This reverts commit 1b704b6267bb8144a410c02595887b0731cf4d53.
(the initial reversion was done unintentionally)
---
src/frontends/qt/GuiSelection.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt/GuiSelection.cpp b/src/frontends/qt/GuiSelection.cpp
index 0eb3d51..e10bb47 100644
--- a/src/frontends/qt/GuiSelection.cpp
+++ b/src/frontends/qt/GuiSelection.cpp
@@ -51,9 +51,10 @@ void GuiSelection::haveSelection(bool own)
// an application actually requests it.
// This way calling Selection::have() is cheap and we can do it as
// often as we want.
- //LYXERR(Debug::SELECTION, "GuiSelection: setting dummy selection");
- if (own)
+ if (own && !qApp->clipboard()->ownsSelection()) {
+ LYXERR(Debug::SELECTION, "GuiSelection: setting dummy selection");
qApp->clipboard()->setText(QString(), QClipboard::Selection);
+ }
// We don't need to do anything if own = false, as this case is
// handled by QT.
// FIXME (gb): This is wrong. What is missing here is rather a call of
More information about the lyx-cvs
mailing list