#pragma once #include #include // KWin's virtual keyboard policy (the tray toggle, System Settings → // Virtual Keyboard): KWin activates the input method for every text field // and the policy only gates its input panel, which sloposk doesn't use, so // sloposk asks it over org.kde.KWin /VirtualKeyboard instead. class KWinVirtualKeyboard : public QObject { Q_OBJECT public: explicit KWinVirtualKeyboard(QObject *parent = nullptr); // Calls `answer` with whether a field focused now should show the // keyboard: never when it's off, only after touch or a pen in the // default mode. True if KWin can't be asked. void askShowOnActive(QObject *context, std::function answer); Q_SIGNALS: void modeChanged(); };