File indexing completed on 2024-03-24 15:28:39
0001 /* 0002 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0003 SPDX-FileCopyrightText: 2020 David Redondo <kde@david-redondo.de> 0004 */ 0005 0006 #ifndef GRABBINGINHIBITION_H 0007 #define GRABBINGINHIBITION_H 0008 0009 #include "shortcutinhibition_p.h" 0010 0011 class KeyboardGrabber : public ShortcutInhibition 0012 { 0013 public: 0014 explicit KeyboardGrabber(QWindow *window); 0015 ~KeyboardGrabber() override; 0016 void enableInhibition() override; 0017 void disableInhibition() override; 0018 bool shortcutsAreInhibited() const override; 0019 0020 private: 0021 QWindow *m_grabbedWindow; 0022 bool m_grabbingKeyboard; 0023 }; 0024 0025 #endif