View Issue Details

IDProjectCategoryView StatusLast Update
0015912LazarusLCLpublic2010-07-15 22:34
ReporterVladimir ZhirovAssigned ToPaul Ishenin 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target Version1.0.0Fixed in Version0.9.29 (SVN) 
Summary0015912: Inconsistent context menu handling across widgetsets
DescriptionCurrently 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 InformationI 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.
TagsNo tags attached.
Fixed in Revision26637,26638,26641,26642,26644
LazTarget1.0
WidgetsetGTK 2, Win32/Win64, QT
Attached Files

Activities

Paul Ishenin

2010-07-14 15:24

manager   ~0039326

Now all the LCL handling is concentrated in LM_CONTEXTMENU message handler. Win32 and WinCE does not block this message anymore, qt passes it both on keyboard and mouse event and propagate event thurther if handler skiped it, gtk2 also tries to mimic win32 behavior, carbon tries too.

Please test and close if ok.

Vladimir Zhirov

2010-07-15 22:33

reporter   ~0039362

Tested under Windows using win32/qt/gtk2 widgesets: context menu related events seem to work the same way.

Thanks, Paul.

Issue History

Date Modified Username Field Change
2010-03-07 21:32 Vladimir Zhirov New Issue
2010-03-07 21:32 Vladimir Zhirov Widgetset => GTK 2, Win32/Win64, QT
2010-03-12 15:50 Vincent Snijders LazTarget => 1.0
2010-03-12 15:50 Vincent Snijders Status new => acknowledged
2010-03-12 15:50 Vincent Snijders Target Version => 1.0.0
2010-07-14 15:24 Paul Ishenin Fixed in Revision => 26637,26638,26641,26642,26644
2010-07-14 15:24 Paul Ishenin Status acknowledged => resolved
2010-07-14 15:24 Paul Ishenin Fixed in Version => 0.9.29 (SVN)
2010-07-14 15:24 Paul Ishenin Resolution open => fixed
2010-07-14 15:24 Paul Ishenin Assigned To => Paul Ishenin
2010-07-14 15:24 Paul Ishenin Note Added: 0039326
2010-07-15 22:33 Vladimir Zhirov Note Added: 0039362
2010-07-15 22:34 Vladimir Zhirov Status resolved => closed