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
d8391a4a
Commit
d8391a4a
authored
Mar 22, 2008
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Mar 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix F1 message sequence.
parent
5d038523
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
13 deletions
+29
-13
defwnd.c
dlls/user32/defwnd.c
+23
-0
message.c
dlls/user32/message.c
+2
-10
msg.c
dlls/user32/tests/msg.c
+3
-3
winuser.h
include/winuser.h
+1
-0
No files found.
dlls/user32/defwnd.c
View file @
d8391a4a
...
...
@@ -723,6 +723,29 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
SendMessageW
(
parent
,
msg
,
wParam
,
lParam
);
break
;
}
case
WM_KEYF1
:
{
HELPINFO
hi
;
hi
.
cbSize
=
sizeof
(
HELPINFO
);
GetCursorPos
(
&
hi
.
MousePos
);
if
(
MENU_IsMenuActive
())
{
hi
.
iContextType
=
HELPINFO_MENUITEM
;
hi
.
hItemHandle
=
MENU_IsMenuActive
();
hi
.
iCtrlId
=
MenuItemFromPoint
(
hwnd
,
hi
.
hItemHandle
,
hi
.
MousePos
);
hi
.
dwContextId
=
GetMenuContextHelpId
(
hi
.
hItemHandle
);
}
else
{
hi
.
iContextType
=
HELPINFO_WINDOW
;
hi
.
hItemHandle
=
hwnd
;
hi
.
iCtrlId
=
GetWindowLongPtrA
(
hwnd
,
GWLP_ID
);
hi
.
dwContextId
=
GetWindowContextHelpId
(
hwnd
);
}
SendMessageW
(
hwnd
,
WM_HELP
,
0
,
(
LPARAM
)
&
hi
);
break
;
}
}
return
0
;
...
...
dlls/user32/message.c
View file @
d8391a4a
...
...
@@ -1702,17 +1702,9 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
(
msg
->
hwnd
!=
GetDesktopWindow
()))
{
/* Handle F1 key by sending out WM_HELP message */
if
(
msg
->
wParam
==
VK_F1
&&
!
MENU_IsMenuActive
())
if
(
msg
->
wParam
==
VK_F1
)
{
HELPINFO
hi
;
hi
.
cbSize
=
sizeof
(
HELPINFO
);
hi
.
iContextType
=
HELPINFO_WINDOW
;
hi
.
iCtrlId
=
GetWindowLongPtrA
(
msg
->
hwnd
,
GWLP_ID
);
hi
.
hItemHandle
=
msg
->
hwnd
;
hi
.
dwContextId
=
GetWindowContextHelpId
(
msg
->
hwnd
);
hi
.
MousePos
=
msg
->
pt
;
SendMessageW
(
msg
->
hwnd
,
WM_HELP
,
0
,
(
LPARAM
)
&
hi
);
PostMessageW
(
msg
->
hwnd
,
WM_KEYF1
,
0
,
0
);
}
else
if
(
msg
->
wParam
>=
VK_BROWSER_BACK
&&
msg
->
wParam
<=
VK_LAUNCH_APP2
)
...
...
dlls/user32/tests/msg.c
View file @
d8391a4a
...
...
@@ -5891,8 +5891,8 @@ static const struct message WmF1Seq[] = {
{
HCBT_KEYSKIPPED
,
hook
|
wparam
|
lparam
|
optional
,
VK_F1
,
1
},
/* XP */
{
WM_KEYDOWN
,
wparam
|
lparam
,
VK_F1
,
1
},
{
WM_KEYDOWN
,
sent
|
wparam
|
lparam
,
VK_F1
,
0x00000001
},
{
0x4d
,
wparam
|
lparam
,
0
,
0
},
{
0x4d
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
WM_KEYF1
,
wparam
|
lparam
,
0
,
0
},
{
WM_KEYF1
,
sent
|
wparam
|
lparam
,
0
,
0
},
{
WM_HELP
,
sent
|
defwinproc
},
{
HCBT_KEYSKIPPED
,
hook
|
wparam
|
lparam
|
optional
,
VK_F1
,
0xc0000001
},
/* XP */
{
WM_KEYUP
,
wparam
|
lparam
,
VK_F1
,
0xc0000001
},
...
...
@@ -6123,7 +6123,7 @@ static void test_accelerators(void)
keybd_event
(
VK_F1
,
0
,
0
,
0
);
keybd_event
(
VK_F1
,
0
,
KEYEVENTF_KEYUP
,
0
);
pump_msg_loop
(
hwnd
,
0
);
ok_sequence
(
WmF1Seq
,
"F1 press/release"
,
TRU
E
);
ok_sequence
(
WmF1Seq
,
"F1 press/release"
,
FALS
E
);
trace
(
"testing VK_APPS press/release
\n
"
);
keybd_event
(
VK_APPS
,
0
,
0
,
0
);
...
...
include/winuser.h
View file @
d8391a4a
...
...
@@ -1160,6 +1160,7 @@ WINUSERAPI BOOL WINAPI SetSysColors(INT,const INT*,const COLORREF*);
/* Win32 4.0 messages */
#define WM_COPYDATA 0x004a
#define WM_CANCELJOURNAL 0x004b
#define WM_KEYF1 0x004d
#define WM_NOTIFY 0x004e
#define WM_INPUTLANGCHANGEREQUEST 0x0050
#define WM_INPUTLANGCHANGE 0x0051
...
...
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