Changeset View
Changeset View
Standalone View
Standalone View
kcms/cursortheme/kcmcursortheme.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | 46 | | |||
47 | #include <QQmlListReference> | 47 | #include <QQmlListReference> | ||
48 | #include <QX11Info> | 48 | #include <QX11Info> | ||
49 | #include <QStandardItemModel> | 49 | #include <QStandardItemModel> | ||
50 | 50 | | |||
51 | #include <X11/Xlib.h> | 51 | #include <X11/Xlib.h> | ||
52 | #include <X11/Xcursor/Xcursor.h> | 52 | #include <X11/Xcursor/Xcursor.h> | ||
53 | 53 | | |||
54 | #include <updatelaunchenvjob.h> | ||||
55 | | ||||
54 | #include "cursorthemesettings.h" | 56 | #include "cursorthemesettings.h" | ||
55 | #include <klauncher_iface.h> | | |||
56 | 57 | | |||
57 | #ifdef HAVE_XFIXES | 58 | #ifdef HAVE_XFIXES | ||
58 | # include <X11/extensions/Xfixes.h> | 59 | # include <X11/extensions/Xfixes.h> | ||
59 | #endif | 60 | #endif | ||
60 | 61 | | |||
61 | K_PLUGIN_FACTORY_WITH_JSON(CursorThemeConfigFactory, "kcm_cursortheme.json", registerPlugin<CursorThemeConfig>();) | 62 | K_PLUGIN_FACTORY_WITH_JSON(CursorThemeConfigFactory, "kcm_cursortheme.json", registerPlugin<CursorThemeConfig>();) | ||
62 | 63 | | |||
63 | CursorThemeConfig::CursorThemeConfig(QObject *parent, const QVariantList &args) | 64 | CursorThemeConfig::CursorThemeConfig(QObject *parent, const QVariantList &args) | ||
▲ Show 20 Lines • Show All 224 Lines • ▼ Show 20 Line(s) | 285 | #if HAVE_XFIXES && XFIXES_MAJOR >= 2 && XCURSOR_LIB_VERSION >= 10105 | |||
288 | 289 | | |||
289 | if (!CursorTheme::haveXfixes()) { | 290 | if (!CursorTheme::haveXfixes()) { | ||
290 | return false; | 291 | return false; | ||
291 | } | 292 | } | ||
292 | 293 | | |||
293 | QByteArray themeName = QFile::encodeName(theme->name()); | 294 | QByteArray themeName = QFile::encodeName(theme->name()); | ||
294 | 295 | | |||
295 | // Set up the proper launch environment for newly started apps | 296 | // Set up the proper launch environment for newly started apps | ||
296 | OrgKdeKLauncherInterface klauncher(QStringLiteral("org.kde.klauncher5"), | 297 | UpdateLaunchEnvJob launchEnvJob(QStringLiteral("XCURSOR_THEME"), themeName); | ||
297 | QStringLiteral("/KLauncher"), | | |||
298 | QDBusConnection::sessionBus()); | | |||
299 | klauncher.setLaunchEnv(QStringLiteral("XCURSOR_THEME"), themeName); | | |||
300 | 298 | | |||
301 | // Update the Xcursor X resources | 299 | // Update the Xcursor X resources | ||
302 | runRdb(0); | 300 | runRdb(0); | ||
303 | 301 | | |||
304 | // Reload the standard cursors | 302 | // Reload the standard cursors | ||
305 | QStringList names; | 303 | QStringList names; | ||
306 | 304 | | |||
307 | // Qt cursors | 305 | // Qt cursors | ||
▲ Show 20 Lines • Show All 292 Lines • Show Last 20 Lines |