diff options
author | Mavridis Philippe <[email protected]> | 2024-11-13 13:36:45 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2025-01-12 13:28:25 +0200 |
commit | a015431b684ba776b37d9c539d25fbbc50924ad2 (patch) | |
tree | 6ddd657fc3a780cc623da4fa9cea5f7279ae318f | |
parent | ee4e57b2089766fb828ff1c50951176a933644e0 (diff) | |
download | tdebase-a015431b684ba776b37d9c539d25fbbc50924ad2.tar.gz tdebase-a015431b684ba776b37d9c539d25fbbc50924ad2.zip |
Kxkb: try to fix "Unknown" layout bug
Signed-off-by: Mavridis Philippe <[email protected]>
-rw-r--r-- | kxkb/extension.cpp | 2 | ||||
-rw-r--r-- | kxkb/kxkb.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp index 863cf22e5..8197043aa 100644 --- a/kxkb/extension.cpp +++ b/kxkb/extension.cpp @@ -174,7 +174,7 @@ void XKBExtension::processXEvent(XEvent *event) { if (xkb_event->any.xkb_type == XkbStateNotify && xkb_event->state.changed & XkbGroupStateMask) { - emit groupChanged(xkb_event->state.group); + emit groupChanged((uint)xkb_event->state.group); } } diff --git a/kxkb/kxkb.cpp b/kxkb/kxkb.cpp index 8d0fbc517..db2a857d3 100644 --- a/kxkb/kxkb.cpp +++ b/kxkb/kxkb.cpp @@ -290,7 +290,8 @@ void KXKBApp::menuActivated(int id) void KXKBApp::slotGroupChanged(uint group) { - if (group < 0 || group >= kxkbConfig.m_layouts.count()) { + kdDebug() << "slotGroupChanged: " << group << ", layout count: " << kxkbConfig.m_layouts.count() << endl; + if (group >= kxkbConfig.m_layouts.count()) { if (m_tray) { m_tray->setError(i18n("Unknown")); } |