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
85fed5b1
Commit
85fed5b1
authored
Aug 29, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Invalidate the DCEs while still holding the window lock in SetWindowPos.
parent
d35fc436
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
21 deletions
+17
-21
painting.c
dlls/user32/painting.c
+8
-11
user_private.h
dlls/user32/user_private.h
+2
-1
winpos.c
dlls/user32/winpos.c
+7
-9
No files found.
dlls/user32/painting.c
View file @
85fed5b1
...
...
@@ -399,40 +399,38 @@ static void make_dc_dirty( struct dce *dce )
* rectangle. In addition, pWnd->parent DCEs may need to be updated if
* DCX_CLIPCHILDREN flag is set.
*/
void
invalidate_dce
(
HWND
hwnd
,
const
RECT
*
extra_rect
)
void
invalidate_dce
(
WND
*
win
,
const
RECT
*
extra_rect
)
{
RECT
window_rect
;
struct
dce
*
dce
;
HWND
hwndScope
=
GetAncestor
(
hwnd
,
GA_PARENT
);
if
(
!
hwndScope
)
return
;
if
(
!
win
->
parent
)
return
;
GetWindowRect
(
hwnd
,
&
window_rect
);
GetWindowRect
(
win
->
obj
.
handle
,
&
window_rect
);
TRACE
(
"%p
scope hwnd =
%p %s (%s)
\n
"
,
hwnd
,
hwndScope
,
wine_dbgstr_rect
(
&
window_rect
),
wine_dbgstr_rect
(
extra_rect
)
);
TRACE
(
"%p
parent
%p %s (%s)
\n
"
,
win
->
obj
.
handle
,
win
->
parent
,
wine_dbgstr_rect
(
&
window_rect
),
wine_dbgstr_rect
(
extra_rect
)
);
/* walk all DCEs and fixup non-empty entries */
USER_Lock
();
LIST_FOR_EACH_ENTRY
(
dce
,
&
dce_list
,
struct
dce
,
entry
)
{
TRACE
(
"%p: hwnd %p dcx %08x %s %s
\n
"
,
dce
,
dce
->
hwnd
,
dce
->
flags
,
(
dce
->
flags
&
DCX_CACHE
)
?
"Cache"
:
"Owned"
,
dce
->
count
?
"InUse"
:
""
);
if
(
!
dce
->
hwnd
)
continue
;
if
((
dce
->
hwnd
==
hwndScope
)
&&
!
(
dce
->
flags
&
DCX_CLIPCHILDREN
))
if
((
dce
->
hwnd
==
win
->
parent
)
&&
!
(
dce
->
flags
&
DCX_CLIPCHILDREN
))
continue
;
/* child window positions don't bother us */
/* if DCE window is a child of hwnd, it has to be invalidated */
if
(
dce
->
hwnd
==
hwnd
||
IsChild
(
hwnd
,
dce
->
hwnd
))
if
(
dce
->
hwnd
==
win
->
obj
.
handle
||
IsChild
(
win
->
obj
.
handle
,
dce
->
hwnd
))
{
make_dc_dirty
(
dce
);
continue
;
}
/* otherwise check if the window rectangle intersects this DCE window */
if
(
hwndScope
==
dce
->
hwnd
||
IsChild
(
hwndScope
,
dce
->
hwnd
))
if
(
win
->
parent
==
dce
->
hwnd
||
IsChild
(
win
->
parent
,
dce
->
hwnd
))
{
RECT
dce_rect
,
tmp
;
GetWindowRect
(
dce
->
hwnd
,
&
dce_rect
);
...
...
@@ -441,7 +439,6 @@ void invalidate_dce( HWND hwnd, const RECT *extra_rect )
make_dc_dirty
(
dce
);
}
}
USER_Unlock
();
}
/***********************************************************************
...
...
dlls/user32/user_private.h
View file @
85fed5b1
...
...
@@ -205,12 +205,13 @@ extern HMODULE user32_module DECLSPEC_HIDDEN;
extern
HBRUSH
SYSCOLOR_55AABrush
DECLSPEC_HIDDEN
;
struct
dce
;
struct
tagWND
;
extern
BOOL
CLIPBOARD_ReleaseOwner
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
FOCUS_MouseActivate
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
BOOL
set_capture_window
(
HWND
hwnd
,
UINT
gui_flags
,
HWND
*
prev_ret
)
DECLSPEC_HIDDEN
;
extern
void
free_dce
(
struct
dce
*
dce
,
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
invalidate_dce
(
HWND
hwnd
,
const
RECT
*
rect
)
DECLSPEC_HIDDEN
;
extern
void
invalidate_dce
(
struct
tagWND
*
win
,
const
RECT
*
rect
)
DECLSPEC_HIDDEN
;
extern
void
erase_now
(
HWND
hwnd
,
UINT
rdw_flags
)
DECLSPEC_HIDDEN
;
extern
void
*
get_hook_proc
(
void
*
proc
,
const
WCHAR
*
module
)
DECLSPEC_HIDDEN
;
extern
LRESULT
call_current_hook
(
HHOOK
hhook
,
INT
code
,
WPARAM
wparam
,
LPARAM
lparam
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/winpos.c
View file @
85fed5b1
...
...
@@ -1997,17 +1997,15 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
}
}
SERVER_END_REQ
;
WIN_ReleasePtr
(
win
);
if
(
ret
)
{
if
(((
swp_flags
&
SWP_AGG_NOPOSCHANGE
)
!=
SWP_AGG_NOPOSCHANGE
)
||
(
swp_flags
&
(
SWP_HIDEWINDOW
|
SWP_SHOWWINDOW
|
SWP_STATECHANGED
|
SWP_FRAMECHANGED
)))
invalidate_dce
(
hwnd
,
&
old_window_rect
);
if
(
ret
&&
(((
swp_flags
&
SWP_AGG_NOPOSCHANGE
)
!=
SWP_AGG_NOPOSCHANGE
)
||
(
swp_flags
&
(
SWP_HIDEWINDOW
|
SWP_SHOWWINDOW
|
SWP_STATECHANGED
|
SWP_FRAMECHANGED
))))
invalidate_dce
(
win
,
&
old_window_rect
);
USER_Driver
->
pWindowPosChanged
(
hwnd
,
insert_after
,
swp_flags
,
window_rect
,
client_rect
,
&
visible_rect
,
valid_rects
);
}
WIN_ReleasePtr
(
win
);
if
(
ret
)
USER_Driver
->
pWindowPosChanged
(
hwnd
,
insert_after
,
swp_flags
,
window_rect
,
client_rect
,
&
visible_rect
,
valid_rects
);
return
ret
;
}
...
...
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