Greatly improved scrolling, and simplified the code too. Now scrolling
is done from inside the BMenu::_track() function, and not inside Pulse() anymore. Patch by Lucasz Zemczak git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19653 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1270,11 +1270,17 @@ BMenu::_track(int *action, bigtime_t trackTime, long start)
|
||||
BPoint location;
|
||||
ulong buttons;
|
||||
GetMouse(&location, &buttons, true);
|
||||
|
||||
|
||||
BMenuWindow *window(static_cast<BMenuWindow *>(Window()));
|
||||
|
||||
BPoint screenLocation = ConvertToScreen(location);
|
||||
item = HitTestItems(location, B_ORIGIN);
|
||||
if (item != NULL)
|
||||
_UpdateStateOpenSelect(item, openTime, closeTime);
|
||||
if (window->CheckForScrolling(screenLocation)) {
|
||||
item = NULL;
|
||||
} else {
|
||||
item = HitTestItems(location, B_ORIGIN);
|
||||
if (item != NULL)
|
||||
_UpdateStateOpenSelect(item, openTime, closeTime);
|
||||
}
|
||||
|
||||
// Track the submenu
|
||||
if (OverSubmenu(fSelected, screenLocation)) {
|
||||
|
||||
Reference in New Issue
Block a user