summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/widgets/kernel/qdesktopwidget_qpa_p.h3
2 files changed, 2 insertions, 3 deletions
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;