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
qwaylandwlshellintegration.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
6
7#include <QtWaylandClient/private/qwaylandwindow_p.h>
8#include <QtWaylandClient/private/qwaylanddisplay_p.h>
9
11
12namespace QtWaylandClient {
13
15{
16 qCWarning(lcQpaWayland) << "\"wl-shell\" is a deprecated shell extension, prefer using"
17 << "\"xdg-shell\" if supported by the compositor"
18 << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION";
19}
20
22{
23 if (object())
24 wl_shell_destroy(object());
25}
26
31
33{
34 QByteArray lowerCaseResource = resource.toLower();
35 if (lowerCaseResource == "wl_shell_surface") {
36 if (auto waylandWindow = static_cast<QWaylandWindow *>(window->handle())) {
37 if (auto shellSurface = qobject_cast<QWaylandWlShellSurface *>(waylandWindow->shellSurface())) {
38 return shellSurface->object();
39 }
40 }
41 }
42 return nullptr;
43}
44
45} // namespace QtWaylandClient
46
\inmodule QtCore
Definition qbytearray.h:57
QByteArray toLower() const &
Definition qbytearray.h:254
\inmodule QtGui
Definition qwindow.h:63
QWaylandShellSurface * createShellSurface(QWaylandWindow *window) override
void * nativeResourceForWindow(const QByteArray &resource, QWindow *window) override
Combined button and popup list for selecting options.
#define qCWarning(category,...)
aWidget window() -> setWindowTitle("New Window Title")
[2]