From c7e609d5111e15abb21d3fcf54cb1dcc4420f264 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 7 Nov 2001 08:33:33 +0000 Subject: [PATCH] (x_set_frame_parameters): Avoid infinite recursion. --- src/xfns.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/xfns.c b/src/xfns.c index ec89ac7b607..6cc5a3ce14f 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -906,13 +906,18 @@ x_set_frame_parameters (f, alist) { register Lisp_Object param_index, old_value; - param_index = Fget (prop, Qx_frame_parameter); old_value = get_frame_param (f, prop); - store_frame_param (f, prop, val); - if (NATNUMP (param_index) - && (XFASTINT (param_index) - < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) - (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); + + if (NILP (Fequal (val, old_value))) + { + store_frame_param (f, prop, val); + + param_index = Fget (prop, Qx_frame_parameter); + if (NATNUMP (param_index) + && (XFASTINT (param_index) + < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) + (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); + } } } @@ -943,13 +948,18 @@ x_set_frame_parameters (f, alist) { register Lisp_Object param_index, old_value; - param_index = Fget (prop, Qx_frame_parameter); old_value = get_frame_param (f, prop); - store_frame_param (f, prop, val); - if (NATNUMP (param_index) - && (XFASTINT (param_index) - < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) - (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); + + if (NILP (Fequal (val, old_value))) + { + store_frame_param (f, prop, val); + + param_index = Fget (prop, Qx_frame_parameter); + if (NATNUMP (param_index) + && (XFASTINT (param_index) + < sizeof (x_frame_parms)/sizeof (x_frame_parms[0]))) + (*x_frame_parms[XINT (param_index)].setter)(f, val, old_value); + } } } -- 2.39.5