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
9eb6af79
Commit
9eb6af79
authored
Jun 13, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Jun 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Ignore painting messages in the hotkey test using a wndproc.
parent
a4212786
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
17 deletions
+44
-17
msg.c
dlls/user32/tests/msg.c
+44
-17
No files found.
dlls/user32/tests/msg.c
View file @
9eb6af79
...
...
@@ -7712,6 +7712,37 @@ static LRESULT WINAPI PaintLoopProcA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
return
DefWindowProcA
(
hWnd
,
msg
,
wParam
,
lParam
);
}
static
LRESULT
WINAPI
HotkeyMsgCheckProcA
(
HWND
hwnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
LONG
defwndproc_counter
=
0
;
LRESULT
ret
;
struct
recvd_message
msg
;
if
(
ignore_message
(
message
))
return
0
;
if
((
message
>=
WM_KEYFIRST
&&
message
<=
WM_KEYLAST
)
||
message
==
WM_HOTKEY
||
message
>=
WM_APP
)
{
msg
.
hwnd
=
hwnd
;
msg
.
message
=
message
;
msg
.
flags
=
sent
|
wparam
|
lparam
;
if
(
defwndproc_counter
)
msg
.
flags
|=
defwinproc
;
msg
.
wParam
=
wParam
;
msg
.
lParam
=
lParam
;
msg
.
descr
=
"HotkeyMsgCheckProcA"
;
add_message
(
&
msg
);
}
defwndproc_counter
++
;
ret
=
DefWindowProcA
(
hwnd
,
message
,
wParam
,
lParam
);
defwndproc_counter
--
;
if
(
message
==
WM_APP
)
PostMessageA
(
hwnd
,
WM_APP
+
1
,
0
,
0
);
return
ret
;
}
static
BOOL
RegisterWindowClasses
(
void
)
{
WNDCLASSA
cls
;
...
...
@@ -7729,6 +7760,10 @@ static BOOL RegisterWindowClasses(void)
cls
.
lpszClassName
=
"TestWindowClass"
;
if
(
!
RegisterClassA
(
&
cls
))
return
FALSE
;
cls
.
lpfnWndProc
=
HotkeyMsgCheckProcA
;
cls
.
lpszClassName
=
"HotkeyWindowClass"
;
if
(
!
RegisterClassA
(
&
cls
))
return
FALSE
;
cls
.
lpfnWndProc
=
ShowWindowProcA
;
cls
.
lpszClassName
=
"ShowWindowClass"
;
if
(
!
RegisterClassA
(
&
cls
))
return
FALSE
;
...
...
@@ -13090,7 +13125,7 @@ static void test_hotkey(void)
return
;
}
test_window
=
CreateWindowEx
(
0
,
"
Test
WindowClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
test_window
=
CreateWindowEx
(
0
,
"
Hotkey
WindowClass"
,
NULL
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
100
,
100
,
200
,
200
,
0
,
0
,
0
,
NULL
);
flush_sequence
();
...
...
@@ -13159,14 +13194,12 @@ static void test_hotkey(void)
/* Inject the appropriate key sequence */
keybd_event
(
VK_LWIN
,
0
,
0
,
0
);
while
(
PeekMessage
(
&
msg
,
NULL
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
||
PeekMessage
(
&
msg
,
NULL
,
WM_HOTKEY
,
WM_HOTKEY
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
ok_sequence
(
WmHotkeyPressLWIN
,
"window hotkey press LWIN"
,
FALSE
);
keybd_event
(
hotkey_letter
,
0
,
0
,
0
);
while
(
PeekMessage
(
&
msg
,
NULL
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
||
PeekMessage
(
&
msg
,
NULL
,
WM_HOTKEY
,
WM_HOTKEY
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
if
(
msg
.
message
==
WM_HOTKEY
)
{
...
...
@@ -13181,14 +13214,12 @@ static void test_hotkey(void)
ok
((
key_state
&
0x8000
)
==
0x8000
,
"unexpected key state %x
\n
"
,
key_state
);
keybd_event
(
hotkey_letter
,
0
,
KEYEVENTF_KEYUP
,
0
);
while
(
PeekMessage
(
&
msg
,
NULL
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
||
PeekMessage
(
&
msg
,
NULL
,
WM_HOTKEY
,
WM_HOTKEY
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
ok_sequence
(
WmHotkeyRelease
,
"window hotkey release"
,
FALSE
);
keybd_event
(
VK_LWIN
,
0
,
KEYEVENTF_KEYUP
,
0
);
while
(
PeekMessage
(
&
msg
,
NULL
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
||
PeekMessage
(
&
msg
,
NULL
,
WM_HOTKEY
,
WM_HOTKEY
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
ok_sequence
(
WmHotkeyReleaseLWIN
,
"window hotkey release LWIN"
,
FALSE
);
...
...
@@ -13212,8 +13243,7 @@ static void test_hotkey(void)
/* Inject the appropriate key sequence */
keybd_event
(
VK_LWIN
,
0
,
0
,
0
);
while
(
PeekMessage
(
&
msg
,
NULL
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
||
PeekMessage
(
&
msg
,
NULL
,
WM_HOTKEY
,
WM_HOTKEY
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
ok
(
msg
.
hwnd
!=
NULL
,
"unexpected thread message %x
\n
"
,
msg
.
message
);
DispatchMessage
(
&
msg
);
...
...
@@ -13221,8 +13251,7 @@ static void test_hotkey(void)
ok_sequence
(
WmHotkeyPressLWIN
,
"thread hotkey press LWIN"
,
FALSE
);
keybd_event
(
hotkey_letter
,
0
,
0
,
0
);
while
(
PeekMessage
(
&
msg
,
NULL
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
||
PeekMessage
(
&
msg
,
NULL
,
WM_HOTKEY
,
WM_HOTKEY
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
if
(
msg
.
message
==
WM_HOTKEY
)
{
...
...
@@ -13243,8 +13272,7 @@ static void test_hotkey(void)
ok_sequence
(
WmHotkeyPress
,
"thread hotkey press"
,
FALSE
);
keybd_event
(
hotkey_letter
,
0
,
KEYEVENTF_KEYUP
,
0
);
while
(
PeekMessage
(
&
msg
,
NULL
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
||
PeekMessage
(
&
msg
,
NULL
,
WM_HOTKEY
,
WM_HOTKEY
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
ok
(
msg
.
hwnd
!=
NULL
,
"unexpected thread message %x
\n
"
,
msg
.
message
);
DispatchMessage
(
&
msg
);
...
...
@@ -13252,8 +13280,7 @@ static void test_hotkey(void)
ok_sequence
(
WmHotkeyRelease
,
"thread hotkey release"
,
FALSE
);
keybd_event
(
VK_LWIN
,
0
,
KEYEVENTF_KEYUP
,
0
);
while
(
PeekMessage
(
&
msg
,
NULL
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
||
PeekMessage
(
&
msg
,
NULL
,
WM_HOTKEY
,
WM_HOTKEY
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
ok
(
msg
.
hwnd
!=
NULL
,
"unexpected thread message %x
\n
"
,
msg
.
message
);
DispatchMessage
(
&
msg
);
...
...
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