Bug 329174 - Lost copied text after close application
Summary: Lost copied text after close application
Status: RESOLVED UPSTREAM
Alias: None
Product: klipper
Classification: Applications
Component: general (show other bugs)
Version: 5.1.1
Platform: Mint (Ubuntu based) Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Flöser
URL: https://codereview.qt-project.org/101845
Keywords:
: 341850 345326 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-23 22:56 UTC by Cade
Modified: 2016-08-02 11:57 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cade 2013-12-23 22:56:30 UTC
Copied text was lost, if you close application.

Reproducible: Always

Steps to Reproduce:
1. Open file manager.
2. Open any text file in any text editor.
3. Copy any text (Ctrl+C).
4. Close text editor.
5. Press Ctrl+v to paste test in other application.
Actual Results:  
Nothing happens: text not pasted.

Expected Results:  
Paste just copied text.

I try check "Configure Klipper" -> "General" -> "Prevent empty clipboard",
but this does not help.
Comment 1 AnAkkk 2014-09-17 13:33:37 UTC
I have the same issue on 3 of my computers running Plasma 5.
Comment 2 Martin Flöser 2014-12-10 06:32:41 UTC
This is a regression in Qt which is addressed with code review request: https://codereview.qt-project.org/101845
Comment 3 Hrvoje Senjan 2014-12-11 02:26:18 UTC
Martin, many thanks for fixing this! This was one of few grave usability bugs in Plasma5...
(and i can confirm the above patch resolves the problem)

It would be great if you could mail packagers so they could maybe backport it?
At least i've already done so on openSUSE
Comment 4 Martin Flöser 2014-12-12 07:19:43 UTC
> It would be great if you could mail packagers so they could maybe backport
> it?

I don't think this is an important enough change to notify the packagers about it .

Setting to RESOLVED UPSTREAM as the problem is fixed upstream in Qt and will be part of Qt 5.4.1.
Comment 5 Hrvoje Senjan 2014-12-13 18:22:03 UTC
*** Bug 341850 has been marked as a duplicate of this bug. ***
Comment 6 Emmanuel Pescosta 2015-03-20 11:43:24 UTC
Looks like this bug can still be reproduced sometimes even with Qt 5.4.1

