[Lazarus] Mouse button quirks
lazarus at mfriebe.de
Wed Jun 24 18:52:36 CEST 2009
not much of a complete answer. (I am on the run, and I havn't got full
But it' something to do with Mousecaptur (afaik).
And yes they differ somehow: http://bugs.freepascal.org/view.php?id=13878
Hans-Peter Diettrich wrote:
> Now that I've improved the handling of splitters in a dock site, I
> again came across some weird behaviour of the LCL, depending on the
> widgetset :-(
> To reproduce:
> 1. Run examples/dockmanager/easytree/easydocking.
> 2. Dock one or more controls into the dock site.
> 3. Press (and hold) the left mouse button over the dockzone header of
> a docked control.
> 4. Move the mouse around.
> Now you'll find the control (associated with the header) being dragged
> with the gtk2 widgetset, but with the win32 widgetset nothing will
> happen at all, and the whole application becomes unresponsive :-(
> Can somebody explain what will happen when the mouse is pressed over
> one control (or menu entry), and is released over a different control?
> On the LButtonDown message the csLButtonDown flag is set in the
> control's ControlState, but how is this flag cleared later? It
> possibly will never be cleared, when the BeginDrag method of a
> *different* control is invoked?
> IMO the Delphi control model is flawed, when every control remembers
> the mouse button states itself. IMO the position of a button-down and
> the affected control should be stored in a unique place, e.g. in the
> TMouse object. Then TMouse can handle all mouse moves and button
> events, and will notify the controls only of definite events, like
> Clicks. Then also the (immediate or delayed) begin of a dragging
> operation can be determined and handled properly in the Mouse object.
> The same for a mouse capture: it should be handled in one place (again
> in the Mouse object), so that no control will ever have to handle
> captured events itself, when instead the events have to be handled by
> the capturing control, or by the DragManager.
> Or did I miss something?
> Of course it won't be a good idea to introduce such big changes into
> the pending release, but IMO the following version should have a less
> complicated, more stable, and less widgetset-dependent handling of
> mouse events.
More information about the Lazarus