summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-11-13 13:36:45 +0200
committerMavridis Philippe <mavridisf@gmail.com>2024-11-13 13:36:45 +0200
commitce8f215f883b7ca7301eb37b5a02d416b82dc52e (patch)
treec524419cc25c13850dbbae2503af77082eb060a3
parent743b789446ad9a694c18a58c7cfdd19645ee47c8 (diff)
downloadtdebase-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.cpp2
-rw-r--r--kxkb/kxkb.cpp3
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"));
}