File indexing completed on 2024-11-10 04:56:35
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2006 Lubos Lunak <l.lunak@kde.org> 0006 SPDX-FileCopyrightText: 2010, 2011, 2017 Martin Gräßlin <mgraesslin@kde.org> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 #pragma once 0011 0012 #include "effect/effecthandler.h" 0013 #include "utils/xcbutils.h" 0014 0015 #include <memory.h> 0016 0017 namespace KWin 0018 { 0019 class EffectsMouseInterceptionX11Filter; 0020 class EffectsKeyboardInterceptionX11Filter; 0021 0022 class EffectsHandlerX11 : public EffectsHandler 0023 { 0024 Q_OBJECT 0025 public: 0026 explicit EffectsHandlerX11(Compositor *compositor, WorkspaceScene *scene); 0027 ~EffectsHandlerX11() override; 0028 0029 void defineCursor(Qt::CursorShape shape) override; 0030 0031 protected: 0032 bool doGrabKeyboard() override; 0033 void doUngrabKeyboard() override; 0034 0035 void doStartMouseInterception(Qt::CursorShape shape) override; 0036 void doStopMouseInterception() override; 0037 0038 void doCheckInputWindowStacking() override; 0039 0040 private: 0041 Xcb::Window m_mouseInterceptionWindow; 0042 std::unique_ptr<EffectsMouseInterceptionX11Filter> m_x11MouseInterception; 0043 std::unique_ptr<EffectsKeyboardInterceptionX11Filter> m_x11KeyboardInterception; 0044 }; 0045 0046 }