Inconsistent context menu handling across widgetsets
Original Reporter info from Mantis: Vladimir
-
Reporter name: Vladimir Zhirov
Original Reporter info from Mantis: Vladimir
- Reporter name: Vladimir Zhirov
Description:
Currently context menu handling (LM_CONTEXTMENU messages) is inconsistent across widgetsets:
Win32 widgetset blocks context menu events coming from mouse and passes context menu events coming from keyboard to widgetset independent part of LCL (Core LCL to be short). See win32callback.inc around line 2024.
Core LCL is tied to Win32 widgeset behaviour. It generates additional LM_CONTEXTMENU message on right mouse button up event. See include\control.inc, TControl.WMRButtonUp around line 2209.
Qt widgetset does not seem to handle context menu events coming from keyboard and sends context menu events coming from mouse to Core LCL. Thus we have two LM_CONTEXTMENU messages when using Qt widgetset, one coming from Qt itself and one coming from Core LCL. See qtwidgets.pas around line 2865.
GTK2 widgetset somehow does not cause duplicate events like Qt, but it also seem to pass all context menu events to Core LCL.
Additional information:
I believe even comments on this issue from core developers would help a lot. Once we have clear instructions like
- "Move Win32 specific code out of Core LCL to Win32 widgetset", or
- "Adjust GTK2 and Qt widgetsets to behave as Core LCL expects them to behave", or whatever else, it will be easier for anyone to provide appropriate patches. For now it is unclear what should be done, at least for me.