[keyboard] Send DBus signal to KWin for new keyboard layout
This commit is contained in:
parent
6498f9e0d1
commit
cde6acd224
@ -378,14 +378,23 @@ Config::applyKWin()
|
||||
const QString layouts = join( m_selectedLayout, m_additionalLayoutInfo.additionalLayout );
|
||||
const QString variants = join( m_selectedVariant, m_additionalLayoutInfo.additionalVariant );
|
||||
|
||||
bool updated = false;
|
||||
for ( const auto& path : paths )
|
||||
{
|
||||
const QString candidate = path + QStringLiteral( "/kxkbrc" );
|
||||
if ( rewriteKWin( candidate, m_selectedModel, layouts, variants ) )
|
||||
{
|
||||
updated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( updated )
|
||||
{
|
||||
auto kwin = QDBusMessage::createSignal(
|
||||
QStringLiteral( "/Layouts" ), QStringLiteral( "org.kde.keyboard" ), QStringLiteral( "reloadConfig" ) );
|
||||
QDBusConnection::sessionBus().send( kwin );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user