KWin
Loading...
Searching...
No Matches
xdgactivationv1.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "kwin_export.h"
13#include <QObject>
14#include <QPointer>
15
16namespace KWin
17{
18
19class SeatInterface;
20class ClientConnection;
21class SurfaceInterface;
22class XdgActivationV1Interface;
24
25class KWIN_EXPORT XdgActivationV1Integration : public QObject
26{
27 Q_OBJECT
28public:
29 XdgActivationV1Integration(XdgActivationV1Interface *activation, QObject *parent);
30
31 QString requestPrivilegedToken(SurfaceInterface *surface, uint serial, SeatInterface *seat, const QString &appId)
32 {
33 return requestToken(true, surface, serial, seat, appId);
34 }
35 void activateSurface(SurfaceInterface *surface, const QString &token);
36
37private:
38 QString requestToken(bool isPrivileged, SurfaceInterface *surface, uint serial, SeatInterface *seat, const QString &appId);
39 void clear();
40
41 struct ActivationToken
42 {
43 QString token;
44 bool isPrivileged;
45 QPointer<const SurfaceInterface> surface;
46 uint serial;
47 SeatInterface *seat;
48 QString applicationId;
49 bool showNotify;
50 std::unique_ptr<PlasmaWindowActivationInterface> activation;
51 };
52 std::unique_ptr<ActivationToken> m_currentActivationToken;
53};
54
55}
Represents a Seat on the Wayland Display.
Definition seat.h:134
Resource representing a wl_surface.
Definition surface.h:80
QString requestPrivilegedToken(SurfaceInterface *surface, uint serial, SeatInterface *seat, const QString &appId)