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
906db769
Commit
906db769
authored
Mar 14, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Skip menu loop for empty popup menus.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a9bff001
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
menu.c
dlls/user32/menu.c
+3
-0
menu.c
dlls/user32/tests/menu.c
+7
-7
msg.c
dlls/user32/tests/msg.c
+1
-1
No files found.
dlls/user32/menu.c
View file @
906db769
...
...
@@ -3033,6 +3033,9 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
if
(
!
(
wFlags
&
TPM_POPUPMENU
))
set_capture_window
(
mt
.
hOwnerWnd
,
GUI_INMENUMODE
,
NULL
);
if
((
wFlags
&
TPM_POPUPMENU
)
&&
menu
->
nItems
==
0
)
return
FALSE
;
__TRY
while
(
!
fEndMenu
)
{
menu
=
MENU_GetMenu
(
mt
.
hCurrentMenu
);
...
...
dlls/user32/tests/menu.c
View file @
906db769
...
...
@@ -3820,25 +3820,25 @@ static void test_emptypopup(void)
ok
(
gflag_initmenupopup
==
1
,
"got %i
\n
"
,
gflag_initmenupopup
);
ok
(
gflag_entermenuloop
==
1
,
"got %i
\n
"
,
gflag_entermenuloop
);
ok
(
gflag_initmenu
==
1
,
"got %i
\n
"
,
gflag_initmenu
);
todo_wine
ok
(
gflag_enteridle
==
0
,
"got %i
\n
"
,
gflag_initmenu
);
ok
(
gflag_enteridle
==
0
,
"got %i
\n
"
,
gflag_initmenu
);
todo_wine
ok
(
selectitem_wp
==
0xdeadbeef
,
"got %lx
\n
"
,
selectitem_wp
);
todo_wine
ok
(
selectitem_lp
==
0xdeadbeef
,
"got %lx
\n
"
,
selectitem_lp
);
ok
(
selectitem_wp
==
0xdeadbeef
,
"got %lx
\n
"
,
selectitem_wp
);
ok
(
selectitem_lp
==
0xdeadbeef
,
"got %lx
\n
"
,
selectitem_lp
);
gflag_initmenupopup
=
gflag_entermenuloop
=
gflag_initmenu
=
gflag_enteridle
=
0
;
selectitem_wp
=
0xdeadbeef
;
selectitem_lp
=
0xdeadbeef
;
ret
=
TrackPopupMenu
(
hmenu
,
0
,
100
,
100
,
0
,
hwnd
,
NULL
);
todo_wine
ok
(
ret
==
0
,
"got %i
\n
"
,
ret
);
ok
(
ret
==
0
,
"got %i
\n
"
,
ret
);
ok
(
gflag_initmenupopup
==
1
,
"got %i
\n
"
,
gflag_initmenupopup
);
ok
(
gflag_entermenuloop
==
1
,
"got %i
\n
"
,
gflag_entermenuloop
);
ok
(
gflag_initmenu
==
1
,
"got %i
\n
"
,
gflag_initmenu
);
todo_wine
ok
(
gflag_enteridle
==
0
,
"got %i
\n
"
,
gflag_initmenu
);
ok
(
gflag_enteridle
==
0
,
"got %i
\n
"
,
gflag_initmenu
);
todo_wine
ok
(
selectitem_wp
==
0xdeadbeef
,
"got %lx
\n
"
,
selectitem_wp
);
todo_wine
ok
(
selectitem_lp
==
0xdeadbeef
,
"got %lx
\n
"
,
selectitem_lp
);
ok
(
selectitem_wp
==
0xdeadbeef
,
"got %lx
\n
"
,
selectitem_wp
);
ok
(
selectitem_lp
==
0xdeadbeef
,
"got %lx
\n
"
,
selectitem_lp
);
SetWindowLongPtrA
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
menu_fill_in_init
);
...
...
dlls/user32/tests/msg.c
View file @
906db769
...
...
@@ -15373,7 +15373,7 @@ static void test_TrackPopupMenuEmpty(void)
flush_sequence
();
ret
=
TrackPopupMenu
(
hpopupmenu
,
0
,
100
,
100
,
0
,
hwnd
,
NULL
);
ok_sequence
(
WmTrackPopupMenuEmpty
,
"TrackPopupMenuEmpty"
,
TRUE
);
todo_wine
ok
(
ret
==
0
,
"TrackPopupMenu succeeded
\n
"
);
ok
(
ret
==
0
,
"TrackPopupMenu succeeded
\n
"
);
DestroyMenu
(
hpopupmenu
);
DestroyWindow
(
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