Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
d64dd5e0
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看板
提交
d64dd5e0
编写于
10月 14, 2010
作者:
D
dcherepanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6991992: Need to forward-port AWT's part of the fix for 6691674
Reviewed-by: art
上级
f5d58309
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
66 addition
and
4 deletion
+66
-4
src/share/classes/java/awt/AWTEvent.java
src/share/classes/java/awt/AWTEvent.java
+13
-0
src/share/classes/java/awt/SequencedEvent.java
src/share/classes/java/awt/SequencedEvent.java
+3
-0
src/share/classes/sun/awt/AWTAccessor.java
src/share/classes/sun/awt/AWTAccessor.java
+11
-0
src/share/classes/sun/awt/SunToolkit.java
src/share/classes/sun/awt/SunToolkit.java
+25
-0
src/solaris/classes/sun/awt/X11/InfoWindow.java
src/solaris/classes/sun/awt/X11/InfoWindow.java
+1
-1
src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
+7
-1
src/solaris/classes/sun/awt/X11/XTrayIconPeer.java
src/solaris/classes/sun/awt/X11/XTrayIconPeer.java
+1
-1
src/solaris/classes/sun/awt/X11/XWindow.java
src/solaris/classes/sun/awt/X11/XWindow.java
+2
-0
src/solaris/classes/sun/awt/X11/XWindowPeer.java
src/solaris/classes/sun/awt/X11/XWindowPeer.java
+3
-1
未找到文件。
src/share/classes/java/awt/AWTEvent.java
浏览文件 @
d64dd5e0
...
...
@@ -100,6 +100,12 @@ public abstract class AWTEvent extends EventObject {
transient
boolean
focusManagerIsDispatching
=
false
;
transient
boolean
isPosted
;
/**
* Indicates whether this AWTEvent was generated by the system as
* opposed to by user code.
*/
private
transient
boolean
isSystemGenerated
;
/**
* The event mask for selecting component events.
*/
...
...
@@ -235,6 +241,12 @@ public abstract class AWTEvent extends EventObject {
public
void
setPosted
(
AWTEvent
ev
)
{
ev
.
isPosted
=
true
;
}
public
void
setSystemGenerated
(
AWTEvent
ev
)
{
ev
.
isSystemGenerated
=
true
;
}
public
boolean
isSystemGenerated
(
AWTEvent
ev
)
{
return
ev
.
isSystemGenerated
;
}
});
}
...
...
@@ -554,6 +566,7 @@ public abstract class AWTEvent extends EventObject {
}
}
}
that
.
isSystemGenerated
=
this
.
isSystemGenerated
;
}
void
dispatched
()
{
...
...
src/share/classes/java/awt/SequencedEvent.java
浏览文件 @
d64dd5e0
...
...
@@ -64,6 +64,9 @@ class SequencedEvent extends AWTEvent implements ActiveEvent {
public
SequencedEvent
(
AWTEvent
nested
)
{
super
(
nested
.
getSource
(),
ID
);
this
.
nested
=
nested
;
// All AWTEvents that are wrapped in SequencedEvents are (at
// least currently) implicitly generated by the system
SunToolkit
.
setSystemGenerated
(
nested
);
synchronized
(
SequencedEvent
.
class
)
{
list
.
add
(
this
);
}
...
...
src/share/classes/sun/awt/AWTAccessor.java
浏览文件 @
d64dd5e0
...
...
@@ -302,6 +302,17 @@ public final class AWTAccessor {
* Marks the event as posted.
*/
void
setPosted
(
AWTEvent
ev
);
/**
* Sets the flag on this AWTEvent indicating that it was
* generated by the system.
*/
void
setSystemGenerated
(
AWTEvent
ev
);
/**
* Indicates whether this AWTEvent was generated by the system.
*/
boolean
isSystemGenerated
(
AWTEvent
ev
);
}
public
interface
InputEventAccessor
{
...
...
src/share/classes/sun/awt/SunToolkit.java
浏览文件 @
d64dd5e0
...
...
@@ -591,6 +591,12 @@ public abstract class SunToolkit extends Toolkit
if
(
event
==
null
)
{
throw
new
NullPointerException
();
}
// All events posted via this method are system-generated.
// Placing the following call here reduces considerably the
// number of places throughout the toolkit that would
// otherwise have to be modified to precisely identify
// system-generated events.
setSystemGenerated
(
event
);
AppContext
eventContext
=
targetToAppContext
(
event
.
getSource
());
if
(
eventContext
!=
null
&&
!
eventContext
.
equals
(
appContext
))
{
log
.
fine
(
"Event posted on wrong app context : "
+
event
);
...
...
@@ -2093,6 +2099,25 @@ public abstract class SunToolkit extends Toolkit
}
return
isInstanceOf
(
cls
.
getSuperclass
(),
type
);
}
///////////////////////////////////////////////////////////////////////////
//
// The following methods help set and identify whether a particular
// AWTEvent object was produced by the system or by user code. As of this
// writing the only consumer is the Java Plug-In, although this information
// could be useful to more clients and probably should be formalized in
// the public API.
//
///////////////////////////////////////////////////////////////////////////
public
static
void
setSystemGenerated
(
AWTEvent
e
)
{
AWTAccessor
.
getAWTEventAccessor
().
setSystemGenerated
(
e
);
}
public
static
boolean
isSystemGenerated
(
AWTEvent
e
)
{
return
AWTAccessor
.
getAWTEventAccessor
().
isSystemGenerated
(
e
);
}
}
// class SunToolkit
...
...
src/solaris/classes/sun/awt/X11/InfoWindow.java
浏览文件 @
d64dd5e0
...
...
@@ -432,7 +432,7 @@ public abstract class InfoWindow extends Window {
ActionEvent
aev
=
new
ActionEvent
(
target
,
ActionEvent
.
ACTION_PERFORMED
,
liveArguments
.
getActionCommand
(),
e
.
getWhen
(),
e
.
getModifiers
());
Toolkit
.
getDefaultToolkit
().
getSystemEventQueue
().
postEvent
(
aev
);
XToolkit
.
postEvent
(
XToolkit
.
targetToAppContext
(
aev
.
getSource
()),
aev
);
}
}
}
...
...
src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
浏览文件 @
d64dd5e0
...
...
@@ -61,6 +61,7 @@ import javax.swing.plaf.BorderUIResource;
import
java.awt.im.InputMethodRequests
;
import
sun.awt.CausedFocusEvent
;
import
sun.awt.AWTAccessor
;
import
sun.awt.SunToolkit
;
class
XTextAreaPeer
extends
XComponentPeer
implements
TextAreaPeer
{
...
...
@@ -1318,13 +1319,18 @@ class XTextAreaPeer extends XComponentPeer implements TextAreaPeer {
Component
source
,
Point
point
,
MouseEvent
template
)
{
MouseEvent
e
=
template
;
return
new
MouseEvent
(
MouseEvent
nme
=
new
MouseEvent
(
source
,
e
.
getID
(),
e
.
getWhen
(),
e
.
getModifiersEx
()
|
e
.
getModifiers
(),
point
.
x
,
point
.
y
,
e
.
getXOnScreen
(),
e
.
getYOnScreen
(),
e
.
getClickCount
(),
e
.
isPopupTrigger
(),
e
.
getButton
()
);
// Because these MouseEvents are dispatched directly to
// their target, we need to mark them as being
// system-generated here
SunToolkit
.
setSystemGenerated
(
nme
);
return
nme
;
}
private
void
setCursor
()
{
...
...
src/solaris/classes/sun/awt/X11/XTrayIconPeer.java
浏览文件 @
d64dd5e0
...
...
@@ -454,7 +454,7 @@ public class XTrayIconPeer implements TrayIconPeer,
ActionEvent
aev
=
new
ActionEvent
(
xtiPeer
.
target
,
ActionEvent
.
ACTION_PERFORMED
,
xtiPeer
.
target
.
getActionCommand
(),
e
.
getWhen
(),
e
.
getModifiers
());
Toolkit
.
getDefaultToolkit
().
getSystemEventQueue
().
postEvent
(
aev
);
XToolkit
.
postEvent
(
XToolkit
.
targetToAppContext
(
aev
.
getSource
()),
aev
);
}
if
(
xtiPeer
.
balloon
.
isVisible
())
{
xtiPeer
.
balloon
.
hide
();
...
...
src/solaris/classes/sun/awt/X11/XWindow.java
浏览文件 @
d64dd5e0
...
...
@@ -401,6 +401,8 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
if
(
isPostedField
==
null
)
{
isPostedField
=
SunToolkit
.
getField
(
AWTEvent
.
class
,
"isPosted"
);
}
// The uses of this method imply that the incoming event is system-generated
SunToolkit
.
setSystemGenerated
(
e
);
PeerEvent
pe
=
new
PeerEvent
(
Toolkit
.
getDefaultToolkit
(),
new
Runnable
()
{
public
void
run
()
{
try
{
...
...
src/solaris/classes/sun/awt/X11/XWindowPeer.java
浏览文件 @
d64dd5e0
...
...
@@ -604,7 +604,9 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
public
void
handleWindowFocusIn_Dispatch
()
{
if
(
EventQueue
.
isDispatchThread
())
{
XKeyboardFocusManagerPeer
.
setCurrentNativeFocusedWindow
((
Window
)
target
);
target
.
dispatchEvent
(
new
WindowEvent
((
Window
)
target
,
WindowEvent
.
WINDOW_GAINED_FOCUS
));
WindowEvent
we
=
new
WindowEvent
((
Window
)
target
,
WindowEvent
.
WINDOW_GAINED_FOCUS
);
SunToolkit
.
setSystemGenerated
(
we
);
target
.
dispatchEvent
(
we
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录