File indexing completed on 2024-05-19 16:35:37

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2021 David Edmundson <davidedmundson@kde.org>
0006     SPDX-FileCopyrightText: 2021 David Redondo <kde@david-redondo.de>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #pragma once
0012 
0013 #include "wayland/datadevice_interface.h"
0014 
0015 #include <xcb/xcb.h>
0016 
0017 namespace KWin
0018 {
0019 namespace Xwl
0020 {
0021 
0022 class Xvisit;
0023 class Dnd;
0024 
0025 class XwlDropHandler : public KWaylandServer::AbstractDropHandler
0026 {
0027     Q_OBJECT
0028 public:
0029     XwlDropHandler(Dnd *dnd);
0030 
0031     void updateDragTarget(KWaylandServer::SurfaceInterface *surface, quint32 serial) override;
0032     bool handleClientMessage(xcb_client_message_event_t *event);
0033 
0034 private:
0035     void drop() override;
0036     Xvisit *m_xvisit = nullptr;
0037     Dnd *const m_dnd;
0038     QVector<Xvisit *> m_previousVisits;
0039 };
0040 }
0041 }