changeset 6471:2dae408e2954

Merge
author vinnie
date Fri, 12 Jul 2013 06:43:54 -0700
parents d8eaf786523d 19e0f7fec24a
children 98d9339ffaa3
files
diffstat 14 files changed, 112 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expand=toggle expand
+toggleexpand=toggle expand
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_de.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expand=ein-/ausblenden
+toggleexpand=ein-/ausblenden
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_es.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_es.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expand=activar/desactivar ampliaci\u00F3n
+toggleexpand=activar/desactivar ampliaci\u00F3n
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_fr.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_fr.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expand=basculer le d\u00E9veloppement
+toggleexpand=basculer le d\u00E9veloppement
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_it.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_it.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expand=abilita/disabilita espansione
+toggleexpand=abilita/disabilita espansione
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_ja.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_ja.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expand=\u30C8\u30B0\u30EB\u5C55\u958B
+toggleexpand=\u30C8\u30B0\u30EB\u5C55\u958B
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_ko.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_ko.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle \uD655\uC7A5=\uD1A0\uAE00 \uD655\uC7A5
+toggleexpand=\uD1A0\uAE00 \uD655\uC7A5
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_pt_BR.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expandir=alternar expans\u00E3o
+toggleexpand=alternar expans\u00E3o
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_sv.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle ut\u00F6ka=v\u00E4xla ut\u00F6ka
+toggleexpand=v\u00E4xla ut\u00F6ka
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_zh_CN.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_zh_CN.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expand=\u5207\u6362\u5C55\u5F00
+toggleexpand=\u5207\u6362\u5C55\u5F00
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/com/sun/accessibility/internal/resources/accessibility_zh_TW.properties	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/com/sun/accessibility/internal/resources/accessibility_zh_TW.properties	Fri Jul 12 06:43:54 2013 -0700
@@ -102,7 +102,7 @@
 #
 # accessible actions
 #
-toggle expand=\u5207\u63DB\u64F4\u5C55
+toggleexpand=\u5207\u63DB\u64F4\u5C55
 
 # new relations, roles and states for J2SE 1.5.0
 
--- a/src/share/classes/java/awt/GraphicsDevice.java	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/java/awt/GraphicsDevice.java	Fri Jul 12 06:43:54 2013 -0700
@@ -296,6 +296,12 @@
                                     bgColor.getBlue(), 255);
                 w.setBackground(bgColor);
             }
+            // Check if this window is in fullscreen mode on another device.
+            final GraphicsConfiguration gc = w.getGraphicsConfiguration();
+            if (gc != null && gc.getDevice() != this
+                    && gc.getDevice().getFullScreenWindow() == w) {
+                gc.getDevice().setFullScreenWindow(null);
+            }
         }
         if (fullScreenWindow != null && windowedModeBounds != null) {
             // if the window went into fs mode before it was realized it may
--- a/src/share/classes/javax/accessibility/AccessibleAction.java	Fri Jul 12 04:11:16 2013 -0700
+++ b/src/share/classes/javax/accessibility/AccessibleAction.java	Fri Jul 12 06:43:54 2013 -0700
@@ -54,7 +54,7 @@
      * @since 1.5
      */
     public static final String TOGGLE_EXPAND =
-        new String ("toggle expand");
+        new String ("toggleexpand");
 
     /**
      * An action which increments a value.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/GraphicsDevice/IncorrectDisplayModeExitFullscreen.java	Fri Jul 12 06:43:54 2013 -0700
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+import java.awt.Color;
+import java.awt.DisplayMode;
+import java.awt.Frame;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsEnvironment;
+import java.awt.Toolkit;
+
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8019587
+ * @author Sergey Bylokhov
+ */
+public class IncorrectDisplayModeExitFullscreen {
+
+    public static void main(final String[] args) {
+
+        final GraphicsDevice[] devices =
+                GraphicsEnvironment.getLocalGraphicsEnvironment()
+                                   .getScreenDevices();
+        if (devices.length < 2 || devices[0].getDisplayModes().length < 2
+                || !devices[0].isFullScreenSupported()
+                || !devices[1].isFullScreenSupported()) {
+            System.err.println("Testcase is not applicable");
+            return;
+        }
+        final DisplayMode defaultDM = devices[0].getDisplayMode();
+        final DisplayMode[] dms = devices[0].getDisplayModes();
+        DisplayMode nonDefaultDM = null;
+
+        for (final DisplayMode dm : dms) {
+            if (!dm.equals(defaultDM)) {
+                nonDefaultDM = dm;
+                break;
+            }
+        }
+        if (nonDefaultDM == null) {
+            System.err.println("Testcase is not applicable");
+            return;
+        }
+
+        final Frame frame = new Frame();
+        frame.setBackground(Color.GREEN);
+        frame.setUndecorated(true);
+        try {
+            devices[0].setFullScreenWindow(frame);
+            sleep();
+            devices[0].setDisplayMode(nonDefaultDM);
+            sleep();
+            devices[1].setFullScreenWindow(frame);
+            sleep();
+            if (!defaultDM.equals(devices[0].getDisplayMode())) {
+                throw new RuntimeException("DisplayMode is not restored");
+            }
+        } finally {
+            // cleaning up
+            devices[0].setFullScreenWindow(null);
+            devices[1].setFullScreenWindow(null);
+            frame.dispose();
+        }
+    }
+    private static void sleep() {
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+        try {
+            Thread.sleep(1500);
+        } catch (InterruptedException ignored) {
+        }
+    }
+}