Summary:
According to my testing this bug occurs because Qcursor::pos() does not work as expected under wayland on a secondary screen, then it returns inaccurate data.
This could hide bugs elsewhere.
BUG: 404799
FIXED-IN: 19.04.0
Test Plan:
Under Wayland test the context menu on both screens.
Do the same under Xorg.
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: elvisangelaccio, ngraham, nicolasfella, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D19535
void InformationPanel::contextMenuEvent(QContextMenuEvent* event)
{
// TODO: Move code from InformationPanelContent::configureSettings() here
- m_content->configureSettings(customContextMenuActions());
+ m_content->configureSettings(customContextMenuActions(), event->globalPos());
Panel::contextMenuEvent(event);
}
return QWidget::eventFilter(obj, event);
}
-void InformationPanelContent::configureSettings(const QList<QAction*>& customContextMenuActions)
+void InformationPanelContent::configureSettings(const QList<QAction*>& customContextMenuActions, const QPointF& pos)
{
QMenu popup(this);
// Open the popup and adjust the settings for the
// selected action.
- QAction* action = popup.exec(QCursor::pos());
+ QAction* action = popup.exec(pos.toPoint());
if (!action) {
return;
}
*
* TODO: Move this code to the class InformationPanel
*/
- void configureSettings(const QList<QAction*>& customContextMenuActions);
+ void configureSettings(const QList<QAction*>& customContextMenuActions, const QPointF& pos);
signals:
void urlActivated( const QUrl& url );