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

[macosx] Cursor does not update properly when in fullscreen mode on Mac

    XMLWordPrintable

Details

    • b96
    • os_x

    Description

      FULL PRODUCT VERSION :
      java version " 1.7.0_07 "
      Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
      Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Mac OS X 10.7.4
      Darwin Kernel Version 11.4.0: RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      When entering fullscreen mode on Mac OSX, the cursor does not update properly anymore. For example, in fullscreen mode the cursor to resize the components of a split pane is not visible anymore when hovering over the divider.
      Note that the functionality to resize the components of the split pane is still working: when click/dragging the divider, resizing occurs as expected. The cursor is then also changed to the proper cursor, but again does not update properly when releasing the mouse.

      REGRESSION. Last worked in version 6u31

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Create a JFrame
      2. Put a JSplitPane on the JFrame
      3. Enable FullScreenMode through the Apple API
      4. Run application and enter fullscreen mode
      5. Try hovering over the divider of the split pane.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The mouse updates properly when in fullscreen mode on the Mac (e.g. to a resize cursor when hovering over the divider of an split pane)
      ACTUAL -
      The mouse does not update properly when in fullscreen mode (e.g. the mouse remains an arrow when hovering over the divider of a split pane)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.Color;
      import java.awt.Dimension;

      import javax.swing.JFrame;
      import javax.swing.JList;
      import javax.swing.JPanel;
      import javax.swing.JSplitPane;

      import com.apple.eawt.FullScreenUtilities;

      public class FullScreenOSXBug extends JPanel {

        private JSplitPane splitPane;
        
        public FullScreenOSXBug()
        {
          splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
                                     new ListPanel(), new ListPanel());
          splitPane.setOneTouchExpandable(true);
          splitPane.setPreferredSize(new Dimension(400, 200));
        }
        
        public JSplitPane getSplitPane()
        {
          return splitPane;
        }
        
        private class ListPanel extends JPanel
        {
          public ListPanel()
          {
            String[] items = { " Item 1 " , " Item 2 " , " Item 3 " };
            JList list = new JList(items);
            add(list);
            list.setBackground(Color.orange);
            setBackground(Color.white);
            list.setPreferredSize(new Dimension(100, 100));
          }
        }

        private static void createAndShowGUI()
        {
            JFrame frame = new JFrame( " Fullscreen OSX Bug " );
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            FullScreenOSXBug splitPaneDemo = new FullScreenOSXBug();
            frame.getContentPane().add(splitPaneDemo.getSplitPane());
            FullScreenUtilities.setWindowCanFullScreen(frame, true);
            frame.pack();
            frame.setVisible(true);
        }

        public static void main(String[] args)
        {
            javax.swing.SwingUtilities.invokeLater(new Runnable()
            {
                public void run()
                {
                    createAndShowGUI();
                }
            });
        }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Did not find any workaround yet.

      Attachments

        Issue Links

          Activity

            People

              pchelko Petr Pchelko (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: