Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ef72c1d1
Commit
ef72c1d1
authored
Jun 20, 2006
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Add support for full screen window state using the NETWM protocol.
parent
1a0208ef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
3 deletions
+56
-3
winpos.c
dlls/winex11.drv/winpos.c
+50
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+3
-1
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+3
-1
No files found.
dlls/winex11.drv/winpos.c
View file @
ef72c1d1
...
...
@@ -79,6 +79,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
#define _NET_WM_MOVERESIZE_SIZE_KEYBOARD 9
/* size via keyboard */
#define _NET_WM_MOVERESIZE_MOVE_KEYBOARD 10
/* move via keyboard */
#define _NET_WM_STATE_REMOVE 0
#define _NET_WM_STATE_ADD 1
#define _NET_WM_STATE_TOGGLE 2
/***********************************************************************
* X11DRV_Expose
...
...
@@ -521,6 +524,49 @@ void X11DRV_SetWindowStyle( HWND hwnd, DWORD old_style )
/***********************************************************************
* update_fullscreen_state
*
* Use the NETWM protocol to set the fullscreen state.
* This only works for mapped windows.
*/
static
void
update_fullscreen_state
(
Display
*
display
,
struct
x11drv_win_data
*
data
,
const
RECT
*
old_client_rect
)
{
XEvent
xev
;
BOOL
old_fs_state
=
FALSE
,
new_fs_state
=
FALSE
;
if
(
old_client_rect
->
left
<=
0
&&
old_client_rect
->
right
>=
screen_width
&&
old_client_rect
->
top
<=
0
&&
old_client_rect
->
bottom
>=
screen_height
)
old_fs_state
=
TRUE
;
if
(
data
->
client_rect
.
left
<=
0
&&
data
->
client_rect
.
right
>=
screen_width
&&
data
->
client_rect
.
top
<=
0
&&
data
->
client_rect
.
bottom
>=
screen_height
)
new_fs_state
=
TRUE
;
if
(
new_fs_state
==
old_fs_state
)
return
;
TRACE
(
"setting fullscreen state for hwnd %p to %s
\n
"
,
data
->
hwnd
,
new_fs_state
?
"true"
:
"false"
);
if
(
data
->
whole_window
)
{
xev
.
xclient
.
type
=
ClientMessage
;
xev
.
xclient
.
window
=
data
->
whole_window
;
xev
.
xclient
.
message_type
=
x11drv_atom
(
_NET_WM_STATE
);
xev
.
xclient
.
serial
=
0
;
xev
.
xclient
.
display
=
display
;
xev
.
xclient
.
send_event
=
True
;
xev
.
xclient
.
format
=
32
;
xev
.
xclient
.
data
.
l
[
0
]
=
new_fs_state
?
_NET_WM_STATE_ADD
:
_NET_WM_STATE_REMOVE
;
xev
.
xclient
.
data
.
l
[
1
]
=
x11drv_atom
(
_NET_WM_STATE_FULLSCREEN
);
xev
.
xclient
.
data
.
l
[
2
]
=
0
;
wine_tsx11_lock
();
XSendEvent
(
display
,
root_window
,
False
,
SubstructureRedirectMask
|
SubstructureNotifyMask
,
&
xev
);
wine_tsx11_unlock
();
}
}
/***********************************************************************
* X11DRV_set_window_pos
*
* Set a window position and Z order.
...
...
@@ -529,7 +575,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
const
RECT
*
rectClient
,
UINT
swp_flags
,
const
RECT
*
valid_rects
)
{
struct
x11drv_win_data
*
data
;
RECT
new_whole_rect
;
RECT
new_whole_rect
,
old_client_rect
;
WND
*
win
;
DWORD
old_style
,
new_style
;
BOOL
ret
;
...
...
@@ -539,6 +585,8 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
new_whole_rect
=
*
rectWindow
;
X11DRV_window_to_X_rect
(
data
,
&
new_whole_rect
);
old_client_rect
=
data
->
client_rect
;
if
(
!
IsRectEmpty
(
&
valid_rects
[
0
]
))
{
int
x_offset
=
0
,
y_offset
=
0
;
...
...
@@ -671,6 +719,7 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
XMapWindow
(
display
,
data
->
whole_window
);
wine_tsx11_unlock
();
}
update_fullscreen_state
(
display
,
data
,
&
old_client_rect
);
}
}
}
...
...
dlls/winex11.drv/x11drv.h
View file @
ef72c1d1
...
...
@@ -566,9 +566,11 @@ enum x11drv_atoms
XATOM__MOTIF_WM_HINTS
,
XATOM__KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR
,
XATOM__NET_WM_MOVERESIZE
,
XATOM__NET_WM_NAME
,
XATOM__NET_WM_PID
,
XATOM__NET_WM_PING
,
XATOM__NET_WM_NAME
,
XATOM__NET_WM_STATE
,
XATOM__NET_WM_STATE_FULLSCREEN
,
XATOM__NET_WM_WINDOW_TYPE
,
XATOM__NET_WM_WINDOW_TYPE_UTILITY
,
XATOM_XdndAware
,
...
...
dlls/winex11.drv/x11drv_main.c
View file @
ef72c1d1
...
...
@@ -128,9 +128,11 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"_MOTIF_WM_HINTS"
,
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR"
,
"_NET_WM_MOVERESIZE"
,
"_NET_WM_NAME"
,
"_NET_WM_PID"
,
"_NET_WM_PING"
,
"_NET_WM_NAME"
,
"_NET_WM_STATE"
,
"_NET_WM_STATE_FULLSCREEN"
,
"_NET_WM_WINDOW_TYPE"
,
"_NET_WM_WINDOW_TYPE_UTILITY"
,
"XdndAware"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment