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

Mouse cursor shape not updated after JFrame resize

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0u5
    • client-libs
    • other
    • linux

      OPERATING SYSTEM(S)
      Linux running KDE (Red Hat EL4 and SuSE SLES9 tested)
      FULL JDK VERSION(S):
      java version "1.5.0_05"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode)
      java version "1.6.0-ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b42)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b42, mixed mode)
      DESCRIPTION:
      1. On a linux system running KDE, run the following java test:
      //===========================================================================
      import javax.swing.*;
      import java.awt.*;
      class SimpleSplitPane extends JFrame {
          SimpleSplitPane() {
              super("SimpleSplitPane");
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              /*
               * Centre the frame on the screen
               */
              int width = 400;
              int height = 400;
              Dimension sz = Toolkit.getDefaultToolkit().getScreenSize();
              this.setBounds((sz.width - width)//2,(sz.height - height)/2,width,height);
              setSize(width, height);
              getContentPane().add(new JSplitPane());
              show();
          }
          static public void main(String[] args) {
              new SimpleSplitPane();
          }
      }
      //===========================================================================
      2. Hover the mouse over the split pane divider. Notice it changes to the
      double-ended arrow as expected.
      3. Resize the window by dragging the left hand side (or by maximizing it).
      4. Hover the mouse over the split pane divider. Notice that the mouse shape
      does not change into the expected double-ended arrow.
      5. Move the mouse over the old location of the split pane divider. If you find
      the right place on the screen, the mouse pointer will change to the double ended
      arrow.
      I think this problem is caused by the fact that, when you resize by dragging the
      left hand side of the window, the window location changes because the window
      'origin' has moved (the upper left corner). However the XConfigureNotify events
      that are sent to the window do not reflect this. Therefore the code in
      sun.awt.X11.XBaseWindow.handleConfigureNotifyEvent() does not correctly update
      the window position.
      You can see the parameters in the XConfigureNotify events using the 'xev'
      utility. Run xev and resize the test window that opens - a summary of each X
      event is printed on the console.

            dav Andrei Dmitriev (Inactive)
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: