From b047f48612e2ba38ff63979bd60e0f203d77ceb3 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 12 Mar 2013 09:50:11 +0100 Subject: Do not list desktop widgets and desktop screen widgets as top-levels. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iea4905d802213848594d2ad0266696e5edb884f8 Reviewed-by: Samuel Rødal Reviewed-by: Oliver Wolff --- src/gui/kernel/qguiapplication.cpp | 2 +- src/widgets/kernel/qdesktopwidget_qpa_p.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index a00eeaa5e9..7d95a75f84 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -666,7 +666,7 @@ QWindowList QGuiApplication::topLevelWindows() const QWindowList &list = QGuiApplicationPrivate::window_list; QWindowList topLevelWindows; for (int i = 0; i < list.size(); i++) { - if (!list.at(i)->parent()) { + if (!list.at(i)->parent() && list.at(i)->type() != Qt::Desktop) { // Top windows of embedded QAxServers do not have QWindow parents, // but they are not true top level windows, so do not include them. const bool embedded = list.at(i)->handle() && list.at(i)->handle()->isEmbedded(0); diff --git a/src/widgets/kernel/qdesktopwidget_qpa_p.h b/src/widgets/kernel/qdesktopwidget_qpa_p.h index 9f0089616b..3e42f98937 100644 --- a/src/widgets/kernel/qdesktopwidget_qpa_p.h +++ b/src/widgets/kernel/qdesktopwidget_qpa_p.h @@ -61,9 +61,8 @@ QT_BEGIN_NAMESPACE class QDesktopScreenWidget : public QWidget { Q_OBJECT public: - QDesktopScreenWidget(int screenNumber = -1) + QDesktopScreenWidget(int screenNumber = -1) : QWidget(0, Qt::Desktop) { - setWindowFlags(Qt::Desktop); setVisible(false); QTLWExtra *topData = d_func()->topData(); topData->screenIndex = screenNumber; -- cgit v1.2.3