Client: Set window geometry for xdg-shell v6 and stable

Eventhough, according to the protocol spec, it should work perfectly fine
without setting the geometry, gnome-shell 3.28.2 chokes on it and
applications get stuck in the upper right corner and can't be moved.

Qt seems to be the only toolkit left that doesn't set the window geometry, so
let's just do it the simple, though somewhat incorrect, way.

The downside of this patch, is that the unset window geometry used to include
subsurfaces that extended outside the parent surface, but here we just set it
to the frameGeometry of the window.

Task-number: QTBUG-68575
Change-Id: I8a9d029ff6d57bd33294658e3bfd69ff08cd38c1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2018-05-31 11:26:34 +02:00 committed by Johan Helsing
parent e6a0a0ce53
commit 90336adc17
2 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,8 @@ void QWaylandXdgSurfaceV6::Toplevel::applyConfigure()
m_xdgSurface->m_window->handleWindowStatesChanged(statesWithoutActive);
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_applied = m_pending;
}

View File

@ -86,6 +86,8 @@ void QWaylandXdgSurface::Toplevel::applyConfigure()
m_xdgSurface->m_window->handleWindowStatesChanged(statesWithoutActive);
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_applied = m_pending;
}