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

[macosx] Native activation is not changed when focusing other frame's owned window

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7u4
    • 7u4
    • client-libs
    • b11
    • x86
    • os_x
    • Verified

      Say, there's a frame F0 with an owned window. There's also a frame F1.
      When F1 is active and the window is clicked it does receive focus, all the
      focus/activation events generated are correct, though the frame F1 remains
      natively active (has a highlighted title), while the frame F0 should actually
      become such.

      Here's the test case:

      import java.awt.*;
      import java.awt.event.*;
      import java.awt.event.AWTEventListener;

      public class Test {
          public static void main(String[] args) {
              
              Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
                  public void eventDispatched(AWTEvent e) {
                      System.err.println(e);
                  }
              }, FocusEvent.FOCUS_EVENT_MASK |
                 WindowEvent.WINDOW_FOCUS_EVENT_MASK |
                 WindowEvent.WINDOW_EVENT_MASK);
              
              Frame f0 = new Frame("f0");
              Frame f1 = new Frame("f1");
              Window w = new Window(f0);
              Button b = new Button("button");
              
              f0.setBounds(0, 0, 100, 100);
              f1.setBounds(300, 0, 100, 100);
              w.setBounds(0, 300, 100, 100);
              w.add(b);

              f1.setVisible(true);
              f0.setVisible(true);
              w.setVisible(true);
          }
      }

            ant Anton Tarasov (Inactive)
            ant Anton Tarasov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: