diff options
| author | Peter Varga <pvarga@inf.u-szeged.hu> | 2025-08-14 16:17:41 +0200 |
|---|---|---|
| committer | Michal Klocek <michal.klocek@qt.io> | 2025-12-01 17:11:42 +0100 |
| commit | 65ea28e7204eaeb39588a33cfc2f69c48951aa6a (patch) | |
| tree | dbf3d7379304f85e2222b4e5a81892a39e12956b | |
| parent | 452e0aaed82ee01833455ef4616fb59a9fc7fc2b (diff) | |
Fix Quick popup window positioning under X11
If the popup window has the Qt::Dialog flag, some window managers may
try to resize and move the popup after it becomes visible. This can lead
to a blinking popup or even worse, it can cause a loop that continuously
moves the popup window.
Replace Qt::Tool flag with Qt::Popup to get rid of the Qt::Dialog flag
but keep popup as popup.
Note on Wayland Qt:Tool is xdg toplevel not a 'popup' neither 'grabbing
popup' and it creates shell surface. This means it will get random
position on the screen.
Note this tricky issue as we already changed that several times both
for widgets and quick due to different reasons (see 1390979a, 2f720836,
58467ed19, 7e7dd2625, c56169f7a1)
Fixes: QTBUG-140321
Task-number: QTBUG-132794
Task-number: QTBUG-138747
Pick-to: 6.10
Change-Id: I8c3a94519008455fac2d8ab4c3bf34d860e2475b
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
| -rw-r--r-- | src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp index 3ad88ca39..95b5e3500 100644 --- a/src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp +++ b/src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp @@ -31,7 +31,8 @@ RenderWidgetHostViewQtDelegateQuickWindow::RenderWidgetHostViewQtDelegateQuickWi RenderWidgetHostViewQtDelegateItem *realDelegate, QWindow *parent) : QQuickWindow(), m_realDelegate(realDelegate), m_virtualParent(nullptr), m_transformed(false) { - setFlags(Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus); + setFlags(Qt::Popup | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint + | Qt::WindowDoesNotAcceptFocus); realDelegate->setParentItem(contentItem()); setTransientParent(parent); } |
