From a417bc87d01a7f733cfa72f40dd679b7b5ee449d Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Tue, 10 Nov 2020 19:38:29 +0400 Subject: [PATCH 1/2] Fix parent for PopupMenu submenus to eliminate the setGrabPopup warning on Wayland --- ui/widgets/popup_menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/widgets/popup_menu.cpp b/ui/widgets/popup_menu.cpp index c40ab0f..f97c562 100644 --- a/ui/widgets/popup_menu.cpp +++ b/ui/widgets/popup_menu.cpp @@ -38,7 +38,7 @@ PopupMenu::PopupMenu(QWidget *parent, QMenu *menu, const style::PopupMenu &st) for (auto action : actions()) { if (auto submenu = action->menu()) { - auto it = _submenus.insert(action, new PopupMenu(parentWidget(), submenu, st)); + auto it = _submenus.insert(action, new PopupMenu(this, submenu, st)); it.value()->deleteOnHide(false); } } From 77b6e43b17df43d64354ba7198e6a7695a636627 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 16 Nov 2020 19:37:11 +0300 Subject: [PATCH 2/2] Revert "Fix parent for PopupMenu submenus to eliminate the setGrabPopup warning on Wayland" This reverts commit a417bc87d01a7f733cfa72f40dd679b7b5ee449d. --- ui/widgets/popup_menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/widgets/popup_menu.cpp b/ui/widgets/popup_menu.cpp index f97c562..c40ab0f 100644 --- a/ui/widgets/popup_menu.cpp +++ b/ui/widgets/popup_menu.cpp @@ -38,7 +38,7 @@ PopupMenu::PopupMenu(QWidget *parent, QMenu *menu, const style::PopupMenu &st) for (auto action : actions()) { if (auto submenu = action->menu()) { - auto it = _submenus.insert(action, new PopupMenu(this, submenu, st)); + auto it = _submenus.insert(action, new PopupMenu(parentWidget(), submenu, st)); it.value()->deleteOnHide(false); } }