RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3]

Phil Race prr at openjdk.java.net
Fri Apr 8 16:22:29 UTC 2022


On Fri, 8 Apr 2022 06:49:16 GMT, Maxim Kartashev <duke at openjdk.java.net> wrote:

>> src/java.desktop/unix/classes/sun/awt/X11/XCanvasPeer.java line 90:
>> 
>>> 88:             XToolkit.awtUnlock();
>>> 89:         }
>>> 90:     }
>> 
>> I am not sure I understand the purpose of this method, it requests the current device for the GC, then requests the screen index of the device, and then request device by the screen index, what is the reason to do that? Why we cannot just use the device from the GC?
>
> This is just a named copy of lines 67 to 75. Since now this is the only piece of code that needs to work holding the AWT lock, I thought it best to isolate it.
> As I understand, the purpose of the piece is to find the "new" `X11GraphicsDevice` with the screen number same to the given "old" `GraphicsConfiguration`.

I don't understand why this was extracted out. It isn't called anywhere else and again makes the diff harder to understand.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7182



More information about the client-libs-dev mailing list