Drop obsolete HAVE_XCURSOR

kcm_mouse is the only remaining place where Xcursor is used, but only with
BUILD_KCM_MOUSE_X11 enabled; but then it is non-optionally linked anyway.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner 2026-05-28 21:41:24 +02:00 committed by Andreas Sturmlechner
parent 04cd1212bc
commit ba4ddb78f6
3 changed files with 0 additions and 8 deletions

View file

@ -20,7 +20,6 @@ check_include_files(sys/param.h HAVE_SYS_PARAM_H)
check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H)
check_include_files("sys/types.h;sys/statfs.h" HAVE_SYS_STATFS_H)
check_include_files(unistd.h HAVE_UNISTD_H)
set(HAVE_XCURSOR {X11_Xcursor_FOUND}) # many uses
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)

View file

@ -1,3 +1,2 @@
#cmakedefine01 HAVE_XCURSOR
#cmakedefine01 HAVE_XORGLIBINPUT
#cmakedefine01 HAVE_X11

View file

@ -7,8 +7,6 @@
#include "cursortheme.h"
#include <config-X11.h>
#include <QFile>
#include <KConfigGroup>
@ -16,13 +14,10 @@
#include <private/qtx11extras_p.h>
#if HAVE_XCURSOR
#include <X11/Xcursor/Xcursor.h>
#endif
void CursorTheme::applyCursorTheme(const QString &theme, int size)
{
#if HAVE_XCURSOR
// Apply the KDE cursor theme to ourselves
if (!theme.isEmpty()) {
XcursorSetTheme(QX11Info::display(), QFile::encodeName(theme));
@ -37,5 +32,4 @@ void CursorTheme::applyCursorTheme(const QString &theme, int size)
XDefineCursor(QX11Info::display(), DefaultRootWindow(QX11Info::display()), handle);
XFreeCursor(QX11Info::display(), handle); // Don't leak the cursor
XFlush(QX11Info::display());
#endif
}