File indexing completed on 2025-04-27 11:32:59

0001 /*
0002     SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "x11eventfilter.h"
0010 
0011 namespace KWin
0012 {
0013 
0014 class EffectsHandlerImpl;
0015 class X11Keyboard;
0016 
0017 class EffectsKeyboardInterceptionX11Filter : public X11EventFilter
0018 {
0019 public:
0020     explicit EffectsKeyboardInterceptionX11Filter(EffectsHandlerImpl *effects, X11Keyboard *keyboard);
0021 
0022     bool event(xcb_generic_event_t *event) override;
0023 
0024 private:
0025     void processKey(bool press, xcb_keycode_t keycode, xcb_timestamp_t timestamp);
0026 
0027     EffectsHandlerImpl *m_effects;
0028     X11Keyboard *m_keyboard;
0029 };
0030 
0031 } // namespace KWin