Set a transient parent for SNI context menus

Summary:
Those had no transient parent set, so they got displayed somewhere, most of the
time on the wrong screen.

Test Plan:
Works fine for spotify and kteatime now, but certain applications
which trigger a LayoutChanged signal on the opened event have a Y offset.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D11584
wilder-5.14
Fabian Vogt 8 years ago
parent f449adc199
commit cf2d64fa97
  1. 3
      applets/systemtray/systemtray.cpp

@ -293,8 +293,9 @@ void SystemTray::showStatusNotifierContextMenu(KJob *job, QQuickItem *statusNoti
}
}
KAcceleratorManager::manage(menu);
menu->winId();
menu->windowHandle()->setTransientParent(statusNotifierIcon->window());
menu->popup(QPoint(x, y));
}
}

Loading…
Cancel
Save