Changeset View
Changeset View
Standalone View
Standalone View
kcms/lookandfeel/kcm.cpp
Show All 16 Lines | 1 | /* This file is part of the KDE Project | |||
---|---|---|---|---|---|
17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | Boston, MA 02110-1301, USA. | 18 | Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "kcm.h" | 21 | #include "kcm.h" | ||
22 | #include "../krdb/krdb.h" | 22 | #include "../krdb/krdb.h" | ||
23 | #include "config-kcm.h" | 23 | #include "config-kcm.h" | ||
24 | #include "config-workspace.h" | 24 | #include "config-workspace.h" | ||
25 | #include <klauncher_iface.h> | | |||
26 | 25 | | |||
27 | #include <KAboutData> | 26 | #include <KAboutData> | ||
28 | #include <KSharedConfig> | 27 | #include <KSharedConfig> | ||
29 | #include <KGlobalSettings> | 28 | #include <KGlobalSettings> | ||
30 | #include <KIconLoader> | 29 | #include <KIconLoader> | ||
31 | #include <KAutostart> | 30 | #include <KAutostart> | ||
32 | #include <KRun> | 31 | #include <KRun> | ||
33 | #include <KService> | 32 | #include <KService> | ||
34 | 33 | | |||
34 | #include <QDBusConnection> | ||||
35 | #include <QDBusMessage> | ||||
35 | #include <QDebug> | 36 | #include <QDebug> | ||
36 | #include <QQuickItem> | 37 | #include <QQuickItem> | ||
37 | #include <QQuickWindow> | 38 | #include <QQuickWindow> | ||
38 | #include <QStandardPaths> | 39 | #include <QStandardPaths> | ||
39 | #include <QProcess> | 40 | #include <QProcess> | ||
40 | #include <QStandardItemModel> | 41 | #include <QStandardItemModel> | ||
41 | #include <QX11Info> | 42 | #include <QX11Info> | ||
42 | 43 | | |||
43 | #include <KLocalizedString> | 44 | #include <KLocalizedString> | ||
44 | #include <KPackage/PackageLoader> | 45 | #include <KPackage/PackageLoader> | ||
45 | 46 | | |||
46 | #include <X11/Xlib.h> | 47 | #include <X11/Xlib.h> | ||
47 | 48 | | |||
49 | #include <updatelaunchenvjob.h> | ||||
50 | | ||||
48 | #include "lookandfeelsettings.h" | 51 | #include "lookandfeelsettings.h" | ||
49 | 52 | | |||
50 | #ifdef HAVE_XCURSOR | 53 | #ifdef HAVE_XCURSOR | ||
51 | # include "../cursortheme/xcursor/xcursortheme.h" | 54 | # include "../cursortheme/xcursor/xcursortheme.h" | ||
52 | # include <X11/Xcursor/Xcursor.h> | 55 | # include <X11/Xcursor/Xcursor.h> | ||
53 | #endif | 56 | #endif | ||
54 | 57 | | |||
55 | #ifdef HAVE_XFIXES | 58 | #ifdef HAVE_XFIXES | ||
▲ Show 20 Lines • Show All 428 Lines • ▼ Show 20 Line(s) | 480 | #if defined(HAVE_XFIXES) && XFIXES_MAJOR >= 2 && XCURSOR_LIB_VERSION >= 10105 | |||
484 | } | 487 | } | ||
485 | 488 | | |||
486 | XCursorTheme theme(themeDir); | 489 | XCursorTheme theme(themeDir); | ||
487 | 490 | | |||
488 | if (!CursorTheme::haveXfixes()) { | 491 | if (!CursorTheme::haveXfixes()) { | ||
489 | return; | 492 | return; | ||
490 | } | 493 | } | ||
491 | 494 | | |||
492 | // Set up the proper launch environment for newly started apps | 495 | UpdateLaunchEnvJob launchEnvJob(QStringLiteral("XCURSOR_THEME"), themeName); | ||
493 | OrgKdeKLauncherInterface klauncher(QStringLiteral("org.kde.klauncher5"), | | |||
494 | QStringLiteral("/KLauncher"), | | |||
495 | QDBusConnection::sessionBus()); | | |||
496 | klauncher.setLaunchEnv(QStringLiteral("XCURSOR_THEME"), themeName); | | |||
497 | 496 | | |||
498 | // Update the Xcursor X resources | 497 | // Update the Xcursor X resources | ||
499 | runRdb(0); | 498 | runRdb(0); | ||
500 | 499 | | |||
501 | // Notify all applications that the cursor theme has changed | 500 | // Notify all applications that the cursor theme has changed | ||
502 | KGlobalSettings::self()->emitChange(KGlobalSettings::CursorChanged); | 501 | KGlobalSettings::self()->emitChange(KGlobalSettings::CursorChanged); | ||
503 | 502 | | |||
504 | // Reload the standard cursors | 503 | // Reload the standard cursors | ||
▲ Show 20 Lines • Show All 204 Lines • Show Last 20 Lines |