diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/fpgfx.pas | 8 | ||||
-rw-r--r-- | src/corelib/gfx_popupwindow.pas | 2 | ||||
-rw-r--r-- | src/gui/gui_menu.pas | 14 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/corelib/fpgfx.pas b/src/corelib/fpgfx.pas index c2c64cfe..e67989b4 100644 --- a/src/corelib/fpgfx.pas +++ b/src/corelib/fpgfx.pas @@ -284,6 +284,8 @@ function fpgRect(ALeft, ATop, AWidth, AHeight: integer): TfpgRect; // Debug rountines procedure PrintRect(var Rect: TRect); procedure PrintRect(var Rect: TfpgRect); +procedure DumpStack; + implementation @@ -459,6 +461,12 @@ begin ' bottom=', Rect.Bottom, ' width=', Rect.Width, ' height=', Rect.Height); end; +procedure DumpStack; +begin + writeln(' Stack trace:'); + Dump_Stack(StdOut, get_frame); +end; + { TfpgTimer } procedure TfpgTimer.SetEnabled(const AValue: boolean); diff --git a/src/corelib/gfx_popupwindow.pas b/src/corelib/gfx_popupwindow.pas index ca6c0a42..2ce499da 100644 --- a/src/corelib/gfx_popupwindow.pas +++ b/src/corelib/gfx_popupwindow.pas @@ -224,8 +224,8 @@ end; procedure TfpgPopupWindow.Close; begin - PopupListRemove(self); HandleHide; + PopupListRemove(self); end; diff --git a/src/gui/gui_menu.pas b/src/gui/gui_menu.pas index 58aacda6..eab5e6d6 100644 --- a/src/gui/gui_menu.pas +++ b/src/gui/gui_menu.pas @@ -100,7 +100,7 @@ type FItems: TList; FFocusItem: integer; procedure HandleMouseMove(x, y: integer; btnstate: word; shiftstate: TShiftState); override; - procedure HandleLMouseUp(x, y: integer; shiftstate: TShiftState); override; + procedure HandleLMouseDown(x, y: integer; shiftstate: TShiftState); override; procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override; procedure HandlePaint; override; procedure HandleShow; override; @@ -567,11 +567,11 @@ var begin // Close all previous popups for n := 1 to VisibleCount do - with VisibleItem(n) do - begin - if (SubMenu <> nil) and (SubMenu.HasHandle) then - SubMenu.Close; - end; + with VisibleItem(n) do + begin + if (SubMenu <> nil) and (SubMenu.HasHandle) then + SubMenu.Close; + end; end; function TfpgMenuBar.MenuFocused: boolean; @@ -722,7 +722,7 @@ begin // repaint; end; -procedure TfpgPopupMenu.HandleLMouseUp(x, y: integer; shiftstate: TShiftState); +procedure TfpgPopupMenu.HandleLMouseDown(x, y: integer; shiftstate: TShiftState); var newf: integer; mi: TfpgMenuItem; |