# HG changeset patch # User ddehaven # Date 1429031754 25200 # Node ID 8869a2e28c8961fd8f5a44c44820db913860a195 # Parent eede785c4e0dced3e0ed6807b991b143f543df31# Parent a660cade22cefb61b59dda981cfc5535682104ac Merge diff -r eede785c4e0d -r 8869a2e28c89 jdk/make/copy/Copy-java.base.gmk --- a/jdk/make/copy/Copy-java.base.gmk Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/make/copy/Copy-java.base.gmk Tue Apr 14 10:15:54 2015 -0700 @@ -170,9 +170,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows) POLICY_SRC_LIST += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy - ifndef OPENJDK - POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy - endif endif POLICY_SRC_LIST += $(POLICY_SRC) diff -r eede785c4e0d -r 8869a2e28c89 jdk/make/copy/Copy-jdk.accessibility.gmk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/make/copy/Copy-jdk.accessibility.gmk Tue Apr 14 10:15:54 2015 -0700 @@ -0,0 +1,47 @@ +# +# Copyright (c) 2104, 2015, 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. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# 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. +# + +include CopyCommon.gmk + +################################################################################ + +ifeq ($(OPENJDK_TARGET_OS), windows) + TARGETS += $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCallbacks.h \ + $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.h \ + $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgePackages.h \ + $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.c \ + $(CONF_DST_DIR)/accessibility.properties + + $(INCLUDE_DST_OS_DIR)/bridge/%: \ + $(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge/% + $(install-file) + + $(CONF_DST_DIR)/accessibility.properties: \ + $(JDK_TOPDIR)/src/jdk.accessibility/windows/conf/accessibility.properties + $(install-file) + +endif + +################################################################################ diff -r eede785c4e0d -r 8869a2e28c89 jdk/make/launcher/Launcher-jdk.accessibility.gmk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/make/launcher/Launcher-jdk.accessibility.gmk Tue Apr 14 10:15:54 2015 -0700 @@ -0,0 +1,60 @@ +# +# Copyright (c) 2014, 2015, 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. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# 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. +# + +include LauncherCommon.gmk + +################################################################################ +# jabswitch + +ifeq ($(OPENJDK_TARGET_OS), windows) + + JABSWITCH_SRC := $(JDK_TOPDIR)/src/jdk.accessibility/windows/native/jabswitch + ACCESSBRIDGE_SRC := $(JDK_TOPDIR)/src/jdk.accessibility/windows/native/common + + $(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \ + SRC := $(JABSWITCH_SRC), \ + INCLUDE_FILES := jabswitch.cpp, \ + LANG := C++, \ + CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \ + -analyze- -Od -Gd -D_WINDOWS \ + -D_UNICODE -DUNICODE -RTC1 -EHsc, \ + DISABLED_WARNINGS_microsoft := 4267, \ + LDFLAGS := $(LDFLAGS_JDKEXE) \ + Advapi32.lib Version.lib User32.lib, \ + OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/jdk.accessibility/jabswitch, \ + OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_cmds/jdk.accessibility, \ + PROGRAM := jabswitch, \ + DEBUG_SYMBOLS := true, \ + VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.RC, \ + RC_FLAGS := $(RC_FLAGS) \ + -D "JDK_FNAME=jabswitch.exe" \ + -D "JDK_INTERNAL_NAME=jabswitch" \ + -D "JDK_FTYPE=0x01L", \ + MANIFEST := $(JABSWITCH_SRC)/jabswitch.manifest)) + + TARGETS += $(BUILD_JABSWITCH) +endif + +################################################################################ diff -r eede785c4e0d -r 8869a2e28c89 jdk/make/lib/Lib-jdk.accessibility.gmk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/make/lib/Lib-jdk.accessibility.gmk Tue Apr 14 10:15:54 2015 -0700 @@ -0,0 +1,138 @@ +# +# Copyright (c) 2014, 2015, 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. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# 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. +# + +include LibCommon.gmk + +################################################################################ + +ifeq ($(OPENJDK_TARGET_OS), windows) + + ROOT_SRCDIR := $(JDK_TOPDIR)/src/jdk.accessibility/windows/native + JAVA_AB_SRCDIR := $(ROOT_SRCDIR)/libjavaaccessbridge $(ROOT_SRCDIR)/common + WIN_AB_SRCDIR := $(ROOT_SRCDIR)/libwindowsaccessbridge $(ROOT_SRCDIR)/common + SYSINFO_SRCDIR := $(ROOT_SRCDIR)/libjabsysinfo + ACCESSBRIDGE_CFLAGS := -I$(SUPPORT_OUTPUTDIR)/headers/jdk.accessibility \ + -I$(JDK_TOPDIR)/src/java.desktop/windows/native/include \ + -I$(JDK_TOPDIR)/src/java.desktop/share/native/include + + define SetupJavaDLL + # Parameter 1 Suffix + # Parameter 2 ACCESSBRIDGE_ARCH_ suffix + + $(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \ + LIBRARY = javaaccessbridge$1, \ + OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ + SRC := $(JAVA_AB_SRCDIR), \ + LANG := C++, \ + OPTIMIZATION := LOW, \ + CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \ + $(addprefix -I,$(JAVA_AB_SRCDIR)) \ + -I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \ + -DACCESSBRIDGE_ARCH_$2, \ + LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ + winspool.lib comdlg32.lib advapi32.lib shell32.lib \ + $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \ + ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ + -subsystem:windows, \ + VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ + RC_FLAGS := $(RC_FLAGS) \ + -D "JDK_FNAME=javaaccessbridge$1.dll" \ + -D "JDK_INTERNAL_NAME=javaaccessbridge$1" \ + -D "JDK_FTYPE=0x02L", \ + OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjavaaccessbridge$1, \ + DEBUG_SYMBOLS := true) + + $$(BUILD_JAVAACCESSBRIDGE$1): $(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib + + TARGETS += $$(BUILD_JAVAACCESSBRIDGE$1) + endef + + define SetupWinDLL + # Parameter 1 Suffix + # Parameter 2 ACCESSBRIDGE_ARCH_ suffix + $(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \ + LIBRARY = windowsaccessbridge$1, \ + OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ + SRC := $(WIN_AB_SRCDIR), \ + LANG := C++, \ + OPTIMIZATION := LOW, \ + CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \ + $(addprefix -I,$(WIN_AB_SRCDIR)) \ + -I$(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge \ + -DACCESSBRIDGE_ARCH_$2, \ + LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \ + winspool.lib comdlg32.lib advapi32.lib shell32.lib \ + ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \ + -subsystem:windows \ + -def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \ + VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ + RC_FLAGS := $(RC_FLAGS) \ + -D "JDK_FNAME=windowsaccessbridge$1.dll" \ + -D "JDK_INTERNAL_NAME=windowsaccessbridge$1" \ + -D "JDK_FTYPE=0x02L", \ + OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libwindowsaccessbridge$1, \ + DEBUG_SYMBOLS := true) + + TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1) + + endef + + define SetupAccessBridgeSysInfo + + $(call SetupNativeCompilation,BUILD_ACCESSBRIDGESYSINFO, \ + LIBRARY = jabsysinfo, \ + OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ + SRC := $(SYSINFO_SRCDIR), \ + LANG := C++, \ + OPTIMIZATION := LOW, \ + CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS), \ + LDFLAGS := $(LDFLAGS_JDKLIB) \ + -subsystem:windows -machine:I386, \ + VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \ + RC_FLAGS := $(RC_FLAGS) \ + -D "JDK_FNAME=jabsysinfo.dll" \ + -D "JDK_INTERNAL_NAME=jabsysinfo" \ + -D "JDK_FTYPE=0x02L", \ + OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/lib/libjabsysinfo, \ + DEBUG_SYMBOLS := true) + + TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO) + + endef + + ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) + $(eval $(call SetupAccessBridgeSysInfo)) + $(eval $(call SetupJavaDLL,-32,32)) + $(eval $(call SetupJavaDLL,,LEGACY)) + $(eval $(call SetupWinDLL,-32,32)) + $(eval $(call SetupWinDLL,,LEGACY)) + else + $(eval $(call SetupJavaDLL,,64)) + $(eval $(call SetupWinDLL,-64,64)) + endif + +endif + +################################################################################ diff -r eede785c4e0d -r 8869a2e28c89 jdk/make/src/classes/build/tools/module/ext.modules --- a/jdk/make/src/classes/build/tools/module/ext.modules Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/make/src/classes/build/tools/module/ext.modules Tue Apr 14 10:15:54 2015 -0700 @@ -4,7 +4,7 @@ java.transaction java.xml.bind java.xml.ws -jdk.accessbridge +jdk.accessibility jdk.crypto.ec jdk.crypto.mscapi jdk.crypto.pkcs11 diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.base/windows/conf/security/java.policy --- a/jdk/src/java.base/windows/conf/security/java.policy Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.base/windows/conf/security/java.policy Tue Apr 14 10:15:54 2015 -0700 @@ -6,3 +6,7 @@ permission java.security.SecurityPermission "clearProviderProperties.SunMSCAPI"; permission java.security.SecurityPermission "removeProviderProperty.SunMSCAPI"; }; + +grant codeBase "jrt:/jdk.accessibility" { + permission java.security.AllPermission; +}; diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollPaneUI.java --- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollPaneUI.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollPaneUI.java Tue Apr 14 10:15:54 2015 -0700 @@ -29,6 +29,7 @@ import javax.swing.*; import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.basic.BasicScrollPaneUI; public class AquaScrollPaneUI extends javax.swing.plaf.basic.BasicScrollPaneUI { public static ComponentUI createUI(final JComponent x) { @@ -39,28 +40,9 @@ return new XYMouseWheelHandler(); } - // This is a grody hack to trick BasicScrollPaneUI into scrolling horizontally - // when we notice that the shift key is down. This should be removed when AWT/Swing - // becomes aware of multi-axis scroll wheels. - protected class XYMouseWheelHandler extends javax.swing.plaf.basic.BasicScrollPaneUI.MouseWheelHandler { + protected class XYMouseWheelHandler extends BasicScrollPaneUI.MouseWheelHandler { public void mouseWheelMoved(final MouseWheelEvent e) { - JScrollBar vScrollBar = null; - boolean wasVisible = false; - - if (e.isShiftDown()) { - vScrollBar = scrollpane.getVerticalScrollBar(); - if (vScrollBar != null) { - wasVisible = vScrollBar.isVisible(); - vScrollBar.setVisible(false); - } - } - super.mouseWheelMoved(e); - - if (wasVisible) { - vScrollBar.setVisible(true); - } - // Consume the event even when the scrollBar is invisible // see #7124320 e.consume(); diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/macosx/classes/sun/lwawt/LWCheckboxPeer.java --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWCheckboxPeer.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWCheckboxPeer.java Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2015, 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 @@ -132,7 +132,9 @@ @Override public void setState(final boolean state) { synchronized (getDelegateLock()) { + getDelegate().getCurrentButton().removeItemListener(this); getDelegate().setSelected(state); + getDelegate().getCurrentButton().addItemListener(this); } repaintPeer(); } diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java Tue Apr 14 10:15:54 2015 -0700 @@ -1296,6 +1296,12 @@ } KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance(); + + if (!becomesFocused && kfmPeer.getCurrentFocusedWindow() != getTarget()) { + // late window focus lost event - ingoring + return; + } + kfmPeer.setCurrentFocusedWindow(becomesFocused ? getTarget() : null); int eventID = becomesFocused ? WindowEvent.WINDOW_GAINED_FOCUS : WindowEvent.WINDOW_LOST_FOCUS; diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CClipboard.java --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CClipboard.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CClipboard.java Tue Apr 14 10:15:54 2015 -0700 @@ -57,6 +57,18 @@ } @Override + public synchronized Transferable getContents(Object requestor) { + checkPasteboardAndNotify(); + return super.getContents(requestor); + } + + @Override + protected synchronized Transferable getContextContents() { + checkPasteboardAndNotify(); + return super.getContextContents(); + } + + @Override protected void setContentsNative(Transferable contents) { FlavorTable flavorMap = getDefaultFlavorTable(); // Don't use delayed Clipboard rendering for the Transferable's data. @@ -116,13 +128,20 @@ private native void declareTypes(long[] formats, SunClipboard newOwner); private native void setData(byte[] data, long format); + void checkPasteboardAndNotify() { + if (checkPasteboardWithoutNotification()) { + notifyChanged(); + lostOwnershipNow(null); + } + } + /** * Invokes native check whether a change count on the general pasteboard is different * than when we set it. The different count value means the current owner lost * pasteboard ownership and someone else put data on the clipboard. * @since 1.7 */ - native void checkPasteboard(); + native boolean checkPasteboardWithoutNotification(); /*** Native Callbacks ***/ private void notifyLostOwnership() { diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java --- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java Tue Apr 14 10:15:54 2015 -0700 @@ -123,7 +123,7 @@ // it won't be invoced if focuse is moved to a html element // on the same page. CClipboard clipboard = (CClipboard) Toolkit.getDefaultToolkit().getSystemClipboard(); - clipboard.checkPasteboard(); + clipboard.checkPasteboardAndNotify(); } if (parentWindowActive) { responder.handleWindowFocusEvent(focused, null); @@ -164,7 +164,7 @@ } // ignore focus "lost" native request as it may mistakenly // deactivate active window (see 8001161) - if (globalFocusedWindow == this && parentWindowActive) { + if (globalFocusedWindow == this) { responder.handleWindowFocusEvent(parentWindowActive, null); } } diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CClipboard.m --- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CClipboard.m Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CClipboard.m Tue Apr 14 10:15:54 2015 -0700 @@ -107,6 +107,19 @@ } } +- (BOOL) checkPasteboardWithoutNotification:(id)application { + AWT_ASSERT_APPKIT_THREAD; + + NSInteger newChangeCount = [[NSPasteboard generalPasteboard] changeCount]; + + if (self.changeCount != newChangeCount) { + self.changeCount = newChangeCount; + return YES; + } else { + return NO; + } +} + @end /* @@ -260,21 +273,20 @@ return returnValue; } -/* - * Class: sun_lwawt_macosx_CClipboard - * Method: checkPasteboard - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CClipboard_checkPasteboard -(JNIEnv *env, jobject inObject ) -{ -JNF_COCOA_ENTER(env); - - [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ - [[CClipboard sharedClipboard] checkPasteboard:nil]; - }]; - -JNF_COCOA_EXIT(env); -} - - +/* + * Class: sun_lwawt_macosx_CClipboard + * Method: checkPasteboard + * Signature: ()V + */ +JNIEXPORT jboolean JNICALL Java_sun_lwawt_macosx_CClipboard_checkPasteboardWithoutNotification +(JNIEnv *env, jobject inObject) +{ + __block BOOL ret = NO; + JNF_COCOA_ENTER(env); + [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ + ret = [[CClipboard sharedClipboard] checkPasteboardWithoutNotification:nil]; + }]; + + JNF_COCOA_EXIT(env); + return ret; +} \ No newline at end of file diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsDesktopManager.java Tue Apr 14 10:15:54 2015 -0700 @@ -68,7 +68,7 @@ if (currentFrame != null && f != currentFrame) { // If the current frame is maximized, transfer that // attribute to the frame being activated. - if (currentFrame.isMaximum() && + if (!currentFrame.isClosed() && currentFrame.isMaximum() && (f.getClientProperty("JInternalFrame.frameType") != "optionDialog") ) { //Special case. If key binding was used to select next diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java --- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsRootPaneUI.java Tue Apr 14 10:15:54 2015 -0700 @@ -197,6 +197,10 @@ root = null; winAncestor = null; } else { + if (WindowsLookAndFeel.isMnemonicHidden() && ev.isAltDown()) { + WindowsLookAndFeel.setMnemonicHidden(false); + WindowsGraphicsUtils.repaintMnemonicsInWindow(winAncestor); + } altKeyPressed = false; } return false; diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/AWTEventMulticaster.java --- a/jdk/src/java.desktop/share/classes/java/awt/AWTEventMulticaster.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/AWTEventMulticaster.java Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2015, 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 @@ -1088,6 +1088,7 @@ * contains only the specified listener. If no such listeners are chained, * this method returns an empty array. * + * @param the listener type * @param l the specified java.util.EventListener * @param listenerType the type of listeners requested; this parameter * should specify an interface that descends from diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/Component.java --- a/jdk/src/java.desktop/share/classes/java/awt/Component.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java Tue Apr 14 10:15:54 2015 -0700 @@ -4316,9 +4316,12 @@ */ protected boolean validatedContents; // = false /** - * Size of the back buffers + * Width of the back buffers */ protected int width; + /** + * Height of the back buffers + */ protected int height; /** @@ -6013,6 +6016,7 @@ * * If no such listeners exist, this method returns an empty array. * + * @param the type of the listeners * @param listenerType the type of listeners requested; this parameter * should specify an interface that descends from * java.util.EventListener diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/GridBagLayout.java --- a/jdk/src/java.desktop/share/classes/java/awt/GridBagLayout.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/GridBagLayout.java Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2015, 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 @@ -353,7 +353,7 @@ * } * } *
- *

