09.01.2011 21:23, Hans-Peter Diettrich wrote:
So much about theory. My question was about reasons for using mouse
capture in LCL components, in detail the csCaptureMouse control state
flag. So far its only reasonable use is in a TSplitter, to allow for
fake moves (user feedback) and to obtain the final position of the splitter.
I tried to reduce usage of csCaptureMouse in LCL components. It is used much less than a year before.

or external event stops your mouse capture. Such external event can be for example switching task or another window require a mouse capture.

The mouse is a shared resource, managed by the OS. I doubt that the
mouse capture can be stolen by other processes. I.e. the owner of the
mouse capture must release the capture, at some time (usually when the
mouse button is released).
No, mouse capture can be stolen by any process.

DragManager must handle the CaptureChanged event in order to understand that capture it has was requested by other control and therefore it must stop the drag operation.

NACK. The LCL components implement some weird behaviour, that can result
in many changes of the mouse capture at the begin of a drag operation.
These nearly unpredictable changes often cause the DragManager to stop
dragging, in the current implementation. Once a control is dragged, there is no reason why the mouse capture should change until the end of the operation. When a control decides that dragging should stop, it should call DragManager.DragStop, everything else is insane.
As result you will get a situation when application thinks that it dragges something but capture is not owned by the drag manager so mouse events are not tracked by it.

Best regards,
Paul Ishenin

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to