On Wed, 24 Jul 2024 05:12:17 GMT, Abhishek Kumar <[email protected]> wrote:

> In GTKPainter.paintPopupMenuBackground method, `img != null` condition will 
> always be true, because it's only checked after `img.getRGB` method is called 
> and that means img can't be `null`.  So, the null check condition is removed. 
> CI testing is ok.

src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java line 
617:

> 615:                 if (border == img.getRGB(w / 2, h / 2)) {
> 616:                     // fix no menu borders in Adwaita theme
> 617:                     Graphics g2 = img.getGraphics();

I guess we can do `if (!isHw && img!=null)`
Also the comment that it is done for Adwaita theme, shouldn't then this code 
block be done in native after checking what theme is effective now, as this may 
affect Yaru or other theme potentially, no?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20308#discussion_r1689192916

Reply via email to