106 private final PeerType peerType; 107 108 private final SecurityWarningWindow warningWindow; 109 110 private volatile boolean targetFocusable; 111 112 /** 113 * Current modal blocker or null. 114 * 115 * Synchronization: peerTreeLock. 116 */ 117 private LWWindowPeer blocker; 118 119 public LWWindowPeer(Window target, PlatformComponent platformComponent, 120 PlatformWindow platformWindow, PeerType peerType) 121 { 122 super(target, platformComponent); 123 this.platformWindow = platformWindow; 124 this.peerType = peerType; 125 126 Window owner = target.getOwner(); 127 LWWindowPeer ownerPeer = owner == null ? null : 128 (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(owner); 129 PlatformWindow ownerDelegate = (ownerPeer != null) ? ownerPeer.getPlatformWindow() : null; 130 131 // The delegate.initialize() needs a non-null GC on X11. 132 GraphicsConfiguration gc = getTarget().getGraphicsConfiguration(); 133 synchronized (getStateLock()) { 134 // graphicsConfig should be updated according to the real window 135 // bounds when the window is shown, see 4868278 136 this.graphicsConfig = gc; 137 } 138 139 if (!target.isFontSet()) { 140 target.setFont(DEFAULT_FONT); 141 } 142 143 if (!target.isBackgroundSet()) { 144 target.setBackground(SystemColor.window); 145 } else { | 106 private final PeerType peerType; 107 108 private final SecurityWarningWindow warningWindow; 109 110 private volatile boolean targetFocusable; 111 112 /** 113 * Current modal blocker or null. 114 * 115 * Synchronization: peerTreeLock. 116 */ 117 private LWWindowPeer blocker; 118 119 public LWWindowPeer(Window target, PlatformComponent platformComponent, 120 PlatformWindow platformWindow, PeerType peerType) 121 { 122 super(target, platformComponent); 123 this.platformWindow = platformWindow; 124 this.peerType = peerType; 125 126 targetFocusable = target.isFocusableWindow(); 127 128 Window owner = target.getOwner(); 129 LWWindowPeer ownerPeer = owner == null ? null : 130 (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(owner); 131 PlatformWindow ownerDelegate = (ownerPeer != null) ? ownerPeer.getPlatformWindow() : null; 132 133 // The delegate.initialize() needs a non-null GC on X11. 134 GraphicsConfiguration gc = getTarget().getGraphicsConfiguration(); 135 synchronized (getStateLock()) { 136 // graphicsConfig should be updated according to the real window 137 // bounds when the window is shown, see 4868278 138 this.graphicsConfig = gc; 139 } 140 141 if (!target.isFontSet()) { 142 target.setFont(DEFAULT_FONT); 143 } 144 145 if (!target.isBackgroundSet()) { 146 target.setBackground(SystemColor.window); 147 } else { |