Fix regression concerning popup handling for wl_shell_surface

Regression introduced due to making popup a member variable and this
is not ready in the init method. So connect to the rescue.

Fixes failing PointerInputTest.
This commit is contained in:
Martin Flöser 2017-09-25 21:10:41 +02:00
parent a264c2b5cf
commit cd97c049b5

View file

@ -228,8 +228,12 @@ void ShellClient::init()
connect(s, &SurfaceInterface::destroyed, this, &ShellClient::destroyClient);
if (m_shellSurface) {
initSurface(m_shellSurface);
// TODO: verify grab serial
m_hasPopupGrab = m_shellSurface->isPopup();
auto setPopup = [this] {
// TODO: verify grab serial
m_hasPopupGrab = m_shellSurface->isPopup();
};
connect(m_shellSurface, &ShellSurfaceInterface::popupChanged, this, setPopup);
setPopup();
} else if (m_xdgShellSurface) {
initSurface(m_xdgShellSurface);