summaryrefslogtreecommitdiffstats
diff options
authorTarja Sundqvist <tarja.sundqvist@qt.io>2025-03-04 15:48:26 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2025-03-04 15:48:26 +0200
commit0d2032224200986d3568ef69811d01218966ebd2 (patch)
tree5bf5102312525386e02c97ffe02bb2488e5de45f
parent270ed828ec3ac58aeb5f412bcb33f48617c200fe (diff)
parentc8863f4533189b804aa7c69992257078a384f7b6 (diff)
Merge tag 'v6.5.5-lts-lgpl' into 6.56.5
Qt 6.5.5-lts-lgpl release
-rw-r--r--.cmake.conf2
-rw-r--r--dependencies.yaml4
-rw-r--r--src/client/global/qwaylandclientextension.cpp2
-rw-r--r--src/client/global/qwaylandclientextension.h2
-rw-r--r--src/client/global/qwaylandclientextension_p.h2
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegration.cpp2
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegration_p.h2
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp2
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h2
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp2
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h2
-rw-r--r--src/client/hardwareintegration/qwaylandhardwareintegration.cpp2
-rw-r--r--src/client/hardwareintegration/qwaylandhardwareintegration_p.h2
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegration.cpp2
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegration_p.h2
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp2
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h2
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp2
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h2
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h2
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp2
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h2
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp2
-rw-r--r--src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h2
-rw-r--r--src/client/qtwaylandclientglobal.h2
-rw-r--r--src/client/qtwaylandclientglobal_p.h2
-rw-r--r--src/client/qwaylandabstractdecoration.cpp2
-rw-r--r--src/client/qwaylandabstractdecoration_p.h2
-rw-r--r--src/client/qwaylandbuffer.cpp2
-rw-r--r--src/client/qwaylandbuffer_p.h2
-rw-r--r--src/client/qwaylandclipboard.cpp2
-rw-r--r--src/client/qwaylandclipboard_p.h2
-rw-r--r--src/client/qwaylandcursor.cpp12
-rw-r--r--src/client/qwaylandcursor_p.h4
-rw-r--r--src/client/qwaylanddatadevice.cpp2
-rw-r--r--src/client/qwaylanddatadevice_p.h2
-rw-r--r--src/client/qwaylanddatadevicemanager.cpp2
-rw-r--r--src/client/qwaylanddatadevicemanager_p.h2
-rw-r--r--src/client/qwaylanddataoffer.cpp42
-rw-r--r--src/client/qwaylanddataoffer_p.h2
-rw-r--r--src/client/qwaylanddatasource.cpp2
-rw-r--r--src/client/qwaylanddatasource_p.h2
-rw-r--r--src/client/qwaylanddecorationfactory.cpp2
-rw-r--r--src/client/qwaylanddecorationfactory_p.h2
-rw-r--r--src/client/qwaylanddecorationplugin.cpp2
-rw-r--r--src/client/qwaylanddecorationplugin_p.h2
-rw-r--r--src/client/qwaylanddisplay.cpp2
-rw-r--r--src/client/qwaylanddisplay_p.h2
-rw-r--r--src/client/qwaylanddnd.cpp2
-rw-r--r--src/client/qwaylanddnd_p.h2
-rw-r--r--src/client/qwaylandextendedsurface.cpp2
-rw-r--r--src/client/qwaylandextendedsurface_p.h2
-rw-r--r--src/client/qwaylandfractionalscale.cpp2
-rw-r--r--src/client/qwaylandfractionalscale_p.h2
-rw-r--r--src/client/qwaylandinputcontext.cpp65
-rw-r--r--src/client/qwaylandinputcontext_p.h2
-rw-r--r--src/client/qwaylandinputdevice.cpp5
-rw-r--r--src/client/qwaylandinputdevice_p.h2
-rw-r--r--src/client/qwaylandinputmethodcontext.cpp5
-rw-r--r--src/client/qwaylandinputmethodcontext_p.h2
-rw-r--r--src/client/qwaylandintegration.cpp2
-rw-r--r--src/client/qwaylandintegration_p.h2
-rw-r--r--src/client/qwaylandnativeinterface.cpp2
-rw-r--r--src/client/qwaylandnativeinterface_p.h2
-rw-r--r--src/client/qwaylandpointergestures.cpp2
-rw-r--r--src/client/qwaylandpointergestures_p.h2
-rw-r--r--src/client/qwaylandprimaryselectionv1.cpp2
-rw-r--r--src/client/qwaylandprimaryselectionv1_p.h2
-rw-r--r--src/client/qwaylandqtkey.cpp2
-rw-r--r--src/client/qwaylandqtkey_p.h2
-rw-r--r--src/client/qwaylandscreen.cpp31
-rw-r--r--src/client/qwaylandscreen_p.h5
-rw-r--r--src/client/qwaylandshellsurface.cpp2
-rw-r--r--src/client/qwaylandshellsurface_p.h2
-rw-r--r--src/client/qwaylandshm.cpp2
-rw-r--r--src/client/qwaylandshm_p.h2
-rw-r--r--src/client/qwaylandshmbackingstore.cpp2
-rw-r--r--src/client/qwaylandshmbackingstore_p.h2
-rw-r--r--src/client/qwaylandshmwindow.cpp2
-rw-r--r--src/client/qwaylandshmwindow_p.h2
-rw-r--r--src/client/qwaylandsubsurface.cpp2
-rw-r--r--src/client/qwaylandsubsurface_p.h2
-rw-r--r--src/client/qwaylandsurface.cpp2
-rw-r--r--src/client/qwaylandsurface_p.h2
-rw-r--r--src/client/qwaylandtabletv2.cpp2
-rw-r--r--src/client/qwaylandtabletv2_p.h2
-rw-r--r--src/client/qwaylandtextinputinterface.cpp2
-rw-r--r--src/client/qwaylandtextinputinterface_p.h2
-rw-r--r--src/client/qwaylandtextinputv1.cpp2
-rw-r--r--src/client/qwaylandtextinputv1_p.h2
-rw-r--r--src/client/qwaylandtextinputv2.cpp3
-rw-r--r--src/client/qwaylandtextinputv2_p.h2
-rw-r--r--src/client/qwaylandtextinputv4.cpp2
-rw-r--r--src/client/qwaylandtextinputv4_p.h2
-rw-r--r--src/client/qwaylandtouch.cpp2
-rw-r--r--src/client/qwaylandtouch_p.h2
-rw-r--r--src/client/qwaylandviewport.cpp2
-rw-r--r--src/client/qwaylandviewport_p.h2
-rw-r--r--src/client/qwaylandvulkaninstance.cpp2
-rw-r--r--src/client/qwaylandvulkaninstance_p.h2
-rw-r--r--src/client/qwaylandvulkanwindow.cpp2
-rw-r--r--src/client/qwaylandvulkanwindow_p.h2
-rw-r--r--src/client/qwaylandwindow.cpp6
-rw-r--r--src/client/qwaylandwindow_p.h2
-rw-r--r--src/client/qwaylandwindowmanagerintegration.cpp2
-rw-r--r--src/client/qwaylandwindowmanagerintegration_p.h2
-rw-r--r--src/client/shellintegration/qwaylandclientshellapi_p.h2
-rw-r--r--src/client/shellintegration/qwaylandshellintegration.cpp2
-rw-r--r--src/client/shellintegration/qwaylandshellintegration_p.h2
-rw-r--r--src/client/shellintegration/qwaylandshellintegrationfactory.cpp2
-rw-r--r--src/client/shellintegration/qwaylandshellintegrationfactory_p.h2
-rw-r--r--src/client/shellintegration/qwaylandshellintegrationplugin.cpp2
-rw-r--r--src/client/shellintegration/qwaylandshellintegrationplugin_p.h2
-rw-r--r--src/compositor/CMakeLists.txt1
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp5
-rw-r--r--src/compositor/extensions/qwaylandtextinputmanagerv4.cpp2
-rw-r--r--src/compositor/extensions/qwaylandtextinputmanagerv4.h2
-rw-r--r--src/compositor/extensions/qwaylandtextinputmanagerv4_p.h2
-rw-r--r--src/compositor/extensions/qwaylandtextinputv4.cpp2
-rw-r--r--src/compositor/extensions/qwaylandtextinputv4.h2
-rw-r--r--src/compositor/extensions/qwaylandtextinputv4_p.h2
-rw-r--r--src/compositor/hardware_integration/qwltextureorphanage.cpp108
-rw-r--r--src/compositor/hardware_integration/qwltextureorphanage_p.h64
-rw-r--r--src/compositor/shaders/surface.vert2
-rw-r--r--src/compositor/shaders/surface_oes_external.frag2
-rw-r--r--src/compositor/shaders/surface_rgba.frag2
-rw-r--r--src/compositor/shaders/surface_rgbx.frag2
-rw-r--r--src/compositor/shaders/surface_y_u_v.frag2
-rw-r--r--src/compositor/shaders/surface_y_uv.frag2
-rw-r--r--src/compositor/shaders/surface_y_xuxv.frag2
-rw-r--r--src/extensions/brcm.xml2
-rw-r--r--src/extensions/drm-egl-server-buffer.xml2
-rw-r--r--src/extensions/hardware-integration.xml2
-rw-r--r--src/extensions/libhybris-egl-server-buffer.xml2
-rw-r--r--src/extensions/qt-dmabuf-server-buffer.xml2
-rw-r--r--src/extensions/qt-key-unstable-v1.xml2
-rw-r--r--src/extensions/qt-shell-unstable-v1.xml2
-rw-r--r--src/extensions/qt-texture-sharing-unstable-v1.xml2
-rw-r--r--src/extensions/qt-vulkan-server-buffer-unstable-v1.xml2
-rw-r--r--src/extensions/qt-windowmanager.xml2
-rw-r--r--src/extensions/server-buffer-extension.xml2
-rw-r--r--src/extensions/shm-emulation-server-buffer.xml2
-rw-r--r--src/extensions/surface-extension.xml2
-rw-r--r--src/extensions/touch-extension.xml2
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp2
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h2
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp2
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h2
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp2
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h2
-rw-r--r--src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.h2
-rw-r--r--src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h2
-rw-r--r--src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h2
-rw-r--r--src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h2
-rw-r--r--src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.h2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration_p.h2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglinclude_p.h2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp4
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp8
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext_p.h2
-rw-r--r--src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp4
-rw-r--r--src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp66
-rw-r--r--src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h7
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp84
-rw-r--r--src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp81
-rw-r--r--src/imports/texture-sharing-extension/plugin.cpp2
-rw-r--r--src/imports/texture-sharing/plugin.cpp2
-rw-r--r--src/imports/texture-sharing/sharedtextureprovider.cpp2
-rw-r--r--src/imports/texture-sharing/sharedtextureprovider_p.h2
-rw-r--r--src/imports/texture-sharing/texturesharingextension.cpp2
-rw-r--r--src/imports/texture-sharing/texturesharingextension_p.h2
-rw-r--r--src/plugins/decorations/bradient/main.cpp30
-rw-r--r--src/plugins/hardwareintegration/client/brcm-egl/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/dmabuf-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/shm-emulation-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/vulkan-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/wayland-egl/main.cpp2
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/main.cpp2
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h2
-rw-r--r--src/plugins/platforms/qwayland-egl/main.cpp2
-rw-r--r--src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h2
-rw-r--r--src/plugins/platforms/qwayland-generic/main.cpp2
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/main.cpp2
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp2
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h2
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp2
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h2
-rw-r--r--src/plugins/shellintegration/ivi-shell/main.cpp2
-rw-r--r--src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp2
-rw-r--r--src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h2
-rw-r--r--src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp2
-rw-r--r--src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h2
-rw-r--r--src/plugins/shellintegration/qt-shell/main.cpp2
-rw-r--r--src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp2
-rw-r--r--src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.h2
-rw-r--r--src/plugins/shellintegration/qt-shell/qwaylandqtsurface.cpp2
-rw-r--r--src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h2
-rw-r--r--src/plugins/shellintegration/wl-shell/main.cpp2
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp2
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h2
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp2
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell/main.cpp2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1.cpp2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1.cpp2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2.cpp2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp15
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h2
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp2
-rw-r--r--src/shared/qwaylandinputmethodeventbuilder.cpp2
-rw-r--r--src/shared/qwaylandinputmethodeventbuilder_p.h2
-rw-r--r--src/shared/qwaylandmimehelper.cpp2
-rw-r--r--src/shared/qwaylandmimehelper_p.h2
-rw-r--r--src/shared/qwaylandsharedmemoryformathelper_p.h2
-rw-r--r--tests/auto/client/datadevicev1/tst_datadevicev1.cpp42
-rw-r--r--tests/auto/client/shared/textinput.cpp3
230 files changed, 599 insertions, 513 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 3414cde23..a3856a480 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1,3 +1,3 @@
-set(QT_REPO_MODULE_VERSION "6.5.4")
+set(QT_REPO_MODULE_VERSION "6.5.5")
set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
diff --git a/dependencies.yaml b/dependencies.yaml
index 3e718a624..7a34e83f4 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,7 +1,7 @@
dependencies:
../tqtc-qtbase:
- ref: 8ff0b254e4c3db81254782262d827f7831d15f6b
+ ref: fdf57f5df57e7d12cf871699d857a71acf272e0c
required: true
../tqtc-qtdeclarative:
- ref: 9edb471d3a35b3dc40def86c395789086edaa983
+ ref: 7ac842cba18be081ac835bf40ac475ec4c47d30b
required: false
diff --git a/src/client/global/qwaylandclientextension.cpp b/src/client/global/qwaylandclientextension.cpp
index b2783088b..dbf4b296c 100644
--- a/src/client/global/qwaylandclientextension.cpp
+++ b/src/client/global/qwaylandclientextension.cpp
@@ -1,6 +1,6 @@
// Copyright (C) 2017 Erik Larsson.
// Copyright (C) 2021 David Redondo <qt@david-redondo.de>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandclientextension.h"
#include "qwaylandclientextension_p.h"
diff --git a/src/client/global/qwaylandclientextension.h b/src/client/global/qwaylandclientextension.h
index 8fe74e379..7af4b5a0d 100644
--- a/src/client/global/qwaylandclientextension.h
+++ b/src/client/global/qwaylandclientextension.h
@@ -1,5 +1,5 @@
// Copyright (C) 2017 Erik Larsson.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIENTEXTENSION_H
#define QWAYLANDCLIENTEXTENSION_H
diff --git a/src/client/global/qwaylandclientextension_p.h b/src/client/global/qwaylandclientextension_p.h
index b3ef87a5d..19344a491 100644
--- a/src/client/global/qwaylandclientextension_p.h
+++ b/src/client/global/qwaylandclientextension_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2017 Erik Larsson.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIENTEXTENSION_P_H
#define QWAYLANDCLIENTEXTENSION_P_H
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp
index b521521b8..2b2e62386 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandclientbufferintegration_p.h"
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h
index e8b78c52b..7aaf46ec6 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIENTBUFFERINTEGRATION_H
#define QWAYLANDCLIENTBUFFERINTEGRATION_H
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
index 65c7a450d..9958a9291 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandclientbufferintegrationfactory_p.h"
#include "qwaylandclientbufferintegrationplugin_p.h"
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h
index 2344df59c..12bbd4459 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
#define QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp
index 0335a9219..8f093abc1 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandclientbufferintegrationplugin_p.h"
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
index 0cedabff3..bf7466999 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
#define QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
diff --git a/src/client/hardwareintegration/qwaylandhardwareintegration.cpp b/src/client/hardwareintegration/qwaylandhardwareintegration.cpp
index a8f59a7a5..c3a32d300 100644
--- a/src/client/hardwareintegration/qwaylandhardwareintegration.cpp
+++ b/src/client/hardwareintegration/qwaylandhardwareintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandhardwareintegration_p.h"
diff --git a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
index d82253f92..bcd172576 100644
--- a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDHARDWAREINTEGRATION_H
#define QWAYLANDHARDWAREINTEGRATION_H
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
index 64fd7686b..bcc3403ad 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandserverbufferintegration_p.h"
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
index 92236a7ff..9123f1c03 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSERVERBUFFERINTEGRATION_H
#define QWAYLANDSERVERBUFFERINTEGRATION_H
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
index e30bb4dc0..67efe90c2 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandserverbufferintegrationfactory_p.h"
#include "qwaylandserverbufferintegrationplugin_p.h"
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h
index bce4c45d0..7ada04680 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationfactory_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H
#define QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp
index 1a01ca04d..a7c2f472a 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandserverbufferintegrationplugin_p.h"
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
index 6be8ca8bf..72b173c18 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H
#define QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h b/src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h
index 9a6c8df0b..0aea997a5 100644
--- a/src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 LG Electronics Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDINPUTDEVICEINTEGRATION_H
#define QWAYLANDINPUTDEVICEINTEGRATION_H
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp
index 1c8eb213d..eb4e2aa6d 100644
--- a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 LG Electronics Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandinputdeviceintegrationfactory_p.h"
#include "qwaylandinputdeviceintegrationplugin_p.h"
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h
index 087c963e1..095164a04 100644
--- a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationfactory_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 LG Electronics Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDINPUTDEVICEINTEGRATIONFACTORY_H
#define QWAYLANDINPUTDEVICEINTEGRATIONFACTORY_H
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp
index 424b44d3f..141f6620a 100644
--- a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 LG Electronics Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandinputdeviceintegrationplugin_p.h"
diff --git a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h
index e43ce1bd1..ca4547ccf 100644
--- a/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h
+++ b/src/client/inputdeviceintegration/qwaylandinputdeviceintegrationplugin_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 LG Electronics Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
#define QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
diff --git a/src/client/qtwaylandclientglobal.h b/src/client/qtwaylandclientglobal.h
index 1582176ea..7ecb03657 100644
--- a/src/client/qtwaylandclientglobal.h
+++ b/src/client/qtwaylandclientglobal.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIENTGLOBAL_H
#define QWAYLANDCLIENTGLOBAL_H
diff --git a/src/client/qtwaylandclientglobal_p.h b/src/client/qtwaylandclientglobal_p.h
index f98d143d2..7ffa06d13 100644
--- a/src/client/qtwaylandclientglobal_p.h
+++ b/src/client/qtwaylandclientglobal_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIENTGLOBAL_P_H
#define QWAYLANDCLIENTGLOBAL_P_H
diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp
index 699618f68..67c6d7733 100644
--- a/src/client/qwaylandabstractdecoration.cpp
+++ b/src/client/qwaylandabstractdecoration.cpp
@@ -1,6 +1,6 @@
// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandabstractdecoration_p.h"
diff --git a/src/client/qwaylandabstractdecoration_p.h b/src/client/qwaylandabstractdecoration_p.h
index 3334e00c1..14f35d1d7 100644
--- a/src/client/qwaylandabstractdecoration_p.h
+++ b/src/client/qwaylandabstractdecoration_p.h
@@ -1,6 +1,6 @@
// Copyright (C) 2017 Robin Burchell <robin.burchell@viroteck.net>
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDABSTRACTDECORATION_H
#define QWAYLANDABSTRACTDECORATION_H
diff --git a/src/client/qwaylandbuffer.cpp b/src/client/qwaylandbuffer.cpp
index 1907d5864..de7723612 100644
--- a/src/client/qwaylandbuffer.cpp
+++ b/src/client/qwaylandbuffer.cpp
@@ -1,6 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// Copyright (C) 2017 Giulio Camuffo.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandbuffer_p.h"
diff --git a/src/client/qwaylandbuffer_p.h b/src/client/qwaylandbuffer_p.h
index 381debc81..7aeb3a135 100644
--- a/src/client/qwaylandbuffer_p.h
+++ b/src/client/qwaylandbuffer_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDBUFFER_H
#define QWAYLANDBUFFER_H
diff --git a/src/client/qwaylandclipboard.cpp b/src/client/qwaylandclipboard.cpp
index df6cf5d2b..7174346f0 100644
--- a/src/client/qwaylandclipboard.cpp
+++ b/src/client/qwaylandclipboard.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandclipboard_p.h"
#include "qwaylanddisplay_p.h"
diff --git a/src/client/qwaylandclipboard_p.h b/src/client/qwaylandclipboard_p.h
index 414e3dc71..3a8c2cf0c 100644
--- a/src/client/qwaylandclipboard_p.h
+++ b/src/client/qwaylandclipboard_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIPBOARD_H
#define QWAYLANDCLIPBOARD_H
diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp
index 67a846df6..14b354965 100644
--- a/src/client/qwaylandcursor.cpp
+++ b/src/client/qwaylandcursor.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandcursor_p.h"
@@ -7,6 +7,9 @@
#include "qwaylandinputdevice_p.h"
#include "qwaylandshmbackingstore_p.h"
+#include <QtGui/private/qguiapplication_p.h>
+#include <qpa/qplatformtheme.h>
+
#include <QtGui/QImageReader>
#include <QDebug>
@@ -250,6 +253,13 @@ void QWaylandCursor::setPos(const QPoint &pos)
qCWarning(lcQpaWayland) << "Setting cursor position is not possible on wayland";
}
+QSize QWaylandCursor::size() const
+{
+ if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme())
+ return theme->themeHint(QPlatformTheme::MouseCursorSize).toSize();
+ return QSize(24, 24);
+}
+
} // namespace QtWaylandClient
QT_END_NAMESPACE
diff --git a/src/client/qwaylandcursor_p.h b/src/client/qwaylandcursor_p.h
index 2334c88d9..56e308f37 100644
--- a/src/client/qwaylandcursor_p.h
+++ b/src/client/qwaylandcursor_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCURSOR_H
#define QWAYLANDCURSOR_H
@@ -97,6 +97,8 @@ public:
QPoint pos() const override;
void setPos(const QPoint &pos) override;
+ QSize size() const override;
+
static QSharedPointer<QWaylandBuffer> cursorBitmapBuffer(QWaylandDisplay *display, const QCursor *cursor);
protected:
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp
index badb9d2fc..50ed94418 100644
--- a/src/client/qwaylanddatadevice.cpp
+++ b/src/client/qwaylanddatadevice.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB (KDAB).
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylanddatadevice_p.h"
diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h
index 76c8965f9..44c9f338e 100644
--- a/src/client/qwaylanddatadevice_p.h
+++ b/src/client/qwaylanddatadevice_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB (KDAB).
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDDATADEVICE_H
diff --git a/src/client/qwaylanddatadevicemanager.cpp b/src/client/qwaylanddatadevicemanager.cpp
index 961d055ea..771e3b425 100644
--- a/src/client/qwaylanddatadevicemanager.cpp
+++ b/src/client/qwaylanddatadevicemanager.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylanddatadevicemanager_p.h"
diff --git a/src/client/qwaylanddatadevicemanager_p.h b/src/client/qwaylanddatadevicemanager_p.h
index 7e1cb1e45..9c362291d 100644
--- a/src/client/qwaylanddatadevicemanager_p.h
+++ b/src/client/qwaylanddatadevicemanager_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDDATADEVICEMANAGER_H
#define QWAYLANDDATADEVICEMANAGER_H
diff --git a/src/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp
index c44a3573b..9515cb98e 100644
--- a/src/client/qwaylanddataoffer.cpp
+++ b/src/client/qwaylanddataoffer.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylanddataoffer_p.h"
#include "qwaylanddatadevicemanager_p.h"
@@ -40,20 +40,33 @@ static QByteArray convertData(const QString &originalMime, const QString &newMim
// see also qtbase/src/plugins/platforms/xcb/qxcbmime.cpp
if (originalMime == uriList() && newMime == mozUrl()) {
if (data.size() > 1) {
- const QString str = QString::fromUtf16(
- reinterpret_cast<const char16_t *>(data.constData()), data.size() / 2);
- if (!str.isNull()) {
+ const quint8 byte0 = data.at(0);
+ const quint8 byte1 = data.at(1);
+
+ if ((byte0 == 0xff && byte1 == 0xfe) || (byte0 == 0xfe && byte1 == 0xff)
+ || (byte0 != 0 && byte1 == 0) || (byte0 == 0 && byte1 != 0)) {
QByteArray converted;
- const auto urls = QStringView{str}.split(u'\n');
- // Only the URL is interesting, skip the page title.
- for (int i = 0; i < urls.size(); i += 2) {
- const QUrl url(urls.at(i).trimmed().toString());
- if (url.isValid()) {
- converted += url.toEncoded();
- converted += "\r\n";
+ const QString str = QString::fromUtf16(
+ reinterpret_cast<const char16_t *>(data.constData()), data.size() / 2);
+ if (!str.isNull()) {
+ const auto urls = QStringView{str}.split(u'\n');
+ // Only the URL is interesting, skip the page title.
+ for (int i = 0; i < urls.size(); i += 2) {
+ const QUrl url(urls.at(i).trimmed().toString());
+ if (url.isValid()) {
+ converted += url.toEncoded();
+ converted += "\r\n";
+ }
}
}
return converted;
+ // 8 byte encoding, remove a possible 0 at the end.
+ } else {
+ QByteArray converted = data;
+ if (converted.endsWith('\0'))
+ converted.chop(1);
+ converted += "\r\n";
+ return converted;
}
}
}
@@ -134,8 +147,11 @@ QWaylandMimeData::~QWaylandMimeData()
void QWaylandMimeData::appendFormat(const QString &mimeType)
{
- m_types << mimeType;
- m_data.remove(mimeType); // Clear previous contents
+ // "DELETE" is a potential leftover from XdndActionMode sent by e.g. Firefox, ignore it.
+ if (mimeType != QLatin1String("DELETE")) {
+ m_types << mimeType;
+ m_data.remove(mimeType); // Clear previous contents
+ }
}
bool QWaylandMimeData::hasFormat_sys(const QString &mimeType) const
diff --git a/src/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h
index 1c99147d2..399be5792 100644
--- a/src/client/qwaylanddataoffer_p.h
+++ b/src/client/qwaylanddataoffer_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDDATAOFFER_H
#define QWAYLANDDATAOFFER_H
diff --git a/src/client/qwaylanddatasource.cpp b/src/client/qwaylanddatasource.cpp
index 966d5ef7f..1b8b664da 100644
--- a/src/client/qwaylanddatasource.cpp
+++ b/src/client/qwaylanddatasource.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylanddatasource_p.h"
#include "qwaylanddataoffer_p.h"
diff --git a/src/client/qwaylanddatasource_p.h b/src/client/qwaylanddatasource_p.h
index a4b317c26..27e1d2485 100644
--- a/src/client/qwaylanddatasource_p.h
+++ b/src/client/qwaylanddatasource_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDDATASOURCE_H
#define QWAYLANDDATASOURCE_H
diff --git a/src/client/qwaylanddecorationfactory.cpp b/src/client/qwaylanddecorationfactory.cpp
index b716a4aee..64d64b680 100644
--- a/src/client/qwaylanddecorationfactory.cpp
+++ b/src/client/qwaylanddecorationfactory.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylanddecorationfactory_p.h"
#include "qwaylanddecorationplugin_p.h"
diff --git a/src/client/qwaylanddecorationfactory_p.h b/src/client/qwaylanddecorationfactory_p.h
index bd0998631..b3dbad73c 100644
--- a/src/client/qwaylanddecorationfactory_p.h
+++ b/src/client/qwaylanddecorationfactory_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDDECORATIONFACTORY_H
#define QWAYLANDDECORATIONFACTORY_H
diff --git a/src/client/qwaylanddecorationplugin.cpp b/src/client/qwaylanddecorationplugin.cpp
index f64211996..6561df448 100644
--- a/src/client/qwaylanddecorationplugin.cpp
+++ b/src/client/qwaylanddecorationplugin.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylanddecorationplugin_p.h"
diff --git a/src/client/qwaylanddecorationplugin_p.h b/src/client/qwaylanddecorationplugin_p.h
index e09d99702..e50e05d23 100644
--- a/src/client/qwaylanddecorationplugin_p.h
+++ b/src/client/qwaylanddecorationplugin_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDDECORATIONPLUGIN_H
#define QWAYLANDDECORATIONPLUGIN_H
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index a7264fdfd..302644c80 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylanddisplay_p.h"
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index 8bc4c0bf0..f65d9fdfa 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDDISPLAY_H
#define QWAYLANDDISPLAY_H
diff --git a/src/client/qwaylanddnd.cpp b/src/client/qwaylanddnd.cpp
index 5ea1e0d33..6c64cf774 100644
--- a/src/client/qwaylanddnd.cpp
+++ b/src/client/qwaylanddnd.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylanddnd_p.h"
diff --git a/src/client/qwaylanddnd_p.h b/src/client/qwaylanddnd_p.h
index 4952c6d3d..13f1a1299 100644
--- a/src/client/qwaylanddnd_p.h
+++ b/src/client/qwaylanddnd_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDDND_H
#define QWAYLANDDND_H
diff --git a/src/client/qwaylandextendedsurface.cpp b/src/client/qwaylandextendedsurface.cpp
index a61612ce8..7296accc1 100644
--- a/src/client/qwaylandextendedsurface.cpp
+++ b/src/client/qwaylandextendedsurface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandextendedsurface_p.h"
diff --git a/src/client/qwaylandextendedsurface_p.h b/src/client/qwaylandextendedsurface_p.h
index 0a7c6e5ad..e0137d968 100644
--- a/src/client/qwaylandextendedsurface_p.h
+++ b/src/client/qwaylandextendedsurface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDEXTENDEDSURFACE_H
#define QWAYLANDEXTENDEDSURFACE_H
diff --git a/src/client/qwaylandfractionalscale.cpp b/src/client/qwaylandfractionalscale.cpp
index 324a0b729..732a66380 100644
--- a/src/client/qwaylandfractionalscale.cpp
+++ b/src/client/qwaylandfractionalscale.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2022 David Edmundson <davidedmundson@kde.org>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandfractionalscale_p.h"
diff --git a/src/client/qwaylandfractionalscale_p.h b/src/client/qwaylandfractionalscale_p.h
index 0483eb338..718057a6f 100644
--- a/src/client/qwaylandfractionalscale_p.h
+++ b/src/client/qwaylandfractionalscale_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2022 David Edmundson <davidedmundson@kde.org>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDFRACTIONALSCALE_P_H
#define QWAYLANDFRACTIONALSCALE_P_H
diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp
index 369a4e5c2..27349d918 100644
--- a/src/client/qwaylandinputcontext.cpp
+++ b/src/client/qwaylandinputcontext.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandinputcontext_p.h"
@@ -52,20 +52,22 @@ void QWaylandInputContext::reset()
QPlatformInputContext::reset();
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return;
- textInput()->reset();
+ inputInterface->reset();
}
void QWaylandInputContext::commit()
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return;
- textInput()->commit();
+ inputInterface->commit();
}
static ::wl_surface *surfaceForWindow(QWindow *window)
@@ -81,92 +83,100 @@ void QWaylandInputContext::update(Qt::InputMethodQueries queries)
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO << queries;
- if (!QGuiApplication::focusObject() || !textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!QGuiApplication::focusObject() || !inputInterface)
return;
auto *currentSurface = surfaceForWindow(mCurrentWindow);
if (currentSurface && !inputMethodAccepted()) {
- textInput()->disableSurface(currentSurface);
+ inputInterface->disableSurface(currentSurface);
mCurrentWindow.clear();
} else if (!currentSurface && inputMethodAccepted()) {
QWindow *window = QGuiApplication::focusWindow();
if (auto *focusSurface = surfaceForWindow(window)) {
- textInput()->enableSurface(focusSurface);
+ inputInterface->enableSurface(focusSurface);
mCurrentWindow = window;
}
}
- textInput()->updateState(queries, QWaylandTextInputInterface::update_state_change);
+ inputInterface->updateState(queries, QWaylandTextInputInterface::update_state_change);
}
void QWaylandInputContext::invokeAction(QInputMethod::Action action, int cursorPostion)
{
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return;
if (action == QInputMethod::Click)
- textInput()->setCursorInsidePreedit(cursorPostion);
+ inputInterface->setCursorInsidePreedit(cursorPostion);
}
void QWaylandInputContext::showInputPanel()
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return;
- textInput()->showInputPanel();
+ inputInterface->showInputPanel();
}
void QWaylandInputContext::hideInputPanel()
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return;
- textInput()->hideInputPanel();
+ inputInterface->hideInputPanel();
}
bool QWaylandInputContext::isInputPanelVisible() const
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return QPlatformInputContext::isInputPanelVisible();
- return textInput()->isInputPanelVisible();
+ return inputInterface->isInputPanelVisible();
}
QRectF QWaylandInputContext::keyboardRect() const
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return QPlatformInputContext::keyboardRect();
- return textInput()->keyboardRect();
+ return inputInterface->keyboardRect();
}
QLocale QWaylandInputContext::locale() const
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return QPlatformInputContext::locale();
- return textInput()->locale();
+ return inputInterface->locale();
}
Qt::LayoutDirection QWaylandInputContext::inputDirection() const
{
qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO;
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return QPlatformInputContext::inputDirection();
- return textInput()->inputDirection();
+ return inputInterface->inputDirection();
}
void QWaylandInputContext::setFocusObject(QObject *object)
@@ -178,7 +188,8 @@ void QWaylandInputContext::setFocusObject(QObject *object)
Q_UNUSED(object);
#endif
- if (!textInput())
+ QWaylandTextInputInterface *inputInterface = textInput();
+ if (!inputInterface)
return;
QWindow *window = QGuiApplication::focusWindow();
@@ -187,7 +198,7 @@ void QWaylandInputContext::setFocusObject(QObject *object)
if (mCurrentWindow.data() != window || !inputMethodAccepted()) {
auto *surface = static_cast<QWaylandWindow *>(mCurrentWindow->handle())->wlSurface();
if (surface)
- textInput()->disableSurface(surface);
+ inputInterface->disableSurface(surface);
mCurrentWindow.clear();
}
}
@@ -196,11 +207,11 @@ void QWaylandInputContext::setFocusObject(QObject *object)
if (mCurrentWindow.data() != window) {
auto *surface = static_cast<QWaylandWindow *>(window->handle())->wlSurface();
if (surface) {
- textInput()->enableSurface(surface);
+ inputInterface->enableSurface(surface);
mCurrentWindow = window;
}
}
- textInput()->updateState(Qt::ImQueryAll, QWaylandTextInputInterface::update_state_enter);
+ inputInterface->updateState(Qt::ImQueryAll, QWaylandTextInputInterface::update_state_enter);
}
}
diff --git a/src/client/qwaylandinputcontext_p.h b/src/client/qwaylandinputcontext_p.h
index e6ce21d34..ae14922c2 100644
--- a/src/client/qwaylandinputcontext_p.h
+++ b/src/client/qwaylandinputcontext_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDINPUTCONTEXT_H
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 7f90beb92..f862e5be2 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandinputdevice_p.h"
@@ -1301,8 +1301,7 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time,
auto code = key + 8; // map to wl_keyboard::keymap_format::keymap_format_xkb_v1
xkb_keysym_t sym = xkb_state_key_get_one_sym(mXkbState.get(), code);
-
- Qt::KeyboardModifiers modifiers = mParent->modifiers();
+ Qt::KeyboardModifiers modifiers = QXkbCommon::modifiers(mXkbState.get(), sym);
int qtkey = keysymToQtKey(sym, modifiers, mXkbState.get(), code);
QString text = QXkbCommon::lookupString(mXkbState.get(), code);
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index 157c33675..9d0451cfb 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDINPUTDEVICE_H
#define QWAYLANDINPUTDEVICE_H
diff --git a/src/client/qwaylandinputmethodcontext.cpp b/src/client/qwaylandinputmethodcontext.cpp
index f03d8fb74..358429d55 100644
--- a/src/client/qwaylandinputmethodcontext.cpp
+++ b/src/client/qwaylandinputmethodcontext.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2020 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandinputmethodcontext_p.h"
#include "qwaylanddisplay_p.h"
@@ -361,6 +361,9 @@ void QWaylandInputMethodContext::setFocusObject(QObject *)
if (inputMethod == nullptr)
return;
+ if (inputMethod->isVisible() && !inputMethodAccepted())
+ inputMethod->hide_input_panel();
+
QWindow *window = QGuiApplication::focusWindow();
if (m_currentWindow != nullptr && m_currentWindow->handle() != nullptr) {
diff --git a/src/client/qwaylandinputmethodcontext_p.h b/src/client/qwaylandinputmethodcontext_p.h
index 85ef65601..87e306d1f 100644
--- a/src/client/qwaylandinputmethodcontext_p.h
+++ b/src/client/qwaylandinputmethodcontext_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDINPUTMETHODCONTEXT_P_H
#define QWAYLANDINPUTMETHODCONTEXT_P_H
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 06a1aec3d..dba1fbc9b 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandintegration_p.h"
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
index d3eb50f7d..5f6daebcd 100644
--- a/src/client/qwaylandintegration_p.h
+++ b/src/client/qwaylandintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QPLATFORMINTEGRATION_WAYLAND_H
#define QPLATFORMINTEGRATION_WAYLAND_H
diff --git a/src/client/qwaylandnativeinterface.cpp b/src/client/qwaylandnativeinterface.cpp
index 65272f3c2..b808b140d 100644
--- a/src/client/qwaylandnativeinterface.cpp
+++ b/src/client/qwaylandnativeinterface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandnativeinterface_p.h"
#include "qwaylanddisplay_p.h"
diff --git a/src/client/qwaylandnativeinterface_p.h b/src/client/qwaylandnativeinterface_p.h
index ce8c6bec3..0f46569dd 100644
--- a/src/client/qwaylandnativeinterface_p.h
+++ b/src/client/qwaylandnativeinterface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2020 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDNATIVEINTERFACE_P_H
#define QWAYLANDNATIVEINTERFACE_P_H
diff --git a/src/client/qwaylandpointergestures.cpp b/src/client/qwaylandpointergestures.cpp
index 1cdd97edd..9093b1d47 100644
--- a/src/client/qwaylandpointergestures.cpp
+++ b/src/client/qwaylandpointergestures.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandpointergestures_p.h"
#include "qwaylanddisplay_p.h"
diff --git a/src/client/qwaylandpointergestures_p.h b/src/client/qwaylandpointergestures_p.h
index 7e5a7e06f..63e344226 100644
--- a/src/client/qwaylandpointergestures_p.h
+++ b/src/client/qwaylandpointergestures_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDPOINTERGESTURES_P_H
#define QWAYLANDPOINTERGESTURES_P_H
diff --git a/src/client/qwaylandprimaryselectionv1.cpp b/src/client/qwaylandprimaryselectionv1.cpp
index 999aba970..4d8f9704f 100644
--- a/src/client/qwaylandprimaryselectionv1.cpp
+++ b/src/client/qwaylandprimaryselectionv1.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandprimaryselectionv1_p.h"
#include "qwaylandinputdevice_p.h"
diff --git a/src/client/qwaylandprimaryselectionv1_p.h b/src/client/qwaylandprimaryselectionv1_p.h
index 59bb62116..c76af71ea 100644
--- a/src/client/qwaylandprimaryselectionv1_p.h
+++ b/src/client/qwaylandprimaryselectionv1_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDPRIMARYSELECTIONV1_P_H
#define QWAYLANDPRIMARYSELECTIONV1_P_H
diff --git a/src/client/qwaylandqtkey.cpp b/src/client/qwaylandqtkey.cpp
index f6bda97d8..11b43a29a 100644
--- a/src/client/qwaylandqtkey.cpp
+++ b/src/client/qwaylandqtkey.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandqtkey_p.h"
#include "qwaylandinputdevice_p.h"
diff --git a/src/client/qwaylandqtkey_p.h b/src/client/qwaylandqtkey_p.h
index 223b05026..9cafa4801 100644
--- a/src/client/qwaylandqtkey_p.h
+++ b/src/client/qwaylandqtkey_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDQTKEY_H
#define QWAYLANDQTKEY_H
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 7c4f1bdf2..ad506c375 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandscreen_p.h"
@@ -190,6 +190,32 @@ QPlatformCursor *QWaylandScreen::cursor() const
}
#endif // QT_CONFIG(cursor)
+QPlatformScreen::SubpixelAntialiasingType QWaylandScreen::subpixelAntialiasingTypeHint() const
+{
+ QPlatformScreen::SubpixelAntialiasingType type = QPlatformScreen::subpixelAntialiasingTypeHint();
+ if (type == QPlatformScreen::Subpixel_None) {
+ switch (mSubpixel) {
+ case wl_output::subpixel_unknown:
+ case wl_output::subpixel_none:
+ type = QPlatformScreen::Subpixel_None;
+ break;
+ case wl_output::subpixel_horizontal_rgb:
+ type = QPlatformScreen::Subpixel_RGB;
+ break;
+ case wl_output::subpixel_horizontal_bgr:
+ type = QPlatformScreen::Subpixel_BGR;
+ break;
+ case wl_output::subpixel_vertical_rgb:
+ type = QPlatformScreen::Subpixel_VRGB;
+ break;
+ case wl_output::subpixel_vertical_bgr:
+ type = QPlatformScreen::Subpixel_VBGR;
+ break;
+ }
+ }
+ return type;
+}
+
QWaylandScreen *QWaylandScreen::waylandScreenFromWindow(QWindow *window)
{
QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(window);
@@ -225,11 +251,10 @@ void QWaylandScreen::output_geometry(int32_t x, int32_t y,
const QString &model,
int32_t transform)
{
- Q_UNUSED(subpixel);
-
mManufacturer = make;
mModel = model;
+ mSubpixel = subpixel;
mTransform = transform;
mPhysicalSize = QSize(width, height);
diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h
index 4499f0eef..d43d761b1 100644
--- a/src/client/qwaylandscreen_p.h
+++ b/src/client/qwaylandscreen_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2020 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSCREEN_H
#define QWAYLANDSCREEN_H
@@ -73,6 +73,8 @@ public:
QPlatformCursor *cursor() const override;
#endif
+ SubpixelAntialiasingType subpixelAntialiasingTypeHint() const override;
+
uint32_t outputId() const { return m_outputId; }
::wl_output *output() const override
{
@@ -117,6 +119,7 @@ protected:
int mScale = 1;
int mDepth = 32;
int mRefreshRate = 60000;
+ int mSubpixel = -1;
int mTransform = -1;
QImage::Format mFormat = QImage::Format_ARGB32_Premultiplied;
QSize mPhysicalSize;
diff --git a/src/client/qwaylandshellsurface.cpp b/src/client/qwaylandshellsurface.cpp
index 77d6b97a9..89e6c0189 100644
--- a/src/client/qwaylandshellsurface.cpp
+++ b/src/client/qwaylandshellsurface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandshellsurface_p.h"
#include "qwaylandwindow_p.h"
diff --git a/src/client/qwaylandshellsurface_p.h b/src/client/qwaylandshellsurface_p.h
index 51116c52a..f875e4fcc 100644
--- a/src/client/qwaylandshellsurface_p.h
+++ b/src/client/qwaylandshellsurface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSHELLSURFACE_H
#define QWAYLANDSHELLSURFACE_H
diff --git a/src/client/qwaylandshm.cpp b/src/client/qwaylandshm.cpp
index 7c0bc4ddb..17b751534 100644
--- a/src/client/qwaylandshm.cpp
+++ b/src/client/qwaylandshm.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 LG Electronics Inc, author: <mikko.levonmaa@lge.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandshm_p.h>
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
diff --git a/src/client/qwaylandshm_p.h b/src/client/qwaylandshm_p.h
index eb4a90c12..4699f6376 100644
--- a/src/client/qwaylandshm_p.h
+++ b/src/client/qwaylandshm_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 LG Electronics Inc, author: <mikko.levonmaa@lge.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSHM_H
#define QWAYLANDSHM_H
diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp
index d38d8f049..1d199ac9d 100644
--- a/src/client/qwaylandshmbackingstore.cpp
+++ b/src/client/qwaylandshmbackingstore.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandshmbackingstore_p.h"
#include "qwaylandwindow_p.h"
#include "qwaylandsubsurface_p.h"
diff --git a/src/client/qwaylandshmbackingstore_p.h b/src/client/qwaylandshmbackingstore_p.h
index 8a63b3c14..db1ed7673 100644
--- a/src/client/qwaylandshmbackingstore_p.h
+++ b/src/client/qwaylandshmbackingstore_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSHMBACKINGSTORE_H
#define QWAYLANDSHMBACKINGSTORE_H
diff --git a/src/client/qwaylandshmwindow.cpp b/src/client/qwaylandshmwindow.cpp
index 8fecad178..3ca294faf 100644
--- a/src/client/qwaylandshmwindow.cpp
+++ b/src/client/qwaylandshmwindow.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandshmwindow_p.h"
diff --git a/src/client/qwaylandshmwindow_p.h b/src/client/qwaylandshmwindow_p.h
index f11df5e47..55e4566c2 100644
--- a/src/client/qwaylandshmwindow_p.h
+++ b/src/client/qwaylandshmwindow_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSHMWINDOW_H
#define QWAYLANDSHMWINDOW_H
diff --git a/src/client/qwaylandsubsurface.cpp b/src/client/qwaylandsubsurface.cpp
index a0afd06ed..ee094fc73 100644
--- a/src/client/qwaylandsubsurface.cpp
+++ b/src/client/qwaylandsubsurface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandsubsurface_p.h"
diff --git a/src/client/qwaylandsubsurface_p.h b/src/client/qwaylandsubsurface_p.h
index 7600c5807..cc9cf1fdd 100644
--- a/src/client/qwaylandsubsurface_p.h
+++ b/src/client/qwaylandsubsurface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSUBSURFACE_H
#define QWAYLANDSUBSURFACE_H
diff --git a/src/client/qwaylandsurface.cpp b/src/client/qwaylandsurface.cpp
index cd1a561ba..b2c968841 100644
--- a/src/client/qwaylandsurface.cpp
+++ b/src/client/qwaylandsurface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandsurface_p.h"
#include "qwaylanddisplay_p.h"
diff --git a/src/client/qwaylandsurface_p.h b/src/client/qwaylandsurface_p.h
index 027c6ca4d..4e96f217c 100644
--- a/src/client/qwaylandsurface_p.h
+++ b/src/client/qwaylandsurface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSURFACE_P_H
#define QWAYLANDSURFACE_P_H
diff --git a/src/client/qwaylandtabletv2.cpp b/src/client/qwaylandtabletv2.cpp
index 8a0544aeb..79b11c0ec 100644
--- a/src/client/qwaylandtabletv2.cpp
+++ b/src/client/qwaylandtabletv2.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandtabletv2_p.h"
#include "qwaylandinputdevice_p.h"
diff --git a/src/client/qwaylandtabletv2_p.h b/src/client/qwaylandtabletv2_p.h
index 7ddf02e67..019c536ac 100644
--- a/src/client/qwaylandtabletv2_p.h
+++ b/src/client/qwaylandtabletv2_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTABLETV2_P_H
#define QWAYLANDTABLETV2_P_H
diff --git a/src/client/qwaylandtextinputinterface.cpp b/src/client/qwaylandtextinputinterface.cpp
index 794396475..4df8b705e 100644
--- a/src/client/qwaylandtextinputinterface.cpp
+++ b/src/client/qwaylandtextinputinterface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandtextinputinterface_p.h"
diff --git a/src/client/qwaylandtextinputinterface_p.h b/src/client/qwaylandtextinputinterface_p.h
index 6f695575f..8048fa46c 100644
--- a/src/client/qwaylandtextinputinterface_p.h
+++ b/src/client/qwaylandtextinputinterface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTEXTINPUTINTERFACE_P_H
#define QWAYLANDTEXTINPUTINTERFACE_P_H
diff --git a/src/client/qwaylandtextinputv1.cpp b/src/client/qwaylandtextinputv1.cpp
index da8bbae71..32088d89a 100644
--- a/src/client/qwaylandtextinputv1.cpp
+++ b/src/client/qwaylandtextinputv1.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <qpa/qplatforminputcontext.h>
#include "qwaylandtextinputv1_p.h"
diff --git a/src/client/qwaylandtextinputv1_p.h b/src/client/qwaylandtextinputv1_p.h
index dc591cdb1..b565fc9fb 100644
--- a/src/client/qwaylandtextinputv1_p.h
+++ b/src/client/qwaylandtextinputv1_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTEXTINPUTV1_H
diff --git a/src/client/qwaylandtextinputv2.cpp b/src/client/qwaylandtextinputv2.cpp
index a799793e5..ad8e771ff 100644
--- a/src/client/qwaylandtextinputv2.cpp
+++ b/src/client/qwaylandtextinputv2.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <qpa/qplatforminputcontext.h>
@@ -46,6 +46,7 @@ QWaylandTextInputv2::~QWaylandTextInputv2()
{
if (m_resetCallback)
wl_callback_destroy(m_resetCallback);
+ destroy();
}
void QWaylandTextInputv2::reset()
diff --git a/src/client/qwaylandtextinputv2_p.h b/src/client/qwaylandtextinputv2_p.h
index 94b0408a9..4918aeb3b 100644
--- a/src/client/qwaylandtextinputv2_p.h
+++ b/src/client/qwaylandtextinputv2_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDINPUTV2_P_H
diff --git a/src/client/qwaylandtextinputv4.cpp b/src/client/qwaylandtextinputv4.cpp
index 6cf01613f..08ebd4a40 100644
--- a/src/client/qwaylandtextinputv4.cpp
+++ b/src/client/qwaylandtextinputv4.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandtextinputv4_p.h"
diff --git a/src/client/qwaylandtextinputv4_p.h b/src/client/qwaylandtextinputv4_p.h
index 2f4263eba..133fef96e 100644
--- a/src/client/qwaylandtextinputv4_p.h
+++ b/src/client/qwaylandtextinputv4_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTEXTINPUTV4_P_H
#define QWAYLANDTEXTINPUTV4_P_H
diff --git a/src/client/qwaylandtouch.cpp b/src/client/qwaylandtouch.cpp
index a88947e07..835023d55 100644
--- a/src/client/qwaylandtouch.cpp
+++ b/src/client/qwaylandtouch.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandtouch_p.h"
#include "qwaylandinputdevice_p.h"
diff --git a/src/client/qwaylandtouch_p.h b/src/client/qwaylandtouch_p.h
index 8927f4e7e..96690a794 100644
--- a/src/client/qwaylandtouch_p.h
+++ b/src/client/qwaylandtouch_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2020 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTOUCH_H
#define QWAYLANDTOUCH_H
diff --git a/src/client/qwaylandviewport.cpp b/src/client/qwaylandviewport.cpp
index 3252718c0..37e167baf 100644
--- a/src/client/qwaylandviewport.cpp
+++ b/src/client/qwaylandviewport.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2022 David Edmundson <davidedmundson@kde.org>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandviewport_p.h"
diff --git a/src/client/qwaylandviewport_p.h b/src/client/qwaylandviewport_p.h
index e1dfeb3a7..048791aa6 100644
--- a/src/client/qwaylandviewport_p.h
+++ b/src/client/qwaylandviewport_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2022 David Edmundson <davidedmundson@kde.org>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDVIEWPORT_P_H
#define QWAYLANDVIEWPORT_P_H
diff --git a/src/client/qwaylandvulkaninstance.cpp b/src/client/qwaylandvulkaninstance.cpp
index 2f95ff307..6032fdb0f 100644
--- a/src/client/qwaylandvulkaninstance.cpp
+++ b/src/client/qwaylandvulkaninstance.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandvulkaninstance_p.h"
#include "qwaylandwindow_p.h"
diff --git a/src/client/qwaylandvulkaninstance_p.h b/src/client/qwaylandvulkaninstance_p.h
index abeca95db..adb5d7445 100644
--- a/src/client/qwaylandvulkaninstance_p.h
+++ b/src/client/qwaylandvulkaninstance_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDVULKANINSTANCE_P_H
#define QWAYLANDVULKANINSTANCE_P_H
diff --git a/src/client/qwaylandvulkanwindow.cpp b/src/client/qwaylandvulkanwindow.cpp
index 2bc52829d..8dc2c47e8 100644
--- a/src/client/qwaylandvulkanwindow.cpp
+++ b/src/client/qwaylandvulkanwindow.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandvulkanwindow_p.h"
diff --git a/src/client/qwaylandvulkanwindow_p.h b/src/client/qwaylandvulkanwindow_p.h
index c5692bc7f..4529f6583 100644
--- a/src/client/qwaylandvulkanwindow_p.h
+++ b/src/client/qwaylandvulkanwindow_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDVULKANWINDOW_P_H
#define QWAYLANDVULKANWINDOW_P_H
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index f7ae77390..b2114357c 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandwindow_p.h"
@@ -1256,8 +1256,8 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
QMargins marg = frameMargins();
QRect windowRect(0 + marg.left(),
0 + marg.top(),
- geometry().size().width() - marg.right(),
- geometry().size().height() - marg.bottom());
+ geometry().size().width(),
+ geometry().size().height());
if (windowRect.contains(e.local.toPoint()) || mMousePressedInContentArea != Qt::NoButton) {
const QPointF localTranslated = mapFromWlSurface(e.local);
QPointF globalTranslated = e.global;
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 22b42a9a0..7fb39de32 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDWINDOW_H
#define QWAYLANDWINDOW_H
diff --git a/src/client/qwaylandwindowmanagerintegration.cpp b/src/client/qwaylandwindowmanagerintegration.cpp
index dababe7c9..2d6a24987 100644
--- a/src/client/qwaylandwindowmanagerintegration.cpp
+++ b/src/client/qwaylandwindowmanagerintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandwindowmanagerintegration_p.h"
#include "qwaylandscreen_p.h"
diff --git a/src/client/qwaylandwindowmanagerintegration_p.h b/src/client/qwaylandwindowmanagerintegration_p.h
index 18eb171b6..6bb295bf4 100644
--- a/src/client/qwaylandwindowmanagerintegration_p.h
+++ b/src/client/qwaylandwindowmanagerintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDWINDOWMANAGERINTEGRATION_H
#define QWAYLANDWINDOWMANAGERINTEGRATION_H
diff --git a/src/client/shellintegration/qwaylandclientshellapi_p.h b/src/client/shellintegration/qwaylandclientshellapi_p.h
index 984435aa9..0ba0eaaef 100644
--- a/src/client/shellintegration/qwaylandclientshellapi_p.h
+++ b/src/client/shellintegration/qwaylandclientshellapi_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDCLIENTSHELLAPI_P_H
#define QWAYLANDCLIENTSHELLAPI_P_H
diff --git a/src/client/shellintegration/qwaylandshellintegration.cpp b/src/client/shellintegration/qwaylandshellintegration.cpp
index 3d2f21c77..2955a904a 100644
--- a/src/client/shellintegration/qwaylandshellintegration.cpp
+++ b/src/client/shellintegration/qwaylandshellintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandshellintegration_p.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
#include <QtWaylandClient/private/qwaylandwindow_p.h>
diff --git a/src/client/shellintegration/qwaylandshellintegration_p.h b/src/client/shellintegration/qwaylandshellintegration_p.h
index 791a94043..4a299f7fe 100644
--- a/src/client/shellintegration/qwaylandshellintegration_p.h
+++ b/src/client/shellintegration/qwaylandshellintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Jolla Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSHELLINTEGRATION_H
#define QWAYLANDSHELLINTEGRATION_H
diff --git a/src/client/shellintegration/qwaylandshellintegrationfactory.cpp b/src/client/shellintegration/qwaylandshellintegrationfactory.cpp
index feedb27c5..2556325a8 100644
--- a/src/client/shellintegration/qwaylandshellintegrationfactory.cpp
+++ b/src/client/shellintegration/qwaylandshellintegrationfactory.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Jolla Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandshellintegrationfactory_p.h"
#include "qwaylandshellintegrationplugin_p.h"
diff --git a/src/client/shellintegration/qwaylandshellintegrationfactory_p.h b/src/client/shellintegration/qwaylandshellintegrationfactory_p.h
index edc0e70c7..e692591cd 100644
--- a/src/client/shellintegration/qwaylandshellintegrationfactory_p.h
+++ b/src/client/shellintegration/qwaylandshellintegrationfactory_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Jolla Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSHELLINTEGRATIONFACTORY_H
#define QWAYLANDSHELLINTEGRATIONFACTORY_H
diff --git a/src/client/shellintegration/qwaylandshellintegrationplugin.cpp b/src/client/shellintegration/qwaylandshellintegrationplugin.cpp
index 0e2338282..f9b82a8b2 100644
--- a/src/client/shellintegration/qwaylandshellintegrationplugin.cpp
+++ b/src/client/shellintegration/qwaylandshellintegrationplugin.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Jolla Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandshellintegrationplugin_p.h"
diff --git a/src/client/shellintegration/qwaylandshellintegrationplugin_p.h b/src/client/shellintegration/qwaylandshellintegrationplugin_p.h
index 85339e1e7..695ab9f4c 100644
--- a/src/client/shellintegration/qwaylandshellintegrationplugin_p.h
+++ b/src/client/shellintegration/qwaylandshellintegrationplugin_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Jolla Ltd
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSHELLINTEGRATIONPLUGIN_H
#define QWAYLANDSHELLINTEGRATIONPLUGIN_H
diff --git a/src/compositor/CMakeLists.txt b/src/compositor/CMakeLists.txt
index 593d6194c..434411d0e 100644
--- a/src/compositor/CMakeLists.txt
+++ b/src/compositor/CMakeLists.txt
@@ -150,6 +150,7 @@ qt_internal_extend_target(WaylandCompositor CONDITION QT_FEATURE_opengl
hardware_integration/qwlserverbufferintegration.cpp hardware_integration/qwlserverbufferintegration_p.h
hardware_integration/qwlserverbufferintegrationfactory.cpp hardware_integration/qwlserverbufferintegrationfactory_p.h
hardware_integration/qwlserverbufferintegrationplugin.cpp hardware_integration/qwlserverbufferintegrationplugin_p.h
+ hardware_integration/qwltextureorphanage.cpp hardware_integration/qwltextureorphanage_p.h
PUBLIC_LIBRARIES
Qt::OpenGL
)
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index f08398e94..007ae5b78 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -936,6 +936,11 @@ void QWaylandQuickItem::setSubsurfaceHandler(QObject *handler)
}
/*!
+ * \qmlproperty WaylandOutput QtWayland.Compositor::WaylandQuickItem::output
+ *
+ * This property holds the output on which this item is displayed.
+ */
+/*!
* \property QWaylandQuickItem::output
*
* This property holds the output on which this item is displayed.
diff --git a/src/compositor/extensions/qwaylandtextinputmanagerv4.cpp b/src/compositor/extensions/qwaylandtextinputmanagerv4.cpp
index d77cae220..873bccd2f 100644
--- a/src/compositor/extensions/qwaylandtextinputmanagerv4.cpp
+++ b/src/compositor/extensions/qwaylandtextinputmanagerv4.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandtextinputmanagerv4.h"
#include "qwaylandtextinputmanagerv4_p.h"
diff --git a/src/compositor/extensions/qwaylandtextinputmanagerv4.h b/src/compositor/extensions/qwaylandtextinputmanagerv4.h
index 6ad0b0900..e5f587f99 100644
--- a/src/compositor/extensions/qwaylandtextinputmanagerv4.h
+++ b/src/compositor/extensions/qwaylandtextinputmanagerv4.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTEXTINPUTMANAGERV4_H
#define QWAYLANDTEXTINPUTMANAGERV4_H
diff --git a/src/compositor/extensions/qwaylandtextinputmanagerv4_p.h b/src/compositor/extensions/qwaylandtextinputmanagerv4_p.h
index 00aa150c7..acd87674a 100644
--- a/src/compositor/extensions/qwaylandtextinputmanagerv4_p.h
+++ b/src/compositor/extensions/qwaylandtextinputmanagerv4_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTEXTINPUTMANAGERV4_P_H
#define QWAYLANDTEXTINPUTMANAGERV4_P_H
diff --git a/src/compositor/extensions/qwaylandtextinputv4.cpp b/src/compositor/extensions/qwaylandtextinputv4.cpp
index d7e19360b..6f4939288 100644
--- a/src/compositor/extensions/qwaylandtextinputv4.cpp
+++ b/src/compositor/extensions/qwaylandtextinputv4.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandtextinputv4.h"
#include "qwaylandtextinputv4_p.h"
diff --git a/src/compositor/extensions/qwaylandtextinputv4.h b/src/compositor/extensions/qwaylandtextinputv4.h
index 4b4d8fa4d..abe079dfe 100644
--- a/src/compositor/extensions/qwaylandtextinputv4.h
+++ b/src/compositor/extensions/qwaylandtextinputv4.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTEXTINPUTV4_H
#define QWAYLANDTEXTINPUTV4_H
diff --git a/src/compositor/extensions/qwaylandtextinputv4_p.h b/src/compositor/extensions/qwaylandtextinputv4_p.h
index 0e29e62c1..a7065de65 100644
--- a/src/compositor/extensions/qwaylandtextinputv4_p.h
+++ b/src/compositor/extensions/qwaylandtextinputv4_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDTEXTINPUTV4_P_H
#define QWAYLANDTEXTINPUTV4_P_H
diff --git a/src/compositor/hardware_integration/qwltextureorphanage.cpp b/src/compositor/hardware_integration/qwltextureorphanage.cpp
new file mode 100644
index 000000000..c1ff86977
--- /dev/null
+++ b/src/compositor/hardware_integration/qwltextureorphanage.cpp
@@ -0,0 +1,108 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "qwltextureorphanage_p.h"
+
+#include <QOpenGLContext>
+#include <QOpenGLTexture>
+#include <QDebug>
+#include <QtTypeTraits>
+#include <QMutexLocker>
+
+QT_BEGIN_NAMESPACE
+
+Q_LOGGING_CATEGORY(qLcWTO, "qt.waylandcompositor.orphanage")
+
+Q_GLOBAL_STATIC(QtWayland::QWaylandTextureOrphanage, inst)
+
+namespace QtWayland {
+
+QWaylandTextureOrphanage::~QWaylandTextureOrphanage()
+{
+ QMutexLocker locker(&m_containerLock);
+ if (!m_orphanedTextures.isEmpty()) {
+ qCWarning(qLcWTO) << Q_FUNC_INFO << "m_orphanedTextures container isn't empty! content:"
+ << m_orphanedTextures;
+ }
+}
+
+QWaylandTextureOrphanage *QWaylandTextureOrphanage::instance()
+{
+ return inst;
+}
+
+void QWaylandTextureOrphanage::admitTexture(QOpenGLTexture *tex, QOpenGLContext *ctx)
+{
+ qCDebug(qLcWTO) << Q_FUNC_INFO << "got a texture (" << (void *)tex
+ << ") ready to be deleted! It's ctx:" << ctx;
+
+ {
+ QMutexLocker locker(&m_containerLock);
+ m_orphanedTextures.insert(ctx, tex);
+ }
+
+ connect(ctx, &QOpenGLContext::aboutToBeDestroyed, this,
+ [this, ctx]() { this->onContextAboutToBeDestroyed(ctx); },
+ Qt::ConnectionType(Qt::DirectConnection));
+}
+
+void QWaylandTextureOrphanage::deleteTextures()
+{
+ QOpenGLContext *cCtx = QOpenGLContext::currentContext();
+
+ if (cCtx == nullptr) {
+ qCWarning(qLcWTO) << Q_FUNC_INFO << "cannot delete textures without current OpenGL context";
+ return;
+ }
+
+ {
+ QMutexLocker locker(&m_containerLock);
+
+ for (QOpenGLContext *aCtx : m_orphanedTextures.keys()) {
+ if (QOpenGLContext::areSharing(cCtx, aCtx)) {
+
+ qCDebug(qLcWTO) << Q_FUNC_INFO << "currentContext (" << cCtx
+ << ") and ctx of orphane(s) (" << aCtx
+ << ") are shared! => deleteTexturesByContext";
+
+ deleteTexturesByContext(aCtx);
+ }
+ }
+ }
+}
+
+void QWaylandTextureOrphanage::onContextAboutToBeDestroyed(QOpenGLContext *ctx)
+{
+ Q_ASSERT(ctx != nullptr);
+
+ qCDebug(qLcWTO) << Q_FUNC_INFO << " ctx (" << ctx
+ << ") fired aboutToBeDestroyed => deleteTexturesByContext(ctx)";
+
+ {
+ QMutexLocker locker(&m_containerLock);
+ deleteTexturesByContext(ctx);
+ }
+}
+
+void QWaylandTextureOrphanage::deleteTexturesByContext(QOpenGLContext *ctx)
+{
+ // NOTE: We are (by class-internal design) locked (m_containerLock)
+ // when we enter this function!
+ // If not (e.g.: someone changes something in/around this class),
+ // then in a debug-build we will fail below:
+ Q_ASSERT(!m_containerLock.tryLock());
+
+ QList<QOpenGLTexture *> texturesToDelete = m_orphanedTextures.values(ctx);
+ m_orphanedTextures.remove(ctx);
+
+ for (QOpenGLTexture *tex : texturesToDelete) {
+ delete tex;
+ qCDebug(qLcWTO) << Q_FUNC_INFO << " texture (" << (void *)tex << ") got deleted";
+ }
+}
+
+} // namespace QtWayland
+
+QT_END_NAMESPACE
+
+#include "moc_qwltextureorphanage_p.cpp"
diff --git a/src/compositor/hardware_integration/qwltextureorphanage_p.h b/src/compositor/hardware_integration/qwltextureorphanage_p.h
new file mode 100644
index 000000000..1e5298530
--- /dev/null
+++ b/src/compositor/hardware_integration/qwltextureorphanage_p.h
@@ -0,0 +1,64 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef QWLTEXTUREORPHANAGE_P_H
+#define QWLTEXTUREORPHANAGE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QObject>
+#include <QMutex>
+#include <QLoggingCategory>
+#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class QOpenGLContext;
+class QOpenGLTexture;
+
+Q_DECLARE_LOGGING_CATEGORY(qLcWTO)
+
+namespace QtWayland {
+
+class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandTextureOrphanage : public QObject
+{
+ Q_OBJECT
+
+public:
+ QWaylandTextureOrphanage(){};
+ ~QWaylandTextureOrphanage();
+
+ static QWaylandTextureOrphanage *instance();
+
+ // texture that isn't needed anymore will be "take care of" (killed) appropriately
+ void admitTexture(QOpenGLTexture *tex, QOpenGLContext *ctx);
+
+ // uses QOpenGLContext::currentContext to call deleteTexturesByContext on all shared ctx
+ void deleteTextures();
+
+public slots:
+ // uses sender() to call deleteTexturesByContext
+ void onContextAboutToBeDestroyed(QOpenGLContext *ctx);
+
+private:
+ void deleteTexturesByContext(QOpenGLContext *ctx);
+
+ // tracks all the orphanes that need to be deleted
+ QMultiHash<QOpenGLContext *, QOpenGLTexture *> m_orphanedTextures;
+
+ QMutex m_containerLock;
+};
+
+} // namespace QtWayland
+
+QT_END_NAMESPACE
+#endif
diff --git a/src/compositor/shaders/surface.vert b/src/compositor/shaders/surface.vert
index bd28d9bf8..e9958fea1 100644
--- a/src/compositor/shaders/surface.vert
+++ b/src/compositor/shaders/surface.vert
@@ -1,5 +1,5 @@
// Copyright (C) 2023 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#version 440
diff --git a/src/compositor/shaders/surface_oes_external.frag b/src/compositor/shaders/surface_oes_external.frag
index 3064bf7b1..ca29fdc61 100644
--- a/src/compositor/shaders/surface_oes_external.frag
+++ b/src/compositor/shaders/surface_oes_external.frag
@@ -1,5 +1,5 @@
// Copyright (C) 2023 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
// This shader stump cannot be precompiled and is compiled at run-time.
// Appropriate target preamble added when it is loaded.
diff --git a/src/compositor/shaders/surface_rgba.frag b/src/compositor/shaders/surface_rgba.frag
index 8bb48dc15..31779852c 100644
--- a/src/compositor/shaders/surface_rgba.frag
+++ b/src/compositor/shaders/surface_rgba.frag
@@ -1,5 +1,5 @@
// Copyright (C) 2023 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#version 440
diff --git a/src/compositor/shaders/surface_rgbx.frag b/src/compositor/shaders/surface_rgbx.frag
index 600c1beae..6e0472359 100644
--- a/src/compositor/shaders/surface_rgbx.frag
+++ b/src/compositor/shaders/surface_rgbx.frag
@@ -1,5 +1,5 @@
// Copyright (C) 2023 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#version 440
diff --git a/src/compositor/shaders/surface_y_u_v.frag b/src/compositor/shaders/surface_y_u_v.frag
index 3c14036ef..b2462a21a 100644
--- a/src/compositor/shaders/surface_y_u_v.frag
+++ b/src/compositor/shaders/surface_y_u_v.frag
@@ -1,5 +1,5 @@
// Copyright (C) 2023 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#version 440
diff --git a/src/compositor/shaders/surface_y_uv.frag b/src/compositor/shaders/surface_y_uv.frag
index 42b614882..3acc256ad 100644
--- a/src/compositor/shaders/surface_y_uv.frag
+++ b/src/compositor/shaders/surface_y_uv.frag
@@ -1,5 +1,5 @@
// Copyright (C) 2023 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#version 440
diff --git a/src/compositor/shaders/surface_y_xuxv.frag b/src/compositor/shaders/surface_y_xuxv.frag
index 57609f4fd..ccdc0f6af 100644
--- a/src/compositor/shaders/surface_y_xuxv.frag
+++ b/src/compositor/shaders/surface_y_xuxv.frag
@@ -1,5 +1,5 @@
// Copyright (C) 2023 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#version 440
diff --git a/src/extensions/brcm.xml b/src/extensions/brcm.xml
index 39e059604..abf46bddb 100644
--- a/src/extensions/brcm.xml
+++ b/src/extensions/brcm.xml
@@ -4,7 +4,7 @@
the server and published using the display's global event. -->
<copyright>
Copyright (C) 2015 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_brcm" version="1">
diff --git a/src/extensions/drm-egl-server-buffer.xml b/src/extensions/drm-egl-server-buffer.xml
index 9fc9dd908..9f6c1bdc4 100644
--- a/src/extensions/drm-egl-server-buffer.xml
+++ b/src/extensions/drm-egl-server-buffer.xml
@@ -2,7 +2,7 @@
<protocol name="drm_egl_server_buffer">
<copyright>
Copyright (C) 2015 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_drm_egl_server_buffer" version="1">
<!-- We depend on wayland-egl to authenticate for us -->
diff --git a/src/extensions/hardware-integration.xml b/src/extensions/hardware-integration.xml
index 19e6f0c51..2fa3eeaf1 100644
--- a/src/extensions/hardware-integration.xml
+++ b/src/extensions/hardware-integration.xml
@@ -2,7 +2,7 @@
<copyright>
Copyright (C) 2015 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_hardware_integration" version="1">
diff --git a/src/extensions/libhybris-egl-server-buffer.xml b/src/extensions/libhybris-egl-server-buffer.xml
index 605ec65d4..90bb5372c 100644
--- a/src/extensions/libhybris-egl-server-buffer.xml
+++ b/src/extensions/libhybris-egl-server-buffer.xml
@@ -2,7 +2,7 @@
<protocol name="libhybris_egl_server_buffer">
<copyright>
Copyright (C) 2014 Jolla Ltd
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_libhybris_buffer" version="1">
diff --git a/src/extensions/qt-dmabuf-server-buffer.xml b/src/extensions/qt-dmabuf-server-buffer.xml
index c8c142f51..8dfafc425 100644
--- a/src/extensions/qt-dmabuf-server-buffer.xml
+++ b/src/extensions/qt-dmabuf-server-buffer.xml
@@ -2,7 +2,7 @@
<protocol name="qt_dmabuf_server_buffer">
<copyright>
Copyright (C) 2018 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_dmabuf_server_buffer" version="1">
<description summary="internal protocol for buffer sharing">
diff --git a/src/extensions/qt-key-unstable-v1.xml b/src/extensions/qt-key-unstable-v1.xml
index 23b04648b..51fe0a30d 100644
--- a/src/extensions/qt-key-unstable-v1.xml
+++ b/src/extensions/qt-key-unstable-v1.xml
@@ -2,7 +2,7 @@
<copyright>
Copyright (C) 2018 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="zqt_key_v1" version="1">
diff --git a/src/extensions/qt-shell-unstable-v1.xml b/src/extensions/qt-shell-unstable-v1.xml
index 900173577..ec37c3e2a 100644
--- a/src/extensions/qt-shell-unstable-v1.xml
+++ b/src/extensions/qt-shell-unstable-v1.xml
@@ -2,7 +2,7 @@
<protocol name="qt_shell_unstable_v1">
<copyright>
Copyright (C) 2021 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
diff --git a/src/extensions/qt-texture-sharing-unstable-v1.xml b/src/extensions/qt-texture-sharing-unstable-v1.xml
index ae3ab9ea9..60695f6fc 100644
--- a/src/extensions/qt-texture-sharing-unstable-v1.xml
+++ b/src/extensions/qt-texture-sharing-unstable-v1.xml
@@ -2,7 +2,7 @@
<copyright>
Copyright (C) 2019 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="zqt_texture_sharing_v1" version="1">
diff --git a/src/extensions/qt-vulkan-server-buffer-unstable-v1.xml b/src/extensions/qt-vulkan-server-buffer-unstable-v1.xml
index 08a27e5d3..bba618f4e 100644
--- a/src/extensions/qt-vulkan-server-buffer-unstable-v1.xml
+++ b/src/extensions/qt-vulkan-server-buffer-unstable-v1.xml
@@ -2,7 +2,7 @@
<protocol name="qt_vulkan_server_buffer_unstable_v1">
<copyright>
Copyright (C) 2019 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="zqt_vulkan_server_buffer_v1" version="1">
<description summary="Internal protocol for buffer sharing using Vulkan external memory">
diff --git a/src/extensions/qt-windowmanager.xml b/src/extensions/qt-windowmanager.xml
index bd6e88f74..5f02a8002 100644
--- a/src/extensions/qt-windowmanager.xml
+++ b/src/extensions/qt-windowmanager.xml
@@ -2,7 +2,7 @@
<copyright>
Copyright (C) 2015 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_windowmanager" version="1">
diff --git a/src/extensions/server-buffer-extension.xml b/src/extensions/server-buffer-extension.xml
index 75c7f624d..afa616ad2 100644
--- a/src/extensions/server-buffer-extension.xml
+++ b/src/extensions/server-buffer-extension.xml
@@ -2,7 +2,7 @@
<copyright>
Copyright (C) 2015 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_server_buffer" version="1">
diff --git a/src/extensions/shm-emulation-server-buffer.xml b/src/extensions/shm-emulation-server-buffer.xml
index 9850f9150..6baf132c0 100644
--- a/src/extensions/shm-emulation-server-buffer.xml
+++ b/src/extensions/shm-emulation-server-buffer.xml
@@ -2,7 +2,7 @@
<protocol name="shm_emulation_server_buffer">
<copyright>
Copyright (C) 2017 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_shm_emulation_server_buffer" version="1">
<description summary="shm-based server buffer for testing on desktop">
diff --git a/src/extensions/surface-extension.xml b/src/extensions/surface-extension.xml
index 231db0b35..4ab120eae 100644
--- a/src/extensions/surface-extension.xml
+++ b/src/extensions/surface-extension.xml
@@ -2,7 +2,7 @@
<copyright>
Copyright (C) 2015 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_surface_extension" version="1">
diff --git a/src/extensions/touch-extension.xml b/src/extensions/touch-extension.xml
index 429dadfd9..9ef3f201d 100644
--- a/src/extensions/touch-extension.xml
+++ b/src/extensions/touch-extension.xml
@@ -2,7 +2,7 @@
<copyright>
Copyright (C) 2015 The Qt Company Ltd.
- SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+ SPDX-License-Identifier: LicenseRef-Qt-Commercial
</copyright>
<interface name="qt_touch_extension" version="1">
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp
index 8f9047993..ac42d8b8e 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandbrcmeglintegration.h"
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
index ac164ab9d..cc9dcfee0 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDBRCMEGLINTEGRATION_H
#define QWAYLANDBRCMEGLINTEGRATION_H
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
index 117e57807..d69fcdc34 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandbrcmeglwindow.h"
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
index 3b9026f9c..3d0ea5ca4 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDBRCMEGLWINDOW_H
#define QWAYLANDBRCMEGLWINDOW_H
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp
index 66135a7cc..e9b1bdadb 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandbrcmglcontext.h"
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
index e64a20d9b..2842f588b 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDBRCMGLCONTEXT_H
#define QWAYLANDBRCMGLCONTEXT_H
diff --git a/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp b/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp
index 54df2badd..9525eeb1a 100644
--- a/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "dmabufserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
diff --git a/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.h b/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.h
index 13dbdfbfb..79552ac72 100644
--- a/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.h
+++ b/src/hardwareintegration/client/dmabuf-server/dmabufserverbufferintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef DMABUFSERVERBUFFERINTEGRATION_H
#define DMABUFSERVERBUFFERINTEGRATION_H
diff --git a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
index 16a3aa4cf..d333e0a13 100644
--- a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "drmeglserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
diff --git a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
index a06bc96b8..8521d3a81 100644
--- a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
+++ b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef DRMEGLSERVERBUFFERINTEGRATION_H
#define DRMEGLSERVERBUFFERINTEGRATION_H
diff --git a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
index 54081de97..7a064a6e2 100644
--- a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "libhybriseglserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
diff --git a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
index 7fd4a2abb..d247ab221 100644
--- a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
+++ b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef LIBHYBRISEGLSERVERBUFFERINTEGRATION_H
#define LIBHYBRISEGLSERVERBUFFERINTEGRATION_H
diff --git a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
index 0b25b9c84..5eb3a1118 100644
--- a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "shmserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
diff --git a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h
index 344046ae1..9c97986e2 100644
--- a/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h
+++ b/src/hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef SHMSERVERBUFFERINTEGRATION_H
#define SHMSERVERBUFFERINTEGRATION_H
diff --git a/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp b/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp
index 8f1ff9a46..5d52bf668 100644
--- a/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "vulkanserverbufferintegration.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
diff --git a/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.h b/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.h
index 2f0867a81..ef9eb70f3 100644
--- a/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.h
+++ b/src/hardwareintegration/client/vulkan-server/vulkanserverbufferintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef VULKANSERVERBUFFERINTEGRATION_H
#define VULKANSERVERBUFFERINTEGRATION_H
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
index cc7ee90ae..48b0c982f 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandeglclientbufferintegration_p.h"
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration_p.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration_p.h
index ed8fdec2d..b300b844b 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration_p.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
//
// W A R N I N G
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude_p.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude_p.h
index eb52ce8ee..aee3e2d44 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude_p.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
//
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 74c84f767..536f1611e 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandeglwindow_p.h"
@@ -106,7 +106,7 @@ void QWaylandEglWindow::updateSurface(bool create)
if (mDisplay->supportsWindowDecoration())
fmt.setAlphaBufferSize(8);
EGLConfig eglConfig = q_configFromGLFormat(m_clientBufferIntegration->eglDisplay(), fmt);
- m_format = q_glFormatFromConfig(m_clientBufferIntegration->eglDisplay(), eglConfig);
+ m_format = q_glFormatFromConfig(m_clientBufferIntegration->eglDisplay(), eglConfig, fmt);
m_eglSurface = eglCreateWindowSurface(m_clientBufferIntegration->eglDisplay(), eglConfig, eglw, 0);
if (Q_UNLIKELY(m_eglSurface == EGL_NO_SURFACE))
qCWarning(lcQpaWayland, "Could not create EGL surface (EGL error 0x%x)\n", eglGetError());
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
index 5b9aa9874..92b6f0388 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
//
// W A R N I N G
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index 0b64db5c7..3157f63c3 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandglcontext_p.h"
@@ -269,13 +269,15 @@ QWaylandGLContext::~QWaylandGLContext()
void QWaylandGLContext::beginFrame()
{
Q_ASSERT(m_currentWindow != nullptr);
- m_currentWindow->beginFrame();
+ if (m_supportNonBlockingSwap)
+ m_currentWindow->beginFrame();
}
void QWaylandGLContext::endFrame()
{
Q_ASSERT(m_currentWindow != nullptr);
- m_currentWindow->endFrame();
+ if (m_supportNonBlockingSwap)
+ m_currentWindow->endFrame();
}
bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext_p.h b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext_p.h
index 00ef99b1a..0ffe5dd98 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext_p.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
//
// W A R N I N G
diff --git a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp
index c09496985..a608b9c4d 100644
--- a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp
+++ b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabuf.cpp
@@ -5,6 +5,7 @@
#include "linuxdmabufclientbufferintegration.h"
#include <QtWaylandCompositor/QWaylandCompositor>
+#include <QtWaylandCompositor/private/qwltextureorphanage_p.h>
#include <drm_fourcc.h>
#include <drm_mode.h>
@@ -262,7 +263,8 @@ void LinuxDmabufWlBuffer::buffer_destroy(Resource *resource)
for (uint32_t i = 0; i < m_planesNumber; ++i) {
if (m_textures[i] != nullptr) {
- m_clientBufferIntegration->deleteGLTextureWhenPossible(m_textures[i], m_texturesContext[i]);
+ QtWayland::QWaylandTextureOrphanage::instance()->admitTexture(m_textures[i],
+ m_texturesContext[i]);
m_textures[i] = nullptr;
m_texturesContext[i] = nullptr;
QObject::disconnect(m_texturesAboutToBeDestroyedConnection[i]);
diff --git a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp
index 960ec461f..205f25d1f 100644
--- a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp
@@ -6,6 +6,7 @@
#include <QtWaylandCompositor/QWaylandCompositor>
#include <QtWaylandCompositor/private/qwayland-server-wayland.h>
+#include <QtWaylandCompositor/private/qwltextureorphanage_p.h>
#include <qpa/qplatformnativeinterface.h>
#include <QtOpenGL/QOpenGLTexture>
#include <QtCore/QVarLengthArray>
@@ -350,69 +351,6 @@ QList<uint64_t> LinuxDmabufClientBufferIntegration::supportedDrmModifiers(uint32
return QList<uint64_t>();
}
-
-void LinuxDmabufClientBufferIntegration::deleteGLTextureWhenPossible(QOpenGLTexture *texture, QOpenGLContext *ctx) {
- QMutexLocker locker(&m_orphanedTexturesLock);
-
- Q_ASSERT(m_orphanedTextures.size() == m_orphanedTexturesAboutToBeDestroyedConnection.size());
-
- m_orphanedTextures << texture;
- m_orphanedTexturesAboutToBeDestroyedConnection << QObject::connect(ctx, &QOpenGLContext::aboutToBeDestroyed,
- ctx, [this, texture]() {
- this->deleteSpecificOrphanedTexture(texture);
- }, Qt::DirectConnection);
-}
-
-
-void LinuxDmabufClientBufferIntegration::deleteOrphanedTextures()
-{
- Q_ASSERT(QOpenGLContext::currentContext());
-
- QMutexLocker locker(&m_orphanedTexturesLock);
-
- if (!m_orphanedTextures.isEmpty())
- qCDebug(qLcWaylandCompositorHardwareIntegration) << "About to delete some textures: "
- << m_orphanedTextures;
-
- qDeleteAll(m_orphanedTextures);
-
- for (QMetaObject::Connection con : m_orphanedTexturesAboutToBeDestroyedConnection)
- QObject::disconnect(con);
-
- m_orphanedTexturesAboutToBeDestroyedConnection.clear();
- m_orphanedTextures.clear();
-}
-
-void LinuxDmabufClientBufferIntegration::deleteSpecificOrphanedTexture(QOpenGLTexture *texture)
-{
- Q_ASSERT(m_orphanedTextures.size() == m_orphanedTexturesAboutToBeDestroyedConnection.size());
-
- QMutexLocker locker(&m_orphanedTexturesLock);
-
- // In this case, deleteOrphanedTextures was called while we entered (see lock!) this function!
- if (m_orphanedTextures.length()==0) {
- qCWarning(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO
- << "Looks like deleteOrphanedTextures() and this function where called simultaneously!"
- << "This might cause issues!";
- return;
- }
-
- int i = m_orphanedTextures.indexOf(texture);
- Q_ASSERT(i!=-1); // If it isn't empty (see above if), then it should be guaranteed to still contain this texture
-
- m_orphanedTextures.removeAt(i);
- QMetaObject::Connection con = m_orphanedTexturesAboutToBeDestroyedConnection.takeAt(i);
-
- QObject::disconnect(con);
- delete texture;
-
- qCDebug(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO
- << "texture deleted due to QOpenGLContext::aboutToBeDestroyed!"
- << "Pointer (now dead) was:" << (void*)texture;
-}
-
void LinuxDmabufClientBufferIntegration::deleteImage(EGLImageKHR image)
{
egl_destroy_image(m_eglDisplay, image);
@@ -459,7 +397,7 @@ LinuxDmabufClientBuffer::LinuxDmabufClientBuffer(LinuxDmabufClientBufferIntegrat
QOpenGLTexture *LinuxDmabufClientBuffer::toOpenGlTexture(int plane)
{
// At this point we should have a valid OpenGL context, so it's safe to destroy textures
- m_integration->deleteOrphanedTextures();
+ QtWayland::QWaylandTextureOrphanage::instance()->deleteTextures();
if (!m_buffer)
return nullptr;
diff --git a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h
index 3749d88ea..b72a24d5d 100644
--- a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h
+++ b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h
@@ -46,10 +46,7 @@ public:
QtWayland::ClientBuffer *createBufferFor(wl_resource *resource) override;
bool importBuffer(wl_resource *resource, LinuxDmabufWlBuffer *linuxDmabufBuffer);
void removeBuffer(wl_resource *resource);
- void deleteOrphanedTextures();
- void deleteSpecificOrphanedTexture(QOpenGLTexture *texture);
void deleteImage(EGLImageKHR image);
- void deleteGLTextureWhenPossible(QOpenGLTexture *texture, QOpenGLContext* ctx);
PFNGLEGLIMAGETARGETTEXTURE2DOESPROC gl_egl_image_target_texture_2d = nullptr;
private:
@@ -71,10 +68,6 @@ private:
::wl_display *m_wlDisplay = nullptr;
bool m_displayBound = false;
- QMutex m_orphanedTexturesLock;
- QList<QOpenGLTexture *> m_orphanedTextures;
- QList<QMetaObject::Connection> m_orphanedTexturesAboutToBeDestroyedConnection;
-
QHash<EGLint, YuvFormatConversion> m_yuvFormats;
bool m_supportsDmabufModifiers = false;
QHash<struct ::wl_resource *, LinuxDmabufWlBuffer *> m_importedBuffers;
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index b8a5b2466..c8819ba1f 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -4,6 +4,7 @@
#include "waylandeglclientbufferintegration_p.h"
#include <QtWaylandCompositor/QWaylandCompositor>
+#include <QtWaylandCompositor/private/qwltextureorphanage_p.h>
#include <qpa/qplatformnativeinterface.h>
#include <QtOpenGL/QOpenGLTexture>
#include <QtGui/QGuiApplication>
@@ -150,9 +151,6 @@ public:
void setupBufferAndCleanup(BufferState *bs, QOpenGLTexture *texture, int plane);
void handleEglstreamTexture(WaylandEglClientBuffer *buffer, wl_resource *bufferHandle);
void registerBuffer(struct ::wl_resource *buffer, BufferState state);
- void deleteGLTextureWhenPossible(QOpenGLTexture *texture, QOpenGLContext *ctx);
- void deleteOrphanedTextures();
- void deleteSpecificOrphanedTexture(QOpenGLTexture *texture);
EGLDisplay egl_display = EGL_NO_DISPLAY;
bool display_bound = false;
@@ -160,11 +158,6 @@ public:
QOffscreenSurface *offscreenSurface = nullptr;
QOpenGLContext *localContext = nullptr;
- QMutex orphanedTexturesLock;
- QList<QOpenGLTexture *> orphanedTextures;
- QList<QMetaObject::Connection> orphanedTexturesAboutToBeDestroyedConnection;
-
-
PFNEGLBINDWAYLANDDISPLAYWL egl_bind_wayland_display = nullptr;
PFNEGLUNBINDWAYLANDDISPLAYWL egl_unbind_wayland_display = nullptr;
PFNEGLQUERYWAYLANDBUFFERWL_compat egl_query_wayland_buffer = nullptr;
@@ -417,74 +410,6 @@ void WaylandEglClientBufferIntegrationPrivate::handleEglstreamTexture(WaylandEgl
localContext->doneCurrent();
}
-void WaylandEglClientBufferIntegrationPrivate::deleteGLTextureWhenPossible(QOpenGLTexture *texture, QOpenGLContext *ctx) {
- QMutexLocker locker(&orphanedTexturesLock);
-
- Q_ASSERT(ctx != nullptr);
- Q_ASSERT(orphanedTextures.size() == orphanedTexturesAboutToBeDestroyedConnection.size());
-
- qCDebug(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO << " got texture and ctx to be deleted!"
- << (void*)texture << "; " << (void*)ctx;
-
- orphanedTextures << texture;
- orphanedTexturesAboutToBeDestroyedConnection << QObject::connect(ctx, &QOpenGLContext::aboutToBeDestroyed,
- ctx, [this, texture]() {
- this->deleteSpecificOrphanedTexture(texture);
- }, Qt::DirectConnection);
-}
-
-void WaylandEglClientBufferIntegrationPrivate::deleteOrphanedTextures()
-{
- Q_ASSERT(QOpenGLContext::currentContext());
-
- QMutexLocker locker(&orphanedTexturesLock);
-
- for (int i=0; i < orphanedTextures.size(); i++) {
- qCDebug(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO << " about to delete a texture: "
- << (void*)orphanedTextures[i];
- }
-
- qDeleteAll(orphanedTextures);
-
- for (QMetaObject::Connection con : orphanedTexturesAboutToBeDestroyedConnection)
- QObject::disconnect(con);
-
- orphanedTexturesAboutToBeDestroyedConnection.clear();
- orphanedTextures.clear();
-}
-
-void WaylandEglClientBufferIntegrationPrivate::deleteSpecificOrphanedTexture(QOpenGLTexture *texture)
-{
- Q_ASSERT(orphanedTextures.size() == orphanedTexturesAboutToBeDestroyedConnection.size());
-
- QMutexLocker locker(&orphanedTexturesLock);
-
- // In this case, deleteOrphanedTextures was called while we entered (see lock!) this function!
- if (orphanedTextures.length()==0) {
- qCWarning(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO
- << "Looks like deleteOrphanedTextures() and this function where called simultaneously!"
- << "This might cause issues!";
- return;
- }
-
- int i = orphanedTextures.indexOf(texture);
- Q_ASSERT(i!=-1); // If it isn't empty (see above if), then it should be guaranteed to still contain this texture
-
- orphanedTextures.removeAt(i);
- QMetaObject::Connection con = orphanedTexturesAboutToBeDestroyedConnection.takeAt(i);
-
- QObject::disconnect(con);
- delete texture;
-
- qCDebug(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO
- << "texture deleted due to QOpenGLContext::aboutToBeDestroyed!"
- << "Pointer (now dead) was:" << (void*)texture;
-}
-
WaylandEglClientBufferIntegration::WaylandEglClientBufferIntegration()
: d_ptr(new WaylandEglClientBufferIntegrationPrivate)
{
@@ -600,7 +525,9 @@ WaylandEglClientBuffer::~WaylandEglClientBuffer()
if (d->egl_stream)
p->funcs->destroy_stream(p->egl_display, d->egl_stream);
+ }
+ {
QMutexLocker locker(&d->texturesLock);
for (int i=0; i<3; i++) {
@@ -611,7 +538,8 @@ WaylandEglClientBuffer::~WaylandEglClientBuffer()
<< (void*)d->textures[i] << "; " << (void*)d->texturesContext[i]
<< " ... current context might be the same: " << QOpenGLContext::currentContext();
- p->deleteGLTextureWhenPossible(d->textures[i], d->texturesContext[i]);
+ QtWayland::QWaylandTextureOrphanage::instance()->admitTexture(
+ d->textures[i], d->texturesContext[i]);
d->textures[i] = nullptr; // in case the aboutToBeDestroyed lambda is called while we where here
d->texturesContext[i] = nullptr;
QObject::disconnect(d->texturesAboutToBeDestroyedConnection[i]);
@@ -662,7 +590,7 @@ QOpenGLTexture *WaylandEglClientBuffer::toOpenGlTexture(int plane)
{
auto *p = WaylandEglClientBufferIntegrationPrivate::get(m_integration);
// At this point we should have a valid OpenGL context, so it's safe to destroy textures
- p->deleteOrphanedTextures();
+ QtWayland::QWaylandTextureOrphanage::instance()->deleteTextures();
if (!m_buffer)
return nullptr;
diff --git a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp
index 23883a2a7..0924f0fd7 100644
--- a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp
@@ -16,6 +16,7 @@
#include <QtWaylandCompositor/private/qwaylandcompositor_p.h>
#include <QtWaylandCompositor/private/qwlbuffermanager_p.h>
+#include <QtWaylandCompositor/private/qwltextureorphanage_p.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -130,9 +131,6 @@ public:
bool initEglStream(WaylandEglStreamClientBuffer *buffer, struct ::wl_resource *bufferHandle);
void setupBufferAndCleanup(BufferState *bs, QOpenGLTexture *texture, int plane);
void handleEglstreamTexture(WaylandEglStreamClientBuffer *buffer);
- void deleteGLTextureWhenPossible(QOpenGLTexture *texture, QOpenGLContext *ctx);
- void deleteOrphanedTextures();
- void deleteSpecificOrphanedTexture(QOpenGLTexture *texture);
EGLDisplay egl_display = EGL_NO_DISPLAY;
bool display_bound = false;
@@ -140,10 +138,6 @@ public:
QOffscreenSurface *offscreenSurface = nullptr;
QOpenGLContext *localContext = nullptr;
- QMutex orphanedTexturesLock;
- QList<QOpenGLTexture *> orphanedTextures;
- QList<QMetaObject::Connection> orphanedTexturesAboutToBeDestroyedConnection;
-
WaylandEglStreamController *eglStreamController = nullptr;
PFNEGLBINDWAYLANDDISPLAYWL egl_bind_wayland_display = nullptr;
@@ -160,71 +154,6 @@ public:
bool WaylandEglStreamClientBufferIntegrationPrivate::shuttingDown = false;
-
-void WaylandEglStreamClientBufferIntegrationPrivate::deleteGLTextureWhenPossible(QOpenGLTexture *texture, QOpenGLContext *ctx) {
-
- QMutexLocker locker(&orphanedTexturesLock);
-
- Q_ASSERT(orphanedTextures.size() == orphanedTexturesAboutToBeDestroyedConnection.size());
-
- orphanedTextures << texture;
- orphanedTexturesAboutToBeDestroyedConnection << QObject::connect(ctx, &QOpenGLContext::aboutToBeDestroyed,
- ctx, [this, texture]() {
- this->deleteSpecificOrphanedTexture(texture);
- }, Qt::DirectConnection);
-}
-
-void WaylandEglStreamClientBufferIntegrationPrivate::deleteOrphanedTextures()
-{
- Q_ASSERT(QOpenGLContext::currentContext());
-
- QMutexLocker locker(&orphanedTexturesLock);
-
- for (int i=0; i < orphanedTextures.size(); i++) {
- qCDebug(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO << " about to delete a texture: "
- << (void*)orphanedTextures[i];
- }
-
- qDeleteAll(orphanedTextures);
-
- for (QMetaObject::Connection con : orphanedTexturesAboutToBeDestroyedConnection)
- QObject::disconnect(con);
-
- orphanedTexturesAboutToBeDestroyedConnection.clear();
- orphanedTextures.clear();
-}
-
-void WaylandEglStreamClientBufferIntegrationPrivate::deleteSpecificOrphanedTexture(QOpenGLTexture *texture)
-{
- Q_ASSERT(orphanedTextures.size() == orphanedTexturesAboutToBeDestroyedConnection.size());
-
- QMutexLocker locker(&orphanedTexturesLock);
-
- // In this case, deleteOrphanedTextures was called while we entered (see lock!) this function!
- if (orphanedTextures.length()==0) {
- qCWarning(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO
- << "Looks like deleteOrphanedTextures() and this function where called simultaneously!"
- << "This might cause issues!";
- return;
- }
-
- int i = orphanedTextures.indexOf(texture);
- Q_ASSERT(i!=-1); // If it isn't empty (see above if), then it should be guaranteed to still contain this texture
-
- orphanedTextures.removeAt(i);
- QMetaObject::Connection con = orphanedTexturesAboutToBeDestroyedConnection.takeAt(i);
-
- QObject::disconnect(con);
- delete texture;
-
- qCDebug(qLcWaylandCompositorHardwareIntegration)
- << Q_FUNC_INFO
- << "texture deleted due to QOpenGLContext::aboutToBeDestroyed!"
- << "Pointer (now dead) was:" << (void*)texture;
-}
-
bool WaylandEglStreamClientBufferIntegrationPrivate::ensureContext()
{
bool localContextNeeded = false;
@@ -470,7 +399,9 @@ WaylandEglStreamClientBuffer::~WaylandEglStreamClientBuffer()
if (p) {
if (d->egl_stream)
p->funcs->destroy_stream(p->egl_display, d->egl_stream);
+ }
+ {
QMutexLocker locker(&d->texturesLock);
for (int i=0; i<3; i++) {
@@ -481,7 +412,8 @@ WaylandEglStreamClientBuffer::~WaylandEglStreamClientBuffer()
<< (void*)d->textures[i] << "; " << (void*)d->texturesContext[i]
<< " ... current context might be the same: " << QOpenGLContext::currentContext();
- p->deleteGLTextureWhenPossible(d->textures[i], d->texturesContext[i]);
+ QtWayland::QWaylandTextureOrphanage::instance()->admitTexture(
+ d->textures[i], d->texturesContext[i]);
d->textures[i] = nullptr; // in case the aboutToBeDestroyed lambda is called while we where here
d->texturesContext[i] = nullptr;
QObject::disconnect(d->texturesAboutToBeDestroyedConnection[i]);
@@ -512,9 +444,8 @@ QWaylandSurface::Origin WaylandEglStreamClientBuffer::origin() const
QOpenGLTexture *WaylandEglStreamClientBuffer::toOpenGlTexture(int plane)
{
- auto *p = WaylandEglStreamClientBufferIntegrationPrivate::get(m_integration);
// At this point we should have a valid OpenGL context, so it's safe to destroy textures
- p->deleteOrphanedTextures();
+ QtWayland::QWaylandTextureOrphanage::instance()->deleteTextures();
if (!m_buffer)
return nullptr;
diff --git a/src/imports/texture-sharing-extension/plugin.cpp b/src/imports/texture-sharing-extension/plugin.cpp
index 6fd6032ac..69d5790fa 100644
--- a/src/imports/texture-sharing-extension/plugin.cpp
+++ b/src/imports/texture-sharing-extension/plugin.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtQml/qqmlextensionplugin.h>
#include <QtQml/qqmlengine.h>
diff --git a/src/imports/texture-sharing/plugin.cpp b/src/imports/texture-sharing/plugin.cpp
index 0f1f61369..6fe0eb5b4 100644
--- a/src/imports/texture-sharing/plugin.cpp
+++ b/src/imports/texture-sharing/plugin.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtQml/qqmlextensionplugin.h>
#include <QtQml/qqmlengine.h>
diff --git a/src/imports/texture-sharing/sharedtextureprovider.cpp b/src/imports/texture-sharing/sharedtextureprovider.cpp
index c4561cff2..f0ad2af40 100644
--- a/src/imports/texture-sharing/sharedtextureprovider.cpp
+++ b/src/imports/texture-sharing/sharedtextureprovider.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "sharedtextureprovider_p.h"
diff --git a/src/imports/texture-sharing/sharedtextureprovider_p.h b/src/imports/texture-sharing/sharedtextureprovider_p.h
index 8a4fcea23..46f5c1a65 100644
--- a/src/imports/texture-sharing/sharedtextureprovider_p.h
+++ b/src/imports/texture-sharing/sharedtextureprovider_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
//
// W A R N I N G
diff --git a/src/imports/texture-sharing/texturesharingextension.cpp b/src/imports/texture-sharing/texturesharingextension.cpp
index 4a2360078..9b85092e0 100644
--- a/src/imports/texture-sharing/texturesharingextension.cpp
+++ b/src/imports/texture-sharing/texturesharingextension.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "texturesharingextension_p.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
diff --git a/src/imports/texture-sharing/texturesharingextension_p.h b/src/imports/texture-sharing/texturesharingextension_p.h
index a7584c097..f016ddce0 100644
--- a/src/imports/texture-sharing/texturesharingextension_p.h
+++ b/src/imports/texture-sharing/texturesharingextension_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
//
// W A R N I N G
diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp
index 5da0e85f4..cb8759fe9 100644
--- a/src/plugins/decorations/bradient/main.cpp
+++ b/src/plugins/decorations/bradient/main.cpp
@@ -1,6 +1,6 @@
// Copyright (C) 2016 Robin Burchell <robin.burchell@viroteck.net>
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtGui/QCursor>
#include <QtGui/QPainter>
@@ -57,9 +57,6 @@ private:
QRectF maximizeButtonRect() const;
QRectF minimizeButtonRect() const;
- QColor m_foregroundColor;
- QColor m_foregroundInactiveColor;
- QColor m_backgroundColor;
QStaticText m_windowTitle;
Button m_clicking = None;
};
@@ -68,14 +65,10 @@ private:
QWaylandBradientDecoration::QWaylandBradientDecoration()
{
- QPalette palette;
- m_foregroundColor = palette.color(QPalette::Active, QPalette::WindowText);
- m_backgroundColor = palette.color(QPalette::Active, QPalette::Window);
- m_foregroundInactiveColor = palette.color(QPalette::Disabled, QPalette::WindowText);
-
QTextOption option(Qt::AlignHCenter | Qt::AlignVCenter);
option.setWrapMode(QTextOption::NoWrap);
m_windowTitle.setTextOption(option);
+ m_windowTitle.setTextFormat(Qt::PlainText);
}
QRectF QWaylandBradientDecoration::closeButtonRect() const
@@ -121,6 +114,11 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
QRect top = clips[0];
+ QPalette palette;
+ const QColor foregroundColor = palette.color(QPalette::Active, QPalette::WindowText);
+ const QColor backgroundColor = palette.color(QPalette::Active, QPalette::Window);
+ const QColor foregroundInactiveColor = palette.color(QPalette::Disabled, QPalette::WindowText);
+
QPainter p(device);
p.setRenderHint(QPainter::Antialiasing);
@@ -130,7 +128,7 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
for (int i = 0; i < 4; ++i) {
p.save();
p.setClipRect(clips[i]);
- p.fillPath(roundedRect, m_backgroundColor);
+ p.fillPath(roundedRect, backgroundColor);
p.restore();
}
@@ -158,7 +156,7 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
p.save();
p.setClipRect(titleBar);
- p.setPen(active ? m_foregroundColor : m_foregroundInactiveColor);
+ p.setPen(active ? foregroundColor : foregroundInactiveColor);
QSizeF size = m_windowTitle.size();
int dx = (top.width() - size.width()) /2;
int dy = (top.height()- size.height()) /2;
@@ -174,7 +172,7 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
QRectF rect;
// Default pen
- QPen pen(active ? m_foregroundColor : m_foregroundInactiveColor);
+ QPen pen(active ? foregroundColor : foregroundInactiveColor);
p.setPen(pen);
// Close button
@@ -198,7 +196,7 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device)
QRectF rect1 = rect.adjusted(inset, 0, 0, -inset);
QRectF rect2 = rect.adjusted(0, inset, -inset, 0);
p.drawRect(rect1);
- p.setBrush(m_backgroundColor); // need to cover up some lines from the other rect
+ p.setBrush(backgroundColor); // need to cover up some lines from the other rect
p.drawRect(rect2);
} else {
p.drawRect(rect);
@@ -370,7 +368,7 @@ void QWaylandBradientDecoration::processPointerBottom(QWaylandInputDevice *input
//bottom bit
#if QT_CONFIG(cursor)
if (type == PointerType::Mouse)
- waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
+ waylandWindow()->setMouseCursor(inputDevice, Qt::SizeVerCursor);
#endif
startResize(inputDevice, Qt::BottomEdge, b);
}
@@ -386,7 +384,7 @@ void QWaylandBradientDecoration::processPointerLeft(QWaylandInputDevice *inputDe
Q_UNUSED(mods);
#if QT_CONFIG(cursor)
if (type == PointerType::Mouse)
- waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
+ waylandWindow()->setMouseCursor(inputDevice, Qt::SizeHorCursor);
#else
Q_UNUSED(type);
#endif
@@ -403,7 +401,7 @@ void QWaylandBradientDecoration::processPointerRight(QWaylandInputDevice *inputD
Q_UNUSED(mods);
#if QT_CONFIG(cursor)
if (type == PointerType::Mouse)
- waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
+ waylandWindow()->setMouseCursor(inputDevice, Qt::SizeHorCursor);
#else
Q_UNUSED(type);
#endif
diff --git a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
index 2df6fcc58..f13010ad1 100644
--- a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandclientbufferintegrationplugin_p.h>
#include "qwaylandbrcmeglintegration.h"
diff --git a/src/plugins/hardwareintegration/client/dmabuf-server/main.cpp b/src/plugins/hardwareintegration/client/dmabuf-server/main.cpp
index c1c122526..98343a1ce 100644
--- a/src/plugins/hardwareintegration/client/dmabuf-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/dmabuf-server/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandserverbufferintegrationplugin_p.h>
#include "dmabufserverbufferintegration.h"
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
index 008d2ebd1..d8629ff2b 100644
--- a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandserverbufferintegrationplugin_p.h>
#include "drmeglserverbufferintegration.h"
diff --git a/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp b/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
index fa36e1a1d..0ecb8f3af 100644
--- a/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Jolla Ltd, author: <giulio.camuffo@jollamobile.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandserverbufferintegrationplugin_p.h>
#include "libhybriseglserverbufferintegration.h"
diff --git a/src/plugins/hardwareintegration/client/shm-emulation-server/main.cpp b/src/plugins/hardwareintegration/client/shm-emulation-server/main.cpp
index 89673e846..026b9c666 100644
--- a/src/plugins/hardwareintegration/client/shm-emulation-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/shm-emulation-server/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandserverbufferintegrationplugin_p.h>
#include "shmserverbufferintegration.h"
diff --git a/src/plugins/hardwareintegration/client/vulkan-server/main.cpp b/src/plugins/hardwareintegration/client/vulkan-server/main.cpp
index 0490707e0..40ccb6d81 100644
--- a/src/plugins/hardwareintegration/client/vulkan-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/vulkan-server/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2019 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandserverbufferintegrationplugin_p.h>
#include "vulkanserverbufferintegration.h"
diff --git a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
index 9d4fd95ed..e4db84bc2 100644
--- a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandclientbufferintegrationplugin_p.h>
#include <QtWaylandEglClientHwIntegration/private/qwaylandeglclientbufferintegration_p.h>
diff --git a/src/plugins/platforms/qwayland-brcm-egl/main.cpp b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
index 4a13465c7..2aee10efa 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <qpa/qplatformintegrationplugin.h>
#include "qwaylandbrcmeglplatformintegration.h"
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
index a781f5619..89be4763d 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDBRCMEGLPLATFORMINTEGRATION_H
#define QWAYLANDBRCMEGLPLATFORMINTEGRATION_H
diff --git a/src/plugins/platforms/qwayland-egl/main.cpp b/src/plugins/platforms/qwayland-egl/main.cpp
index 149f6fc83..90fb71535 100644
--- a/src/plugins/platforms/qwayland-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-egl/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <qpa/qplatformintegrationplugin.h>
#include "qwaylandeglplatformintegration.h"
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h b/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
index dfc252535..f90208425 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDEGLPLATFORMINTEGRATION_H
#define QWAYLANDEGLPLATFORMINTEGRATION_H
diff --git a/src/plugins/platforms/qwayland-generic/main.cpp b/src/plugins/platforms/qwayland-generic/main.cpp
index a3486d0d3..ac4b8595e 100644
--- a/src/plugins/platforms/qwayland-generic/main.cpp
+++ b/src/plugins/platforms/qwayland-generic/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <qpa/qplatformintegrationplugin.h>
#include <QtWaylandClient/private/qwaylandintegration_p.h>
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/main.cpp b/src/plugins/shellintegration/fullscreen-shell-v1/main.cpp
index 70efb71b2..86de584d1 100644
--- a/src/plugins/shellintegration/fullscreen-shell-v1/main.cpp
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandshellintegrationplugin_p.h>
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp
index ddac7d295..1535cb7f7 100644
--- a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandfullscreenshellv1integration.h"
#include "qwaylandfullscreenshellv1surface.h"
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h
index 48cb80c73..adbffef0f 100644
--- a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1integration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDFULLSCREENSHELLV1INTEGRATION_H
#define QWAYLANDFULLSCREENSHELLV1INTEGRATION_H
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
index 8874c0bf2..d00d59d0f 100644
--- a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandscreen_p.h>
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h
index 0a82e5eee..acdc68d1f 100644
--- a/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/qwaylandfullscreenshellv1surface.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDFULLSCREENSHELLV1SURFACE_H
#define QWAYLANDFULLSCREENSHELLV1SURFACE_H
diff --git a/src/plugins/shellintegration/ivi-shell/main.cpp b/src/plugins/shellintegration/ivi-shell/main.cpp
index 2b48ea7f0..c2a680c49 100644
--- a/src/plugins/shellintegration/ivi-shell/main.cpp
+++ b/src/plugins/shellintegration/ivi-shell/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2017 ITAGE Corporation, author: <yusuke.binsaki@itage.co.jp>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandshellintegrationplugin_p.h>
#include "qwaylandivishellintegration.h"
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp
index 1638b1506..1851c8ba2 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2017 ITAGE Corporation, author: <yusuke.binsaki@itage.co.jp>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandivishellintegration.h"
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
index 82fa9b568..8510e2633 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2017 ITAGE Corporation, author: <yusuke.binsaki@itage.co.jp>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDIVIINTEGRATION_H
#define QWAYLANDIVIINTEGRATION_H
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp
index 29ce0d74e..b0e92e4c2 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2017 ITAGE Corporation, author: <yusuke.binsaki@itage.co.jp>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandivisurface_p.h"
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
index fc97a835a..d2a876c39 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2017 ITAGE Corporation, author: <yusuke.binsaki@itage.co.jp>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDIVISURFACE_H
#define QWAYLANDIVISURFACE_H
diff --git a/src/plugins/shellintegration/qt-shell/main.cpp b/src/plugins/shellintegration/qt-shell/main.cpp
index 41b6028f6..e344913fb 100644
--- a/src/plugins/shellintegration/qt-shell/main.cpp
+++ b/src/plugins/shellintegration/qt-shell/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QtWaylandClient/private/qwaylandshellintegrationplugin_p.h>
#include "qwaylandqtshellintegration.h"
diff --git a/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp b/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp
index 17b87033f..46d3e6a54 100644
--- a/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp
+++ b/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandqtshellintegration.h"
diff --git a/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.h b/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.h
index 18d033569..2ddb57d7a 100644
--- a/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.h
+++ b/src/plugins/shellintegration/qt-shell/qwaylandqtshellintegration.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDQTINTEGRATION_H
#define QWAYLANDQTINTEGRATION_H
diff --git a/src/plugins/shellintegration/qt-shell/qwaylandqtsurface.cpp b/src/plugins/shellintegration/qt-shell/qwaylandqtsurface.cpp
index ddbb7783c..d8f71cb7b 100644
--- a/src/plugins/shellintegration/qt-shell/qwaylandqtsurface.cpp
+++ b/src/plugins/shellintegration/qt-shell/qwaylandqtsurface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandqtsurface_p.h"
#include <qpa/qwindowsysteminterface.h>
diff --git a/src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h b/src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h
index 6431bd552..3c08d0731 100644
--- a/src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h
+++ b/src/plugins/shellintegration/qt-shell/qwaylandqtsurface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2021 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDQTSURFACE_H
#define QWAYLANDQTSURFACE_H
diff --git a/src/plugins/shellintegration/wl-shell/main.cpp b/src/plugins/shellintegration/wl-shell/main.cpp
index 9d578c58b..53a939ec5 100644
--- a/src/plugins/shellintegration/wl-shell/main.cpp
+++ b/src/plugins/shellintegration/wl-shell/main.cpp
@@ -1,6 +1,6 @@
// Copyright (C) 2018 The Qt Company Ltd.
// Copyright (C) 2017 ITAGE Corporation, author: <yusuke.binsaki@itage.co.jp>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandwlshellintegration_p.h"
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp
index f0e38a331..fae0f6ff8 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandwlshellintegration_p.h"
#include "qwaylandwlshellsurface_p.h"
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
index 51dac4bcd..75ef3f0a1 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDWLSHELLINTEGRATION_P_H
#define QWAYLANDWLSHELLINTEGRATION_P_H
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
index 4dc93cd98..826b458a1 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandwlshellsurface_p.h"
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
index 246003028..637ebcae2 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDWLSHELLSURFACE_H
#define QWAYLANDWLSHELLSURFACE_H
diff --git a/src/plugins/shellintegration/xdg-shell/main.cpp b/src/plugins/shellintegration/xdg-shell/main.cpp
index bb40a564e..a7dea83c4 100644
--- a/src/plugins/shellintegration/xdg-shell/main.cpp
+++ b/src/plugins/shellintegration/xdg-shell/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandxdgshellintegration_p.h"
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1.cpp
index 8efc04086..e0ae63907 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandxdgactivationv1_p.h"
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h
index 2f42d9258..2404d592b 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgactivationv1_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDXDGACTIVATIONV1_P_H
#define QWAYLANDXDGACTIVATIONV1_P_H
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1.cpp
index 23b846439..f81a28618 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandxdgdecorationv1_p.h"
#include "qwaylandxdgshell_p.h"
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h
index 8a0cc9e79..55504f65a 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgdecorationv1_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2018 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDXDGDECORATIONV1_P_H
#define QWAYLANDXDGDECORATIONV1_P_H
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2.cpp
index 58baad024..e07f20e3a 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2022 David Reondo <kde@david-redondo.de>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandxdgexporterv2_p.h"
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2_p.h
index b260dbacb..91525a198 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgexporterv2_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2022 David Reondo <kde@david-redondo.de>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDXDGEXPORTERV2_H
#define QWAYLANDXDGEXPORTERV2_H
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index b3305fa73..3a864bf87 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -1,6 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// Copyright (C) 2017 Eurogiciel, author: <philippe.coval@eurogiciel.fr>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandxdgshell_p.h"
@@ -10,6 +10,7 @@
#include <QtWaylandClient/private/qwaylandwindow_p.h>
#include <QtWaylandClient/private/qwaylandinputdevice_p.h>
#include <QtWaylandClient/private/qwaylandscreen_p.h>
+#include <QtWaylandClient/private/qwaylandcursor_p.h>
#include <QtWaylandClient/private/qwaylandabstractdecoration_p.h>
#include <QtGui/QGuiApplication>
@@ -238,8 +239,10 @@ QWaylandXdgSurface::Popup::~Popup()
leave = m_xdgSurface->window()->window();
QWindowSystemInterface::handleLeaveEvent(leave);
- if (QWindow *enter = QGuiApplication::topLevelAt(QCursor::pos()))
- QWindowSystemInterface::handleEnterEvent(enter, enter->mapFromGlobal(QCursor::pos()), QCursor::pos());
+ if (QWindow *enter = QGuiApplication::topLevelAt(QCursor::pos())) {
+ const auto pos = m_xdgSurface->window()->display()->waylandCursor()->pos();
+ QWindowSystemInterface::handleEnterEvent(enter, enter->handle()->mapFromGlobal(pos), pos);
+ }
}
}
@@ -528,8 +531,10 @@ void QWaylandXdgSurface::setGrabPopup(QWaylandWindow *parent, QWaylandInputDevic
if (m_popup && m_popup->m_xdgSurface && m_popup->m_xdgSurface->window())
enter = m_popup->m_xdgSurface->window()->window();
- if (enter)
- QWindowSystemInterface::handleEnterEvent(enter, enter->mapFromGlobal(QCursor::pos()), QCursor::pos());
+ if (enter) {
+ const auto pos = m_popup->m_xdgSurface->window()->display()->waylandCursor()->pos();
+ QWindowSystemInterface::handleEnterEvent(enter, enter->handle()->mapFromGlobal(pos), pos);
+ }
}
void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial)
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
index 11147af20..cf26bcec4 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
@@ -1,6 +1,6 @@
// Copyright (C) 2017 The Qt Company Ltd.
// Copyright (C) 2017 Eurogiciel, author: <philippe.coval@eurogiciel.fr>
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDXDGSHELL_H
#define QWAYLANDXDGSHELL_H
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp
index 8d648b628..6eeba327a 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandxdgshellintegration_p.h"
#include "qwaylandxdgdecorationv1_p.h"
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h
index 2caa3a6e8..db190d883 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDXDGSHELLINTEGRATION_P_H
#define QWAYLANDXDGSHELLINTEGRATION_P_H
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index 1b0a4a149..5aa437381 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/qtwaylandscanner/qtwaylandscanner.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include <QCoreApplication>
#include <QFile>
diff --git a/src/shared/qwaylandinputmethodeventbuilder.cpp b/src/shared/qwaylandinputmethodeventbuilder.cpp
index f0758bf70..e6e4c90ce 100644
--- a/src/shared/qwaylandinputmethodeventbuilder.cpp
+++ b/src/shared/qwaylandinputmethodeventbuilder.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandinputmethodeventbuilder_p.h"
diff --git a/src/shared/qwaylandinputmethodeventbuilder_p.h b/src/shared/qwaylandinputmethodeventbuilder_p.h
index 1ccfa11a2..225df3e65 100644
--- a/src/shared/qwaylandinputmethodeventbuilder_p.h
+++ b/src/shared/qwaylandinputmethodeventbuilder_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDINPUTMETHODEVENTBUILDER_H
#define QWAYLANDINPUTMETHODEVENTBUILDER_H
diff --git a/src/shared/qwaylandmimehelper.cpp b/src/shared/qwaylandmimehelper.cpp
index 3bbbad97b..09b5eb412 100644
--- a/src/shared/qwaylandmimehelper.cpp
+++ b/src/shared/qwaylandmimehelper.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#include "qwaylandmimehelper_p.h"
#include <QImage>
diff --git a/src/shared/qwaylandmimehelper_p.h b/src/shared/qwaylandmimehelper_p.h
index c982a8684..c8f85987e 100644
--- a/src/shared/qwaylandmimehelper_p.h
+++ b/src/shared/qwaylandmimehelper_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDMIMEHELPER_H
#define QWAYLANDMIMEHELPER_H
diff --git a/src/shared/qwaylandsharedmemoryformathelper_p.h b/src/shared/qwaylandsharedmemoryformathelper_p.h
index c8a9c2865..f015fe8d5 100644
--- a/src/shared/qwaylandsharedmemoryformathelper_p.h
+++ b/src/shared/qwaylandsharedmemoryformathelper_p.h
@@ -1,5 +1,5 @@
// Copyright (C) 2020 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial
#ifndef QWAYLANDSHAREDMEMORYFORMATHELPER_H
#define QWAYLANDSHAREDMEMORYFORMATHELPER_H
diff --git a/tests/auto/client/datadevicev1/tst_datadevicev1.cpp b/tests/auto/client/datadevicev1/tst_datadevicev1.cpp
index bb831564a..3464d0d78 100644
--- a/tests/auto/client/datadevicev1/tst_datadevicev1.cpp
+++ b/tests/auto/client/datadevicev1/tst_datadevicev1.cpp
@@ -32,6 +32,7 @@ private slots:
void pasteAscii();
void pasteUtf8();
void pasteMozUrl();
+ void pasteSingleUtf8MozUrl();
void destroysPreviousSelection();
void destroysSelectionWithSurface();
void destroysSelectionOnLeave();
@@ -167,6 +168,47 @@ void tst_datadevicev1::pasteMozUrl()
QCOMPARE(window.m_urls.at(1), QUrl("https://www.example.com/"));
}
+void tst_datadevicev1::pasteSingleUtf8MozUrl()
+{
+ class Window : public QRasterWindow {
+ public:
+ void mousePressEvent(QMouseEvent *) override { m_urls = QGuiApplication::clipboard()->mimeData()->urls(); }
+ QList<QUrl> m_urls;
+ };
+
+ Window window;
+ window.resize(64, 64);
+ window.show();
+
+ QCOMPOSITOR_TRY_VERIFY(xdgSurface() && xdgSurface()->m_committedConfigureSerial);
+ exec([&] {
+ auto *client = xdgSurface()->resource()->client();
+ auto *offer = dataDevice()->sendDataOffer(client, {"text/x-moz-url"});
+ connect(offer, &DataOffer::receive, [](QString mimeType, int fd) {
+ QFile file;
+ file.open(fd, QIODevice::WriteOnly, QFile::FileHandleFlag::AutoCloseHandle);
+ QCOMPARE(mimeType, "text/x-moz-url");
+ const QString content("https://www.qt.io/");
+ file.write(content.toUtf8());
+ file.close();
+ });
+ dataDevice()->sendSelection(offer);
+
+ auto *surface = xdgSurface()->m_surface;
+ keyboard()->sendEnter(surface); // Need to set keyboard focus according to protocol
+
+ pointer()->sendEnter(surface, {32, 32});
+ pointer()->sendFrame(client);
+ pointer()->sendButton(client, BTN_LEFT, 1);
+ pointer()->sendFrame(client);
+ pointer()->sendButton(client, BTN_LEFT, 0);
+ pointer()->sendFrame(client);
+ });
+
+ QTRY_COMPARE(window.m_urls.count(), 1);
+ QCOMPARE(window.m_urls.at(0), QUrl("https://www.qt.io/"));
+}
+
void tst_datadevicev1::destroysPreviousSelection()
{
QRasterWindow window;
diff --git a/tests/auto/client/shared/textinput.cpp b/tests/auto/client/shared/textinput.cpp
index 05889687c..ee7e9ff9b 100644
--- a/tests/auto/client/shared/textinput.cpp
+++ b/tests/auto/client/shared/textinput.cpp
@@ -12,9 +12,8 @@ TextInputManager::TextInputManager(CoreCompositor *compositor)
void TextInputManager::zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, wl_resource *seatResource)
{
- Q_UNUSED(resource);
- Q_UNUSED(id);
Q_UNUSED(seatResource);
+ add(resource->client(), id, resource->version());
}
} // namespace MockCompositor