2020-11-07 02:03:57 +00:00
|
|
|
/*
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "kwin_export.h"
|
|
|
|
#include <QObject>
|
2022-05-05 00:19:24 +00:00
|
|
|
#include <QPointer>
|
2021-07-15 16:35:04 +00:00
|
|
|
#include <QSharedPointer>
|
2020-11-07 02:03:57 +00:00
|
|
|
|
|
|
|
namespace KWaylandServer
|
|
|
|
{
|
|
|
|
class SeatInterface;
|
|
|
|
class ClientConnection;
|
|
|
|
class SurfaceInterface;
|
|
|
|
class XdgActivationV1Interface;
|
2021-07-15 16:35:04 +00:00
|
|
|
class PlasmaWindowActivationInterface;
|
2020-11-07 02:03:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
class KWIN_EXPORT XdgActivationV1Integration : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
XdgActivationV1Integration(KWaylandServer::XdgActivationV1Interface *activation, QObject *parent);
|
|
|
|
|
2022-03-23 10:13:38 +00:00
|
|
|
struct ActivationToken
|
|
|
|
{
|
2021-07-15 16:35:04 +00:00
|
|
|
~ActivationToken();
|
|
|
|
|
2020-11-07 02:03:57 +00:00
|
|
|
const QString token;
|
2021-06-14 15:48:00 +00:00
|
|
|
const KWaylandServer::ClientConnection *client;
|
2022-05-05 00:19:24 +00:00
|
|
|
QPointer<const KWaylandServer::SurfaceInterface> surface;
|
2020-11-07 02:03:57 +00:00
|
|
|
const uint serial;
|
|
|
|
const KWaylandServer::SeatInterface *seat;
|
|
|
|
QString applicationId;
|
2021-07-15 16:35:04 +00:00
|
|
|
QSharedPointer<KWaylandServer::PlasmaWindowActivationInterface> activation;
|
2020-11-07 02:03:57 +00:00
|
|
|
};
|
|
|
|
void activateSurface(KWaylandServer::SurfaceInterface *surface, const QString &token);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void clear();
|
|
|
|
|
|
|
|
QScopedPointer<ActivationToken> m_currentActivationToken;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|