-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement clipboard_get
/has_image
for X11
#81439
Conversation
53ad45b
to
3a6dc74
Compare
With further testing, it seems particularly large images do trigger the incremental transfer mechanism (which I didn't experience in testing), and the incremental transfer does not work reliably. I'm looking into it now. |
df5ed07
to
1b51b1f
Compare
Large file transfers should now be fixed, |
1a6ddae
to
a22427c
Compare
b82d675
to
e4ccb10
Compare
clipboard_get
/has_image
for X11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/code quality review. Looks great overall, at least as far as X11 API usage can look ;)
@Setadokalo Please let us know if you'll be able to address the review comments any time soon! Maintainers can finish it on your behalf if you are not available or don't respond. |
Could you squash the commits? See PR workflow for instructions. |
I'm currently rewriting the last part of that function as I think you're right about it potentially double-freeing |
58ce319
to
3b5a9e3
Compare
Thanks! And congrats for your first merged Godot contribution 🎉 |
Following up on the work done in #63826, this implements
clipboard_has_image()
andclipboard_get_image()
on the X11 backend. This copies a lot of structure from the existingclipboard_get
implementation.This also only implements png-based clipboard transfers, but that seems to be how the windows implementation works too. Other file types shouldn't be too hard to implement, but every app I've tested with supports png target, even when the original file is a jpg or some other image type.
This is my first time working with X11 APIs, so testing from other linux users would be greatly appreciated!