From 3092f78b128cfcb01bd49165e1dd0f4ca8e5e621 Mon Sep 17 00:00:00 2001 From: graemeg Date: Sun, 28 Oct 2007 12:25:54 +0000 Subject: * Fixed the menu click issue under Windows. * Added a new DumpStack procedure to help programmers debug there code. --- src/corelib/fpgfx.pas | 8 ++++++++ src/corelib/gfx_popupwindow.pas | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/corelib') 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; -- cgit v1.2.3-70-g09d2