mirror of
https://github.com/theCheeseboard/libtdesktopenvironment.git
synced 2025-01-22 10:22:02 -05:00
Fix keyboard layout handling on X11
This commit is contained in:
parent
d2a00cc608
commit
4be1056a7a
1 changed files with 11 additions and 11 deletions
|
@ -206,18 +206,18 @@ void X11Backend::loadKeyboardLayouts() {
|
|||
}
|
||||
|
||||
void X11Backend::updateKeyboardLayout() {
|
||||
// QProcess xkbmapProcess;
|
||||
// xkbmapProcess.start("setxkbmap", {"-query"});
|
||||
// xkbmapProcess.waitForFinished();
|
||||
QProcess xkbmapProcess;
|
||||
xkbmapProcess.start("setxkbmap", {"-query"});
|
||||
xkbmapProcess.waitForFinished();
|
||||
|
||||
// while (xkbmapProcess.canReadLine()) {
|
||||
// QString line = xkbmapProcess.readLine().trimmed();
|
||||
// if (line.startsWith("layout:")) {
|
||||
// QString layout = line.split(" ", Qt::SkipEmptyParts).at(1);
|
||||
// d->currentLayout = layout;
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
while (xkbmapProcess.canReadLine()) {
|
||||
QString line = xkbmapProcess.readLine().trimmed();
|
||||
if (line.startsWith("layout:")) {
|
||||
QString layout = line.split(" ", Qt::SkipEmptyParts).at(1);
|
||||
d->currentLayout = layout;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool X11Backend::nativeEventFilter(const QByteArray& eventType, void* message, qintptr* result) {
|
||||
|
|
Loading…
Reference in a new issue