Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
8485cb77
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看板
提交
8485cb77
编写于
4月 29, 2015
作者:
A
azvegint
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8051617: Fullscreen mode is not working properly on Xorg
Reviewed-by: alexsch, serb
上级
09c10858
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
39 deletion
+10
-39
src/solaris/classes/sun/awt/X11ComponentPeer.java
src/solaris/classes/sun/awt/X11ComponentPeer.java
+1
-0
src/solaris/classes/sun/awt/X11GraphicsDevice.java
src/solaris/classes/sun/awt/X11GraphicsDevice.java
+3
-7
src/solaris/native/sun/awt/awt_GraphicsEnv.c
src/solaris/native/sun/awt/awt_GraphicsEnv.c
+6
-32
未找到文件。
src/solaris/classes/sun/awt/X11ComponentPeer.java
浏览文件 @
8485cb77
...
...
@@ -32,6 +32,7 @@ import sun.java2d.SurfaceData;
import
java.awt.Graphics
;
public
interface
X11ComponentPeer
{
long
getWindow
();
long
getContentWindow
();
SurfaceData
getSurfaceData
();
GraphicsConfiguration
getGraphicsConfiguration
();
...
...
src/solaris/classes/sun/awt/X11GraphicsDevice.java
浏览文件 @
8485cb77
...
...
@@ -298,11 +298,7 @@ public class X11GraphicsDevice
@Override
public
boolean
isFullScreenSupported
()
{
// REMIND: for now we will only allow fullscreen exclusive mode
// on the primary screen; we could change this behavior slightly
// in the future by allowing only one screen to be in fullscreen
// exclusive mode at any given time...
boolean
fsAvailable
=
(
screen
==
0
)
&&
isXrandrExtensionSupported
();
boolean
fsAvailable
=
isXrandrExtensionSupported
();
if
(
fsAvailable
)
{
SecurityManager
security
=
System
.
getSecurityManager
();
if
(
security
!=
null
)
{
...
...
@@ -328,7 +324,7 @@ public class X11GraphicsDevice
private
static
void
enterFullScreenExclusive
(
Window
w
)
{
X11ComponentPeer
peer
=
(
X11ComponentPeer
)
w
.
getPeer
();
if
(
peer
!=
null
)
{
enterFullScreenExclusive
(
peer
.
get
Content
Window
());
enterFullScreenExclusive
(
peer
.
getWindow
());
peer
.
setFullScreenExclusiveModeState
(
true
);
}
}
...
...
@@ -337,7 +333,7 @@ public class X11GraphicsDevice
X11ComponentPeer
peer
=
(
X11ComponentPeer
)
w
.
getPeer
();
if
(
peer
!=
null
)
{
peer
.
setFullScreenExclusiveModeState
(
false
);
exitFullScreenExclusive
(
peer
.
get
Content
Window
());
exitFullScreenExclusive
(
peer
.
getWindow
());
}
}
...
...
src/solaris/native/sun/awt/awt_GraphicsEnv.c
浏览文件 @
8485cb77
...
...
@@ -1716,9 +1716,9 @@ X11GD_InitXrandrFuncs(JNIEnv *env)
/*
* REMIND: Fullscreen mode doesn't work quite right with multi-monitor
* setups and RANDR 1.2.
So for now we also require a single screen.
* setups and RANDR 1.2.
*/
if
(
awt_numScreens
>
1
)
{
if
(
(
rr_maj_ver
==
1
&&
rr_min_ver
<=
2
)
&&
awt_numScreens
>
1
)
{
J2dRlsTraceLn
(
J2D_TRACE_INFO
,
"X11GD_InitXrandrFuncs: Can't use Xrandr. "
"Multiple screens in use"
);
dlclose
(
pLibRandR
);
...
...
@@ -1806,40 +1806,14 @@ X11GD_SetFullscreenMode(Window win, jboolean enabled)
Atom
wmState
=
XInternAtom
(
awt_display
,
"_NET_WM_STATE"
,
False
);
Atom
wmStateFs
=
XInternAtom
(
awt_display
,
"_NET_WM_STATE_FULLSCREEN"
,
False
);
Window
root
,
parent
,
*
children
=
NULL
;
unsigned
int
numchildren
;
XWindowAttributes
attr
;
XEvent
event
;
Status
status
;
if
(
wmState
==
None
||
wmStateFs
==
None
)
{
if
(
wmState
==
None
||
wmStateFs
==
None
||
!
XGetWindowAttributes
(
awt_display
,
win
,
&
attr
))
{
return
;
}
/*
* Note: the Window passed to this method is typically the "content
* window" of the top-level, but we need the actual shell window for
* the purposes of constructing the XEvent. Therefore, we walk up the
* window hierarchy here to find the true top-level.
*/
do
{
if
(
!
XQueryTree
(
awt_display
,
win
,
&
root
,
&
parent
,
&
children
,
&
numchildren
))
{
return
;
}
if
(
children
!=
NULL
)
{
XFree
(
children
);
}
if
(
parent
==
root
)
{
break
;
}
win
=
parent
;
}
while
(
root
!=
parent
);
memset
(
&
event
,
0
,
sizeof
(
event
));
event
.
xclient
.
type
=
ClientMessage
;
event
.
xclient
.
message_type
=
wmState
;
...
...
@@ -1849,7 +1823,7 @@ X11GD_SetFullscreenMode(Window win, jboolean enabled)
event
.
xclient
.
data
.
l
[
0
]
=
enabled
?
1
:
0
;
// 1==add, 0==remove
event
.
xclient
.
data
.
l
[
1
]
=
wmStateFs
;
XSendEvent
(
awt_display
,
root
,
False
,
XSendEvent
(
awt_display
,
attr
.
root
,
False
,
SubstructureRedirectMask
|
SubstructureNotifyMask
,
&
event
);
XSync
(
awt_display
,
False
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录