[wayland] Don't exit due to Xwayland exiting on tear down
Our Xwayland exit error handler should not run during tearing down Xwayland. Yes we expect Xwayland to exit as a response to KWin telling it to exit.
This commit is contained in:
parent
7d8fcbfd72
commit
238ff89edb
4 changed files with 6 additions and 2 deletions
|
@ -57,6 +57,7 @@ WaylandTestApplication::~WaylandTestApplication()
|
||||||
if (effects) {
|
if (effects) {
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
||||||
}
|
}
|
||||||
|
disconnect(m_xwaylandFailConnection);
|
||||||
if (x11Connection()) {
|
if (x11Connection()) {
|
||||||
Xcb::setInputFocus(XCB_INPUT_FOCUS_POINTER_ROOT);
|
Xcb::setInputFocus(XCB_INPUT_FOCUS_POINTER_ROOT);
|
||||||
destroyAtoms();
|
destroyAtoms();
|
||||||
|
@ -225,7 +226,7 @@ void WaylandTestApplication::startXwaylandServer()
|
||||||
QStringLiteral("-rootless"),
|
QStringLiteral("-rootless"),
|
||||||
QStringLiteral("-wm"),
|
QStringLiteral("-wm"),
|
||||||
QString::number(fd)});
|
QString::number(fd)});
|
||||||
connect(m_xwaylandProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this,
|
m_xwaylandFailConnection = connect(m_xwaylandProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this,
|
||||||
[] (QProcess::ProcessError error) {
|
[] (QProcess::ProcessError error) {
|
||||||
if (error == QProcess::FailedToStart) {
|
if (error == QProcess::FailedToStart) {
|
||||||
std::cerr << "FATAL ERROR: failed to start Xwayland" << std::endl;
|
std::cerr << "FATAL ERROR: failed to start Xwayland" << std::endl;
|
||||||
|
|
|
@ -47,6 +47,7 @@ private:
|
||||||
|
|
||||||
int m_xcbConnectionFd = -1;
|
int m_xcbConnectionFd = -1;
|
||||||
QProcess *m_xwaylandProcess = nullptr;
|
QProcess *m_xwaylandProcess = nullptr;
|
||||||
|
QMetaObject::Connection m_xwaylandFailConnection;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,7 @@ ApplicationWayland::~ApplicationWayland()
|
||||||
if (effects) {
|
if (effects) {
|
||||||
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
static_cast<EffectsHandlerImpl*>(effects)->unloadAllEffects();
|
||||||
}
|
}
|
||||||
|
disconnect(m_xwaylandFailConnection);
|
||||||
if (x11Connection()) {
|
if (x11Connection()) {
|
||||||
Xcb::setInputFocus(XCB_INPUT_FOCUS_POINTER_ROOT);
|
Xcb::setInputFocus(XCB_INPUT_FOCUS_POINTER_ROOT);
|
||||||
destroyAtoms();
|
destroyAtoms();
|
||||||
|
@ -293,7 +294,7 @@ void ApplicationWayland::startXwaylandServer()
|
||||||
QStringLiteral("-rootless"),
|
QStringLiteral("-rootless"),
|
||||||
QStringLiteral("-wm"),
|
QStringLiteral("-wm"),
|
||||||
QString::number(fd)});
|
QString::number(fd)});
|
||||||
connect(m_xwaylandProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this,
|
m_xwaylandFailConnection = connect(m_xwaylandProcess, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error), this,
|
||||||
[] (QProcess::ProcessError error) {
|
[] (QProcess::ProcessError error) {
|
||||||
if (error == QProcess::FailedToStart) {
|
if (error == QProcess::FailedToStart) {
|
||||||
std::cerr << "FATAL ERROR: failed to start Xwayland" << std::endl;
|
std::cerr << "FATAL ERROR: failed to start Xwayland" << std::endl;
|
||||||
|
|
|
@ -66,6 +66,7 @@ private:
|
||||||
QStringList m_applicationsToStart;
|
QStringList m_applicationsToStart;
|
||||||
QString m_inputMethodServerToStart;
|
QString m_inputMethodServerToStart;
|
||||||
QProcess *m_xwaylandProcess = nullptr;
|
QProcess *m_xwaylandProcess = nullptr;
|
||||||
|
QMetaObject::Connection m_xwaylandFailConnection;
|
||||||
QProcessEnvironment m_environment;
|
QProcessEnvironment m_environment;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue