Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
743b5730
Commit
743b5730
authored
Aug 18, 2008
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Implement TPM_*ALIGN flags.
parent
5b3b540d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
menu.c
dlls/user32/menu.c
+10
-3
No files found.
dlls/user32/menu.c
View file @
743b5730
...
...
@@ -1767,7 +1767,7 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd,
*
* Display a popup menu.
*/
static
BOOL
MENU_ShowPopup
(
HWND
hwndOwner
,
HMENU
hmenu
,
UINT
id
,
static
BOOL
MENU_ShowPopup
(
HWND
hwndOwner
,
HMENU
hmenu
,
UINT
id
,
UINT
flags
,
INT
x
,
INT
y
,
INT
xanchor
,
INT
yanchor
)
{
POPUPMENU
*
menu
;
...
...
@@ -1803,6 +1803,13 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
monitor
=
MonitorFromPoint
(
pt
,
MONITOR_DEFAULTTONEAREST
);
info
.
cbSize
=
sizeof
(
info
);
GetMonitorInfoW
(
monitor
,
&
info
);
if
(
flags
&
TPM_RIGHTALIGN
)
x
-=
width
;
if
(
flags
&
TPM_CENTERALIGN
)
x
-=
width
/
2
;
if
(
flags
&
TPM_BOTTOMALIGN
)
y
-=
height
;
if
(
flags
&
TPM_VCENTERALIGN
)
y
-=
height
/
2
;
if
(
x
+
width
>
info
.
rcWork
.
right
)
{
if
(
xanchor
&&
x
>=
width
-
xanchor
)
...
...
@@ -2390,7 +2397,7 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu,
}
}
MENU_ShowPopup
(
hwndOwner
,
item
->
hSubMenu
,
menu
->
FocusedItem
,
MENU_ShowPopup
(
hwndOwner
,
item
->
hSubMenu
,
menu
->
FocusedItem
,
0
,
rect
.
left
,
rect
.
top
,
rect
.
right
,
rect
.
bottom
);
if
(
selectFirst
)
MENU_MoveSelection
(
hwndOwner
,
item
->
hSubMenu
,
ITEM_NEXT
);
...
...
@@ -3410,7 +3417,7 @@ BOOL WINAPI TrackPopupMenu( HMENU hMenu, UINT wFlags, INT x, INT y,
if
(
!
(
wFlags
&
TPM_NONOTIFY
))
SendMessageW
(
hWnd
,
WM_INITMENUPOPUP
,
(
WPARAM
)
hMenu
,
0
);
if
(
MENU_ShowPopup
(
hWnd
,
hMenu
,
0
,
x
,
y
,
0
,
0
))
if
(
MENU_ShowPopup
(
hWnd
,
hMenu
,
0
,
wFlags
,
x
,
y
,
0
,
0
))
ret
=
MENU_TrackMenu
(
hMenu
,
wFlags
|
TPM_POPUPMENU
,
0
,
0
,
hWnd
,
lpRect
);
MENU_ExitTracking
(
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