See https://bugs.kde.org/show_bug.cgi?id=345326
Comment 7 Martin Flöser 2015-03-20 11:57:45 UTC
(In reply to Emmanuel Pescosta from comment #6)
> Looks like this bug can still be reproduced sometimes even with Qt 5.4.1

yes, code review request exists: https://codereview.qt-project.org/#/c/106729/
Comment 8 Emmanuel Pescosta 2015-03-20 12:03:42 UTC
*** Bug 345326 has been marked as a duplicate of this bug. ***
Comment 9 Emmanuel Pescosta 2015-03-20 12:07:03 UTC
(In reply to Martin Gräßlin from comment #7)
> yes, code review request exists:
> https://codereview.qt-project.org/#/c/106729/

Ah sorry, I thought that this patch has already been merged into Qt 5.4 (comment 6).

Thanks for fixing it, looking forward to 5.4.2 :)
Comment 10 EMR_Kde 2015-09-17 13:29:48 UTC
I am running Qt 5.5 and klipper is still broken. I copy text, and it makes it into Klipper, but I try and paste, and nothing will paste. I select the item from Klipper's history but there is still no checkbox next to it. I have to select something else in the history list (which will show a checkbox) *then* can select what I just copied and paste it.
Comment 11 Martin Flöser 2015-09-17 14:50:43 UTC
what checkboxes? The new ui doesn't have checkboxes? Are you using the old implementation?
Comment 12 xdmx 2015-10-11 19:50:27 UTC
I'm experiencing this bug as well under Arch linux with kde and plasma 5 and qt 5.5 (everything is up to date).
I have both the clipboard plasmoid and klipper and tried to keep both and only one of them open but the clipboard is lost after I close the application:
- I copy a text in kate
- I close kate
- I see the text in the clipboard history but I can't paste it using ctrl+v
Comment 13 Christos Gourdoupis 2016-03-25 01:39:13 UTC
plasma 5.5.5, qt 5.5.1 not using any clipboard facility
Copy some text in kwrite and close it.
Open another instance and paste. Nothing happens.
Comment 14 Martin Flöser 2016-03-25 16:08:04 UTC
(In reply to Christos Gourdoupis from comment #13)
> plasma 5.5.5, qt 5.5.1 not using any clipboard facility

What do you mean by that? You are not using the clipboard applet? If yes that's expected: the task of the applet is exactly to prevent losing the copied content on application close.
Comment 15 Christos Gourdoupis 2016-03-25 23:12:22 UTC
Ok, I see. So I loaded the applet.
But the problem persists exactly as before.
The text is in the clipboard, but I cannot paste it.
However if there are other entries in the history, I can select another and paste it. 
And then I can select and paste the new one too.
Comment 16 mgolden 2016-03-27 16:41:43 UTC
That is the exact behavior that I originally saw - I believe with firefox. When the application closes the text is lost from the clipboard, but not from klipper, and it can be reselected if another text is chosen in klipper first.
Comment 17 Christos Gourdoupis 2016-03-27 17:07:22 UTC
I have a dual monitor setup and after cleaning up my xorg.conf the problem went away.
Multi-monitor support is broken in kf5 and under some conditions things break and windows start behaving erraticaly. 
At that point, strange things happen to the clipboard too, like not being able to copy from KDE apps at all. Restarting kwin_x11 --replace then brings back the original problem!
So could it be an underlying window manager issue?
Comment 18 EMR_Kde 2016-05-27 00:08:29 UTC
btw, I am running 5.5.5 and still getting the same problems
Comment 19 Martin Flöser 2016-05-30 05:46:21 UTC
(In reply to EMR_Kde from comment #18)
> btw, I am running 5.5.5 and still getting the same problems

with which applications do you see it? There are applications which actively clear the clipboard when closing.
Comment 20 EMR_Kde 2016-05-30 18:25:05 UTC
(In reply to Martin Gräßlin from comment #19)
> (In reply to EMR_Kde from comment #18)
> > btw, I am running 5.5.5 and still getting the same problems
> 
> with which applications do you see it? There are applications which actively
> clear the clipboard when closing.

Yeah, I understand that there are some apps that clear the clipboard, but when they do, all entries are deleted. This is understandable. However, sometimes, and it bugs me because I cannot readily reproduce it, I copy something, and it goes into Klipper, but is not "Checkbox"able (if that's a word). I have to select something underneath it, then select the most recent for it to be copy/pasteable. Next time it happens I'll be keeping an eye at the similarities and post them here.
Comment 21 mgolden 2016-05-31 15:15:49 UTC
This happens quite frequently, possibly every time, with Firefox.  The text appears on the top in klipper, but cannot be pasted.  Choosing another line in klipper, and then selecting back, brings back the selected text.
Comment 22 EMR_Kde 2016-06-01 00:49:58 UTC
So I guess my settings would be pertinent (consdering you've mentioned GTK/Gnome app, I've noted weird copy/paste/select/grab behavior, and it's very annoying in Eclipse).

"Save clipboard contents on Exit" (Checked)
"Prevent empty clipboard" (Checked)
"Ignore Images" (Checked)
"Ignore Selection" (Checked) - I like my double clipboard ;)
"Remove whitespace" (Checked)
"Enable MIME-based actions" (Checked?!) - I have no actions defined though.
Comment 23 H.H. 2016-06-10 07:09:30 UTC
For me the clipboard (klipper) is also seriously broken for quite a while now (qt-5.6.0, newest kde version).

Often the text appears in klipper, but cannot be pasted. Workaround: click "edit-contents" from klippper context menu, and copy the text from there.

Something wrong with the mime-type for applications which only accept text?
Comment 24 EMR_Kde 2016-08-02 11:57:43 UTC
This is still an issue. I have to click on something else in the list, then click back. The data was copied from Firefox.