]> git.lyx.org Git - lyx.git/commit
Only set dummy X11 selection if we do not own it
authorScott Kostyshak <skostysh@lyx.org>
Sat, 28 Mar 2020 01:23:08 +0000 (21:23 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Wed, 6 May 2020 12:29:00 +0000 (08:29 -0400)
commit7a158055fe6c05763f88ddb61a9c02b42614091d
treeef714c5d7ca43141b474bbb1a56200c6dd97dd44
parent584550a73222cd3d3add446253975c3af376799b
Only set dummy X11 selection if we do not own it

Before, we would continually set the selection to the empty string,
to maintain ownership. This causes problems with clipboard managers
GPaste and CopyQ. Further, in theory this should have better
performance since checking ownership should be faster than setting.

A disadvantage of this change is that the timestamp of the selection
will be old at this point in the code. However, when the selection
is requested, we put the selection contents at that point so the
selection timestamp should be accurate then. Further, the selection
contents are not accurate at this point in the code (they are just
the empty string), so it is not clear whether having an accurate
timestamp is beneficial.

Fixes #11715.

(cherry picked from commit af4ee1a487c4d899b71df02ba57c2f024fea6786)
(cherry picked from commit 23abb5aaa36af07aadfa5e565869104778ba0d6d)
src/frontends/qt4/GuiSelection.cpp
status.23x