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
qwaylandxdgshellintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 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
7
8#include <QtWaylandClient/private/qwaylandwindow_p.h>
9#include <QtWaylandClient/private/qwaylanddisplay_p.h>
10
12
13namespace QtWaylandClient {
14
16{
18 if (isActive()) {
19 mXdgShell.reset(new QWaylandXdgShell(mDisplay, this));
20 } else {
21 mXdgShell.reset(nullptr);
22 destroy();
23 }
24 });
25}
26
32
38
40{
41 pong(serial);
42}
43
45{
46 return new QWaylandXdgSurface(mXdgShell.get(), get_xdg_surface(window->wlSurface()), window);
47}
48
50{
51 if (auto waylandWindow = static_cast<QWaylandWindow *>(window->handle())) {
52 if (auto xdgSurface = qobject_cast<QWaylandXdgSurface *>(waylandWindow->shellSurface())) {
53 return xdgSurface->nativeResource(resource);
54 }
55 }
56 return nullptr;
57}
58
59}
60
\inmodule QtCore
Definition qbytearray.h:57
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
\inmodule QtGui
Definition qwindow.h:63
void * nativeResourceForWindow(const QByteArray &resource, QWindow *window) override
QWaylandShellSurface * createShellSurface(QWaylandWindow *window) override
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
aWidget window() -> setWindowTitle("New Window Title")
[2]