Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylandxdgactivationv1.cpp
Go to the documentation of this file.
1
// Copyright (C) 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
"qwaylandxdgactivationv1_p.h"
6
#
include
<
QtWaylandClient
/
private
/
qwaylanddisplay_p
.
h
>
7
#
include
<
QtWaylandClient
/
private
/
qwaylandinputdevice_p
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
namespace
QtWaylandClient
{
12
13
QWaylandXdgActivationV1
::
QWaylandXdgActivationV1
(
wl_registry
*
registry
,
uint32_t
id
,
14
uint32_t
availableVersion
)
15
:
QtWayland
::
xdg_activation_v1
(
registry
,
id
,
qMin
(
availableVersion
, 1u))
16
{
17
}
18
19
QWaylandXdgActivationV1
::~
QWaylandXdgActivationV1
()
20
{
21
Q_ASSERT
(
isInitialized
());
22
destroy
();
23
}
24
25
QWaylandXdgActivationTokenV1
*
26
QWaylandXdgActivationV1
::
requestXdgActivationToken
(
QWaylandDisplay
*
display
,
27
struct
::wl_surface *
surface
,
28
std
::
optional
<
uint32_t
>
serial
,
29
const
QString
&
app_id
)
30
{
31
auto
wl
=
get_activation_token
();
32
auto
provider
=
new
QWaylandXdgActivationTokenV1
;
33
provider
->
init
(
wl
);
34
35
if
(
surface
)
36
provider
->
set_surface
(
surface
);
37
38
if
(!
app_id
.
isEmpty
())
39
provider
->
set_app_id
(
app_id
);
40
41
if
(
serial
&&
display
->
lastInputDevice
())
42
provider
->
set_serial
(*
serial
,
display
->
lastInputDevice
()->
wl_seat
());
43
provider
->
commit
();
44
return
provider
;
45
}
46
47
QWaylandXdgActivationTokenV1
::~
QWaylandXdgActivationTokenV1
()
48
{
49
destroy
();
50
}
51
}
52
53
QT_END_NAMESPACE
54
55
#
include
"moc_qwaylandxdgactivationv1_p.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
QtWaylandClient
Definition
qwaylandclientextension.h:16
qtbase
src
plugins
platforms
wayland
plugins
shellintegration
xdg-shell
qwaylandxdgactivationv1.cpp
Generated on
for Qt by
1.16.1