First mouse event is lost in new modal form shown from MouseDown event
Original Reporter info from Mantis: chronos
-
Reporter name:
Original Reporter info from Mantis: chronos
- Reporter name:
Description:
There is MouseDown handler in Form1 from which new Form2 is shown using ShowModal method. After Form2 is shown then its first MouseDown event is not captured. Second and consecutive events works ok. From user usability perspective it leads to unresponsive form for first mouse click. So user needs to click again after first click has no effect.
Under Windows it works correctly but under Linux/Gtk2 first event is not fired up. It may be limitation of Gtk2 framework but it may be problem in Gtk2 widgetset.
Usually response to click is handled by OnClick or OnMouseUp events. But in this case same functionality is required in OnMouseDown event. So workaround would be to execute ShowModal method from OnMouseUp or OnClick events. But as the behavior between Windows and Gtk2 is different then it should be better fixed. I tried to investigate this little bit but I didn't found cause of this problem.
Steps to reproduce:
Extract and open attached demo. Left click on all three panels OnMouseDown, OnMouseUp and OnClick to show new modal form. In modal form click inside form area and observe captured events in text memo. Execute demo under Windows where everything works ok and under Gtk2 where first mouse click is lost in modal form if it is executed from MouseDown event handler.
Mantis conversion info:
- Mantis ID: 35720
- OS: Linux
- Platform: Linux
- Version: 2.0.2
- Fixed in version: 2.0.10
- Fixed in revision: 63203 (#f48f7cee)