[wayland] Disable Compositor during tear-down

Prevents rendering an incomplete state and as well prevents from
running performCompositing() which could access Workspace and crash.
This commit is contained in:
Martin Gräßlin 2015-11-12 15:12:01 +01:00
parent 238ff89edb
commit f2bdb4818a
3 changed files with 5 additions and 3 deletions

View file

@ -89,6 +89,9 @@ public:
bool areOutputsEnabled() const {
return m_outputsEnabled;
}
void setOutputsEnabled(bool enabled) {
m_outputsEnabled = enabled;
}
public Q_SLOTS:
void pointerMotion(const QPointF &position, quint32 time);
@ -131,9 +134,6 @@ protected:
void setSupportsPointerWarping(bool set) {
m_pointerWarping = set;
}
void setOutputsEnabled(bool enabled) {
m_outputsEnabled = enabled;
}
private:
void triggerCursorRepaint();

View file

@ -51,6 +51,7 @@ WaylandTestApplication::WaylandTestApplication(int &argc, char **argv)
WaylandTestApplication::~WaylandTestApplication()
{
waylandServer()->backend()->setOutputsEnabled(false);
destroyWorkspace();
waylandServer()->dispatch();
// need to unload all effects prior to destroying X connection as they might do X calls

View file

@ -75,6 +75,7 @@ ApplicationWayland::ApplicationWayland(int &argc, char **argv)
ApplicationWayland::~ApplicationWayland()
{
waylandServer()->backend()->setOutputsEnabled(false);
destroyWorkspace();
waylandServer()->dispatch();
// need to unload all effects prior to destroying X connection as they might do X calls