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
4d14adfe
Commit
4d14adfe
authored
Apr 04, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use the same test for resizable windows when setting size and mwm hints.
parent
3f6fec36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
window.c
dlls/winex11.drv/window.c
+21
-14
No files found.
dlls/winex11.drv/window.c
View file @
4d14adfe
...
...
@@ -131,6 +131,20 @@ BOOL X11DRV_is_window_rect_mapped( const RECT *rect )
/***********************************************************************
* is_window_resizable
*
* Check if window should be made resizable by the window manager
*/
static
inline
BOOL
is_window_resizable
(
struct
x11drv_win_data
*
data
,
DWORD
style
)
{
if
(
style
&
WS_THICKFRAME
)
return
TRUE
;
/* Metacity needs the window to be resizable to make it fullscreen */
return
(
data
->
whole_rect
.
left
<=
0
&&
data
->
whole_rect
.
right
>=
screen_width
&&
data
->
whole_rect
.
top
<=
0
&&
data
->
whole_rect
.
bottom
>=
screen_height
);
}
/***********************************************************************
* get_mwm_decorations
*/
static
unsigned
long
get_mwm_decorations
(
DWORD
style
,
DWORD
ex_style
)
...
...
@@ -798,20 +812,13 @@ static void set_size_hints( Display *display, struct x11drv_win_data *data, DWOR
size_hints
->
flags
|=
PWinGravity
|
PPosition
;
}
if
(
!
(
style
&
WS_THICKFRAME
)
)
if
(
!
is_window_resizable
(
data
,
style
)
)
{
/* If we restrict window resizing Metacity decides that it should
* disable fullscreen support for this window as well.
*/
if
(
!
(
data
->
whole_rect
.
left
<=
0
&&
data
->
whole_rect
.
right
>=
screen_width
&&
data
->
whole_rect
.
top
<=
0
&&
data
->
whole_rect
.
bottom
>=
screen_height
))
{
size_hints
->
max_width
=
data
->
whole_rect
.
right
-
data
->
whole_rect
.
left
;
size_hints
->
max_height
=
data
->
whole_rect
.
bottom
-
data
->
whole_rect
.
top
;
size_hints
->
min_width
=
size_hints
->
max_width
;
size_hints
->
min_height
=
size_hints
->
max_height
;
size_hints
->
flags
|=
PMinSize
|
PMaxSize
;
}
size_hints
->
max_width
=
data
->
whole_rect
.
right
-
data
->
whole_rect
.
left
;
size_hints
->
max_height
=
data
->
whole_rect
.
bottom
-
data
->
whole_rect
.
top
;
size_hints
->
min_width
=
size_hints
->
max_width
;
size_hints
->
min_height
=
size_hints
->
max_height
;
size_hints
->
flags
|=
PMinSize
|
PMaxSize
;
}
XSetWMNormalHints
(
display
,
data
->
whole_window
,
size_hints
);
XFree
(
size_hints
);
...
...
@@ -958,7 +965,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
mwm_hints
.
flags
=
MWM_HINTS_FUNCTIONS
|
MWM_HINTS_DECORATIONS
;
mwm_hints
.
decorations
=
get_mwm_decorations
(
style
,
ex_style
);
mwm_hints
.
functions
=
MWM_FUNC_MOVE
;
if
(
style
&
WS_THICKFRAME
)
mwm_hints
.
functions
|=
MWM_FUNC_RESIZE
;
if
(
is_window_resizable
(
data
,
style
))
mwm_hints
.
functions
|=
MWM_FUNC_RESIZE
;
if
(
style
&
WS_MINIMIZEBOX
)
mwm_hints
.
functions
|=
MWM_FUNC_MINIMIZE
;
if
(
style
&
WS_MAXIMIZEBOX
)
mwm_hints
.
functions
|=
MWM_FUNC_MAXIMIZE
;
if
(
style
&
WS_SYSMENU
)
mwm_hints
.
functions
|=
MWM_FUNC_CLOSE
;
...
...
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