Summary: | Copy to clipboard doesn't seem to work with default Klipper settings | ||
---|---|---|---|
Product: | [Applications] Spectacle | Reporter: | Matthew Trescott <matthewtrescott> |
Component: | General | Assignee: | Boudhayan Gupta <me> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | abugreporter, bugseforuns, elman, finex, greg, Landgraf132, lueck, mail, nate, null, public, q4ali, schwancarl, spoo-kde, zakhar.nasimov |
Priority: | NOR | ||
Version: | 18.04.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://cgit.kde.org/plasma-workspace.git/commit/?id=edd534e220856befd919814f6a9f2562848e5403 | Version Fixed In: | Applications 19.04.0 on Plasma 5.16.2 or later |
Description
Matthew Trescott
2018-05-01 01:52:53 UTC
To see them in Klipper you have to turn on image support first: right-click on the clipboard icon in your system tray and choose "Configure Clipboard". Then uncheck "Ignore Images". Still, that doesn't explain why it isn't automatically put in the X11 clipboard. Are you quitting Spectacle after the copy operation? > turn on image support first That should only be needed if you don't keep Spectacle open when pasting the image. > Are you quitting Spectacle after the copy operation? That's the question I'm also interested in. Yes, I have been closing Spectacle. Should I file a bug against Klipper about changing the defaults? Thanks, glad we could figure that out. > Should I file a bug against Klipper about changing the defaults? Nate brought this up before, but due to memory usage that's a no-go (see https://phabricator.kde.org/D9117#202712). *** Bug 393932 has been marked as a duplicate of this bug. *** *** Bug 394479 has been marked as a duplicate of this bug. *** *** Bug 394859 has been marked as a duplicate of this bug. *** Reopening, because this is an issue many users are struggling with. At least we need to add a warning message for 18.08. IIRC, David suggested adding a special thingy to the MIME type in spectacle's clipboard data (Or something like that, I can't recall the technical details) that would make Klipper add it to the clipboard even with the "Ignore Images" checkbox checked. Did that seem like a reasonable plan to you? I also wonder whether it really is a bad idea after all to change the default setting in Klipper. It would certainly make it use more memory, but, well, isn't that what memory is for? Being used? Unless Klipper fails to let go under severe memory pressure, there might not be an issue here (and if so, we should probably make Klipper smarter about letting go of old images when the system is under memory pressure). Please (re-)read the whole discussion on Phab before commenting and repeating the same arguments again. I have not yet found a way to avoid the memory penalty (which is quite big compared to the overall memory usage of Plasma, and happens on startup (!) if you used Spectacle in the previous session). I doubt to have time to work on this for 18.08, so I'd suggest we go with a warning message for now. There's no need for rudeness. Not everyone has your elephant-like memory, and we're all friends here. I think that the proposed "x-kde-force-image-copy" tag would work just fine. I'm not sure that this would represent "plainly ignor[ing] their choice for Ignore images" as you put it. Since "Ignore images" is the default setting in Klipper, i'm guessing that 99% of KDE users have not in fact made a conscious choice to use it and so no explicit preference is being overridden. Even those people who do know about the setting and have it checked on purpose are signaling their desire to temporarily override it by using spectacle's "Quit after save or copy" feature. Either way, the user's immediate and specific intent is clearly to copy the image to clipboard, which overrides any previous general intent. Consider this a +1 for David's idea. I think that would be a lot more user-friendly than adding a warning. The potential memory implications of the x-kde-force-image-copy approach seem minor, and easily undoable for people who are obsessed with manually optimizing their memory by clearing klipper's history or removing the image entries (or they could just avoid the feature in the first place). For regular users, I think it would be just what they want and expect. > memory implications of the x-kde-force-image-copy approach seem minor
I even measured it, I don't see how they are "minor" in any way. With the naive approach, this will affect _everyone_, even if they don't use the feature. I won't submit a patch which results blowing up startup memory usage of Plasma, when at the same time David and others are trying to get the memory usage down.
Also, I never said the approach of x-kde-force-image-copy wouldn't work, I simply said that I did not yet work on making it more efficient. For example, Klipper could only store a single image with that tag, and don't save it for the next session at all.
However, that's more complicated to implement, so it might need more time (unless you send a patch yourself).
The x-kde-force-image-copy approach affects even people who don't use the feature? Yes, everyone using the global shortcut or "Copy to Clipboard", regardless of the state of "Quit after Copy" (since you can quit manually). And since this overrides "Ignore images", there is not even a way to turn it off. As I said, this needs more thought to make it work right, the naive approach won't cut it. Couldn't we add x-kde-force-image-copy to the MIME data only if "Quit after save or copy" was checked (or when activated via a global shortcut, should https://phabricator.kde.org/D9117 be merged)? That would at least fix this bug. Perhaps we should check with David whether the potential memory expenditure is worthwhile rather than assuming that it isn't. He was the one who originally proposed this approach, after all. It's not like this is a totally useless expenditure of RAM either: what's being proposed is the addition of a desirable feature. Sometimes features (especially image-related features) use memory, the the whole point of having a desktop environment is to enable features that users want. I don't think that making Plasma as memory-lean as possible (An important goal!) means that we need to sacrifice user-requested features because they use additional memory. I have to say I'm really not a fan of the "I'm smarter than you" attitude you're giving off here. All of this may seem obvious to you because you've puzzled it all out, but I would ask you to please stop the condescension. We're just having a discussion here picking up from the points you brought up in https://phabricator.kde.org/D9117#208517. I still think the warning is needed, even if the user does not have "Quit after copy" selected, because the user might just click "Copy" and close the window, without knowing that the screen shot will not survive. @cfeck: Exactly.
> Couldn't we add x-kde-force-image-copy to the MIME data only if "Quit after
> save or copy" was checked
As I said, users can manually quit Spectacle. Why would manually quitting remove the image from the clipboard, while automatically quitting keep it? That's highly confusing. Also, this won't solve the memory problem in any way.
We don't have a conceptual problem here, only one of implementing it properly in Klipper.
As can be read on Phab, David does not like increasing memory usage (and I don't either, but that doesn't seem to matter to you).
The only other short-term alternative to the warning message I have is disabling the quite-after-copy feature, but surely you won't like that either.
Hi. Maybe you could make and option for Klipper to run in the background? I believe Shutter does that. Also I tried to work with Spectacle without closing it and found different bug. If I have Spectacle opened in the background, pressing PrtSc does nothing. It should bring Spectacle to the front and make new screenshot. Here's an idea: maybe we could have Klipper only retain a maximum of one image at a time that's tagged with x-kde-force-image-copy? @elman: > option for Klipper to run in the background Klipper is already running in the background (on Plasma, at least), the problem is how to handle images. > If I have Spectacle opened in the background, pressing PrtSc does nothing. We know about that problem, but as you said, it's a different bug, and thus it should not be discussed here. Please try to find an existing bug, and if there is none, file a new bug. Thanks! --- @Nate: > retain a maximum of one image at a time that's tagged I'm not sure how that's different from what I already wrote in Comment 13: > For example, Klipper could only store a single image with that tag, > and don't save it for the next session at all. I'll now go back to other things, maybe that'll be more productive… *** Bug 397390 has been marked as a duplicate of this bug. *** (In reply to Christoph Feck from comment #17) > I still think the warning is needed, even if the user does not have "Quit > after copy" selected, because the user might just click "Copy" and close the > window, without knowing that the screen shot will not survive. I was filling a bug about the image missing from clipboard (with "Quit after Save or Copy" is selected) when I've found this one :-) Now I've enabled klipper to keep images so the problem has been solved. The warning message looks like a good workaround until a different solution will be found. (In reply to elman from comment #19) > Also I tried to work with Spectacle without closing it and found different > bug. If I have Spectacle opened in the background, pressing PrtSc does > nothing. It should bring Spectacle to the front and make new screenshot. I've often had this problem too. Is this a Spectacle bug or is this related to how KDE/Plasma manage global shortcuts? *** Bug 400478 has been marked as a duplicate of this bug. *** https://bugs.kde.org/show_bug.cgi?id=393708 looks like a duplicate? That's this bug. :) (In reply to Nate Graham from comment #26) > That's this bug. :) Sorry wrong number, should have been https://bugs.kde.org/show_bug.cgi?id=402118 *** Bug 402118 has been marked as a duplicate of this bug. *** Git commit 6a178a5b4e65fc0b8cc8ade20e923c25f027c6c1 by Nate Graham, on behalf of Karlo Dautović. Committed on 26/03/2019 at 18:08. Pushed by ngraham into branch 'Plasma/5.15'. Change default Klipper behavior to accept images Summary: Change the default Klipper behavior in order for https://phabricator.kde.org/D19715 to work. Klipper will save images to clipboard, but unless Ignore Images is unchecked in the options, it won't save them to clipboard history. Reviewers: #plasma_workspaces, davidedmundson Reviewed By: #plasma_workspaces, davidedmundson Subscribers: ngraham, davidedmundson, plasma-devel, #plasma_workspaces Tags: #plasma Differential Revision: https://phabricator.kde.org/D19852 M +11 -2 klipper/klipper.cpp https://commits.kde.org/plasma-workspace/6a178a5b4e65fc0b8cc8ade20e923c25f027c6c1 *** Bug 405189 has been marked as a duplicate of this bug. *** Git commit ec5e918743e7a260cb5288699e611bd47ed70b28 by Nate Graham, on behalf of Karlo Dautović. Committed on 26/03/2019 at 18:33. Pushed by ngraham into branch 'Applications/19.04'. Add option to copy screenshot to clipboard in background mode Summary: Related: bug 385559 FIXED-IN: 19.04.0 Reviewers: #spectacle, ngraham Reviewed By: #spectacle, ngraham Subscribers: ngraham, davidre, #spectacle Tags: #spectacle Differential Revision: https://phabricator.kde.org/D19715 M +11 -2 src/ExportManager.cpp M +1 -1 src/ExportManager.h M +2 -1 src/Gui/KSMainWindow.cpp M +7 -1 src/Main.cpp M +17 -8 src/SpectacleCore.cpp M +2 -1 src/SpectacleCore.h https://commits.kde.org/spectacle/ec5e918743e7a260cb5288699e611bd47ed70b28 Git commit 2661e44ed6493a08b87b4dddacda678bed2bcbf3 by Nate Graham. Committed on 26/03/2019 at 22:07. Pushed by ngraham into branch 'Applications/19.04'. Make "Quit after copy" feature work This was included in a new feature that wasn't appriate for the stable branch, but this part of it is a bugfix that should be in the 19.04 release M +4 -1 src/ExportManager.cpp https://commits.kde.org/spectacle/2661e44ed6493a08b87b4dddacda678bed2bcbf3 *** Bug 405927 has been marked as a duplicate of this bug. *** My bug 405189 is still reproducible with Spectacle 19.04 + Plasma 5.15.4 on Arch Linux. Can we reopen this bug? Or should I reopen my bug? :( *** Bug 407106 has been marked as a duplicate of this bug. *** Fixed for realsies with https://cgit.kde.org/plasma-workspace.git/commit/?id=edd534e220856befd919814f6a9f2562848e5403 |