love icon indicating copy to clipboard operation
love copied to clipboard

Feature request: write image to clipboard

Open Yolwoocle opened this issue 3 years ago • 7 comments

Currently, love.system.setClipboardText only supports text, and not images. I would appreciate it if we could write images to the clipboard too, in the same way selecting part of an image in MS Paint, then pasting it onto a different program, works.

Yolwoocle avatar Jan 25 '22 09:01 Yolwoocle

What about OS cross-compatibility? How would this work on Linux / OSX?

Even Windows has a pretty complicated clipboard system if you looked into it, Linuxes don't even have just one option in regards to the clipboard implementation (and more importantly, the interface).

zorggn avatar Jan 25 '22 09:01 zorggn

How does LÖVE handle clipboard on Linux right now? Would implementing this be dissimilar to how setClipboardText currently works?

Yolwoocle avatar Jan 26 '22 08:01 Yolwoocle

It just calls SDL's SDL_SetClipboardText function. SDL does not have a clipboard API for content that isn't text, so unless that gets added to SDL (I don't think there are plans for that at the moment), there's not much love's own code can do.

slime73 avatar Jan 26 '22 12:01 slime73

There's a feature request in SDL's issue tracker for it now: https://github.com/libsdl-org/SDL/issues/7625

slime73 avatar Apr 19 '23 19:04 slime73

SDL has implemented it.

Are there any major blockers for the move to SDL3?

learn-more avatar Mar 25 '24 14:03 learn-more

Yes, the major blocker is that SDL3 is not released yet and won't be for several months at least.

I have a branch that conditionally uses SDL3 when love is compiled to use it, and I hope we can switch to fully using SDL3 everywhere for love 12's release, but that branch needs more testing and I won't make a final love 12.0 release depend on an unreleased SDL version, so we'll have to see how SDL3's release goes.

I also expect the first few SDL 3 releases will have a lot more bugs than SDL2 has right now, since so much has changed.

slime73 avatar Mar 25 '24 15:03 slime73

Yes, the major blocker is that SDL3 is not released yet and won't be for several months at least.

I have a branch that conditionally uses SDL3 when love is compiled to use it, and I hope we can switch to fully using SDL3 everywhere for love 12's release, but that branch needs more testing and I won't make a final love 12.0 release depend on an unreleased SDL version, so we'll have to see how SDL3's release goes.

I also expect the first few SDL 3 releases will have a lot more bugs than SDL2 has right now, since so much has changed.

My bad, I assumed that it was released already.

learn-more avatar Mar 25 '24 16:03 learn-more