On Wed, 14 Jun 2023 07:32:51 GMT, Tejesh R <t...@openjdk.org> wrote:

>> When a frame is dragged from one screen to another screen, the 
>> `GraphicsConfigurations` may vary depending on screen/monitor. However, 
>> transparency has to be maintained since it is expected as it is set. So the 
>> fix addresses in maintaining the translucency capability when frame is moved 
>> from one screen to another screen. For main screen, translucency is set when 
>> `setBackground` is called, but for second screen the same is not taken care. 
>> Hence setting of Translucency Capable `GC` is taken care when screen switch 
>> happens. The fix handles only for non-opaque windows alone retaining the 
>> behavior for opaque windows. 
>> The fix is verified in CI for regression check, which is Green.
>
> Tejesh R has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Updated based on review comments

src/java.desktop/macosx/classes/sun/lwawt/macosx/CFileDialog.java line 205:

> 203:     public GraphicsConfiguration getAppropriateGraphicsConfiguration(
> 204:             GraphicsConfiguration gc)
> 205:     {

Could you please move the brace to the line 204 to match the overall style of 
the file?

src/java.desktop/share/classes/java/awt/Window.java line 3223:

> 3221:                     getDefaultScreenDevice().
> 3222:                     getDefaultConfiguration();
> 3223:         }

It looks like `gc` was always not null before the fix, which is no longer true 
after the fix.
We need to double check that we didn't break anything in this regard.

src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java line 240:

> 238:             XToolkit.awtUnlock();
> 239:         }
> 240:     }

The same code is already in XCanvasPeer.

XWindowPeer is a descendant of XCanvasPeer, there is no need to repeat the code 
here.

src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java line 671:

> 669:         return gc;
> 670:     }
> 671: 

Same here, WWindowPeer is a WCanvasPeer descendant.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14246#discussion_r1231559438
PR Review Comment: https://git.openjdk.org/jdk/pull/14246#discussion_r1231650769
PR Review Comment: https://git.openjdk.org/jdk/pull/14246#discussion_r1231640268
PR Review Comment: https://git.openjdk.org/jdk/pull/14246#discussion_r1231640811

Reply via email to