Skip to content

Add clipboard_set_image for Windows, MacOS, X11, and Wayland - #125805

Open
deakcor wants to merge 1 commit into
godotengine:masterfrom
deakcor:dev_clipboard_set_image
Open

deakcor wants to merge 1 commit into
godotengine:masterfrom
deakcor:dev_clipboard_set_image

Conversation

@deakcor

@deakcor deakcor commented Nov 25, 2026

Copy link
Copy Markdown
Contributor
godot_clipboard_set_image_preview

Following proposal #7899, I saw there is the PR #86021 but still the method clipboard_set_image needed to be implemented, so added :

clipboard_set_image to set clipboard content to the given image.

Only implemented for Windows, MacOS, X11 and Wayland (like for clipboard_has/get_image methods).

Here a code to try quickly (just add 2 TextureRect in the scene) :

print(DisplayServer.clipboard_has_image())
DisplayServer.clipboard_set_image($TextureRect.texture.get_image())
print(DisplayServer.clipboard_has_image())
$TextureRect2.texture = ImageTexture.create_from_image(DisplayServer.clipboard_get_image())

@deakcor
deakcor requested review from a team as code owners November 25, 2026 16:39
@AThousandShips

Copy link
Copy Markdown
Member

Please note that we do not accept feature PRs from new contributors, please see this

@AThousandShips AThousandShips changed the title clipboard_set_image method for Windows, MacOS, X11 and Wayland clipboard_set_image method for Windows, MacOS, X11, and Wayland Nov 25, 2026
@AThousandShips AThousandShips changed the title clipboard_set_image method for Windows, MacOS, X11, and Wayland Add clipboard_set_image for Windows, MacOS, X11, and Wayland Nov 25, 2026
@AThousandShips AThousandShips added this to the 4.x milestone Nov 25, 2026
@deakcor

deakcor commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Please note that we do not accept feature PRs from new contributors, please see this

Noted, I already worked on clipboard get/has methods 4 years ago : #63826. But yes I understand it's the amount of contributions which matter.

@bruvzg
bruvzg self-requested a review November 25, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants