diff options
author | Antonio Ospite <ao2@ao2.it> | 2014-08-02 15:16:24 +0200 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2016-01-21 14:35:05 -0600 |
commit | f3c64c9422a1d026fef38f0326193c6e51ab507a (patch) | |
tree | 8ad7a73c3e164900ffa5cf9bfbc8557f0f8cc066 | |
parent | d8ff867e95e548476c68db12ade3a0a4697a24a1 (diff) | |
download | libgnomekbd-f3c64c9422a1d026fef38f0326193c6e51ab507a.tar.gz |
libgnomekbd/gkbd-keyboard-drawing.c: draw keys with invalid keycodes
Some keys like the function key "FN" are described in geometry files but
they have no keycode associated to them. You can find such keys in the
thinkpad and in the hhk geometry files.
Allow drawing the shape of these keys with invalid keycodes, and just
skip looking for the labels as the label is derived from the keycode.
https://bugzilla.gnome.org/show_bug.cgi?id=734618
-rw-r--r-- | libgnomekbd/gkbd-keyboard-drawing.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libgnomekbd/gkbd-keyboard-drawing.c b/libgnomekbd/gkbd-keyboard-drawing.c index 899df18..16c2406 100644 --- a/libgnomekbd/gkbd-keyboard-drawing.c +++ b/libgnomekbd/gkbd-keyboard-drawing.c @@ -1000,7 +1000,7 @@ draw_key_label (GkbdKeyboardDrawingRenderContext * context, gint padding; gint g, l, glp; - if (!drawing->xkb) + if (!drawing->xkb || keycode == INVALID_KEYCODE) return; padding = 23 * context->scale_numerator / context->scale_denominator; /* 2.3mm */ @@ -1742,8 +1742,6 @@ init_keys_and_doodads (GkbdKeyboardDrawing * drawing) xkbkey->name. name); - if (keycode == INVALID_KEYCODE) - continue; #ifdef KBDRAW_DEBUG printf (" initing key %d, shape: %p(%p + %d), code: %u\n", |