Qt 6.x
The Qt SDK
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 return new QWaylandWlShellSurface(get_shell_surface(window->wlSurface()), window);
24}
25
27{
28 QByteArray lowerCaseResource = resource.toLower();
29 if (lowerCaseResource == "wl_shell_surface") {
30 if (auto waylandWindow = static_cast<QWaylandWindow *>(window->handle())) {
31 if (auto shellSurface = qobject_cast<QWaylandWlShellSurface *>(waylandWindow->shellSurface())) {
32 return shellSurface->object();
33 }
34 }
35 }
36 return nullptr;
37}
38
39} // namespace QtWaylandClient
40
\inmodule QtCore
Definition qbytearray.h:57
QByteArray toLower() const &
Definition qbytearray.h:190
\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]