JDK-8226964 : [Yaru] GTK L&F: There is no difference between menu selected and de-selected
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 8u192,11,12,13
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2019-06-27
  • Updated: 2020-01-23
  • Resolved: 2019-08-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14 JDK 8 Other
11.0.5-oracleFixed 13 b33Fixed 14Fixed 8u231Fixed openjdk8u232Fixed
Related Reports
Duplicate :  
Testsuite name:JCK manual
Product tested:JDK 13b26(64bit)/JCK13b08

Actual behavior:
1)There is no difference between menu selected and de-selected.Please refer to JMenu-selected.png & JMenu-de-selected.png

2)Without option, there is no such issue. Please refer to JMenu-selected-no-option.png & JMenu-de-selected-no-option.png

3)JDK13b26/JCK13b09 with the same option ,failed as the same issue
Fix Request (8u) I would like to backport this patch to 8u, as it is on Oracle 8u backport list. JDK13 patch applies cleanly after file path changes.

Fix Request (11u) I would like to backport this patch to 11u, as it is on Oracle 11u backport list. JDK13 patch applies cleanly.

URL: https://hg.openjdk.java.net/jdk/jdk13/rev/2b38409a336e User: pbansal Date: 2019-08-03 08:25:34 +0000

jdk-13-fix-yes: approved for JDk 13 - phil.

jdk13-fix-request: This is a request to fix the rendering issue in GTKLookAndFeel Menu with gtk3

I have been working on the issue and this is my observation This is only reproducible on Ubuntu 19.04 and 18.10. This is working fine on Ubuntu 18.04 and OEL 7.5. So this is failing on "Yaru" gtk theme. OEL7.5 has Adwaita and Ubuntu 18.04 has Ambiance as default themes. If switch the theme in Ubuntu 19.04 and 18.10 to "Adwaita", it works fine. So this is definitely only reproducible with "Yaru" theme. I have seen that same code is used to highlight Menu and Menu_Item. paintMenuItemBackground is used by both Menu and Menu_Item. Interestingly, this code is working fine for Menu_Item. If you create a Menu and add a Menu_Item, Menu_Item is getting highlighted properly on "Mouse Hover". While drawing of Menubar, this same function is used to highlight the selected Menubar and it is not working there. So same code is working while rendering Menu_Item mouse hover highlight, it is not working while rendering MenuBar selected highlight. I have attached a reproducer MenuSelectionTest.java Still working on this to find what can be reason for this behavior.

I am able to reproduce this on Ubuntu 19.04 with jdk8-231b01 with gtk3. It works fine with gtk2.

This looks like https://bugs.openjdk.java.net/browse/JDK-8226591 (which I think was incorrectly closed as a dup of JDK-8226590) But this test is a JCK test ...