+ * * @author Doug Stein * @author Bill Spitzak (orignial NeWS & OLIT implementation) * @see java.awt.GridBagConstraints @@ -770,7 +770,7 @@ * components. The value should be a number between 0 and 1 * where 0 represents alignment along the origin, 1 is aligned * the furthest away from the origin, 0.5 is centered, etc. - *

+ * * @return the value 0.5f to indicate centered */ public float getLayoutAlignmentX(Container parent) { @@ -783,7 +783,7 @@ * components. The value should be a number between 0 and 1 * where 0 represents alignment along the origin, 1 is aligned * the furthest away from the origin, 0.5 is centered, etc. - *

+ * * @return the value 0.5f to indicate centered */ public float getLayoutAlignmentY(Container parent) { diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java --- a/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2015, 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 @@ -328,6 +328,7 @@ * Its use is discouraged, and it may not be supported * in the future. * @param evt the event which is to take place + * @return unconditionally returns false * @deprecated As of JDK version 1.1, replaced by {@link * #dispatchEvent(AWTEvent) dispatchEvent}. */ diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/MenuContainer.java --- a/jdk/src/java.desktop/share/classes/java/awt/MenuContainer.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/MenuContainer.java Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2015, 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 @@ -50,6 +50,7 @@ * Posts an event to the listeners. * * @param evt the event to dispatch + * @return the results of posting the event * @deprecated As of JDK version 1.1 * replaced by dispatchEvent(AWTEvent). */ diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/MenuItem.java --- a/jdk/src/java.desktop/share/classes/java/awt/MenuItem.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/MenuItem.java Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2015, 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 @@ -595,6 +595,7 @@ * * If no such listeners exist, this method returns an empty array. * + * @param the type of the listeners * @param listenerType the type of listeners requested; this parameter * should specify an interface that descends from * java.util.EventListener diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/Toolkit.java --- a/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/Toolkit.java Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2015, 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 @@ -1766,6 +1766,7 @@ * * subclasses should override this to provide their own implementation * + * @param the type of DragGestureRecognizer to create * @param abstractRecognizerClass The abstract class of the required recognizer * @param ds The DragSource * @param c The Component target for the DragGestureRecognizer @@ -1867,7 +1868,9 @@ } /** - * an opportunity to lazily evaluate desktop property values. + * An opportunity to lazily evaluate desktop property values. + * @return the desktop property or null + * @param name the name */ protected Object lazilyLoadDesktopProperty(String name) { return null; @@ -1947,8 +1950,14 @@ return desktopPropsSupport.getPropertyChangeListeners(propertyName); } + /** + * The desktop properties. + */ protected final Map desktopProperties = new HashMap(); + /** + * The desktop properties change support. + */ protected final PropertyChangeSupport desktopPropsSupport = Toolkit.createPropertyChangeSupport(this); diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/Window.java --- a/jdk/src/java.desktop/share/classes/java/awt/Window.java Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/Window.java Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2015, 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 @@ -2789,6 +2789,7 @@ /** * @deprecated As of J2SE 1.4, replaced by * {@link Component#applyComponentOrientation Component.applyComponentOrientation}. + * @param rb the resource bundle */ @Deprecated public void applyResourceBundle(ResourceBundle rb) { @@ -2798,6 +2799,7 @@ /** * @deprecated As of J2SE 1.4, replaced by * {@link Component#applyComponentOrientation Component.applyComponentOrientation}. + * @param rbName the resource name */ @Deprecated public void applyResourceBundle(String rbName) { diff -r eede785c4e0d -r 8869a2e28c89 jdk/src/java.desktop/share/classes/java/awt/doc-files/Modality.html --- a/jdk/src/java.desktop/share/classes/java/awt/doc-files/Modality.html Tue Apr 14 14:22:13 2015 +0200 +++ b/jdk/src/java.desktop/share/classes/java/awt/doc-files/Modality.html Tue Apr 14 10:15:54 2015 -0700 @@ -1,5 +1,5 @@