Commit 42a74c9a authored by David Edmundson's avatar David Edmundson

Fix blur behind folderview context menus

Summary:
Breeze has

if (!(widget->testAttribute(Qt::WA_WState_Created) ||
widget->internalWinId()))
   KWindowSystem::blur(widget->winId(), ...)

which makes sense as the style should not be creating surfaces in polish
and I don't want to remove it.

This is problematic with QMenu::polish which has a subtle behavioural
change compared to QMenu::exec in that it calls ensurePolish before
creating the surface.

Plasma::ContainmentInterface accidentally has this workaround already
for parent window setting.

BUG: 395262

Test Plan:
Right clicked on desktop icon
Looked amazing

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: hein, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14174
parent 6991252c
......@@ -1784,6 +1784,7 @@ void FolderModel::openContextMenu(QQuickItem *visualParent, Qt::KeyboardModifier
} else {
m_menuPosition = QCursor::pos();
}
menu->winId(); //force surface creation before ensurePolish call in menu::Popup which happens before show
menu->popup(m_menuPosition);
connect(menu, &QMenu::aboutToHide, [menu]() { menu->deleteLater(); });
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment