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
61e50e15
Commit
61e50e15
authored
May 28, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Map zero-size windows and set an empty window region for them.
parent
81c4b412
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
window.c
dlls/winex11.drv/window.c
+15
-19
No files found.
dlls/winex11.drv/window.c
View file @
61e50e15
...
...
@@ -220,9 +220,6 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rec
*/
static
BOOL
is_window_rect_mapped
(
const
RECT
*
rect
)
{
/* don't map if rect is empty */
if
(
IsRectEmpty
(
rect
))
return
FALSE
;
/* don't map if rect is off-screen */
if
(
rect
->
left
>=
virtual_screen_rect
.
right
||
rect
->
top
>=
virtual_screen_rect
.
bottom
||
...
...
@@ -249,19 +246,6 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl
/***********************************************************************
* get_window_owner
*/
static
HWND
get_window_owner
(
HWND
hwnd
)
{
RECT
rect
;
HWND
owner
=
GetWindow
(
hwnd
,
GW_OWNER
);
/* ignore the zero-size owners used by Delphi apps */
if
(
owner
&&
GetWindowRect
(
owner
,
&
rect
)
&&
IsRectEmpty
(
&
rect
))
owner
=
0
;
return
owner
;
}
/***********************************************************************
* get_mwm_decorations
*/
static
unsigned
long
get_mwm_decorations
(
struct
x11drv_win_data
*
data
,
...
...
@@ -456,6 +440,16 @@ static void sync_window_region( Display *display, struct x11drv_win_data *data,
if
(
!
data
->
whole_window
)
return
;
data
->
shaped
=
FALSE
;
if
(
IsRectEmpty
(
&
data
->
window_rect
))
/* set an empty shape */
{
static
XRectangle
empty_rect
;
wine_tsx11_lock
();
XShapeCombineRectangles
(
display
,
data
->
whole_window
,
ShapeBounding
,
0
,
0
,
&
empty_rect
,
1
,
ShapeSet
,
YXBanded
);
wine_tsx11_unlock
();
return
;
}
if
(
hrgn
==
(
HRGN
)
1
)
/* hack: win_region == 1 means retrieve region from server */
{
if
(
!
(
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
)))
return
;
...
...
@@ -1169,7 +1163,7 @@ static void set_wm_hints( Display *display, struct x11drv_win_data *data )
{
style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_STYLE
);
ex_style
=
GetWindowLongW
(
data
->
hwnd
,
GWL_EXSTYLE
);
owner
=
get_window_owner
(
data
->
hwnd
);
owner
=
GetWindow
(
data
->
hwnd
,
GW_OWNER
);
if
((
owner_win
=
get_owner_whole_window
(
owner
,
data
->
managed
)))
group_leader
=
owner_win
;
}
...
...
@@ -1260,7 +1254,7 @@ void update_net_wm_states( Display *display, struct x11drv_win_data *data )
new_state
|=
(
1
<<
NET_WM_STATE_ABOVE
);
if
(
ex_style
&
WS_EX_TOOLWINDOW
)
new_state
|=
(
1
<<
NET_WM_STATE_SKIP_TASKBAR
)
|
(
1
<<
NET_WM_STATE_SKIP_PAGER
);
if
(
!
(
ex_style
&
WS_EX_APPWINDOW
)
&&
get_window_owner
(
data
->
hwnd
))
if
(
!
(
ex_style
&
WS_EX_APPWINDOW
)
&&
GetWindow
(
data
->
hwnd
,
GW_OWNER
))
new_state
|=
(
1
<<
NET_WM_STATE_SKIP_TASKBAR
);
if
(
!
data
->
mapped
)
/* set the _NET_WM_STATE atom directly */
...
...
@@ -1503,6 +1497,8 @@ static void sync_window_position( Display *display, struct x11drv_win_data *data
XReconfigureWMWindow
(
display
,
data
->
whole_window
,
DefaultScreen
(
display
),
mask
,
&
changes
);
#ifdef HAVE_LIBXSHAPE
if
(
IsRectEmpty
(
old_window_rect
)
!=
IsRectEmpty
(
&
data
->
window_rect
))
sync_window_region
(
display
,
data
,
(
HRGN
)
1
);
if
(
data
->
shaped
)
{
int
old_x_offset
=
old_window_rect
->
left
-
old_whole_rect
->
left
;
...
...
@@ -1690,7 +1686,7 @@ static Window create_whole_window( Display *display, struct x11drv_win_data *dat
sync_window_text
(
display
,
data
->
whole_window
,
text
);
/* set the window region */
if
(
win_rgn
)
sync_window_region
(
display
,
data
,
win_rgn
);
if
(
win_rgn
||
IsRectEmpty
(
&
data
->
window_rect
)
)
sync_window_region
(
display
,
data
,
win_rgn
);
/* set the window opacity */
if
(
!
GetLayeredWindowAttributes
(
data
->
hwnd
,
&
key
,
&
alpha
,
&
layered_flags
))
layered_flags
=
0
;
...
...
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