diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2026-01-05 15:05:25 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2026-01-05 15:05:25 +0100 |
| commit | 522728de8cf1d4f24ab5d56ab400b8d6676228b4 (patch) | |
| tree | bf7595024fdcb59e4f6db4bc9726d2ed02eef161 /src/CMakeLists.txt | |
| parent | 11325da073a78b5a012e64b9732e253b50289763 (diff) | |
Wayland: use modern approach to cursor shapes with the "Cursor shape" protocol.
This removes the need to guess names of files each theme gives to cursor shapes
and makes linking with dbus superfluous when the compositor supports
the new protocol.
The old, surface-based approach to cursor shapes remains used for custom shapes.
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b5f10cc0d..55f5166b2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ # # CMakeLists.txt to build the FLTK library using CMake (www.cmake.org) # -# Copyright 1998-2025 by Bill Spitzak and others. +# Copyright 1998-2026 by Bill Spitzak and others. # # This library is free software. Distribution and use rights are outlined in # the file "COPYING" which should have been included with this file. If this @@ -835,6 +835,31 @@ if(UNIX AND FLTK_USE_WAYLAND) list(APPEND SHARED_FILES "xdg-dialog-protocol.c") endif() + if(HAVE_CURSOR_SHAPE) + set(INFILE ${PROTOCOLS}/staging/cursor-shape/cursor-shape-v1.xml) + add_custom_command( + OUTPUT cursor-shape-protocol.c cursor-shape-client-protocol.h + COMMAND wayland-scanner private-code ${INFILE} cursor-shape-protocol.c + COMMAND wayland-scanner client-header ${INFILE} cursor-shape-client-protocol.h + DEPENDS ${INFILE} + VERBATIM + ) + list(APPEND STATIC_FILES "cursor-shape-protocol.c") + list(APPEND SHARED_FILES "cursor-shape-protocol.c") +# File cursor-shape-protocol.c requires memory data allocated by the "Tablet" protocol +# but that protocol's header file is not necessary for the "cursor shape" protocol itself. + set(INFILE ${PROTOCOLS}/stable/tablet/tablet-v2.xml) + add_custom_command( + OUTPUT tablet-protocol.c # tablet-client-protocol.h + COMMAND wayland-scanner private-code ${INFILE} tablet-protocol.c +# COMMAND wayland-scanner client-header ${INFILE} tablet-client-protocol.h + DEPENDS ${INFILE} + VERBATIM + ) + list(APPEND STATIC_FILES "tablet-protocol.c") + list(APPEND SHARED_FILES "tablet-protocol.c") + endif() + if(STOP_REQUIRED) message(FATAL_ERROR "*** Terminating: one or more required file(s) were not found. ***") endif() |
