RFR: 8353950: Clipboard interaction on Windows is unstable
Hendrik Schick
duke at openjdk.org
Mon Apr 14 12:50:32 UTC 2025
On Sun, 13 Apr 2025 16:08:40 GMT, Matthias Bläsing <mblaesing at openjdk.org> wrote:
> - Introduce a lock into WClipboard that protects the code between
> openClipboard/closeClipboard invocations.
> The native side does not allow to open the clipboard multiple
> times or share the opened clipboard between multiple threads.
>
> - Remove of need to call openClipboard/closeClipboard from
> getClipboardFormats by using the win32 call
> GetUpdatedClipboardFormats
>
> - Prevent a race-condition by not registering the connection
> between java and native side of clipboard multiple time, but
> just at construction time.
copyright year update is missing
src/java.desktop/windows/classes/sun/awt/windows/WClipboard.java line 132:
> 130: @Override
> 131: public void closeClipboard() {
> 132: if(clipboardLocked.isLocked()) {
Suggestion:
if (clipboardLocked.isLocked()) {
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24614#issuecomment-2800775858
PR Review Comment: https://git.openjdk.org/jdk/pull/24614#discussion_r2041600926
More information about the client-libs-dev
mailing list