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
e42bcbde
Commit
e42bcbde
authored
Mar 31, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Mar 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Remove the height parameter from MENU_DrawMenuItem().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
89849748
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
menu.c
dlls/user32/menu.c
+16
-20
No files found.
dlls/user32/menu.c
View file @
e42bcbde
...
...
@@ -1392,8 +1392,8 @@ static void draw_popup_arrow( HDC hdc, RECT rect, UINT arrow_bitmap_width,
*
* Draw a single menu item.
*/
static
void
MENU_DrawMenuItem
(
HWND
hwnd
,
HMENU
hmenu
,
HWND
hwndOwner
,
HDC
hdc
,
MENUITEM
*
lpitem
,
UINT
height
,
BOOL
menuBar
,
UINT
odaction
)
static
void
MENU_DrawMenuItem
(
HWND
hwnd
,
HMENU
hmenu
,
HWND
hwndOwner
,
HDC
hdc
,
MENUITEM
*
lpitem
,
BOOL
menuBar
,
UINT
odaction
)
{
RECT
rect
;
BOOL
flat_menu
=
FALSE
;
...
...
@@ -1534,7 +1534,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
rc
.
left
-=
MENU_COL_SPACE
/
2
+
1
;
rc
.
top
=
3
;
rc
.
bottom
=
h
eight
-
3
;
rc
.
bottom
=
menu
->
H
eight
-
3
;
if
(
flat_menu
)
{
oldPen
=
SelectObject
(
hdc
,
SYSCOLOR_GetPen
(
COLOR_BTNSHADOW
)
);
...
...
@@ -1791,15 +1791,15 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
{
TRACE
(
"hmenu %p Style %08x
\n
"
,
hmenu
,
menu
->
dwStyle
);
/* draw menu items */
if
(
menu
->
nItems
)
if
(
menu
->
nItems
)
{
MENUITEM
*
item
;
UINT
u
;
item
=
menu
->
items
;
for
(
u
=
menu
->
nItems
;
u
>
0
;
u
--
,
item
++
)
for
(
u
=
menu
->
nItems
;
u
>
0
;
u
--
,
item
++
)
MENU_DrawMenuItem
(
hwnd
,
hmenu
,
menu
->
hwndOwner
,
hdc
,
item
,
menu
->
Height
,
FALSE
,
ODA_DRAWENTIRE
);
item
,
FALSE
,
ODA_DRAWENTIRE
);
}
/* draw scroll arrows */
if
(
menu
->
bScrolling
)
...
...
@@ -2024,10 +2024,9 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
/* Clear previous highlighted item */
if
(
lppop
->
FocusedItem
!=
NO_SELECTED_ITEM
)
{
lppop
->
items
[
lppop
->
FocusedItem
].
fState
&=
~
(
MF_HILITE
|
MF_MOUSESELECT
);
MENU_DrawMenuItem
(
lppop
->
hWnd
,
hmenu
,
hwndOwner
,
hdc
,
&
lppop
->
items
[
lppop
->
FocusedItem
],
lppop
->
Height
,
!
(
lppop
->
wFlags
&
MF_POPUP
),
ODA_SELECT
);
lppop
->
items
[
lppop
->
FocusedItem
].
fState
&=
~
(
MF_HILITE
|
MF_MOUSESELECT
);
MENU_DrawMenuItem
(
lppop
->
hWnd
,
hmenu
,
hwndOwner
,
hdc
,
&
lppop
->
items
[
lppop
->
FocusedItem
],
!
(
lppop
->
wFlags
&
MF_POPUP
),
ODA_SELECT
);
}
/* Highlight new item (if any) */
...
...
@@ -2037,9 +2036,8 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
if
(
!
(
lppop
->
items
[
wIndex
].
fType
&
MF_SEPARATOR
))
{
lppop
->
items
[
wIndex
].
fState
|=
MF_HILITE
;
MENU_EnsureMenuItemVisible
(
lppop
,
wIndex
,
hdc
);
MENU_DrawMenuItem
(
lppop
->
hWnd
,
hmenu
,
hwndOwner
,
hdc
,
&
lppop
->
items
[
wIndex
],
lppop
->
Height
,
!
(
lppop
->
wFlags
&
MF_POPUP
),
ODA_SELECT
);
MENU_DrawMenuItem
(
lppop
->
hWnd
,
hmenu
,
hwndOwner
,
hdc
,
&
lppop
->
items
[
wIndex
],
!
(
lppop
->
wFlags
&
MF_POPUP
),
ODA_SELECT
);
}
if
(
sendMenuSelect
)
{
...
...
@@ -2372,11 +2370,11 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu,
SelectObject
(
hdc
,
get_menu_font
(
FALSE
));
item
->
fState
|=
MF_HILITE
;
MENU_DrawMenuItem
(
menu
->
hWnd
,
hmenu
,
hwndOwner
,
hdc
,
item
,
menu
->
Height
,
!
(
menu
->
wFlags
&
MF_POPUP
),
ODA_DRAWENTIRE
);
ReleaseDC
(
menu
->
hWnd
,
hdc
);
MENU_DrawMenuItem
(
menu
->
hWnd
,
hmenu
,
hwndOwner
,
hdc
,
item
,
!
(
menu
->
wFlags
&
MF_POPUP
),
ODA_DRAWENTIRE
);
ReleaseDC
(
menu
->
hWnd
,
hdc
);
}
if
(
!
item
->
rect
.
top
&&
!
item
->
rect
.
left
&&
!
item
->
rect
.
bottom
&&
!
item
->
rect
.
right
)
item
->
rect
=
rect
;
item
->
rect
=
rect
;
item
->
fState
|=
MF_MOUSESELECT
;
...
...
@@ -4466,10 +4464,8 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFO
}
for
(
i
=
0
;
i
<
lppop
->
nItems
;
i
++
)
{
MENU_DrawMenuItem
(
hwnd
,
hMenu
,
hwnd
,
hDC
,
&
lppop
->
items
[
i
],
lppop
->
Height
,
TRUE
,
ODA_DRAWENTIRE
);
}
MENU_DrawMenuItem
(
hwnd
,
hMenu
,
hwnd
,
hDC
,
&
lppop
->
items
[
i
],
TRUE
,
ODA_DRAWENTIRE
);
retvalue
=
lppop
->
Height
;
END:
...
...
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