Always show a submenu on its parent menu's screen
QWidget::screen() was added inbb10b455a863a1and this is another good use for it (in 5.15 and newer). Amendsc068edcecfPick-to: 5.15 Fixes: QTCREATORBUG-24195 Task-number: QTBUG-76162 Change-Id: Ifaafe9b45fafaae220da54bbf3bc7a568e7953f9 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
parent
4ab5432081
commit
0a2e3ce85c
|
|
@ -2395,7 +2395,7 @@ void QMenuPrivate::popup(const QPoint &p, QAction *atAction, PositionFunction po
|
|||
} else if (QMenu *parentMenu = qobject_cast<QMenu *>(parent)) {
|
||||
// a submenu is always opened from an open parent menu,
|
||||
// so show it on the same screen where the parent is. (QTBUG-76162)
|
||||
if (setScreen(QMenuPrivate::get(parentMenu)->windowHandle()->screen()))
|
||||
if (setScreen(parentMenu->screen()))
|
||||
itemsDirty = true;
|
||||
screenSet = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue