Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
312d0732
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看板
提交
312d0732
编写于
5月 03, 2012
作者:
K
kizune
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7148289: [macosx] Deadlock in sun.lwawt.macosx.CWrapper$NSScreen.visibleFrame
Reviewed-by: leonidr
上级
8f9460fa
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
42 addition
and
3 deletion
+42
-3
src/macosx/classes/sun/lwawt/macosx/CToolkitThreadBlockedHandler.java
...lasses/sun/lwawt/macosx/CToolkitThreadBlockedHandler.java
+4
-3
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
+4
-0
src/macosx/native/sun/awt/LWCToolkit.m
src/macosx/native/sun/awt/LWCToolkit.m
+34
-0
未找到文件。
src/macosx/classes/sun/lwawt/macosx/CToolkitThreadBlockedHandler.java
浏览文件 @
312d0732
...
...
@@ -27,9 +27,9 @@ package sun.lwawt.macosx;
import
sun.awt.datatransfer.ToolkitThreadBlockedHandler
;
// TODO:BG this class is really a NOOP right now, but should be filled in if needed.
final
class
CToolkitThreadBlockedHandler
implements
ToolkitThreadBlockedHandler
{
private
final
LWCToolkit
toolkit
=
(
LWCToolkit
)
java
.
awt
.
Toolkit
.
getDefaultToolkit
();
public
void
lock
()
{
}
...
...
@@ -41,9 +41,10 @@ final class CToolkitThreadBlockedHandler implements ToolkitThreadBlockedHandler
}
public
void
enter
()
{
toolkit
.
startNativeNestedEventLoop
();
}
public
void
exit
()
{
toolkit
.
stopNativeNestedEventLoop
();
}
}
src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java
浏览文件 @
312d0732
...
...
@@ -63,6 +63,10 @@ public class LWCToolkit extends LWToolkit {
private
static
native
void
initIDs
();
static
native
void
startNativeNestedEventLoop
();
static
native
void
stopNativeNestedEventLoop
();
private
static
CInputMethodDescriptor
sInputMethodDescriptor
;
static
{
...
...
src/macosx/native/sun/awt/LWCToolkit.m
浏览文件 @
312d0732
...
...
@@ -42,6 +42,7 @@ jint* gButtonDownMasks;
@implementation
AWTToolkit
static
long
eventCount
;
static
bool
shouldKeepRunningNestedLoop
=
NO
;
+
(
long
)
getEventCount
{
return
eventCount
;
...
...
@@ -456,3 +457,36 @@ Java_sun_font_FontManager_populateFontFileNameMap
{
}
/*
* Class: sun_lwawt_macosx_LWCToolkit
* Method: startNativeNestedEventLoop
* Signature: ()V
*/
JNIEXPORT
void
JNICALL
Java_sun_lwawt_macosx_LWCToolkit_startNativeNestedEventLoop
(
JNIEnv
*
env
,
jclass
cls
)
{
if
(
!
shouldKeepRunningNestedLoop
)
{
NSRunLoop
*
theRL
=
[
NSRunLoop
currentRunLoop
];
NSApplication
*
app
=
[
NSApplication
sharedApplication
];
shouldKeepRunningNestedLoop
=
YES
;
while
(
shouldKeepRunningNestedLoop
&&
[
theRL
runMode
:
NSDefaultRunLoopMode
beforeDate
:[
NSDate
distantFuture
]])
{
NSEvent
*
event
=
[
app
nextEventMatchingMask
:
0xFFFFFFFF
untilDate
:
nil
inMode
:
NSDefaultRunLoopMode
dequeue
:
YES
];
if
(
event
!=
nil
)
{
[
app
sendEvent
:
event
];
}
}
}
}
/*
* Class: sun_lwawt_macosx_LWCToolkit
* Method: stopNativeNestedEventLoop
* Signature: ()V
*/
JNIEXPORT
void
JNICALL
Java_sun_lwawt_macosx_LWCToolkit_stopNativeNestedEventLoop
(
JNIEnv
*
env
,
jclass
cls
)
{
shouldKeepRunningNestedLoop
=
NO
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录