summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2020-04-27 08:51:53 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-04-29 13:51:58 +0200
commit6319bc72e2dc63175ca797ee3042955f852e008f (patch)
treec9c1c71c43394a4cd2f0f6a75df8ba6f3a2550f3
parent00c8a79da0c80616f18329cdfc61338a2c1af7df (diff)
parent28e7d940c42c47cf039522709883ae3de9f4fb88 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: tests/auto/client/xdgoutput/tst_xdgoutput.cpp Regenerated CMake projects. Removed duplicate wayland source in tests/auto/client/xdgoutput/xdgoutput.pro. It's still referenced via the included shared.pri file. Regenerated the CMake project to adapt to that. Otherwise the CMake project fails to configure due to duplicate rules with a error like the one below CMake Error at src/compositor/Qt6WaylandCompositorMacros.cmake:13 (add_custom_command): Attempt to add a custom rule to output tests/auto/client/xdgoutput/wayland-xdg-output-unstable-v1-server-protocol.h.rule Also use a workaround fix for configuring CMake standalone tests due to regression introduced by dd7e40b1086020f6a054957f4972720cd684 in qtbase. Change-Id: Ib364b851a1fa828c153efbf8653c9e4ef5e618cd
-rw-r--r--CMakeLists.txt7
-rw-r--r--config.tests/wayland_scanner/CMakeLists.txt17
-rw-r--r--dist/changes-5.14.220
-rw-r--r--examples/wayland/texture-sharing/custom-compositor/main.cpp4
-rw-r--r--src/3rdparty/protocol/qt_attribution.json2
-rw-r--r--src/client/configure.cmake94
-rw-r--r--src/client/configure.json9
-rw-r--r--src/client/qwaylandcursor.cpp2
-rw-r--r--src/client/qwaylandintegration.cpp2
-rw-r--r--src/client/qwaylandshellsurface_p.h3
-rw-r--r--src/client/qwaylandwindow.cpp17
-rw-r--r--src/client/qwaylandwindow_p.h4
-rw-r--r--src/compositor/.prev_CMakeLists.txt4
-rw-r--r--src/compositor/CMakeLists.txt4
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp31
-rw-r--r--src/compositor/configure.cmake40
-rw-r--r--src/compositor/configure.json2
-rw-r--r--src/compositor/doc/src/qtwaylandcompositor-qmltypes.qdoc2
-rw-r--r--src/compositor/extensions/extensions.pri2
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.cpp10
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.h4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5_p.h4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5integration.cpp4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5integration_p.h4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6.cpp12
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6.h4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6_p.h4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6integration.cpp4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6integration_p.h4
-rw-r--r--src/compositor/extensions/qwlqttouch.cpp4
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegration_p.h2
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevicemanager.cpp2
-rw-r--r--src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp2
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp56
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h2
-rw-r--r--src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp17
-rw-r--r--src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h2
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp18
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h2
-rw-r--r--src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp20
-rw-r--r--src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.h2
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp18
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h2
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp15
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h2
-rw-r--r--src/imports/compositor/qwaylandquickcompositorplugin.cpp4
-rw-r--r--src/plugins/decorations/bradient/CMakeLists.txt2
-rw-r--r--src/plugins/decorations/bradient/main.cpp1
-rw-r--r--src/plugins/hardwareintegration/client/brcm-egl/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/client/dmabuf-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/client/libhybris-egl-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/client/shm-emulation-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/client/vulkan-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/client/wayland-egl/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-egl/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-glx/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/brcm-egl/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/dmabuf-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/drm-egl-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/libhybris-egl-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/shm-emulation-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/vulkan-server/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/wayland-egl/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-egl/CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-glx/.prev_CMakeLists.txt2
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-glx/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/qwayland-egl/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/qwayland-generic/.prev_CMakeLists.txt2
-rw-r--r--src/plugins/platforms/qwayland-generic/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/CMakeLists.txt2
-rw-r--r--src/plugins/shellintegration/fullscreen-shell-v1/CMakeLists.txt2
-rw-r--r--src/plugins/shellintegration/ivi-shell/CMakeLists.txt2
-rw-r--r--src/plugins/shellintegration/wl-shell/CMakeLists.txt2
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp3
-rw-r--r--src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/CMakeLists.txt2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp3
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/CMakeLists.txt2
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp7
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h2
-rw-r--r--src/plugins/shellintegration/xdg-shell/CMakeLists.txt2
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp22
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h2
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp5
-rw-r--r--tests/auto/client/client/tst_client.cpp2
-rw-r--r--tests/auto/client/datadevicev1/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/datadevicev1/CMakeLists.txt2
-rw-r--r--tests/auto/client/inputcontext/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/inputcontext/CMakeLists.txt2
-rw-r--r--tests/auto/client/nooutput/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/nooutput/CMakeLists.txt2
-rw-r--r--tests/auto/client/output/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/output/CMakeLists.txt2
-rw-r--r--tests/auto/client/primaryselectionv1/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/primaryselectionv1/CMakeLists.txt2
-rw-r--r--tests/auto/client/seatv4/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/seatv4/CMakeLists.txt2
-rw-r--r--tests/auto/client/seatv5/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/seatv5/CMakeLists.txt2
-rw-r--r--tests/auto/client/shared/coreprotocol.cpp8
-rw-r--r--tests/auto/client/shared/coreprotocol.h1
-rw-r--r--tests/auto/client/shared/shared.pri3
-rw-r--r--tests/auto/client/shared/xdgoutputv1.cpp59
-rw-r--r--tests/auto/client/shared/xdgoutputv1.h88
-rw-r--r--tests/auto/client/surface/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/surface/CMakeLists.txt2
-rw-r--r--tests/auto/client/tabletv2/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/tabletv2/CMakeLists.txt2
-rw-r--r--tests/auto/client/xdgdecorationv1/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/xdgdecorationv1/CMakeLists.txt2
-rw-r--r--tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp38
-rw-r--r--tests/auto/client/xdgoutput/.prev_CMakeLists.txt3
-rw-r--r--tests/auto/client/xdgoutput/CMakeLists.txt3
-rw-r--r--tests/auto/client/xdgoutput/tst_xdgoutput.cpp105
-rw-r--r--tests/auto/client/xdgoutput/xdgoutput.pro3
-rw-r--r--tests/auto/client/xdgshell/.prev_CMakeLists.txt2
-rw-r--r--tests/auto/client/xdgshell/CMakeLists.txt2
-rw-r--r--tests/auto/compositor/compositor/mockclient.cpp2
127 files changed, 681 insertions, 291 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a28f3164..33eee0c01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,13 @@ project(QtWayland # special case
# TODO: Fix warnings and remove this
set(QT_REPO_NOT_WARNINGS_CLEAN TRUE)
+# TODO: Remove this after qtbase revert of
+# dd7e40b1086020f6a054957f4972720cd684.
+# Needed for correct dependency tracking of Wayland::Client
+# and Wayland::Server in the separate qt_find_package() calls
+# so that standalone tests configure successfully.
+set(QT_FIND_PACKAGE_DISABLE_DEBUG_BEHAVIOR TRUE)
+
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS
BuildInternals
Core
diff --git a/config.tests/wayland_scanner/CMakeLists.txt b/config.tests/wayland_scanner/CMakeLists.txt
index 794f48b16..b0286da49 100644
--- a/config.tests/wayland_scanner/CMakeLists.txt
+++ b/config.tests/wayland_scanner/CMakeLists.txt
@@ -1,7 +1,22 @@
# Generated from wayland_scanner.pro.
cmake_minimum_required(VERSION 3.14.0)
-project(config_test_wayland_scanner LANGUAGES CXX)
+project(config_test_wayland_scanner LANGUAGES C CXX)
+
+foreach(p ${QT_CONFIG_COMPILE_TEST_PACKAGES})
+ find_package(${p})
+endforeach()
+
+if(QT_CONFIG_COMPILE_TEST_LIBRARIES)
+ link_libraries(${QT_CONFIG_COMPILE_TEST_LIBRARIES})
+endif()
+if(QT_CONFIG_COMPILE_TEST_LIBRARY_TARGETS)
+ foreach(lib ${QT_CONFIG_COMPILE_TEST_LIBRARY_TARGETS})
+ if(TARGET ${lib})
+ link_libraries(${lib})
+ endif()
+ endforeach()
+endif()
add_executable(${PROJECT_NAME}
main.cpp
diff --git a/dist/changes-5.14.2 b/dist/changes-5.14.2
new file mode 100644
index 000000000..68a005176
--- /dev/null
+++ b/dist/changes-5.14.2
@@ -0,0 +1,20 @@
+Qt 5.14.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.14.0 through 5.14.1.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.14 series is binary compatible with the 5.13.x series.
+Applications compiled for 5.13 will continue to run with 5.14.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+ - This release contains only minor code improvements.
diff --git a/examples/wayland/texture-sharing/custom-compositor/main.cpp b/examples/wayland/texture-sharing/custom-compositor/main.cpp
index a39c8c381..af3750247 100644
--- a/examples/wayland/texture-sharing/custom-compositor/main.cpp
+++ b/examples/wayland/texture-sharing/custom-compositor/main.cpp
@@ -63,6 +63,10 @@
#include "QtWaylandCompositor/private/qwltexturesharingextension_p.h"
+#ifndef GL_RGBA8
+#define GL_RGBA8 0x8058
+#endif
+
class CustomSharingExtension : public QWaylandTextureSharingExtension
{
Q_OBJECT
diff --git a/src/3rdparty/protocol/qt_attribution.json b/src/3rdparty/protocol/qt_attribution.json
index ddda0e971..87f242276 100644
--- a/src/3rdparty/protocol/qt_attribution.json
+++ b/src/3rdparty/protocol/qt_attribution.json
@@ -103,7 +103,7 @@ Copyright (c) 2013 BMW Car IT GmbH"
"LicenseId": "MIT",
"License": "MIT License",
"LicenseFile": "MIT_LICENSE.txt",
- "Copyright": "Copyright 2014 © Stephen "Lyude" Chandler Paul
+ "Copyright": "Copyright 2014 © Stephen \"Lyude\" Chandler Paul
Copyright 2015-2016 © Red Hat, Inc."
},
diff --git a/src/client/configure.cmake b/src/client/configure.cmake
index 99aed833e..292524171 100644
--- a/src/client/configure.cmake
+++ b/src/client/configure.cmake
@@ -76,6 +76,7 @@ qt_config_compile_test(dmabuf_server_buffer
LABEL "Linux dma-buf Buffer Sharing"
LIBRARIES
EGL::EGL
+ Libdrm::Libdrm
CODE
"
#include <EGL/egl.h>
@@ -101,7 +102,7 @@ return 1;
qt_config_compile_test(vulkan_server_buffer
LABEL "Vulkan Buffer Sharing"
CODE
-"
+"#define VK_USE_PLATFORM_WAYLAND_KHR 1
#include <vulkan/vulkan.h>
int main(int argc, char **argv)
@@ -117,78 +118,127 @@ return 0;
}
")
+# egl_1_5-wayland
+qt_config_compile_test(egl_1_5_wayland
+ LABEL "EGL 1.5 with Wayland Platform"
+ LIBRARIES
+ EGL::EGL
+ CODE
+"
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <wayland-client.h>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_EXT, (struct wl_display *)(nullptr), nullptr);
+ /* END TEST: */
+ return 0;
+}
+")
+
#### Features
-qt_feature("wayland_client" PRIVATE
+qt_feature("wayland-client" PRIVATE
LABEL "Qt Wayland Client"
CONDITION NOT WIN32 AND Wayland_FOUND AND Wayland_FOUND AND WaylandScanner_FOUND
)
-qt_feature("wayland_datadevice" PRIVATE
+qt_feature("wayland-datadevice" PRIVATE
CONDITION QT_FEATURE_draganddrop OR QT_FEATURE_clipboard
)
-qt_feature("wayland_client_primary_selection" PRIVATE
+qt_feature("wayland-client-primary-selection" PRIVATE
LABEL "primary-selection clipboard"
CONDITION QT_FEATURE_clipboard
)
-qt_feature("wayland_client_fullscreen_shell_v1" PRIVATE
+qt_feature("wayland-client-fullscreen-shell-v1" PRIVATE
LABEL "fullscreen-shell-v1"
CONDITION QT_FEATURE_wayland_client
)
-qt_feature("wayland_client_ivi_shell" PRIVATE
+qt_feature("wayland-client-ivi-shell" PRIVATE
LABEL "ivi-shell"
CONDITION QT_FEATURE_wayland_client
)
-qt_feature("wayland_client_wl_shell" PRIVATE
+qt_feature("wayland-client-wl-shell" PRIVATE
LABEL "wl-shell (deprecated)"
CONDITION QT_FEATURE_wayland_client
)
-qt_feature("wayland_client_xdg_shell" PRIVATE
+qt_feature("wayland-client-xdg-shell" PRIVATE
LABEL "xdg-shell"
CONDITION QT_FEATURE_wayland_client
)
-qt_feature("wayland_client_xdg_shell_v5" PRIVATE
+qt_feature("wayland-client-xdg-shell-v5" PRIVATE
LABEL "xdg-shell unstable v5 (deprecated)"
CONDITION QT_FEATURE_wayland_client
)
-qt_feature("wayland_client_xdg_shell_v6" PRIVATE
+qt_feature("wayland-client-xdg-shell-v6" PRIVATE
LABEL "xdg-shell unstable v6"
CONDITION QT_FEATURE_wayland_client
)
-qt_feature("wayland_egl" PRIVATE
+qt_feature("egl-extension-platform-wayland" PRIVATE
+ LABEL "EGL wayland platform extension"
+ CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_egl_1_5_wayland
+)
+qt_feature("wayland-egl" PRIVATE
LABEL "EGL"
- CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND Wayland_FOUND
+ CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND Wayland_FOUND AND ( NOT QNX OR QT_FEATURE_egl_extension_platform_wayland )
)
-qt_feature("wayland_brcm" PRIVATE
+qt_feature("wayland-brcm" PRIVATE
LABEL "Raspberry Pi"
CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_eglfs_brcm
)
-qt_feature("xcomposite_egl" PRIVATE
+qt_feature("xcomposite-egl" PRIVATE
LABEL "XComposite EGL"
CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND QT_FEATURE_xlib AND XComposite_FOUND AND QT_FEATURE_egl_x11
)
-qt_feature("xcomposite_glx" PRIVATE
+qt_feature("xcomposite-glx" PRIVATE
LABEL "XComposite GLX"
CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2 AND QT_FEATURE_xlib AND XComposite_FOUND
)
-qt_feature("wayland_drm_egl_server_buffer" PRIVATE
+qt_feature("wayland-drm-egl-server-buffer" PRIVATE
LABEL "DRM EGL"
- CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_drm_egl_server
+ CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_drm_egl_server AND ( NOT QNX OR QT_FEATURE_egl_extension_platform_wayland )
)
-qt_feature("wayland_libhybris_egl_server_buffer" PRIVATE
+qt_feature("wayland-libhybris-egl-server-buffer" PRIVATE
LABEL "libhybris EGL"
CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_libhybris_egl_server
)
-qt_feature("wayland_dmabuf_server_buffer" PRIVATE
+qt_feature("wayland-dmabuf-server-buffer" PRIVATE
LABEL "Linux dma-buf server buffer integration"
CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_dmabuf_server_buffer
)
-qt_feature("wayland_vulkan_server_buffer" PRIVATE
+qt_feature("wayland-vulkan-server-buffer" PRIVATE
LABEL "Vulkan-based server buffer integration"
- CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_vulkan_server_buffer
+ CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_vulkan AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_vulkan_server_buffer
)
-qt_feature("wayland_shm_emulation_server_buffer" PRIVATE
+qt_feature("wayland-shm-emulation-server-buffer" PRIVATE
LABEL "Shm emulation server buffer integration"
CONDITION QT_FEATURE_wayland_client AND QT_FEATURE_opengl
)
+qt_configure_add_summary_section(NAME "Qt Wayland Drivers")
+qt_configure_add_summary_entry(ARGS "wayland-egl")
+qt_configure_add_summary_entry(ARGS "wayland-brcm")
+qt_configure_add_summary_entry(ARGS "xcomposite-egl")
+qt_configure_add_summary_entry(ARGS "xcomposite-glx")
+qt_configure_add_summary_entry(ARGS "wayland-drm-egl-server-buffer")
+qt_configure_add_summary_entry(ARGS "wayland-libhybris-egl-server-buffer")
+qt_configure_add_summary_entry(ARGS "wayland-dmabuf-server-buffer")
+qt_configure_add_summary_entry(ARGS "wayland-vulkan-server-buffer")
+qt_configure_add_summary_entry(ARGS "wayland-shm-emulation-server-buffer")
+qt_configure_end_summary_section() # end of "Qt Wayland Drivers" section
+qt_configure_add_summary_section(NAME "Qt Wayland Client Shell Integrations")
+qt_configure_add_summary_entry(ARGS "wayland-client-xdg-shell")
+qt_configure_add_summary_entry(ARGS "wayland-client-xdg-shell-v5")
+qt_configure_add_summary_entry(ARGS "wayland-client-xdg-shell-v6")
+qt_configure_add_summary_entry(ARGS "wayland-client-ivi-shell")
+qt_configure_add_summary_entry(ARGS "wayland-client-wl-shell")
+qt_configure_end_summary_section() # end of "Qt Wayland Client Shell Integrations" section
+qt_configure_add_summary_entry(ARGS "wayland-client")
+qt_configure_add_report_entry(
+ TYPE NOTE
+ MESSAGE "No wayland-egl support detected. Cross-toolkit compatibility disabled."
+ CONDITION NOT Wayland_FOUND
+)
diff --git a/src/client/configure.json b/src/client/configure.json
index 5f19cefc5..e054f1449 100644
--- a/src/client/configure.json
+++ b/src/client/configure.json
@@ -216,9 +216,14 @@
"condition": "features.wayland-client",
"output": [ "privateFeature" ]
},
+ "egl-extension-platform-wayland": {
+ "label": "EGL wayland platform extension",
+ "condition": "features.wayland-client && features.opengl && features.egl && tests.egl_1_5-wayland",
+ "output": [ "privateFeature" ]
+ },
"wayland-egl": {
"label": "EGL",
- "condition": "features.wayland-client && features.opengl && features.egl && libs.wayland-egl && (!config.qnx || tests.egl_1_5-wayland)",
+ "condition": "features.wayland-client && features.opengl && features.egl && libs.wayland-egl && (!config.qnx || features.egl-extension-platform-wayland)",
"output": [ "privateFeature" ]
},
"wayland-brcm": {
@@ -238,7 +243,7 @@
},
"wayland-drm-egl-server-buffer": {
"label": "DRM EGL",
- "condition": "features.wayland-client && features.opengl && features.egl && tests.drm-egl-server && (!config.qnx || tests.egl_1_5-wayland)",
+ "condition": "features.wayland-client && features.opengl && features.egl && tests.drm-egl-server && (!config.qnx || features.egl-extension-platform-wayland)",
"output": [ "privateFeature" ]
},
"wayland-libhybris-egl-server-buffer": {
diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp
index 4d540c5db..c9e3eb9ca 100644
--- a/src/client/qwaylandcursor.cpp
+++ b/src/client/qwaylandcursor.cpp
@@ -251,7 +251,7 @@ QSharedPointer<QWaylandBuffer> QWaylandCursor::cursorBitmapBuffer(QWaylandDispla
const QImage &img = cursor->pixmap().toImage();
QSharedPointer<QWaylandShmBuffer> buffer(new QWaylandShmBuffer(display, img.size(), img.format()));
memcpy(buffer->image()->bits(), img.bits(), size_t(img.sizeInBytes()));
- return std::move(buffer);
+ return buffer;
}
void QWaylandCursor::changeCursor(QCursor *cursor, QWindow *window)
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 82ffc503a..311084b12 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -205,7 +205,7 @@ void QWaylandIntegration::initialize()
int fd = wl_display_get_fd(mDisplay->wl_display());
QSocketNotifier *sn = new QSocketNotifier(fd, QSocketNotifier::Read, mDisplay.data());
- QObject::connect(sn, SIGNAL(activated(int)), mDisplay.data(), SLOT(flushRequests()));
+ QObject::connect(sn, SIGNAL(activated(QSocketDescriptor)), mDisplay.data(), SLOT(flushRequests()));
// Qt does not support running with no screens
mDisplay->ensureScreen();
diff --git a/src/client/qwaylandshellsurface_p.h b/src/client/qwaylandshellsurface_p.h
index f5f202d08..989cdb81b 100644
--- a/src/client/qwaylandshellsurface_p.h
+++ b/src/client/qwaylandshellsurface_p.h
@@ -73,8 +73,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandShellSurface : public QObject
public:
explicit QWaylandShellSurface(QWaylandWindow *window);
~QWaylandShellSurface() override {}
- virtual void resize(QWaylandInputDevice * /*inputDevice*/, Qt::Edges /*edges*/) {}
-
+ virtual bool resize(QWaylandInputDevice *, Qt::Edges) { return false; }
virtual bool move(QWaylandInputDevice *) { return false; }
virtual bool showWindowMenu(QWaylandInputDevice *seat) { Q_UNUSED(seat); return false; }
virtual void setTitle(const QString & /*title*/) {}
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 8cc26d71c..5830c1368 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -157,7 +157,7 @@ void QWaylandWindow::initWindow()
QFileInfo fi = QCoreApplication::instance()->applicationFilePath();
QStringList domainName =
QCoreApplication::instance()->organizationDomain().split(QLatin1Char('.'),
- QString::SkipEmptyParts);
+ Qt::SkipEmptyParts);
if (domainName.isEmpty()) {
mShellSurface->setAppId(fi.baseName());
@@ -414,6 +414,11 @@ QPlatformScreen *QWaylandWindow::calculateScreenFromSurfaceEvents() const
void QWaylandWindow::setVisible(bool visible)
{
+ // Workaround for issue where setVisible may be called with the same value twice
+ if (lastVisible == visible)
+ return;
+ lastVisible = visible;
+
if (visible) {
if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
activePopups << this;
@@ -1185,9 +1190,15 @@ void QWaylandWindow::propagateSizeHints()
mShellSurface->propagateSizeHints();
}
-bool QtWaylandClient::QWaylandWindow::startSystemMove(const QPoint &pos)
+bool QWaylandWindow::startSystemResize(Qt::Edges edges)
+{
+ if (auto *seat = display()->lastInputDevice())
+ return mShellSurface && mShellSurface->resize(seat, edges);
+ return false;
+}
+
+bool QtWaylandClient::QWaylandWindow::startSystemMove()
{
- Q_UNUSED(pos);
if (auto seat = display()->lastInputDevice())
return mShellSurface && mShellSurface->move(seat);
return false;
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index c0328996d..352df89da 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -196,7 +196,8 @@ public:
void propagateSizeHints() override;
void addAttachOffset(const QPoint point);
- bool startSystemMove(const QPoint &pos);
+ bool startSystemResize(Qt::Edges edges) override;
+ bool startSystemMove() override;
void timerEvent(QTimerEvent *event) override;
void requestUpdate() override;
@@ -269,6 +270,7 @@ private:
void handleScreensChanged();
bool mInResizeFromApplyConfigure = false;
+ bool lastVisible = false;
QRect mLastExposeGeometry;
static const wl_callback_listener callbackListener;
diff --git a/src/compositor/.prev_CMakeLists.txt b/src/compositor/.prev_CMakeLists.txt
index 35bae5ef0..a98b77dc7 100644
--- a/src/compositor/.prev_CMakeLists.txt
+++ b/src/compositor/.prev_CMakeLists.txt
@@ -157,8 +157,12 @@ qt_extend_target(WaylandCompositor CONDITION TARGET Qt::Quick
extensions/qwaylandxdgshellintegration.cpp extensions/qwaylandxdgshellintegration_p.h
extensions/qwaylandxdgshellv5integration.cpp extensions/qwaylandxdgshellv5integration_p.h
extensions/qwaylandxdgshellv6integration.cpp extensions/qwaylandxdgshellv6integration_p.h
+ LIBRARIES
+ Qt::QuickPrivate
PUBLIC_LIBRARIES
Qt::Quick
+ PRIVATE_MODULE_INTERFACE
+ Qt::QuickPrivate
)
qt_extend_target(WaylandCompositor CONDITION QT_FEATURE_wayland_datadevice
diff --git a/src/compositor/CMakeLists.txt b/src/compositor/CMakeLists.txt
index 6dea4ad9b..ee8950931 100644
--- a/src/compositor/CMakeLists.txt
+++ b/src/compositor/CMakeLists.txt
@@ -159,8 +159,12 @@ qt_extend_target(WaylandCompositor CONDITION TARGET Qt::Quick
extensions/qwaylandxdgshellintegration.cpp extensions/qwaylandxdgshellintegration_p.h
extensions/qwaylandxdgshellv5integration.cpp extensions/qwaylandxdgshellv5integration_p.h
extensions/qwaylandxdgshellv6integration.cpp extensions/qwaylandxdgshellv6integration_p.h
+ LIBRARIES
+ Qt::QuickPrivate
PUBLIC_LIBRARIES
Qt::Quick
+ PRIVATE_MODULE_INTERFACE
+ Qt::QuickPrivate
)
qt_extend_target(WaylandCompositor CONDITION QT_FEATURE_wayland_datadevice
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index 2701837c4..2247141d9 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -223,7 +223,7 @@ void QWaylandCompositorPrivate::init()
int fd = wl_event_loop_get_fd(loop);
QSocketNotifier *sockNot = new QSocketNotifier(fd, QSocketNotifier::Read, q);
- QObject::connect(sockNot, SIGNAL(activated(int)), q, SLOT(processWaylandEvents()));
+ QObject::connect(sockNot, SIGNAL(activated(QSocketDescriptor)), q, SLOT(processWaylandEvents()));
QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher;
QObject::connect(dispatcher, SIGNAL(aboutToBlock()), q, SLOT(processWaylandEvents()));
@@ -377,6 +377,9 @@ void QWaylandCompositorPrivate::initializeHardwareIntegration()
loadClientBufferIntegration();
loadServerBufferIntegration();
+
+ if (client_buffer_integration)
+ client_buffer_integration->initializeHardware(display);
#endif
}
@@ -406,32 +409,12 @@ void QWaylandCompositorPrivate::loadClientBufferIntegration()
if (!targetKey.isEmpty()) {
client_buffer_integration.reset(QtWayland::ClientBufferIntegrationFactory::create(targetKey, QStringList()));
if (client_buffer_integration) {
- qCDebug(qLcWaylandCompositorHardwareIntegration) << "Loaded client buffer integration:" << targetKey;
client_buffer_integration->setCompositor(q);
- if (!client_buffer_integration->initializeHardware(display)) {
- qCWarning(qLcWaylandCompositorHardwareIntegration)
- << "Failed to initialize hardware for client buffer integration:" << targetKey;
- client_buffer_integration.reset();
- }
- } else {
- qCWarning(qLcWaylandCompositorHardwareIntegration)
- << "Failed to load client buffer integration:" << targetKey;
+ if (hw_integration)
+ hw_integration->setClientBufferIntegration(targetKey);
}
}
-
- if (!client_buffer_integration) {
- qCWarning(qLcWaylandCompositorHardwareIntegration)
- << "No client buffer integration was loaded, this means that clients will fall back"
- << "to use CPU buffers (wl_shm) for transmitting buffers instead of using zero-copy"
- << "GPU buffer handles. Expect serious performance impact with OpenGL clients due"
- << "to potentially multiple copies between CPU and GPU memory per buffer.\n"
- << "See the QtWayland readme for more info about how to build and configure Qt for"
- << "your device.";
- return;
- }
-
- if (client_buffer_integration && hw_integration)
- hw_integration->setClientBufferIntegration(targetKey);
+ //BUG: if there is no client buffer integration, bad things will happen when opengl is used
#endif
}
diff --git a/src/compositor/configure.cmake b/src/compositor/configure.cmake
index a08673f03..f8f9d1dd4 100644
--- a/src/compositor/configure.cmake
+++ b/src/compositor/configure.cmake
@@ -74,6 +74,7 @@ qt_config_compile_test(dmabuf_server_buffer
LABEL "Linux dma-buf Buffer Sharing"
LIBRARIES
EGL::EGL
+ Libdrm::Libdrm
CODE
"
#include <EGL/egl.h>
@@ -100,6 +101,7 @@ qt_config_compile_test(dmabuf_client_buffer
LABEL "Linux Client dma-buf Buffer Sharing"
LIBRARIES
EGL::EGL
+ Libdrm::Libdrm
CODE
"
#include <EGL/egl.h>
@@ -129,7 +131,7 @@ return 0;
qt_config_compile_test(vulkan_server_buffer
LABEL "Vulkan Buffer Sharing"
CODE
-"
+"#define VK_USE_PLATFORM_WAYLAND_KHR 1
#include <vulkan/vulkan.h>
int main(int argc, char **argv)
@@ -149,59 +151,63 @@ return 0;
#### Features
-qt_feature("wayland_server" PRIVATE
+qt_feature("wayland-server" PRIVATE
LABEL "Qt Wayland Compositor"
CONDITION NOT WIN32 AND Wayland_FOUND AND WaylandScanner_FOUND
)
-qt_feature("wayland_datadevice" PRIVATE
+qt_feature("wayland-datadevice" PRIVATE
CONDITION QT_FEATURE_draganddrop OR QT_FEATURE_clipboard
)
-qt_feature("wayland_egl" PRIVATE
+qt_feature("wayland-egl" PRIVATE
LABEL "EGL"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_opengl AND QT_FEATURE_egl AND Wayland_FOUND
)
-qt_feature("wayland_brcm" PRIVATE
+qt_feature("wayland-brcm" PRIVATE
LABEL "Raspberry Pi"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_eglfs_brcm
)
-qt_feature("xcomposite_egl" PRIVATE
+qt_feature("xcomposite-egl" PRIVATE
LABEL "XComposite EGL"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_egl AND QT_FEATURE_opengl AND XComposite_FOUND
)
-qt_feature("xcomposite_glx" PRIVATE
+qt_feature("xcomposite-glx" PRIVATE
LABEL "XComposite EGL"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2 AND QT_FEATURE_xlib AND XComposite_FOUND
)
-qt_feature("wayland_drm_egl_server_buffer" PRIVATE
+qt_feature("wayland-drm-egl-server-buffer" PRIVATE
LABEL "DRM EGL"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_drm_egl_server
)
-qt_feature("wayland_libhybris_egl_server_buffer" PRIVATE
+qt_feature("wayland-libhybris-egl-server-buffer" PRIVATE
LABEL "libhybris EGL"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_libhybris_egl_server
)
-qt_feature("wayland_dmabuf_server_buffer" PRIVATE
+qt_feature("wayland-dmabuf-server-buffer" PRIVATE
LABEL "Linux dma-buf server buffer integration"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_dmabuf_server_buffer
)
-qt_feature("wayland_dmabuf_client_buffer" PRIVATE
+qt_feature("wayland-dmabuf-client-buffer" PRIVATE
LABEL "Linux dma-buf client buffer integration"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_dmabuf_client_buffer
)
-qt_feature("wayland_vulkan_server_buffer" PRIVATE
+qt_feature("wayland-vulkan-server-buffer" PRIVATE
LABEL "Vulkan-based server buffer integration"
- CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_vulkan_server_buffer
+ CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_vulkan AND QT_FEATURE_opengl AND QT_FEATURE_egl AND TEST_vulkan_server_buffer
)
-qt_feature("wayland_shm_emulation_server_buffer" PRIVATE
+qt_feature("wayland-shm-emulation-server-buffer" PRIVATE
LABEL "Shm emulation server buffer"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_opengl
)
-qt_feature("wayland_layer_integration_vsp2" PRIVATE
+qt_feature("wayland-layer-integration-vsp2" PRIVATE
LABEL "VSP2 hardware layer integration"
CONDITION QT_FEATURE_wayland_server AND QT_FEATURE_eglfs_vsp2 AND Waylandkms_FOUND
)
-qt_feature("wayland_compositor_quick" PUBLIC
+qt_feature("wayland-compositor-quick" PUBLIC
LABEL "QtQuick integration for wayland compositor"
PURPOSE "Allows QtWayland compositor types to be used with QtQuick"
- CONDITION QT_FEATURE_wayland_server AND TARGET Qt::Quick AND QT_FEATURE_opengl
+ CONDITION QT_FEATURE_wayland_server AND TARGET Qt::Quick
)
+qt_configure_add_summary_entry(ARGS "wayland-server")
+qt_configure_add_summary_section(NAME "Qt Wayland Compositor Layer Plugins")
+qt_configure_add_summary_entry(ARGS "wayland-layer-integration-vsp2")
+qt_configure_end_summary_section() # end of "Qt Wayland Compositor Layer Plugins" section
diff --git a/src/compositor/configure.json b/src/compositor/configure.json
index 5b348c12b..46f68569d 100644
--- a/src/compositor/configure.json
+++ b/src/compositor/configure.json
@@ -251,7 +251,7 @@
"wayland-compositor-quick": {
"label": "QtQuick integration for wayland compositor",
"purpose": "Allows QtWayland compositor types to be used with QtQuick",
- "condition": "features.wayland-server && module.quick && features.opengl",
+ "condition": "features.wayland-server && module.quick",
"output": [ "publicFeature" ]
}
},
diff --git a/src/compositor/doc/src/qtwaylandcompositor-qmltypes.qdoc b/src/compositor/doc/src/qtwaylandcompositor-qmltypes.qdoc
index a89e07d78..255f49a4d 100644
--- a/src/compositor/doc/src/qtwaylandcompositor-qmltypes.qdoc
+++ b/src/compositor/doc/src/qtwaylandcompositor-qmltypes.qdoc
@@ -39,7 +39,7 @@
\qml \QtMinorVersion
import QtWayland.Compositor 1.\1
- \endcode
+ \endqml
To link against the module, add this line to your \l qmake \c .pro file:
diff --git a/src/compositor/extensions/extensions.pri b/src/compositor/extensions/extensions.pri
index 61ab043ea..64b1439bf 100644
--- a/src/compositor/extensions/extensions.pri
+++ b/src/compositor/extensions/extensions.pri
@@ -74,6 +74,8 @@ SOURCES += \
extensions/qwaylandivisurface.cpp \
qtHaveModule(quick) {
+ QT += quick quick-private
+
HEADERS += \
extensions/qwaylandquickshellintegration.h \
extensions/qwaylandquickshellsurfaceitem.h \
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp
index 337540fc3..c6ef34e7b 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp
@@ -47,6 +47,8 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
QWaylandSurfaceRole QWaylandXdgSurfaceV5Private::s_role("xdg_surface");
QWaylandSurfaceRole QWaylandXdgPopupV5Private::s_role("xdg_popup");
@@ -493,6 +495,7 @@ void QWaylandXdgPopupV5Private::xdg_popup_destroy(Resource *resource)
* \qmltype XdgShellV5
* \inqmlmodule QtWayland.Compositor
* \since 5.8
+ * \obsolete
* \brief Provides an extension for desktop-style user interfaces.
*
* The XdgShellV5 extension provides a way to associate an XdgSurfaceV5
@@ -522,6 +525,7 @@ void QWaylandXdgPopupV5Private::xdg_popup_destroy(Resource *resource)
* \class QWaylandXdgShellV5
* \inmodule QtWaylandCompositor
* \since 5.8
+ * \obsolete
* \brief The QWaylandXdgShellV5 class is an extension for desktop-style user interfaces.
*
* The QWaylandXdgShellV5 extension provides a way to associate a QWaylandXdgSurfaceV5 with
@@ -756,6 +760,7 @@ void QWaylandXdgShellV5::handleFocusChanged(QWaylandSurface *newSurface, QWaylan
* \qmltype XdgSurfaceV5
* \inqmlmodule QtWayland.Compositor
* \since 5.8
+ * \obsolete
* \brief Provides a \c xdg_surface that offers desktop-style compositor-specific features to a surface.
*
* This type is part of the \l{XdgShellV5} extension and provides a way to extend
@@ -771,6 +776,7 @@ void QWaylandXdgShellV5::handleFocusChanged(QWaylandSurface *newSurface, QWaylan
* \class QWaylandXdgSurfaceV5
* \inmodule QtWaylandCompositor
* \since 5.8
+ * \obsolete
* \brief The QWaylandXdgSurfaceV5 class provides desktop-style compositor-specific features to an xdg surface.
*
* This class is part of the QWaylandXdgShellV5 extension and provides a way to
@@ -1355,6 +1361,7 @@ QWaylandQuickShellIntegration *QWaylandXdgSurfaceV5::createIntegration(QWaylandQ
* \qmltype XdgPopupV5
* \inqmlmodule QtWayland.Compositor
* \since 5.8
+ * \obsolete
* \brief Provides a \c xdg_popup interface that implements popup features for the xdg-shell protocol.
*
* This type is part of the \l{XdgShellV5} extension and provides a way to extend
@@ -1370,6 +1377,7 @@ QWaylandQuickShellIntegration *QWaylandXdgSurfaceV5::createIntegration(QWaylandQ
* \class QWaylandXdgPopupV5
* \inmodule QtWaylandCompositor
* \since 5.8
+ * \obsolete
* \brief The QWaylandXdgPopupV5 class provides menus for an xdg surface.
*
* This class is part of the QWaylandXdgShellV5 extension and provides a way to
@@ -1551,4 +1559,6 @@ QWaylandQuickShellIntegration *QWaylandXdgPopupV5::createIntegration(QWaylandQui
}
#endif
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.h b/src/compositor/extensions/qwaylandxdgshellv5.h
index 829db9865..84cae6230 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.h
+++ b/src/compositor/extensions/qwaylandxdgshellv5.h
@@ -42,6 +42,8 @@ struct wl_resource;
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
class QWaylandXdgShellV5Private;
class QWaylandXdgSurfaceV5;
class QWaylandXdgSurfaceV5Private;
@@ -248,6 +250,8 @@ private:
void initialize() override;
};
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
#endif /*QWAYLANDXDGSHELLV5_H*/
diff --git a/src/compositor/extensions/qwaylandxdgshellv5_p.h b/src/compositor/extensions/qwaylandxdgshellv5_p.h
index 9aaad65b5..5356d979c 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv5_p.h
@@ -51,6 +51,8 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgShellV5Private
: public QWaylandShellPrivate
, public QtWaylandServer::xdg_shell_v5
@@ -168,6 +170,8 @@ public:
static QWaylandSurfaceRole s_role;
};
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
#endif // QWAYLANDXDGSHELLV5_P_H
diff --git a/src/compositor/extensions/qwaylandxdgshellv5integration.cpp b/src/compositor/extensions/qwaylandxdgshellv5integration.cpp
index cbb61d3bd..2f11130fe 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5integration.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv5integration.cpp
@@ -38,6 +38,8 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
namespace QtWayland {
static void handlePopupCreated(QWaylandQuickShellSurfaceItem *parentItem, QWaylandXdgPopupV5 *popup)
@@ -246,4 +248,6 @@ void XdgPopupV5Integration::handlePopupDestroyed()
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandxdgshellv5integration_p.h b/src/compositor/extensions/qwaylandxdgshellv5integration_p.h
index ea4477ba0..4a0c3d213 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5integration_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv5integration_p.h
@@ -35,6 +35,8 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
//
// W A R N I N G
// -------------
@@ -122,6 +124,8 @@ private:
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
#endif // QWAYLANDXDGSHELLV5INTEGRATION_H
diff --git a/src/compositor/extensions/qwaylandxdgshellv6.cpp b/src/compositor/extensions/qwaylandxdgshellv6.cpp
index 94c430aad..6a2431594 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv6.cpp
@@ -54,6 +54,8 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
QWaylandXdgShellV6Private::QWaylandXdgShellV6Private()
{
}
@@ -148,6 +150,7 @@ void QWaylandXdgShellV6Private::zxdg_shell_v6_pong(Resource *resource, uint32_t
* \qmltype XdgShellV6
* \inqmlmodule QtWayland.Compositor
* \since 5.10
+ * \obsolete
* \brief Provides an extension for desktop-style user interfaces.
*
* The XdgShellV6 extension provides a way to associate a XdgToplevelV6 or XdgPopupV6
@@ -175,6 +178,7 @@ void QWaylandXdgShellV6Private::zxdg_shell_v6_pong(Resource *resource, uint32_t
* \class QWaylandXdgShellV6
* \inmodule QtWaylandCompositor
* \since 5.10
+ * \obsolete
* \brief The QWaylandXdgShellV6 class is an extension for desktop-style user interfaces.
*
* The QWaylandXdgShellV6 extension provides a way to associate a QWaylandXdgToplevelV6 or
@@ -468,6 +472,7 @@ void QWaylandXdgSurfaceV6Private::zxdg_surface_v6_set_window_geometry(QtWaylandS
* \qmltype XdgSurfaceV6
* \inqmlmodule QtWayland.Compositor
* \since 5.10
+ * \obsolete
* \brief XdgSurfaceV6 provides desktop-style compositor-specific features to an xdg surface.
*
* This type is part of the \l{XdgShellV6} extension and provides a way to
@@ -482,6 +487,7 @@ void QWaylandXdgSurfaceV6Private::zxdg_surface_v6_set_window_geometry(QtWaylandS
* \class QWaylandXdgSurfaceV6
* \inmodule QtWaylandCompositor
* \since 5.10
+ * \obsolete
* \brief The QWaylandXdgSurfaceV6 class provides desktop-style compositor-specific features to an xdg surface.
*
* This class is part of the QWaylandXdgShellV6 extension and provides a way to
@@ -717,6 +723,7 @@ QWaylandQuickShellIntegration *QWaylandXdgSurfaceV6::createIntegration(QWaylandQ
* \qmltype XdgToplevelV6
* \inqmlmodule QtWayland.Compositor
* \since 5.10
+ * \obsolete
* \brief XdgToplevelV6 represents the toplevel window specific parts of an xdg surface.
*
* This type is part of the \l{XdgShellV6} extension and provides a way to
@@ -730,6 +737,7 @@ QWaylandQuickShellIntegration *QWaylandXdgSurfaceV6::createIntegration(QWaylandQ
* \class QWaylandXdgToplevelV6
* \inmodule QtWaylandCompositor
* \since 5.10
+ * \obsolete
* \brief The QWaylandXdgToplevelV6 class represents the toplevel window specific parts of an xdg surface.
*
* This class is part of the QWaylandXdgShellV6 extension and provides a way to
@@ -1480,6 +1488,7 @@ void QWaylandXdgToplevelV6Private::zxdg_toplevel_v6_set_minimized(QtWaylandServe
* \qmltype XdgPopupV6
* \inqmlmodule QtWayland.Compositor
* \since 5.10
+ * \obsolete
* \brief XdgPopupV6 represents the popup specific parts of and xdg surface.
*
* This type is part of the \l{XdgShellV6} extension and provides a way to extend
@@ -1493,6 +1502,7 @@ void QWaylandXdgToplevelV6Private::zxdg_toplevel_v6_set_minimized(QtWaylandServe
* \class QWaylandXdgPopupV6
* \inmodule QtWaylandCompositor
* \since 5.10
+ * \obsolete
* \brief The QWaylandXdgPopupV6 class represents the popup specific parts of an xdg surface.
*
* This class is part of the QWaylandXdgShellV6 extension and provides a way to
@@ -2030,4 +2040,6 @@ QWaylandXdgPositionerV6 *QWaylandXdgPositionerV6::fromResource(wl_resource *reso
return QtWayland::fromResource<QWaylandXdgPositionerV6 *>(resource);
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandxdgshellv6.h b/src/compositor/extensions/qwaylandxdgshellv6.h
index 7b2076cfe..2a55e109d 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6.h
+++ b/src/compositor/extensions/qwaylandxdgshellv6.h
@@ -49,6 +49,8 @@ struct wl_resource;
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
class QWaylandClient;
class QWaylandOutput;
class QWaylandSeat;
@@ -260,6 +262,8 @@ private:
friend class QWaylandXdgSurfaceV6Private;
};
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
#endif // QWAYLANDXDGSHELLV6_H
diff --git a/src/compositor/extensions/qwaylandxdgshellv6_p.h b/src/compositor/extensions/qwaylandxdgshellv6_p.h
index f13e73da4..902224155 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv6_p.h
@@ -58,6 +58,8 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
struct Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPositionerV6Data {
QSize size;
QRect anchorRect;
@@ -241,6 +243,8 @@ public:
QWaylandXdgPositionerV6Data m_data;
};
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
#endif // QWAYLANDXDGSHELLV6_P_H
diff --git a/src/compositor/extensions/qwaylandxdgshellv6integration.cpp b/src/compositor/extensions/qwaylandxdgshellv6integration.cpp
index e424af193..98b748986 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6integration.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv6integration.cpp
@@ -42,6 +42,8 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
namespace QtWayland {
static void handlePopupCreated(QWaylandQuickShellSurfaceItem *parentItem, QWaylandXdgPopupV6 *popup)
@@ -309,4 +311,6 @@ void XdgPopupV6Integration::handleGeometryChanged()
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandxdgshellv6integration_p.h b/src/compositor/extensions/qwaylandxdgshellv6integration_p.h
index 9df2885f1..9513362f4 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6integration_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv6integration_p.h
@@ -43,6 +43,8 @@
QT_BEGIN_NAMESPACE
+#if QT_DEPRECATED_SINCE(5, 15)
+
//
// W A R N I N G
// -------------
@@ -143,6 +145,8 @@ private:
}
+#endif // QT_DEPRECATED_SINCE(5, 15)
+
QT_END_NAMESPACE
#endif // QWAYLANDXDGSHELLV6INTEGRATION_H
diff --git a/src/compositor/extensions/qwlqttouch.cpp b/src/compositor/extensions/qwlqttouch.cpp
index bd4cad2be..0eb7f3bfc 100644
--- a/src/compositor/extensions/qwlqttouch.cpp
+++ b/src/compositor/extensions/qwlqttouch.cpp
@@ -95,8 +95,8 @@ bool TouchExtensionGlobal::postTouchEvent(QTouchEvent *event, QWaylandSurface *s
int y = toFixed(tp.pos().y());
int nx = toFixed(tp.normalizedPos().x());
int ny = toFixed(tp.normalizedPos().y());
- int w = toFixed(tp.rect().width());
- int h = toFixed(tp.rect().height());
+ int w = toFixed(tp.ellipseDiameters().width());
+ int h = toFixed(tp.ellipseDiameters().height());
int vx = toFixed(tp.velocity().x());
int vy = toFixed(tp.velocity().y());
uint32_t pressure = uint32_t(tp.pressure() * 255);
diff --git a/src/compositor/hardware_integration/qwlclientbufferintegration_p.h b/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
index 2e962273f..0195f3d4b 100644
--- a/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
+++ b/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
@@ -64,7 +64,7 @@ public:
void setCompositor(QWaylandCompositor *compositor) { m_compositor = compositor; }
QWaylandCompositor *compositor() const { return m_compositor; }
- virtual bool initializeHardware(struct ::wl_display *display) = 0;
+ virtual void initializeHardware(struct ::wl_display *display) = 0;
virtual ClientBuffer *createBufferFor(struct ::wl_resource *buffer) = 0;
diff --git a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
index 46df52109..d72bdf36d 100644
--- a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
+++ b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
@@ -107,7 +107,7 @@ void DataDeviceManager::retain()
fcntl(fd[0], F_SETFL, fcntl(fd[0], F_GETFL, 0) | O_NONBLOCK);
m_current_selection_source->send(mimeType, fd[1]);
m_retainedReadNotifier = new QSocketNotifier(fd[0], QSocketNotifier::Read, this);
- connect(m_retainedReadNotifier, SIGNAL(activated(int)), SLOT(readFromClient(int)));
+ connect(m_retainedReadNotifier, &QSocketNotifier::activated, this, &DataDeviceManager::readFromClient);
}
void DataDeviceManager::finishReadFromClient(bool exhausted)
diff --git a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
index 9e685b58f..b55f35368 100644
--- a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
+++ b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.cpp
@@ -125,7 +125,7 @@ void DrmEglServerBufferIntegration::initializeEgl()
return;
m_egl_initialized = true;
-#if defined(EGL_VERSION_1_5) && defined(EGL_PLATFORM_WAYLAND_EXT)
+#if QT_CONFIG(egl_extension_platform_wayland)
m_egl_display = eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_EXT, m_display->wl_display(), nullptr);
#else
m_egl_display = eglGetDisplay((EGLNativeDisplayType) m_display->wl_display());
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
index 6bd2f76e3..4e4ea11fb 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
@@ -76,7 +76,7 @@ QWaylandEglClientBufferIntegration::~QWaylandEglClientBufferIntegration()
void QWaylandEglClientBufferIntegration::initialize(QWaylandDisplay *display)
{
-#if defined(EGL_VERSION_1_5) && defined(EGL_PLATFORM_WAYLAND_EXT)
+#if QT_CONFIG(egl_extension_platform_wayland)
m_eglDisplay = eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_EXT, display->wl_display(), nullptr);
#else
if (q_hasEglExtension(EGL_NO_DISPLAY, "EGL_EXT_platform_base")) {
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index e125fc630..ec55bdcd0 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -346,7 +346,7 @@ void QWaylandGLContext::updateGLFormat()
wl_surface *wlSurface = m_display->createSurface(nullptr);
wl_egl_window *eglWindow = wl_egl_window_create(wlSurface, 1, 1);
-#if defined(EGL_VERSION_1_5)
+#if QT_CONFIG(egl_extension_platform_wayland)
EGLSurface eglSurface = eglCreatePlatformWindowSurface(m_eglDisplay, m_config, eglWindow, nullptr);
#else
EGLSurface eglSurface = eglCreateWindowSurface(m_eglDisplay, m_config, eglWindow, nullptr);
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
index 8ddb4f951..de39ff1d2 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
@@ -67,48 +67,46 @@ BrcmEglIntegration::BrcmEglIntegration()
{
}
-bool BrcmEglIntegration::initializeHardware(struct ::wl_display *display)
+void BrcmEglIntegration::initializeHardware(struct ::wl_display *display)
{
Q_D(BrcmEglIntegration);
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
- if (!nativeInterface)
- return false;
+ if (nativeInterface) {
+ d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay");
+ if (!d->egl_display)
+ qWarning("Failed to acquire EGL display from platform integration");
- d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay");
- if (!d->egl_display)
- qWarning("Failed to acquire EGL display from platform integration");
+ d->eglQueryGlobalImageBRCM = (PFNEGLQUERYGLOBALIMAGEBRCMPROC) eglGetProcAddress("eglQueryGlobalImageBRCM");
- d->eglQueryGlobalImageBRCM = (PFNEGLQUERYGLOBALIMAGEBRCMPROC) eglGetProcAddress("eglQueryGlobalImageBRCM");
+ if (!d->eglQueryGlobalImageBRCM) {
+ qWarning("Failed to resolve eglQueryGlobalImageBRCM");
+ return;
+ }
- if (!d->eglQueryGlobalImageBRCM) {
- qWarning("Failed to resolve eglQueryGlobalImageBRCM");
- return false;
- }
-
- d->glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)eglGetProcAddress("glEGLImageTargetTexture2DOES");
+ d->glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)eglGetProcAddress("glEGLImageTargetTexture2DOES");
- if (!d->glEGLImageTargetTexture2DOES) {
- qWarning("Failed to resolve glEGLImageTargetTexture2DOES");
- return false;
- }
+ if (!d->glEGLImageTargetTexture2DOES) {
+ qWarning("Failed to resolve glEGLImageTargetTexture2DOES");
+ return;
+ }
- d->eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
+ d->eglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
- if (!d->eglCreateImageKHR) {
- qWarning("Failed to resolve eglCreateImageKHR");
- return false;
- }
+ if (!d->eglCreateImageKHR) {
+ qWarning("Failed to resolve eglCreateImageKHR");
+ return;
+ }
- d->eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");
+ d->eglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");
- if (!d->eglDestroyImageKHR) {
- qWarning("Failed to resolve eglDestroyImageKHR");
- return false;
+ if (!d->eglDestroyImageKHR) {
+ qWarning("Failed to resolve eglDestroyImageKHR");
+ return;
+ }
+ d->valid = true;
+ init(display, 1);
}
- d->valid = true;
- init(display, 1);
- return true;
}
QtWayland::ClientBuffer *BrcmEglIntegration::createBufferFor(wl_resource *buffer)
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
index 4bc98e8c5..3728da7bc 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
@@ -47,7 +47,7 @@ class BrcmEglIntegration : public QtWayland::ClientBufferIntegration, public QtW
public:
BrcmEglIntegration();
- bool initializeHardware(struct ::wl_display *display) override;
+ void initializeHardware(struct ::wl_display *display) override;
QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
protected:
diff --git a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp
index efe0dba38..bf00a5283 100644
--- a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.cpp
@@ -275,7 +275,7 @@ LinuxDmabufClientBufferIntegration::~LinuxDmabufClientBufferIntegration()
m_importedBuffers.clear();
}
-bool LinuxDmabufClientBufferIntegration::initializeHardware(struct ::wl_display *display)
+void LinuxDmabufClientBufferIntegration::initializeHardware(struct ::wl_display *display)
{
m_linuxDmabuf.reset(new LinuxDmabuf(display, this));
@@ -286,40 +286,40 @@ bool LinuxDmabufClientBufferIntegration::initializeHardware(struct ::wl_display
egl_query_dmabuf_formats_ext = reinterpret_cast<PFNEGLQUERYDMABUFFORMATSEXTPROC>(eglGetProcAddress("eglQueryDmaBufFormatsEXT"));
if (!egl_query_dmabuf_modifiers_ext || !egl_query_dmabuf_formats_ext) {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Failed to initialize EGL display. Could not find eglQueryDmaBufModifiersEXT and eglQueryDmaBufFormatsEXT.";
- return false;
+ return;
}
egl_bind_wayland_display = reinterpret_cast<PFNEGLBINDWAYLANDDISPLAYWL>(eglGetProcAddress("eglBindWaylandDisplayWL"));
egl_unbind_wayland_display = reinterpret_cast<PFNEGLUNBINDWAYLANDDISPLAYWL>(eglGetProcAddress("eglUnbindWaylandDisplayWL"));
if ((!egl_bind_wayland_display || !egl_unbind_wayland_display) && !ignoreBindDisplay) {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Failed to initialize EGL display. Could not find eglBindWaylandDisplayWL and eglUnbindWaylandDisplayWL.";
- return false;
+ return;
}
egl_create_image = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(eglGetProcAddress("eglCreateImageKHR"));
egl_destroy_image = reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(eglGetProcAddress("eglDestroyImageKHR"));
if (!egl_create_image || !egl_destroy_image) {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Failed to initialize EGL display. Could not find eglCreateImageKHR and eglDestroyImageKHR.";
- return false;
+ return;
}
// initialize EGL display
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
if (!nativeInterface) {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Failed to initialize EGL display. No native platform interface available.";
- return false;
+ return;
}
m_eglDisplay = nativeInterface->nativeResourceForIntegration("EglDisplay");
if (!m_eglDisplay) {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Failed to initialize EGL display. Could not get EglDisplay for window.";
- return false;
+ return;
}
const char *extensionString = eglQueryString(m_eglDisplay, EGL_EXTENSIONS);
if (!extensionString || !strstr(extensionString, "EGL_EXT_image_dma_buf_import")) {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Failed to initialize EGL display. There is no EGL_EXT_image_dma_buf_import extension.";
- return false;
+ return;
}
if (strstr(extensionString, "EGL_EXT_image_dma_buf_import_modifiers"))
m_supportsDmabufModifiers = true;
@@ -331,7 +331,7 @@ bool LinuxDmabufClientBufferIntegration::initializeHardware(struct ::wl_display
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Could not bind Wayland display. Ignoring.";
} else {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Failed to initialize EGL display. Could not bind Wayland display.";
- return false;
+ return;
}
}
}
@@ -342,7 +342,6 @@ bool LinuxDmabufClientBufferIntegration::initializeHardware(struct ::wl_display
modifiers[format] = supportedDrmModifiers(format);
}
m_linuxDmabuf->setSupportedModifiers(modifiers);
- return true;
}
QVector<uint32_t> LinuxDmabufClientBufferIntegration::supportedDrmFormats()
diff --git a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h
index 8909fa89f..cbbd4d9ba 100644
--- a/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h
+++ b/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1/linuxdmabufclientbufferintegration.h
@@ -67,7 +67,7 @@ public:
LinuxDmabufClientBufferIntegration();
~LinuxDmabufClientBufferIntegration() override;
- bool initializeHardware(struct ::wl_display *display) override;
+ void initializeHardware(struct ::wl_display *display) override;
QtWayland::ClientBuffer *createBufferFor(wl_resource *resource) override;
bool importBuffer(wl_resource *resource, LinuxDmabufWlBuffer *linuxDmabufBuffer);
void removeBuffer(wl_resource *resource);
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index 49f970894..8bacd38cc 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -398,7 +398,7 @@ WaylandEglClientBufferIntegration::~WaylandEglClientBufferIntegration()
}
}
-bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *display)
+void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *display)
{
Q_D(WaylandEglClientBufferIntegration);
@@ -408,21 +408,21 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
if (!nativeInterface) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. No native platform interface available.";
- return false;
+ return;
}
d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay");
if (!d->egl_display) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not get EglDisplay for window.";
- return false;
+ return;
}
const char *extensionString = eglQueryString(d->egl_display, EGL_EXTENSIONS);
if ((!extensionString || !strstr(extensionString, "EGL_WL_bind_wayland_display")) && !ignoreBindDisplay) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. There is no EGL_WL_bind_wayland_display extension.";
- return false;
+ return;
}
d->egl_bind_wayland_display = reinterpret_cast<PFNEGLBINDWAYLANDDISPLAYWL>(eglGetProcAddress("eglBindWaylandDisplayWL"));
@@ -430,14 +430,14 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
if ((!d->egl_bind_wayland_display || !d->egl_unbind_wayland_display) && !ignoreBindDisplay) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not find eglBindWaylandDisplayWL and eglUnbindWaylandDisplayWL.";
- return false;
+ return;
}
d->egl_query_wayland_buffer = reinterpret_cast<PFNEGLQUERYWAYLANDBUFFERWL_compat>(eglGetProcAddress("eglQueryWaylandBufferWL"));
if (!d->egl_query_wayland_buffer) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not find eglQueryWaylandBufferWL.";
- return false;
+ return;
}
d->egl_create_image = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(eglGetProcAddress("eglCreateImageKHR"));
@@ -445,7 +445,7 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
if (!d->egl_create_image || !d->egl_destroy_image) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not find eglCreateImageKHR and eglDestroyImageKHR.";
- return false;
+ return;
}
if (d->egl_bind_wayland_display && d->egl_unbind_wayland_display) {
@@ -454,7 +454,7 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
if (!ignoreBindDisplay) {
qCWarning(qLcWaylandCompositorHardwareIntegration)
<< "Failed to initialize EGL display. Could not bind Wayland display.";
- return false;
+ return;
} else {
qCWarning(qLcWaylandCompositorHardwareIntegration) << "Could not bind Wayland display. Ignoring.";
}
@@ -464,8 +464,6 @@ bool WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di
d->funcs = new QEGLStreamConvenience;
d->funcs->initialize(d->egl_display);
-
- return true;
}
QtWayland::ClientBuffer *WaylandEglClientBufferIntegration::createBufferFor(wl_resource *buffer)
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
index 3b9959e2f..bbc0eafef 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
@@ -45,7 +45,7 @@ public:
WaylandEglClientBufferIntegration();
~WaylandEglClientBufferIntegration() override;
- bool initializeHardware(struct ::wl_display *display) override;
+ void initializeHardware(struct ::wl_display *display) override;
QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
diff --git a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp
index 09b44dd14..a97391ba4 100644
--- a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.cpp
@@ -298,7 +298,7 @@ void WaylandEglStreamClientBufferIntegration::attachEglStreamConsumer(struct ::w
d->initEglStream(clientBuffer, wl_buffer);
}
-bool WaylandEglStreamClientBufferIntegration::initializeHardware(struct wl_display *display)
+void WaylandEglStreamClientBufferIntegration::initializeHardware(struct wl_display *display)
{
Q_D(WaylandEglStreamClientBufferIntegration);
@@ -307,32 +307,32 @@ bool WaylandEglStreamClientBufferIntegration::initializeHardware(struct wl_displ
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
if (!nativeInterface) {
qWarning("QtCompositor: Failed to initialize EGL display. No native platform interface available.");
- return false;
+ return;
}
d->egl_display = nativeInterface->nativeResourceForIntegration("EglDisplay");
if (!d->egl_display) {
qWarning("QtCompositor: Failed to initialize EGL display. Could not get EglDisplay for window.");
- return false;
+ return;
}
const char *extensionString = eglQueryString(d->egl_display, EGL_EXTENSIONS);
if ((!extensionString || !strstr(extensionString, "EGL_WL_bind_wayland_display")) && !ignoreBindDisplay) {
qWarning("QtCompositor: Failed to initialize EGL display. There is no EGL_WL_bind_wayland_display extension.");
- return false;
+ return;
}
d->egl_bind_wayland_display = reinterpret_cast<PFNEGLBINDWAYLANDDISPLAYWL>(eglGetProcAddress("eglBindWaylandDisplayWL"));
d->egl_unbind_wayland_display = reinterpret_cast<PFNEGLUNBINDWAYLANDDISPLAYWL>(eglGetProcAddress("eglUnbindWaylandDisplayWL"));
if ((!d->egl_bind_wayland_display || !d->egl_unbind_wayland_display) && !ignoreBindDisplay) {
qWarning("QtCompositor: Failed to initialize EGL display. Could not find eglBindWaylandDisplayWL and eglUnbindWaylandDisplayWL.");
- return false;
+ return;
}
d->egl_query_wayland_buffer = reinterpret_cast<PFNEGLQUERYWAYLANDBUFFERWL_compat>(eglGetProcAddress("eglQueryWaylandBufferWL"));
if (!d->egl_query_wayland_buffer) {
qWarning("QtCompositor: Failed to initialize EGL display. Could not find eglQueryWaylandBufferWL.");
- return false;
+ return;
}
if (d->egl_bind_wayland_display && d->egl_unbind_wayland_display) {
@@ -340,7 +340,7 @@ bool WaylandEglStreamClientBufferIntegration::initializeHardware(struct wl_displ
if (!d->display_bound) {
if (!ignoreBindDisplay) {
qWarning("QtCompositor: Failed to initialize EGL display. Could not bind Wayland display.");
- return false;
+ return;
} else {
qWarning("QtCompositor: Could not bind Wayland display. Ignoring.");
}
@@ -351,12 +351,6 @@ bool WaylandEglStreamClientBufferIntegration::initializeHardware(struct wl_displ
d->funcs = new QEGLStreamConvenience;
d->funcs->initialize(d->egl_display);
- if (!d->funcs->initialized) {
- qWarning(qLcWaylandCompositorHardwareIntegration) << "Failed to initialize eglstreams API";
- return false;
- }
-
- return true;
}
QtWayland::ClientBuffer *WaylandEglStreamClientBufferIntegration::createBufferFor(wl_resource *buffer)
diff --git a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.h b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.h
index 35d2c80d3..4c4cce257 100644
--- a/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.h
+++ b/src/hardwareintegration/compositor/wayland-eglstream-controller/waylandeglstreamintegration.h
@@ -44,7 +44,7 @@ public:
WaylandEglStreamClientBufferIntegration();
~WaylandEglStreamClientBufferIntegration() override;
- bool initializeHardware(struct ::wl_display *display) override;
+ void initializeHardware(struct ::wl_display *display) override;
QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
index 6ace889a8..563b9afaa 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
@@ -62,26 +62,20 @@ XCompositeEglClientBufferIntegration::XCompositeEglClientBufferIntegration()
}
-bool XCompositeEglClientBufferIntegration::initializeHardware(struct ::wl_display *)
+void XCompositeEglClientBufferIntegration::initializeHardware(struct ::wl_display *)
{
QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
if (nativeInterface) {
mDisplay = static_cast<Display *>(nativeInterface->nativeResourceForIntegration("Display"));
- if (!mDisplay) {
- qCWarning(qLcWaylandCompositorHardwareIntegration) << "could not retrieve Display from platform integration";
- return false;
- }
+ if (!mDisplay)
+ qFatal("could not retrieve Display from platform integration");
mEglDisplay = static_cast<EGLDisplay>(nativeInterface->nativeResourceForIntegration("EGLDisplay"));
- if (!mEglDisplay) {
- qCWarning(qLcWaylandCompositorHardwareIntegration) << "could not retrieve EGLDisplay from platform integration";
- return false;
- }
+ if (!mEglDisplay)
+ qFatal("could not retrieve EGLDisplay from platform integration");
} else {
- qCWarning(qLcWaylandCompositorHardwareIntegration) << "Platform integration doesn't have native interface";
- return false;
+ qFatal("Platform integration doesn't have native interface");
}
new XCompositeHandler(m_compositor, mDisplay);
- return true;
}
QtWayland::ClientBuffer *XCompositeEglClientBufferIntegration::createBufferFor(wl_resource *buffer)
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
index 2c3116df1..80ce88b5f 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
@@ -45,7 +45,7 @@ class XCompositeEglClientBufferIntegration : public QtWayland::ClientBufferInteg
public:
XCompositeEglClientBufferIntegration();
- bool initializeHardware(struct ::wl_display *display) override;
+ void initializeHardware(struct ::wl_display *display) override;
QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
inline Display *xDisplay() const { return mDisplay; }
inline EGLDisplay eglDisplay() const { return mEglDisplay; }
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
index 5cd016761..c21374395 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
@@ -70,19 +70,16 @@ XCompositeGLXClientBufferIntegration::~XCompositeGLXClientBufferIntegration()
delete mHandler;
}
-bool XCompositeGLXClientBufferIntegration::initializeHardware(struct ::wl_display *)
+void XCompositeGLXClientBufferIntegration::initializeHardware(struct ::wl_display *)
{
qDebug() << "Initializing GLX integration";
QPlatformNativeInterface *nativeInterface = QGuiApplicationPrivate::platformIntegration()->nativeInterface();
if (nativeInterface) {
mDisplay = static_cast<Display *>(nativeInterface->nativeResourceForIntegration("Display"));
- if (!mDisplay) {
- qCWarning(qLcWaylandCompositorHardwareIntegration) << "could not retrieve Display from platform integration";
- return false;
- }
+ if (!mDisplay)
+ qFatal("could not retrieve Display from platform integration");
} else {
- qCWarning(qLcWaylandCompositorHardwareIntegration) << "Platform integration doesn't have native interface";
- return false;
+ qFatal("Platform integration doesn't have native interface");
}
mScreen = XDefaultScreen(mDisplay);
@@ -93,8 +90,7 @@ bool XCompositeGLXClientBufferIntegration::initializeHardware(struct ::wl_displa
m_glxBindTexImageEXT = reinterpret_cast<PFNGLXBINDTEXIMAGEEXTPROC>(glContext->getProcAddress("glXBindTexImageEXT"));
if (!m_glxBindTexImageEXT) {
- qCWarning(qLcWaylandCompositorHardwareIntegration) << "Did not find glxBindTexImageExt, everything will FAIL!";
- return false;
+ qDebug() << "Did not find glxBindTexImageExt, everything will FAIL!";
}
m_glxReleaseTexImageEXT = reinterpret_cast<PFNGLXRELEASETEXIMAGEEXTPROC>(glContext->getProcAddress("glXReleaseTexImageEXT"));
if (!m_glxReleaseTexImageEXT) {
@@ -102,7 +98,6 @@ bool XCompositeGLXClientBufferIntegration::initializeHardware(struct ::wl_displa
}
delete glContext;
- return true;
}
QtWayland::ClientBuffer *XCompositeGLXClientBufferIntegration::createBufferFor(wl_resource *buffer)
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
index 6763d5916..e783d41bf 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
@@ -48,7 +48,7 @@ public:
XCompositeGLXClientBufferIntegration();
~XCompositeGLXClientBufferIntegration() override;
- bool initializeHardware(struct ::wl_display *display) override;
+ void initializeHardware(struct ::wl_display *display) override;
QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
inline Display *xDisplay() const { return mDisplay; }
diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp
index 677293d95..aa8209f71 100644
--- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp
+++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp
@@ -162,16 +162,20 @@ public:
qmlRegisterType<QWaylandWlShellQuickExtension>(uri, 1, 0, "WlShell");
qmlRegisterType<QWaylandWlShellSurface>(uri, 1, 0, "WlShellSurface");
qmlRegisterType<QWaylandQuickShellSurfaceItem>(uri, 1, 0, "ShellSurfaceItem");
+#if QT_DEPRECATED_SINCE(5, 15)
qmlRegisterUncreatableType<QWaylandXdgShellV5>(uri, 1, 0, "XdgShellV5Base", QObject::tr("Cannot create instance of XdgShellV5Base"));
qmlRegisterType<QWaylandXdgShellV5QuickExtension>(uri, 1, 0, "XdgShellV5");
qmlRegisterType<QWaylandXdgSurfaceV5>(uri, 1, 0, "XdgSurfaceV5");
qmlRegisterType<QWaylandXdgPopupV5>(uri, 1, 0, "XdgPopupV5");
+#endif
qmlRegisterType<QWaylandTextInputManagerQuickExtension>(uri, 1, 0, "TextInputManager");
+#if QT_DEPRECATED_SINCE(5, 15)
qmlRegisterType<QWaylandXdgShellV6QuickExtension>(uri, 1, 1, "XdgShellV6");
qmlRegisterType<QWaylandXdgSurfaceV6>(uri, 1, 1, "XdgSurfaceV6");
qmlRegisterUncreatableType<QWaylandXdgToplevelV6>(uri, 1, 1, "XdgToplevelV6", QObject::tr("Cannot create instance of XdgShellToplevelV6"));
qmlRegisterUncreatableType<QWaylandXdgPopupV6>(uri, 1, 1, "XdgPopupV6", QObject::tr("Cannot create instance of XdgShellPopupV6"));
+#endif
qmlRegisterType<QWaylandXdgShellQuickExtension>(uri, 1, 3, "XdgShell");
qmlRegisterType<QWaylandXdgSurface>(uri, 1, 3, "XdgSurface");
diff --git a/src/plugins/decorations/bradient/CMakeLists.txt b/src/plugins/decorations/bradient/CMakeLists.txt
index 9bd875a40..0384eefcd 100644
--- a/src/plugins/decorations/bradient/CMakeLists.txt
+++ b/src/plugins/decorations/bradient/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandBradientDecorationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandBradientDecorationPlugin
+qt_internal_add_plugin(QWaylandBradientDecorationPlugin
OUTPUT_NAME bradient
TYPE wayland-decoration-client
SOURCES
diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp
index 666dd39d1..daae9fcb3 100644
--- a/src/plugins/decorations/bradient/main.cpp
+++ b/src/plugins/decorations/bradient/main.cpp
@@ -40,6 +40,7 @@
#include <QtGui/QCursor>
#include <QtGui/QPainter>
+#include <QtGui/QPainterPath>
#include <QtGui/QPalette>
#include <QtGui/QLinearGradient>
#include <QtGui/QPainterPath>
diff --git a/src/plugins/hardwareintegration/client/brcm-egl/CMakeLists.txt b/src/plugins/hardwareintegration/client/brcm-egl/CMakeLists.txt
index 038a8843c..f264dfbe9 100644
--- a/src/plugins/hardwareintegration/client/brcm-egl/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/brcm-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandBrcmEglClientBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandBrcmEglClientBufferPlugin
+qt_internal_add_plugin(QWaylandBrcmEglClientBufferPlugin
OUTPUT_NAME brcm-egl
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/client/dmabuf-server/CMakeLists.txt b/src/plugins/hardwareintegration/client/dmabuf-server/CMakeLists.txt
index f31e868ac..bda31db01 100644
--- a/src/plugins/hardwareintegration/client/dmabuf-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/dmabuf-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## DmaBufServerBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(DmaBufServerBufferPlugin
+qt_internal_add_plugin(DmaBufServerBufferPlugin
OUTPUT_NAME dmabuf-server
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/CMakeLists.txt b/src/plugins/hardwareintegration/client/drm-egl-server/CMakeLists.txt
index ce3f94254..b2eabcf44 100644
--- a/src/plugins/hardwareintegration/client/drm-egl-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## DrmEglServerBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(DrmEglServerBufferPlugin
+qt_internal_add_plugin(DrmEglServerBufferPlugin
OUTPUT_NAME drm-egl-server
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/client/libhybris-egl-server/CMakeLists.txt b/src/plugins/hardwareintegration/client/libhybris-egl-server/CMakeLists.txt
index 24cc9219e..ed3c4c98f 100644
--- a/src/plugins/hardwareintegration/client/libhybris-egl-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/libhybris-egl-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## LibHybrisEglServerBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(LibHybrisEglServerBufferPlugin
+qt_internal_add_plugin(LibHybrisEglServerBufferPlugin
OUTPUT_NAME libhybris-egl-server
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/client/shm-emulation-server/CMakeLists.txt b/src/plugins/hardwareintegration/client/shm-emulation-server/CMakeLists.txt
index aa6e44331..6b68ab8eb 100644
--- a/src/plugins/hardwareintegration/client/shm-emulation-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/shm-emulation-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## ShmServerBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(ShmServerBufferPlugin
+qt_internal_add_plugin(ShmServerBufferPlugin
OUTPUT_NAME shm-emulation-server
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/client/vulkan-server/CMakeLists.txt b/src/plugins/hardwareintegration/client/vulkan-server/CMakeLists.txt
index 64ea378fa..3cfde4680 100644
--- a/src/plugins/hardwareintegration/client/vulkan-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/vulkan-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## VulkanServerBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(VulkanServerBufferPlugin
+qt_internal_add_plugin(VulkanServerBufferPlugin
OUTPUT_NAME vulkan-server
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/client/wayland-egl/CMakeLists.txt b/src/plugins/hardwareintegration/client/wayland-egl/CMakeLists.txt
index 2eaf092cc..b7e274170 100644
--- a/src/plugins/hardwareintegration/client/wayland-egl/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/wayland-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandEglClientBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandEglClientBufferPlugin
+qt_internal_add_plugin(QWaylandEglClientBufferPlugin
OUTPUT_NAME qt-plugin-wayland-egl
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/CMakeLists.txt b/src/plugins/hardwareintegration/client/xcomposite-egl/CMakeLists.txt
index 972cb1ace..6ed42e74f 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-egl/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/xcomposite-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXCompositeEglClientBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXCompositeEglClientBufferPlugin
+qt_internal_add_plugin(QWaylandXCompositeEglClientBufferPlugin
OUTPUT_NAME xcomposite-egl
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/CMakeLists.txt b/src/plugins/hardwareintegration/client/xcomposite-glx/CMakeLists.txt
index d074fe4ee..54c18d0ed 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-glx/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/client/xcomposite-glx/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXCompositeGlxClientBufferPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXCompositeGlxClientBufferPlugin
+qt_internal_add_plugin(QWaylandXCompositeGlxClientBufferPlugin
OUTPUT_NAME xcomposite-glx
TYPE wayland-graphics-integration-client
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/brcm-egl/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/brcm-egl/CMakeLists.txt
index fb3dc1adf..f3b23112a 100644
--- a/src/plugins/hardwareintegration/compositor/brcm-egl/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/brcm-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandBrcmClientBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandBrcmClientBufferIntegrationPlugin
+qt_internal_add_plugin(QWaylandBrcmClientBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-brcm-egl
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/dmabuf-server/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/dmabuf-server/CMakeLists.txt
index 80cfd59b0..e48671727 100644
--- a/src/plugins/hardwareintegration/compositor/dmabuf-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/dmabuf-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## DmaBufServerBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(DmaBufServerBufferIntegrationPlugin
+qt_internal_add_plugin(DmaBufServerBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-dmabuf-server-buffer
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/drm-egl-server/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/drm-egl-server/CMakeLists.txt
index 95c726fe2..af4eb7458 100644
--- a/src/plugins/hardwareintegration/compositor/drm-egl-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/drm-egl-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## DrmEglServerBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(DrmEglServerBufferIntegrationPlugin
+qt_internal_add_plugin(DrmEglServerBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-drm-egl-server-buffer
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/CMakeLists.txt
index f1040f7d4..aa305ef79 100644
--- a/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/CMakeLists.txt
@@ -4,7 +4,7 @@
## Vsp2HardwareLayerIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(Vsp2HardwareLayerIntegrationPlugin
+qt_internal_add_plugin(Vsp2HardwareLayerIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-vsp2
TYPE wayland-hardware-layer-integration
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/libhybris-egl-server/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/libhybris-egl-server/CMakeLists.txt
index f0e6bec6c..4d97d0345 100644
--- a/src/plugins/hardwareintegration/compositor/libhybris-egl-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/libhybris-egl-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## LibHybrisEglServerBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(LibHybrisEglServerBufferIntegrationPlugin
+qt_internal_add_plugin(LibHybrisEglServerBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-libybris-egl-server.json
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/CMakeLists.txt
index 35ffd7dcc..5ef55ea95 100644
--- a/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/linux-dmabuf-unstable-v1/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandDmabufClientBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandDmabufClientBufferIntegrationPlugin
+qt_internal_add_plugin(QWaylandDmabufClientBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-linux-dmabuf-unstable-v1
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/shm-emulation-server/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/shm-emulation-server/CMakeLists.txt
index 707a53809..0887c5176 100644
--- a/src/plugins/hardwareintegration/compositor/shm-emulation-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/shm-emulation-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## ShmServerBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(ShmServerBufferIntegrationPlugin
+qt_internal_add_plugin(ShmServerBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-shm-emulation-server
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/vulkan-server/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/vulkan-server/CMakeLists.txt
index 472728a64..8a6c03add 100644
--- a/src/plugins/hardwareintegration/compositor/vulkan-server/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/vulkan-server/CMakeLists.txt
@@ -4,7 +4,7 @@
## VulkanServerBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(VulkanServerBufferIntegrationPlugin
+qt_internal_add_plugin(VulkanServerBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-vulkan-server
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/wayland-egl/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/wayland-egl/CMakeLists.txt
index ea307288d..f4731abfa 100644
--- a/src/plugins/hardwareintegration/compositor/wayland-egl/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/wayland-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandEglClientBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandEglClientBufferIntegrationPlugin
+qt_internal_add_plugin(QWaylandEglClientBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-wayland-egl
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/CMakeLists.txt
index 10932f15a..94ecfc41d 100644
--- a/src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/wayland-eglstream-controller/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandEglStreamBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandEglStreamBufferIntegrationPlugin
+qt_internal_add_plugin(QWaylandEglStreamBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-wayland-eglstream-controller
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-egl/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/xcomposite-egl/CMakeLists.txt
index c8beed397..2492b259b 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-egl/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXCompositeEglClientBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXCompositeEglClientBufferIntegrationPlugin
+qt_internal_add_plugin(QWaylandXCompositeEglClientBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-xcomposite-egl
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/.prev_CMakeLists.txt b/src/plugins/hardwareintegration/compositor/xcomposite-glx/.prev_CMakeLists.txt
index 0c448debb..c32b25ba7 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/.prev_CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/.prev_CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXCompositeGlxClientBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXCompositeGlxClientBufferIntegrationPlugin
+qt_internal_add_plugin(QWaylandXCompositeGlxClientBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-xcomposite-glx
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/CMakeLists.txt b/src/plugins/hardwareintegration/compositor/xcomposite-glx/CMakeLists.txt
index 0a2ef9831..bf96be977 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/CMakeLists.txt
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXCompositeGlxClientBufferIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXCompositeGlxClientBufferIntegrationPlugin
+qt_internal_add_plugin(QWaylandXCompositeGlxClientBufferIntegrationPlugin
OUTPUT_NAME qt-wayland-compositor-xcomposite-glx
TYPE wayland-graphics-integration-server
SOURCES
diff --git a/src/plugins/platforms/qwayland-brcm-egl/CMakeLists.txt b/src/plugins/platforms/qwayland-brcm-egl/CMakeLists.txt
index 554f24ba7..4c6fa7a29 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/CMakeLists.txt
+++ b/src/plugins/platforms/qwayland-brcm-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandBrcmEglPlatformIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandBrcmEglPlatformIntegrationPlugin
+qt_internal_add_plugin(QWaylandBrcmEglPlatformIntegrationPlugin
OUTPUT_NAME qwayland-brcm-egl
TYPE platforms
SOURCES
diff --git a/src/plugins/platforms/qwayland-egl/CMakeLists.txt b/src/plugins/platforms/qwayland-egl/CMakeLists.txt
index 5a4e3626b..dd6bc049d 100644
--- a/src/plugins/platforms/qwayland-egl/CMakeLists.txt
+++ b/src/plugins/platforms/qwayland-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandEglPlatformIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandEglPlatformIntegrationPlugin
+qt_internal_add_plugin(QWaylandEglPlatformIntegrationPlugin
OUTPUT_NAME qwayland-egl
TYPE platforms
SOURCES
diff --git a/src/plugins/platforms/qwayland-generic/.prev_CMakeLists.txt b/src/plugins/platforms/qwayland-generic/.prev_CMakeLists.txt
index a6d932cd7..6fe5c2466 100644
--- a/src/plugins/platforms/qwayland-generic/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/qwayland-generic/.prev_CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandIntegrationPlugin
+qt_internal_add_plugin(QWaylandIntegrationPlugin
OUTPUT_NAME qwayland-generic
TYPE platforms
SOURCES
diff --git a/src/plugins/platforms/qwayland-generic/CMakeLists.txt b/src/plugins/platforms/qwayland-generic/CMakeLists.txt
index 342e71189..0c2bb080f 100644
--- a/src/plugins/platforms/qwayland-generic/CMakeLists.txt
+++ b/src/plugins/platforms/qwayland-generic/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandIntegrationPlugin
+qt_internal_add_plugin(QWaylandIntegrationPlugin
OUTPUT_NAME qwayland-generic
TYPE platforms
DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES wayland # special case
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/CMakeLists.txt b/src/plugins/platforms/qwayland-xcomposite-egl/CMakeLists.txt
index 4b84b449d..a4ba2137d 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/CMakeLists.txt
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXCompositeEglPlatformIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXCompositeEglPlatformIntegrationPlugin
+qt_internal_add_plugin(QWaylandXCompositeEglPlatformIntegrationPlugin
OUTPUT_NAME qwayland-xcomposite-egl
TYPE platforms
SOURCES
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/CMakeLists.txt b/src/plugins/platforms/qwayland-xcomposite-glx/CMakeLists.txt
index 1ff3c5ffc..e027e482b 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/CMakeLists.txt
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXCompositeGlxPlatformIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXCompositeGlxPlatformIntegrationPlugin
+qt_internal_add_plugin(QWaylandXCompositeGlxPlatformIntegrationPlugin
OUTPUT_NAME qwayland-xcomposite-glx
TYPE platforms
SOURCES
diff --git a/src/plugins/shellintegration/fullscreen-shell-v1/CMakeLists.txt b/src/plugins/shellintegration/fullscreen-shell-v1/CMakeLists.txt
index 9e068dfe2..686cfbcb6 100644
--- a/src/plugins/shellintegration/fullscreen-shell-v1/CMakeLists.txt
+++ b/src/plugins/shellintegration/fullscreen-shell-v1/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandFullScreenShellV1IntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandFullScreenShellV1IntegrationPlugin
+qt_internal_add_plugin(QWaylandFullScreenShellV1IntegrationPlugin
OUTPUT_NAME fullscreen-shell-v1
TYPE wayland-shell-integration
SOURCES
diff --git a/src/plugins/shellintegration/ivi-shell/CMakeLists.txt b/src/plugins/shellintegration/ivi-shell/CMakeLists.txt
index 4fe1016b0..9cc9e10df 100644
--- a/src/plugins/shellintegration/ivi-shell/CMakeLists.txt
+++ b/src/plugins/shellintegration/ivi-shell/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandIviShellIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandIviShellIntegrationPlugin
+qt_internal_add_plugin(QWaylandIviShellIntegrationPlugin
OUTPUT_NAME ivi-shell
TYPE wayland-shell-integration
SOURCES
diff --git a/src/plugins/shellintegration/wl-shell/CMakeLists.txt b/src/plugins/shellintegration/wl-shell/CMakeLists.txt
index 496bbe68c..3e630c7c8 100644
--- a/src/plugins/shellintegration/wl-shell/CMakeLists.txt
+++ b/src/plugins/shellintegration/wl-shell/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandWlShellIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandWlShellIntegrationPlugin
+qt_internal_add_plugin(QWaylandWlShellIntegrationPlugin
OUTPUT_NAME wl-shell
TYPE wayland-shell-integration
SOURCES
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
index 48e14c753..245fec196 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp
@@ -76,10 +76,11 @@ QWaylandWlShellSurface::~QWaylandWlShellSurface()
delete m_extendedWindow;
}
-void QWaylandWlShellSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
+bool QWaylandWlShellSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
enum resize resizeEdges = convertToResizeEdges(edges);
resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
+ return true;
}
bool QWaylandWlShellSurface::move(QWaylandInputDevice *inputDevice)
diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
index 324c10aac..ca7ba602c 100644
--- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
+++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface_p.h
@@ -76,7 +76,7 @@ public:
~QWaylandWlShellSurface() override;
using QtWayland::wl_shell_surface::resize;
- void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
+ bool resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
using QtWayland::wl_shell_surface::move;
bool move(QWaylandInputDevice *inputDevice) override;
diff --git a/src/plugins/shellintegration/xdg-shell-v5/CMakeLists.txt b/src/plugins/shellintegration/xdg-shell-v5/CMakeLists.txt
index fec8b2c89..231bac087 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/CMakeLists.txt
+++ b/src/plugins/shellintegration/xdg-shell-v5/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXdgShellV5IntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXdgShellV5IntegrationPlugin
+qt_internal_add_plugin(QWaylandXdgShellV5IntegrationPlugin
OUTPUT_NAME xdg-shell-v5
TYPE wayland-shell-integration
SOURCES
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
index e8bff9193..770fad7e8 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
@@ -82,10 +82,11 @@ QtWayland::xdg_surface_v5::resize_edge QWaylandXdgSurfaceV5::convertToResizeEdge
| ((edges & Qt::RightEdge) ? resize_edge_right : 0));
}
-void QWaylandXdgSurfaceV5::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
+bool QWaylandXdgSurfaceV5::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
resize_edge resizeEdges = convertToResizeEdges(edges);
resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
+ return true;
}
bool QWaylandXdgSurfaceV5::move(QWaylandInputDevice *inputDevice)
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
index feebee7f4..bf221079e 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5_p.h
@@ -80,7 +80,7 @@ public:
using QtWayland::xdg_surface_v5::resize;
static resize_edge convertToResizeEdges(Qt::Edges edges);
- void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
+ bool resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
using QtWayland::xdg_surface_v5::move;
bool move(QWaylandInputDevice *inputDevice) override;
diff --git a/src/plugins/shellintegration/xdg-shell-v6/CMakeLists.txt b/src/plugins/shellintegration/xdg-shell-v6/CMakeLists.txt
index 094610155..190c6698f 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/CMakeLists.txt
+++ b/src/plugins/shellintegration/xdg-shell-v6/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXdgShellV6IntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXdgShellV6IntegrationPlugin
+qt_internal_add_plugin(QWaylandXdgShellV6IntegrationPlugin
OUTPUT_NAME xdg-shell-v6
TYPE wayland-shell-integration
SOURCES
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
index dc3cfdbfa..c137b308b 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
@@ -237,11 +237,14 @@ QWaylandXdgSurfaceV6::~QWaylandXdgSurfaceV6()
destroy();
}
-void QWaylandXdgSurfaceV6::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
+bool QWaylandXdgSurfaceV6::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
- Q_ASSERT(m_toplevel && m_toplevel->isInitialized());
+ if (!m_toplevel || !m_toplevel->isInitialized())
+ return false;
+
auto resizeEdges = Toplevel::convertToResizeEdges(edges);
m_toplevel->resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
+ return true;
}
bool QWaylandXdgSurfaceV6::move(QWaylandInputDevice *inputDevice)
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
index f77a4d4ba..757b982b9 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
@@ -77,7 +77,7 @@ public:
QWaylandXdgSurfaceV6(QWaylandXdgShellV6 *shell, ::zxdg_surface_v6 *surface, QWaylandWindow *window);
~QWaylandXdgSurfaceV6() override;
- void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
+ bool resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
bool move(QWaylandInputDevice *inputDevice) override;
bool showWindowMenu(QWaylandInputDevice *seat) override;
void setTitle(const QString &title) override;
diff --git a/src/plugins/shellintegration/xdg-shell/CMakeLists.txt b/src/plugins/shellintegration/xdg-shell/CMakeLists.txt
index 848a0ec60..1b55b8eb7 100644
--- a/src/plugins/shellintegration/xdg-shell/CMakeLists.txt
+++ b/src/plugins/shellintegration/xdg-shell/CMakeLists.txt
@@ -4,7 +4,7 @@
## QWaylandXdgShellIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(QWaylandXdgShellIntegrationPlugin
+qt_internal_add_plugin(QWaylandXdgShellIntegrationPlugin
OUTPUT_NAME xdg-shell
TYPE wayland-shell-integration
SOURCES
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index bd1f5a210..b6d23ac10 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -56,10 +56,11 @@ QWaylandXdgSurface::Toplevel::Toplevel(QWaylandXdgSurface *xdgSurface)
: QtWayland::xdg_toplevel(xdgSurface->get_toplevel())
, m_xdgSurface(xdgSurface)
{
- if (auto *decorationManager = m_xdgSurface->m_shell->decorationManager())
- m_decoration = decorationManager->createToplevelDecoration(object());
-
QWindow *window = xdgSurface->window()->window();
+ if (auto *decorationManager = m_xdgSurface->m_shell->decorationManager()) {
+ if (!(window->flags() & Qt::FramelessWindowHint))
+ m_decoration = decorationManager->createToplevelDecoration(object());
+ }
requestWindowStates(window->windowStates());
requestWindowFlags(window->flags());
}
@@ -155,10 +156,12 @@ void QWaylandXdgSurface::Toplevel::xdg_toplevel_close()
void QWaylandXdgSurface::Toplevel::requestWindowFlags(Qt::WindowFlags flags)
{
if (m_decoration) {
- if (flags & Qt::FramelessWindowHint)
- m_decoration->requestMode(QWaylandXdgToplevelDecorationV1::mode_client_side);
- else
+ if (flags & Qt::FramelessWindowHint) {
+ delete m_decoration;
+ m_decoration = nullptr;
+ } else {
m_decoration->unsetMode();
+ }
}
}
@@ -266,11 +269,14 @@ QWaylandXdgSurface::~QWaylandXdgSurface()
destroy();
}
-void QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
+bool QWaylandXdgSurface::resize(QWaylandInputDevice *inputDevice, Qt::Edges edges)
{
- Q_ASSERT(m_toplevel && m_toplevel->isInitialized());
+ if (!m_toplevel || !m_toplevel->isInitialized())
+ return false;
+
auto resizeEdges = Toplevel::convertToResizeEdges(edges);
m_toplevel->resize(inputDevice->wl_seat(), inputDevice->serial(), resizeEdges);
+ return true;
}
bool QWaylandXdgSurface::move(QWaylandInputDevice *inputDevice)
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
index 8f8682a47..0c98be35c 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
@@ -80,7 +80,7 @@ public:
QWaylandXdgSurface(QWaylandXdgShell *shell, ::xdg_surface *surface, QWaylandWindow *window);
~QWaylandXdgSurface() override;
- void resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
+ bool resize(QWaylandInputDevice *inputDevice, Qt::Edges edges) override;
bool move(QWaylandInputDevice *inputDevice) override;
bool showWindowMenu(QWaylandInputDevice *seat) override;
void setTitle(const QString &title) override;
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index 05f00beee..3cecb5bcf 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/qtwaylandscanner/qtwaylandscanner.cpp
@@ -906,6 +906,11 @@ bool Scanner::process()
printEvent(e);
printf("\n");
printf(" {\n");
+ printf(" Q_ASSERT_X(m_resource, \"%s::%s\", \"Uninitialised resource\");\n", interfaceName, e.name.constData());
+ printf(" if (Q_UNLIKELY(!m_resource)) {\n");
+ printf(" qWarning(\"could not call %s::%s as it's not initialised\");\n", interfaceName, e.name.constData());
+ printf(" return;\n");
+ printf(" }\n");
printf(" send_%s(\n", e.name.constData());
printf(" m_resource->handle");
for (const WaylandArgument &a : e.arguments) {
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 499a93a1d..42e23b54c 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -149,7 +149,7 @@ public:
: compositor(c)
{
QSocketNotifier *notifier = new QSocketNotifier(compositor->waylandFileDescriptor(), QSocketNotifier::Read, this);
- connect(notifier, SIGNAL(activated(int)), this, SLOT(processWaylandEvents()));
+ connect(notifier, SIGNAL(activated(QSocketDescriptor)), this, SLOT(processWaylandEvents()));
// connect to the event dispatcher to make sure to flush out the outgoing message queue
connect(QCoreApplication::eventDispatcher(), &QAbstractEventDispatcher::awake, this, &tst_WaylandClient::processWaylandEvents);
connect(QCoreApplication::eventDispatcher(), &QAbstractEventDispatcher::aboutToBlock, this, &tst_WaylandClient::processWaylandEvents);
diff --git a/tests/auto/client/datadevicev1/.prev_CMakeLists.txt b/tests/auto/client/datadevicev1/.prev_CMakeLists.txt
index 97dedb855..e835f09d9 100644
--- a/tests/auto/client/datadevicev1/.prev_CMakeLists.txt
+++ b/tests/auto/client/datadevicev1/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_datadevicev1
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_datadevicev1.cpp
INCLUDE_DIRECTORIES
@@ -26,5 +27,6 @@ qt6_generate_wayland_protocol_server_sources(tst_datadevicev1
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/datadevicev1/CMakeLists.txt b/tests/auto/client/datadevicev1/CMakeLists.txt
index e635e33ce..06a56ccfd 100644
--- a/tests/auto/client/datadevicev1/CMakeLists.txt
+++ b/tests/auto/client/datadevicev1/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_datadevicev1
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_datadevicev1.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_datadevicev1
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/inputcontext/.prev_CMakeLists.txt b/tests/auto/client/inputcontext/.prev_CMakeLists.txt
index cf2301e77..c32f2e930 100644
--- a/tests/auto/client/inputcontext/.prev_CMakeLists.txt
+++ b/tests/auto/client/inputcontext/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_inputcontext
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_inputcontext.cpp
INCLUDE_DIRECTORIES
@@ -26,5 +27,6 @@ qt6_generate_wayland_protocol_server_sources(tst_inputcontext
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/inputcontext/CMakeLists.txt b/tests/auto/client/inputcontext/CMakeLists.txt
index f061a7ea2..5eb73b11c 100644
--- a/tests/auto/client/inputcontext/CMakeLists.txt
+++ b/tests/auto/client/inputcontext/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_inputcontext
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_inputcontext.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_inputcontext
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/nooutput/.prev_CMakeLists.txt b/tests/auto/client/nooutput/.prev_CMakeLists.txt
index 3f09f584c..61b43b0f6 100644
--- a/tests/auto/client/nooutput/.prev_CMakeLists.txt
+++ b/tests/auto/client/nooutput/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_nooutput
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_nooutput.cpp
INCLUDE_DIRECTORIES
@@ -26,5 +27,6 @@ qt6_generate_wayland_protocol_server_sources(tst_nooutput
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/nooutput/CMakeLists.txt b/tests/auto/client/nooutput/CMakeLists.txt
index e5110c0c9..f7e9dfec1 100644
--- a/tests/auto/client/nooutput/CMakeLists.txt
+++ b/tests/auto/client/nooutput/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_nooutput
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_nooutput.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_nooutput
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/output/.prev_CMakeLists.txt b/tests/auto/client/output/.prev_CMakeLists.txt
index 09ca5d6d4..7e8e882c5 100644
--- a/tests/auto/client/output/.prev_CMakeLists.txt
+++ b/tests/auto/client/output/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_output
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_output.cpp
INCLUDE_DIRECTORIES
@@ -26,5 +27,6 @@ qt6_generate_wayland_protocol_server_sources(tst_output
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/output/CMakeLists.txt b/tests/auto/client/output/CMakeLists.txt
index 5d2dfbf9d..e4267fadb 100644
--- a/tests/auto/client/output/CMakeLists.txt
+++ b/tests/auto/client/output/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_output
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_output.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_output
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/primaryselectionv1/.prev_CMakeLists.txt b/tests/auto/client/primaryselectionv1/.prev_CMakeLists.txt
index f86e81e12..3d23b446a 100644
--- a/tests/auto/client/primaryselectionv1/.prev_CMakeLists.txt
+++ b/tests/auto/client/primaryselectionv1/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_primaryselectionv1
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_primaryselectionv1.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_primaryselectionv1
${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/3rdparty/protocol/wp-primary-selection-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/primaryselectionv1/CMakeLists.txt b/tests/auto/client/primaryselectionv1/CMakeLists.txt
index d101c8b3d..a8f9ae131 100644
--- a/tests/auto/client/primaryselectionv1/CMakeLists.txt
+++ b/tests/auto/client/primaryselectionv1/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_primaryselectionv1
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_primaryselectionv1.cpp
INCLUDE_DIRECTORIES
@@ -28,5 +29,6 @@ qt6_generate_wayland_protocol_server_sources(tst_primaryselectionv1
${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/3rdparty/protocol/wp-primary-selection-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/seatv4/.prev_CMakeLists.txt b/tests/auto/client/seatv4/.prev_CMakeLists.txt
index 9e0e4c37e..d37de1da8 100644
--- a/tests/auto/client/seatv4/.prev_CMakeLists.txt
+++ b/tests/auto/client/seatv4/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_seatv4
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_seatv4.cpp
INCLUDE_DIRECTORIES
@@ -26,6 +27,7 @@ qt6_generate_wayland_protocol_server_sources(tst_seatv4
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/seatv4/CMakeLists.txt b/tests/auto/client/seatv4/CMakeLists.txt
index 36b0c8471..5496bd59f 100644
--- a/tests/auto/client/seatv4/CMakeLists.txt
+++ b/tests/auto/client/seatv4/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_seatv4
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_seatv4.cpp
INCLUDE_DIRECTORIES
@@ -27,6 +28,7 @@ qt6_generate_wayland_protocol_server_sources(tst_seatv4
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/seatv5/.prev_CMakeLists.txt b/tests/auto/client/seatv5/.prev_CMakeLists.txt
index 11d615fb2..fa9e5a4eb 100644
--- a/tests/auto/client/seatv5/.prev_CMakeLists.txt
+++ b/tests/auto/client/seatv5/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_seatv5
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_seatv5.cpp
INCLUDE_DIRECTORIES
@@ -26,5 +27,6 @@ qt6_generate_wayland_protocol_server_sources(tst_seatv5
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/seatv5/CMakeLists.txt b/tests/auto/client/seatv5/CMakeLists.txt
index fefdcf8db..67bfc6535 100644
--- a/tests/auto/client/seatv5/CMakeLists.txt
+++ b/tests/auto/client/seatv5/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_seatv5
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_seatv5.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_seatv5
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/shared/coreprotocol.cpp b/tests/auto/client/shared/coreprotocol.cpp
index b0be2cb4e..0d9885216 100644
--- a/tests/auto/client/shared/coreprotocol.cpp
+++ b/tests/auto/client/shared/coreprotocol.cpp
@@ -158,6 +158,14 @@ void Output::sendScale(Resource *resource)
wl_output::send_scale(resource->handle, m_data.scale);
}
+void Output::sendDone(wl_client *client)
+{
+ Q_ASSERT(m_version >= WL_OUTPUT_DONE_SINCE_VERSION);
+ auto resources = resourceMap().values(client);
+ for (auto *r : resources)
+ wl_output::send_done(r->handle);
+}
+
void Output::sendDone()
{
Q_ASSERT(m_version >= WL_OUTPUT_DONE_SINCE_VERSION);
diff --git a/tests/auto/client/shared/coreprotocol.h b/tests/auto/client/shared/coreprotocol.h
index a12d22d36..8d5e2d66d 100644
--- a/tests/auto/client/shared/coreprotocol.h
+++ b/tests/auto/client/shared/coreprotocol.h
@@ -245,6 +245,7 @@ public:
void sendScale(int factor);
void sendScale(Resource *resource); // Sends current scale to only one client
+ void sendDone(wl_client *client);
void sendDone();
int scale() const { return m_data.scale; }
diff --git a/tests/auto/client/shared/shared.pri b/tests/auto/client/shared/shared.pri
index b59cdc481..97202e787 100644
--- a/tests/auto/client/shared/shared.pri
+++ b/tests/auto/client/shared/shared.pri
@@ -4,6 +4,7 @@ QMAKE_USE += wayland-server
WAYLANDSERVERSOURCES += \
$$PWD/../../../../src/3rdparty/protocol/wayland.xml \
+ $$PWD/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml \
$$PWD/../../../../src/3rdparty/protocol/xdg-shell.xml \
$$PWD/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
@@ -14,6 +15,7 @@ HEADERS += \
$$PWD/coreprotocol.h \
$$PWD/datadevice.h \
$$PWD/mockcompositor.h \
+ $$PWD/xdgoutputv1.h \
$$PWD/xdgshell.h \
$$PWD/textinput.h
@@ -22,5 +24,6 @@ SOURCES += \
$$PWD/coreprotocol.cpp \
$$PWD/datadevice.cpp \
$$PWD/mockcompositor.cpp \
+ $$PWD/xdgoutputv1.cpp \
$$PWD/xdgshell.cpp \
$$PWD/textinput.cpp
diff --git a/tests/auto/client/shared/xdgoutputv1.cpp b/tests/auto/client/shared/xdgoutputv1.cpp
new file mode 100644
index 000000000..2b491d2ee
--- /dev/null
+++ b/tests/auto/client/shared/xdgoutputv1.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "xdgoutputv1.h"
+
+namespace MockCompositor {
+
+int XdgOutputV1::s_nextId = 1;
+
+void XdgOutputV1::sendLogicalSize(const QSize &size)
+{
+ m_logicalGeometry.setSize(size);
+ for (auto *resource : resourceMap())
+ zxdg_output_v1::send_logical_size(resource->handle, size.width(), size.height());
+}
+
+void XdgOutputV1::addResource(wl_client *client, int id, int version)
+{
+ auto *resource = add(client, id, version)->handle;
+ zxdg_output_v1::send_logical_size(resource, m_logicalGeometry.width(), m_logicalGeometry.height());
+ send_logical_position(resource, m_logicalGeometry.x(), m_logicalGeometry.y());
+ if (version >= ZXDG_OUTPUT_V1_NAME_SINCE_VERSION)
+ send_name(resource, m_name);
+ if (version >= ZXDG_OUTPUT_V1_DESCRIPTION_SINCE_VERSION)
+ send_description(resource, m_description);
+
+ if (version < 3) // zxdg_output_v1.done has been deprecated
+ zxdg_output_v1::send_done(resource);
+ else {
+ m_output->sendDone(client);
+ }
+}
+
+} // namespace MockCompositor
diff --git a/tests/auto/client/shared/xdgoutputv1.h b/tests/auto/client/shared/xdgoutputv1.h
new file mode 100644
index 000000000..85b134500
--- /dev/null
+++ b/tests/auto/client/shared/xdgoutputv1.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MOCKCOMPOSITOR_XDGOUTPUTV1_H
+#define MOCKCOMPOSITOR_XDGOUTPUTV1_H
+
+#include "coreprotocol.h"
+
+#include <qwayland-server-xdg-output-unstable-v1.h>
+
+namespace MockCompositor {
+
+class XdgOutputV1 : public QObject, public QtWaylandServer::zxdg_output_v1
+{
+public:
+ explicit XdgOutputV1(Output *output)
+ : m_output(output)
+ , m_logicalGeometry(m_output->m_data.position, QSize(m_output->m_data.mode.resolution / m_output->m_data.scale))
+ , m_name(QString("WL-%1").arg(s_nextId++))
+ {}
+
+ void send_logical_size(int32_t width, int32_t height) = delete;
+ void sendLogicalSize(const QSize &size);
+
+ void send_done() = delete; // zxdg_output_v1.done has been deprecated (in protocol version 3)
+
+ void addResource(wl_client *client, int id, int version);
+ Output *m_output = nullptr;
+ QRect m_logicalGeometry;
+ QString m_name;
+ QString m_description = "This is an Xdg Output description";
+ static int s_nextId;
+};
+
+class XdgOutputManagerV1 : public Global, public QtWaylandServer::zxdg_output_manager_v1
+{
+ Q_OBJECT
+public:
+ explicit XdgOutputManagerV1(CoreCompositor *compositor, int version = 3)
+ : QtWaylandServer::zxdg_output_manager_v1(compositor->m_display, version)
+ , m_version(version)
+ {}
+ int m_version = 1; // TODO: remove on libwayland upgrade
+ QMap<Output *, XdgOutputV1 *> m_xdgOutputs;
+ XdgOutputV1 *getXdgOutput(Output *output)
+ {
+ if (auto *xdgOutput = m_xdgOutputs.value(output))
+ return xdgOutput;
+ return m_xdgOutputs[output] = new XdgOutputV1(output); // TODO: free memory
+ }
+
+protected:
+ void zxdg_output_manager_v1_get_xdg_output(Resource *resource, uint32_t id, wl_resource *outputResource) override
+ {
+ auto *output = fromResource<Output>(outputResource);
+ auto *xdgOutput = getXdgOutput(output);
+ xdgOutput->addResource(resource->client(), id, resource->version());
+ }
+};
+
+} // namespace MockCompositor
+
+#endif // MOCKCOMPOSITOR_XDGOUTPUTV1_H
diff --git a/tests/auto/client/surface/.prev_CMakeLists.txt b/tests/auto/client/surface/.prev_CMakeLists.txt
index 43d6ec34e..a8eb58dac 100644
--- a/tests/auto/client/surface/.prev_CMakeLists.txt
+++ b/tests/auto/client/surface/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_surface
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_surface.cpp
INCLUDE_DIRECTORIES
@@ -26,5 +27,6 @@ qt6_generate_wayland_protocol_server_sources(tst_surface
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/surface/CMakeLists.txt b/tests/auto/client/surface/CMakeLists.txt
index a1545115e..a3962ddaf 100644
--- a/tests/auto/client/surface/CMakeLists.txt
+++ b/tests/auto/client/surface/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_surface
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_surface.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_surface
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/tabletv2/.prev_CMakeLists.txt b/tests/auto/client/tabletv2/.prev_CMakeLists.txt
index e7fc3f60f..5fecee50a 100644
--- a/tests/auto/client/tabletv2/.prev_CMakeLists.txt
+++ b/tests/auto/client/tabletv2/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_tabletv2
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_tabletv2.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_tabletv2
${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/3rdparty/protocol/tablet-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/tabletv2/CMakeLists.txt b/tests/auto/client/tabletv2/CMakeLists.txt
index f5a12c554..d039e30dd 100644
--- a/tests/auto/client/tabletv2/CMakeLists.txt
+++ b/tests/auto/client/tabletv2/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_tabletv2
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_tabletv2.cpp
INCLUDE_DIRECTORIES
@@ -28,5 +29,6 @@ qt6_generate_wayland_protocol_server_sources(tst_tabletv2
${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/3rdparty/protocol/tablet-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/xdgdecorationv1/.prev_CMakeLists.txt b/tests/auto/client/xdgdecorationv1/.prev_CMakeLists.txt
index 9311070a8..228ad83e0 100644
--- a/tests/auto/client/xdgdecorationv1/.prev_CMakeLists.txt
+++ b/tests/auto/client/xdgdecorationv1/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_xdgdecorationv1
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_xdgdecorationv1.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_xdgdecorationv1
${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/3rdparty/protocol/xdg-decoration-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/xdgdecorationv1/CMakeLists.txt b/tests/auto/client/xdgdecorationv1/CMakeLists.txt
index de067a135..fb0fd06ad 100644
--- a/tests/auto/client/xdgdecorationv1/CMakeLists.txt
+++ b/tests/auto/client/xdgdecorationv1/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_xdgdecorationv1
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_xdgdecorationv1.cpp
INCLUDE_DIRECTORIES
@@ -28,5 +29,6 @@ qt6_generate_wayland_protocol_server_sources(tst_xdgdecorationv1
${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/3rdparty/protocol/xdg-decoration-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp b/tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp
index cf20a1373..98c0e0446 100644
--- a/tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp
+++ b/tests/auto/client/xdgdecorationv1/tst_xdgdecorationv1.cpp
@@ -153,6 +153,8 @@ private slots:
void initTestCase();
void cleanup() { QTRY_VERIFY2(isClean(), qPrintable(dirtyMessage())); }
void clientSidePreferredByCompositor();
+ void initialFramelessWindowHint();
+ void delayedFramelessWindowHint();
};
void tst_xdgdecorationv1::initTestCase()
@@ -182,5 +184,41 @@ void tst_xdgdecorationv1::clientSidePreferredByCompositor()
QTRY_VERIFY(!window.frameMargins().isNull());
}
+void tst_xdgdecorationv1::initialFramelessWindowHint()
+{
+ QRasterWindow window;
+ window.setFlag(Qt::FramelessWindowHint, true);
+ window.show();
+ QCOMPOSITOR_TRY_COMPARE(get<XdgDecorationManagerV1>()->resourceMap().size(), 1);
+ QCOMPOSITOR_TRY_VERIFY(xdgToplevel());
+ exec([=]{
+ xdgToplevel()->sendCompleteConfigure();
+ });
+ QCOMPOSITOR_TRY_VERIFY(xdgSurface()->m_committedConfigureSerial);
+
+ // The client should not have create a decoration object, because that allows the compositor
+ // to override our decision and add server side decorations to our window.
+ QCOMPOSITOR_TRY_VERIFY(!toplevelDecoration());
+}
+
+void tst_xdgdecorationv1::delayedFramelessWindowHint()
+{
+ QRasterWindow window;
+ window.show();
+ QCOMPOSITOR_TRY_COMPARE(get<XdgDecorationManagerV1>()->resourceMap().size(), 1);
+ QCOMPOSITOR_TRY_VERIFY(xdgToplevel());
+ exec([=]{
+ xdgToplevel()->sendCompleteConfigure();
+ });
+ QCOMPOSITOR_TRY_VERIFY(xdgSurface()->m_committedConfigureSerial);
+ QCOMPOSITOR_TRY_VERIFY(toplevelDecoration());
+
+ window.setFlag(Qt::FramelessWindowHint, true);
+
+ // The client should now destroy the decoration object, so the compositor is no longer
+ // able to force window decorations
+ QCOMPOSITOR_TRY_VERIFY(!toplevelDecoration());
+}
+
QCOMPOSITOR_TEST_MAIN(tst_xdgdecorationv1)
#include "tst_xdgdecorationv1.moc"
diff --git a/tests/auto/client/xdgoutput/.prev_CMakeLists.txt b/tests/auto/client/xdgoutput/.prev_CMakeLists.txt
index 505c7c050..3fc5aa772 100644
--- a/tests/auto/client/xdgoutput/.prev_CMakeLists.txt
+++ b/tests/auto/client/xdgoutput/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_xdgoutput
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_xdgoutput.cpp
INCLUDE_DIRECTORIES
@@ -24,8 +25,8 @@ qt_add_test(tst_xdgoutput
qt6_generate_wayland_protocol_server_sources(tst_xdgoutput
FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/xdgoutput/CMakeLists.txt b/tests/auto/client/xdgoutput/CMakeLists.txt
index e0a4b756e..341624e4a 100644
--- a/tests/auto/client/xdgoutput/CMakeLists.txt
+++ b/tests/auto/client/xdgoutput/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_xdgoutput
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_xdgoutput.cpp
INCLUDE_DIRECTORIES
@@ -25,8 +26,8 @@ qt_add_test(tst_xdgoutput
qt6_generate_wayland_protocol_server_sources(tst_xdgoutput
FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/xdgoutput/tst_xdgoutput.cpp b/tests/auto/client/xdgoutput/tst_xdgoutput.cpp
index 16e29a3c6..0e5b2c878 100644
--- a/tests/auto/client/xdgoutput/tst_xdgoutput.cpp
+++ b/tests/auto/client/xdgoutput/tst_xdgoutput.cpp
@@ -26,77 +26,21 @@
**
****************************************************************************/
+#include "xdgoutputv1.h"
#include "mockcompositor.h"
+
#include <QtOpenGL/QOpenGLWindow>
#include <QtGui/QRasterWindow>
#include <QtGui/QScreen>
-#include <qwayland-server-xdg-output-unstable-v1.h>
-
using namespace MockCompositor;
-// TODO: move to shared folder?
-class XdgOutputV1 : public QObject, public QtWaylandServer::zxdg_output_v1
-{
-public:
- explicit XdgOutputV1(Output *output)
- : m_output(output)
- , m_logicalGeometry(m_output->m_data.position, QSize(m_output->m_data.mode.resolution / m_output->m_data.scale))
- , m_name(QString("WL-%1").arg(s_nextId++))
- {}
-
- void addResource(wl_client *client, int id, int version)
- {
- auto *resource = add(client, id, version)->handle;
- send_logical_size(resource, m_logicalGeometry.width(), m_logicalGeometry.height());
- send_logical_position(resource, m_logicalGeometry.x(), m_logicalGeometry.y());
- if (version >= ZXDG_OUTPUT_V1_NAME_SINCE_VERSION)
- send_name(resource, m_name);
- if (version >= ZXDG_OUTPUT_V1_DESCRIPTION_SINCE_VERSION)
- send_description(resource, m_description);
- send_done(resource);
- }
- Output *m_output = nullptr;
- QRect m_logicalGeometry;
- QString m_name;
- QString m_description = "This is an Xdg Output description";
- static int s_nextId;
-};
-
-int XdgOutputV1::s_nextId = 1;
-
-class XdgOutputManagerV1 : public Global, public QtWaylandServer::zxdg_output_manager_v1
-{
- Q_OBJECT
-public:
- explicit XdgOutputManagerV1(CoreCompositor *compositor, int version = 2)
- : QtWaylandServer::zxdg_output_manager_v1(compositor->m_display, version)
- , m_version(version)
- {}
- int m_version = 1; // TODO: remove on libwayland upgrade
- QMap<Output *, XdgOutputV1 *> m_xdgOutputs;
- XdgOutputV1 *getXdgOutput(Output *output)
- {
- if (auto *xdgOutput = m_xdgOutputs.value(output))
- return xdgOutput;
- return m_xdgOutputs[output] = new XdgOutputV1(output); // TODO: free memory
- }
-
-protected:
- void zxdg_output_manager_v1_get_xdg_output(Resource *resource, uint32_t id, wl_resource *outputResource) override
- {
- auto *output = fromResource<Output>(outputResource);
- auto *xdgOutput = getXdgOutput(output);
- xdgOutput->addResource(resource->client(), id, resource->version());
- }
-};
-
class XdgOutputV1Compositor : public DefaultCompositor {
public:
explicit XdgOutputV1Compositor()
{
exec([this] {
- int version = 2; // version 2 of of unstable-v1
+ int version = 3; // version 3 of of unstable-v1
add<XdgOutputManagerV1>(version);
});
}
@@ -110,11 +54,13 @@ private slots:
void cleanup();
void primaryScreen();
void overrideGeometry();
+ void changeGeometry();
};
void tst_xdgoutput::cleanup()
{
QCOMPOSITOR_COMPARE(getAll<Output>().size(), 1); // Only the default output should be left
+ QTRY_COMPARE(QGuiApplication::screens().size(), 1);
QTRY_VERIFY2(isClean(), qPrintable(dirtyMessage()));
}
@@ -124,7 +70,8 @@ void tst_xdgoutput::primaryScreen()
QCOMPOSITOR_TRY_COMPARE(get<XdgOutputManagerV1>()->resourceMap().size(), 1);
exec([=] {
auto *resource = xdgOutput()->resourceMap().value(client());
- QCOMPARE(resource->version(), 2);
+ QCOMPARE(resource->version(), 3);
+ QCOMPARE(xdgOutput()->m_logicalGeometry.size(), QSize(1920, 1080));
});
auto *s = QGuiApplication::primaryScreen();
QTRY_COMPARE(s->size(), QSize(1920, 1080));
@@ -149,5 +96,43 @@ void tst_xdgoutput::overrideGeometry()
exec([=] { remove(output(1)); });
}
+void tst_xdgoutput::changeGeometry()
+{
+ auto *xdgOutput = exec([=] {
+ auto *output = add<Output>();
+ auto *xdgOutput = get<XdgOutputManagerV1>()->getXdgOutput(output);
+ xdgOutput->m_logicalGeometry = QRect(10, 20, 800, 1200);
+ return xdgOutput;
+ });
+
+ QTRY_COMPARE(QGuiApplication::screens().size(), 2);
+ auto *screen = QGuiApplication::screens()[1];
+ QTRY_COMPARE(screen->size(), QSize(800, 1200));
+
+ exec([=] {
+ xdgOutput->sendLogicalSize(QSize(1024, 768));
+ });
+
+ // Now we want to check that the client doesn't apply the size immediately, but waits for the
+ // done event. If we TRY_COMPARE immediately, we risk that the client just hasn't handled the
+ // logical_size request yet, so we add a screen and verify it on the client side just to give
+ // the client a chance to mess up.
+ exec([=] { add<Output>(); });
+ QTRY_COMPARE(QGuiApplication::screens().size(), 3);
+ exec([=] { remove(output(2)); });
+
+ // The logical_size event should have been handled by now, but state should not have been applied yet.
+ QTRY_COMPARE(screen->size(), QSize(800, 1200));
+
+ exec([=] {
+ xdgOutput->m_output->sendDone();
+ });
+
+ // Finally, the size should change
+ QTRY_COMPARE(screen->size(), QSize(1024, 768));
+
+ exec([=] { remove(output(1)); });
+}
+
QCOMPOSITOR_TEST_MAIN(tst_xdgoutput)
#include "tst_xdgoutput.moc"
diff --git a/tests/auto/client/xdgoutput/xdgoutput.pro b/tests/auto/client/xdgoutput/xdgoutput.pro
index 3cfbb6a76..f65327546 100644
--- a/tests/auto/client/xdgoutput/xdgoutput.pro
+++ b/tests/auto/client/xdgoutput/xdgoutput.pro
@@ -1,8 +1,5 @@
include (../shared/shared.pri)
-WAYLANDSERVERSOURCES += \
- $$PWD/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
-
TARGET = tst_xdgoutput
SOURCES += tst_xdgoutput.cpp
diff --git a/tests/auto/client/xdgshell/.prev_CMakeLists.txt b/tests/auto/client/xdgshell/.prev_CMakeLists.txt
index 65f762107..4faa14f3d 100644
--- a/tests/auto/client/xdgshell/.prev_CMakeLists.txt
+++ b/tests/auto/client/xdgshell/.prev_CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_xdgshell
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_xdgshell.cpp
INCLUDE_DIRECTORIES
@@ -26,5 +27,6 @@ qt6_generate_wayland_protocol_server_sources(tst_xdgshell
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/client/xdgshell/CMakeLists.txt b/tests/auto/client/xdgshell/CMakeLists.txt
index cab6c8825..a680575ca 100644
--- a/tests/auto/client/xdgshell/CMakeLists.txt
+++ b/tests/auto/client/xdgshell/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_add_test(tst_xdgshell
../shared/datadevice.cpp ../shared/datadevice.h
../shared/mockcompositor.cpp ../shared/mockcompositor.h
../shared/textinput.cpp ../shared/textinput.h
+ ../shared/xdgoutputv1.cpp ../shared/xdgoutputv1.h
../shared/xdgshell.cpp ../shared/xdgshell.h
tst_xdgshell.cpp
INCLUDE_DIRECTORIES
@@ -27,5 +28,6 @@ qt6_generate_wayland_protocol_server_sources(tst_xdgshell
FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/text-input-unstable-v2.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/wayland.xml
+ ${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-output-unstable-v1.xml
${CMAKE_CURRENT_SOURCE_DIR}/../shared/../../../../src/3rdparty/protocol/xdg-shell.xml
)
diff --git a/tests/auto/compositor/compositor/mockclient.cpp b/tests/auto/compositor/compositor/mockclient.cpp
index 27d1eed89..76ccd0c58 100644
--- a/tests/auto/compositor/compositor/mockclient.cpp
+++ b/tests/auto/compositor/compositor/mockclient.cpp
@@ -57,7 +57,7 @@ MockClient::MockClient()
fd = wl_display_get_fd(display);
QSocketNotifier *readNotifier = new QSocketNotifier(fd, QSocketNotifier::Read, this);
- connect(readNotifier, SIGNAL(activated(int)), this, SLOT(readEvents()));
+ connect(readNotifier, SIGNAL(activated(QSocketDescriptor)), this, SLOT(readEvents()));
QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher;
connect(dispatcher, SIGNAL(awake()), this, SLOT(flushDisplay()));