1 | /* |
2 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
3 | SPDX-FileCopyrightText: 2020 David Redondo <kde@david-redondo.de> |
4 | */ |
5 | |
6 | #ifndef GRABBINGINHIBITION_H |
7 | #define GRABBINGINHIBITION_H |
8 | |
9 | #include "shortcutinhibition_p.h" |
10 | |
11 | class KeyboardGrabber : public ShortcutInhibition |
12 | { |
13 | public: |
14 | explicit KeyboardGrabber(QWindow *window); |
15 | ~KeyboardGrabber() override; |
16 | void enableInhibition() override; |
17 | void disableInhibition() override; |
18 | bool shortcutsAreInhibited() const override; |
19 | |
20 | private: |
21 | QWindow *m_grabbedWindow; |
22 | bool m_grabbingKeyboard; |
23 | }; |
24 | |
25 | #endif |
26 | |