Double click events call twice if the event handling takes more than 250 millisecond
Original Reporter info from Mantis: Maxerist
-
Reporter name: Max Vlasov
Original Reporter info from Mantis: Maxerist
- Reporter name: Max Vlasov
Description:
On GTK2 if the handler of the double click event spend more than 200 milliseconds to handle the event, after that another event will come.
This was revealed while fixing issue #19657 (closed) (double clicking in component palette) and it is possibly a GTK2 bug, and reporting here has two goals:
- To be sure this is indeed GTK2 bug
- To decide what lcl can do to work around this "bug" (if it's confirmed)
Additional information:
I'm reposting steps from #19657 (closed)
it's easily reproducable with the following code
Place an Edit(or any other control) and ListBox and on double-click in this control do
begin
ListBox1.Items.Add('dbl');
Sleep(300);
end;
you will get two items on any double click. But if you change 300 to 200, the bug is gone. Probably the code in GTK that analyzes the time gets another Up after this delay and thinks it's another double-click. I found some mentioning of this 250 milliseconds gtk2 double-click delay in the web in other context.
Mantis conversion info:
- Mantis ID: 19753
- Version: 0.9.30.1 (SVN)
- Fixed in revision: r31737 (#c48e8404)
- Monitored by: » Maxerist (Max Vlasov)