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
52373b2d
Commit
52373b2d
authored
Sep 24, 2004
by
Richard Cohen
Committed by
Alexandre Julliard
Sep 24, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MenuItemFromPoint shouldn't crash if there's no menu.
parent
48dc3164
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
menu.c
dlls/user/menu.c
+4
-5
winuser.h
include/winuser.h
+1
-1
No files found.
dlls/user/menu.c
View file @
52373b2d
...
...
@@ -633,7 +633,7 @@ static void MENU_FreeItemData( MENUITEM* item )
* not work for child windows and therefore should not be called for
* an arbitrary system menu.
*/
static
MENUITEM
*
MENU_FindItemByCoords
(
POPUPMENU
*
menu
,
static
MENUITEM
*
MENU_FindItemByCoords
(
const
POPUPMENU
*
menu
,
POINT
pt
,
UINT
*
pos
)
{
MENUITEM
*
item
;
...
...
@@ -4500,15 +4500,14 @@ DWORD WINAPI GetMenuContextHelpId( HMENU hMenu )
/**********************************************************************
* MenuItemFromPoint (USER32.@)
*/
U
INT
WINAPI
MenuItemFromPoint
(
HWND
hWnd
,
HMENU
hMenu
,
POINT
ptScreen
)
INT
WINAPI
MenuItemFromPoint
(
HWND
hWnd
,
HMENU
hMenu
,
POINT
ptScreen
)
{
POPUPMENU
*
menu
=
MENU_GetMenu
(
hMenu
);
UINT
pos
;
MENUITEM
*
item
;
/*FIXME: Do we have to handle hWnd here? */
i
tem
=
MENU_FindItemByCoords
(
menu
,
ptScreen
,
&
pos
)
;
i
f
(
!
menu
)
return
-
1
;
if
(
!
MENU_FindItemByCoords
(
menu
,
ptScreen
,
&
pos
))
return
-
1
;
return
pos
;
}
...
...
include/winuser.h
View file @
52373b2d
...
...
@@ -4336,7 +4336,7 @@ UINT WINAPI MapVirtualKeyExW(UINT,UINT,HKL);
#define MapVirtualKeyEx WINELIB_NAME_AW(MapVirtualKeyEx)
BOOL
WINAPI
MapDialogRect
(
HWND
,
LPRECT
);
INT
WINAPI
MapWindowPoints
(
HWND
,
HWND
,
LPPOINT
,
UINT
);
UINT
WINAPI
MenuItemFromPoint
(
HWND
,
HMENU
,
POINT
);
INT
WINAPI
MenuItemFromPoint
(
HWND
,
HMENU
,
POINT
);
BOOL
WINAPI
MessageBeep
(
UINT
);
INT
WINAPI
MessageBoxA
(
HWND
,
LPCSTR
,
LPCSTR
,
UINT
);
INT
WINAPI
MessageBoxW
(
HWND
,
LPCWSTR
,
LPCWSTR
,
UINT
);
...
...
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