diff options
author | Pier Luigi Fiorini <pierluigi.fiorini@liri.io> | 2019-01-14 00:43:28 +0100 |
---|---|---|
committer | Pier Luigi Fiorini <pierluigi.fiorini@liri.io> | 2019-01-15 10:04:02 +0000 |
commit | fb764cd406dd64dcb4caf0df2dca8b621d80f58b (patch) | |
tree | ef342f0cf09b38a2c8166b81de44bce2ae9e8e8d /src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | |
parent | b70148fde1d30add67ca6dd5ef63a37842f53f81 (diff) |
Track changes to window geometry for xdg-shell and xdg-shell-v6
Send window geometry every time the window is resized.
[ChangeLog][QPA plugin] Send window geometry every time the
window is resized.
Change-Id: I8f3824c31455345be2b582e7d3a55077b47851b6
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index fc515ca1b..78b7b45c8 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -104,9 +104,6 @@ void QWaylandXdgSurface::Toplevel::applyConfigure() m_xdgSurface->m_window->resizeFromApplyConfigure(m_pending.size); } - QSize windowGeometrySize = m_xdgSurface->m_window->window()->frameGeometry().size(); - m_xdgSurface->set_window_geometry(0, 0, windowGeometrySize.width(), windowGeometrySize.height()); - m_xdgSurface->setSizeHints(); m_applied = m_pending; @@ -352,6 +349,11 @@ void QWaylandXdgSurface::propagateSizeHints() m_window->commit(); } +void QWaylandXdgSurface::setWindowGeometry(const QRect &rect) +{ + set_window_geometry(rect.x(), rect.y(), rect.width(), rect.height()); +} + void QWaylandXdgSurface::setSizeHints() { if (m_toplevel && m_window) { |