Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4124896

AWT Motif Frame assumes will receive X11 ReparentNotify event

XMLWordPrintable

    • b01
    • generic, unknown
    • generic
    • Not verified

        This is an AWT regression bug appearing in 1.1.6.
        The bug is that the Motif native code implementing Frame assumes
        it is running under a reparenting window manager.

        This assumption is usually true, but in fact any X application that
        cannot run without the presence of a window manager is buggy.
        Furthermore not all window managers will reparent, and there is at least
        one important case involving a PC X server where this is so.

        The bug appears to be introduced as a result of a fix to bug 4095525

        This apparently moved important code (most probably a reshape call) to
        inside a case block where a ReparentNotify event is received.

        If this event is not received, then the window does not display properly.

        To reproduce the problem:

        Run the X server without any window manager:
        1. To do this, exit from CDE/Openwindows, login at the command
             line console prompt.
             Put these 2 lines in $HOME/.xinitrc file:

        $OPENWINHOME/lib/openwin-sys # OpenWindows system initialization
                /usr/openwin/bin/xterm

        2. Start the X server from the command line:
             % /usr/openwin/bin/xinit
             This will give you one xterm in which you can reproduce the problem
             as follows.

        3. After compiling, run the following test case using 1.1.6.
             The window is displayed but appears empty (no "hi there" button)
             This works with using 1.1.5.

             
             To run it:

        % javac FTest.java
        % java FTest

        ------------------------------ FTest.java ------------------------------

        import java.awt.*;

        public class FTest extends Frame {

                public FTest()
                {
                        setTitle("FT");
                        setSize(100,100);
                        setLayout(new FlowLayout());
                        Button b = new Button("hi there");
                        add(b, BorderLayout.CENTER);
                }

                public static void main(String[] args)
                {
                        FTest t = new FTest();
                        t.setVisible(true);
                }
        }

        ------------- End Forwarded Message -------------


              herrick Andy Herrick (Inactive)
              mchansunw Mei Chan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: