diff options
-rw-r--r-- | src/gui/fpg_menu.pas | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/fpg_menu.pas b/src/gui/fpg_menu.pas index 91db5992..ee345927 100644 --- a/src/gui/fpg_menu.pas +++ b/src/gui/fpg_menu.pas @@ -417,6 +417,8 @@ begin inherited HandleMouseMove(x, y, btnstate, shiftstate); newf := CalcMouseCol(x); + if newf = VisibleCount then + Exit; //mouse points over the last item // process menu options if mnuo_nofollowingmouse in FMenuOptions then @@ -467,6 +469,9 @@ begin Exit; // We have no menu items in MainMenu. newf := CalcMouseCol(x); + if newf = VisibleCount then + Exit; //mouse points over the last item + if (FLastItemClicked <> -1) and (FLastItemClicked <> newf) then begin // do nothing @@ -660,6 +665,8 @@ begin inc(w, ItemWidth(VisibleItem(n))); inc(n); end; + if x > w then + Result := n; end; function TfpgMenuBar.GetItemPosX(index: integer): integer; |