From c54a5b83804c00474d141b485b752a7c54169ebf Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 12 Aug 2020 13:21:42 +0200 Subject: Introduce QWidget::setScreen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follows the QWindow semantics, and is a replacement for creating a QWidget with a QDesktopScreenWidget as the parent. We can now remove much of the special handling of QDesktopWidget and the Qt::Desktop window type, and get rid of QDesktopScreenWidget. Add a manual test that allows local testing. Our CI environments only have a single screen, and no multi-head display server setup which is the primary case where QWidget::setScreen is interesting. For the more common case of a virtual desktop, QWidget::setScreen has no real impact (just as QWindow::setScreen doesn't). Change-Id: Id0099e069d316741bacd8c795c396ccad37be297 Fixes: QTBUG-85483 Reviewed-by: Tor Arne Vestbø --- src/widgets/widgets/qmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets/qmenu.cpp') diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 74420ecb2c..9528be17b7 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -2377,7 +2377,7 @@ void QMenuPrivate::popup(const QPoint &p, QAction *atAction, PositionFunction po updateLayoutDirection(); // Ensure that we get correct sizeHints by placing this window on the correct screen. - // However if the QMenu was constructed with a QDesktopScreenWidget as its parent, + // However if the QMenu was constructed with a Qt::Desktop widget as its parent, // then initialScreenIndex was set, so we should respect that for the lifetime of this menu. // However if eventLoop exists, then exec() already did this by calling createWinId(); so leave it alone. (QTBUG-76162) if (!eventLoop) { -- cgit v1.2.3