Subject: Re: 25.1.50; Enabling tool-bar-mode caused frame size setting failure

From: Anders Lindgren <[email-masked]>
Date: Sun, 10 Jan 2016 21:58:10 +0100

Hi Cheng!

Ah, it was the information that the expressions should be placed in the
init file that I was missing.

I can confirm that I can reproduce the problem using the following recipe.

Place the following lines in a file, say bug22298.el:

    (when window-system
      (set-frame-size (selected-frame) 155 38 nil)
      (tool-bar-mode 1))

    emacs -Q -l bug22298.el

Here, Emacs use its standard frame size whereas it should use the newly
specified size (155x38).

    -- Anders Lindgren

> Thank you for looking into this.

> In my bug report I listed two snippets that can be put into init.el.
> When (tool-bar-mode 1) is set before set-frame-size, it works. When set
> after set-frame-size, it won't.

> Using C-x C-e to eval them, it works. So I think "emacs -Q" can not help
> here. It's only about order of settings.

> Later after reporting, I found tool-bar-mode is defaulted to "t" when
> window-system is detected (in C source code), so I just removed it and
> it works now. So it does not bother me any more, but I can not say this
> bug is fixed.