Index: gtk+//ChangeLog
===================================================================
RCS file: /export/cvs/gnome-2.0/gtk+/ChangeLog,v
retrieving revision 1.26
diff -p -u -5 -r1.26 ChangeLog
--- gtk+//ChangeLog	2002/03/31 22:13:35	1.26
+++ gtk+//ChangeLog	2002/04/11 15:59:59
@@ -1,5 +1,12 @@
+Sat Apr 6  7:00:20 2002  Shivram U  <shivaram.upadhyayula@wipro.com>
+
+	* gdk/x11/gdkkeys-x11.c: (gdk_keymap_get_entries_for_keyval)
+	(gdk_keymap_translate_keyboard_state) getting the keysym/keycode
+	value from calls to XKeycodeToKeysym/XKeysymToKeycode for sun
+	keyboards. Fixes plus button not being activated in gnome-calculator
+
 Sat Mar 30 15:19:24 2002  Kristian Rietveld  <kris@gtk.org>
 
 	* gtk/gtktreemodelsort.c: revert the latest stamp increment changes,
 	as it broke stuff for trees
 
Index: gtk+//acconfig.h
===================================================================
RCS file: /export/cvs/gnome-2.0/gtk+/acconfig.h,v
retrieving revision 1.1.1.1
diff -p -u -5 -r1.1.1.1 acconfig.h
--- gtk+//acconfig.h	2002/03/05 20:41:22	1.1.1.1
+++ gtk+//acconfig.h	2002/04/11 15:59:59
@@ -67,10 +67,12 @@
 /* Most machines will be happy with int or void.  IRIX requires '...' */
 #undef SIGNAL_ARG_TYPE
 
 #undef GETTEXT_PACKAGE
 
+#undef SUN_KB
+
 /* #undef PACKAGE */
 /* #undef VERSION */
 
 
 /* Leave that blank line there!!  Autoheader needs it.
Index: gtk+//configure.in
===================================================================
RCS file: /export/cvs/gnome-2.0/gtk+/configure.in,v
retrieving revision 1.9
diff -p -u -5 -r1.9 configure.in
--- gtk+//configure.in	2002/03/30 07:58:59	1.9
+++ gtk+//configure.in	2002/04/11 15:59:59
@@ -149,10 +149,24 @@ AM_CONDITIONAL(OS_WIN32, test "$os_win32
 if test "$os_win32" = "yes"; then
   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
 fi
 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
 
+dnl Checking for platform solaris
+case "$host" in
+  *solaris*)
+    os_solaris=yes;
+    ;;
+  *)
+    os_solaris=no;
+    ;;
+esac
+
+if test "$os_solaris" = "yes"; then
+  AC_DEFINE(SUN_KB)
+fi
+
 dnl figure debugging default, prior to $ac_help setup
 dnl
 GLIB_AC_DIVERT_BEFORE_HELP([
 if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
         debug_default=yes
Index: gtk+//gdk/x11/gdkkeys-x11.c
===================================================================
RCS file: /export/cvs/gnome-2.0/gtk+/gdk/x11/gdkkeys-x11.c,v
retrieving revision 1.2
diff -p -u -5 -r1.2 gdkkeys-x11.c
--- gtk+//gdk/x11/gdkkeys-x11.c	2002/03/16 07:15:37	1.2
+++ gtk+//gdk/x11/gdkkeys-x11.c	2002/04/11 15:59:59
@@ -155,11 +155,11 @@ update_keymaps (void)
        * up the whole idea of "consumed modifiers" because shift is consumed.
        * However, <shift>Tab is not usually GDK_ISO_Left_Tab without XKB,
        * we we fudge the map here.
        */
       keycode = min_keycode;
-      while (keycode < max_keycode)
+      while (keycode <= max_keycode)
         {
           KeySym *syms = keymap + (keycode - min_keycode) * keysyms_per_keycode;
 	  /* Check both groups */
 	  for (i = 0 ; i < 2 ; i++)
 	    {
@@ -405,18 +405,25 @@ gdk_keymap_get_entries_for_keyval (GdkKe
     {
       const KeySym *map = get_keymap ();
       gint keycode;
       
       keycode = min_keycode;
-      while (keycode < max_keycode)
+      while (keycode <= max_keycode)
         {
           const KeySym *syms = map + (keycode - min_keycode) * keysyms_per_keycode;
           gint i = 0;
 
           while (i < keysyms_per_keycode)
             {
+            /* We need to find out why the keysym for KP_Add does not give a
+             * match here
+             */
+#ifdef SUN_KB
+              if (XKeycodeToKeysym (gdk_display, keycode, i) == keyval)
+#else
               if (syms[i] == keyval)
+#endif
                 {
                   /* found a match */
                   GdkKeymapKey key;
 
                   key.keycode = keycode;
@@ -901,11 +908,17 @@ gdk_keymap_translate_keyboard_state (Gdk
 
       if (!SYM (1, shift_level) ||
 	  SYM (0, shift_level) == SYM (1, shift_level))
 	ignore_group = TRUE;
 
+	/* Need to find out why SYM (group, shift_level) doesnt work for 
+         * KP_Add for Sun Type-4 keyboards. */ 
+#ifdef SUN_KB
+      tmp_keyval = XKeycodeToKeysym (gdk_display, hardware_keycode, KEYSYM_INDEX (group, shift_level));
+#else
       tmp_keyval = SYM (group, shift_level);
+#endif
 
       tmp_modifiers = ignore_group ? 0 : group_switch_mask;
       tmp_modifiers |= ignore_shift ? 0 : (GDK_SHIFT_MASK | GDK_LOCK_MASK);
 
       if (effective_group)
