aboutsummaryrefslogtreecommitdiff
path: root/src/keyboard-x11.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-05-15 09:39:00 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2025-05-15 09:39:00 +0200
commitd23f0fca1b03e24b84d0c146624121cfa9e88eca (patch)
tree24985fd54fb08f31767840c89c2c6f5e04fa5f5f /src/keyboard-x11.c
parent70a3ea2b263a3d9095a9c00b09e2b3086d3f55cc (diff)
parent0228ae333701838150196be8addc508a479d9612 (diff)
downloadayatana-indicator-keyboard-d23f0fca1b03e24b84d0c146624121cfa9e88eca.tar.gz
ayatana-indicator-keyboard-d23f0fca1b03e24b84d0c146624121cfa9e88eca.tar.bz2
ayatana-indicator-keyboard-d23f0fca1b03e24b84d0c146624121cfa9e88eca.zip
Merge branch 'tari01-pr/add-tecla'HEADmain
Attributes GH PR #77: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/pull/77
Diffstat (limited to 'src/keyboard-x11.c')
-rw-r--r--src/keyboard-x11.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/keyboard-x11.c b/src/keyboard-x11.c
index d7d482f5..27dfb97c 100644
--- a/src/keyboard-x11.c
+++ b/src/keyboard-x11.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 Robert Tari <robert@tari.in>
+ * Copyright 2021-2025 Robert Tari <robert@tari.in>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 3, as published
@@ -390,7 +390,7 @@ guint keyboard_GetLayoutIndex (Keyboard *pKeyboard)
return pKeyboard->pPrivate->nLayout;
}
-void keyboard_GetLayout(Keyboard *pKeyboard, gint nLayout, gchar **pLanguage, gchar **pDescription)
+void keyboard_GetLayout(Keyboard *pKeyboard, gint nLayout, gchar **pLanguage, gchar **pDescription, gchar **pId)
{
if (nLayout == -1)
{
@@ -432,7 +432,14 @@ void keyboard_GetLayout(Keyboard *pKeyboard, gint nLayout, gchar **pLanguage, gc
*pDescription = g_strdup(pLayout->sDescription);
}
- g_free(sId);
+ if (pId != NULL)
+ {
+ *pId = sId;
+ }
+ else
+ {
+ g_free(sId);
+ }
}
void keyboard_SetLayout(Keyboard *pKeyboard, gint nLayout)