diff --git a/autotests/integration/globalshortcuts_test.cpp b/autotests/integration/globalshortcuts_test.cpp index fc400df1c8..5377b87141 100644 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -19,6 +19,7 @@ #include "wayland_server.h" #include "workspace.h" #include "x11window.h" +#include "xkb.h" #include diff --git a/autotests/integration/keyboard_layout_test.cpp b/autotests/integration/keyboard_layout_test.cpp index 00d4de611c..c53d931978 100644 --- a/autotests/integration/keyboard_layout_test.cpp +++ b/autotests/integration/keyboard_layout_test.cpp @@ -15,6 +15,7 @@ #include "wayland_server.h" #include "window.h" #include "workspace.h" +#include "xkb.h" #include #include diff --git a/autotests/integration/modifier_only_shortcut_test.cpp b/autotests/integration/modifier_only_shortcut_test.cpp index 69e4aa77c0..b3bb4e0ab7 100644 --- a/autotests/integration/modifier_only_shortcut_test.cpp +++ b/autotests/integration/modifier_only_shortcut_test.cpp @@ -16,6 +16,7 @@ #include "keyboard_input.h" #include "wayland_server.h" #include "workspace.h" +#include "xkb.h" #include diff --git a/src/backends/x11/standalone/x11_standalone_platform.cpp b/src/backends/x11/standalone/x11_standalone_platform.cpp index e0d0a316e3..0ed534a9c1 100644 --- a/src/backends/x11/standalone/x11_standalone_platform.cpp +++ b/src/backends/x11/standalone/x11_standalone_platform.cpp @@ -39,6 +39,7 @@ #include "x11_standalone_output.h" #include "x11_standalone_overlaywindow.h" #include "x11_standalone_screenedges_filter.h" +#include "xkb.h" #include "../common/kwinxrenderutils.h" diff --git a/src/debug_console.cpp b/src/debug_console.cpp index 61a6f850d3..71ab9f0233 100644 --- a/src/debug_console.cpp +++ b/src/debug_console.cpp @@ -31,6 +31,7 @@ #include "waylandwindow.h" #include "workspace.h" #include "x11window.h" +#include "xkb.h" #include #include #include diff --git a/src/input.cpp b/src/input.cpp index d413381c46..e4d550122c 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -49,6 +49,7 @@ #include "wayland/tablet_v2_interface.h" #include "wayland_server.h" #include "workspace.h" +#include "xkb.h" #include "xwayland/xwayland_interface.h" #include diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index afda4c4237..ffd738393d 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -30,6 +30,7 @@ #include "wayland/seat_interface.h" #include "wayland/surface_interface.h" #include "wayland/textinput_v3_interface.h" +#include "xkb.h" #include #include diff --git a/src/keyboard_input.cpp b/src/keyboard_input.cpp index 7ffc80b839..b36d24bdcc 100644 --- a/src/keyboard_input.cpp +++ b/src/keyboard_input.cpp @@ -23,6 +23,7 @@ #include "wayland_server.h" #include "window.h" #include "workspace.h" +#include "xkb.h" // screenlocker #if KWIN_BUILD_SCREENLOCKER #include @@ -50,6 +51,21 @@ KeyboardInputRedirection::KeyboardInputRedirection(InputRedirection *parent) KeyboardInputRedirection::~KeyboardInputRedirection() = default; +Xkb *KeyboardInputRedirection::xkb() const +{ + return m_xkb.get(); +} + +Qt::KeyboardModifiers KeyboardInputRedirection::modifiers() const +{ + return m_xkb->modifiers(); +} + +Qt::KeyboardModifiers KeyboardInputRedirection::modifiersRelevantForGlobalShortcuts() const +{ + return m_xkb->modifiersRelevantForGlobalShortcuts(); +} + class KeyStateChangedSpy : public InputEventSpy { public: diff --git a/src/keyboard_input.h b/src/keyboard_input.h index 1fed5aa983..bdd40bddb9 100644 --- a/src/keyboard_input.h +++ b/src/keyboard_input.h @@ -10,7 +10,6 @@ #define KWIN_KEYBOARD_INPUT_H #include "input.h" -#include "xkb.h" #include #include @@ -37,6 +36,7 @@ class InputDevice; class InputRedirection; class KeyboardLayout; class ModifiersChangedSpy; +class Xkb; class KWIN_EXPORT KeyboardInputRedirection : public QObject { @@ -63,18 +63,9 @@ public: */ void processKeymapChange(int fd, uint32_t size); - Xkb *xkb() const - { - return m_xkb.get(); - } - Qt::KeyboardModifiers modifiers() const - { - return m_xkb->modifiers(); - } - Qt::KeyboardModifiers modifiersRelevantForGlobalShortcuts() const - { - return m_xkb->modifiersRelevantForGlobalShortcuts(); - } + Xkb *xkb() const; + Qt::KeyboardModifiers modifiers() const; + Qt::KeyboardModifiers modifiersRelevantForGlobalShortcuts() const; Q_SIGNALS: void ledsChanged(KWin::LEDs); diff --git a/src/keyboard_layout.cpp b/src/keyboard_layout.cpp index 1a0e193c01..163a5d2461 100644 --- a/src/keyboard_layout.cpp +++ b/src/keyboard_layout.cpp @@ -10,6 +10,7 @@ #include "input_event.h" #include "keyboard_input.h" #include "keyboard_layout_switching.h" +#include "xkb.h" #include #include diff --git a/src/keyboard_repeat.cpp b/src/keyboard_repeat.cpp index 14f6af1ce5..92efaa2958 100644 --- a/src/keyboard_repeat.cpp +++ b/src/keyboard_repeat.cpp @@ -12,6 +12,7 @@ #include "wayland/keyboard_interface.h" #include "wayland/seat_interface.h" #include "wayland_server.h" +#include "xkb.h" #include diff --git a/src/plugins/buttonrebinds/buttonrebindsfilter.cpp b/src/plugins/buttonrebinds/buttonrebindsfilter.cpp index 5224e588de..c505373401 100644 --- a/src/plugins/buttonrebinds/buttonrebindsfilter.cpp +++ b/src/plugins/buttonrebinds/buttonrebindsfilter.cpp @@ -9,6 +9,7 @@ #include "input_event.h" #include "keyboard_input.h" +#include "xkb.h" #include