summaryrefslogtreecommitdiff
path: root/gfx/x11
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@users.sourceforge.net>2007-03-07 10:14:45 +0000
committerGraeme Geldenhuys <graemeg@users.sourceforge.net>2007-03-07 10:14:45 +0000
commita78f65fa1c1dc35922205e7cf88ac431aee59bb6 (patch)
tree9d39771e1138d8efec2d267ff3f3de2e0709185f /gfx/x11
parent835b1aaa20d62437be9f2d552d0e2eebc9256286 (diff)
downloadfpGUI-a78f65fa1c1dc35922205e7cf88ac431aee59bb6.tar.xz
* Added more debug events.
* Implemented a very basic TPopupMenu * Modified the WidgetTest demo to show the basic popup menu (still needs work).
Diffstat (limited to 'gfx/x11')
-rw-r--r--gfx/x11/gfx_x11.pas13
1 files changed, 8 insertions, 5 deletions
diff --git a/gfx/x11/gfx_x11.pas b/gfx/x11/gfx_x11.pas
index 4bd5a4f0..06b41c9c 100644
--- a/gfx/x11/gfx_x11.pas
+++ b/gfx/x11/gfx_x11.pas
@@ -1057,10 +1057,12 @@ begin
// According to a comment in X.h, the valid event types start with 2!
if XEvent._type >= 2 then
begin
+// WriteLn('=== Received X event "', GetXEventName(XEvent._type), '"');
WindowEntry := FindWindowByXID(XEvent.XAny.Window);
if not Assigned(WindowEntry) then
begin
+// writeln(Format('==unknown== Window ID = %d', [XEvent.XAny.Window]));
WriteLn('fpGFX/X11: Received X event "', GetXEventName(XEvent._type), '" for unknown window');
continue;
end;
@@ -1142,6 +1144,7 @@ begin
end;
X.MapNotify:
begin
+// writeln(Format('==MapNotify== Window ID = %d', [XEvent.XAny.Window]));
Event.EventType := etShow;
WindowEntry.ProcessEvent(Event);
end;
@@ -1411,15 +1414,15 @@ begin
if Assigned(OnClose) then
OnClose(Self);
- GFApplication.DirtyList.ClearQueueForWindow(Self);
-
- XDestroyWindow(GFApplication.Handle, Handle);
Canvas.Free;
+ if FCurCursorHandle <> 0 then
+ XFreeCursor(GFApplication.Handle, FCurCursorHandle);
+
+ GFApplication.DirtyList.ClearQueueForWindow(Self);
GFApplication.Forms.Remove(Self);
- if FCurCursorHandle <> 0 then
- XFreeCursor(GFApplication.Handle, FCurCursorHandle);
+ XDestroyWindow(GFApplication.Handle, Handle);
inherited Destroy;
end;