mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 01:49:25 +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
|
||||
else
|
||||
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);
|
||||
FDeleteLater := True;
|
||||
FActionHandle := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user