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

Fix blur behind folderview context menus

Breeze has

if (!(widget->testAttribute(Qt::WA_WState_Created) ||
   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:
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
connect(menu, &QMenu::aboutToHide, [menu]() { menu->deleteLater(); });
Supports Markdown
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