Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
dad8044f
Commit
dad8044f
authored
Jun 11, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move WM_KEYF1 implementation from user32.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
95b76f51
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
26 deletions
+38
-26
defwnd.c
dlls/user32/defwnd.c
+0
-23
defwnd.c
dlls/win32u/defwnd.c
+27
-0
menu.c
dlls/win32u/menu.c
+6
-0
message.c
dlls/win32u/message.c
+1
-1
win32u_private.h
dlls/win32u/win32u_private.h
+2
-0
window.c
dlls/win32u/window.c
+2
-2
No files found.
dlls/user32/defwnd.c
View file @
dad8044f
...
...
@@ -435,29 +435,6 @@ 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
;
}
case
WM_INPUTLANGCHANGEREQUEST
:
NtUserActivateKeyboardLayout
(
(
HKL
)
lParam
,
0
);
...
...
dlls/win32u/defwnd.c
View file @
dad8044f
...
...
@@ -1766,6 +1766,33 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
case
WM_SYSCOMMAND
:
result
=
handle_sys_command
(
hwnd
,
wparam
,
lparam
);
break
;
case
WM_KEYF1
:
{
HELPINFO
hi
;
hi
.
cbSize
=
sizeof
(
HELPINFO
);
get_cursor_pos
(
&
hi
.
MousePos
);
if
(
is_menu_active
())
{
MENUINFO
info
=
{
.
cbSize
=
sizeof
(
info
),
.
fMask
=
MIM_HELPID
};
hi
.
iContextType
=
HELPINFO_MENUITEM
;
hi
.
hItemHandle
=
is_menu_active
();
hi
.
iCtrlId
=
NtUserMenuItemFromPoint
(
hwnd
,
hi
.
hItemHandle
,
hi
.
MousePos
.
x
,
hi
.
MousePos
.
y
);
get_menu_info
(
hi
.
hItemHandle
,
&
info
);
hi
.
dwContextId
=
info
.
dwContextHelpID
;
}
else
{
hi
.
iContextType
=
HELPINFO_WINDOW
;
hi
.
hItemHandle
=
hwnd
;
hi
.
iCtrlId
=
get_window_long_ptr
(
hwnd
,
GWLP_ID
,
FALSE
);
hi
.
dwContextId
=
get_window_context_help_id
(
hwnd
);
}
send_message
(
hwnd
,
WM_HELP
,
0
,
(
LPARAM
)
&
hi
);
break
;
}
}
return
result
;
...
...
dlls/win32u/menu.c
View file @
dad8044f
...
...
@@ -2492,3 +2492,9 @@ LRESULT popup_menu_window_proc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l
}
return
0
;
}
HWND
is_menu_active
(
void
)
{
if
(
!
user_callbacks
)
return
0
;
return
user_callbacks
->
is_menu_active
();
}
dlls/win32u/message.c
View file @
dad8044f
...
...
@@ -1346,7 +1346,7 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
else
if
(
msg
->
message
==
WM_KEYUP
)
{
/* Handle VK_APPS key by posting a WM_CONTEXTMENU message */
if
(
msg
->
wParam
==
VK_APPS
&&
user_callbacks
&&
!
user_callbacks
->
is_menu_active
())
if
(
msg
->
wParam
==
VK_APPS
&&
!
is_menu_active
())
NtUserPostMessage
(
msg
->
hwnd
,
WM_CONTEXTMENU
,
(
WPARAM
)
msg
->
hwnd
,
-
1
);
}
}
...
...
dlls/win32u/win32u_private.h
View file @
dad8044f
...
...
@@ -402,6 +402,7 @@ extern BOOL get_menu_info( HMENU handle, MENUINFO *info ) DECLSPEC_HIDDEN;
extern
INT
get_menu_item_count
(
HMENU
handle
)
DECLSPEC_HIDDEN
;
extern
UINT
get_menu_state
(
HMENU
handle
,
UINT
item_id
,
UINT
flags
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_menu
(
HMENU
handle
)
DECLSPEC_HIDDEN
;
extern
HWND
is_menu_active
(
void
)
DECLSPEC_HIDDEN
;
extern
LRESULT
popup_menu_window_proc
(
HWND
hwnd
,
UINT
message
,
WPARAM
wparam
,
LPARAM
lparam
)
DECLSPEC_HIDDEN
;
extern
BOOL
set_window_menu
(
HWND
hwnd
,
HMENU
handle
)
DECLSPEC_HIDDEN
;
...
...
@@ -463,6 +464,7 @@ extern HWND get_parent( HWND hwnd ) DECLSPEC_HIDDEN;
extern
HWND
get_hwnd_message_parent
(
void
)
DECLSPEC_HIDDEN
;
extern
DPI_AWARENESS_CONTEXT
get_window_dpi_awareness_context
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
MINMAXINFO
get_min_max_info
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
DWORD
get_window_context_help_id
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
HWND
get_window_relative
(
HWND
hwnd
,
UINT
rel
)
DECLSPEC_HIDDEN
;
extern
DWORD
get_window_thread
(
HWND
hwnd
,
DWORD
*
process
)
DECLSPEC_HIDDEN
;
extern
HWND
is_current_process_window
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
dlls/win32u/window.c
View file @
dad8044f
...
...
@@ -4524,7 +4524,7 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info )
}
/* see GetWindowContextHelpId */
static
DWORD
get_window_context_help_id
(
HWND
hwnd
)
DWORD
get_window_context_help_id
(
HWND
hwnd
)
{
DWORD
retval
;
WND
*
win
=
get_win_ptr
(
hwnd
);
...
...
@@ -4759,7 +4759,7 @@ BOOL WINAPI NtUserDestroyWindow( HWND hwnd )
if
(
call_hooks
(
WH_CBT
,
HCBT_DESTROYWND
,
(
WPARAM
)
hwnd
,
0
,
TRUE
))
return
FALSE
;
if
(
user_callbacks
&&
user_callbacks
->
is_menu_active
()
==
hwnd
)
if
(
user_callbacks
&&
is_menu_active
()
==
hwnd
)
user_callbacks
->
pEndMenu
();
is_child
=
(
get_window_long
(
hwnd
,
GWL_STYLE
)
&
WS_CHILD
)
!=
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