diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2024-11-13 13:36:45 +0200 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2024-11-13 13:36:45 +0200 |
commit | ce8f215f883b7ca7301eb37b5a02d416b82dc52e (patch) | |
tree | c524419cc25c13850dbbae2503af77082eb060a3 | |
parent | 743b789446ad9a694c18a58c7cfdd19645ee47c8 (diff) | |
download | tdebase-ce8f215f883b7ca7301eb37b5a02d416b82dc52e.tar.gz tdebase-ce8f215f883b7ca7301eb37b5a02d416b82dc52e.zip |
Kxkb: try to fix "Unknown" layout bug
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-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 ca812b011..0c7898938 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 92b12472b..320b55f40 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")); } |