XEmacs 21.4.12 "Portable Code".
[chise/xemacs-chise.git.1] / src / redisplay-x.c
index 98f1334..ff49eb5 100644 (file)
@@ -165,9 +165,9 @@ separate_textual_runs (unsigned char *text_storage,
 #ifdef MULE
          {
            Lisp_Object ccl_prog = XCHARSET_CCL_PROGRAM (charset);
-           need_ccl_conversion = !NILP (ccl_prog);
-           if (need_ccl_conversion)
-             setup_ccl_program (&char_converter, ccl_prog);
+           if ((!NILP (ccl_prog))
+                 && (setup_ccl_program (&char_converter, ccl_prog) >= 0))
+             need_ccl_conversion = 1;
          }
 #endif
        }
@@ -439,11 +439,12 @@ x_output_display_block (struct window *w, struct display_line *dl, int block,
              Lisp_Object instance;
              struct display_box dbox;
              struct display_glyph_area dga;
+
              redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset,
-                                                start_pixpos, rb->width,
-                                                &dbox, &dga);
+                                                rb->object.dglyph.yoffset, start_pixpos,
+                                                 rb->width, &dbox, &dga);
 
-             XSETWINDOW (window, w);
+              XSETWINDOW (window, w);
              instance = glyph_image_instance (rb->object.dglyph.glyph,
                                               window, ERROR_ME_NOT, 1);
              findex = rb->findex;
@@ -514,7 +515,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block,
 /*****************************************************************************
  x_bevel_area
 
- Draw a shadows for the given area in the given face.
+ Draw shadows for the given area in the given face.
  ****************************************************************************/
 static void
 x_bevel_area (struct window *w, face_index findex,
@@ -971,7 +972,8 @@ x_output_string (struct window *w, struct display_line *dl,
       /* We draw underlines in the same color as the text. */
       if (cachel->underline)
        {
-         unsigned long upos, uthick;
+         unsigned long upos;
+         unsigned long uthick;
          XFontStruct *xfont;
 
          xfont = FONT_INSTANCE_X_FONT (XFONT_INSTANCE (font));
@@ -1706,6 +1708,7 @@ x_redraw_exposed_window (struct window *w, int x, int y, int width, int height)
       f->windows_structure_changed = 1;
     }
 
+  redisplay_clear_top_of_window (w);
   if (window_needs_vertical_divider (w))
     {
       x_output_vertical_divider (w, 0);
@@ -2064,8 +2067,8 @@ x_ring_bell (struct device *d, int volume, int pitch, int duration)
       /* #### grab server? */
       XGetKeyboardControl (display, &state);
 
-      ctl.bell_pitch    = (pitch    >= 0 ? pitch    : state.bell_pitch);
-      ctl.bell_duration = (duration >= 0 ? duration : state.bell_duration);
+      ctl.bell_pitch    = (pitch    >= 0 ? pitch    : (int) state.bell_pitch);
+      ctl.bell_duration = (duration >= 0 ? duration : (int) state.bell_duration);
       XChangeKeyboardControl (display, KBBellPitch|KBBellDuration, &ctl);
 
       XBell (display, (volume * 2) - 100);