Subject: bug#18528: 24.3.93; Crash during restoration of frameset from desktop

From: Eli Zaretskii <[email-masked]>
Date: Wed, 24 Sep 2014 10:15:48 +0300

> Date: Wed, 24 Sep 2014 08:16:47 +0200
> From: martin rudalics <[email-masked]>
> CC: [email-masked]
> 
>  > So now I don't understand why you asked about rounding up, since we
>  > evidently already do.
> 
> Not everywhere.  For example, we don't in FRAME_MESSAGE_BUF_SIZE and
> FRAME_CURSOR_X_LIMIT.  And the following check in compute_motion of
> indent.c seems dubious as well.
> 
> 	  if (!NILP (Vtruncate_partial_width_windows)
> 	      && (total_width < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))))

That has nothing to do with rounding, does it?

Anyway, FRAME_MESSAGE_BUF_SIZE has nothing to do with frame/window
width, AFAIR, it is just computed based on the width.

FRAME_CURSOR_X_LIMIT is used only for the echo area, so the
probability of having a non-default font there is very low.  We should
probably do that calculation in pixels, though.

As for the second example, I have a difficulty concocting a use case
when it should matter, due to a combination of conditions that enter
that block.  But feel free to fix that if it sometimes gives bad
results.