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
c2734074
Commit
c2734074
authored
Feb 09, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed TrackPopupMenu return value (based on a patch by Andreas
Rosenberg).
parent
1d5e6b67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
menu.c
controls/menu.c
+11
-8
No files found.
controls/menu.c
View file @
c2734074
...
@@ -2639,8 +2639,8 @@ static void MENU_KeyRight( MTRACKER* pmt, UINT wFlags )
...
@@ -2639,8 +2639,8 @@ static void MENU_KeyRight( MTRACKER* pmt, UINT wFlags )
*
*
* Menu tracking code.
* Menu tracking code.
*/
*/
static
INT
MENU_TrackMenu
(
HMENU
hmenu
,
UINT
wFlags
,
INT
x
,
INT
y
,
static
BOOL
MENU_TrackMenu
(
HMENU
hmenu
,
UINT
wFlags
,
INT
x
,
INT
y
,
HWND
hwnd
,
const
RECT
*
lprect
)
HWND
hwnd
,
const
RECT
*
lprect
)
{
{
MSG
msg
;
MSG
msg
;
POPUPMENU
*
menu
;
POPUPMENU
*
menu
;
...
@@ -2661,7 +2661,11 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
...
@@ -2661,7 +2661,11 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
(
lprect
)
?
lprect
->
right
:
0
,
(
lprect
)
?
lprect
->
bottom
:
0
);
(
lprect
)
?
lprect
->
right
:
0
,
(
lprect
)
?
lprect
->
bottom
:
0
);
fEndMenu
=
FALSE
;
fEndMenu
=
FALSE
;
if
(
!
(
menu
=
MENU_GetMenu
(
hmenu
)))
return
FALSE
;
if
(
!
(
menu
=
MENU_GetMenu
(
hmenu
)))
{
SetLastError
(
ERROR_INVALID_MENU_HANDLE
);
return
FALSE
;
}
if
(
wFlags
&
TPM_BUTTONDOWN
)
if
(
wFlags
&
TPM_BUTTONDOWN
)
{
{
...
@@ -2926,7 +2930,9 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
...
@@ -2926,7 +2930,9 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
}
}
/* The return value is only used by TrackPopupMenu */
/* The return value is only used by TrackPopupMenu */
return
((
executedMenuId
!=
-
1
)
?
executedMenuId
:
0
);
if
(
!
(
wFlags
&
TPM_RETURNCMD
))
return
TRUE
;
if
(
executedMenuId
==
-
1
)
executedMenuId
=
0
;
return
executedMenuId
;
}
}
/***********************************************************************
/***********************************************************************
...
@@ -3073,12 +3079,9 @@ BOOL WINAPI TrackPopupMenu( HMENU hMenu, UINT wFlags, INT x, INT y,
...
@@ -3073,12 +3079,9 @@ BOOL WINAPI TrackPopupMenu( HMENU hMenu, UINT wFlags, INT x, INT y,
SendMessageW
(
hWnd
,
WM_INITMENUPOPUP
,
(
WPARAM
)
hMenu
,
0
);
SendMessageW
(
hWnd
,
WM_INITMENUPOPUP
,
(
WPARAM
)
hMenu
,
0
);
if
(
MENU_ShowPopup
(
hWnd
,
hMenu
,
0
,
x
,
y
,
0
,
0
))
if
(
MENU_ShowPopup
(
hWnd
,
hMenu
,
0
,
x
,
y
,
0
,
0
))
ret
=
MENU_TrackMenu
(
hMenu
,
wFlags
|
TPM_POPUPMENU
,
0
,
0
,
hWnd
,
lpRect
);
ret
=
MENU_TrackMenu
(
hMenu
,
wFlags
|
TPM_POPUPMENU
,
0
,
0
,
hWnd
,
lpRect
);
MENU_ExitTracking
(
hWnd
);
MENU_ExitTracking
(
hWnd
);
if
(
(
!
(
wFlags
&
TPM_RETURNCMD
))
&&
(
ret
!=
FALSE
)
)
ret
=
1
;
return
ret
;
return
ret
;
}
}
...
...
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