Remove crash handling in kwin_wayland
This patch introduces additional method to Application class that has default policy of restarting the app. This method is overridden for wayland case disabling this step. REVIEW: 126655
This commit is contained in:
parent
61e1a98fb7
commit
7ccca92c3e
4 changed files with 14 additions and 1 deletions
7
main.cpp
7
main.cpp
|
@ -211,9 +211,14 @@ void Application::destroyAtoms()
|
||||||
atoms = nullptr;
|
atoms = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::crashChecking()
|
void Application::setupCrashHandler()
|
||||||
{
|
{
|
||||||
KCrash::setEmergencySaveFunction(Application::crashHandler);
|
KCrash::setEmergencySaveFunction(Application::crashHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Application::crashChecking()
|
||||||
|
{
|
||||||
|
setupCrashHandler();
|
||||||
if (crashes >= 4) {
|
if (crashes >= 4) {
|
||||||
// Something has gone seriously wrong
|
// Something has gone seriously wrong
|
||||||
AlternativeWMDialog dialog;
|
AlternativeWMDialog dialog;
|
||||||
|
|
1
main.h
1
main.h
|
@ -177,6 +177,7 @@ Q_SIGNALS:
|
||||||
protected:
|
protected:
|
||||||
Application(OperationMode mode, int &argc, char **argv);
|
Application(OperationMode mode, int &argc, char **argv);
|
||||||
virtual void performStartup() = 0;
|
virtual void performStartup() = 0;
|
||||||
|
virtual void setupCrashHandler();
|
||||||
|
|
||||||
void notifyKSplash();
|
void notifyKSplash();
|
||||||
void createInput();
|
void createInput();
|
||||||
|
|
|
@ -122,6 +122,12 @@ void ApplicationWayland::performStartup()
|
||||||
createBackend();
|
createBackend();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ApplicationWayland::setupCrashHandler()
|
||||||
|
{
|
||||||
|
// this disables auto-restart of kwin_wayland
|
||||||
|
// do nothing hence allowing OS to create dump and so on
|
||||||
|
}
|
||||||
|
|
||||||
void ApplicationWayland::createBackend()
|
void ApplicationWayland::createBackend()
|
||||||
{
|
{
|
||||||
AbstractBackend *backend = waylandServer()->backend();
|
AbstractBackend *backend = waylandServer()->backend();
|
||||||
|
|
|
@ -56,6 +56,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void performStartup() override;
|
void performStartup() override;
|
||||||
|
void setupCrashHandler() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createBackend();
|
void createBackend();
|
||||||
|
|
Loading…
Reference in a new issue