Subject: bug#65559: (no subject)

From: Kurt Hornik <[email-masked]>
Date: Wed, 6 Sep 2023 09:00:38 +0200

The problem reported by George also starting occurring with Emacs 28 on
Debian testing when this recently pulled in GNOME 44, and is also
described in

  <https://emacs.stackexchange.com/questions/78561/new-frame-function-fails-to-size-the-new-frame-correctly-and-prints-a-gtk-critic>
  <https://bugs.launchpad.net/ubuntu/+source/emacs/+bug/2011244>

and Dirk Eddelbuettel assures me that this is reproducible with Ubuntu
23.04 (as described above, hence with Emacs 28.2 and GNOME 44).

The problems do not occur in an FVWM session, and with the default
Debian build (debian-gtk, more below) they occur in GNOME sessions with
both Wayland and X.org.

Over the weekend I tried the effect of building Emacs 29 from the
upstream sources with various toolkit options.

As "expected", the frame size problems occur with the default

  ./configure 
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK2

as well as

  ./configure --with-x-toolkit=gtk3
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK3

but not with very-old-style

  ./configure --with-x-toolkit=lucid
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          LUCID

nor with very-new-style

  ./configure --with-pgtk
  What window system should Emacs use?                    pgtk
  What toolkit should Emacs use?                          GTK3

So the problem seems to be with x11/GTK with GNOME 44.

FWIW, as a quick fix I tried 

(add-to-list
 'after-make-frame-functions
 '(lambda (frame) (set-frame-size frame 80 40))
 t)

but that did not work at all for me when a geometry X resource was set
(hence I stopped doing so) and even without that only unreliably, so for
now I switched to using the Debian testing emacs-lucid package (and am
waiting for the new emacs-pgtk in unstable to migrate to testing).

Best
-k