[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:
parent
238ff89edb
commit
f2bdb4818a
3 changed files with 5 additions and 3 deletions
|
@ -89,6 +89,9 @@ public:
|
||||||
bool areOutputsEnabled() const {
|
bool areOutputsEnabled() const {
|
||||||
return m_outputsEnabled;
|
return m_outputsEnabled;
|
||||||
}
|
}
|
||||||
|
void setOutputsEnabled(bool enabled) {
|
||||||
|
m_outputsEnabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void pointerMotion(const QPointF &position, quint32 time);
|
void pointerMotion(const QPointF &position, quint32 time);
|
||||||
|
@ -131,9 +134,6 @@ protected:
|
||||||
void setSupportsPointerWarping(bool set) {
|
void setSupportsPointerWarping(bool set) {
|
||||||
m_pointerWarping = set;
|
m_pointerWarping = set;
|
||||||
}
|
}
|
||||||
void setOutputsEnabled(bool enabled) {
|
|
||||||
m_outputsEnabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void triggerCursorRepaint();
|
void triggerCursorRepaint();
|
||||||
|
|
|
@ -51,6 +51,7 @@ WaylandTestApplication::WaylandTestApplication(int &argc, char **argv)
|
||||||
|
|
||||||
WaylandTestApplication::~WaylandTestApplication()
|
WaylandTestApplication::~WaylandTestApplication()
|
||||||
{
|
{
|
||||||
|
waylandServer()->backend()->setOutputsEnabled(false);
|
||||||
destroyWorkspace();
|
destroyWorkspace();
|
||||||
waylandServer()->dispatch();
|
waylandServer()->dispatch();
|
||||||
// need to unload all effects prior to destroying X connection as they might do X calls
|
// need to unload all effects prior to destroying X connection as they might do X calls
|
||||||
|
|
|
@ -75,6 +75,7 @@ ApplicationWayland::ApplicationWayland(int &argc, char **argv)
|
||||||
|
|
||||||
ApplicationWayland::~ApplicationWayland()
|
ApplicationWayland::~ApplicationWayland()
|
||||||
{
|
{
|
||||||
|
waylandServer()->backend()->setOutputsEnabled(false);
|
||||||
destroyWorkspace();
|
destroyWorkspace();
|
||||||
waylandServer()->dispatch();
|
waylandServer()->dispatch();
|
||||||
// need to unload all effects prior to destroying X connection as they might do X calls
|
// need to unload all effects prior to destroying X connection as they might do X calls
|
||||||
|
|
Loading…
Reference in a new issue