Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
e46db277
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看板
提交
e46db277
编写于
12月 27, 2010
作者:
D
dcherepanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6921598: PrinterDialog hidden behind other frames
Reviewed-by: art
上级
24b96f5f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
34 addition
and
34 deletion
+34
-34
src/windows/native/sun/windows/awt_Dialog.cpp
src/windows/native/sun/windows/awt_Dialog.cpp
+32
-32
src/windows/native/sun/windows/awt_Dialog.h
src/windows/native/sun/windows/awt_Dialog.h
+2
-2
未找到文件。
src/windows/native/sun/windows/awt_Dialog.cpp
浏览文件 @
e46db277
...
...
@@ -230,7 +230,7 @@ LRESULT CALLBACK AwtDialog::ModalFilterProc(int code,
if
(
::
IsIconic
(
hWnd
))
{
::
ShowWindow
(
hWnd
,
SW_RESTORE
);
}
Popup
AllDialog
s
(
blocker
,
TRUE
,
::
GetForegroundWindow
(),
FALSE
);
Popup
Blocker
s
(
blocker
,
TRUE
,
::
GetForegroundWindow
(),
FALSE
);
// return 1 to prevent the system from allowing the operation
return
1
;
}
...
...
@@ -256,7 +256,7 @@ LRESULT CALLBACK AwtDialog::MouseHookProc(int nCode,
HWND
blocker
=
AwtWindow
::
GetModalBlocker
(
AwtComponent
::
GetTopLevelParentForWindow
(
hWnd
));
if
(
::
IsWindow
(
blocker
))
{
BOOL
onTaskbar
=
!
(
::
WindowFromPoint
(
mhs
->
pt
)
==
hWnd
);
Popup
AllDialogs
(
hWnd
,
FALSE
,
::
GetForegroundWindow
(),
onTaskbar
);
Popup
Blockers
(
blocker
,
FALSE
,
::
GetForegroundWindow
(),
onTaskbar
);
// return a nonzero value to prevent the system from passing
// the message to the target window procedure
return
1
;
...
...
@@ -268,60 +268,60 @@ LRESULT CALLBACK AwtDialog::MouseHookProc(int nCode,
}
/*
* The function goes through the h
eirarchy of the blocker dialog
s and
* popups all the
dialog
s. Note that the function starts from the top
* blocker
dialog and goes down to the dialog which is the bottom dialog
.
* Using another traversal
may cause to the flickering issue as a bottom
*
dialog will cover a top dialog for some period of tim
e.
* The function goes through the h
ierarchy of the blocker
s and
* popups all the
blocker
s. Note that the function starts from the top
* blocker
and goes down to the blocker which is the bottom one
.
* Using another traversal
algorithm (bottom->top) may cause to flickering
*
as the bottom blocker will cover the top blocker for a whil
e.
*/
void
AwtDialog
::
Popup
AllDialogs
(
HWND
dialog
,
BOOL
isModalHook
,
HWND
prevFGWindow
,
BOOL
onTaskbar
)
void
AwtDialog
::
Popup
Blockers
(
HWND
blocker
,
BOOL
isModalHook
,
HWND
prevFGWindow
,
BOOL
onTaskbar
)
{
HWND
blocker
=
AwtWindow
::
GetModalBlocker
(
dialog
);
BOOL
isBlocked
=
::
IsWindow
(
b
locker
);
if
(
isBlocked
)
{
Popup
AllDialogs
(
b
locker
,
isModalHook
,
prevFGWindow
,
onTaskbar
);
HWND
nextBlocker
=
AwtWindow
::
GetModalBlocker
(
blocker
);
BOOL
nextBlockerExists
=
::
IsWindow
(
nextB
locker
);
if
(
nextBlockerExists
)
{
Popup
Blockers
(
nextB
locker
,
isModalHook
,
prevFGWindow
,
onTaskbar
);
}
Popup
OneDialog
(
dialog
,
b
locker
,
isModalHook
,
prevFGWindow
,
onTaskbar
);
Popup
Blocker
(
blocker
,
nextB
locker
,
isModalHook
,
prevFGWindow
,
onTaskbar
);
}
/*
* The function popups the
dialog, it distinguishes non-blocked dialogs
*
and activates the dialogs (sets as foreground window). If the dialog is
*
blocked, then it changes the Z-order of the dialog
.
* The function popups the
blocker, for a non-blocked blocker we need
*
to activate the blocker but if a blocker is blocked, then we need
*
to change z-order of the blocker placing the blocker under the next blocker
.
*/
void
AwtDialog
::
Popup
OneDialog
(
HWND
dialog
,
HWND
b
locker
,
BOOL
isModalHook
,
HWND
prevFGWindow
,
BOOL
onTaskbar
)
void
AwtDialog
::
Popup
Blocker
(
HWND
blocker
,
HWND
nextB
locker
,
BOOL
isModalHook
,
HWND
prevFGWindow
,
BOOL
onTaskbar
)
{
if
(
dialog
==
AwtToolkit
::
GetInstance
().
GetHWnd
())
{
if
(
blocker
==
AwtToolkit
::
GetInstance
().
GetHWnd
())
{
return
;
}
// fix for 6494032
if
(
isModalHook
&&
!::
IsWindowVisible
(
dialog
))
{
::
ShowWindow
(
dialog
,
SW_SHOWNA
);
if
(
isModalHook
&&
!::
IsWindowVisible
(
blocker
))
{
::
ShowWindow
(
blocker
,
SW_SHOWNA
);
}
BOOL
isBlocked
=
::
IsWindow
(
b
locker
);
BOOL
nextBlockerExists
=
::
IsWindow
(
nextB
locker
);
UINT
flags
=
SWP_NOACTIVATE
|
SWP_NOMOVE
|
SWP_NOSIZE
;
if
(
isBlocked
)
{
if
(
nextBlockerExists
)
{
// Fix for 6829546: if blocker is a top-most window, but window isn't, then
// calling ::SetWindowPos(dialog, blocker, ...) makes window top-most as well
BOOL
isBlockerTopmost
=
(
::
GetWindowLong
(
b
locker
,
GWL_EXSTYLE
)
&
WS_EX_TOPMOST
)
!=
0
;
BOOL
isDialogTopmost
=
(
::
GetWindowLong
(
dialog
,
GWL_EXSTYLE
)
&
WS_EX_TOPMOST
)
!=
0
;
if
(
!
isBlockerTopmost
||
isDialogTopmost
)
{
::
SetWindowPos
(
dialog
,
b
locker
,
0
,
0
,
0
,
0
,
flags
);
BOOL
topmostNextBlocker
=
(
::
GetWindowLong
(
nextB
locker
,
GWL_EXSTYLE
)
&
WS_EX_TOPMOST
)
!=
0
;
BOOL
topmostBlocker
=
(
::
GetWindowLong
(
blocker
,
GWL_EXSTYLE
)
&
WS_EX_TOPMOST
)
!=
0
;
if
(
!
topmostNextBlocker
||
topmostBlocker
)
{
::
SetWindowPos
(
blocker
,
nextB
locker
,
0
,
0
,
0
,
0
,
flags
);
}
else
{
::
SetWindowPos
(
dialog
,
HWND_TOP
,
0
,
0
,
0
,
0
,
flags
);
::
SetWindowPos
(
blocker
,
HWND_TOP
,
0
,
0
,
0
,
0
,
flags
);
}
}
else
{
::
SetWindowPos
(
dialog
,
HWND_TOP
,
0
,
0
,
0
,
0
,
flags
);
::
SetWindowPos
(
blocker
,
HWND_TOP
,
0
,
0
,
0
,
0
,
flags
);
// no beep/flash if the mouse was clicked in the taskbar menu
// or the dialog is currently inactive
if
(
!
isModalHook
&&
!
onTaskbar
&&
(
dialog
==
prevFGWindow
))
{
AnimateModalBlocker
(
dialog
);
if
(
!
isModalHook
&&
!
onTaskbar
&&
(
blocker
==
prevFGWindow
))
{
AnimateModalBlocker
(
blocker
);
}
::
BringWindowToTop
(
dialog
);
::
SetForegroundWindow
(
dialog
);
::
BringWindowToTop
(
blocker
);
::
SetForegroundWindow
(
blocker
);
}
}
...
...
src/windows/native/sun/windows/awt_Dialog.h
浏览文件 @
e46db277
...
...
@@ -113,8 +113,8 @@ private:
*/
static
void
ModalPerformActivation
(
HWND
hWnd
);
static
void
Popup
AllDialogs
(
HWND
dialog
,
BOOL
isModalHook
,
HWND
prevFGWindow
,
BOOL
onTaskbar
);
static
void
Popup
OneDialog
(
HWND
dialog
,
HWND
b
locker
,
BOOL
isModalHook
,
HWND
prevFGWindow
,
BOOL
onTaskbar
);
static
void
Popup
Blockers
(
HWND
blocker
,
BOOL
isModalHook
,
HWND
prevFGWindow
,
BOOL
onTaskbar
);
static
void
Popup
Blocker
(
HWND
blocker
,
HWND
nextB
locker
,
BOOL
isModalHook
,
HWND
prevFGWindow
,
BOOL
onTaskbar
);
public:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录