Bug 122239 - Primary selection does not work under KDE
Summary: Primary selection does not work under KDE
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
6.2.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Jan-Marek Glogowski
URL:
Whiteboard: target:6.4.0 target:6.3.0.1
Keywords:
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2018-12-21 09:41 UTC by Kriton Kyrimis
Modified: 2019-06-18 05:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kriton Kyrimis 2018-12-21 09:41:42 UTC
If i select some text in a terminal, then middle click somewhere in writer or calc, the contents of the clipboard are pasted instead of the primary selection.

If I select some text within LibreOffice, then middle click again in LibreOffice, the selected text is pasted. However, if I middle click in a terminal, the original primary selection is pasted, instead of the selected text.

It looks like LibreOffice is using some other clipboard instead of the primary selection.

The problem appears when using the KDE interface. If I run LibreOffice using OOO_FORCE_DESKTOP=gnome, the primary selection is used correctly.
Comment 1 Michael Weghorn 2018-12-21 19:38:18 UTC
Confirmed with

Version: 6.3.0.0.alpha0+
Build ID: 5df6e8e399a1634c7e8dfe3558fc8fcdac3fcb09
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: kde5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded

See also bug 120625 comment 2, which mentions that "CnP to/from system clipboard is still a bit flaky", which may or may not refer to the same issue.
Comment 2 Michael Weghorn 2019-02-23 11:35:37 UTC
Update - see also bug 122689, in particular bug 122689 comment 6 for more details. 

Using primary selection to copy from other applications works by now, while using primary selection to copy from LibreOffice to other applications at least doesn't work from Writer.
Comment 3 Vera Blagoveschenskaya 2019-03-01 13:21:56 UTC
Please consult with test-cases from 
https://bugs.documentfoundation.org/show_bug.cgi?id=122689#c12

See 1.1.1-1.2.2.
Comment 4 Katarina Behrens (Inactive) 2019-05-07 08:15:11 UTC
I unassigned this bug intentionally because I realized can't fix it, please don't reassign back to me ffs
Comment 5 Xisco Faulí 2019-05-07 08:16:52 UTC
(In reply to Katarina Behrens (CIB) from comment #4)
> I unassigned this bug intentionally because I realized can't fix it, please
> don't reassign back to me ffs

ouch sorry, my bad
Comment 6 Jan-Marek Glogowski 2019-06-01 05:01:45 UTC
Just an info for potential testers: there is now https://gerrit.libreoffice.org/#/c/73288 (be aware that it depends on two refactoring patches; see related changes in Gerrit, which eventually will be merged much earlier then this fix!)

BUT: it's a major rewrite of the whole Clipboard handling. If you have time for tests, I would appreciate feedback, but it's definitely just for testing, so expect bugs.

Either post feedback to Gerrit or here. Thanks.
Comment 7 Commit Notification 2019-06-13 21:20:41 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/bcca1cf28cbd6c961d59bd8b8a8e58184dfc3823%5E%21

tdf#122239 Qt5 implement lazy clipboard handling

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-06-18 05:42:02 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/8c42f9841e4dcccdcb4f194660d79e1ed316f850%5E%21

tdf#122239 Qt5 implement lazy clipboard handling

It will be available in 6.3.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.