File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
src/macosx/native/sun/awt
test/java/awt/Frame/NormalToIconified Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -203,13 +203,13 @@ + (NSUInteger) styleMaskForStyleBits:(jint)styleBits {
203
203
if (IS (styleBits, DECORATED)) {
204
204
type |= NSTitledWindowMask ;
205
205
if (IS (styleBits, CLOSEABLE)) type |= NSClosableWindowMask ;
206
- if (IS (styleBits, MINIMIZABLE)) type |= NSMiniaturizableWindowMask ;
207
206
if (IS (styleBits, RESIZABLE)) type |= NSResizableWindowMask ;
208
207
if (IS (styleBits, FULL_WINDOW_CONTENT)) type |= NSFullSizeContentViewWindowMask ;
209
208
} else {
210
209
type |= NSBorderlessWindowMask ;
211
210
}
212
211
212
+ if (IS (styleBits, MINIMIZABLE)) type |= NSMiniaturizableWindowMask ;
213
213
if (IS (styleBits, TEXTURED)) type |= NSTexturedBackgroundWindowMask ;
214
214
if (IS (styleBits, UNIFIED)) type |= NSUnifiedTitleAndToolbarWindowMask ;
215
215
if (IS (styleBits, UTILITY)) type |= NSUtilityWindowMask ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
23
23
24
24
/*
25
25
* @test
26
- * @bug 8171949
26
+ * @bug 8171949 8214046
27
27
* @summary Tests that bitwise mask is set and state listener is notified during state transition.
28
28
* @author Dmitry Markov
29
29
* @library ../../regtesthelpers
40
40
import test .java .awt .regtesthelpers .Util ;
41
41
42
42
public class NormalToIconifiedTest {
43
- private static final AtomicBoolean listenerNotified = new AtomicBoolean (false );
44
43
45
44
public static void main (String [] args ) {
45
+ test (false );
46
+ test (true );
47
+ }
48
+
49
+ private static void test (final boolean undecorated ) {
50
+ AtomicBoolean listenerNotified = new AtomicBoolean (false );
51
+
46
52
Robot robot = Util .createRobot ();
47
53
48
54
Frame testFrame = new Frame ("Test Frame" );
55
+ testFrame .setUndecorated (undecorated );
49
56
testFrame .setSize (200 , 200 );
50
57
testFrame .addWindowStateListener (new WindowStateListener () {
51
58
@ Override
You can’t perform that action at this time.
0 commit comments