[libgnomekbd] libgnomekbd/gkbd-keyboard-drawing.c: draw keys with invalid keycodes
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgnomekbd] libgnomekbd/gkbd-keyboard-drawing.c: draw keys with invalid keycodes
- Date: Thu, 21 Jan 2016 20:35:49 +0000 (UTC)
commit f3c64c9422a1d026fef38f0326193c6e51ab507a
Author: Antonio Ospite <ao2 ao2 it>
Date: Sat Aug 2 15:16:24 2014 +0200
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
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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]