Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
6c555dae
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看板
提交
6c555dae
编写于
3月 07, 2011
作者:
L
lana
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
6e622660
8757b534
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
102 addition
and
105 deletion
+102
-105
make/sun/xawt/mapfile-vers
make/sun/xawt/mapfile-vers
+1
-0
src/share/classes/sun/util/logging/PlatformLogger.java
src/share/classes/sun/util/logging/PlatformLogger.java
+8
-1
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
+5
-4
src/solaris/native/sun/awt/gtk2_interface.c
src/solaris/native/sun/awt/gtk2_interface.c
+4
-1
src/solaris/native/sun/awt/gtk2_interface.h
src/solaris/native/sun/awt/gtk2_interface.h
+2
-1
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c
+37
-2
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h
+10
-2
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_TrayIcon.cpp
src/windows/native/sun/windows/awt_TrayIcon.cpp
+3
-4
src/windows/native/sun/windows/awt_Window.cpp
src/windows/native/sun/windows/awt_Window.cpp
+2
-0
未找到文件。
make/sun/xawt/mapfile-vers
浏览文件 @
6c555dae
...
...
@@ -433,6 +433,7 @@ SUNWprivate_1.1 {
Java_sun_awt_X11_GtkFileDialogPeer_run;
Java_sun_awt_X11_GtkFileDialogPeer_quit;
Java_sun_awt_X11_GtkFileDialogPeer_toFront;
Java_sun_awt_X11_GtkFileDialogPeer_setBounds;
Java_sun_print_CUPSPrinter_initIDs;
Java_sun_print_CUPSPrinter_getCupsServer;
...
...
src/share/classes/sun/util/logging/PlatformLogger.java
浏览文件 @
6c555dae
...
...
@@ -535,7 +535,14 @@ public class PlatformLogger {
}
void
doLog
(
int
level
,
String
msg
,
Object
...
params
)
{
LoggingSupport
.
log
(
javaLogger
,
levelObjects
.
get
(
level
),
msg
,
params
);
// only pass String objects to the j.u.l.Logger which may
// be created by untrusted code
int
len
=
(
params
!=
null
)
?
params
.
length
:
0
;
Object
[]
sparams
=
new
String
[
len
];
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
sparams
[
i
]
=
String
.
valueOf
(
params
[
i
]);
}
LoggingSupport
.
log
(
javaLogger
,
levelObjects
.
get
(
level
),
msg
,
sparams
);
}
boolean
isEnabled
()
{
...
...
src/solaris/classes/sun/awt/X11/GtkFileDialogPeer.java
浏览文件 @
6c555dae
...
...
@@ -56,12 +56,14 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
}
private
native
void
run
(
String
title
,
int
mode
,
String
dir
,
String
file
,
FilenameFilter
filter
,
boolean
isMultipleMode
);
FilenameFilter
filter
,
boolean
isMultipleMode
,
int
x
,
int
y
);
private
native
void
quit
();
@Override
public
native
void
toFront
();
@Override
public
native
void
setBounds
(
int
x
,
int
y
,
int
width
,
int
height
,
int
op
);
/**
* Called exclusively by the native C code.
...
...
@@ -106,9 +108,8 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
Thread
t
=
new
Thread
()
{
public
void
run
()
{
GtkFileDialogPeer
.
this
.
run
(
fd
.
getTitle
(),
fd
.
getMode
(),
fd
.
getDirectory
(),
fd
.
getFile
(),
fd
.
getFilenameFilter
(),
fd
.
isMultipleMode
());
fd
.
getDirectory
(),
fd
.
getFile
(),
fd
.
getFilenameFilter
(),
fd
.
isMultipleMode
(),
fd
.
getX
(),
fd
.
getY
());
fd
.
setVisible
(
false
);
}
};
...
...
src/solaris/native/sun/awt/gtk2_interface.c
浏览文件 @
6c555dae
...
...
@@ -608,7 +608,10 @@ gboolean gtk2_load()
fp_gtk_viewport_new
=
dl_symbol
(
"gtk_viewport_new"
);
fp_gtk_window_new
=
dl_symbol
(
"gtk_window_new"
);
fp_gtk_window_present
=
dl_symbol
(
"gtk_window_present"
);
fp_gtk_dialog_new
=
dl_symbol
(
"gtk_dialog_new"
);
fp_gtk_window_move
=
dl_symbol
(
"gtk_window_move"
);
fp_gtk_window_resize
=
dl_symbol
(
"gtk_window_resize"
);
fp_gtk_dialog_new
=
dl_symbol
(
"gtk_dialog_new"
);
fp_gtk_frame_new
=
dl_symbol
(
"gtk_frame_new"
);
fp_gtk_adjustment_new
=
dl_symbol
(
"gtk_adjustment_new"
);
...
...
src/solaris/native/sun/awt/gtk2_interface.h
浏览文件 @
6c555dae
...
...
@@ -750,7 +750,8 @@ int (*fp_gdk_pixbuf_get_width)(const GdkPixbuf *pixbuf);
GdkPixbuf
*
(
*
fp_gdk_pixbuf_new_from_file
)(
const
char
*
filename
,
GError
**
error
);
void
(
*
fp_gtk_widget_destroy
)(
GtkWidget
*
widget
);
void
(
*
fp_gtk_window_present
)(
GtkWindow
*
window
);
void
(
*
fp_gtk_window_move
)(
GtkWindow
*
window
,
gint
x
,
gint
y
);
void
(
*
fp_gtk_window_resize
)(
GtkWindow
*
window
,
gint
width
,
gint
height
);
/**
* Function Pointers for GtkFileChooser
...
...
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c
浏览文件 @
6c555dae
...
...
@@ -102,6 +102,33 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_toFront
fp_gdk_threads_leave
();
}
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: setBounds
* Signature: (IIIII)V
*/
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_setBounds
(
JNIEnv
*
env
,
jobject
jpeer
,
jint
x
,
jint
y
,
jint
width
,
jint
height
,
jint
op
)
{
GtkWindow
*
dialog
;
fp_gdk_threads_enter
();
dialog
=
(
GtkWindow
*
)
jlong_to_ptr
(
(
*
env
)
->
GetLongField
(
env
,
jpeer
,
widgetFieldID
));
if
(
dialog
!=
NULL
)
{
if
(
x
>=
0
&&
y
>=
0
)
{
fp_gtk_window_move
(
dialog
,
(
gint
)
x
,
(
gint
)
y
);
}
if
(
width
>
0
&&
height
>
0
)
{
fp_gtk_window_resize
(
dialog
,
(
gint
)
width
,
(
gint
)
height
);
}
}
fp_gdk_threads_leave
();
}
/**
* Convert a GSList to an array of filenames (without the parent folder)
*/
...
...
@@ -175,12 +202,12 @@ static void handle_response(GtkWidget* aDialog, gint responseId, gpointer obj)
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: run
* Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z
;
)V
* Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z
II
)V
*/
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_run
(
JNIEnv
*
env
,
jobject
jpeer
,
jstring
jtitle
,
jint
mode
,
jstring
jdir
,
jstring
jfile
,
jobject
jfilter
,
jboolean
multiple
)
jobject
jfilter
,
jboolean
multiple
,
int
x
,
int
y
)
{
GtkWidget
*
dialog
=
NULL
;
GtkFileFilter
*
filter
;
...
...
@@ -244,6 +271,14 @@ Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer,
dialog
),
TRUE
);
}
/* Set the initial location */
if
(
x
>=
0
&&
y
>=
0
)
{
fp_gtk_window_move
((
GtkWindow
*
)
dialog
,
(
gint
)
x
,
(
gint
)
y
);
// NOTE: it doesn't set the initial size for the file chooser
// as it seems like the file chooser overrides the size internally
}
fp_g_signal_connect
(
G_OBJECT
(
dialog
),
"response"
,
G_CALLBACK
(
handle_response
),
jpeer
);
...
...
src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.h
浏览文件 @
6c555dae
...
...
@@ -20,10 +20,10 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_initIDs
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: run
* Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z
;
)V
* Signature: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/io/FilenameFilter;Z
II
)V
*/
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_run
(
JNIEnv
*
,
jobject
,
jstring
,
jint
,
jstring
,
jstring
,
jobject
,
jboolean
);
(
JNIEnv
*
,
jobject
,
jstring
,
jint
,
jstring
,
jstring
,
jobject
,
jboolean
,
jint
,
jint
);
/*
* Class: sun_awt_X11_GtkFileDialogPeer
...
...
@@ -41,6 +41,14 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_GtkFileDialogPeer_quit
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_toFront
(
JNIEnv
*
,
jobject
);
/*
* Class: sun_awt_X11_GtkFileDialogPeer
* Method: setBounds
* Signature: (IIIII)V
*/
JNIEXPORT
void
JNICALL
Java_sun_awt_X11_GtkFileDialogPeer_setBounds
(
JNIEnv
*
env
,
jobject
jpeer
,
jint
x
,
jint
y
,
jint
width
,
jint
height
,
jint
op
);
#ifdef __cplusplus
}
#endif
...
...
src/windows/native/sun/windows/awt_Frame.cpp
浏览文件 @
6c555dae
...
...
@@ -109,7 +109,6 @@ AwtFrame::AwtFrame() {
m_isMenuDropped
=
FALSE
;
m_isInputMethodWindow
=
FALSE
;
m_isUndecorated
=
FALSE
;
m_proxyFocusOwner
=
NULL
;
m_lastProxiedFocusOwner
=
NULL
;
m_actualFocusedWindow
=
NULL
;
m_iconic
=
FALSE
;
...
...
@@ -127,7 +126,6 @@ AwtFrame::~AwtFrame()
void
AwtFrame
::
Dispose
()
{
DestroyProxyFocusOwner
();
AwtWindow
::
Dispose
();
}
...
...
@@ -308,22 +306,9 @@ done:
return
frame
;
}
LRESULT
CALLBACK
AwtFrame
::
ProxyWindowProc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
LRESULT
AwtFrame
::
ProxyWindowProc
(
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
,
MsgRouting
&
mr
)
{
TRY
;
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
);
}
LRESULT
retValue
=
0L
;
AwtComponent
*
focusOwner
=
NULL
;
// 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,
// 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?
case
WM_MOUSEWHEEL
:
focusOwner
=
AwtComponent
::
GetComponent
(
parent
->
GetLastProxiedFocusOwner
());
if
(
focusOwner
!=
NULL
)
{
return
focusOwner
->
WindowProc
(
message
,
wParam
,
lParam
);
focusOwner
=
AwtComponent
::
GetComponent
(
GetLastProxiedFocusOwner
());
if
(
focusOwner
!=
NULL
&&
focusOwner
!=
this
)
// avoid recursive calls
{
retValue
=
focusOwner
->
WindowProc
(
message
,
wParam
,
lParam
);
mr
=
mrConsume
;
}
break
;
case
WM_SETFOCUS
:
if
(
!
sm_suppressFocusAndActivation
&&
parent
->
IsEmbeddedFrame
())
{
parent
->
AwtSetActiveWindow
();
if
(
!
sm_suppressFocusAndActivation
&&
IsEmbeddedFrame
())
{
AwtSetActiveWindow
();
}
return
0
;
mr
=
mrConsume
;
break
;
case
WM_KILLFOCUS
:
if
(
!
sm_suppressFocusAndActivation
&&
parent
->
IsEmbeddedFrame
())
{
AwtWindow
::
SynthesizeWmActivate
(
FALSE
,
parent
->
GetHWnd
(),
NULL
);
if
(
!
sm_suppressFocusAndActivation
&&
IsEmbeddedFrame
())
{
AwtWindow
::
SynthesizeWmActivate
(
FALSE
,
GetHWnd
(),
NULL
);
}
else
if
(
sm_restoreFocusAndActivation
)
{
if
(
AwtComponent
::
GetFocusedWindow
()
!=
NULL
)
{
...
...
@@ -369,64 +358,28 @@ LRESULT CALLBACK AwtFrame::ProxyWindowProc(HWND hwnd, UINT message,
}
}
}
return
0
;
mr
=
mrConsume
;
break
;
case
0x0127
:
// WM_CHANGEUISTATE
case
0x0128
:
// WM_UPDATEUISTATE
return
0
;
mr
=
mrConsume
;
break
;
}
return
parent
->
WindowProc
(
message
,
wParam
,
lParam
);
CATCH_BAD_ALLOC_RET
(
0
)
;
return
retValue
;
}
void
AwtFrame
::
CreateProxyFocusOwner
(
)
LRESULT
AwtFrame
::
WindowProc
(
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
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"
),
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
);
}
MsgRouting
mr
=
mrDoDefault
;
LRESULT
retValue
=
0L
;
void
AwtFrame
::
DestroyProxyFocusOwner
()
{
// proxy focus owner must be destroyed on toolkit thread only
if
(
AwtToolkit
::
IsMainThread
())
{
AwtFrame
::
_DestroyProxyFocusOwner
((
void
*
)
this
);
}
else
{
AwtToolkit
::
GetInstance
().
InvokeFunction
(
AwtFrame
::
_DestroyProxyFocusOwner
,
(
void
*
)
this
);
}
}
retValue
=
ProxyWindowProc
(
message
,
wParam
,
lParam
,
mr
);
void
AwtFrame
::
_DestroyProxyFocusOwner
(
void
*
param
)
{
DASSERT
(
AwtToolkit
::
IsMainThread
());
AwtFrame
*
f
=
(
AwtFrame
*
)
param
;
if
(
f
->
m_proxyFocusOwner
!=
NULL
)
{
HWND
toDestroy
=
f
->
m_proxyFocusOwner
;
f
->
m_proxyFocusOwner
=
NULL
;
ComCtl32Util
::
GetInstance
().
UnsubclassHWND
(
toDestroy
,
ProxyWindowProc
,
f
->
m_proxyDefWindowProc
);
::
DestroyWindow
(
toDestroy
);
if
(
mr
!=
mrConsume
)
{
retValue
=
AwtWindow
::
WindowProc
(
message
,
wParam
,
lParam
);
}
return
retValue
;
}
MsgRouting
AwtFrame
::
WmShowWindow
(
BOOL
show
,
UINT
status
)
...
...
src/windows/native/sun/windows/awt_Frame.h
浏览文件 @
6c555dae
...
...
@@ -96,6 +96,8 @@ public:
AwtMenuBar
*
GetMenuBar
();
void
SetMenuBar
(
AwtMenuBar
*
);
virtual
LRESULT
WindowProc
(
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
);
MsgRouting
WmGetMinMaxInfo
(
LPMINMAXINFO
lpmmi
);
MsgRouting
WmSize
(
UINT
type
,
int
w
,
int
h
);
MsgRouting
WmActivate
(
UINT
nState
,
BOOL
fMinimized
,
HWND
opposite
);
...
...
@@ -117,10 +119,7 @@ public:
INLINE
BOOL
IsUndecorated
()
{
return
m_isUndecorated
;
}
INLINE
HWND
GetProxyFocusOwner
()
{
if
(
m_proxyFocusOwner
==
NULL
)
{
CreateProxyFocusOwner
();
}
return
m_proxyFocusOwner
;
return
GetHWnd
();
}
void
SetMaximizedBounds
(
int
x
,
int
y
,
int
w
,
int
h
);
...
...
@@ -159,15 +158,7 @@ protected:
BOOL
m_isUndecorated
;
private:
static
LRESULT
CALLBACK
ProxyWindowProc
(
HWND
hwnd
,
UINT
message
,
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
);
LRESULT
ProxyWindowProc
(
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
,
MsgRouting
&
mr
);
/* The frame's embedding parent (if any) */
HWND
m_parentWnd
;
...
...
@@ -188,10 +179,6 @@ private:
/* The frame is an InputMethodWindow */
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
* a component of an owned window last/currently active. */
HWND
m_lastProxiedFocusOwner
;
...
...
src/windows/native/sun/windows/awt_TrayIcon.cpp
浏览文件 @
6c555dae
...
...
@@ -200,10 +200,9 @@ void AwtTrayIcon::InitNID(UINT uID)
m_nid
.
cbSize
=
(
BYTE
*
)(
&
m_nid
.
guidItem
)
-
(
BYTE
*
)(
&
m_nid
.
cbSize
);
break
;
case
6
:
// WIN_XP
// Uncomment these two lines when moving to VS2008
// m_nid.cbSize = (BYTE *)(&m_nid.hBalloonIcon) - (BYTE *)(&m_nid.cbSize);
// break;
default:
// WIN_VISTA?
m_nid
.
cbSize
=
(
BYTE
*
)(
&
m_nid
.
hBalloonIcon
)
-
(
BYTE
*
)(
&
m_nid
.
cbSize
);
break
;
default:
// WIN_VISTA
m_nid
.
cbSize
=
sizeof
(
m_nid
);
break
;
}
...
...
src/windows/native/sun/windows/awt_Window.cpp
浏览文件 @
6c555dae
...
...
@@ -221,6 +221,8 @@ AwtWindow::AwtWindow() {
m_windowType
=
NORMAL
;
m_alwaysOnTop
=
false
;
fullScreenExclusiveModeState
=
FALSE
;
}
AwtWindow
::~
AwtWindow
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录