diff options
author | Liang Qi <liang.qi@qt.io> | 2022-08-26 19:59:42 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-09-01 10:06:20 +0000 |
commit | 53997b5196f1beb3d777a16e7c12a8bbb6688fa8 (patch) | |
tree | 3d4ce9542fe24661c37afa08a2f6ea83070e7d60 | |
parent | c51eb3dfc3de9287260639b0e8b7d419e023b03c (diff) |
widgets: avoid setting X11BypassWindowManagerHint in QToolBar
when restoring state
With X11BypassWindowManagerHint, the floating tool bar was created
without control from window manager, which causes it stays on top
at all virtual desktops.
Fixes: QTBUG-105591
Change-Id: I1868f4e75e1b84f9e81c05d2e927a183a0c635ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit c3c4d4dda942cab92a8fdcd47a5973f5ecf59d40)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/widgets/widgets/qtoolbararealayout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp index adddfbc529..6334874a4c 100644 --- a/src/widgets/widgets/qtoolbararealayout.cpp +++ b/src/widgets/widgets/qtoolbararealayout.cpp @@ -1335,7 +1335,7 @@ bool QToolBarAreaLayout::restoreState(QDataStream &stream, const QList<QToolBar* item.widgetItem = new QWidgetItemV2(toolBar); toolBar->setOrientation(floating ? ((shown & 2) ? Qt::Vertical : Qt::Horizontal) : dock.o); toolBar->setVisible(shown & 1); - toolBar->d_func()->setWindowState(floating, true, rect); + toolBar->d_func()->setWindowState(floating, false, rect); item.preferredSize = item.size; line.toolBarItems.append(item); |