XEmacs 21.4.9 "Informed Management".
[chise/xemacs-chise.git.1] / src / glyphs-x.c
index f37d3ba..5a71012 100644 (file)
@@ -231,7 +231,8 @@ convert_EImage_to_XImage (Lisp_Object device, int width, int height,
   if (vis->class == PseudoColor)
     {
       unsigned long pixarray[256];
-      int pixcount, n;
+      int pixcount;
+      unsigned int n;
       /* use our quantize table to allocate the colors */
       pixcount = 32;
       *pixtbl = xnew_array (unsigned long, pixcount);
@@ -432,7 +433,7 @@ x_finalize_image_instance (Lisp_Image_Instance *p)
        }
       else
        {
-         int i;
+         unsigned int i;
          if (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p))
            disable_glyph_animated_timeout (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p));
 
@@ -703,7 +704,7 @@ write_lisp_string_to_temp_file (Lisp_Object string, char *filename_out)
   /* Get the data while doing the conversion */
   while (1)
     {
-      ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf));
+      Lstream_data_count size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf));
       if (!size_in_bytes)
        break;
       /* It does seem the flushes are necessary... */
@@ -798,7 +799,7 @@ generate_cursor_fg_bg (Lisp_Object device, Lisp_Object *foreground,
   else
     {
       xbg->pixel = 0;
-      xbg->red = xbg->green = xbg->blue = ~0;
+      xbg->red = xbg->green = xbg->blue = USHRT_MAX;
     }
 }
 
@@ -2778,7 +2779,7 @@ x_tab_control_redisplay (Lisp_Object image_instance)
                     but I couldn't find it. */
                  Lisp_Object old_selected =gui_item_list_find_selected
                    (XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)));
-                 Arg al [1];
+                 Arg al [2];
                  char* name;
                  unsigned int num_children, i;
                  Widget* children;
@@ -2794,7 +2795,9 @@ x_tab_control_redisplay (Lisp_Object image_instance)
                      if (!strcmp (XtName (children [i]), name))
                        {
                          XtSetArg (al [0], XtNtopWidget, children [i]);
-                         XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 1);
+                         XtSetArg (al [1], XtNhighlightWidget,
+                                   children [i]);
+                         XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 2);
                          break;
                        }
                    }