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
997d4ef4
Commit
997d4ef4
authored
Feb 13, 2017
by
Fabian Maurer
Committed by
Alexandre Julliard
Feb 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Send WM_NCPAINT and WM_ERASEBKGND when window is shown.
Signed-off-by:
Fabian Maurer
<
dark.shadow4@web.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6df21d40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
23 deletions
+36
-23
msg.c
dlls/user32/tests/msg.c
+13
-13
winpos.c
dlls/user32/winpos.c
+23
-10
No files found.
dlls/user32/tests/msg.c
View file @
997d4ef4
...
...
@@ -4651,7 +4651,7 @@ static void test_showwindow(void)
flush_sequence
();
ShowWindow
(
hwnd
,
SW_SHOWMAXIMIZED
);
ok_sequence
(
WmShowMaxPopupResizedSeq_todo
,
"ShowWindow(SW_SHOWMAXIMIZED):invisible maximized and resized popup TODO"
,
FALS
E
);
"ShowWindow(SW_SHOWMAXIMIZED):invisible maximized and resized popup TODO"
,
TRU
E
);
DestroyWindow
(
hwnd
);
flush_sequence
();
...
...
@@ -5135,7 +5135,7 @@ static void test_messages(void)
10
,
10
,
100
,
100
,
NULL
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
0
,
"Failed to create popup window
\n
"
);
RedrawWindow
(
hwnd
,
NULL
,
NULL
,
RDW_UPDATENOW
);
ok_sequence
(
WmShowPopupFirstDrawSeq_1
,
"RedrawWindow:show_popup_first_draw_visible"
,
TRU
E
);
ok_sequence
(
WmShowPopupFirstDrawSeq_1
,
"RedrawWindow:show_popup_first_draw_visible"
,
FALS
E
);
DestroyWindow
(
hwnd
);
/* Invisible, show, message */
...
...
@@ -5146,7 +5146,7 @@ static void test_messages(void)
ok
(
hwnd
!=
0
,
"Failed to create popup window
\n
"
);
ShowWindow
(
hwnd
,
SW_SHOW
);
SendMessageW
(
hwnd
,
WM_PAINT
,
0
,
0
);
ok_sequence
(
WmShowPopupFirstDrawSeq_1
,
"RedrawWindow:show_popup_first_draw_show"
,
TRU
E
);
ok_sequence
(
WmShowPopupFirstDrawSeq_1
,
"RedrawWindow:show_popup_first_draw_show"
,
FALS
E
);
DestroyWindow
(
hwnd
);
/* Invisible, show maximized, redraw */
...
...
@@ -5157,20 +5157,20 @@ static void test_messages(void)
ok
(
hwnd
!=
0
,
"Failed to create popup window
\n
"
);
ShowWindow
(
hwnd
,
SW_SHOWMAXIMIZED
);
RedrawWindow
(
hwnd
,
NULL
,
NULL
,
RDW_UPDATENOW
);
ok_sequence
(
WmShowPopupFirstDrawSeq_2
,
"RedrawWindow:show_popup_first_draw_show_maximized"
,
TRU
E
);
ok_sequence
(
WmShowPopupFirstDrawSeq_2
,
"RedrawWindow:show_popup_first_draw_show_maximized"
,
FALS
E
);
DestroyWindow
(
hwnd
);
/* Test SetWindowPos */
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
,
TRU
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
,
FALS
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq2
,
0
,
FALSE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq3
,
SWP_SHOWWINDOW
|
SWP_NOSIZE
|
SWP_NOMOVE
|
SWP_NOCLIENTSIZE
|
SWP_NOCLIENTMOVE
|
SWP_NOZORDER
,
TRUE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOSIZE
,
TRU
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq4
,
SWP_SHOWWINDOW
|
SWP_NOMOVE
,
TRU
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOSIZE
,
FALS
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq4
,
SWP_SHOWWINDOW
|
SWP_NOMOVE
,
FALS
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq3
,
SWP_SHOWWINDOW
|
SWP_NOCLIENTSIZE
,
TRUE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq3
,
SWP_SHOWWINDOW
|
SWP_NOCLIENTMOVE
,
TRUE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOZORDER
,
TRU
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOZORDER
,
FALS
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq2
,
SWP_SHOWWINDOW
|
SWP_DEFERERASE
,
FALSE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq3
,
SWP_SHOWWINDOW
|
SWP_DEFERERASE
|
SWP_NOCLIENTMOVE
,
TRUE
);
...
...
@@ -5179,12 +5179,12 @@ static void test_messages(void)
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq2
,
SWP_SHOWWINDOW
|
SWP_DEFERERASE
|
SWP_NOSIZE
,
FALSE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq2
,
SWP_SHOWWINDOW
|
SWP_DEFERERASE
|
SWP_NOZORDER
,
FALSE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
,
TRU
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
,
FALS
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq3
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOCLIENTMOVE
,
TRUE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq3
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOCLIENTSIZE
,
TRUE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq4
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOMOVE
,
TRU
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOSIZE
,
TRU
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOZORDER
,
TRU
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq4
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOMOVE
,
FALS
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOSIZE
,
FALS
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq1
,
SWP_SHOWWINDOW
|
SWP_NOCOPYBITS
|
SWP_NOZORDER
,
FALS
E
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq2
,
SWP_SHOWWINDOW
|
SWP_NOREDRAW
,
FALSE
);
test_msg_setpos
(
WmFirstDrawSetWindowPosSeq3
,
SWP_SHOWWINDOW
|
SWP_NOREDRAW
|
SWP_NOCLIENTMOVE
,
TRUE
);
...
...
@@ -5220,7 +5220,7 @@ static void test_messages(void)
flush_sequence
();
SetWindowPos
(
hparent
,
NULL
,
0
,
0
,
100
,
100
,
SWP_SHOWWINDOW
);
ok_sequence
(
WmFirstDrawChildSeq2
,
/* Expect child to be redrawn */
"SetWindowPos:show_popup_first_show_window_child2"
,
TRU
E
);
"SetWindowPos:show_popup_first_show_window_child2"
,
FALS
E
);
DestroyWindow
(
hchild
);
DestroyWindow
(
hparent
);
...
...
dlls/user32/winpos.c
View file @
997d4ef4
...
...
@@ -45,6 +45,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(win);
(SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOZORDER)
#define SWP_AGG_STATUSFLAGS \
(SWP_AGG_NOPOSCHANGE | SWP_FRAMECHANGED | SWP_HIDEWINDOW | SWP_SHOWWINDOW)
#define SWP_AGG_NOCLIENTCHANGE \
(SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE)
#define HAS_DLGFRAME(style,exStyle) \
(((exStyle) & WS_EX_DLGMODALFRAME) || \
...
...
@@ -2229,16 +2231,7 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos )
&
newWindowRect
,
&
newClientRect
,
valid_rects
))
return
FALSE
;
/* erase parent when hiding or resizing child */
if
(
!
(
orig_flags
&
SWP_DEFERERASE
)
&&
((
orig_flags
&
SWP_HIDEWINDOW
)
||
(
!
(
orig_flags
&
SWP_SHOWWINDOW
)
&&
(
winpos
->
flags
&
SWP_AGG_STATUSFLAGS
)
!=
SWP_AGG_NOGEOMETRYCHANGE
)))
{
HWND
parent
=
GetAncestor
(
winpos
->
hwnd
,
GA_PARENT
);
if
(
!
parent
||
parent
==
GetDesktopWindow
())
parent
=
winpos
->
hwnd
;
erase_now
(
parent
,
0
);
}
if
(
winpos
->
flags
&
SWP_HIDEWINDOW
)
HideCaret
(
winpos
->
hwnd
);
...
...
@@ -2254,6 +2247,26 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos )
SetForegroundWindow
(
winpos
->
hwnd
);
}
if
(
!
(
orig_flags
&
SWP_DEFERERASE
))
{
/* erase parent when hiding or resizing child */
if
((
orig_flags
&
SWP_HIDEWINDOW
)
||
(
!
(
orig_flags
&
SWP_SHOWWINDOW
)
&&
(
winpos
->
flags
&
SWP_AGG_STATUSFLAGS
)
!=
SWP_AGG_NOGEOMETRYCHANGE
))
{
HWND
parent
=
GetAncestor
(
winpos
->
hwnd
,
GA_PARENT
);
if
(
!
parent
||
parent
==
GetDesktopWindow
())
parent
=
winpos
->
hwnd
;
erase_now
(
parent
,
0
);
}
/* Give newly shown windows a chance to redraw */
if
(((
winpos
->
flags
&
SWP_AGG_STATUSFLAGS
)
!=
SWP_AGG_NOPOSCHANGE
)
&&
!
(
orig_flags
&
SWP_AGG_NOCLIENTCHANGE
)
&&
(
orig_flags
&
SWP_SHOWWINDOW
))
{
erase_now
(
winpos
->
hwnd
,
0
);
}
}
/* And last, send the WM_WINDOWPOSCHANGED message */
TRACE
(
"
\t
status flags = %04x
\n
"
,
winpos
->
flags
&
SWP_AGG_STATUSFLAGS
);
...
...
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