Re: [Gtk-osx-devs] gdk_keymap_lookup_key patch




On Sep 15, 2009, at 6:34 PM, Joe Jones wrote:

Hi

I implemented gdk_keymap_lookup_key because it's used by a program I'm
porting to OS x. Who do I send patches to, what form should they be
in. As far as I can see this function isn't implemented in the latest
git tree.


Joe Jones



--- gdkkeys-quartz-original.c 2009-09-15 21:52:03.000000000 +0100
+++ gdkkeys-quartz.c 2009-09-15 22:21:34.000000000 +0100
@@ -563,9 +563,10 @@
  g_return_val_if_fail (key != NULL, 0);
  g_return_val_if_fail (key->group < 4, 0);

-  /* FIXME: Implement */
+  g_return_val_if_fail(key->keycode < NUM_KEYCODES, 0);
+  g_return_val_if_fail(key->level < KEYVALS_PER_KEYCODE, 0);

-  return 0;
+  return keyval_array[KEYVALS_PER_KEYCODE * key->keycode + key->level];
}

#define GET_KEYVAL(keycode, group, level) (keyval_array[(keycode *
KEYVALS_PER_KEYCODE + group * 2 + level)])

Unfortunately, there's nothing we can do with the patch here. You'll have to submit it to Gtk+. The best way is to open a ticket at http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B. Join http://mail.gnome.org/mailman/listinfo/gtk-devel-list and pester them until they apply and commit it.

Regards,
John Ralls







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]