File indexing completed on 2024-04-28 05:30:33

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2017 Martin Flöser <mgraesslin@kde.org>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #include "was_user_interaction_x11_filter.h"
0010 #include "workspace.h"
0011 #include <xcb/xcb.h>
0012 
0013 namespace KWin
0014 {
0015 WasUserInteractionX11Filter::WasUserInteractionX11Filter()
0016     : X11EventFilter(QList<int>{XCB_KEY_PRESS, XCB_KEY_RELEASE, XCB_BUTTON_PRESS, XCB_BUTTON_RELEASE})
0017 {
0018 }
0019 
0020 bool WasUserInteractionX11Filter::event(xcb_generic_event_t *event)
0021 {
0022     workspace()->setWasUserInteraction();
0023     return false;
0024 }
0025 
0026 }