Skip to content

Commit c420530

Browse files
author
Alexey Ushakov
committedAug 26, 2021
8272481: [macos] javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java fails
Reviewed-by: serb, jdv
1 parent e43a907 commit c420530

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformView.java

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public void initialize(LWWindowPeer peer, CPlatformResponder responder) {
6262
initializeBase(peer, responder);
6363

6464
this.windowLayer = CGraphicsDevice.usingMetalPipeline()? createMTLLayer() : createCGLayer();
65+
6566
setPtr(nativeCreateView(0, 0, 0, 0, getWindowLayerPtr()));
6667
}
6768

‎src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,9 @@ public void initialize(Window _target, LWWindowPeer _peer, PlatformWindow _owner
363363
}
364364
});
365365
setPtr(ref.get());
366-
366+
if (peer != null) { // Not applicable to CWarningWindow
367+
peer.setTextured(IS(TEXTURED, styleBits));
368+
}
367369
if (target instanceof javax.swing.RootPaneContainer) {
368370
final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane();
369371
if (rootpane != null) rootpane.addPropertyChangeListener("ancestor", new PropertyChangeListener() {
@@ -530,8 +532,6 @@ protected int getInitialStyleBits() {
530532
}
531533
}
532534

533-
peer.setTextured(IS(TEXTURED, styleBits));
534-
535535
return styleBits;
536536
}
537537

‎test/jdk/ProblemList.txt

-1
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,6 @@ javax/swing/JTree/4633594/JTreeFocusTest.java 8173125 macosx-all
726726
javax/swing/AbstractButton/6711682/bug6711682.java 8060765 windows-all,macosx-all
727727
javax/swing/JFileChooser/4524490/bug4524490.java 8042380 generic-all
728728
javax/swing/JFileChooser/6396844/TwentyThousandTest.java 8198003 generic-all
729-
javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java 8272481 macosx-all
730729
javax/swing/JPopupMenu/6580930/bug6580930.java 7124313 macosx-all
731730
javax/swing/JPopupMenu/6800513/bug6800513.java 7184956 macosx-all
732731
javax/swing/JTabbedPane/8007563/Test8007563.java 8051591 generic-all

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Aug 26, 2021

@openjdk-notifier[bot]
Please sign in to comment.