Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
5129b460
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看板
提交
5129b460
编写于
10月 18, 2012
作者:
A
alexsch
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7175707: [macosx] PIT: 8 b43 Not running on AppKit thread issue again
Reviewed-by: serb, anthony
上级
019262a4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
9 deletion
+19
-9
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
+2
-2
src/macosx/native/sun/awt/AWTWindow.m
src/macosx/native/sun/awt/AWTWindow.m
+17
-7
未找到文件。
src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java
浏览文件 @
5129b460
...
...
@@ -65,7 +65,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
private
static
native
void
nativeDispose
(
long
nsWindowPtr
);
private
static
native
CPlatformWindow
nativeGetTopmostPlatformWindowUnderMouse
();
private
static
native
int
nativeGetNSWindowDisplayID
_AppKitThread
(
long
nsWindowPtr
);
private
static
native
int
nativeGetNSWindowDisplayID
(
long
nsWindowPtr
);
// Loger to report issues happened during execution but that do not affect functionality
private
static
final
PlatformLogger
logger
=
PlatformLogger
.
getLogger
(
"sun.lwawt.macosx.CPlatformWindow"
);
...
...
@@ -444,7 +444,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
public
GraphicsDevice
getGraphicsDevice
()
{
GraphicsEnvironment
ge
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
();
CGraphicsEnvironment
cge
=
(
CGraphicsEnvironment
)
ge
;
int
displayID
=
nativeGetNSWindowDisplayID
_AppKitThread
(
getNSWindowPtr
());
int
displayID
=
nativeGetNSWindowDisplayID
(
getNSWindowPtr
());
GraphicsDevice
gd
=
cge
.
getScreenDevice
(
displayID
);
if
(
gd
==
null
)
{
// this could possibly happen during device removal
...
...
src/macosx/native/sun/awt/AWTWindow.m
浏览文件 @
5129b460
...
...
@@ -324,6 +324,13 @@ AWT_ASSERT_APPKIT_THREAD;
}
}
+
(
NSNumber
*
)
getNSWindowDisplayID_AppKitThread
:(
NSWindow
*
)
window
{
AWT_ASSERT_APPKIT_THREAD
;
NSScreen
*
screen
=
[
window
screen
];
NSDictionary
*
deviceDescription
=
[
screen
deviceDescription
];
return
[
deviceDescription
objectForKey
:
@"NSScreenNumber"
];
}
-
(
void
)
dealloc
{
AWT_ASSERT_APPKIT_THREAD
;
...
...
@@ -1113,19 +1120,22 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSynthesizeMou
* Signature: (J)I
*/
JNIEXPORT
jint
JNICALL
Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindowDisplayID
_1AppKitThread
Java_sun_lwawt_macosx_CPlatformWindow_nativeGetNSWindowDisplayID
(
JNIEnv
*
env
,
jclass
clazz
,
jlong
windowPtr
)
{
jint
ret
;
// CGDirectDisplayID
__block
jint
ret
;
// CGDirectDisplayID
JNF_COCOA_ENTER
(
env
);
AWT_ASSERT_APPKIT_THREAD
;
NSWindow
*
window
=
OBJC
(
windowPtr
);
NSScreen
*
screen
=
[
window
screen
];
NSDictionary
*
deviceDescription
=
[
screen
deviceDescription
];
NSNumber
*
displayID
=
[
deviceDescription
objectForKey
:
@"NSScreenNumber"
];
ret
=
(
jint
)[
displayID
intValue
];
if
([
NSThread
isMainThread
])
{
ret
=
(
jint
)[[
AWTWindow
getNSWindowDisplayID_AppKitThread
:
window
]
intValue
];
}
else
{
[
JNFRunLoop
performOnMainThreadWaiting
:
YES
withBlock
:
^
(){
ret
=
(
jint
)[[
AWTWindow
getNSWindowDisplayID_AppKitThread
:
window
]
intValue
];
}];
}
JNF_COCOA_EXIT
(
env
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录