GNU bug report logs - #72986
Disabling menu-bar-mode changes size of new frames

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Mon, 2 Sep 2024 18:52:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: Po Lu <luangruo <at> yahoo.com>, Eli Zaretskii <eliz <at> gnu.org>, 72986 <at> debbugs.gnu.org
Subject: bug#72986: Disabling menu-bar-mode changes size of new frames
Date: Thu, 7 Nov 2024 11:36:19 +0100
> Experimentally, you could also try to use some arbitrary integer value
> here so the code there becomes
>
> #else
>    int w = priv->f->output_data.x->size_hints.min_width;
>    w = max (w, 800);
>    if (minimum) *minimum = w;
>    if (natural) *natural = w;
> #endif
>
> and
>
> #else
>    int h = priv->f->output_data.x->size_hints.min_height;
>    h = max (h, 800);
>    if (minimum) *minimum = h;
>    if (natural) *natural = h;
> #endif

Better make this

#else
  int w = priv->f->output_data.x->size_hints.min_width;
  if (minimum) *minimum = w;
  w = max (w, 800);
  if (natural) *natural = w;
#endif

and

#else
  int h = priv->f->output_data.x->size_hints.min_height;
  if (minimum) *minimum = h;
  h = max (h, 800);
  if (natural) *natural = h;
#endif

A comment in gtkwindow.c says

/* (Note: Replace "size" with "width" or "height". Also, the request
 * mode is honoured.)
 * For selecting the default window size, the following conditions
 * should hold (in order of importance):
 * - the size is not below the minimum size
 *   Windows cannot be resized below their minimum size, so we must
 *   ensure we don’t do that either.
 * - the size is not above the natural size
 *   It seems weird to allocate more than this in an initial guess.
 * - the size does not exceed that of a maximized window
 *   We want to see the whole window after all.
 *   (Note that this may not be possible to achieve due to imperfect
 *    information from the windowing system.)
 */

so if we make the natural size small, it's only natural that gtk chooses
a default size that is smaller than that.

martin

This bug report was last modified 182 days ago.

Previous Next


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