diff options
author | Nikolay Yakimov <root@livid.pp.ru> | 2021-08-12 08:11:57 +0300 |
---|---|---|
committer | Nikolay Yakimov <root@livid.pp.ru> | 2021-08-12 22:14:17 +0300 |
commit | b401e8fceab54e998d3a533fc458d2cbcec57021 (patch) | |
tree | 1e04bc94274d1b8bdbf2daaf2a4ddadee3eb4506 /src/Xmobar | |
parent | 9e37aa78a12734a6c025b634d2e9aa598cd1a0eb (diff) | |
download | xmobar-b401e8fceab54e998d3a533fc458d2cbcec57021.tar.gz xmobar-b401e8fceab54e998d3a533fc458d2cbcec57021.tar.bz2 |
Fix XkbNamesRec type and Storable instance
Diffstat (limited to 'src/Xmobar')
-rw-r--r-- | src/Xmobar/System/Kbd.hsc | 12 |
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 |