Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
5334598b
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5334598b
编写于
11月 11, 2016
作者:
M
mcherkas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8165626: Improved window framing
Reviewed-by: serb
上级
da599656
变更
14
展开全部
隐藏空白更改
内联
并排
Showing
14 changed file
with
280 addition
and
168 deletion
+280
-168
src/macosx/classes/com/apple/eawt/_AppDockIconHandler.java
src/macosx/classes/com/apple/eawt/_AppDockIconHandler.java
+1
-14
src/macosx/classes/sun/java2d/opengl/CGLLayer.java
src/macosx/classes/sun/java2d/opengl/CGLLayer.java
+3
-3
src/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java
src/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java
+40
-12
src/macosx/classes/sun/lwawt/macosx/CImage.java
src/macosx/classes/sun/lwawt/macosx/CImage.java
+22
-10
src/macosx/classes/sun/lwawt/macosx/CMenuItem.java
src/macosx/classes/sun/lwawt/macosx/CMenuItem.java
+7
-1
src/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java
src/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java
+5
-2
src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java
src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java
+0
-5
src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
+26
-9
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
+136
-92
src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java
src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java
+16
-7
src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java
.../classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java
+2
-2
src/macosx/classes/sun/lwawt/macosx/CWarningWindow.java
src/macosx/classes/sun/lwawt/macosx/CWarningWindow.java
+15
-10
src/macosx/native/sun/awt/AWTSurfaceLayers.h
src/macosx/native/sun/awt/AWTSurfaceLayers.h
+2
-0
src/macosx/native/sun/awt/AWTSurfaceLayers.m
src/macosx/native/sun/awt/AWTSurfaceLayers.m
+5
-1
未找到文件。
src/macosx/classes/com/apple/eawt/_AppDockIconHandler.java
浏览文件 @
5334598b
...
...
@@ -72,8 +72,7 @@ class _AppDockIconHandler {
public
void
setDockIconImage
(
final
Image
image
)
{
try
{
final
CImage
cImage
=
getCImageCreator
().
createFromImage
(
image
);
final
long
nsImagePtr
=
getNSImagePtrFrom
(
cImage
);
nativeSetDockIconImage
(
nsImagePtr
);
cImage
.
execute
(
_AppDockIconHandler:
:
nativeSetDockIconImage
);
}
catch
(
final
Throwable
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
@@ -102,16 +101,4 @@ class _AppDockIconHandler {
throw
new
RuntimeException
(
e
);
}
}
static
long
getNSImagePtrFrom
(
final
CImage
cImage
)
{
if
(
cImage
==
null
)
return
0
;
try
{
final
Field
cImagePtrField
=
CFRetainedResource
.
class
.
getDeclaredField
(
"ptr"
);
cImagePtrField
.
setAccessible
(
true
);
return
cImagePtrField
.
getLong
(
cImage
);
}
catch
(
final
Throwable
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
src/macosx/classes/sun/java2d/opengl/CGLLayer.java
浏览文件 @
5334598b
...
...
@@ -108,7 +108,7 @@ public class CGLLayer extends CFRetainedResource {
OGLRenderQueue
rq
=
OGLRenderQueue
.
getInstance
();
rq
.
lock
();
try
{
validate
(
getPointer
(),
cglsd
);
execute
(
ptr
->
validate
(
ptr
,
cglsd
)
);
}
finally
{
rq
.
unlock
();
}
...
...
@@ -124,7 +124,7 @@ public class CGLLayer extends CFRetainedResource {
private
void
setScale
(
final
int
_scale
)
{
if
(
scale
!=
_scale
)
{
scale
=
_scale
;
nativeSetScale
(
getPointer
(),
scale
);
execute
(
ptr
->
nativeSetScale
(
ptr
,
scale
)
);
}
}
...
...
@@ -138,7 +138,7 @@ public class CGLLayer extends CFRetainedResource {
OGLRenderQueue
rq
=
OGLRenderQueue
.
getInstance
();
rq
.
lock
();
try
{
blitTexture
(
getPointer
(
));
execute
(
ptr
->
blitTexture
(
ptr
));
}
finally
{
rq
.
unlock
();
}
...
...
src/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java
浏览文件 @
5334598b
/*
* Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
6
, 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
...
...
@@ -25,6 +25,10 @@
package
sun.lwawt.macosx
;
import
java.util.concurrent.locks.Lock
;
import
java.util.concurrent.locks.ReadWriteLock
;
import
java.util.concurrent.locks.ReentrantReadWriteLock
;
/**
* Safely holds and disposes of native AppKit resources, using the
* correct AppKit threading and Objective-C GC semantics.
...
...
@@ -36,6 +40,10 @@ public class CFRetainedResource {
// TODO this pointer should be private and accessed via CFNativeAction class
protected
volatile
long
ptr
;
private
final
ReadWriteLock
lock
=
new
ReentrantReadWriteLock
();
private
final
Lock
writeLock
=
lock
.
writeLock
();
private
final
Lock
readLock
=
lock
.
readLock
();
/**
* @param ptr CFRetained native object pointer
* @param disposeOnAppKitThread is the object needs to be CFReleased on the main thread
...
...
@@ -50,21 +58,31 @@ public class CFRetainedResource {
* @param ptr CFRetained native object pointer
*/
protected
void
setPtr
(
final
long
ptr
)
{
synchronized
(
this
)
{
if
(
this
.
ptr
!=
0
)
dispose
();
writeLock
.
lock
();
try
{
if
(
this
.
ptr
!=
0
)
{
dispose
();
}
this
.
ptr
=
ptr
;
}
finally
{
writeLock
.
unlock
();
}
}
/**
* Manually CFReleases the native resource
* Manually CFReleases the native resource
.
*/
protected
void
dispose
()
{
long
oldPtr
=
0L
;
synchronized
(
this
)
{
if
(
ptr
==
0
)
return
;
writeLock
.
lock
();
try
{
if
(
ptr
==
0
)
{
return
;
}
oldPtr
=
ptr
;
ptr
=
0
;
}
finally
{
writeLock
.
unlock
();
}
nativeCFRelease
(
oldPtr
,
disposeOnAppKitThread
);
// perform outside of the synchronized block
...
...
@@ -109,9 +127,14 @@ public class CFRetainedResource {
*
* @param action The native operation
*/
public
final
synchronized
void
execute
(
final
CFNativeAction
action
)
{
if
(
ptr
!=
0
)
{
action
.
run
(
ptr
);
public
final
void
execute
(
final
CFNativeAction
action
)
{
readLock
.
lock
();
try
{
if
(
ptr
!=
0
)
{
action
.
run
(
ptr
);
}
}
finally
{
readLock
.
unlock
();
}
}
...
...
@@ -127,9 +150,14 @@ public class CFRetainedResource {
* @return result of the native operation, usually the native pointer to
* some other data
*/
final
synchronized
long
executeGet
(
final
CFNativeActionGet
action
)
{
if
(
ptr
!=
0
)
{
return
action
.
run
(
ptr
);
final
long
executeGet
(
final
CFNativeActionGet
action
)
{
readLock
.
lock
();
try
{
if
(
ptr
!=
0
)
{
return
action
.
run
(
ptr
);
}
}
finally
{
readLock
.
unlock
();
}
return
0
;
}
...
...
src/macosx/classes/sun/lwawt/macosx/CImage.java
浏览文件 @
5334598b
/*
* Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
6
, 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
...
...
@@ -33,6 +33,7 @@ import java.util.Arrays;
import
java.util.List
;
import
sun.awt.image.MultiResolutionImage
;
import
sun.awt.image.MultiResolutionCachedImage
;
import
java.util.concurrent.atomic.AtomicReference
;
import
sun.awt.image.SunWritableRaster
;
...
...
@@ -235,15 +236,26 @@ public class CImage extends CFRetainedResource {
/** @return A MultiResolution image created from nsImagePtr, or null. */
private
Image
toImage
()
{
if
(
ptr
==
0
)
return
null
;
if
(
ptr
==
0
)
{
return
null
;
}
final
Dimension2D
size
=
nativeGetNSImageSize
(
ptr
);
AtomicReference
<
Dimension2D
>
sizeRef
=
new
AtomicReference
<>();
execute
(
ptr
->
{
sizeRef
.
set
(
nativeGetNSImageSize
(
ptr
));
});
final
Dimension2D
size
=
sizeRef
.
get
();
if
(
size
==
null
)
{
return
null
;
}
final
int
w
=
(
int
)
size
.
getWidth
();
final
int
h
=
(
int
)
size
.
getHeight
();
Dimension2D
[]
sizes
=
nativeGetNSImageRepresentationSizes
(
ptr
,
size
.
getWidth
(),
size
.
getHeight
());
AtomicReference
<
Dimension2D
[]>
repRef
=
new
AtomicReference
<>();
execute
(
ptr
->
{
repRef
.
set
(
nativeGetNSImageRepresentationSizes
(
ptr
,
size
.
getWidth
(),
size
.
getHeight
()));
});
Dimension2D
[]
sizes
=
repRef
.
get
();
return
sizes
==
null
||
sizes
.
length
<
2
?
new
MultiResolutionCachedImage
(
w
,
h
,
(
width
,
height
)
...
...
@@ -256,18 +268,18 @@ public class CImage extends CFRetainedResource {
final
BufferedImage
bimg
=
new
BufferedImage
(
dstWidth
,
dstHeight
,
BufferedImage
.
TYPE_INT_ARGB_PRE
);
final
DataBufferInt
dbi
=
(
DataBufferInt
)
bimg
.
getRaster
().
getDataBuffer
();
final
int
[]
buffer
=
SunWritableRaster
.
stealData
(
dbi
,
0
);
nativeCopyNSImageIntoArray
(
ptr
,
buffer
,
srcWidth
,
srcHeight
,
dstWidth
,
dstHeight
);
execute
(
ptr
->
nativeCopyNSImageIntoArray
(
ptr
,
buffer
,
srcWidth
,
srcHeight
,
dstWidth
,
dstHeight
)
);
SunWritableRaster
.
markDirty
(
dbi
);
return
bimg
;
}
/** If nsImagePtr != 0 then scale this NSImage. @return *this* */
CImage
resize
(
final
double
w
,
final
double
h
)
{
if
(
ptr
!=
0
)
nativeSetNSImageSize
(
ptr
,
w
,
h
);
execute
(
ptr
->
nativeSetNSImageSize
(
ptr
,
w
,
h
)
);
return
this
;
}
void
resizeRepresentations
(
double
w
,
double
h
)
{
if
(
ptr
!=
0
)
nativeResizeNSImageRepresentations
(
ptr
,
w
,
h
);
execute
(
ptr
->
nativeResizeNSImageRepresentations
(
ptr
,
w
,
h
)
);
}
}
src/macosx/classes/sun/lwawt/macosx/CMenuItem.java
浏览文件 @
5334598b
...
...
@@ -113,7 +113,13 @@ public class CMenuItem extends CMenuComponent implements MenuItemPeer {
*/
public
final
void
setImage
(
final
java
.
awt
.
Image
img
)
{
CImage
cimg
=
CImage
.
getCreator
().
createFromImage
(
img
);
execute
(
ptr
->
nativeSetImage
(
ptr
,
cimg
==
null
?
0L
:
cimg
.
ptr
));
execute
(
ptr
->
{
if
(
cimg
==
null
)
{
nativeSetImage
(
ptr
,
0L
);
}
else
{
cimg
.
execute
(
imgPtr
->
nativeSetImage
(
ptr
,
imgPtr
));
}
});
}
/**
...
...
src/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java
浏览文件 @
5334598b
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
6
, 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
...
...
@@ -44,6 +44,9 @@ class CPlatformComponent extends CFRetainedResource
super
(
0
,
true
);
}
/**
* Used by JAWT.
*/
public
long
getPointer
()
{
return
ptr
;
}
...
...
@@ -61,7 +64,7 @@ class CPlatformComponent extends CFRetainedResource
// translates values from the coordinate system of the top-level window
// to the coordinate system of the content view
final
Insets
insets
=
platformWindow
.
getPeer
().
getInsets
();
nativeSetBounds
(
getPointer
(),
x
-
insets
.
left
,
y
-
insets
.
top
,
w
,
h
);
execute
(
ptr
->
nativeSetBounds
(
ptr
,
x
-
insets
.
left
,
y
-
insets
.
top
,
w
,
h
)
);
}
@Override
...
...
src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java
浏览文件 @
5334598b
...
...
@@ -107,11 +107,6 @@ public class CPlatformLWWindow extends CPlatformWindow {
public
void
updateIconImages
()
{
}
@Override
public
long
getNSWindowPtr
()
{
return
0
;
}
@Override
public
SurfaceData
getSurfaceData
()
{
return
null
;
...
...
src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
浏览文件 @
5334598b
/*
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
6
, 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
...
...
@@ -27,6 +27,9 @@ package sun.lwawt.macosx;
import
java.awt.*
;
import
java.awt.geom.Rectangle2D
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicReference
;
import
sun.awt.CGraphicsConfig
;
import
sun.awt.CGraphicsEnvironment
;
...
...
@@ -83,7 +86,7 @@ public class CPlatformView extends CFRetainedResource {
* Cocoa coordinates).
*/
public
void
setBounds
(
int
x
,
int
y
,
int
width
,
int
height
)
{
CWrapper
.
NSView
.
setFrame
(
ptr
,
x
,
y
,
width
,
height
);
execute
(
ptr
->
CWrapper
.
NSView
.
setFrame
(
ptr
,
x
,
y
,
width
,
height
)
);
}
// REMIND: CGLSurfaceData expects top-level's size
...
...
@@ -96,7 +99,7 @@ public class CPlatformView extends CFRetainedResource {
}
public
void
setToolTip
(
String
msg
)
{
CWrapper
.
NSView
.
setToolTip
(
ptr
,
msg
);
execute
(
ptr
->
CWrapper
.
NSView
.
setToolTip
(
ptr
,
msg
)
);
}
// ----------------------------------------------------------------------
...
...
@@ -147,18 +150,25 @@ public class CPlatformView extends CFRetainedResource {
}
public
void
setAutoResizable
(
boolean
toResize
)
{
nativeSetAutoResizable
(
this
.
getAWTView
(),
toResize
);
execute
(
ptr
->
nativeSetAutoResizable
(
ptr
,
toResize
)
);
}
public
boolean
isUnderMouse
()
{
return
nativeIsViewUnderMouse
(
getAWTView
());
AtomicBoolean
ref
=
new
AtomicBoolean
();
execute
(
ptr
->
{
ref
.
set
(
nativeIsViewUnderMouse
(
ptr
));
});
return
ref
.
get
();
}
public
GraphicsDevice
getGraphicsDevice
()
{
GraphicsEnvironment
ge
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
();
CGraphicsEnvironment
cge
=
(
CGraphicsEnvironment
)
ge
;
int
displayID
=
nativeGetNSViewDisplayID
(
getAWTView
());
GraphicsDevice
gd
=
cge
.
getScreenDevice
(
displayID
);
AtomicInteger
ref
=
new
AtomicInteger
();
execute
(
ptr
->
{
ref
.
set
(
nativeGetNSViewDisplayID
(
ptr
));
});
GraphicsDevice
gd
=
cge
.
getScreenDevice
(
ref
.
get
());
if
(
gd
==
null
)
{
// this could possibly happen during device removal
// use the default screen device in this case
...
...
@@ -168,8 +178,15 @@ public class CPlatformView extends CFRetainedResource {
}
public
Point
getLocationOnScreen
()
{
Rectangle
r
=
nativeGetLocationOnScreen
(
this
.
getAWTView
()).
getBounds
();
return
new
Point
(
r
.
x
,
r
.
y
);
AtomicReference
<
Rectangle
>
ref
=
new
AtomicReference
<>();
execute
(
ptr
->
{
ref
.
set
(
nativeGetLocationOnScreen
(
ptr
).
getBounds
());
});
Rectangle
r
=
ref
.
get
();
if
(
r
!=
null
)
{
return
new
Point
(
r
.
x
,
r
.
y
);
}
return
new
Point
(
0
,
0
);
}
// ----------------------------------------------------------------------
...
...
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
浏览文件 @
5334598b
此差异已折叠。
点击以展开。
src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java
浏览文件 @
5334598b
...
...
@@ -36,6 +36,7 @@ import java.awt.image.BufferedImage;
import
java.awt.peer.TrayIconPeer
;
import
java.beans.PropertyChangeEvent
;
import
java.beans.PropertyChangeListener
;
import
java.util.concurrent.atomic.AtomicReference
;
public
class
CTrayIcon
extends
CFRetainedResource
implements
TrayIconPeer
{
private
TrayIcon
target
;
...
...
@@ -88,10 +89,6 @@ public class CTrayIcon extends CFRetainedResource implements TrayIconPeer {
return
nativeCreate
();
}
private
long
getModel
()
{
return
ptr
;
}
private
native
long
nativeCreate
();
//invocation from the AWTTrayIcon.m
...
...
@@ -154,7 +151,7 @@ public class CTrayIcon extends CFRetainedResource implements TrayIconPeer {
@Override
public
void
setToolTip
(
String
tooltip
)
{
nativeSetToolTip
(
getModel
(),
tooltip
);
execute
(
ptr
->
nativeSetToolTip
(
ptr
,
tooltip
)
);
}
//adds tooltip to the NSStatusBar's NSButton.
...
...
@@ -183,7 +180,12 @@ public class CTrayIcon extends CFRetainedResource implements TrayIconPeer {
}
CImage
cimage
=
CImage
.
getCreator
().
createFromImage
(
image
);
setNativeImage
(
getModel
(),
cimage
.
ptr
,
target
.
isImageAutoSize
());
boolean
imageAutoSize
=
target
.
isImageAutoSize
();
cimage
.
execute
(
imagePtr
->
{
execute
(
ptr
->
{
setNativeImage
(
ptr
,
imagePtr
,
imageAutoSize
);
});
});
}
private
native
void
setNativeImage
(
final
long
model
,
final
long
nsimage
,
final
boolean
autosize
);
...
...
@@ -363,7 +365,14 @@ public class CTrayIcon extends CFRetainedResource implements TrayIconPeer {
private
void
showMessageDialog
()
{
Dimension
screenSize
=
java
.
awt
.
Toolkit
.
getDefaultToolkit
().
getScreenSize
();
Point2D
iconLoc
=
nativeGetIconLocation
(
getModel
());
AtomicReference
<
Point2D
>
ref
=
new
AtomicReference
<>();
execute
(
ptr
->
{
ref
.
set
(
nativeGetIconLocation
(
ptr
));
});
Point2D
iconLoc
=
ref
.
get
();
if
(
iconLoc
==
null
)
{
return
;
}
int
dialogY
=
(
int
)
iconLoc
.
getY
();
int
dialogX
=
(
int
)
iconLoc
.
getX
();
...
...
src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java
浏览文件 @
5334598b
...
...
@@ -74,13 +74,13 @@ public class CViewPlatformEmbeddedFrame implements PlatformWindow {
@Override
public
void
dispose
()
{
CWrapper
.
NSView
.
removeFromSuperview
(
view
.
getAWTView
()
);
view
.
execute
(
CWrapper
.
NSView
::
removeFromSuperview
);
view
.
dispose
();
}
@Override
public
void
setVisible
(
boolean
visible
)
{
CWrapper
.
NSView
.
setHidden
(
view
.
getAWTView
(),
!
visible
);
view
.
execute
(
ptr
->
CWrapper
.
NSView
.
setHidden
(
ptr
,
!
visible
)
);
}
@Override
...
...
src/macosx/classes/sun/lwawt/macosx/CWarningWindow.java
浏览文件 @
5334598b
...
...
@@ -219,14 +219,14 @@ public final class CWarningWindow extends CPlatformWindow
@Override
public
void
setVisible
(
boolean
visible
)
{
synchronized
(
lock
)
{
final
long
nsWindowPtr
=
getNSWindowPtr
();
// Actually show or hide the window
if
(
visible
)
{
CWrapper
.
NSWindow
.
orderFront
(
nsWindowPtr
);
}
else
{
CWrapper
.
NSWindow
.
orderOut
(
nsWindowPtr
);
}
execute
(
ptr
->
{
// Actually show or hide the window
if
(
visible
)
{
CWrapper
.
NSWindow
.
orderFront
(
ptr
);
}
else
{
CWrapper
.
NSWindow
.
orderOut
(
ptr
);
}
}
);
this
.
visible
=
visible
;
...
...
@@ -234,8 +234,13 @@ public final class CWarningWindow extends CPlatformWindow
if
(
visible
)
{
// Order myself above my parent
if
(
owner
!=
null
&&
owner
.
isVisible
())
{
CWrapper
.
NSWindow
.
orderWindow
(
nsWindowPtr
,
CWrapper
.
NSWindow
.
NSWindowAbove
,
owner
.
getNSWindowPtr
());
owner
.
execute
(
ownerPtr
->
{
execute
(
ptr
->
{
CWrapper
.
NSWindow
.
orderWindow
(
ptr
,
CWrapper
.
NSWindow
.
NSWindowAbove
,
ownerPtr
);
});
});
// do not allow security warning to be obscured by other windows
applyWindowLevel
(
ownerWindow
);
...
...
src/macosx/native/sun/awt/AWTSurfaceLayers.h
浏览文件 @
5334598b
...
...
@@ -41,6 +41,8 @@
CALayer
*
windowLayer
;
}
@property
(
retain
)
CALayer
*
windowLayer
;
-
(
id
)
initWithWindowLayer
:
(
CALayer
*
)
windowLayer
;
-
(
void
)
setBounds
:
(
CGRect
)
rect
;
...
...
src/macosx/native/sun/awt/AWTSurfaceLayers.m
浏览文件 @
5334598b
...
...
@@ -38,11 +38,15 @@
self
=
[
super
init
];
if
(
self
==
nil
)
return
self
;
windowLayer
=
aWindowLayer
;
self
.
windowLayer
=
aWindowLayer
;
return
self
;
}
-
(
void
)
dealloc
{
self
.
windowLayer
=
nil
;
[
super
dealloc
];
}
-
(
CALayer
*
)
layer
{
return
layer
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录