aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-10-09 19:47:16 +0000
committerGerd Moellmann1999-10-09 19:47:16 +0000
commit209061be860f6752bef99b4e7e24055f4114eb56 (patch)
tree11842905eaff5dc1fdf83148e0cf563e1f06aa9e /src
parenta7ac64a90158285244822d93617e102ce1160101 (diff)
downloademacs-209061be860f6752bef99b4e7e24055f4114eb56.tar.gz
emacs-209061be860f6752bef99b4e7e24055f4114eb56.zip
(prepare_image_for_display): Don't try to load image if
loading it failed before. (lookup_image, prepare_image_for_display): Remember if loading the image failed. (xpm_load): Add missing UNBLOCK_INPUT.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xfns.c b/src/xfns.c
index e044810f816..4afa9d2dee8 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5819,8 +5819,8 @@ prepare_image_for_display (f, img)
5819 5819
5820 /* If IMG doesn't have a pixmap yet, load it now, using the image 5820 /* If IMG doesn't have a pixmap yet, load it now, using the image
5821 type dependent loader function. */ 5821 type dependent loader function. */
5822 if (img->pixmap == 0) 5822 if (img->pixmap == 0 && !img->load_failed_p)
5823 img->type->load (f, img); 5823 img->load_failed_p = img->type->load (f, img) == 0;
5824} 5824}
5825 5825
5826 5826
@@ -6066,16 +6066,15 @@ lookup_image (f, spec)
6066 /* If not found, create a new image and cache it. */ 6066 /* If not found, create a new image and cache it. */
6067 if (img == NULL) 6067 if (img == NULL)
6068 { 6068 {
6069 int loading_failed_p;
6070
6071 img = make_image (spec, hash); 6069 img = make_image (spec, hash);
6072 cache_image (f, img); 6070 cache_image (f, img);
6073 loading_failed_p = img->type->load (f, img) == 0; 6071 img->load_failed_p = img->type->load (f, img) == 0;
6072 xassert (!interrupt_input_blocked);
6074 6073
6075 /* If we can't load the image, and we don't have a width and 6074 /* If we can't load the image, and we don't have a width and
6076 height, use some arbitrary width and height so that we can 6075 height, use some arbitrary width and height so that we can
6077 draw a rectangle for it. */ 6076 draw a rectangle for it. */
6078 if (loading_failed_p) 6077 if (img->load_failed_p)
6079 { 6078 {
6080 Lisp_Object value; 6079 Lisp_Object value;
6081 6080
@@ -7088,6 +7087,7 @@ xpm_load (f, img)
7088 if (!STRINGP (file)) 7087 if (!STRINGP (file))
7089 { 7088 {
7090 image_error ("Cannot find image file %s", specified_file, Qnil); 7089 image_error ("Cannot find image file %s", specified_file, Qnil);
7090 UNBLOCK_INPUT;
7091 return 0; 7091 return 0;
7092 } 7092 }
7093 7093