On Sat, 9 Apr 2022 09:35:39 GMT, Maxim Kartashev <d...@openjdk.java.net> wrote:

>>>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 am not sure that we can have some "old" and "new" devices which have the 
>> same screen id.
>>  * If the list of devices was not changed then the "screenid" for old device 
>> is the index of that "old" device in the device array. So the new and old 
>> devices are the same.
>>  * If the list of devices was changed, then the "screenid" for the old 
>> device was invalidated, and it is again an index of that "old" device in the 
>> device array. Also I do not think that we can change the "requested device" 
>> in this method, The purpose of this method is to request the best "GC" from 
>> the device passed as a parameter(via another GC).
>> 
>> Please take a look to the fix for JDK-6804747, initially that method get the 
>> screen index as a parameter, and then replaced by the GC. The code of the 
>> method did not changed but the index just requested from the GC.
>> 
>> Probably the code is just buggies?
>
> @mrserb I agree with your logic, but fixing this now would certainly be not a 
> semantically null change and would complicate the fix that has already been 
> under review for over two months. I'd be happy to file a bug for this 
> separate issue.

The separate CR would be fine.

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

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

Reply via email to