summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-10-28 12:25:54 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-10-28 12:25:54 +0000
commit3092f78b128cfcb01bd49165e1dd0f4ca8e5e621 (patch)
tree4627d525531d77ddc9f84a30cc7ae3cee720c69d /src/corelib
parent16f3f057a567b3fc539ed55521e2996b26bcb2c4 (diff)
downloadfpGUI-3092f78b128cfcb01bd49165e1dd0f4ca8e5e621.tar.xz
* Fixed the menu click issue under Windows.
* Added a new DumpStack procedure to help programmers debug there code.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpgfx.pas8
-rw-r--r--src/corelib/gfx_popupwindow.pas2
2 files changed, 9 insertions, 1 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;