mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 10:00:46 +02:00
Qt5: fixed TMainMenu submenus positioning under Wayland. issue #40602
This commit is contained in:
parent
4b6c4e06e3
commit
4b1a81ac7b
@ -16081,6 +16081,14 @@ begin
|
|||||||
Parent := TQtWidget(AParams.WndParent).GetContainerWidget
|
Parent := TQtWidget(AParams.WndParent).GetContainerWidget
|
||||||
else
|
else
|
||||||
Parent := nil;
|
Parent := nil;
|
||||||
|
|
||||||
|
{$IFDEF HASX11}
|
||||||
|
// issue #40602
|
||||||
|
if IsWayland and Assigned(FMenuItem) and FMenuItem.HasParent and not FMenuItem.Parent.HasParent and
|
||||||
|
(FMenuItem.GetParentMenu is TMainMenu) then
|
||||||
|
Parent := TQtMainWindow(Application.MainForm.Handle).MenuBarNeeded.Widget;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
Result := QMenu_create(Parent);
|
Result := QMenu_create(Parent);
|
||||||
FDeleteLater := True;
|
FDeleteLater := True;
|
||||||
FActionHandle := nil;
|
FActionHandle := nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user