On Thu, 15 Oct 2026 20:03:57 GMT, Andy Goryachev <[email protected]> wrote:
>> Enables importing of images from the clipboard into the RichTextModel by >> adding a data format handler for the DataFormat.IMAGE mime type. >> >> This change includes new utility added by >> [JDK-8390345](https://bugs.openjdk.org/browse/JDK-8390345). >> >> Note: the banana slug image is a public domain added with author's >> permission [0]. >> >> ## References >> >> [0] https://en.wikipedia.org/wiki/Banana_slug >> >> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Andy Goryachev has updated the pull request incrementally with one additional > commit since the last revision: > > restore stderr Marked as reviewed by lkostyra (Reviewer). It took some more time to dig out what is happening but I have the answer finally. TLDR it's not because of this change, but because of an old Clipboard bug. We have those reported already: https://bugs.openjdk.org/browse/JDK-8388511 https://bugs.openjdk.org/browse/JDK-8386121 https://bugs.openjdk.org/browse/JDK-8223425 and honestly probably even the very old enhancement request https://bugs.openjdk.org/browse/JDK-8091635 could resolve that if completed. I think it could've been a fluke on your ends, but when pasting the clipboard data on my machine the alpha channel is set to 0. This pastes and displays the image as fully transparent. I did a very quick-and-hacky check in `GlassClipboard.cpp` and added a loop to force-set alpha to 255 and the image pastes correctly now. Since we do have this reported I won't create yet another JBS bug. As for this one, LGTM. ------------- PR Review: https://git.openjdk.org/jfx/pull/2224#pullrequestreview-5599569375 PR Comment: https://git.openjdk.org/jfx/pull/2224#issuecomment-6315790967
