Copy image bytes to clipboard to survive application exit#222
Copy image bytes to clipboard to survive application exit#222kjozsa wants to merge 2 commits intoAlexanderVanhee:masterfrom
Conversation
|
@AlexanderVanhee I consider this the most important improvement of my PRs, because this allows the workflow like |
|
Thank you for your patch submission, Your changes don’t seem to fix this on my end. I think the issue is probably just that the app is closing before it finishes copying the image to the clipboard. The actual fix might be to delay closing the app window until the copying is done, similar to how it works with the “Copy and Close” exit preference. For now, I think your best option for your specific workflow is to switch to the aforementioned “Copy and Close” exit method in the preferences menu. |
|
Can you check your logs while trying out this branch? Does it fall to any of the 2 fallback cases for you? On my setup (GNOME over Wayland on Arch linux) the primary case runs successfully, copying the image bytes to the system clipboard buffer, and it does the trick.. Honestly, I did not discover the Copy and Close preference. It's actually the ideal way to handle my scenario, but unfortunately it does not work for me with the stable released Gradia - clipboard remains empty after close.. Is it the same issue? Are you testing on Wayland? |
|
I'm on Fedora Wayland, it never reaches the fall-backs on my end. Does copying work without you closing? Could you also try the latest patch from the master branch? |
|
Copying and keeping Gradia open makes it work, I can paste it to Slack for example. I believe closing the app after copying does not work, because the ContentProvider gets dismissed on app close, while pushing the actual pixbuf bytes to the clipboard remains there. |
|
With 1.11.1 both copy after close and copy-on-close works for me with the upstream code - closing this PR. |
Hi Alexander, I see that the "copy to clipboard" function stops working once I exit Gradia. I fixed that, according to my local testing now the copied screenshot remains in the buffer even after exiting Gradia..
Hope you like that changes and it gets into the next release!