Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
da96d0ce
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看板
提交
da96d0ce
编写于
4月 17, 2012
作者:
K
kizune
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7161109: [macosx] JCK AWT interactive test DnDTextDropTest fails on MacOS
Reviewed-by: serb
上级
430f1bd4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
39 addition
and
21 deletion
+39
-21
src/macosx/classes/sun/lwawt/LWComponentPeer.java
src/macosx/classes/sun/lwawt/LWComponentPeer.java
+35
-21
src/macosx/native/sun/awt/CDropTarget.m
src/macosx/native/sun/awt/CDropTarget.m
+4
-0
未找到文件。
src/macosx/classes/sun/lwawt/LWComponentPeer.java
浏览文件 @
da96d0ce
...
...
@@ -985,16 +985,23 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
// DropTargetPeer Method
@Override
public
void
addDropTarget
(
DropTarget
dt
)
{
synchronized
(
dropTargetLock
){
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if
(++
fNumDropTargets
==
1
)
{
// Having a non-null drop target would be an error but let's check just in case:
if
(
fDropTarget
!=
null
)
System
.
err
.
println
(
"CComponent.addDropTarget(): current drop target is non-null."
);
// Create a new drop target:
fDropTarget
=
CDropTarget
.
createDropTarget
(
dt
,
target
,
this
);
LWWindowPeer
winPeer
=
getWindowPeerOrSelf
();
if
(
winPeer
!=
null
&&
winPeer
!=
this
)
{
// We need to register the DropTarget in the
// peer of the window ancestor of the component
winPeer
.
addDropTarget
(
dt
);
}
else
{
synchronized
(
dropTargetLock
)
{
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if
(++
fNumDropTargets
==
1
)
{
// Having a non-null drop target would be an error but let's check just in case:
if
(
fDropTarget
!=
null
)
System
.
err
.
println
(
"CComponent.addDropTarget(): current drop target is non-null."
);
// Create a new drop target:
fDropTarget
=
CDropTarget
.
createDropTarget
(
dt
,
target
,
this
);
}
}
}
}
...
...
@@ -1002,17 +1009,24 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
// DropTargetPeer Method
@Override
public
void
removeDropTarget
(
DropTarget
dt
)
{
synchronized
(
dropTargetLock
){
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if
(--
fNumDropTargets
==
0
)
{
// Having a null drop target would be an error but let's check just in case:
if
(
fDropTarget
!=
null
)
{
// Dispose of the drop target:
fDropTarget
.
dispose
();
fDropTarget
=
null
;
}
else
System
.
err
.
println
(
"CComponent.removeDropTarget(): current drop target is null."
);
LWWindowPeer
winPeer
=
getWindowPeerOrSelf
();
if
(
winPeer
!=
null
&&
winPeer
!=
this
)
{
// We need to unregister the DropTarget in the
// peer of the window ancestor of the component
winPeer
.
removeDropTarget
(
dt
);
}
else
{
synchronized
(
dropTargetLock
){
// 10-14-02 VL: Windows WComponentPeer would add (or remove) the drop target only
// if it's the first (or last) one for the component. Otherwise this call is a no-op.
if
(--
fNumDropTargets
==
0
)
{
// Having a null drop target would be an error but let's check just in case:
if
(
fDropTarget
!=
null
)
{
// Dispose of the drop target:
fDropTarget
.
dispose
();
fDropTarget
=
null
;
}
else
System
.
err
.
println
(
"CComponent.removeDropTarget(): current drop target is null."
);
}
}
}
}
...
...
src/macosx/native/sun/awt/CDropTarget.m
浏览文件 @
da96d0ce
...
...
@@ -648,6 +648,10 @@ extern JNFClassInfo jc_CDropTargetContextPeer;
if
(
sDraggingError
==
FALSE
)
{
sDraggingLocation
=
[
sender
draggingLocation
];
NSPoint
javaLocation
=
[
fView
convertPoint
:
sDraggingLocation
fromView
:
nil
];
// The y coordinate that comes in the NSDraggingInfo seems to be reversed - probably
// has to do something with the type of view it comes to.
// This is the earliest place where we can correct it.
javaLocation
.
y
=
fView
.
window
.
frame
.
size
.
height
-
javaLocation
.
y
;
jint
actions
=
[
DnDUtilities
mapNSDragOperationMaskToJava
:[
sender
draggingSourceOperationMask
]];
jint
dropAction
=
sJavaDropOperation
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录