diff --git a/kcms/keyboard/keyboard_daemon.cpp b/kcms/keyboard/keyboard_daemon.cpp --- a/kcms/keyboard/keyboard_daemon.cpp +++ b/kcms/keyboard/keyboard_daemon.cpp @@ -70,9 +70,9 @@ KeyboardDaemon::~KeyboardDaemon() { - LayoutMemoryPersister layoutMemoryPersister(layoutMemory); - layoutMemoryPersister.setGlobalLayout(X11Helper::getCurrentLayout()); - layoutMemoryPersister.save(); + LayoutMemoryPersister layoutMemoryPersister(layoutMemory); + layoutMemoryPersister.setGlobalLayout(currentLayout); + layoutMemoryPersister.save(); QDBusConnection dbus = QDBusConnection::sessionBus(); dbus.disconnect(QString(), KEYBOARD_DBUS_OBJECT_PATH, KEYBOARD_DBUS_SERVICE_NAME, KEYBOARD_DBUS_CONFIG_RELOAD_MESSAGE, this, SLOT(configureKeyboard()));