File indexing completed on 2025-04-27 11:33:01

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 "x11_standalone_xfixes_cursor_event_filter.h"
0010 #include "utils/xcbutils.h"
0011 #include "x11_standalone_cursor.h"
0012 
0013 namespace KWin
0014 {
0015 
0016 XFixesCursorEventFilter::XFixesCursorEventFilter(X11Cursor *cursor)
0017     : X11EventFilter(QVector<int>{Xcb::Extensions::self()->fixesCursorNotifyEvent()})
0018     , m_cursor(cursor)
0019 {
0020 }
0021 
0022 bool XFixesCursorEventFilter::event(xcb_generic_event_t *event)
0023 {
0024     m_cursor->notifyCursorChanged();
0025     return false;
0026 }
0027 
0028 }