[keyboard] Add kwin-specific configuration flag
Running `kwin_wayland --locale1` makes KWin listen to locale1 for keyboard updates, but not everybody has that. Introduce a KWin-specific configuration flag that will (re)write the KWin configuration.
This commit is contained in:
parent
4fea2920d7
commit
5414e51245
@ -714,6 +714,11 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
m_convertedKeymapPath = getString( configurationMap, "convertedKeymapPath" );
|
||||
m_configureEtcDefaultKeyboard = getBool( configurationMap, "writeEtcDefaultKeyboard", true );
|
||||
m_configureLocale1 = getBool( configurationMap, "useLocale1", !isX11 );
|
||||
|
||||
bool bogus = false;
|
||||
const auto configureItems = getSubMap( configurationMap, "configure", bogus );
|
||||
m_configureKWin = getBool( configureItems, "kwin", false );
|
||||
|
||||
m_guessLayout = getBool( configurationMap, "guessLayout", true );
|
||||
}
|
||||
|
||||
|
@ -121,6 +121,7 @@ private:
|
||||
bool m_configureXkb = true;
|
||||
bool m_configureEtcDefaultKeyboard = true;
|
||||
bool m_configureLocale1 = false;
|
||||
bool m_configureKWin = false;
|
||||
bool m_guessLayout = false;
|
||||
|
||||
// The state determines whether we guess settings or preserve them:
|
||||
|
@ -31,3 +31,15 @@ convertedKeymapPath: "/lib/kbd/keymaps/xkb"
|
||||
# Guess the default layout from the user locale. If false, keeps the current
|
||||
# OS keyboard layout as the default (useful if the layout is pre-configured).
|
||||
#guessLayout: true
|
||||
|
||||
# Things that should be configured.
|
||||
configure:
|
||||
# Configure KWin (KDE Plasma) directly by editing the
|
||||
# configuration file and informing KWin over DBus. This is
|
||||
# useful in a system that uses Wayland but does **not** connect
|
||||
# locale1 with KWin.
|
||||
#
|
||||
# Systems that use KDE Plasma Wayland and locale1 can instead start the
|
||||
# compositor KWin with command-line argument `--locale1`. That
|
||||
# argument makes this configuration option unnecessary.
|
||||
kwin: false
|
||||
|
@ -11,4 +11,9 @@ properties:
|
||||
writeEtcDefaultKeyboard: { type: boolean, default: true }
|
||||
useLocale1: { type: boolean, default: false }
|
||||
guessLayout: { type: boolean, default: true }
|
||||
configure:
|
||||
additionalProperties: false
|
||||
type: object
|
||||
properties:
|
||||
kwin: { type: boolean, default: false }
|
||||
required: [ xOrgConfFileName, convertedKeymapPath ]
|
||||
|
Loading…
Reference in New Issue
Block a user