[wayland] Keep fullscreen state directly in ShellClient

So far we delegated to ShellSurfaceInterface, but it's possible that
we call into isFullscreen when the ShellSurfaceInterface is already
destroyed.

Note: the functionality needs to be slightly reworked. The fullscreen
state should change once we get a buffer for fullscreen, not when the
client requests it. This is a general pattern which is wrong also for
maximized, etc.
This commit is contained in:
Martin Gräßlin 2015-10-08 10:05:40 +02:00
parent f3cfbacb1e
commit b35c3e8501
2 changed files with 6 additions and 1 deletions

View file

@ -328,7 +328,7 @@ bool ShellClient::isFullScreenable() const
bool ShellClient::isFullScreen() const
{
return m_shellSurface->isFullscreen();
return m_fullScreen;
}
bool ShellClient::isMaximizable() const
@ -586,6 +586,10 @@ void ShellClient::clientFullScreenChanged(bool fullScreen)
requestGeometry(workspace()->clientArea(MaximizeArea, this));
}
}
if (m_fullScreen != fullScreen) {
m_fullScreen = fullScreen;
emit fullScreenChanged();
}
}
void ShellClient::move(int x, int y, ForceGeometry_t force)

View file

@ -150,6 +150,7 @@ private:
NET::WindowType m_windowType = NET::Normal;
QPointer<KWayland::Server::PlasmaShellSurfaceInterface> m_plasmaShellSurface;
QPointer<KWayland::Server::QtExtendedSurfaceInterface> m_qtExtendedSurface;
bool m_fullScreen = false;
};
}