Setup touchpad shortcuts and input event filters only on Wayland

They work only on Wayland.
master
Vlad Zahorodnii 3 years ago
parent 88d423ddcf
commit bf7bdf0be8

@ -2263,9 +2263,10 @@ void InputRedirection::setupWorkspace()
updateLeds(m_keyboard->xkb()->leds());
connect(m_keyboard, &KeyboardInputRedirection::ledsChanged, this, &InputRedirection::updateLeds);
}
setupTouchpadShortcuts();
setupInputFilters();
}
}
class UserActivitySpy : public InputEventSpy
@ -2419,12 +2420,11 @@ private:
void InputRedirection::setupInputFilters()
{
const bool hasGlobalShortcutSupport = !waylandServer() || waylandServer()->hasGlobalShortcutSupport();
const bool hasGlobalShortcutSupport = waylandServer()->hasGlobalShortcutSupport();
if ((kwinApp()->platform()->session()->capabilities() & Session::Capability::SwitchTerminal)
&& hasGlobalShortcutSupport) {
installInputEventFilter(new VirtualTerminalFilter);
}
if (waylandServer()) {
installInputEventSpy(new HideCursorSpy);
installInputEventSpy(new UserActivitySpy);
if (hasGlobalShortcutSupport) {
@ -2434,7 +2434,6 @@ void InputRedirection::setupInputFilters()
installInputEventFilter(new LockScreenFilter);
m_windowSelector = new WindowSelectorFilter;
installInputEventFilter(m_windowSelector);
}
if (hasGlobalShortcutSupport) {
installInputEventFilter(new ScreenEdgeInputFilter);
}
@ -2446,16 +2445,12 @@ void InputRedirection::setupInputFilters()
if (hasGlobalShortcutSupport) {
installInputEventFilter(new GlobalShortcutFilter);
}
if (waylandServer()) {
installInputEventFilter(new PopupInputFilter);
}
installInputEventFilter(new DecorationEventFilter);
if (waylandServer()) {
installInputEventFilter(new WindowActionInputFilter);
installInputEventFilter(new InternalWindowEventFilter);
installInputEventFilter(new ForwardInputFilter);
installInputEventFilter(new TabletInputFilter);
}
}
void InputRedirection::handleInputConfigChanged(const KConfigGroup &group)

Loading…
Cancel
Save