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
a07b8411
Commit
a07b8411
authored
May 11, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Export a couple of helper functions for window rectangles.
parent
a28722f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
22 deletions
+14
-22
window.c
dlls/winex11.drv/window.c
+2
-22
x11drv.h
dlls/winex11.drv/x11drv.h
+12
-0
No files found.
dlls/winex11.drv/window.c
View file @
a07b8411
...
...
@@ -225,24 +225,6 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rec
/***********************************************************************
* is_window_rect_mapped
*
* Check if the X whole window should be mapped based on its rectangle
*/
static
BOOL
is_window_rect_mapped
(
const
RECT
*
rect
)
{
/* don't map if rect is off-screen */
if
(
rect
->
left
>=
virtual_screen_rect
.
right
||
rect
->
top
>=
virtual_screen_rect
.
bottom
||
rect
->
right
<=
virtual_screen_rect
.
left
||
rect
->
bottom
<=
virtual_screen_rect
.
top
)
return
FALSE
;
return
TRUE
;
}
/***********************************************************************
* is_window_resizable
*
* Check if window should be made resizable by the window manager
...
...
@@ -251,8 +233,7 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl
{
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
);
return
is_window_rect_fullscreen
(
&
data
->
whole_rect
);
}
...
...
@@ -1271,8 +1252,7 @@ void update_net_wm_states( Display *display, struct x11drv_win_data *data )
if
(
data
->
whole_window
==
root_window
)
return
;
style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_STYLE
);
if
(
data
->
whole_rect
.
left
<=
0
&&
data
->
whole_rect
.
right
>=
screen_width
&&
data
->
whole_rect
.
top
<=
0
&&
data
->
whole_rect
.
bottom
>=
screen_height
)
if
(
is_window_rect_fullscreen
(
&
data
->
whole_rect
))
{
if
((
style
&
WS_MAXIMIZE
)
&&
(
style
&
WS_CAPTION
)
==
WS_CAPTION
)
new_state
|=
(
1
<<
NET_WM_STATE_MAXIMIZED
);
...
...
dlls/winex11.drv/x11drv.h
View file @
a07b8411
...
...
@@ -819,6 +819,18 @@ static inline void mirror_rect( const RECT *window_rect, RECT *rect )
rect
->
right
=
width
-
tmp
;
}
static
inline
BOOL
is_window_rect_mapped
(
const
RECT
*
rect
)
{
return
(
rect
->
left
<
virtual_screen_rect
.
right
&&
rect
->
top
<
virtual_screen_rect
.
bottom
&&
rect
->
right
>
virtual_screen_rect
.
left
&&
rect
->
bottom
>
virtual_screen_rect
.
top
);
}
static
inline
BOOL
is_window_rect_fullscreen
(
const
RECT
*
rect
)
{
return
(
rect
->
left
<=
0
&&
rect
->
right
>=
screen_width
&&
rect
->
top
<=
0
&&
rect
->
bottom
>=
screen_height
);
}
/* X context to associate a hwnd to an X window */
extern
XContext
winContext
;
...
...
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