From 522728de8cf1d4f24ab5d56ab400b8d6676228b4 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 5 Jan 2026 15:05:25 +0100 Subject: 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. --- CMake/options.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'CMake') diff --git a/CMake/options.cmake b/CMake/options.cmake index 589550c73..937bc29f9 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -2,7 +2,7 @@ # Main CMakeLists.txt to build the FLTK project using CMake (www.cmake.org) # Originally written by Michael Surette # -# 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 @@ -318,6 +318,14 @@ if(UNIX) else() set(HAVE_XDG_DIALOG 0) endif() + if(EXISTS ${PROTOCOLS}/staging/cursor-shape/cursor-shape-v1.xml AND + EXISTS ${PROTOCOLS}/stable/tablet/tablet-v2.xml) + set(HAVE_CURSOR_SHAPE 1) + message(STATUS "Found dev files for Wayland protocols 'Cursor shape' and 'Tablet'") + message(STATUS " ==> option FLTK_USE_DBUS can be turned OFF if 'Cursor shape'-enabled wayland compositor is used.") + else() + set(HAVE_CURSOR_SHAPE 0) + endif() if(FLTK_BACKEND_X11) include(FindX11) endif() -- cgit v1.2.3