mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-23 09:20:12 +01:00
Merged revision(s) 47339 #8dcc70cd3b from trunk:
Qt: fixed LM_CONTEXTMENU event in case of TQtCustomControl, when eg. form.PopupMenu is assigned, and control.PopupMenu=nil. ........ git-svn-id: branches/fixes_1_4@47361 -
This commit is contained in:
parent
811a1e1a3f
commit
0c5af88a2d
@ -4226,7 +4226,10 @@ begin
|
||||
MousePos := QContextMenuEvent_globalPos(QContextMenuEventH(Event))^;
|
||||
|
||||
Msg.Msg := LM_CONTEXTMENU;
|
||||
Msg.hWnd := HWND(Self);
|
||||
if FOwner <> nil then
|
||||
Msg.hWnd := HWND(FOwner)
|
||||
else
|
||||
Msg.hWnd := HWND(Self);
|
||||
if QContextMenuEvent_reason(QContextMenuEventH(Event)) = QContextMenuEventKeyboard then
|
||||
begin
|
||||
Msg.XPos := -1;
|
||||
@ -4247,6 +4250,10 @@ begin
|
||||
if Assigned(LCLObject.PopupMenu) then
|
||||
QEvent_ignore(Event);
|
||||
SetNoMousePropagation(QWidgetH(Sender), False);
|
||||
if (FOwner <> nil) and
|
||||
((FChildOfComplexWidget = ccwCustomControl) or
|
||||
(FChildOfComplexWidget = ccwScrollingWinControl)) then
|
||||
SetNoMousePropagation(FOwner.Widget, False);
|
||||
end;
|
||||
|
||||
if Result and (csDesigning in LCLObject.ComponentState) then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user