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
6cae93a3
Commit
6cae93a3
authored
Apr 16, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/menu: Replace macro checks for window style with a helper function.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fcdc7db3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
menu.c
dlls/user32/menu.c
+8
-5
No files found.
dlls/user32/menu.c
View file @
6cae93a3
...
...
@@ -165,8 +165,6 @@ typedef struct
#define STATE_MASK (~TYPE_MASK)
#define MENUITEMINFO_STATE_MASK (STATE_MASK & ~(MF_BYPOSITION | MF_MOUSESELECT))
#define WIN_ALLOWED_MENU(style) ((style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
static
SIZE
menucharsize
;
static
UINT
ODitemheight
;
/* default owner drawn item height */
...
...
@@ -182,6 +180,11 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFO
static
BOOL
SetMenuItemInfo_common
(
MENUITEM
*
,
const
MENUITEMINFOW
*
,
BOOL
);
static
BOOL
is_win_menu_disallowed
(
HWND
hwnd
)
{
return
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
(
WS_CHILD
|
WS_POPUP
))
==
WS_CHILD
;
}
/*********************************************************************
* menu class descriptor
*/
...
...
@@ -3442,7 +3445,7 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar)
/* find window that has a menu */
while
(
!
WIN_ALLOWED_MENU
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
))
while
(
is_win_menu_disallowed
(
hwnd
))
if
(
!
(
hwnd
=
GetAncestor
(
hwnd
,
GA_PARENT
)))
return
;
/* check if we have to track a system menu */
...
...
@@ -4375,7 +4378,7 @@ BOOL MENU_SetMenu( HWND hWnd, HMENU hMenu )
WARN
(
"hMenu %p is not a menu handle
\n
"
,
hMenu
);
return
FALSE
;
}
if
(
!
WIN_ALLOWED_MENU
(
GetWindowLongW
(
hWnd
,
GWL_STYLE
)
))
if
(
is_win_menu_disallowed
(
hWnd
))
return
FALSE
;
hWnd
=
WIN_GetFullHandle
(
hWnd
);
...
...
@@ -4432,7 +4435,7 @@ BOOL WINAPI DrawMenuBar( HWND hWnd )
if
(
!
IsWindow
(
hWnd
))
return
FALSE
;
if
(
!
WIN_ALLOWED_MENU
(
GetWindowLongW
(
hWnd
,
GWL_STYLE
)
))
if
(
is_win_menu_disallowed
(
hWnd
))
return
TRUE
;
if
((
hMenu
=
GetMenu
(
hWnd
)))
...
...
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