summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-21 15:07:21 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-21 15:07:21 +0000
commit95169d06036e38e00d20b85fa6ca8c9ce2b88cb5 (patch)
treeac8be9c98381e109010c28afcfee91a0d137736e /src/corelib
parent7d0c8c60a7ff5e6f0b25a99073ca034ef028d798 (diff)
downloadfpGUI-95169d06036e38e00d20b85fa6ca8c9ce2b88cb5.tar.xz
X11: The start of implementing a Double Click event.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/gfx_widget.pas3
-rw-r--r--src/corelib/x11/gfx_x11.pas8
2 files changed, 10 insertions, 1 deletions
diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas
index c2b60c06..51e98178 100644
--- a/src/corelib/gfx_widget.pas
+++ b/src/corelib/gfx_widget.pas
@@ -340,7 +340,8 @@ procedure TfpgWidget.MsgDoubleClick(var msg: TfpgMessageRec);
begin
// If we don't generate a mouse down, we get a rapid click
// delay under Windows.
-// HandleLMouseDown(msg.Params.mouse.x, msg.Params.mouse.y, msg.Params.mouse.shiftstate);
+ HandleLMouseDown(msg.Params.mouse.x, msg.Params.mouse.y, msg.Params.mouse.shiftstate);
+
HandleDoubleClick(msg.Params.mouse.x, msg.Params.mouse.y,
msg.Params.mouse.Buttons, msg.Params.mouse.shiftstate);
if Assigned(FOnDoubleClick) then
diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas
index 63cce392..250ebf7f 100644
--- a/src/corelib/x11/gfx_x11.pas
+++ b/src/corelib/x11/gfx_x11.pas
@@ -206,6 +206,14 @@ uses
var
xapplication: TfpgApplication;
+{ Double click support }
+const
+ DOUBLECLICK_MS = 200; // the max time between left-clicks for doubleclick
+var
+ LastClickWindow: TfpgWinHandle;
+ LastWinClickTime: longword;
+
+
//const
// map X11 event types to custom event types
// MSG_SCROLL = 65;