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;
|
||||
}
|
||||
|
||||
void Application::crashChecking()
|
||||
void Application::setupCrashHandler()
|
||||
{
|
||||
KCrash::setEmergencySaveFunction(Application::crashHandler);
|
||||
}
|
||||
|
||||
void Application::crashChecking()
|
||||
{
|
||||
setupCrashHandler();
|
||||
if (crashes >= 4) {
|
||||
// Something has gone seriously wrong
|
||||
AlternativeWMDialog dialog;
|
||||
|
|
1
main.h
1
main.h
|
@ -177,6 +177,7 @@ Q_SIGNALS:
|
|||
protected:
|
||||
Application(OperationMode mode, int &argc, char **argv);
|
||||
virtual void performStartup() = 0;
|
||||
virtual void setupCrashHandler();
|
||||
|
||||
void notifyKSplash();
|
||||
void createInput();
|
||||
|
|
|
@ -122,6 +122,12 @@ void ApplicationWayland::performStartup()
|
|||
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()
|
||||
{
|
||||
AbstractBackend *backend = waylandServer()->backend();
|
||||
|
|
|
@ -56,6 +56,7 @@ public:
|
|||
|
||||
protected:
|
||||
void performStartup() override;
|
||||
void setupCrashHandler() override;
|
||||
|
||||
private:
|
||||
void createBackend();
|
||||
|
|
Loading…
Reference in a new issue