JDK-6191341 : Choice's popup doesn't show up
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS:
    generic,linux,linux_redhat_3.0,solaris_9 generic,linux,linux_redhat_3.0,solaris_9
  • CPU: generic,x86,sparc
  • Submitted: 2004-11-05
  • Updated: 2012-03-23
  • Resolved: 2004-12-06
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 6
6 b15Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
Run the test below, XAWT, Mustang b10.  Choice's popup doesn't show up on a screen.  Not reproducible in Tiger.  Mustang regression.

public class Test extends java.awt.Frame {
    public static void main(String[] args) throws Exception {

        Test test = new Test();

        java.awt.Choice choice = new java.awt.Choice();
        choice.add("Choices");
        choice.add("one");
        choice.add("two");
        choice.add("three");
        choice.add("four");
        choice.add("five");

        test.add(choice, 0);
        test.setBounds(50, 50, 100, 100);
        test.setVisible(true);
    }
}

###@###.### 2004-11-05 10:20:22 GMT

Comments
SUGGESTED FIX ------- XChoicePeer.java ------- *** /tmp/sccs.PXtVbK 2004-11-09 17:00:40.000000000 +0300 --- XChoicePeer.java 2004-11-09 16:48:44.000000000 +0300 *************** *** 519,527 **** // Override so we can do our own create() public void preInit(XCreateWindowParams params) { super.preInit(params); ! // Reset parent window, bounds(we'll set them later), set overrideRedirect ! params.add(PARENT_WINDOW, (long)0); params.remove(BOUNDS); params.add(OVERRIDE_REDIRECT, Boolean.TRUE); } --- 519,530 ---- // Override so we can do our own create() public void preInit(XCreateWindowParams params) { + // A parent of this window is the target, at this point: wrong. + // Remove parent window; in the following preInit() call we'll calculate as a default + // a correct root window which is the proper parent for override redirect. + params.delete(PARENT_WINDOW); super.preInit(params); ! // Reset bounds(we'll set them later), set overrideRedirect params.remove(BOUNDS); params.add(OVERRIDE_REDIRECT, Boolean.TRUE); } ###@###.### 2004-11-09 14:01:15 GMT
09-11-2004

EVALUATION Test runs okay after un-patch files XBaseWindow.java and XlibWrapper.c, seems to be a regression of 5108694. ###@###.### 2004-11-05 13:27:16 GMT A few pieces of code with override-redirect windows depend on the value of correct root window for the screen which should be their parent. This value is calculated in a certain preInit() in XWindow.java. In 51086694, we did remove wrong re-calculation of the parent second time in XBaseWindow, after that preInit(). However popup of the Choice does depend on this re-calculation since it resets the parent window value at some point. Fix to this should be to move this necessary reset up the stream before XWindow.preInit(). ###@###.### 2004-11-09 14:00:33 GMT
05-11-2004