JDK-8226790 : GTK L&F: The windows title bar have two window control buttons and there is no maximize control
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 13
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_ubuntu
  • CPU: x86
  • Submitted: 2019-06-21
  • Updated: 2019-07-30
  • Resolved: 2019-06-27
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 13
13Resolved
Related Reports
Duplicate :  
Description
Testsuite name: Swing manual
Test name(s): Swing_AllComponents/Manual/LAFTests/JFrameLAFTest  
Product(s) tested:OracleJDK13b25(64bit)/tonga-4.0.2-rc2
OS/architecture:ubuntu19.04-x64
option: -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel

Actual behavior:
1.step4:The windows title bar have two window control buttons and there is no maximize control.Refer to JFrameLAFTest-base13b24.jpg
2.The test failed as the same issue on ubuntu19.04-x64/OracleJDK13b25 without the option. 
3.The test failed as the same issue on ubuntu18.04-x64/OracleJDK13b25 with the same option.
Comments
This is another case where the bug is reported almost by accident. The test is supposed to use the System L&F which it expects to be GTK L&F on Linux. The resource bundle with the test instructions for Linux / Gnome window manager say that when resize is disabled, there are just two buttons, which is what is displayed by the WM on Ubuntu. But when we pick up Metal as the system L&F due to not recognising the Gnome desktop, then the test picks up the resource bundle for Metal as well. And THOSE instructions say there should be 3 buttons with the maximise button greyed out. This is complete nonsense since Metal has no control over how the desktop window manager renders the titlebar. so there is a test bug here. But because of that test bug then a bug was filed which eventually leads us to the real problem that the wrong L&F is being used.
27-06-2019

[~tmeng] can you please tell if it starts failing with jdk13b21 as you told it is passing with jdk13b19 and fails with jdk13b25.
27-06-2019

ok .. I don't know exactly how this test is doing what it is doing but it must adjust the instructions based on what it thinks the system does or the L&F in use and with JDK13 b25 ends up saying three buttons must be there because Metal is in use, but based on the desktop it should be GTK in use. Still sounds weird to me but I'd love to know where it chooses the resource file. If anyone can work that out I'd like to hear it. However this probably is going to be resolved by 8226783 even though I haven't been able to work out how the test decides which resource to use. resource "grep" below ... prrace@prrubuntu:~/sqe_tests/swing_jdk10$ find . -type f -exec grep "three window control buttons, maximize" {} \; -print <li>Check window title bar: should have three window control buttons, maximize button should be disabled, all should \ ./src/Swing_AllComponents/Manual/LAFTests/JFrameLAFTest/resources/JFrameLAFTestNew_Metal.properties prrace@prrubuntu:~/sqe_tests/swing_jdk10$ find . -type f -exec grep "iconify & close" {} \; -print <li>Check whether the two buttons should be iconify & close and it should align to \ ./src/Swing_AllComponents/Manual/LAFTests/JFrameLAFTest/resources/JFrameLAFTestNew_Windows.properties <li>Check whether the two buttons should be iconify & close and it should align to \ ./src/Swing_AllComponents/Manual/LAFTests/JFrameLAFTest/resources/JFrameLAFTestNew_GTK.properties <li>Check whether the two buttons should be iconify & close and it should be aligned to \ ./src/Swing_AllComponents/Manual/LAFTests/JFrameLAFTest/resources/JFrameLAFTestNew_Motif.properties <li>Check whether the two buttons should be iconify & close and it should align to \ ./src/Swing_AllComponents/Manual/LAFTests/JFrameLAFTest/resources/JFrameLAFTestNew_Aqua.properties <li>Check whether the two buttons should be iconify & close and it should be aligned to \ ./src/Swing_AllComponents/Manual/LAFTests/JFrameLAFTest/resources/JFrameLAFTestNew_Nimbus.properties
27-06-2019

> 7)There is no such issue on JDK13b19/ubuntu19.04. Please provide a screenshot of it displaying as you think it should.
26-06-2019

> The test failed automatically on JDK8b132/ubuntu19.04 with the option.The detail refer to 8b132-JFrameLAFTest.log Meaning GTK could not be loaded. When you run on JDK 13 using -Djdk.gtk.verbose=true -Djdk.gtk.version=2.2 what happens ? I am wondering if like in another bug report you don't have GTK 2.2 on this system ? If that is some new "default" install for 19.04 I guess we need to know. But it may be irrelevant to what you are reporting > 8)The test failed as the same issue on JDK13b25/ubuntu18.04 without the option. So you mean it fails with Metal as well as GTK on JDK 13 but JDK 12 was fine for both these cases. I guess I don't know why this is a LAF test since the Frame is owned by the Window Manager So could this be an AWT regression ? Needs to be evaluated.
26-06-2019

> 2.The test failed as the same issue on ubuntu19.04-x64/OracleJDK13b25 without the option. Meaning it fails with Metal ? Please add a screen shot of this as I am a bit surprised at that. I read this issue as looking like we fail to render the greyed-out version of the maximise icon which I'd think is a GTK-specific issue. > 3.The test failed as the same issue on ubuntu18.04-x64/OracleJDK13b25 with the same option. Maybe this isn't a regression. What about JDK 12 on Ubuntu 18.04 ? Does it also fail with and without the option ?
21-06-2019