From: Miles Bader Date: Mon, 16 Oct 2000 14:45:44 +0000 (+0000) Subject: Revert last change. X-Git-Tag: emacs-pretest-21.0.90~838 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=836765981d15ac6d86eff8645cc76eb021c7f278;p=emacs.git Revert last change. --- diff --git a/src/xfns.c b/src/xfns.c index 9e7f9268841..4c53ccb85ae 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -239,7 +239,6 @@ extern Lisp_Object Qdisplay; Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background; Lisp_Object Qscreen_gamma, Qline_spacing, Qcenter; Lisp_Object Qcompound_text; -extern Lisp_Object Qbackground_tile; /* The below are defined in frame.c. */ @@ -751,7 +750,6 @@ static void x_create_im P_ ((struct frame *)); void x_set_foreground_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); static void x_set_line_spacing P_ ((struct frame *, Lisp_Object, Lisp_Object)); void x_set_background_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); -void x_set_background_tile P_ ((struct frame *, Lisp_Object, Lisp_Object)); void x_set_mouse_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); void x_set_cursor_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); void x_set_border_color P_ ((struct frame *, Lisp_Object, Lisp_Object)); @@ -798,7 +796,6 @@ static struct x_frame_parm_table x_frame_parms[] = "auto-raise", x_set_autoraise, "auto-lower", x_set_autolower, "background-color", x_set_background_color, - "background-tile", x_set_background_tile, "border-color", x_set_border_color, "border-width", x_set_border_width, "cursor-color", x_set_cursor_color, @@ -1427,42 +1424,6 @@ x_set_background_color (f, arg, oldval) } } -void -x_set_background_tile (f, arg, oldval) - struct frame *f; - Lisp_Object arg, oldval; -{ - int tile_id = lookup_image (f, arg, 0); - struct image *tile_image = IMAGE_FROM_ID (f, tile_id); - Pixmap tile_pixmap = tile_image ? tile_image->pixmap : 0; - - f->output_data.x->background_tile = tile_pixmap; - - if (FRAME_X_WINDOW (f) != 0 && tile_pixmap) - { - BLOCK_INPUT; - /* The main frame area. */ - XSetTile (FRAME_X_DISPLAY (f), f->output_data.x->normal_gc, - f->output_data.x->background_tile); - XSetWindowBackgroundPixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - f->output_data.x->background_tile); - { - Lisp_Object bar; - for (bar = FRAME_SCROLL_BARS (f); !NILP (bar); - bar = XSCROLL_BAR (bar)->next) - XSetWindowBackgroundPixmap (FRAME_X_DISPLAY (f), - SCROLL_BAR_X_WINDOW (XSCROLL_BAR (bar)), - f->output_data.x->background_tile); - } - UNBLOCK_INPUT; - - update_face_from_frame_parameter (f, Qbackground_tile, arg); - - if (FRAME_VISIBLE_P (f)) - redraw_frame (f); - } -} - void x_set_mouse_color (f, arg, oldval) struct frame *f; @@ -5424,7 +5385,7 @@ or omitted means use the selected frame.") if (valid_image_p (spec)) { struct frame *f = check_x_frame (frame); - int id = lookup_image (f, spec, 0); + int id = lookup_image (f, spec); struct image *img = IMAGE_FROM_ID (f, id); int width = img->width + 2 * img->margin; int height = img->height + 2 * img->margin; @@ -5455,7 +5416,7 @@ or omitted means use the selected frame.") if (valid_image_p (spec)) { struct frame *f = check_x_frame (frame); - int id = lookup_image (f, spec, 0); + int id = lookup_image (f, spec); struct image *img = IMAGE_FROM_ID (f, id); if (img->mask) mask = Qt; @@ -5738,7 +5699,7 @@ clear_image_cache (f, force_p) { struct image_cache *c = FRAME_X_IMAGE_CACHE (f); - if (c && (c->refcount <= 1) && INTEGERP (Vimage_cache_eviction_delay)) + if (c && INTEGERP (Vimage_cache_eviction_delay)) { EMACS_TIME t; unsigned long old; @@ -5775,10 +5736,7 @@ clear_image_cache (f, force_p) struct frame *f = XFRAME (frame); if (FRAME_X_P (f) && FRAME_X_IMAGE_CACHE (f) == c) - { - clear_current_matrices (f); - free_all_realized_faces (frame); - } + clear_current_matrices (f); } ++windows_or_buffers_changed; @@ -5813,15 +5771,12 @@ FRAME t means clear the image caches of all frames.") /* Return the id of image with Lisp specification SPEC on frame F. - SPEC must be a valid Lisp image specification (see valid_image_p). - If DELAY_LOAD is true, then the image isn't actually loaded yet (it - will be loaded when prepare_image_for_display is called). */ + SPEC must be a valid Lisp image specification (see valid_image_p). */ int -lookup_image (f, spec, delay_load) +lookup_image (f, spec) struct frame *f; Lisp_Object spec; - int delay_load; { struct image_cache *c = FRAME_X_IMAGE_CACHE (f); struct image *img; @@ -5851,14 +5806,12 @@ lookup_image (f, spec, delay_load) BLOCK_INPUT; img = make_image (spec, hash); cache_image (f, img); - if (! delay_load) - img->load_failed_p = img->type->load (f, img) == 0; - xassert (!interrupt_input_blocked); + img->load_failed_p = img->type->load (f, img) == 0; /* If we can't load the image, and we don't have a width and height, use some arbitrary width and height so that we can draw a rectangle for it. */ - if (img->pixmap == 0) + if (img->load_failed_p) { Lisp_Object value; @@ -7049,13 +7002,8 @@ xpm_lookup_color (f, color_name, color) char *color_name; XColor *color; { - char *s; struct xpm_cached_color *p; - unsigned h = xpm_color_bucket (color_name); - - for (s = color_name; *s; ++s) - h = (h << 2) ^ *s; - h %= XPM_COLOR_CACHE_BUCKETS; + int h = xpm_color_bucket (color_name); for (p = xpm_color_cache[h]; p; p = p->next) if (strcmp (p->name, color_name) == 0)