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
qwaylanddatadevicemanager.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
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
"qwaylanddatadevicemanager_p.h"
6
7
#
include
"qwaylandinputdevice_p.h"
8
#
include
"qwaylanddatadevice_p.h"
9
#
include
"qwaylanddataoffer_p.h"
10
#
include
"qwaylanddisplay_p.h"
11
12
#
include
<
QtCore
/
QDebug
>
13
14
QT_BEGIN_NAMESPACE
15
16
namespace
QtWaylandClient
{
17
18
QWaylandDataDeviceManager
::
QWaylandDataDeviceManager
(
QWaylandDisplay
*
display
,
int
version
,
uint32_t
id
)
19
:
wl_data_device_manager
(
display
->
wl_registry
(),
id
,
qMin
(
version
, 3))
20
,
m_display
(
display
)
21
{
22
// Create transfer devices for all input devices.
23
// ### This only works if we get the global before all devices and is surely wrong when hotplugging.
24
QList
<
QWaylandInputDevice
*>
inputDevices
=
m_display
->
inputDevices
();
25
for
(
int
i
= 0;
i
<
inputDevices
.
size
();
i
++) {
26
inputDevices
.
at
(
i
)->
setDataDevice
(
getDataDevice
(
inputDevices
.
at
(
i
)));
27
}
28
}
29
30
QWaylandDataDeviceManager
::~
QWaylandDataDeviceManager
()
31
{
32
wl_data_device_manager_destroy
(
object
());
33
}
34
35
QWaylandDataDevice
*
QWaylandDataDeviceManager
::
getDataDevice
(
QWaylandInputDevice
*
inputDevice
)
36
{
37
return
new
QWaylandDataDevice
(
this
,
inputDevice
);
38
}
39
40
QWaylandDisplay
*
QWaylandDataDeviceManager
::
display
()
const
41
{
42
return
m_display
;
43
}
44
45
}
46
47
QT_END_NAMESPACE
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
qwaylanddatadevicemanager.cpp
Generated on
for Qt by
1.16.1