diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-21 15:07:21 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-21 15:07:21 +0000 |
commit | 95169d06036e38e00d20b85fa6ca8c9ce2b88cb5 (patch) | |
tree | ac8be9c98381e109010c28afcfee91a0d137736e /src/corelib | |
parent | 7d0c8c60a7ff5e6f0b25a99073ca034ef028d798 (diff) | |
download | fpGUI-95169d06036e38e00d20b85fa6ca8c9ce2b88cb5.tar.xz |
X11: The start of implementing a Double Click event.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/gfx_widget.pas | 3 | ||||
-rw-r--r-- | src/corelib/x11/gfx_x11.pas | 8 |
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; |