X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fredisplay-x.c;h=fcbd5e94ed1f0db6b6c3810c1cb6f67f5cdec378;hb=112b4eb6a71cd613a534b4246b4cc024ed9bf22e;hp=84647b342c9ccff79f38fab6a60cca573c160bba;hpb=2d53754a9158c8c1c944a1bb5571a1b97509fe98;p=chise%2Fxemacs-chise.git- diff --git a/src/redisplay-x.c b/src/redisplay-x.c index 84647b3..fcbd5e9 100644 --- a/src/redisplay-x.c +++ b/src/redisplay-x.c @@ -137,8 +137,9 @@ separate_textual_runs (unsigned char *text_storage, for (i = 0; i < len; i++) { - Charc ec = str[i]; - Lisp_Object charset = ec.charset; + Charc cc = str[i]; + Lisp_Object charset = CHARC_CHARSET (cc); + int code_point = CHARC_CODE_POINT (cc); int byte1, byte2; int dimension; int graphic; @@ -147,13 +148,13 @@ separate_textual_runs (unsigned char *text_storage, graphic = XCHARSET_GRAPHIC (charset); if (dimension == 1) { - byte1 = ec.code_point; + byte1 = code_point; byte2 = 0; } else { - byte1 = ec.code_point >> 8; - byte2 = ec.code_point & 0xFF; + byte1 = code_point >> 8; + byte2 = code_point & 0xFF; } if (!EQ (charset, prev_charset)) { @@ -173,9 +174,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 } @@ -349,7 +350,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, findex = rb->findex; xpos = rb->xpos; if (rb->type == RUNE_CHAR) - charset = rb->object.cglyph.charset; + charset = CHARC_CHARSET (rb->object.cglyph); if (end < 0) end = Dynarr_length (rba); @@ -360,10 +361,9 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, rb = Dynarr_atp (rba, elt); if (rb->findex == findex && rb->type == RUNE_CHAR - && (!EQ (rb->object.cglyph.charset, Vcharset_ascii) - || rb->object.cglyph.code_point != '\n') + && (!CHARC_ASCII_EQ (rb->object.cglyph, '\n')) && rb->cursor_type != CURSOR_ON - && EQ (charset, rb->object.cglyph.charset)) + && EQ (charset, CHARC_CHARSET (rb->object.cglyph))) { Dynarr_add (buf, rb->object.cglyph); width += rb->width; @@ -386,12 +386,11 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, { findex = rb->findex; xpos = rb->xpos; - charset = rb->object.cglyph.charset; + charset = CHARC_CHARSET (rb->object.cglyph); if (rb->cursor_type == CURSOR_ON) { - if (EQ (rb->object.cglyph.charset, Vcharset_ascii) - && (rb->object.cglyph.code_point == '\n')) + if (CHARC_ASCII_EQ (rb->object.cglyph, '\n')) { x_output_eol_cursor (w, dl, xpos, findex); } @@ -408,8 +407,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, xpos += rb->width; elt++; } - else if (EQ (rb->object.cglyph.charset, Vcharset_ascii) - && (rb->object.cglyph.code_point == '\n')) + else if (CHARC_ASCII_EQ (rb->object.cglyph, '\n')) { /* Clear in case a cursor was formerly here. */ redisplay_clear_region (window, findex, xpos, @@ -470,12 +468,12 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, cursor_start, cursor_width, cursor_height, 0); break; - + case IMAGE_WIDGET: if (EQ (XIMAGE_INSTANCE_WIDGET_TYPE (instance), Qlayout)) { - redisplay_output_layout (w, instance, &dbox, &dga, findex, + redisplay_output_layout (window, instance, &dbox, &dga, findex, cursor_start, cursor_width, cursor_height); break; @@ -485,17 +483,17 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, cursor_start, cursor_width, cursor_height); break; - + case IMAGE_NOTHING: /* nothing is as nothing does */ break; - + case IMAGE_TEXT: case IMAGE_POINTER: default: abort (); } - IMAGE_INSTANCE_OPTIMIZE_OUTPUT + IMAGE_INSTANCE_OPTIMIZE_OUTPUT (XIMAGE_INSTANCE (instance)) = 0; } @@ -526,7 +524,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, @@ -1718,6 +1716,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); @@ -2012,7 +2011,7 @@ x_flash (struct device *d) w->pixel_width, flash_height); } else - /* If it is short, flash it all. */ + /* If it is short, flash it all. */ XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top, w->pixel_width, w->pixel_height); @@ -2045,7 +2044,7 @@ x_flash (struct device *d) w->pixel_width, flash_height); } else - /* If it is short, flash it all. */ + /* If it is short, flash it all. */ XFillRectangle (dpy, win, gc, w->pixel_left, w->pixel_top, w->pixel_width, w->pixel_height);