emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set-frame-height glitch [Was: Re: Changes in frame/window code]


From: martin rudalics
Subject: Re: set-frame-height glitch [Was: Re: Changes in frame/window code]
Date: Wed, 23 Jul 2014 17:36:15 +0200

> Nice shot.  But, IIUC, this means that set-frame-height goes wrong
> but should be:
>
> === modified file 'src/frame.c'
> --- src/frame.c    2014-07-21 16:58:12 +0000
> +++ src/frame.c    2014-07-23 15:01:44 +0000
> @@ -2584,8 +2584,11 @@
>       {
>         if (NILP (pixelwise))
>       {
> -      if (XINT (height) != FRAME_LINES (f))
> -        x_set_window_size (f, 1, FRAME_COLS (f), XINT (height), 0);
> +      int actual = FRAME_LINES (f) - FRAME_TOP_MARGIN (f);
> +      int requested = XINT (height) + FRAME_TOP_MARGIN (f);
> +
> +      if (requested != actual)
> +        x_set_window_size (f, 1, FRAME_COLS (f), requested, 0);
>
>         do_pending_window_change (0);
>       }

In some sort of sense, yes.  Have you looked at my code?  I wrote
adjust_frame_size to handle this and related cases in a uniform manner.

What I never got around to handle precisely is x_figure_window_size
which calculates the toolbar off by two pixels and the menubar off by
one pixel (the latter on either Lucid or Motif).  So my initial frame
may lack one or two pixels.

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]