diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 4 | ||||
| -rw-r--r-- | src/xfns.c | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/image.c b/src/image.c index 07de4d31aa8..e2f3220dd26 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -4991,7 +4991,7 @@ xpm_load_image (struct frame *f, | |||
| 4991 | 4991 | ||
| 4992 | while (num_colors-- > 0) | 4992 | while (num_colors-- > 0) |
| 4993 | { | 4993 | { |
| 4994 | char *color, *max_color; | 4994 | char *color, *max_color = NULL; |
| 4995 | int key, next_key, max_key = 0; | 4995 | int key, next_key, max_key = 0; |
| 4996 | Lisp_Object symbol_color = Qnil, color_val; | 4996 | Lisp_Object symbol_color = Qnil, color_val; |
| 4997 | Emacs_Color cdef; | 4997 | Emacs_Color cdef; |
| @@ -5052,7 +5052,7 @@ xpm_load_image (struct frame *f, | |||
| 5052 | cdef.blue)); | 5052 | cdef.blue)); |
| 5053 | } | 5053 | } |
| 5054 | } | 5054 | } |
| 5055 | if (NILP (color_val) && max_key > 0) | 5055 | if (NILP (color_val) && max_color) |
| 5056 | { | 5056 | { |
| 5057 | if (xstrcasecmp (max_color, "None") == 0) | 5057 | if (xstrcasecmp (max_color, "None") == 0) |
| 5058 | color_val = Qt; | 5058 | color_val = Qt; |
diff --git a/src/xfns.c b/src/xfns.c index e46616e6d66..81349d0b50d 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3361,17 +3361,19 @@ x_icon (struct frame *f, Lisp_Object parms) | |||
| 3361 | = gui_frame_get_and_record_arg (f, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER); | 3361 | = gui_frame_get_and_record_arg (f, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER); |
| 3362 | int icon_xval, icon_yval; | 3362 | int icon_xval, icon_yval; |
| 3363 | 3363 | ||
| 3364 | if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound)) | 3364 | bool xgiven = !EQ (icon_x, Qunbound); |
| 3365 | bool ygiven = !EQ (icon_y, Qunbound); | ||
| 3366 | if (xgiven != ygiven) | ||
| 3367 | error ("Both left and top icon corners of icon must be specified"); | ||
| 3368 | if (xgiven) | ||
| 3365 | { | 3369 | { |
| 3366 | icon_xval = check_integer_range (icon_x, INT_MIN, INT_MAX); | 3370 | icon_xval = check_integer_range (icon_x, INT_MIN, INT_MAX); |
| 3367 | icon_yval = check_integer_range (icon_y, INT_MIN, INT_MAX); | 3371 | icon_yval = check_integer_range (icon_y, INT_MIN, INT_MAX); |
| 3368 | } | 3372 | } |
| 3369 | else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound)) | ||
| 3370 | error ("Both left and top icon corners of icon must be specified"); | ||
| 3371 | 3373 | ||
| 3372 | block_input (); | 3374 | block_input (); |
| 3373 | 3375 | ||
| 3374 | if (! EQ (icon_x, Qunbound)) | 3376 | if (xgiven) |
| 3375 | x_wm_set_icon_position (f, icon_xval, icon_yval); | 3377 | x_wm_set_icon_position (f, icon_xval, icon_yval); |
| 3376 | 3378 | ||
| 3377 | #if false /* gui_display_get_arg removes the visibility parameter as a | 3379 | #if false /* gui_display_get_arg removes the visibility parameter as a |