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
6ee4a87a
Commit
6ee4a87a
authored
Mar 02, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Also show dialogs right after a WM_TIMER message.
parent
ac08b038
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
dialog.c
dlls/user32/dialog.c
+6
-0
dialog.c
dlls/user32/tests/dialog.c
+50
-0
No files found.
dlls/user32/dialog.c
View file @
6ee4a87a
...
...
@@ -815,6 +815,12 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
DispatchMessageW
(
&
msg
);
}
if
(
dlgInfo
->
flags
&
DF_END
)
break
;
if
(
bFirstEmpty
&&
msg
.
message
==
WM_TIMER
)
{
ShowWindow
(
hwnd
,
SW_SHOWNORMAL
);
bFirstEmpty
=
FALSE
;
}
}
}
if
(
dlgInfo
->
flags
&
DF_OWNERENABLED
)
DIALOG_EnableOwner
(
owner
);
...
...
dlls/user32/tests/dialog.c
View file @
6ee4a87a
...
...
@@ -1157,6 +1157,55 @@ static void test_SaveRestoreFocus(void)
DestroyWindow
(
hDlg
);
}
static
INT_PTR
CALLBACK
timer_message_dlg_proc
(
HWND
wnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
static
int
count
;
BOOL
visible
;
switch
(
msg
)
{
case
WM_INITDIALOG
:
visible
=
GetWindowLong
(
wnd
,
GWL_STYLE
)
&
WS_VISIBLE
;
ok
(
!
visible
,
"Dialog should not be visible.
\n
"
);
SetTimer
(
wnd
,
1
,
100
,
NULL
);
Sleep
(
200
);
return
FALSE
;
case
WM_COMMAND
:
if
(
LOWORD
(
wparam
)
!=
IDCANCEL
)
return
FALSE
;
EndDialog
(
wnd
,
LOWORD
(
wparam
));
return
TRUE
;
case
WM_TIMER
:
if
(
wparam
!=
1
)
return
FALSE
;
visible
=
GetWindowLong
(
wnd
,
GWL_STYLE
)
&
WS_VISIBLE
;
if
(
!
count
++
)
{
ok
(
!
visible
,
"Dialog should not be visible.
\n
"
);
PostMessage
(
wnd
,
WM_USER
,
0
,
0
);
}
else
{
ok
(
visible
,
"Dialog should be visible.
\n
"
);
PostMessage
(
wnd
,
WM_COMMAND
,
IDCANCEL
,
0
);
}
return
TRUE
;
case
WM_USER
:
visible
=
GetWindowLong
(
wnd
,
GWL_STYLE
)
&
WS_VISIBLE
;
ok
(
visible
,
"Dialog should be visible.
\n
"
);
return
TRUE
;
default:
return
FALSE
;
}
}
static
void
test_timer_message
(
void
)
{
DialogBoxA
(
g_hinst
,
"RADIO_TEST_DIALOG"
,
NULL
,
timer_message_dlg_proc
);
}
START_TEST
(
dialog
)
{
g_hinst
=
GetModuleHandleA
(
0
);
...
...
@@ -1172,4 +1221,5 @@ START_TEST(dialog)
test_DisabledDialogTest
();
test_MessageBoxFontTest
();
test_SaveRestoreFocus
();
test_timer_message
();
}
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