Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
5
9#include "qwaylanddisplay_p.h"
10
11#include <QtCore/QDebug>
12
14
15namespace QtWaylandClient {
16
18 : wl_data_device_manager(display->wl_registry(), id, qMin(version, 3))
19 , m_display(display)
20{
21 // Create transfer devices for all input devices.
22 // ### This only works if we get the global before all devices and is surely wrong when hotplugging.
23 QList<QWaylandInputDevice *> inputDevices = m_display->inputDevices();
24 for (int i = 0; i < inputDevices.size();i++) {
25 inputDevices.at(i)->setDataDevice(getDataDevice(inputDevices.at(i)));
26 }
27}
28
30{
31 wl_data_device_manager_destroy(object());
32}
33
38
40{
41 return m_display;
42}
43
44}
45
QWaylandDataDevice * getDataDevice(QWaylandInputDevice *inputDevice)
QWaylandDataDeviceManager(QWaylandDisplay *display, int version, uint32_t id)
QList< QWaylandInputDevice * > inputDevices() const
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
constexpr const T & qMin(const T &a, const T &b)
Definition qminmax.h:40
GLenum GLuint id
[7]