Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
e933aefe
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看板
提交
e933aefe
编写于
4月 18, 2012
作者:
D
dcherepanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7156194: [macosx] Can't type non-ASCII characters into applets
Reviewed-by: anthony, art
上级
da96d0ce
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
4 deletion
+30
-4
src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
+9
-2
src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java
src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java
+20
-1
src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
+1
-1
未找到文件。
src/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java
浏览文件 @
e933aefe
...
...
@@ -88,13 +88,20 @@ public class CEmbeddedFrame extends EmbeddedFrame {
responder
.
handleScrollEvent
(
x
,
y
,
modifierFlags
,
deltaX
,
deltaY
);
}
public
void
handleKeyEvent
(
int
eventType
,
int
modifierFlags
,
String
characters
,
String
charsIgnoringMods
,
boolean
isRepeat
,
short
keyCode
,
boolean
needsKeyTyped
)
{
responder
.
handleKeyEvent
(
eventType
,
modifierFlags
,
charsIgnoringMods
,
keyCode
,
needsKeyTyped
);
}
// REMIND: delete this method once 'deploy' changes for 7156194 is pushed
public
void
handleKeyEvent
(
int
eventType
,
int
modifierFlags
,
String
characters
,
String
charsIgnoringMods
,
boolean
isRepeat
,
short
keyCode
)
{
responder
.
handleKeyEvent
(
eventType
,
modifierFlags
,
charsIgnoringMods
,
keyCod
e
);
handleKeyEvent
(
eventType
,
modifierFlags
,
characters
,
charsIgnoringMods
,
isRepeat
,
keyCode
,
tru
e
);
}
public
void
handleInputEvent
(
String
text
)
{
new
RuntimeException
(
"Not implemented"
);
responder
.
handleInputEvent
(
text
);
}
public
void
handleFocusEvent
(
boolean
focused
)
{
...
...
src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java
浏览文件 @
e933aefe
...
...
@@ -117,7 +117,7 @@ final class CPlatformResponder {
* Handles key events.
*/
void
handleKeyEvent
(
int
eventType
,
int
modifierFlags
,
String
chars
,
short
keyCode
)
{
short
keyCode
,
boolean
needsKeyTyped
)
{
boolean
isFlagsChangedEvent
=
isNpapiCallback
?
(
eventType
==
CocoaConstants
.
NPCocoaEventFlagsChanged
)
:
(
eventType
==
CocoaConstants
.
NSFlagsChanged
);
...
...
@@ -173,6 +173,10 @@ final class CPlatformResponder {
peer
.
dispatchKeyEvent
(
jeventType
,
when
,
jmodifiers
,
jkeyCode
,
javaChar
,
jkeyLocation
);
// Current browser may be sending input events, so don't
// post the KEY_TYPED here.
postsTyped
&=
needsKeyTyped
;
// That's the reaction on the PRESSED (not RELEASED) event as it comes to
// appear in MacOSX.
// Modifier keys (shift, etc) don't want to send TYPED events.
...
...
@@ -185,4 +189,19 @@ final class CPlatformResponder {
KeyEvent
.
KEY_LOCATION_UNKNOWN
);
}
}
void
handleInputEvent
(
String
text
)
{
if
(
text
!=
null
)
{
int
index
=
0
,
length
=
text
.
length
();
char
c
;
while
(
index
<
length
)
{
c
=
text
.
charAt
(
index
);
peer
.
dispatchKeyEvent
(
KeyEvent
.
KEY_TYPED
,
System
.
currentTimeMillis
(),
0
,
KeyEvent
.
VK_UNDEFINED
,
c
,
KeyEvent
.
KEY_LOCATION_UNKNOWN
);
index
++;
}
}
}
}
src/macosx/classes/sun/lwawt/macosx/CPlatformView.java
浏览文件 @
e933aefe
...
...
@@ -199,7 +199,7 @@ public class CPlatformView extends CFRetainedResource {
private
void
deliverKeyEvent
(
NSEvent
event
)
{
responder
.
handleKeyEvent
(
event
.
getType
(),
event
.
getModifierFlags
(),
event
.
getCharactersIgnoringModifiers
(),
event
.
getKeyCode
());
event
.
getCharactersIgnoringModifiers
(),
event
.
getKeyCode
()
,
true
);
}
private
void
deliverWindowDidExposeEvent
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录