Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
d10f1376
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看板
提交
d10f1376
编写于
3月 01, 2011
作者:
D
dcherepanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6826397: PIT : Frame System Menu is not seen for when ALT + Space Bar is pressed in jdk7 b55 build.
Reviewed-by: art, ant
上级
c7fc8929
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
30 addition
and
90 deletion
+30
-90
src/windows/native/sun/windows/awt_Frame.cpp
src/windows/native/sun/windows/awt_Frame.cpp
+26
-73
src/windows/native/sun/windows/awt_Frame.h
src/windows/native/sun/windows/awt_Frame.h
+4
-17
未找到文件。
src/windows/native/sun/windows/awt_Frame.cpp
浏览文件 @
d10f1376
...
@@ -109,7 +109,6 @@ AwtFrame::AwtFrame() {
...
@@ -109,7 +109,6 @@ AwtFrame::AwtFrame() {
m_isMenuDropped
=
FALSE
;
m_isMenuDropped
=
FALSE
;
m_isInputMethodWindow
=
FALSE
;
m_isInputMethodWindow
=
FALSE
;
m_isUndecorated
=
FALSE
;
m_isUndecorated
=
FALSE
;
m_proxyFocusOwner
=
NULL
;
m_lastProxiedFocusOwner
=
NULL
;
m_lastProxiedFocusOwner
=
NULL
;
m_actualFocusedWindow
=
NULL
;
m_actualFocusedWindow
=
NULL
;
m_iconic
=
FALSE
;
m_iconic
=
FALSE
;
...
@@ -127,7 +126,6 @@ AwtFrame::~AwtFrame()
...
@@ -127,7 +126,6 @@ AwtFrame::~AwtFrame()
void
AwtFrame
::
Dispose
()
void
AwtFrame
::
Dispose
()
{
{
DestroyProxyFocusOwner
();
AwtWindow
::
Dispose
();
AwtWindow
::
Dispose
();
}
}
...
@@ -308,22 +306,9 @@ done:
...
@@ -308,22 +306,9 @@ done:
return
frame
;
return
frame
;
}
}
LRESULT
CALLBACK
AwtFrame
::
ProxyWindowProc
(
HWND
hwnd
,
UINT
message
,
LRESULT
AwtFrame
::
ProxyWindowProc
(
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
,
MsgRouting
&
mr
)
WPARAM
wParam
,
LPARAM
lParam
)
{
{
TRY
;
LRESULT
retValue
=
0L
;
DASSERT
(
::
IsWindow
(
hwnd
));
AwtFrame
*
parent
=
(
AwtFrame
*
)
AwtComponent
::
GetComponentImpl
(
::
GetParent
(
hwnd
));
if
(
!
parent
||
parent
->
GetProxyFocusOwner
()
!=
hwnd
||
message
==
AwtComponent
::
WmAwtIsComponent
||
message
==
WM_GETOBJECT
)
{
return
ComCtl32Util
::
GetInstance
().
DefWindowProc
(
NULL
,
hwnd
,
message
,
wParam
,
lParam
);
}
AwtComponent
*
focusOwner
=
NULL
;
AwtComponent
*
focusOwner
=
NULL
;
// IME and input language related messages need to be sent to a window
// IME and input language related messages need to be sent to a window
...
@@ -346,19 +331,23 @@ LRESULT CALLBACK AwtFrame::ProxyWindowProc(HWND hwnd, UINT message,
...
@@ -346,19 +331,23 @@ LRESULT CALLBACK AwtFrame::ProxyWindowProc(HWND hwnd, UINT message,
// TODO: when a Choice's list is dropped down and we're scrolling in
// TODO: when a Choice's list is dropped down and we're scrolling in
// the list WM_MOUSEWHEEL messages come to the poxy, not to the list. Why?
// the list WM_MOUSEWHEEL messages come to the poxy, not to the list. Why?
case
WM_MOUSEWHEEL
:
case
WM_MOUSEWHEEL
:
focusOwner
=
AwtComponent
::
GetComponent
(
parent
->
GetLastProxiedFocusOwner
());
focusOwner
=
AwtComponent
::
GetComponent
(
GetLastProxiedFocusOwner
());
if
(
focusOwner
!=
NULL
)
{
if
(
focusOwner
!=
NULL
&&
return
focusOwner
->
WindowProc
(
message
,
wParam
,
lParam
);
focusOwner
!=
this
)
// avoid recursive calls
{
retValue
=
focusOwner
->
WindowProc
(
message
,
wParam
,
lParam
);
mr
=
mrConsume
;
}
}
break
;
break
;
case
WM_SETFOCUS
:
case
WM_SETFOCUS
:
if
(
!
sm_suppressFocusAndActivation
&&
parent
->
IsEmbeddedFrame
())
{
if
(
!
sm_suppressFocusAndActivation
&&
IsEmbeddedFrame
())
{
parent
->
AwtSetActiveWindow
();
AwtSetActiveWindow
();
}
}
return
0
;
mr
=
mrConsume
;
break
;
case
WM_KILLFOCUS
:
case
WM_KILLFOCUS
:
if
(
!
sm_suppressFocusAndActivation
&&
parent
->
IsEmbeddedFrame
())
{
if
(
!
sm_suppressFocusAndActivation
&&
IsEmbeddedFrame
())
{
AwtWindow
::
SynthesizeWmActivate
(
FALSE
,
parent
->
GetHWnd
(),
NULL
);
AwtWindow
::
SynthesizeWmActivate
(
FALSE
,
GetHWnd
(),
NULL
);
}
else
if
(
sm_restoreFocusAndActivation
)
{
}
else
if
(
sm_restoreFocusAndActivation
)
{
if
(
AwtComponent
::
GetFocusedWindow
()
!=
NULL
)
{
if
(
AwtComponent
::
GetFocusedWindow
()
!=
NULL
)
{
...
@@ -369,64 +358,28 @@ LRESULT CALLBACK AwtFrame::ProxyWindowProc(HWND hwnd, UINT message,
...
@@ -369,64 +358,28 @@ LRESULT CALLBACK AwtFrame::ProxyWindowProc(HWND hwnd, UINT message,
}
}
}
}
}
}
return
0
;
mr
=
mrConsume
;
break
;
case
0x0127
:
// WM_CHANGEUISTATE
case
0x0127
:
// WM_CHANGEUISTATE
case
0x0128
:
// WM_UPDATEUISTATE
case
0x0128
:
// WM_UPDATEUISTATE
return
0
;
mr
=
mrConsume
;
}
break
;
return
parent
->
WindowProc
(
message
,
wParam
,
lParam
);
CATCH_BAD_ALLOC_RET
(
0
);
}
void
AwtFrame
::
CreateProxyFocusOwner
()
{
if
(
AwtToolkit
::
IsMainThread
())
{
AwtFrame
::
_CreateProxyFocusOwner
((
void
*
)
this
);
}
else
{
AwtToolkit
::
GetInstance
().
InvokeFunction
(
AwtFrame
::
_CreateProxyFocusOwner
,
(
void
*
)
this
);
}
}
}
void
AwtFrame
::
_CreateProxyFocusOwner
(
void
*
param
)
{
DASSERT
(
AwtToolkit
::
IsMainThread
());
AwtFrame
*
f
=
(
AwtFrame
*
)
param
;
DASSERT
(
f
->
m_proxyFocusOwner
==
NULL
);
f
->
m_proxyFocusOwner
=
::
CreateWindow
(
TEXT
(
"STATIC"
),
return
retValue
;
TEXT
(
"ProxyFocusOwner"
),
WS_CHILD
,
0
,
0
,
0
,
0
,
f
->
GetHWnd
(),
NULL
,
AwtToolkit
::
GetInstance
().
GetModuleHandle
(),
NULL
);
f
->
m_proxyDefWindowProc
=
ComCtl32Util
::
GetInstance
().
SubclassHWND
(
f
->
m_proxyFocusOwner
,
ProxyWindowProc
);
}
}
void
AwtFrame
::
DestroyProxyFocusOwner
(
)
LRESULT
AwtFrame
::
WindowProc
(
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
// proxy focus owner must be destroyed on toolkit thread only
MsgRouting
mr
=
mrDoDefault
;
if
(
AwtToolkit
::
IsMainThread
())
{
LRESULT
retValue
=
0L
;
AwtFrame
::
_DestroyProxyFocusOwner
((
void
*
)
this
);
}
else
{
AwtToolkit
::
GetInstance
().
InvokeFunction
(
AwtFrame
::
_DestroyProxyFocusOwner
,
(
void
*
)
this
);
}
}
void
AwtFrame
::
_DestroyProxyFocusOwner
(
void
*
param
)
retValue
=
ProxyWindowProc
(
message
,
wParam
,
lParam
,
mr
);
{
DASSERT
(
AwtToolkit
::
IsMainThread
());
AwtFrame
*
f
=
(
AwtFrame
*
)
param
;
if
(
mr
!=
mrConsume
)
{
if
(
f
->
m_proxyFocusOwner
!=
NULL
)
{
retValue
=
AwtWindow
::
WindowProc
(
message
,
wParam
,
lParam
);
HWND
toDestroy
=
f
->
m_proxyFocusOwner
;
f
->
m_proxyFocusOwner
=
NULL
;
ComCtl32Util
::
GetInstance
().
UnsubclassHWND
(
toDestroy
,
ProxyWindowProc
,
f
->
m_proxyDefWindowProc
);
::
DestroyWindow
(
toDestroy
);
}
}
return
retValue
;
}
}
MsgRouting
AwtFrame
::
WmShowWindow
(
BOOL
show
,
UINT
status
)
MsgRouting
AwtFrame
::
WmShowWindow
(
BOOL
show
,
UINT
status
)
...
...
src/windows/native/sun/windows/awt_Frame.h
浏览文件 @
d10f1376
...
@@ -96,6 +96,8 @@ public:
...
@@ -96,6 +96,8 @@ public:
AwtMenuBar
*
GetMenuBar
();
AwtMenuBar
*
GetMenuBar
();
void
SetMenuBar
(
AwtMenuBar
*
);
void
SetMenuBar
(
AwtMenuBar
*
);
virtual
LRESULT
WindowProc
(
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
);
MsgRouting
WmGetMinMaxInfo
(
LPMINMAXINFO
lpmmi
);
MsgRouting
WmGetMinMaxInfo
(
LPMINMAXINFO
lpmmi
);
MsgRouting
WmSize
(
UINT
type
,
int
w
,
int
h
);
MsgRouting
WmSize
(
UINT
type
,
int
w
,
int
h
);
MsgRouting
WmActivate
(
UINT
nState
,
BOOL
fMinimized
,
HWND
opposite
);
MsgRouting
WmActivate
(
UINT
nState
,
BOOL
fMinimized
,
HWND
opposite
);
...
@@ -117,10 +119,7 @@ public:
...
@@ -117,10 +119,7 @@ public:
INLINE
BOOL
IsUndecorated
()
{
return
m_isUndecorated
;
}
INLINE
BOOL
IsUndecorated
()
{
return
m_isUndecorated
;
}
INLINE
HWND
GetProxyFocusOwner
()
{
INLINE
HWND
GetProxyFocusOwner
()
{
if
(
m_proxyFocusOwner
==
NULL
)
{
return
GetHWnd
();
CreateProxyFocusOwner
();
}
return
m_proxyFocusOwner
;
}
}
void
SetMaximizedBounds
(
int
x
,
int
y
,
int
w
,
int
h
);
void
SetMaximizedBounds
(
int
x
,
int
y
,
int
w
,
int
h
);
...
@@ -159,15 +158,7 @@ protected:
...
@@ -159,15 +158,7 @@ protected:
BOOL
m_isUndecorated
;
BOOL
m_isUndecorated
;
private:
private:
static
LRESULT
CALLBACK
ProxyWindowProc
(
HWND
hwnd
,
UINT
message
,
LRESULT
ProxyWindowProc
(
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
,
MsgRouting
&
mr
);
WPARAM
wParam
,
LPARAM
lParam
);
void
CreateProxyFocusOwner
();
void
DestroyProxyFocusOwner
();
/* creates proxy focus owner, called on Toolkit thread */
static
void
_CreateProxyFocusOwner
(
void
*
param
);
/* destroys proxy focus owner, called on Toolkit thread */
static
void
_DestroyProxyFocusOwner
(
void
*
param
);
/* The frame's embedding parent (if any) */
/* The frame's embedding parent (if any) */
HWND
m_parentWnd
;
HWND
m_parentWnd
;
...
@@ -188,10 +179,6 @@ private:
...
@@ -188,10 +179,6 @@ private:
/* The frame is an InputMethodWindow */
/* The frame is an InputMethodWindow */
BOOL
m_isInputMethodWindow
;
BOOL
m_isInputMethodWindow
;
/* Receives all keyboard input when an AwtWindow which is not an AwtFrame
or an AwtDialog (or one of its children) has the logical input focus. */
HWND
m_proxyFocusOwner
;
/* Retains the last/current sm_focusOwner proxied. Actually, it should be
/* Retains the last/current sm_focusOwner proxied. Actually, it should be
* a component of an owned window last/currently active. */
* a component of an owned window last/currently active. */
HWND
m_lastProxiedFocusOwner
;
HWND
m_lastProxiedFocusOwner
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录