Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
feb1bd83
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看板
提交
feb1bd83
编写于
9月 09, 2009
作者:
Y
yan
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
042286fc
5f83e525
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
91 addition
and
30 deletion
+91
-30
src/share/classes/java/awt/Component.java
src/share/classes/java/awt/Component.java
+10
-0
src/solaris/classes/sun/awt/X11/XErrorHandler.java
src/solaris/classes/sun/awt/X11/XErrorHandler.java
+2
-2
src/solaris/classes/sun/awt/X11/XKeysym.java
src/solaris/classes/sun/awt/X11/XKeysym.java
+1
-0
src/solaris/classes/sun/awt/X11/XToolkit.java
src/solaris/classes/sun/awt/X11/XToolkit.java
+3
-0
src/solaris/classes/sun/awt/X11/keysym2ucs.h
src/solaris/classes/sun/awt/X11/keysym2ucs.h
+1
-1
src/windows/native/sun/windows/awt_Dialog.cpp
src/windows/native/sun/windows/awt_Dialog.cpp
+1
-0
src/windows/native/sun/windows/awt_Frame.cpp
src/windows/native/sun/windows/awt_Frame.cpp
+2
-0
src/windows/native/sun/windows/awt_Window.cpp
src/windows/native/sun/windows/awt_Window.cpp
+65
-20
src/windows/native/sun/windows/awt_Window.h
src/windows/native/sun/windows/awt_Window.h
+6
-7
未找到文件。
src/share/classes/java/awt/Component.java
浏览文件 @
feb1bd83
...
...
@@ -6665,6 +6665,9 @@ public abstract class Component implements ImageObserver, MenuContainer,
Container
parent
=
this
.
parent
;
if
(
parent
!=
null
&&
parent
.
peer
instanceof
LightweightPeer
)
{
relocateComponent
();
if
(!
isRecursivelyVisible
())
{
peer
.
setVisible
(
false
);
}
}
}
invalidate
();
...
...
@@ -9572,6 +9575,13 @@ public abstract class Component implements ImageObserver, MenuContainer,
return
comp
.
getPeer
();
}
}
// traversing the hierarchy up to the closest HW container;
// further traversing may return a component that is not actually
// a native sibling of this component and this kind of z-order
// request may not be allowed by the underlying system (6852051).
if
(!
cont
.
isLightweight
())
{
break
;
}
indexAbove
=
cont
.
getSiblingIndexAbove
();
cont
=
cont
.
getContainer
();
...
...
src/solaris/classes/sun/awt/X11/XErrorHandler.java
浏览文件 @
feb1bd83
...
...
@@ -71,8 +71,8 @@ public abstract class XErrorHandler {
return
super
.
handleError
(
display
,
err
);
}
// Shared instance
private
static
IgnoreBadWindowHandler
theInstance
=
new
IgnoreBadWindow
Handler
();
public
static
IgnoreBadWindow
Handler
getInstance
()
{
private
static
VerifyChangePropertyHandler
theInstance
=
new
VerifyChangeProperty
Handler
();
public
static
VerifyChangeProperty
Handler
getInstance
()
{
return
theInstance
;
}
}
...
...
src/solaris/classes/sun/awt/X11/XKeysym.java
浏览文件 @
feb1bd83
...
...
@@ -354,6 +354,7 @@ public class XKeysym {
keysym2UCSHash
.
put
(
(
long
)
0xFFB7
,
(
char
)
0x0037
);
// XK_KP_7 --> DIGIT SEVEN
keysym2UCSHash
.
put
(
(
long
)
0xFFB8
,
(
char
)
0x0038
);
// XK_KP_8 --> DIGIT EIGHT
keysym2UCSHash
.
put
(
(
long
)
0xFFB9
,
(
char
)
0x0039
);
// XK_KP_9 --> DIGIT NINE
keysym2UCSHash
.
put
(
(
long
)
0xFE20
,
(
char
)
0x0009
);
// XK_ISO_Left_Tab --> <control>
keysym2UCSHash
.
put
(
(
long
)
0x1a1
,
(
char
)
0x0104
);
// XK_Aogonek --> LATIN CAPITAL LETTER A WITH OGONEK
keysym2UCSHash
.
put
(
(
long
)
0x1a2
,
(
char
)
0x02d8
);
// XK_breve --> BREVE
keysym2UCSHash
.
put
(
(
long
)
0x1a3
,
(
char
)
0x0141
);
// XK_Lstroke --> LATIN CAPITAL LETTER L WITH STROKE
...
...
src/solaris/classes/sun/awt/X11/XToolkit.java
浏览文件 @
feb1bd83
...
...
@@ -166,6 +166,9 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
}
public
static
void
RESTORE_XERROR_HANDLER
()
{
// wait until all requests are processed by the X server
// and only then uninstall the error handler
XSync
();
current_error_handler
=
null
;
}
...
...
src/solaris/classes/sun/awt/X11/keysym2ucs.h
浏览文件 @
feb1bd83
...
...
@@ -649,7 +649,7 @@ SOFTWARE.
0x0000
#
define
XK_ISO_Last_Group
0xFE0E
0x0000
#
define
XK_ISO_Last_Group_Lock
0xFE0F
0x000
0
#
define
XK_ISO_Left_Tab
0xFE20
0x000
9
#
define
XK_ISO_Left_Tab
0xFE20
0x0000
#
define
XK_ISO_Move_Line_Up
0xFE21
0x0000
#
define
XK_ISO_Move_Line_Down
0xFE22
0x0000
#
define
XK_ISO_Partial_Line_Up
0xFE23
...
...
src/windows/native/sun/windows/awt_Dialog.cpp
浏览文件 @
feb1bd83
...
...
@@ -364,6 +364,7 @@ void AwtDialog::Show()
if
(
locationByPlatform
)
{
moveToDefaultLocation
();
}
EnableTranslucency
(
TRUE
);
if
(
IsFocusableWindow
()
&&
(
IsAutoRequestFocus
()
||
IsFocusedWindowModalBlocker
()))
{
::
ShowWindow
(
GetHWnd
(),
SW_SHOW
);
}
else
{
...
...
src/windows/native/sun/windows/awt_Frame.cpp
浏览文件 @
feb1bd83
...
...
@@ -690,6 +690,8 @@ AwtFrame::Show()
if
(
locationByPlatform
)
{
moveToDefaultLocation
();
}
EnableTranslucency
(
TRUE
);
BOOL
autoRequestFocus
=
IsAutoRequestFocus
();
if
(
m_iconic
)
{
...
...
src/windows/native/sun/windows/awt_Window.cpp
浏览文件 @
feb1bd83
...
...
@@ -218,12 +218,7 @@ AwtWindow::~AwtWindow()
if
(
warningString
!=
NULL
)
{
delete
[]
warningString
;
}
::
EnterCriticalSection
(
&
contentBitmapCS
);
if
(
hContentBitmap
!=
NULL
)
{
::
DeleteObject
(
hContentBitmap
);
hContentBitmap
=
NULL
;
}
::
LeaveCriticalSection
(
&
contentBitmapCS
);
DeleteContentBitmap
();
::
DeleteCriticalSection
(
&
contentBitmapCS
);
}
...
...
@@ -372,6 +367,10 @@ MsgRouting AwtWindow::WmWindowPosChanged(LPARAM windowPos) {
}
}
if
(
wp
->
flags
&
SWP_HIDEWINDOW
)
{
EnableTranslucency
(
FALSE
);
}
return
mrDoDefault
;
}
...
...
@@ -1130,6 +1129,8 @@ void AwtWindow::Show()
moveToDefaultLocation
();
}
EnableTranslucency
(
TRUE
);
// The following block exists to support Menu/Tooltip animation for
// Swing programs in a way which avoids introducing any new public api into
// AWT or Swing.
...
...
@@ -2494,27 +2495,73 @@ void AwtWindow::RedrawWindow()
}
}
void
AwtWindow
::
SetTranslucency
(
BYTE
opacity
,
BOOL
opaque
)
// Deletes the hContentBitmap if it is non-null
void
AwtWindow
::
DeleteContentBitmap
()
{
::
EnterCriticalSection
(
&
contentBitmapCS
);
if
(
hContentBitmap
!=
NULL
)
{
::
DeleteObject
(
hContentBitmap
);
hContentBitmap
=
NULL
;
}
::
LeaveCriticalSection
(
&
contentBitmapCS
);
}
// The effects are enabled only upon showing the window.
// See 6780496 for details.
void
AwtWindow
::
EnableTranslucency
(
BOOL
enable
)
{
BYTE
old_opacity
=
getOpacity
();
BOOL
old_opaque
=
isOpaque
();
if
(
enable
)
{
SetTranslucency
(
getOpacity
(),
isOpaque
(),
FALSE
,
TRUE
);
}
else
{
SetTranslucency
(
0xFF
,
TRUE
,
FALSE
);
}
}
/**
* Sets the translucency effects.
*
* This method is used to:
*
* 1. Apply the translucency effects upon showing the window
* (setValues == FALSE, useDefaultForOldValues == TRUE);
* 2. Turn off the effects upon hiding the window
* (setValues == FALSE, useDefaultForOldValues == FALSE);
* 3. Set the effects per user's request
* (setValues == TRUE, useDefaultForOldValues == FALSE);
*
* In case #3 the effects may or may not be applied immediately depending on
* the current visibility status of the window.
*
* The setValues argument indicates if we need to preserve the passed values
* in local fields for further use.
* The useDefaultForOldValues argument indicates whether we should consider
* the window as if it has not any effects applied at the moment.
*/
void
AwtWindow
::
SetTranslucency
(
BYTE
opacity
,
BOOL
opaque
,
BOOL
setValues
,
BOOL
useDefaultForOldValues
)
{
BYTE
old_opacity
=
useDefaultForOldValues
?
0xFF
:
getOpacity
();
BOOL
old_opaque
=
useDefaultForOldValues
?
TRUE
:
isOpaque
();
if
(
opacity
==
old_opacity
&&
opaque
==
old_opaque
)
{
return
;
}
setOpacity
(
opacity
);
setOpaque
(
opaque
);
if
(
setValues
)
{
m_opacity
=
opacity
;
m_opaque
=
opaque
;
}
// If we're invisible and are storing the values, return
// Otherwise, apply the effects immediately
if
(
!
IsVisible
()
&&
setValues
)
{
return
;
}
HWND
hwnd
=
GetHWnd
();
if
(
opaque
!=
old_opaque
)
{
::
EnterCriticalSection
(
&
contentBitmapCS
);
if
(
hContentBitmap
!=
NULL
)
{
::
DeleteObject
(
hContentBitmap
);
hContentBitmap
=
NULL
;
}
::
LeaveCriticalSection
(
&
contentBitmapCS
);
DeleteContentBitmap
();
}
if
(
opaque
&&
opacity
==
0xff
)
{
...
...
@@ -2634,9 +2681,7 @@ void AwtWindow::UpdateWindow(JNIEnv* env, jintArray data, int width, int height,
}
::
EnterCriticalSection
(
&
contentBitmapCS
);
if
(
hContentBitmap
!=
NULL
)
{
::
DeleteObject
(
hContentBitmap
);
}
DeleteContentBitmap
();
hContentBitmap
=
hBitmap
;
contentWidth
=
width
;
contentHeight
=
height
;
...
...
src/windows/native/sun/windows/awt_Window.h
浏览文件 @
feb1bd83
...
...
@@ -262,32 +262,29 @@ private:
// from its hierarchy when shown. Currently applied to instances of
// javax/swing/Popup$HeavyWeightWindow class.
// SetTranslucency() is the setter for the following two fields
BYTE
m_opacity
;
// The opacity level. == 0xff by default (when opacity mode is disabled)
BOOL
m_opaque
;
// Whether the window uses the perpixel translucency (false), or not (true).
inline
BYTE
getOpacity
()
{
return
m_opacity
;
}
inline
void
setOpacity
(
BYTE
opacity
)
{
m_opacity
=
opacity
;
}
inline
BOOL
isOpaque
()
{
return
m_opaque
;
}
inline
void
setOpaque
(
BOOL
opaque
)
{
m_opaque
=
opaque
;
}
CRITICAL_SECTION
contentBitmapCS
;
HBITMAP
hContentBitmap
;
UINT
contentWidth
;
UINT
contentHeight
;
void
SetTranslucency
(
BYTE
opacity
,
BOOL
opaque
);
void
SetTranslucency
(
BYTE
opacity
,
BOOL
opaque
,
BOOL
setValues
=
TRUE
,
BOOL
useDefaultForOldValues
=
FALSE
);
void
UpdateWindow
(
int
width
,
int
height
,
HBITMAP
hBitmap
);
void
UpdateWindowImpl
(
int
width
,
int
height
,
HBITMAP
hBitmap
);
void
RedrawWindow
();
void
DeleteContentBitmap
();
static
UINT
untrustedWindowsCounter
;
...
...
@@ -352,6 +349,8 @@ protected:
UINT
currentWmSizeState
;
void
EnableTranslucency
(
BOOL
enable
);
private:
int
m_screenNum
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录