input: remove the terminate server shortcut

Accidentally pressing any shortcut shouldn't take down the whole session.
If KWin isn't reponsive but can still process shortcuts for some reason,
you can still switch to a different virtual terminal to explicitly kill
it from there
This commit is contained in:
Xaver Hugl 2024-01-11 20:07:11 +01:00
parent 451b878bb9
commit 260bc0a61d
2 changed files with 0 additions and 22 deletions

View file

@ -292,22 +292,6 @@ public:
}
};
class TerminateServerFilter : public InputEventFilter
{
public:
bool keyEvent(KeyEvent *event) override
{
if (event->type() == QEvent::KeyPress && !event->isAutoRepeat()) {
if (event->nativeVirtualKey() == XKB_KEY_Terminate_Server) {
qCWarning(KWIN_CORE) << "Request to terminate server";
QMetaObject::invokeMethod(QCoreApplication::instance(), &QCoreApplication::quit, Qt::QueuedConnection);
return true;
}
}
return false;
}
};
class LockScreenFilter : public InputEventFilter
{
public:
@ -2935,11 +2919,6 @@ void InputRedirection::setupInputFilters()
m_windowInteractedSpy = std::make_unique<WindowInteractedSpy>();
installInputEventSpy(m_windowInteractedSpy.get());
if (hasGlobalShortcutSupport) {
m_terminateServerFilter = std::make_unique<TerminateServerFilter>();
installInputEventFilter(m_terminateServerFilter.get());
}
m_lockscreenFilter = std::make_unique<LockScreenFilter>();
installInputEventFilter(m_lockscreenFilter.get());

View file

@ -337,7 +337,6 @@ private:
KConfigWatcher::Ptr m_inputConfigWatcher;
std::unique_ptr<InputEventFilter> m_virtualTerminalFilter;
std::unique_ptr<InputEventFilter> m_terminateServerFilter;
std::unique_ptr<InputEventFilter> m_dragAndDropFilter;
std::unique_ptr<InputEventFilter> m_lockscreenFilter;
std::unique_ptr<InputEventFilter> m_screenEdgeFilter;