GNU bug report logs - #21415
25.0.50; Emacs Trunk -- pixelwise width/height for x-create-frame

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Fri, 4 Sep 2015 17:43:01 UTC

Severity: wishlist

Found in version 25.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #260 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#21415: 25.0.50;
 Emacs Trunk -- pixelwise width/height for x-create-frame
Date: Sat, 03 Oct 2015 12:28:31 +0100
On Fri 02 Oct 2015, martin rudalics wrote:
> Find attached the most recent version of the patch.  Fixes are mainly
> for Lucid/Motif but something might change for other platforms as well.
>
> @@ -3166,15 +3171,25 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
>        prop = parms[i];
>        val = values[i];
>
> -      if (EQ (prop, Qwidth) && RANGED_INTEGERP (0, val, INT_MAX))
> +      if (EQ (prop, Qwidth))
>          {
>  	  width_change = 1;
> -          width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
> +	  if (RANGED_INTEGERP (0, val, INT_MAX))
> +	    width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
> +	  else if (FLOATP (val)
> +		   && XFLOAT_DATA (val) >= 0
> +		   && (int) XFLOAT_DATA (val) <= INT_MAX)
> +	    width = (int) XFLOAT_DATA (val);
>          }

This changes the logic to set width_change even when Qwidth is an
out of range integer: is that intended ?

> -      else if (EQ (prop, Qheight) && RANGED_INTEGERP (0, val, INT_MAX))
> +      else if (EQ (prop, Qheight))
>          {
>  	  height_change = 1;
> -          height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
> +	  if (RANGED_INTEGERP (0, val, INT_MAX))
> +	    height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
> +	  else if (FLOATP (val)
> +		   && XFLOAT_DATA (val) >= 0
> +		   && (int) XFLOAT_DATA (val) <= INT_MAX)
> +	    height = (int) XFLOAT_DATA (val);

Similarly for height_change.

    AndyM





This bug report was last modified 4 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.