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
b85dbc9c
Commit
b85dbc9c
authored
Jun 17, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Test that QS_HOTKEY is properly set and cleared.
parent
79556aea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
msg.c
dlls/user32/tests/msg.c
+28
-0
No files found.
dlls/user32/tests/msg.c
View file @
b85dbc9c
...
@@ -7717,6 +7717,7 @@ static LRESULT WINAPI HotkeyMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
...
@@ -7717,6 +7717,7 @@ static LRESULT WINAPI HotkeyMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
static
LONG
defwndproc_counter
=
0
;
static
LONG
defwndproc_counter
=
0
;
LRESULT
ret
;
LRESULT
ret
;
struct
recvd_message
msg
;
struct
recvd_message
msg
;
DWORD
queue_status
;
if
(
ignore_message
(
message
))
return
0
;
if
(
ignore_message
(
message
))
return
0
;
...
@@ -7738,7 +7739,18 @@ static LRESULT WINAPI HotkeyMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
...
@@ -7738,7 +7739,18 @@ static LRESULT WINAPI HotkeyMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
defwndproc_counter
--
;
defwndproc_counter
--
;
if
(
message
==
WM_APP
)
if
(
message
==
WM_APP
)
{
queue_status
=
GetQueueStatus
(
QS_HOTKEY
);
ok
((
queue_status
&
(
QS_HOTKEY
<<
16
))
==
QS_HOTKEY
<<
16
,
"expected QS_HOTKEY << 16 set, got %x
\n
"
,
queue_status
);
queue_status
=
GetQueueStatus
(
QS_POSTMESSAGE
);
ok
((
queue_status
&
(
QS_POSTMESSAGE
<<
16
))
==
QS_POSTMESSAGE
<<
16
,
"expected QS_POSTMESSAGE << 16 set, got %x
\n
"
,
queue_status
);
PostMessageA
(
hwnd
,
WM_APP
+
1
,
0
,
0
);
PostMessageA
(
hwnd
,
WM_APP
+
1
,
0
,
0
);
}
else
if
(
message
==
WM_APP
+
1
)
{
queue_status
=
GetQueueStatus
(
QS_HOTKEY
);
ok
((
queue_status
&
(
QS_HOTKEY
<<
16
))
==
0
,
"expected QS_HOTKEY << 16 cleared, got %x
\n
"
,
queue_status
);
}
return
ret
;
return
ret
;
}
}
...
@@ -13151,6 +13163,7 @@ static void test_hotkey(void)
...
@@ -13151,6 +13163,7 @@ static void test_hotkey(void)
HWND
test_window
,
taskbar_window
;
HWND
test_window
,
taskbar_window
;
BOOL
ret
;
BOOL
ret
;
MSG
msg
;
MSG
msg
;
DWORD
queue_status
;
SHORT
key_state
;
SHORT
key_state
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -13238,6 +13251,8 @@ static void test_hotkey(void)
...
@@ -13238,6 +13251,8 @@ static void test_hotkey(void)
ok_sequence
(
WmHotkeyPressLWIN
,
"window hotkey press LWIN"
,
FALSE
);
ok_sequence
(
WmHotkeyPressLWIN
,
"window hotkey press LWIN"
,
FALSE
);
keybd_event
(
hotkey_letter
,
0
,
0
,
0
);
keybd_event
(
hotkey_letter
,
0
,
0
,
0
);
queue_status
=
GetQueueStatus
(
QS_HOTKEY
);
ok
((
queue_status
&
(
QS_HOTKEY
<<
16
))
==
QS_HOTKEY
<<
16
,
"expected QS_HOTKEY << 16 set, got %x
\n
"
,
queue_status
);
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
{
{
if
(
msg
.
message
==
WM_HOTKEY
)
if
(
msg
.
message
==
WM_HOTKEY
)
...
@@ -13249,6 +13264,9 @@ static void test_hotkey(void)
...
@@ -13249,6 +13264,9 @@ static void test_hotkey(void)
}
}
ok_sequence
(
WmHotkeyPress
,
"window hotkey press"
,
FALSE
);
ok_sequence
(
WmHotkeyPress
,
"window hotkey press"
,
FALSE
);
queue_status
=
GetQueueStatus
(
QS_HOTKEY
);
ok
((
queue_status
&
(
QS_HOTKEY
<<
16
))
==
0
,
"expected QS_HOTKEY << 16 cleared, got %x
\n
"
,
queue_status
);
key_state
=
GetAsyncKeyState
(
hotkey_letter
);
key_state
=
GetAsyncKeyState
(
hotkey_letter
);
ok
((
key_state
&
0x8000
)
==
0x8000
,
"unexpected key state %x
\n
"
,
key_state
);
ok
((
key_state
&
0x8000
)
==
0x8000
,
"unexpected key state %x
\n
"
,
key_state
);
...
@@ -13262,6 +13280,16 @@ static void test_hotkey(void)
...
@@ -13262,6 +13280,16 @@ static void test_hotkey(void)
DispatchMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
ok_sequence
(
WmHotkeyReleaseLWIN
,
"window hotkey release LWIN"
,
FALSE
);
ok_sequence
(
WmHotkeyReleaseLWIN
,
"window hotkey release LWIN"
,
FALSE
);
/* normal posted WM_HOTKEY messages set QS_HOTKEY */
PostMessage
(
test_window
,
WM_HOTKEY
,
0
,
0
);
queue_status
=
GetQueueStatus
(
QS_HOTKEY
);
ok
((
queue_status
&
(
QS_HOTKEY
<<
16
))
==
QS_HOTKEY
<<
16
,
"expected QS_HOTKEY << 16 set, got %x
\n
"
,
queue_status
);
queue_status
=
GetQueueStatus
(
QS_POSTMESSAGE
);
ok
((
queue_status
&
(
QS_POSTMESSAGE
<<
16
))
==
QS_POSTMESSAGE
<<
16
,
"expected QS_POSTMESSAGE << 16 set, got %x
\n
"
,
queue_status
);
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
flush_sequence
();
/* Send and process all messages at once */
/* Send and process all messages at once */
PostMessage
(
test_window
,
WM_APP
,
0
,
0
);
PostMessage
(
test_window
,
WM_APP
,
0
,
0
);
keybd_event
(
VK_LWIN
,
0
,
0
,
0
);
keybd_event
(
VK_LWIN
,
0
,
0
,
0
);
...
...
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