wayland: remove workaround for xdg-dialog base name with wayland-protocols <= 1.35

We require 1.36 now, so the workaround is no longer necessary
This commit is contained in:
Xaver Hugl 2024-05-07 17:03:58 +02:00
parent 4759ec6089
commit 6b3f211ef7
4 changed files with 6 additions and 58 deletions

View file

@ -18,6 +18,7 @@ qt6_generate_wayland_protocol_client_sources(KWinIntegrationTestFramework
${WaylandProtocols_DATADIR}/staging/fractional-scale/fractional-scale-v1.xml
${WaylandProtocols_DATADIR}/staging/cursor-shape/cursor-shape-v1.xml
${WaylandProtocols_DATADIR}/staging/security-context/security-context-v1.xml
${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-output-device-v2.xml
${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-output-management-v2.xml
@ -25,37 +26,6 @@ qt6_generate_wayland_protocol_client_sources(KWinIntegrationTestFramework
${PLASMA_WAYLAND_PROTOCOLS_DIR}/zkde-screencast-unstable-v1.xml
${PLASMA_WAYLAND_PROTOCOLS_DIR}/fake-input.xml
)
if (Qt6_VERSION VERSION_LESS "6.7.1")
# the qtwaylandscanner macro cannot handle the mismatched file name and <protocol name=""
find_package(QtWaylandScanner REQUIRED)
if (WaylandProtocols_VERSION VERSION_LESS 1.36)
ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework
PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
BASENAME dialog-v1
)
target_compile_definitions(KWinIntegrationTestFramework PUBLIC
-DHAVE_XDG_DIALOG_V1_HEADER=0
)
else()
ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework
PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
BASENAME xdg-dialog-v1
)
target_compile_definitions(KWinIntegrationTestFramework PUBLIC
-DHAVE_XDG_DIALOG_V1_HEADER=1
)
endif()
else()
qt6_generate_wayland_protocol_client_sources(KWinIntegrationTestFramework
FILES
${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
)
target_compile_definitions(KWinIntegrationTestFramework PUBLIC
-DHAVE_XDG_DIALOG_V1_HEADER=1
)
endif()
target_sources(KWinIntegrationTestFramework PRIVATE
generic_scene_opengl_test.cpp
kwin_wayland_test.cpp

View file

@ -34,11 +34,7 @@
#include "qwayland-xdg-decoration-unstable-v1.h"
#include "qwayland-xdg-shell.h"
#include "qwayland-zkde-screencast-unstable-v1.h"
#if HAVE_XDG_DIALOG_V1_HEADER
#include "qwayland-xdg-dialog-v1.h"
#else
#include "qwayland-dialog-v1.h"
#endif
namespace KWayland
{

View file

@ -286,25 +286,11 @@ ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml
PROTOCOL ${PROJECT_SOURCE_DIR}/src/wayland/protocols/xx-color-management-v4.xml
BASENAME xx-color-management-v4
)
if (WaylandProtocols_VERSION VERSION_LESS 1.36)
ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml
PRIVATE_CODE
PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
BASENAME dialog-v1
)
target_compile_definitions(kwin PRIVATE
-DHAVE_XDG_DIALOG_V1_HEADER=0
)
else()
ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml
PRIVATE_CODE
PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
BASENAME xdg-dialog-v1
)
target_compile_definitions(kwin PRIVATE
-DHAVE_XDG_DIALOG_V1_HEADER=1
)
endif()
ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml
PRIVATE_CODE
PROTOCOL ${WaylandProtocols_DATADIR}/staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml

View file

@ -9,11 +9,7 @@
#include "display.h"
#include "xdgshell.h"
#if HAVE_XDG_DIALOG_V1_HEADER
#include "qwayland-server-xdg-dialog-v1.h"
#else
#include "qwayland-server-dialog-v1.h"
#endif
#include <QHash>