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
1d499228
Commit
1d499228
authored
Mar 30, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Mar 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Disable scrolling for multi-column menus.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d4544f7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
menu.c
dlls/user32/menu.c
+12
-6
No files found.
dlls/user32/menu.c
View file @
1d499228
...
...
@@ -1159,7 +1159,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
MENUITEM
*
lpitem
;
HDC
hdc
;
UINT
start
,
i
;
BOOL
textandbmp
=
FALSE
;
BOOL
textandbmp
=
FALSE
,
multi_col
=
FALSE
;
int
orgX
,
orgY
,
maxTab
,
maxTabWidth
,
maxHeight
;
lppop
->
Width
=
lppop
->
Height
=
0
;
...
...
@@ -1186,8 +1186,11 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
/* Parse items until column break or end of menu */
for
(
i
=
start
;
i
<
lppop
->
nItems
;
i
++
,
lpitem
++
)
{
if
((
i
!=
start
)
&&
(
lpitem
->
fType
&
(
MF_MENUBREAK
|
MF_MENUBARBREAK
)))
break
;
if
(
lpitem
->
fType
&
(
MF_MENUBREAK
|
MF_MENUBARBREAK
))
{
multi_col
=
TRUE
;
if
(
i
!=
start
)
break
;
}
MENU_CalcItemSize
(
hdc
,
lpitem
,
lppop
->
hwndOwner
,
orgX
,
orgY
,
FALSE
,
lppop
);
lppop
->
items_rect
.
right
=
max
(
lppop
->
items_rect
.
right
,
lpitem
->
rect
.
right
);
...
...
@@ -1231,10 +1234,13 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
if
(
lppop
->
Height
>=
maxHeight
)
{
lppop
->
Height
=
maxHeight
;
lppop
->
bScrolling
=
!
multi_col
;
/* When the scroll arrows are present, don't add the top/bottom margin as well */
lppop
->
items_rect
.
top
+=
get_scroll_arrow_height
(
lppop
)
-
MENU_MARGIN
;
lppop
->
items_rect
.
bottom
=
lppop
->
Height
-
get_scroll_arrow_height
(
lppop
);
lppop
->
bScrolling
=
TRUE
;
if
(
lppop
->
bScrolling
)
{
lppop
->
items_rect
.
top
=
get_scroll_arrow_height
(
lppop
);
lppop
->
items_rect
.
bottom
=
lppop
->
Height
-
get_scroll_arrow_height
(
lppop
);
}
}
else
{
...
...
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