[wayland] Ensure KWin::atoms are destroyed before doing xcb_disconnect
Destroying the Atoms might call into xcb as a request might have to be discarded. If atoms are destroyed after disconnecting xcb, this'll crash.icc-effect-5.14.5
parent
f81655b7f5
commit
c798977e55
6
main.cpp
6
main.cpp
|
@ -200,7 +200,13 @@ void Application::start()
|
|||
Application::~Application()
|
||||
{
|
||||
delete options;
|
||||
destroyAtoms();
|
||||
}
|
||||
|
||||
void Application::destroyAtoms()
|
||||
{
|
||||
delete atoms;
|
||||
atoms = nullptr;
|
||||
}
|
||||
|
||||
void Application::crashChecking()
|
||||
|
|
1
main.h
1
main.h
|
@ -181,6 +181,7 @@ protected:
|
|||
m_connection = c;
|
||||
emit x11ConnectionChanged();
|
||||
}
|
||||
void destroyAtoms();
|
||||
|
||||
bool notify(QObject* o, QEvent* e);
|
||||
static void crashHandler(int signal);
|
||||
|
|
|
@ -76,6 +76,7 @@ ApplicationWayland::~ApplicationWayland()
|
|||
destroyWorkspace();
|
||||
if (x11Connection()) {
|
||||
Xcb::setInputFocus(XCB_INPUT_FOCUS_POINTER_ROOT);
|
||||
destroyAtoms();
|
||||
xcb_disconnect(x11Connection());
|
||||
}
|
||||
if (m_xwaylandProcess) {
|
||||
|
|
Loading…
Reference in New Issue