3
# Date 1485286789 -10800
4
# Tue Jan 24 22:39:49 2017 +0300
5
# Node ID 95fd1952637bd6e55987579efc6de3d061681c83
6
# Parent 4a42e488b516948631aa2c07cd0cbd7f343d4b0f
7
8167110: Windows peering issue
8
7155957: closed/java/awt/MenuBar/MenuBarStress1/MenuBarStress1.java hangs on win 64 bit with jdk8
9
8079595: Resizing dialog which is JWindow parent makes JVM crash
10
8147842: IME Composition Window is displayed at incorrect location
13
--- openjdk/jdk/src/share/classes/java/awt/Menu.java.orig
14
+++ openjdk/jdk/src/share/classes/java/awt/Menu.java
15
@@ -411,9 +411,9 @@ public class Menu extends MenuItem imple
16
items.removeElementAt(index);
17
MenuPeer peer = (MenuPeer)this.peer;
19
+ peer.delItem(index);
22
- peer.delItem(index);
26
--- openjdk/jdk/src/share/classes/java/awt/MenuBar.java.orig
27
+++ openjdk/jdk/src/share/classes/java/awt/MenuBar.java
28
@@ -222,7 +222,6 @@ public class MenuBar extends MenuCompone
29
if (m.parent != null) {
32
- menus.addElement(m);
35
MenuBarPeer peer = (MenuBarPeer)this.peer;
36
@@ -232,6 +231,7 @@ public class MenuBar extends MenuCompone
40
+ menus.addElement(m);
44
@@ -248,9 +248,9 @@ public class MenuBar extends MenuCompone
45
menus.removeElementAt(index);
46
MenuBarPeer peer = (MenuBarPeer)this.peer;
48
+ peer.delMenu(index);
51
- peer.delMenu(index);
55
--- openjdk/jdk/src/share/classes/java/awt/MenuComponent.java.orig
56
+++ openjdk/jdk/src/share/classes/java/awt/MenuComponent.java
57
@@ -75,7 +75,7 @@ public abstract class MenuComponent impl
65
* The menu component's name, which defaults to <code>null</code>.
66
@@ -292,11 +292,13 @@ public abstract class MenuComponent impl
67
* @see java.awt.font.TextAttribute
69
public void setFont(Font f) {
71
- //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font)
72
- MenuComponentPeer peer = (MenuComponentPeer)this.peer;
75
+ synchronized (getTreeLock()) {
77
+ //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font)
78
+ MenuComponentPeer peer = (MenuComponentPeer)this.peer;
86
+++ openjdk/jdk/test/java/awt/Frame/FrameResize/ShowChildWhileResizingTest.java
89
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
90
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
92
+ * This code is free software; you can redistribute it and/or modify it
93
+ * under the terms of the GNU General Public License version 2 only, as
94
+ * published by the Free Software Foundation.
96
+ * This code is distributed in the hope that it will be useful, but WITHOUT
97
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
98
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
99
+ * version 2 for more details (a copy is included in the LICENSE file that
100
+ * accompanied this code).
102
+ * You should have received a copy of the GNU General Public License version
103
+ * 2 along with this work; if not, write to the Free Software Foundation,
104
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
106
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
107
+ * or visit www.oracle.com if you need additional information or have any
113
+ @summary Resizing dialog which is JWindow parent makes JVM crash
114
+ @author Semyon Sadetsky
117
+import javax.swing.*;
119
+import java.awt.event.ActionEvent;
120
+import java.awt.event.ActionListener;
121
+import java.awt.event.InputEvent;
123
+public class ShowChildWhileResizingTest {
125
+ private static Window dialog;
126
+ private static Timer timer;
127
+ private static Point point;
129
+ public static void main(String[] args) throws Exception {
130
+ dialog = new Frame();
131
+ dialog.add(new JPanel());
132
+ dialog.setVisible(true);
133
+ dialog.setBounds(100, 100, 200, 200);
134
+ SwingUtilities.invokeAndWait(new Runnable() {
136
+ public void run() {
137
+ final Window dependentWindow = new JWindow(dialog);
138
+ JPanel panel = new JPanel();
139
+ panel.add(new JButton("button"));
140
+ dependentWindow.add(panel);
141
+ dependentWindow.setVisible(true);
142
+ dependentWindow.setBounds(0, 0, 50, 50);
143
+ timer = new Timer(100, new ActionListener() {
145
+ public void actionPerformed(ActionEvent e) {
147
+ .setVisible(!dependentWindow.isVisible());
155
+ Robot robot = new Robot();
156
+ robot.setAutoDelay(5);
158
+ SwingUtilities.invokeAndWait(new Runnable() {
160
+ public void run() {
161
+ point = dialog.getLocationOnScreen();
164
+ robot.mouseMove(point.x + 200 - dialog.getInsets().right/2,
165
+ point.y + 200 - dialog.getInsets().bottom/2);
166
+ robot.mousePress(InputEvent.BUTTON1_MASK);
167
+ for(int i = 0; i < 100; i++) {
168
+ robot.mouseMove(point.x + 200 + i, point.y + 200 + i);
170
+ robot.mouseRelease(InputEvent.BUTTON1_MASK);
173
+ System.out.println("ok");