/* SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez SPDX-License-Identifier: LGPL-2.0-or-later */ #pragma once #include #include #include struct wl_surface; inline wl_surface *surfaceForWindow(QWindow *window) { if (!window) { return nullptr; } QPlatformNativeInterface *native = qGuiApp->platformNativeInterface(); if (!native) { return nullptr; } window->create(); return reinterpret_cast(native->nativeResourceForWindow(QByteArrayLiteral("surface"), window)); }