summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/System/Kbd.hsc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xmobar/System/Kbd.hsc')
-rw-r--r--src/Xmobar/System/Kbd.hsc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Xmobar/System/Kbd.hsc b/src/Xmobar/System/Kbd.hsc
index b9e1d57..3a4ecda 100644
--- a/src/Xmobar/System/Kbd.hsc
+++ b/src/Xmobar/System/Kbd.hsc
@@ -113,9 +113,9 @@ data XkbNamesRec = XkbNamesRec {
symbols :: Atom,
types :: Atom,
compat :: Atom,
- vmods :: Ptr Atom,
- indicators :: Ptr Atom, -- array
- groups :: Ptr Atom, -- array
+ vmods :: [Atom], -- Atom vmods[XkbNumVirtualMods];
+ indicators :: [Atom], -- Atom indicators[XkbNumIndicators];
+ groups :: [Atom], -- Atom groups[XkbNumKbdGroups];
keys :: Ptr XkbKeyNameRec,
key_aliases :: Ptr CChar, -- dont care XkbKeyAliasRec,
radio_groups :: Ptr Atom,
@@ -178,9 +178,9 @@ instance Storable XkbNamesRec where
r_symbols <- (#peek XkbNamesRec, symbols ) ptr
r_types <- (#peek XkbNamesRec, types ) ptr
r_compat <- (#peek XkbNamesRec, compat ) ptr
- r_vmods <- (#peek XkbNamesRec, vmods ) ptr
- r_indicators <- (#peek XkbNamesRec, indicators ) ptr
- r_groups <- (#peek XkbNamesRec, groups ) ptr
+ r_vmods <- peekArray (#const XkbNumVirtualMods) $ (#ptr XkbNamesRec, vmods ) ptr
+ r_indicators <- peekArray (#const XkbNumIndicators) $ (#ptr XkbNamesRec, indicators ) ptr
+ r_groups <- peekArray (#const XkbNumKbdGroups) $ (#ptr XkbNamesRec, groups ) ptr
r_keys <- (#peek XkbNamesRec, keys ) ptr
r_key_aliases <- (#peek XkbNamesRec, key_aliases ) ptr
r_radio_groups <- (#peek XkbNamesRec, radio_groups ) ptr