diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index 338d66ea19f..e6ef7767768 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -435,6 +435,7 @@ void QWaylandXdgSurface::applyConfigure() if (m_popup) m_popup->applyConfigure(); + setContentGeometry(window()->windowContentGeometry()); window()->updateExposure(); } @@ -450,8 +451,11 @@ void QWaylandXdgSurface::propagateSizeHints() void QWaylandXdgSurface::setContentGeometry(const QRect &rect) { - if (window()->isExposed()) - set_window_geometry(rect.x(), rect.y(), rect.width(), rect.height()); + if (!window()->isExposed() || m_lastGeometry == rect) + return; + + set_window_geometry(rect.x(), rect.y(), rect.width(), rect.height()); + m_lastGeometry = rect; } void QWaylandXdgSurface::setSizeHints() diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h index 12f52da5ea6..f7d223b51d0 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h @@ -161,6 +161,7 @@ private: QString m_activationToken; QString m_appId; bool m_alertState = false; + QRect m_lastGeometry; friend class QWaylandXdgShell; };