changeset 59332:005e0c497a00

8235620: Broken merge between JDK-8006406 and JDK-8003559 Reviewed-by: prr
author serb
date Mon, 09 Dec 2019 20:26:19 -0800
parents d3a661d0dc4e
children 00d14aec6256
files src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java
diffstat 3 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Wed Dec 11 14:30:45 2019 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Mon Dec 09 20:26:19 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, 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
@@ -34,9 +34,10 @@
 import java.awt.Point;
 import java.awt.Rectangle;
 import java.awt.Window;
+import java.awt.event.FocusEvent;
+
 import sun.awt.CGraphicsDevice;
 import sun.awt.CGraphicsEnvironment;
-import java.awt.event.FocusEvent;
 import sun.awt.LightweightFrame;
 import sun.java2d.SurfaceData;
 import sun.lwawt.LWLightweightFramePeer;
@@ -47,7 +48,12 @@
 
     @Override
     public void initialize(Window target, LWWindowPeer peer, PlatformWindow owner) {
-        initializeBase(target, peer, owner, new CPlatformLWView());
+        initializeBase(target, peer, owner);
+    }
+
+    @Override
+    CPlatformView createContentView() {
+        return new CPlatformLWView();
     }
 
     @Override
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Dec 11 14:30:45 2019 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Mon Dec 09 20:26:19 2019 -0800
@@ -309,12 +309,11 @@
      */
     @Override // PlatformWindow
     public void initialize(Window _target, LWWindowPeer _peer, PlatformWindow _owner) {
-        initializeBase(_target, _peer, _owner, new CPlatformView());
+        initializeBase(_target, _peer, _owner);
 
         final int styleBits = getInitialStyleBits();
 
         responder = createPlatformResponder();
-        contentView = createContentView();
         contentView.initialize(peer, responder);
 
         Rectangle bounds;
@@ -359,20 +358,20 @@
         validateSurface();
     }
 
-    protected void initializeBase(Window target, LWWindowPeer peer, PlatformWindow owner, CPlatformView view) {
+    void initializeBase(Window target, LWWindowPeer peer, PlatformWindow owner) {
         this.peer = peer;
         this.target = target;
         if (owner instanceof CPlatformWindow) {
             this.owner = (CPlatformWindow)owner;
         }
-        this.contentView = view;
+        contentView = createContentView();
     }
 
     protected CPlatformResponder createPlatformResponder() {
         return new CPlatformResponder(peer, false);
     }
 
-    protected CPlatformView createContentView() {
+    CPlatformView createContentView() {
         return new CPlatformView();
     }
 
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Wed Dec 11 14:30:45 2019 -0800
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java	Mon Dec 09 20:26:19 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, 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
@@ -273,7 +273,7 @@
         return new CPlatformResponder(this, false);
     }
 
-    protected CPlatformView createContentView() {
+    CPlatformView createContentView() {
         return new CPlatformView() {
             public GraphicsConfiguration getGraphicsConfiguration() {
                 LWWindowPeer peer = ownerPeer.get();