Commit aae0d59d authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Look and feel KCM] Keep cursor size when applying theme

I have configured my system to use an 48 px mouse cursor. When applying a new look and feel theme, it might change the cursor
at runtime but load it with default size. Since the size is never actually changed, on next startup the previous size is restored,
but it should apply it correctly already.

Differential Revision:
parent d6f28e43
......@@ -499,6 +499,8 @@ void KCMLookandFeel::setCursorTheme(const QString themeName)
// in previous versions the Xfixes code wasn't enabled due to a bug in the
// build system (freedesktop bug #975).
const int cursorSize = cg.readEntry("cursorSize", 0);
QDir themeDir = cursorThemeDir(themeName, 0);
if (!themeDir.exists()) {
......@@ -544,7 +546,7 @@ void KCMLookandFeel::setCursorTheme(const QString themeName)
<< QStringLiteral("pirate");
foreach (const QString &name, names) {
XFixesChangeCursorByName(QX11Info::display(), theme.loadCursor(name, 0), QFile::encodeName(name));
XFixesChangeCursorByName(QX11Info::display(), theme.loadCursor(name, cursorSize), QFile::encodeName(name));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment