Subject: Re: bug#60585: 30.0.50; global-text-scale-adjust shrinks window (was not before), was: Re: bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong

From: Po Lu <[email-masked]>
Date: Sat, 11 Feb 2023 18:22:36 +0800

Dmitry Gutov <[email-masked]> writes:

> On 11/02/2023 03:36, Po Lu via Bug reports for GNU Emacs, the Swiss
> army knife of text editors wrote:
>> Whenever you see an inconsistency between what Emacs thinks its WM hints
>> are, and what you think the window manager sees, try to actually read
>> the window manager hints property with `xprop'.
>> It should print several lines describing the window manager hints.
>> WM_NORMAL_HINTS(WM_SIZE_HINTS):
>> 		program specified minimum size: 34 by 55
>> 		program specified resize increment: 8 by 17 <------
>> 		program specified base size: 34 by 55
>> 		window gravity: NorthWest
>> Check there to see if the increment is really 17x37.
>> Xt sometimes refuses to set hints, which can be very confusing.
>
> Thanks!
>
> Lucid's hints with InconsolataLGC:
>
> WM_NORMAL_HINTS(WM_SIZE_HINTS):
> 		user specified size: 1714 by 1723
> 		program specified minimum size: 51 by 140
> 		program specified resize increment: 17 by 37
> 		program specified base size: 51 by 140
> 		window gravity: NorthWest

I guess the Lucid build is working correctly.

> GTK's hints with InconsolataLGC:
>
> WM_NORMAL_HINTS(WM_SIZE_HINTS):
> 		program specified minimum size: 64 by 324
> 		program specified resize increment: 16 by 36
> 		program specified base size: 64 by 168
> 		window gravity: NorthWest
>
> GTK's hints with "Inconsolata LGC" are the same, though:
>
> WM_NORMAL_HINTS(WM_SIZE_HINTS):
> 		program specified minimum size: 64 by 324
> 		program specified resize increment: 16 by 36
> 		program specified base size: 64 by 168
> 		window gravity: NorthWest

Thanks.  

Would you please instrument emacsgtkfixed.c like such:

diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 2b6ebee65fd..24aaf134dd2 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -178,6 +178,9 @@ XSetWMSizeHints (Display *d,
 	 data[5] = w;
 	 data[6] = h; */
 
+      fprintf (stderr, "XSetWMSizeHints: %d, %d\n", hints->width_inc,
+	       hints->height_inc);
+
       /* Make sure min_width and min_height are multiples of width_inc
 	 and height_inc.  */
 
and tell me what is printed when Emacs begins to shrink?