wayland: Use xdg-dialog-v1 basename
This commit is contained in:
parent
2e92fca017
commit
31f80d18f2
4 changed files with 44 additions and 11 deletions
|
@ -28,15 +28,31 @@ qt6_generate_wayland_protocol_client_sources(KWinIntegrationTestFramework
|
|||
if (Qt6_VERSION VERSION_LESS "6.7.1")
|
||||
# the qtwaylandscanner macro cannot handle the mismatched file name and <protocol name=""
|
||||
find_package(QtWaylandScanner REQUIRED)
|
||||
ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework
|
||||
PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
|
||||
BASENAME dialog-v1
|
||||
)
|
||||
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
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
#include "qwayland-xdg-decoration-unstable-v1.h"
|
||||
#include "qwayland-xdg-shell.h"
|
||||
#include "qwayland-zkde-screencast-unstable-v1.h"
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 7, 1)
|
||||
#include "qwayland-dialog-v1.h"
|
||||
#else
|
||||
#if HAVE_XDG_DIALOG_V1_HEADER
|
||||
#include "qwayland-xdg-dialog-v1.h"
|
||||
#else
|
||||
#include "qwayland-dialog-v1.h"
|
||||
#endif
|
||||
|
||||
namespace KWayland
|
||||
|
|
|
@ -231,10 +231,23 @@ ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml
|
|||
PROTOCOL ${PROJECT_SOURCE_DIR}/src/wayland/protocols/xx-color-management-v2.xml
|
||||
BASENAME xx-color-management-v2
|
||||
)
|
||||
ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml
|
||||
PROTOCOL ${WaylandProtocols_DATADIR}/staging/xdg-dialog/xdg-dialog-v1.xml
|
||||
BASENAME dialog-v1
|
||||
)
|
||||
if (WaylandProtocols_VERSION VERSION_LESS 1.36)
|
||||
ecm_add_qtwayland_server_protocol_kde(WaylandProtocols_xml
|
||||
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
|
||||
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
|
||||
PROTOCOL ${WaylandProtocols_DATADIR}/staging/linux-drm-syncobj/linux-drm-syncobj-v1.xml
|
||||
BASENAME linux-drm-syncobj-v1
|
||||
|
|
|
@ -9,7 +9,11 @@
|
|||
#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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue