Forward declare Xkb in keyboard_input.h

This commit is contained in:
Vlad Zahorodnii 2022-10-31 23:14:40 +02:00
parent 391c777936
commit 1801421080
12 changed files with 30 additions and 13 deletions

View file

@ -19,6 +19,7 @@
#include "wayland_server.h" #include "wayland_server.h"
#include "workspace.h" #include "workspace.h"
#include "x11window.h" #include "x11window.h"
#include "xkb.h"
#include <KWayland/Client/surface.h> #include <KWayland/Client/surface.h>

View file

@ -15,6 +15,7 @@
#include "wayland_server.h" #include "wayland_server.h"
#include "window.h" #include "window.h"
#include "workspace.h" #include "workspace.h"
#include "xkb.h"
#include <KConfigGroup> #include <KConfigGroup>
#include <KGlobalAccel> #include <KGlobalAccel>

View file

@ -16,6 +16,7 @@
#include "keyboard_input.h" #include "keyboard_input.h"
#include "wayland_server.h" #include "wayland_server.h"
#include "workspace.h" #include "workspace.h"
#include "xkb.h"
#include <KConfigGroup> #include <KConfigGroup>

View file

@ -39,6 +39,7 @@
#include "x11_standalone_output.h" #include "x11_standalone_output.h"
#include "x11_standalone_overlaywindow.h" #include "x11_standalone_overlaywindow.h"
#include "x11_standalone_screenedges_filter.h" #include "x11_standalone_screenedges_filter.h"
#include "xkb.h"
#include "../common/kwinxrenderutils.h" #include "../common/kwinxrenderutils.h"

View file

@ -31,6 +31,7 @@
#include "waylandwindow.h" #include "waylandwindow.h"
#include "workspace.h" #include "workspace.h"
#include "x11window.h" #include "x11window.h"
#include "xkb.h"
#include <cerrno> #include <cerrno>
#include <kwinglplatform.h> #include <kwinglplatform.h>
#include <kwinglutils.h> #include <kwinglutils.h>

View file

@ -49,6 +49,7 @@
#include "wayland/tablet_v2_interface.h" #include "wayland/tablet_v2_interface.h"
#include "wayland_server.h" #include "wayland_server.h"
#include "workspace.h" #include "workspace.h"
#include "xkb.h"
#include "xwayland/xwayland_interface.h" #include "xwayland/xwayland_interface.h"
#include <KDecoration2/Decoration> #include <KDecoration2/Decoration>

View file

@ -30,6 +30,7 @@
#include "wayland/seat_interface.h" #include "wayland/seat_interface.h"
#include "wayland/surface_interface.h" #include "wayland/surface_interface.h"
#include "wayland/textinput_v3_interface.h" #include "wayland/textinput_v3_interface.h"
#include "xkb.h"
#include <KLocalizedString> #include <KLocalizedString>
#include <KShell> #include <KShell>

View file

@ -23,6 +23,7 @@
#include "wayland_server.h" #include "wayland_server.h"
#include "window.h" #include "window.h"
#include "workspace.h" #include "workspace.h"
#include "xkb.h"
// screenlocker // screenlocker
#if KWIN_BUILD_SCREENLOCKER #if KWIN_BUILD_SCREENLOCKER
#include <KScreenLocker/KsldApp> #include <KScreenLocker/KsldApp>
@ -50,6 +51,21 @@ KeyboardInputRedirection::KeyboardInputRedirection(InputRedirection *parent)
KeyboardInputRedirection::~KeyboardInputRedirection() = default; 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 class KeyStateChangedSpy : public InputEventSpy
{ {
public: public:

View file

@ -10,7 +10,6 @@
#define KWIN_KEYBOARD_INPUT_H #define KWIN_KEYBOARD_INPUT_H
#include "input.h" #include "input.h"
#include "xkb.h"
#include <QObject> #include <QObject>
#include <QPointF> #include <QPointF>
@ -37,6 +36,7 @@ class InputDevice;
class InputRedirection; class InputRedirection;
class KeyboardLayout; class KeyboardLayout;
class ModifiersChangedSpy; class ModifiersChangedSpy;
class Xkb;
class KWIN_EXPORT KeyboardInputRedirection : public QObject class KWIN_EXPORT KeyboardInputRedirection : public QObject
{ {
@ -63,18 +63,9 @@ public:
*/ */
void processKeymapChange(int fd, uint32_t size); void processKeymapChange(int fd, uint32_t size);
Xkb *xkb() const Xkb *xkb() const;
{ Qt::KeyboardModifiers modifiers() const;
return m_xkb.get(); Qt::KeyboardModifiers modifiersRelevantForGlobalShortcuts() const;
}
Qt::KeyboardModifiers modifiers() const
{
return m_xkb->modifiers();
}
Qt::KeyboardModifiers modifiersRelevantForGlobalShortcuts() const
{
return m_xkb->modifiersRelevantForGlobalShortcuts();
}
Q_SIGNALS: Q_SIGNALS:
void ledsChanged(KWin::LEDs); void ledsChanged(KWin::LEDs);

View file

@ -10,6 +10,7 @@
#include "input_event.h" #include "input_event.h"
#include "keyboard_input.h" #include "keyboard_input.h"
#include "keyboard_layout_switching.h" #include "keyboard_layout_switching.h"
#include "xkb.h"
#include <KGlobalAccel> #include <KGlobalAccel>
#include <KLocalizedString> #include <KLocalizedString>

View file

@ -12,6 +12,7 @@
#include "wayland/keyboard_interface.h" #include "wayland/keyboard_interface.h"
#include "wayland/seat_interface.h" #include "wayland/seat_interface.h"
#include "wayland_server.h" #include "wayland_server.h"
#include "xkb.h"
#include <QTimer> #include <QTimer>

View file

@ -9,6 +9,7 @@
#include "input_event.h" #include "input_event.h"
#include "keyboard_input.h" #include "keyboard_input.h"
#include "xkb.h"
#include <KKeyServer> #include <KKeyServer>