Module: wine
Branch: refs/heads/master
Commit: 6a74137d70608b8c9677c9bcf626f40d04519117
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=6a74137d70608b8c9677c9b…
Author: Michael Kaufmann <hallo(a)michael-kaufmann.ch>
Date: Fri Jun 2 00:07:37 2006 +0200
user32: Popup menu position fixes.
- Open large popup menus on the other side only if there's enough space
- Open popup menus such that the y position of the first item in the
popup menu is the same as the y position of the focused menu item.
---
dlls/user/menu.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/user/menu.c b/dlls/user/menu.c
index a9cd87e..4b10e7f 100644
--- a/dlls/user/menu.c
+++ b/dlls/user/menu.c
@@ -1796,8 +1796,9 @@ static BOOL MENU_ShowPopup( HWND hwndOwn
if( x + width > GetSystemMetrics(SM_CXSCREEN ))
{
- if( xanchor )
+ if( xanchor && x >= width - xanchor )
x -= width - xanchor;
+
if( x + width > GetSystemMetrics(SM_CXSCREEN))
x = GetSystemMetrics(SM_CXSCREEN) - width;
}
@@ -1805,8 +1806,9 @@ static BOOL MENU_ShowPopup( HWND hwndOwn
if( y + height > GetSystemMetrics(SM_CYSCREEN ))
{
- if( yanchor )
+ if( yanchor && y >= height + yanchor )
y -= height + yanchor;
+
if( y + height > GetSystemMetrics(SM_CYSCREEN ))
y = GetSystemMetrics(SM_CYSCREEN) - height;
}
@@ -2339,10 +2341,14 @@ static HMENU MENU_ShowSubPopup( HWND hwn
RECT rc = item->rect;
MENU_AdjustMenuItemRect(menu, &rc);
+
+ /* The first item in the popup menu has to be at the
+ same y position as the focused menu item */
rect.left += rc.right - GetSystemMetrics(SM_CXBORDER);
- rect.top += rc.top;
+ rect.top += rc.top - MENU_TOP_MARGIN;
rect.right = rc.left - rc.right + GetSystemMetrics(SM_CXBORDER);
- rect.bottom = rc.top - rc.bottom;
+ rect.bottom = rc.top - rc.bottom - MENU_TOP_MARGIN
+ - MENU_BOTTOM_MARGIN - GetSystemMetrics(SM_CYBORDER);
}
else
{
Module: wine
Branch: refs/heads/master
Commit: 2827e7bbb67576ce69820bc825c7fbfd23bbde70
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=2827e7bbb67576ce69820bc…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com>
Date: Fri Jun 2 01:40:14 2006 +0900
user32: Replace PeekMessage loops in the PeekMessage test by explicit calls.
Replace all 'while (PeekMessage()) DispatchMessage();' loops in the
PeekMessage test by explicit calls to PeekMessage(), check queue
status and processed messages after each call to see what is going on
behind the scene.
---
dlls/user/tests/msg.c | 186 +++++++++++++++++++++++++++++++++++++++----------
1 files changed, 147 insertions(+), 39 deletions(-)
Diff: http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=2827e7bbb67576ce698…