Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9238ccca
Commit
9238ccca
authored
Mar 01, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Set the appropriate _NET_WM_STATE properties for maximized windows.
parent
254c17f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
winpos.c
dlls/winex11.drv/winpos.c
+9
-4
x11drv.h
dlls/winex11.drv/x11drv.h
+3
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+2
-0
No files found.
dlls/winex11.drv/winpos.c
View file @
9238ccca
...
@@ -186,11 +186,12 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
...
@@ -186,11 +186,12 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
{
{
XATOM__NET_WM_STATE_FULLSCREEN
,
XATOM__NET_WM_STATE_FULLSCREEN
,
XATOM__NET_WM_STATE_ABOVE
,
XATOM__NET_WM_STATE_ABOVE
,
XATOM__NET_WM_STATE_MAXIMIZED_VERT
,
XATOM__NET_WM_STATE_SKIP_PAGER
,
XATOM__NET_WM_STATE_SKIP_PAGER
,
XATOM__NET_WM_STATE_SKIP_TASKBAR
XATOM__NET_WM_STATE_SKIP_TASKBAR
};
};
DWORD
i
,
ex_style
,
new_state
=
0
;
DWORD
i
,
style
,
ex_style
,
new_state
=
0
;
XEvent
xev
;
XEvent
xev
;
if
(
!
data
->
managed
)
return
;
if
(
!
data
->
managed
)
return
;
...
@@ -200,6 +201,9 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
...
@@ -200,6 +201,9 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
data
->
whole_rect
.
top
<=
0
&&
data
->
whole_rect
.
bottom
>=
screen_height
)
data
->
whole_rect
.
top
<=
0
&&
data
->
whole_rect
.
bottom
>=
screen_height
)
new_state
|=
(
1
<<
NET_WM_STATE_FULLSCREEN
);
new_state
|=
(
1
<<
NET_WM_STATE_FULLSCREEN
);
style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_STYLE
);
if
(
style
&
WS_MAXIMIZE
)
new_state
|=
(
1
<<
NET_WM_STATE_MAXIMIZED
);
ex_style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_EXSTYLE
);
ex_style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_EXSTYLE
);
if
(
ex_style
&
WS_EX_TOPMOST
)
if
(
ex_style
&
WS_EX_TOPMOST
)
new_state
|=
(
1
<<
NET_WM_STATE_ABOVE
);
new_state
|=
(
1
<<
NET_WM_STATE_ABOVE
);
...
@@ -213,7 +217,6 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
...
@@ -213,7 +217,6 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
xev
.
xclient
.
display
=
display
;
xev
.
xclient
.
display
=
display
;
xev
.
xclient
.
send_event
=
True
;
xev
.
xclient
.
send_event
=
True
;
xev
.
xclient
.
format
=
32
;
xev
.
xclient
.
format
=
32
;
xev
.
xclient
.
data
.
l
[
2
]
=
0
;
xev
.
xclient
.
data
.
l
[
3
]
=
1
;
xev
.
xclient
.
data
.
l
[
3
]
=
1
;
for
(
i
=
0
;
i
<
NB_NET_WM_STATES
;
i
++
)
for
(
i
=
0
;
i
<
NB_NET_WM_STATES
;
i
++
)
...
@@ -226,6 +229,8 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
...
@@ -226,6 +229,8 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data
xev
.
xclient
.
data
.
l
[
0
]
=
(
new_state
&
(
1
<<
i
))
?
_NET_WM_STATE_ADD
:
_NET_WM_STATE_REMOVE
;
xev
.
xclient
.
data
.
l
[
0
]
=
(
new_state
&
(
1
<<
i
))
?
_NET_WM_STATE_ADD
:
_NET_WM_STATE_REMOVE
;
xev
.
xclient
.
data
.
l
[
1
]
=
X11DRV_Atoms
[
state_atoms
[
i
]
-
FIRST_XATOM
];
xev
.
xclient
.
data
.
l
[
1
]
=
X11DRV_Atoms
[
state_atoms
[
i
]
-
FIRST_XATOM
];
xev
.
xclient
.
data
.
l
[
2
]
=
((
state_atoms
[
i
]
==
XATOM__NET_WM_STATE_MAXIMIZED_VERT
)
?
x11drv_atom
(
_NET_WM_STATE_MAXIMIZED_HORZ
)
:
0
);
wine_tsx11_lock
();
wine_tsx11_lock
();
XSendEvent
(
display
,
root_window
,
False
,
SubstructureRedirectMask
|
SubstructureNotifyMask
,
&
xev
);
XSendEvent
(
display
,
root_window
,
False
,
SubstructureRedirectMask
|
SubstructureNotifyMask
,
&
xev
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
...
@@ -395,8 +400,8 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags,
...
@@ -395,8 +400,8 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags,
data
->
net_wm_state
=
0
;
data
->
net_wm_state
=
0
;
}
}
/* don't change position if we are about to minimize a managed window */
/* don't change position if we are about to minimize
or maximize
a managed window */
if
(
!
(
data
->
managed
&&
(
swp_flags
&
SWP_STATECHANGED
)
&&
(
new_style
&
WS_MINIMIZE
)))
if
(
!
(
data
->
managed
&&
(
swp_flags
&
SWP_STATECHANGED
)
&&
(
new_style
&
(
WS_MINIMIZE
|
WS_MAXIMIZE
)
)))
X11DRV_sync_window_position
(
display
,
data
,
swp_flags
,
&
old_client_rect
,
&
old_whole_rect
);
X11DRV_sync_window_position
(
display
,
data
,
swp_flags
,
&
old_client_rect
,
&
old_whole_rect
);
if
((
new_style
&
WS_VISIBLE
)
&&
if
((
new_style
&
WS_VISIBLE
)
&&
...
...
dlls/winex11.drv/x11drv.h
View file @
9238ccca
...
@@ -575,6 +575,8 @@ enum x11drv_atoms
...
@@ -575,6 +575,8 @@ enum x11drv_atoms
XATOM__NET_WM_STATE
,
XATOM__NET_WM_STATE
,
XATOM__NET_WM_STATE_ABOVE
,
XATOM__NET_WM_STATE_ABOVE
,
XATOM__NET_WM_STATE_FULLSCREEN
,
XATOM__NET_WM_STATE_FULLSCREEN
,
XATOM__NET_WM_STATE_MAXIMIZED_HORZ
,
XATOM__NET_WM_STATE_MAXIMIZED_VERT
,
XATOM__NET_WM_STATE_SKIP_PAGER
,
XATOM__NET_WM_STATE_SKIP_PAGER
,
XATOM__NET_WM_STATE_SKIP_TASKBAR
,
XATOM__NET_WM_STATE_SKIP_TASKBAR
,
XATOM__NET_WM_WINDOW_TYPE
,
XATOM__NET_WM_WINDOW_TYPE
,
...
@@ -647,6 +649,7 @@ enum x11drv_net_wm_state
...
@@ -647,6 +649,7 @@ enum x11drv_net_wm_state
{
{
NET_WM_STATE_FULLSCREEN
,
NET_WM_STATE_FULLSCREEN
,
NET_WM_STATE_ABOVE
,
NET_WM_STATE_ABOVE
,
NET_WM_STATE_MAXIMIZED
,
NET_WM_STATE_SKIP_PAGER
,
NET_WM_STATE_SKIP_PAGER
,
NET_WM_STATE_SKIP_TASKBAR
,
NET_WM_STATE_SKIP_TASKBAR
,
NB_NET_WM_STATES
NB_NET_WM_STATES
...
...
dlls/winex11.drv/x11drv_main.c
View file @
9238ccca
...
@@ -139,6 +139,8 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
...
@@ -139,6 +139,8 @@ static const char * const atom_names[NB_XATOMS - FIRST_XATOM] =
"_NET_WM_STATE"
,
"_NET_WM_STATE"
,
"_NET_WM_STATE_ABOVE"
,
"_NET_WM_STATE_ABOVE"
,
"_NET_WM_STATE_FULLSCREEN"
,
"_NET_WM_STATE_FULLSCREEN"
,
"_NET_WM_STATE_MAXIMIZED_HORZ"
,
"_NET_WM_STATE_MAXIMIZED_VERT"
,
"_NET_WM_STATE_SKIP_PAGER"
,
"_NET_WM_STATE_SKIP_PAGER"
,
"_NET_WM_STATE_SKIP_TASKBAR"
,
"_NET_WM_STATE_SKIP_TASKBAR"
,
"_NET_WM_WINDOW_TYPE"
,
"_NET_WM_WINDOW_TYPE"
,
...
...
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