all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Inactive code in x-create-frame on X and W32.
@ 2003-03-25  1:09 Kim F. Storm
  2003-03-25 10:34 ` Gerd Moellmann
  2003-03-31  8:37 ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Kim F. Storm @ 2003-03-25  1:09 UTC (permalink / raw)
  Cc: emacs-devel


In xfns.c (and later copied to w32fns.c), Fx_create_frame contains the
following code:

  /* Add the tool-bar height to the initial frame height so that the
     user gets a text display area of the size he specified with -g or
     via .Xdefaults.  Later changes of the tool-bar height don't
     change the frame size.  This is done so that users can create
     tall Emacs frames without having to guess how tall the tool-bar
     will get.  */
  if (FRAME_TOOL_BAR_LINES (f))
    {
      int margin, relief, bar_height;

      relief = (tool_bar_button_relief >= 0
		? tool_bar_button_relief
		: DEFAULT_TOOL_BAR_BUTTON_RELIEF);

      if (INTEGERP (Vtool_bar_button_margin)
	  && XINT (Vtool_bar_button_margin) > 0)
	margin = XFASTINT (Vtool_bar_button_margin);
      else if (CONSP (Vtool_bar_button_margin)
	       && INTEGERP (XCDR (Vtool_bar_button_margin))
	       && XINT (XCDR (Vtool_bar_button_margin)) > 0)
	margin = XFASTINT (XCDR (Vtool_bar_button_margin));
      else
	margin = 0;

      bar_height = DEFAULT_TOOL_BAR_IMAGE_HEIGHT + 2 * margin + 2 * relief;
      f->height += (bar_height + CANON_Y_UNIT (f) - 1) / CANON_Y_UNIT (f);
    }

  /* Compute the size of the X window.  */
  window_prompting = x_figure_window_size (f, parms);


But x_figure_window_size does the following unconditionally:

  f->height = DEFAULT_ROWS;

So the result of the "if (FRAME_TOOL_BAR_LINES...)" block is effectively
ignored.

I would guess that the call to x_figure_window_size should be moved
before adjusting f->height for the tool-bars, but I'm not quite sure
what the intention is, since the ChangeLog explicitly says to
do this _before_ calling x_figure_window_size:

2001-03-01  Gerd Moellmann  <gerd@gnu.org>

	* xfns.c (Fx_create_frame): Adjust the frame's height for presence
	of the tool bar before calling x_figure_window_size.

So what's up, doc?  

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-02  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-25  1:09 Inactive code in x-create-frame on X and W32 Kim F. Storm
2003-03-25 10:34 ` Gerd Moellmann
2003-03-31  8:37 ` Richard Stallman
2003-03-31 22:18   ` Kim F. Storm
2003-04-02  9:18     ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.