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
c567556d
Commit
c567556d
authored
Jan 23, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Move code around in X11DRV_SetWindowPos to reduce indentation levels.
parent
bbfbe246
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
40 deletions
+26
-40
window.c
dlls/winex11.drv/window.c
+1
-5
winpos.c
dlls/winex11.drv/winpos.c
+25
-35
No files found.
dlls/winex11.drv/window.c
View file @
c567556d
...
...
@@ -951,11 +951,7 @@ void X11DRV_sync_window_position( Display *display, struct x11drv_win_data *data
const
RECT
*
old_whole_rect
)
{
XWindowChanges
changes
;
int
mask
;
if
(
!
data
->
whole_window
||
data
->
lock_changes
)
return
;
mask
=
get_window_changes
(
&
changes
,
old_whole_rect
,
&
data
->
whole_rect
);
int
mask
=
get_window_changes
(
&
changes
,
old_whole_rect
,
&
data
->
whole_rect
);
if
(
!
(
swp_flags
&
SWP_NOZORDER
))
{
...
...
dlls/winex11.drv/winpos.c
View file @
c567556d
...
...
@@ -352,33 +352,36 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
struct
x11drv_win_data
*
data
;
RECT
old_window_rect
,
old_whole_rect
,
old_client_rect
,
visible_rect
;
DWORD
old_style
,
new_style
;
BOOL
ret
,
make_managed
=
FALSE
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
FALSE
;
old_style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
if
(
!
set_server_window_pos
(
hwnd
,
insert_after
,
rectWindow
,
rectClient
,
swp_flags
,
valid_rects
,
&
visible_rect
))
return
FALSE
;
if
(
data
->
whole_window
==
DefaultRootWindow
(
gdi_display
))
{
data
->
whole_rect
=
data
->
client_rect
=
data
->
window_rect
=
*
rectWindow
;
return
TRUE
;
}
/* check if we need to switch the window to managed */
if
(
!
data
->
managed
&&
data
->
whole_window
&&
managed_mode
&&
root_window
==
DefaultRootWindow
(
display
)
&&
data
->
whole_window
!=
root_window
)
{
if
(
is_window_managed
(
hwnd
,
swp_flags
,
rectWindow
))
is_window_managed
(
hwnd
,
swp_flags
,
rectWindow
))
{
TRACE
(
"making win %p/%lx managed
\n
"
,
hwnd
,
data
->
whole_window
);
make_managed
=
TRUE
;
data
->
managed
=
TRUE
;
SetPropA
(
hwnd
,
managed_prop
,
(
HANDLE
)
1
);
}
}
old_style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
if
((
ret
=
set_server_window_pos
(
hwnd
,
insert_after
,
rectWindow
,
rectClient
,
swp_flags
,
valid_rects
,
&
visible_rect
)))
{
if
(
data
->
whole_window
==
DefaultRootWindow
(
gdi_display
))
if
(
old_style
&
WS_VISIBLE
)
{
data
->
whole_rect
=
data
->
client_rect
=
data
->
window_rect
=
*
rectWindow
;
return
TRUE
;
wine_tsx11_lock
();
XUnmapWindow
(
display
,
data
->
whole_window
);
wine_tsx11_unlock
();
old_style
&=
~
WS_VISIBLE
;
/* force it to be mapped again below */
}
}
new_style
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
...
...
@@ -407,7 +410,6 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
}
/* invalidate DCEs */
if
((((
swp_flags
&
SWP_AGG_NOPOSCHANGE
)
!=
SWP_AGG_NOPOSCHANGE
)
&&
(
new_style
&
WS_VISIBLE
))
||
(
swp_flags
&
(
SWP_HIDEWINDOW
|
SWP_SHOWWINDOW
)))
{
...
...
@@ -419,14 +421,6 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
TRACE
(
"win %p window %s client %s style %08x
\n
"
,
hwnd
,
wine_dbgstr_rect
(
rectWindow
),
wine_dbgstr_rect
(
rectClient
),
new_style
);
if
(
make_managed
&&
(
old_style
&
WS_VISIBLE
))
{
wine_tsx11_lock
();
XUnmapWindow
(
display
,
data
->
whole_window
);
wine_tsx11_unlock
();
old_style
&=
~
WS_VISIBLE
;
/* force it to be mapped again below */
}
if
(
!
IsRectEmpty
(
&
valid_rects
[
0
]
))
{
int
x_offset
=
old_whole_rect
.
left
-
data
->
whole_rect
.
left
;
...
...
@@ -455,8 +449,8 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
data
->
client_rect
.
bottom
-
data
->
client_rect
.
top
==
old_client_rect
.
bottom
-
old_client_rect
.
top
)
X11DRV_sync_gl_drawable
(
display
,
data
);
if
(
data
->
whole_window
&&
!
data
->
lock_changes
)
{
if
(
!
data
->
whole_window
||
data
->
lock_changes
)
return
TRUE
;
/* nothing more to do */
if
((
old_style
&
WS_VISIBLE
)
&&
!
(
new_style
&
WS_VISIBLE
))
{
/* window got hidden, unmap it */
...
...
@@ -473,17 +467,14 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
XUnmapWindow
(
display
,
data
->
whole_window
);
wine_tsx11_unlock
();
}
}
X11DRV_sync_window_position
(
display
,
data
,
swp_flags
,
&
old_client_rect
,
&
old_whole_rect
);
if
(
data
->
whole_window
&&
!
data
->
lock_changes
)
{
BOOL
mapped
=
FALSE
;
if
((
new_style
&
WS_VISIBLE
)
&&
!
(
new_style
&
WS_MINIMIZE
)
&&
X11DRV_is_window_rect_mapped
(
rectWindow
))
{
BOOL
mapped
=
FALSE
;
if
(
!
(
old_style
&
WS_VISIBLE
))
{
/* window got shown, map it */
...
...
@@ -510,9 +501,8 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
}
update_wm_states
(
display
,
data
,
mapped
);
}
}
}
return
ret
;
return
TRUE
;
}
...
...
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