* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
@ 2021-12-14 23:43 Dmitry Gutov
2021-12-15 14:57 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-14 23:43 UTC (permalink / raw)
To: 52493
[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]
It's a weird scenario, but evaluating this in 'emacs -Q' will make
characters render more narrowly (and a little shorter) than it did
previously:
(set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
See the attached screenshot with comparison (master is on the left).
This seems to happen with both Inconsolata_dz which I use and the
original Inconsolata (at least some version of it). The font file which
I use
resides is linked to at the bottom of
https://nodnod.net/posts/inconsolata-dz/.
It started to happen right after the changes required to use the
"proportional mode-line" were added. I was kind of waiting for somebody
else to report this problem. ;-( It makes master fairly unusable to me,
however.
Other fonts don't seem to have this effect.
Also, if I first evaluate this form, and then change the :family value
to "Hack", the font changes once (to a font with "normal" width) but
then no subsequent evaluations of this form with other values have any
effect on the used font-family (it is "stuck"), but the window shrinks a
little every time.
In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.16.0)
of 2021-11-11 built on potemkin
Repository revision: ebcba77d4c47ceff24115f80c2109916a6b425b1
Repository branch: scratch/etags-regen
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Ubuntu 20.04.3 LTS
[-- Attachment #2: Screenshot from 2021-12-15 02-27-20.png --]
[-- Type: image/png, Size: 207324 bytes --]
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-14 23:43 bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong Dmitry Gutov
@ 2021-12-15 14:57 ` Eli Zaretskii
2021-12-15 22:43 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-15 14:57 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 52493
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Wed, 15 Dec 2021 02:43:30 +0300
>
> It's a weird scenario, but evaluating this in 'emacs -Q' will make
> characters render more narrowly (and a little shorter) than it did
> previously:
>
> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
>
> See the attached screenshot with comparison (master is on the left).
Indeed, weird. What does the below show?
M-: (face-font 'default) RET
after you evaluate the above in "emacs -Q"? And how does it differ
from the same in a version of Emacs that predates the changes of the
mode-line face?
Also, what happens if you invoke Emacs like this:
$ emacs -Q -fn Inconsolata_dz
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-15 14:57 ` Eli Zaretskii
@ 2021-12-15 22:43 ` Dmitry Gutov
2021-12-16 7:29 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-15 22:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 52493
On 15.12.2021 17:57, Eli Zaretskii wrote:
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Wed, 15 Dec 2021 02:43:30 +0300
>>
>> It's a weird scenario, but evaluating this in 'emacs -Q' will make
>> characters render more narrowly (and a little shorter) than it did
>> previously:
>>
>> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
>>
>> See the attached screenshot with comparison (master is on the left).
>
> Indeed, weird. What does the below show?
>
> M-: (face-font 'default) RET
>
> after you evaluate the above in "emacs -Q"?
"-DAMA-Ubuntu Condensed-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1"
So... not the right family and it's "condensed", for some reason.
For comparison,
(set-face-attribute 'default nil :height 110 :family "Ubuntu")
results in
"-DAMA-Ubuntu-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1"
And by default (without any set-face-attribute calls),
(face-font 'default) evaluates to
"-DAMA-Ubuntu Mono-regular-normal-normal-*-35-*-*-*-m-0-iso10646-1"
> And how does it differ
> from the same in a version of Emacs that predates the changes of the
> mode-line face?
Current emacs-28 returns
"-PfEd-Inconsolata_dz-normal-normal-normal-*-29-*-*-*-m-0-iso10646-1"
Regarding "version of Emacs that predates", I wasn't sure which commit
to pick exactly, but 756b8a5f1bd28aeadc804 also returns that value, and
doesn't have the described problem.
> Also, what happens if you invoke Emacs like this:
>
> $ emacs -Q -fn Inconsolata_dz
It doesn't look as narrow, and (face-font 'default) evaluates to
"-PfEd-Inconsolata_dz-medium-normal-normal-*-32-*-*-*-m-0-iso10646-1"
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-15 22:43 ` Dmitry Gutov
@ 2021-12-16 7:29 ` Eli Zaretskii
2021-12-16 13:01 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-16 7:29 UTC (permalink / raw)
To: Dmitry Gutov, Robert Pluim; +Cc: 52493
> Cc: 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 16 Dec 2021 01:43:31 +0300
>
> >> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
> >>
> >> See the attached screenshot with comparison (master is on the left).
> >
> > Indeed, weird. What does the below show?
> >
> > M-: (face-font 'default) RET
> >
> > after you evaluate the above in "emacs -Q"?
>
> "-DAMA-Ubuntu Condensed-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1"
>
> So... not the right family and it's "condensed", for some reason.
>
> For comparison,
>
> (set-face-attribute 'default nil :height 110 :family "Ubuntu")
>
> results in
>
> "-DAMA-Ubuntu-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1"
>
> And by default (without any set-face-attribute calls),
>
> (face-font 'default) evaluates to
>
> "-DAMA-Ubuntu Mono-regular-normal-normal-*-35-*-*-*-m-0-iso10646-1"
>
> > And how does it differ
> > from the same in a version of Emacs that predates the changes of the
> > mode-line face?
>
> Current emacs-28 returns
>
> "-PfEd-Inconsolata_dz-normal-normal-normal-*-29-*-*-*-m-0-iso10646-1"
>
> Regarding "version of Emacs that predates", I wasn't sure which commit
> to pick exactly, but 756b8a5f1bd28aeadc804 also returns that value, and
> doesn't have the described problem.
>
> > Also, what happens if you invoke Emacs like this:
> >
> > $ emacs -Q -fn Inconsolata_dz
>
> It doesn't look as narrow, and (face-font 'default) evaluates to
>
> "-PfEd-Inconsolata_dz-medium-normal-normal-*-32-*-*-*-m-0-iso10646-1"
Thanks. I think this means that Emacs 29 on master now rejects the
Inconsolata_dz font for some reason, or thinks it finds a better
match. The fact that it picks a condensed family is probably
secondary; the main issue here is that the font family you requested
is rejected.
Does that family have the regular weight? If not, maybe that's the
reason it is rejected, and you need to also require some specific
:weight value in your set-face-attribute call.
Also, maybe running
$ FC_DEBUG=1282 emacs -Q
will give us a clue of what happens. See
https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#DEBUG
for where I took that weird value.
Robert, any other ideas?
If this doesn't help, I'm afraid the only way forward is to step
through the code which selects a font when you specify the family for
the default face, and see what happens there and why.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 7:29 ` Eli Zaretskii
@ 2021-12-16 13:01 ` Dmitry Gutov
2021-12-16 13:31 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-16 13:01 UTC (permalink / raw)
To: Eli Zaretskii, Robert Pluim; +Cc: 52493
On 16.12.2021 10:29, Eli Zaretskii wrote:
>> Cc: 52493@debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Thu, 16 Dec 2021 01:43:31 +0300
>>
>>>> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
>>>>
>>>> See the attached screenshot with comparison (master is on the left).
>>>
>>> Indeed, weird. What does the below show?
>>>
>>> M-: (face-font 'default) RET
>>>
>>> after you evaluate the above in "emacs -Q"?
>>
>> "-DAMA-Ubuntu Condensed-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1"
>>
>> So... not the right family and it's "condensed", for some reason.
>>
>> For comparison,
>>
>> (set-face-attribute 'default nil :height 110 :family "Ubuntu")
>>
>> results in
>>
>> "-DAMA-Ubuntu-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1"
>>
>> And by default (without any set-face-attribute calls),
>>
>> (face-font 'default) evaluates to
>>
>> "-DAMA-Ubuntu Mono-regular-normal-normal-*-35-*-*-*-m-0-iso10646-1"
>>
>>> And how does it differ
>>> from the same in a version of Emacs that predates the changes of the
>>> mode-line face?
>>
>> Current emacs-28 returns
>>
>> "-PfEd-Inconsolata_dz-normal-normal-normal-*-29-*-*-*-m-0-iso10646-1"
>>
>> Regarding "version of Emacs that predates", I wasn't sure which commit
>> to pick exactly, but 756b8a5f1bd28aeadc804 also returns that value, and
>> doesn't have the described problem.
>>
>>> Also, what happens if you invoke Emacs like this:
>>>
>>> $ emacs -Q -fn Inconsolata_dz
>>
>> It doesn't look as narrow, and (face-font 'default) evaluates to
>>
>> "-PfEd-Inconsolata_dz-medium-normal-normal-*-32-*-*-*-m-0-iso10646-1"
>
> Thanks. I think this means that Emacs 29 on master now rejects the
> Inconsolata_dz font for some reason, or thinks it finds a better
> match.
Despite 'emacs -Q -fn Inconsolata_dz' having the intended effect?
> The fact that it picks a condensed family is probably
> secondary; the main issue here is that the font family you requested
> is rejected.
>
> Does that family have the regular weight? If not, maybe that's the
> reason it is rejected, and you need to also require some specific
> :weight value in your set-face-attribute call.
Although yes, something to that effect seems to be going on. But
specifying different values of :weight doesn't help either (regulal,
medium, light, bold, extra-bold).
Nor :width (condensed/semi-condensed/normal).
> Also, maybe running
>
> $ FC_DEBUG=1282 emacs -Q
>
> will give us a clue of what happens. See
>
> https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#DEBUG
>
> for where I took that weird value.
I've recorded the log, but it's 92 MB.
It's uploaded here: https://www.filemail.com/d/uplporttqgfaive
(The page probably requires JS, and if somehow it doesn't work on your
system, try ftp://uplporttqgfaive:filemail@3012.filemail.com/)
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 13:01 ` Dmitry Gutov
@ 2021-12-16 13:31 ` Eli Zaretskii
2021-12-16 13:42 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-16 13:31 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rpluim, 52493
> Cc: 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 16 Dec 2021 16:01:26 +0300
>
> > Thanks. I think this means that Emacs 29 on master now rejects the
> > Inconsolata_dz font for some reason, or thinks it finds a better
> > match.
>
> Despite 'emacs -Q -fn Inconsolata_dz' having the intended effect?
Yes. The -fn argument forces Emacs to use the specified font, whereas
:family is much more general and doesn't force the use of a specific
font.
> > The fact that it picks a condensed family is probably
> > secondary; the main issue here is that the font family you requested
> > is rejected.
> >
> > Does that family have the regular weight? If not, maybe that's the
> > reason it is rejected, and you need to also require some specific
> > :weight value in your set-face-attribute call.
>
> Although yes, something to that effect seems to be going on. But
> specifying different values of :weight doesn't help either (regulal,
> medium, light, bold, extra-bold).
If playing with :weight didn't help, what other evidence did you see
that this issue is related?
> > Also, maybe running
> >
> > $ FC_DEBUG=1282 emacs -Q
> >
> > will give us a clue of what happens. See
> >
> > https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#DEBUG
> >
> > for where I took that weird value.
>
> I've recorded the log, but it's 92 MB.
>
> It's uploaded here: https://www.filemail.com/d/uplporttqgfaive
Thanks, I will try to take a look and see if I spot something of
interest.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 13:31 ` Eli Zaretskii
@ 2021-12-16 13:42 ` Dmitry Gutov
2021-12-16 14:08 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-16 13:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, 52493
On 16.12.2021 16:31, Eli Zaretskii wrote:
>> Cc:52493@debbugs.gnu.org
>> From: Dmitry Gutov<dgutov@yandex.ru>
>> Date: Thu, 16 Dec 2021 16:01:26 +0300
>>
>>> Thanks. I think this means that Emacs 29 on master now rejects the
>>> Inconsolata_dz font for some reason, or thinks it finds a better
>>> match.
>> Despite 'emacs -Q -fn Inconsolata_dz' having the intended effect?
> Yes. The -fn argument forces Emacs to use the specified font, whereas
> :family is much more general and doesn't force the use of a specific
> font.
>
>>> The fact that it picks a condensed family is probably
>>> secondary; the main issue here is that the font family you requested
>>> is rejected.
>>>
>>> Does that family have the regular weight? If not, maybe that's the
>>> reason it is rejected, and you need to also require some specific
>>> :weight value in your set-face-attribute call.
>> Although yes, something to that effect seems to be going on. But
>> specifying different values of :weight doesn't help either (regulal,
>> medium, light, bold, extra-bold).
> If playing with :weight didn't help, what other evidence did you see
> that this issue is related?
Related to not being able to select that family (as opposed to
rendering it wrong, for instance).
I also tried different scenarios which seemed to help (choose another
family, and a different weight, and then this one), but apparently they
ended up selecting a different family ultimately, rather than the one I
specified.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 13:42 ` Dmitry Gutov
@ 2021-12-16 14:08 ` Eli Zaretskii
2021-12-16 14:57 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-16 14:08 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rpluim, 52493
> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 16 Dec 2021 16:42:08 +0300
>
> >>> Does that family have the regular weight? If not, maybe that's the
> >>> reason it is rejected, and you need to also require some specific
> >>> :weight value in your set-face-attribute call.
> >> Although yes, something to that effect seems to be going on. But
> >> specifying different values of :weight doesn't help either (regulal,
> >> medium, light, bold, extra-bold).
> > If playing with :weight didn't help, what other evidence did you see
> > that this issue is related?
>
> Related to not being able to select that family (as opposed to
> rendering it wrong, for instance).
>
> I also tried different scenarios which seemed to help (choose another
> family, and a different weight, and then this one), but apparently they
> ended up selecting a different family ultimately, rather than the one I
> specified.
I see.
If you can afford it, please try building the master branch at commit
4e9764e. This is one commit before Lars installed the support for the
'medium' value of :weight, and the question is whether that change
caused what you see.
Thanks.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 14:08 ` Eli Zaretskii
@ 2021-12-16 14:57 ` Dmitry Gutov
2021-12-16 15:15 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-16 14:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, 52493
On 16.12.2021 17:08, Eli Zaretskii wrote:
> If you can afford it, please try building the master branch at commit
> 4e9764e. This is one commit before Lars installed the support for the
> 'medium' value of :weight, and the question is whether that change
> caused what you see.
Yup, this one seems to be working fine.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 14:57 ` Dmitry Gutov
@ 2021-12-16 15:15 ` Eli Zaretskii
2021-12-16 15:34 ` Eli Zaretskii
2021-12-16 15:36 ` Dmitry Gutov
0 siblings, 2 replies; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-16 15:15 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rpluim, 52493
> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 16 Dec 2021 17:57:04 +0300
>
> On 16.12.2021 17:08, Eli Zaretskii wrote:
> > If you can afford it, please try building the master branch at commit
> > 4e9764e. This is one commit before Lars installed the support for the
> > 'medium' value of :weight, and the question is whether that change
> > caused what you see.
>
> Yup, this one seems to be working fine.
Hm, but then I don't understand why using ":weight medium" in
set-face-attribute didn't help you to get the font you wanted. That's
the main change of that commit, AFAIU.
Maybe try to change the weight first and the family after it?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 15:15 ` Eli Zaretskii
@ 2021-12-16 15:34 ` Eli Zaretskii
2021-12-16 15:42 ` Dmitry Gutov
2021-12-16 15:36 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-16 15:34 UTC (permalink / raw)
To: dgutov; +Cc: rpluim, 52493
> Date: Thu, 16 Dec 2021 17:15:18 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
>
> Hm, but then I don't understand why using ":weight medium" in
> set-face-attribute didn't help you to get the font you wanted. That's
> the main change of that commit, AFAIU.
>
> Maybe try to change the weight first and the family after it?
Does that font have a 'regular' weight variety? If not, I think this
is a variant of the same issue I fixed in bug#51768: we now request a
'regular' weight when a face specifies the family, and a font which
doesn't have 'regular' is rejected. So maybe the kludge that I added
to font.c only for MS-Windows should be in effect on Posix systems as
well?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 15:15 ` Eli Zaretskii
2021-12-16 15:34 ` Eli Zaretskii
@ 2021-12-16 15:36 ` Dmitry Gutov
2021-12-16 16:54 ` Eli Zaretskii
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-16 15:36 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, 52493
On 16.12.2021 18:15, Eli Zaretskii wrote:
>> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Thu, 16 Dec 2021 17:57:04 +0300
>>
>> On 16.12.2021 17:08, Eli Zaretskii wrote:
>>> If you can afford it, please try building the master branch at commit
>>> 4e9764e. This is one commit before Lars installed the support for the
>>> 'medium' value of :weight, and the question is whether that change
>>> caused what you see.
>>
>> Yup, this one seems to be working fine.
>
> Hm, but then I don't understand why using ":weight medium" in
> set-face-attribute didn't help you to get the font you wanted. That's
> the main change of that commit, AFAIU.
In another news, 65fd3ca8 (the following commit that added 'medium')
doesn't trigger the problem either.
> Maybe try to change the weight first and the family after it?
Doesn't help.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 15:34 ` Eli Zaretskii
@ 2021-12-16 15:42 ` Dmitry Gutov
2021-12-16 16:56 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-16 15:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, 52493
On 16.12.2021 18:34, Eli Zaretskii wrote:
>> Date: Thu, 16 Dec 2021 17:15:18 +0200
>> From: Eli Zaretskii<eliz@gnu.org>
>> Cc:rpluim@gmail.com,52493@debbugs.gnu.org
>>
>> Hm, but then I don't understand why using ":weight medium" in
>> set-face-attribute didn't help you to get the font you wanted. That's
>> the main change of that commit, AFAIU.
>>
>> Maybe try to change the weight first and the family after it?
> Does that font have a 'regular' weight variety?
I'm not sure how to check. But in the font viewer, in the details,
Inconsolata has "Style: Medium", and Inconsolata_dz has "Style: dz".
Most of the others (including InconsolataLGC) have "Regular" in that field.
> If not, I think this
> is a variant of the same issue I fixed in bug#51768: we now request a
> 'regular' weight when a face specifies the family, and a font which
> doesn't have 'regular' is rejected. So maybe the kludge that I added
> to font.c only for MS-Windows should be in effect on Posix systems as
> well?
If you have a patch, I can test.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 15:36 ` Dmitry Gutov
@ 2021-12-16 16:54 ` Eli Zaretskii
2021-12-17 0:13 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-16 16:54 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rpluim, 52493
> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 16 Dec 2021 18:36:59 +0300
>
> In another news, 65fd3ca8 (the following commit that added 'medium')
> doesn't trigger the problem either.
What about 84bf954? does it introduce the problem?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 15:42 ` Dmitry Gutov
@ 2021-12-16 16:56 ` Eli Zaretskii
2021-12-17 0:49 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-16 16:56 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rpluim, 52493
> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 16 Dec 2021 18:42:21 +0300
>
> > Does that font have a 'regular' weight variety?
>
> I'm not sure how to check. But in the font viewer, in the details,
> Inconsolata has "Style: Medium", and Inconsolata_dz has "Style: dz".
>
> Most of the others (including InconsolataLGC) have "Regular" in that field.
>
> > If not, I think this
> > is a variant of the same issue I fixed in bug#51768: we now request a
> > 'regular' weight when a face specifies the family, and a font which
> > doesn't have 'regular' is rejected. So maybe the kludge that I added
> > to font.c only for MS-Windows should be in effect on Posix systems as
> > well?
>
> If you have a patch, I can test.
There's part of the font_delete_unmatched function that's conditioned
on HAVE_NTGUI. If you remove the condition (so that the code there is
unconditionally compiled) and rebuild, does the problem go away?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 16:54 ` Eli Zaretskii
@ 2021-12-17 0:13 ` Dmitry Gutov
0 siblings, 0 replies; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-17 0:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, 52493
On 16.12.2021 19:54, Eli Zaretskii wrote:
>> Cc:rpluim@gmail.com,52493@debbugs.gnu.org
>> From: Dmitry Gutov<dgutov@yandex.ru>
>> Date: Thu, 16 Dec 2021 18:36:59 +0300
>>
>> In another news, 65fd3ca8 (the following commit that added 'medium')
>> doesn't trigger the problem either.
> What about 84bf954? does it introduce the problem?
No, both it and its parent have the problem. Which kind of makes sense,
since the commit doesn't seem to change any fundamentals, just how the
mode-line looks.
I did 'git bisect', and it points to dae3c4e89b27.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-16 16:56 ` Eli Zaretskii
@ 2021-12-17 0:49 ` Dmitry Gutov
2021-12-17 7:37 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-17 0:49 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, 52493
On 16.12.2021 19:56, Eli Zaretskii wrote:
> There's part of the font_delete_unmatched function that's conditioned
> on HAVE_NTGUI. If you remove the condition (so that the code there is
> unconditionally compiled) and rebuild, does the problem go away?
Yup! Seems to help.
This is one additional piece of misbehavior (perhaps unrelated) that
really caught my eye during these tests:
When I evaluate
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
(this variation of the font doesn't have the original problem), the
height of the window shrinks, unless the window is maximized.
If I evaluate it multiple times, the height shrinks every time I do that
(stopping at height 5, when even the minibuffer becomes inaccessible).
If I evaluate
(set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
(with your fix applied), it only shrinks twice (from 33 to 29 to 27, as
reported by (window-height)). And then stops shrinking on subsequent
attempts.
Doing the same with InconsolataLGC on the latter build still makes it
shrink indefinitely.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 0:49 ` Dmitry Gutov
@ 2021-12-17 7:37 ` Eli Zaretskii
2021-12-17 7:46 ` Lars Ingebrigtsen
2021-12-17 12:30 ` Dmitry Gutov
2021-12-17 19:17 ` martin rudalics
2022-12-25 22:52 ` Gregory Heytings
2 siblings, 2 replies; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-17 7:37 UTC (permalink / raw)
To: Dmitry Gutov, Lars Ingebrigtsen, martin rudalics; +Cc: rpluim, 52493
> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 17 Dec 2021 03:49:36 +0300
>
> On 16.12.2021 19:56, Eli Zaretskii wrote:
> > There's part of the font_delete_unmatched function that's conditioned
> > on HAVE_NTGUI. If you remove the condition (so that the code there is
> > unconditionally compiled) and rebuild, does the problem go away?
>
> Yup! Seems to help.
Lars, do we make that kludge unconditionally compiled on all systems?
The change which Dmitry's bisection found as the culprit cannot be
undone, I think, because without it we cannot support medium weight
separately from regular. The change I made in font.c is the second
best, I think (or at least I couldn't think of a better one) for
people who have long-time setups which worked until now because we
treated medium and regular as the same weight.
> When I evaluate
>
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>
> (this variation of the font doesn't have the original problem), the
> height of the window shrinks, unless the window is maximized.
>
> If I evaluate it multiple times, the height shrinks every time I do that
> (stopping at height 5, when even the minibuffer becomes inaccessible).
The original shrinking is expected, I think, but the subsequent ones
shouldn't happen. Martin, could you look into this, perhaps?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 7:37 ` Eli Zaretskii
@ 2021-12-17 7:46 ` Lars Ingebrigtsen
2021-12-17 8:38 ` Eli Zaretskii
2021-12-17 12:30 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-17 7:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, 52493, Dmitry Gutov
Eli Zaretskii <eliz@gnu.org> writes:
> Lars, do we make that kludge unconditionally compiled on all systems?
Yes, I think that makes sense.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 7:46 ` Lars Ingebrigtsen
@ 2021-12-17 8:38 ` Eli Zaretskii
2022-12-21 1:14 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-17 8:38 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: rpluim, 52493, dgutov
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Dmitry Gutov <dgutov@yandex.ru>, martin rudalics <rudalics@gmx.at>,
> rpluim@gmail.com, 52493@debbugs.gnu.org
> Date: Fri, 17 Dec 2021 08:46:58 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Lars, do we make that kludge unconditionally compiled on all systems?
>
> Yes, I think that makes sense.
I installed the change. Dmitry, please see if the original problem is
indeed fixed.
I will not close the bug anyway, because of the resizing issue that
still needs investigating.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 7:37 ` Eli Zaretskii
2021-12-17 7:46 ` Lars Ingebrigtsen
@ 2021-12-17 12:30 ` Dmitry Gutov
2021-12-17 13:01 ` Eli Zaretskii
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-17 12:30 UTC (permalink / raw)
To: Eli Zaretskii, Lars Ingebrigtsen, martin rudalics; +Cc: rpluim, 52493
On 17.12.2021 10:37, Eli Zaretskii wrote:
>> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Fri, 17 Dec 2021 03:49:36 +0300
>>
>> On 16.12.2021 19:56, Eli Zaretskii wrote:
>>> There's part of the font_delete_unmatched function that's conditioned
>>> on HAVE_NTGUI. If you remove the condition (so that the code there is
>>> unconditionally compiled) and rebuild, does the problem go away?
>>
>> Yup! Seems to help.
>
> Lars, do we make that kludge unconditionally compiled on all systems?
> The change which Dmitry's bisection found as the culprit cannot be
> undone, I think, because without it we cannot support medium weight
> separately from regular.
Are we sure the bisected change (dae3c4e89b27) itself doesn't need a
tweak? From all the explanations here, I would expect
(set-face-attribute 'default nil :height 110 :weight 'medium :family
"Inconsolata")
to work correctly even without your "kludge". But it does not.
Like, okay, Inconsolata_dz has a weird "style" ("dz"), but the plain
Inconsolata is "Medium".
>> When I evaluate
>>
>> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>>
>> (this variation of the font doesn't have the original problem), the
>> height of the window shrinks, unless the window is maximized.
>>
>> If I evaluate it multiple times, the height shrinks every time I do that
>> (stopping at height 5, when even the minibuffer becomes inaccessible).
>
> The original shrinking is expected, I think, but the subsequent ones
> shouldn't happen. Martin, could you look into this, perhaps?
Since I'm measuring window height in characters (rows) here and not in
pixels, I don't think even the first change should happen.
Though of course the window size in pixels should change.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 12:30 ` Dmitry Gutov
@ 2021-12-17 13:01 ` Eli Zaretskii
2021-12-17 13:21 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-17 13:01 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: larsi, 52493, rpluim
> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 17 Dec 2021 15:30:46 +0300
>
> > Lars, do we make that kludge unconditionally compiled on all systems?
> > The change which Dmitry's bisection found as the culprit cannot be
> > undone, I think, because without it we cannot support medium weight
> > separately from regular.
>
> Are we sure the bisected change (dae3c4e89b27) itself doesn't need a
> tweak? From all the explanations here, I would expect
>
> (set-face-attribute 'default nil :height 110 :weight 'medium :family
> "Inconsolata")
>
> to work correctly even without your "kludge". But it does not.
>
> Like, okay, Inconsolata_dz has a weird "style" ("dz"), but the plain
> Inconsolata is "Medium".
Plain Inconsolata is indeed medium, but Emacs now requests regular,
not medium, as the default weight. And, according to the Fc log you
posted, Inconsolata doesn't have a regular weight variety (whose value
should be 80, not 100).
> >> When I evaluate
> >>
> >> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
> >>
> >> (this variation of the font doesn't have the original problem), the
> >> height of the window shrinks, unless the window is maximized.
> >>
> >> If I evaluate it multiple times, the height shrinks every time I do that
> >> (stopping at height 5, when even the minibuffer becomes inaccessible).
> >
> > The original shrinking is expected, I think, but the subsequent ones
> > shouldn't happen. Martin, could you look into this, perhaps?
>
> Since I'm measuring window height in characters (rows) here and not in
> pixels, I don't think even the first change should happen.
>
> Though of course the window size in pixels should change.
Let's wait for Martin to chime in, he's the expert on this stuff.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 13:01 ` Eli Zaretskii
@ 2021-12-17 13:21 ` Dmitry Gutov
2021-12-17 13:46 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-17 13:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: larsi, 52493, rpluim
On 17.12.2021 16:01, Eli Zaretskii wrote:
>> Cc: rpluim@gmail.com, 52493@debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Fri, 17 Dec 2021 15:30:46 +0300
>>
>>> Lars, do we make that kludge unconditionally compiled on all systems?
>>> The change which Dmitry's bisection found as the culprit cannot be
>>> undone, I think, because without it we cannot support medium weight
>>> separately from regular.
>>
>> Are we sure the bisected change (dae3c4e89b27) itself doesn't need a
>> tweak? From all the explanations here, I would expect
>>
>> (set-face-attribute 'default nil :height 110 :weight 'medium :family
>> "Inconsolata")
>>
>> to work correctly even without your "kludge". But it does not.
>>
>> Like, okay, Inconsolata_dz has a weird "style" ("dz"), but the plain
>> Inconsolata is "Medium".
>
> Plain Inconsolata is indeed medium, but Emacs now requests regular,
> not medium, as the default weight. And, according to the Fc log you
> posted, Inconsolata doesn't have a regular weight variety (whose value
> should be 80, not 100).
But when I specify :weight 'medium, shouldn't it request medium then?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 13:21 ` Dmitry Gutov
@ 2021-12-17 13:46 ` Eli Zaretskii
2021-12-17 14:06 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-17 13:46 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: larsi, 52493, rpluim
> Cc: larsi@gnus.org, 52493@debbugs.gnu.org, rpluim@gmail.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 17 Dec 2021 16:21:30 +0300
>
> >> Like, okay, Inconsolata_dz has a weird "style" ("dz"), but the plain
> >> Inconsolata is "Medium".
> >
> > Plain Inconsolata is indeed medium, but Emacs now requests regular,
> > not medium, as the default weight. And, according to the Fc log you
> > posted, Inconsolata doesn't have a regular weight variety (whose value
> > should be 80, not 100).
>
> But when I specify :weight 'medium, shouldn't it request medium then?
You didn't just specify medium, you specified both the family and the
weight. The implementation does it one attribute at a time (because
doing it together triggered other bugs), so at first Emacs attempts to
find a font with that family and the default weight. And without the
kludge in font.c, that font is rejected because it doesn't have
regular weight.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 13:46 ` Eli Zaretskii
@ 2021-12-17 14:06 ` Dmitry Gutov
2021-12-17 14:42 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2021-12-17 14:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: larsi, 52493, rpluim
On 17.12.2021 16:46, Eli Zaretskii wrote:
>> Cc: larsi@gnus.org, 52493@debbugs.gnu.org, rpluim@gmail.com
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Fri, 17 Dec 2021 16:21:30 +0300
>>
>>>> Like, okay, Inconsolata_dz has a weird "style" ("dz"), but the plain
>>>> Inconsolata is "Medium".
>>>
>>> Plain Inconsolata is indeed medium, but Emacs now requests regular,
>>> not medium, as the default weight. And, according to the Fc log you
>>> posted, Inconsolata doesn't have a regular weight variety (whose value
>>> should be 80, not 100).
>>
>> But when I specify :weight 'medium, shouldn't it request medium then?
>
> You didn't just specify medium, you specified both the family and the
> weight. The implementation does it one attribute at a time (because
> doing it together triggered other bugs), so at first Emacs attempts to
> find a font with that family and the default weight. And without the
> kludge in font.c, that font is rejected because it doesn't have
> regular weight.
Feels counter-intuitive, but all right.
I've tested the latest master, and that problem is fixed. Thanks!
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 14:06 ` Dmitry Gutov
@ 2021-12-17 14:42 ` Eli Zaretskii
0 siblings, 0 replies; 169+ messages in thread
From: Eli Zaretskii @ 2021-12-17 14:42 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: larsi, 52493, rpluim
> Cc: larsi@gnus.org, 52493@debbugs.gnu.org, rpluim@gmail.com
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 17 Dec 2021 17:06:05 +0300
>
> >> But when I specify :weight 'medium, shouldn't it request medium then?
> >
> > You didn't just specify medium, you specified both the family and the
> > weight. The implementation does it one attribute at a time (because
> > doing it together triggered other bugs), so at first Emacs attempts to
> > find a font with that family and the default weight. And without the
> > kludge in font.c, that font is rejected because it doesn't have
> > regular weight.
>
> Feels counter-intuitive, but all right.
The comments in the code point to bug#1127. Maybe that problem no
longer exists, and we could avoid doing that?
> I've tested the latest master, and that problem is fixed. Thanks!
Thanks for testing.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 0:49 ` Dmitry Gutov
2021-12-17 7:37 ` Eli Zaretskii
@ 2021-12-17 19:17 ` martin rudalics
2022-12-21 1:08 ` Dmitry Gutov
2022-12-24 1:03 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-25 22:52 ` Gregory Heytings
2 siblings, 2 replies; 169+ messages in thread
From: martin rudalics @ 2021-12-17 19:17 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
> When I evaluate
>
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>
> (this variation of the font doesn't have the original problem), the height of the window shrinks, unless the window is maximized.
When a frame is maximized, no implied resizing is done. With
(push 'font frame-inhibit-implied-resize)
a non-maximized frame should also keep its size in your case.
> If I evaluate it multiple times, the height shrinks every time I do
> that
This might be a rounding error or some misunderstanding wrt what the WM
(mutter in your case?) thinks our frame size is and what Emacs thinks.
In x_new_font (in xterm.c) we do
FRAME_COLUMN_WIDTH (f) = font->average_width;
...
FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
...
adjust_frame_size
(f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
which should have the effect that (frame-height) and (frame-width)
remain unaltered when changing the default font. Apparently, this fails
in your case.
> (stopping at height 5, when even the minibuffer becomes
> inaccessible
This is a separate issue I fixed here some time ago. But I don't
remember whether I pushed it and/or whether it requires additional
customizations to make it DTRT (it might depend on the ability to drop
window decorations one by one when a frame is shrunk).
> ).
> If I evaluate
>
> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
>
> (with your fix applied), it only shrinks twice (from 33 to 29 to 27, as reported by (window-height)). And then stops shrinking on subsequent attempts.
>
> Doing the same with InconsolataLGC on the latter build still makes it shrink indefinitely.
Here as above, stepping with GDB through the x_new_font code sketched
above might help tracking down this issue.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 19:17 ` martin rudalics
@ 2022-12-21 1:08 ` Dmitry Gutov
2022-12-21 9:22 ` martin rudalics
2022-12-24 1:03 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-21 1:08 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
Hi Martin,
Sorry I only got around to doing this now.
This seems to still be a problem in emacs-29, however.
On 17/12/2021 21:17, martin rudalics wrote:
> > When I evaluate
> >
> > (set-face-attribute 'default nil :height 110 :family
> "InconsolataLGC")
> >
> > (this variation of the font doesn't have the original problem), the
> height of the window shrinks, unless the window is maximized.
>
> When a frame is maximized, no implied resizing is done. With
>
> (push 'font frame-inhibit-implied-resize)
>
> a non-maximized frame should also keep its size in your case.
>
> > If I evaluate it multiple times, the height shrinks every time I do
> > that
>
> This might be a rounding error or some misunderstanding wrt what the WM
> (mutter in your case?) thinks our frame size is and what Emacs thinks.
> In x_new_font (in xterm.c) we do
Not sure if it's Mutter these days, but it's definitely GNOME Shell.
GNOME 43.1 now (I filed this issue with a much older GNOME).
> FRAME_COLUMN_WIDTH (f) = font->average_width;
> ...
> FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
> ...
> adjust_frame_size
> (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
> FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
>
> which should have the effect that (frame-height) and (frame-width)
> remain unaltered when changing the default font. Apparently, this fails
> in your case.
>
> > (stopping at height 5, when even the minibuffer becomes
> > inaccessible
>
> This is a separate issue I fixed here some time ago. But I don't
> remember whether I pushed it and/or whether it requires additional
> customizations to make it DTRT (it might depend on the ability to drop
> window decorations one by one when a frame is shrunk).
I've tried stepping through the function, and the height does shrink
when I evaluate the previously mentioned form. Not sure which of the
values are useful to you, which ones I should have printed along the
way. But see the debug log at the bottom.
All this with 'emacs -Q'. It might be because of a rounding error, but
maybe not. The bug happens with most window heights, but not with all.
E.g., it stayed stable at (frame-height) = 36. Set it to a larger value
- and it goes on shrinking until 36. Set it to a lower value (35 or
less), and it does on to shrink until 10 in small steps.
Here's the debugging log. This is just one iteration.
Thread 1 "emacs" hit Breakpoint 3, x_new_font (f=0x55555628e5e0,
font_object=XIL(0x555556287395), fontset=28) at xterm.c:26174
26174 FRAME_COLUMN_WIDTH (f) = font->average_width;
(gdb) p font->text_height
There is no member named text_height.
(gdb) p f->text_height
$7 = 1116
(gdb) xint
$8 = 279
(gdb) n
26175 get_font_ascent_descent (font, &font_ascent, &font_descent);
(gdb) n
26176 FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
(gdb) n
26179 FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) *
FRAME_LINE_HEIGHT (f);
(gdb) c
Continuing.
Thread 1 "emacs" hit Breakpoint 3, x_new_font (f=0x55555628e5e0,
font_object=XIL(0x5555562d9865), fontset=28) at xterm.c:26174
26174 FRAME_COLUMN_WIDTH (f) = font->average_width;
(gdb) c
Continuing.
Thread 1 "emacs" hit Breakpoint 3, x_new_font (f=0x55555628e5e0,
font_object=XIL(0x555556287395), fontset=28) at xterm.c:26174
26174 FRAME_COLUMN_WIDTH (f) = font->average_width;
(gdb) n
26175 get_font_ascent_descent (font, &font_ascent, &font_descent);
(gdb) n
26176 FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
(gdb) n
26179 FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) *
FRAME_LINE_HEIGHT (f);
(gdb) n
26182 FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) *
FRAME_LINE_HEIGHT (f);
(gdb) n
26188 unit = FRAME_COLUMN_WIDTH (f);
(gdb) n
26189 if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0)
(gdb) n
26190 FRAME_CONFIG_SCROLL_BAR_COLS (f)
(gdb) n
26199 if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
(gdb) p f->text_height
$9 = 1044
(gdb) xint
$10 = 261
(gdb) n
26200 adjust_frame_size
(gdb) n
26205 if (FRAME_XIC (f)
(gdb) p f->text_height
$11 = 1008
(gdb) xint
$12 = 252
(gdb) c
Continuing.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 8:38 ` Eli Zaretskii
@ 2022-12-21 1:14 ` Dmitry Gutov
2022-12-21 9:38 ` Gregory Heytings
2022-12-21 12:11 ` Eli Zaretskii
0 siblings, 2 replies; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-21 1:14 UTC (permalink / raw)
To: Eli Zaretskii, Lars Ingebrigtsen; +Cc: rudalics, rpluim, 52493
Hi Eli,
On 17/12/2021 10:38, Eli Zaretskii wrote:
>> From: Lars Ingebrigtsen<larsi@gnus.org>
>> Cc: Dmitry Gutov<dgutov@yandex.ru>, martin rudalics<rudalics@gmx.at>,
>> rpluim@gmail.com,52493@debbugs.gnu.org
>> Date: Fri, 17 Dec 2021 08:46:58 +0100
>>
>> Eli Zaretskii<eliz@gnu.org> writes:
>>
>>> Lars, do we make that kludge unconditionally compiled on all systems?
>> Yes, I think that makes sense.
> I installed the change. Dmitry, please see if the original problem is
> indeed fixed.
>
> I will not close the bug anyway, because of the resizing issue that
> still needs investigating.
BTW, the original problem is back now. I vaguely recall that we
installed the fix, but then backed out of it?
Maybe we should register that info in this bug somehow. Call it a wontfix?
Too bad the recent changes by Gregory didn't improve this scenario.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 1:08 ` Dmitry Gutov
@ 2022-12-21 9:22 ` martin rudalics
2022-12-21 12:56 ` Dmitry Gutov
2022-12-21 13:43 ` Dmitry Gutov
0 siblings, 2 replies; 169+ messages in thread
From: martin rudalics @ 2022-12-21 9:22 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
Do I understand correctly that you see a 108 pixel decrement
> (gdb) p f->text_height
> $7 = 1116
...
> (gdb) p f->text_height
> $11 = 1008
each time you evaluate
(set-face-attribute 'default nil :height 110 :weight 'medium :family "Inconsolata")
Does the problem also happen with 'frame-inhibit-implied-resize'
non-nil?
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 1:14 ` Dmitry Gutov
@ 2022-12-21 9:38 ` Gregory Heytings
2022-12-21 12:49 ` Eli Zaretskii
2022-12-21 13:40 ` Dmitry Gutov
2022-12-21 12:11 ` Eli Zaretskii
1 sibling, 2 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-21 9:38 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
>
> Too bad the recent changes by Gregory didn't improve this scenario.
>
Which scenario? If I put
(set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
in a init file, everything works as I'd expect it to work.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 1:14 ` Dmitry Gutov
2022-12-21 9:38 ` Gregory Heytings
@ 2022-12-21 12:11 ` Eli Zaretskii
1 sibling, 0 replies; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-21 12:11 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rudalics, larsi, 52493, rpluim
> Date: Wed, 21 Dec 2022 03:14:54 +0200
> Cc: rudalics@gmx.at, rpluim@gmail.com, 52493@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> On 17/12/2021 10:38, Eli Zaretskii wrote:
> >> From: Lars Ingebrigtsen<larsi@gnus.org>
> >> Cc: Dmitry Gutov<dgutov@yandex.ru>, martin rudalics<rudalics@gmx.at>,
> >> rpluim@gmail.com,52493@debbugs.gnu.org
> >> Date: Fri, 17 Dec 2021 08:46:58 +0100
> >>
> >> Eli Zaretskii<eliz@gnu.org> writes:
> >>
> >>> Lars, do we make that kludge unconditionally compiled on all systems?
> >> Yes, I think that makes sense.
> > I installed the change. Dmitry, please see if the original problem is
> > indeed fixed.
> >
> > I will not close the bug anyway, because of the resizing issue that
> > still needs investigating.
>
> BTW, the original problem is back now. I vaguely recall that we
> installed the fix, but then backed out of it?
Yes, because it caused trouble. See
https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg01643.html
> Maybe we should register that info in this bug somehow. Call it a wontfix?
>
> Too bad the recent changes by Gregory didn't improve this scenario.
I'd actually expect Gregory's changes to fix this, and explicitly
asked him at the time to test this bug's use case; he said back then
it was fixed. Maybe there's some misunderstanding or fine nuances?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 9:38 ` Gregory Heytings
@ 2022-12-21 12:49 ` Eli Zaretskii
2022-12-21 23:39 ` Gregory Heytings
2022-12-21 13:40 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-21 12:49 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Wed, 21 Dec 2022 09:38:02 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: Eli Zaretskii <eliz@gnu.org>, Lars Ingebrigtsen <larsi@gnus.org>,
> rudalics@gmx.at, rpluim@gmail.com, 52493@debbugs.gnu.org
>
>
> >
> > Too bad the recent changes by Gregory didn't improve this scenario.
> >
>
> Which scenario? If I put
>
> (set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
>
> in a init file, everything works as I'd expect it to work.
Can you show your results and contrast them with what Dmitry reported
in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52493#11
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 9:22 ` martin rudalics
@ 2022-12-21 12:56 ` Dmitry Gutov
2022-12-21 17:05 ` martin rudalics
2022-12-21 13:43 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-21 12:56 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 21/12/2022 11:22, martin rudalics wrote:
> Do I understand correctly that you see a 108 pixel decrement
>
> > (gdb) p f->text_height
> > $7 = 1116
>
> ...
>
> > (gdb) p f->text_height
> > $11 = 1008
>
> each time you evaluate
>
> (set-face-attribute 'default nil :height 110 :weight 'medium :family
> "Inconsolata")
Seems so. Or a two text-line decrease each time anyway.
But to be clear, it's InconsolataLGC here. I don't have the "plain"
Inconsolata installed at the moment.
And :weight can be specified or not. That doesn't seem to matter:
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
> Does the problem also happen with 'frame-inhibit-implied-resize'
> non-nil?
It does not.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 9:38 ` Gregory Heytings
2022-12-21 12:49 ` Eli Zaretskii
@ 2022-12-21 13:40 ` Dmitry Gutov
2022-12-21 23:39 ` Gregory Heytings
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-21 13:40 UTC (permalink / raw)
To: Gregory Heytings
Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
On 21/12/2022 11:38, Gregory Heytings wrote:
>
>>
>> Too bad the recent changes by Gregory didn't improve this scenario.
>>
>
> Which scenario? If I put
Here are a bunch of scenarios, most of them pretty odd. I was primarily
testing scenario number 2.
> (set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
>
> in a init file, everything works as I'd expect it to work.
1. If I put this in my init file and start Emacs, during startup it
blinks to a weird font (narrow window, narrow characters), but then
finishes startup with a window that looks reasonable (both the size of
the window and the shape of characters). 'M-x describe-face RET default'
reports "Inconsolata_dz" as family.
2. I start 'emacs -Q' and evaluate (set-face-attribute 'default nil
:height 105 :family "Inconsolata_dz") in *scratch*. I get that
weird-looking font that blinks briefly in scenario 1. 'M-x describe-face
RET default' reports "Ubuntu Condensed" as family.
3. I start from the end of 2. and press 'C-x 5 2'. The new window pops
up with reasonable-looking font and size. 'M-x describe-face' reports
"Inconsolata_dz" as family.
4. I start with 'emacs -Q' and evaluate (set-face-attribute 'default nil
:height 110 :family "Cascadia Mono"). This works fine on the first try
without splitting frames, 'M-x describe-face' reports "Cascadia Mono".
Same with "Inconsolata LGC".
5. I start my regular init script with (set-face-attribute 'default nil
:height 105 :family "Inconsolata LGC") in it. Then in scratch evaluate
(set-face-attribute 'default nil :height 105 :family "Inconsolata_dz").
I get another funny-looking font. 'M-x describe-face' says it's "Purisa".
6. I start with 'emacs -Q' and evaluate (set-face-attribute 'default nil
:height 110 :family "Cascadia Mono") there. Works as expected. Then I
evaluate (set-face-attribute 'default nil :height 105 :family
"Inconsolata_dz") -- the font size changes slightly (downward), but the
face remains the same. 'M-x describe-face' corroborates that.
I think the problems here are:
- Inconsolata_dz only works in frames created later.
- Setting font attributes may result in unpredictable results, they
depend on the previous font spec. Even though the explicit attributes
are all rewritten to new values every time.
- Unknown font families fail silently (switching to something else under
the hood). Perhaps it was also the case before, but it adds to the
confusion.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 9:22 ` martin rudalics
2022-12-21 12:56 ` Dmitry Gutov
@ 2022-12-21 13:43 ` Dmitry Gutov
1 sibling, 0 replies; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-21 13:43 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 21/12/2022 11:22, martin rudalics wrote:
> Do I understand correctly that you see a 108 pixel decrement
>
> > (gdb) p f->text_height
> > $7 = 1116
>
> ...
>
> > (gdb) p f->text_height
> > $11 = 1008
>
> each time you evaluate
>
> (set-face-attribute 'default nil :height 110 :weight 'medium :family
> "Inconsolata")
>
> Does the problem also happen with 'frame-inhibit-implied-resize'
> non-nil?
Sorry, here's some missing info:
I don't have a font called "InconsolataLGC", or maybe not anymore. I
have a font called "Inconsolata LGC", with a space.
Evaluating
(set-face-attribute 'default nil :height 110 :family "Inconsolata LGC")
works okay, it's only evaluating
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
creates this effect.
The value of 'height' is also important. E.g. it doesn't happen for 105,
for happens for 110.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 12:56 ` Dmitry Gutov
@ 2022-12-21 17:05 ` martin rudalics
2022-12-21 23:00 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-21 17:05 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
>> Does the problem also happen with 'frame-inhibit-implied-resize'
>> non-nil?
>
> It does not.
OK. Please apply the attached diff, do a few
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
and tell me the contents of *foo*. I'd like to know the size hints we
send to the WM.
Thanks, martin
[-- Attachment #2: Gutov.diff --]
[-- Type: text/x-patch, Size: 1809 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..a4bd34c142 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2028,6 +2028,10 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call7 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..cc02fc0520 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8393,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 17:05 ` martin rudalics
@ 2022-12-21 23:00 ` Dmitry Gutov
2022-12-22 10:15 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-21 23:00 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 21/12/2022 19:05, martin rudalics wrote:
> >> Does the problem also happen with 'frame-inhibit-implied-resize'
> >> non-nil?
> >
> > It does not.
>
> OK. Please apply the attached diff, do a few
>
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>
> and tell me the contents of *foo*. I'd like to know the size hints we
> send to the WM.
Thanks, here you go.
Initially its contents are:
xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 43 ..
height_inc .. 18
xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 84 ..
height_inc .. 18
but after I eval the above (one or many times, doesn't matter), it contains:
xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 43 ..
height_inc .. 18
xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 84 ..
height_inc .. 18
xg_wm_set_size_hint .. line_height .. 45 .. base_height .. 88 ..
height_inc .. 22
xg_wm_set_size_hint .. line_height .. 37 .. base_height .. 84 ..
height_inc .. 18
Its contents are also no different at that "special" height where the
frame stops resizing. Just in case that's important.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 12:49 ` Eli Zaretskii
@ 2022-12-21 23:39 ` Gregory Heytings
2022-12-22 7:18 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Gregory Heytings @ 2022-12-21 23:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, larsi, 52493, rpluim, dgutov
>> Which scenario? If I put
>>
>> (set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
>>
>> in a init file, everything works as I'd expect it to work.
>
> Can you show your results and contrast them with what Dmitry reported in
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52493#11
>
Evaluating
(set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
(note the ":family") has no effect, IOW the font of the default face is
unchanged. Evaluating
(set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
(note the ":font") changes the default font to Inconsolata_dz, and
(face-font 'default) returns
"-PfEd-Inconsolata_dz-medium-normal-normal-*-29-*-*-*-m-0-iso10646-1"
The result is the same before the change in bug#59347.
With emacs -Q -fn Inconsolata_dz the font of the default face is
"-PfEd-Inconsolata_dz-medium-normal-normal-*-32-*-*-*-m-0-iso10646-1"
The result is the same before the change in bug#59347.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 13:40 ` Dmitry Gutov
@ 2022-12-21 23:39 ` Gregory Heytings
2022-12-22 7:20 ` Eli Zaretskii
2022-12-22 20:32 ` Dmitry Gutov
0 siblings, 2 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-21 23:39 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
>
> Here are a bunch of scenarios, most of them pretty odd. I was primarily
> testing scenario number 2.
>
Thanks for your detailed reply.
>> (set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
>>
>> in a init file, everything works as I'd expect it to work.
>
> 1. If I put this in my init file and start Emacs, during startup it
> blinks to a weird font (narrow window, narrow characters), but then
> finishes startup with a window that looks reasonable (both the size of
> the window and the shape of characters). 'M-x describe-face RET default'
> reports "Inconsolata_dz" as family.
>
Can you please try an init file with only that line, and that exact line?
Note that your original recipe used ":family", where ":font" should be
used (and is used in the call to set-face-attribute above).
>
> 2. I start 'emacs -Q' and evaluate (set-face-attribute 'default nil
> :height 105 :family "Inconsolata_dz") in *scratch*. I get that
> weird-looking font that blinks briefly in scenario 1. 'M-x describe-face
> RET default' reports "Ubuntu Condensed" as family.
>
Again, can you try to evaluate (set-face-attribute 'default nil :height
110 :font "Inconsolata_dz") (with ":font", not ":family") instead, and
tell us what happens?
Can you try your other recipes, using ":font" where you used ":family",
and tell us whether what happens is what you expected?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 23:39 ` Gregory Heytings
@ 2022-12-22 7:18 ` Eli Zaretskii
2022-12-25 22:42 ` Gregory Heytings
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-22 7:18 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Wed, 21 Dec 2022 23:39:22 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: dgutov@yandex.ru, larsi@gnus.org, rudalics@gmx.at, rpluim@gmail.com,
> 52493@debbugs.gnu.org
>
>
> >> Which scenario? If I put
> >>
> >> (set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
> >>
> >> in a init file, everything works as I'd expect it to work.
> >
> > Can you show your results and contrast them with what Dmitry reported in
> >
> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52493#11
> >
>
> Evaluating
>
> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
>
> (note the ":family") has no effect, IOW the font of the default face is
> unchanged. Evaluating
>
> (set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
>
> (note the ":font") changes the default font to Inconsolata_dz, and
> (face-font 'default) returns
>
> "-PfEd-Inconsolata_dz-medium-normal-normal-*-29-*-*-*-m-0-iso10646-1"
>
> The result is the same before the change in bug#59347.
>
> With emacs -Q -fn Inconsolata_dz the font of the default face is
>
> "-PfEd-Inconsolata_dz-medium-normal-normal-*-32-*-*-*-m-0-iso10646-1"
>
> The result is the same before the change in bug#59347.
So this result from Dmitry:
> >> It's a weird scenario, but evaluating this in 'emacs -Q' will make
> >> characters render more narrowly (and a little shorter) than it did
> >> previously:
> >>
> >> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
> >>
> >> See the attached screenshot with comparison (master is on the left).
> >
> > Indeed, weird. What does the below show?
> >
> > M-: (face-font 'default) RET
> >
> > after you evaluate the above in "emacs -Q"?
>
> "-DAMA-Ubuntu Condensed-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1"
is not reproduced on your system, is that right?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 23:39 ` Gregory Heytings
@ 2022-12-22 7:20 ` Eli Zaretskii
2022-12-25 22:42 ` Gregory Heytings
2022-12-22 20:32 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-22 7:20 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Wed, 21 Dec 2022 23:39:34 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: Eli Zaretskii <eliz@gnu.org>, Lars Ingebrigtsen <larsi@gnus.org>,
> rudalics@gmx.at, rpluim@gmail.com, 52493@debbugs.gnu.org
>
> > 2. I start 'emacs -Q' and evaluate (set-face-attribute 'default nil
> > :height 105 :family "Inconsolata_dz") in *scratch*. I get that
> > weird-looking font that blinks briefly in scenario 1. 'M-x describe-face
> > RET default' reports "Ubuntu Condensed" as family.
> >
>
> Again, can you try to evaluate (set-face-attribute 'default nil :height
> 110 :font "Inconsolata_dz") (with ":font", not ":family") instead, and
> tell us what happens?
>
> Can you try your other recipes, using ":font" where you used ":family",
> and tell us whether what happens is what you expected?
What is the significance of using :font instead of :family in these
cases, for the purpose of discussing and investigating this issue?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 23:00 ` Dmitry Gutov
@ 2022-12-22 10:15 ` martin rudalics
2022-12-22 20:39 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-22 10:15 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]
> Initially its contents are:
>
> xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 43 .. height_inc .. 18
> xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 84 .. height_inc .. 18
>
> but after I eval the above (one or many times, doesn't matter), it contains:
>
> xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 43 .. height_inc .. 18
> xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 84 .. height_inc .. 18
> xg_wm_set_size_hint .. line_height .. 45 .. base_height .. 88 .. height_inc .. 22
> xg_wm_set_size_hint .. line_height .. 37 .. base_height .. 84 .. height_inc .. 18
>
> Its contents are also no different at that "special" height where the frame stops resizing. Just in case that's important.
Thanks. Please with the new patch attached eval in *scratch* the first
form
(defun foo-set-face-attribute ()
(foo-it "set-face-attribute")
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC"))
(foo-set-face-attribute)
and then eval the last form a couple of times. This should help us to
discern whether and how 'set-face-attribute' has an effect on the size
hints.
martin
[-- Attachment #2: Gutov.diff --]
[-- Type: text/x-patch, Size: 2302 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..3fba03d61a 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,10 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ call5 (Qfoo_it, intern ("adjust_frame_size"),
+ intern ("pixel_height"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("text_height"), make_fixnum (FRAME_TEXT_HEIGHT (f)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..a4bd34c142 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2028,6 +2028,10 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call7 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-21 23:39 ` Gregory Heytings
2022-12-22 7:20 ` Eli Zaretskii
@ 2022-12-22 20:32 ` Dmitry Gutov
2022-12-25 22:42 ` Gregory Heytings
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-22 20:32 UTC (permalink / raw)
To: Gregory Heytings
Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
On 22/12/2022 01:39, Gregory Heytings wrote:
>
>>
>> Here are a bunch of scenarios, most of them pretty odd. I was
>> primarily testing scenario number 2.
>>
>
> Thanks for your detailed reply.
>
>>> (set-face-attribute 'default nil :height 110 :font "Inconsolata_dz")
>>>
>>> in a init file, everything works as I'd expect it to work.
>>
>> 1. If I put this in my init file and start Emacs, during startup it
>> blinks to a weird font (narrow window, narrow characters), but then
>> finishes startup with a window that looks reasonable (both the size of
>> the window and the shape of characters). 'M-x describe-face RET
>> default' reports "Inconsolata_dz" as family.
>>
>
> Can you please try an init file with only that line, and that exact
> line? Note that your original recipe used ":family", where ":font"
> should be used (and is used in the call to set-face-attribute above).
With :font, the recipe seems to be working fine. Thanks!
I've always used :family for this purpose in the past.
>> 2. I start 'emacs -Q' and evaluate (set-face-attribute 'default nil
>> :height 105 :family "Inconsolata_dz") in *scratch*. I get that
>> weird-looking font that blinks briefly in scenario 1. 'M-x
>> describe-face RET default' reports "Ubuntu Condensed" as family.
>>
>
> Again, can you try to evaluate (set-face-attribute 'default nil :height
> 110 :font "Inconsolata_dz") (with ":font", not ":family") instead, and
> tell us what happens?
The behavior seems to be as expected: this font is assigned in the
current frame.
> Can you try your other recipes, using ":font" where you used ":family",
> and tell us whether what happens is what you expected?
Almost good, with one problem jumping out, however:
- Evaluate (set-face-attribute 'default nil :height 105 :weight 'regular
:font "Inconsolata LGC"), result:
Family: Inconsolata LGC
Foundry: PfEd
Width: normal
Height: 105
Weight: regular
- Then I evaluate (set-face-attribute 'default nil :height 110 :weight
'semi-light :font "Cascadia Mono"), the result is:
Family: Inconsolata LGC
Foundry: PfEd
Width: normal
Height: 105
Weight: regular
Note the weight. Cascadia Code seems to be thicker than average as a
font, so the weight of the regular font jumps out, and it was easy to
notice.
If I, however, follow (set-face-attribute 'default nil :height 105
:weight 'regular :font "Inconsolata LGC") with (set-face-attribute
'default nil :height 110 :weight 'semi-light :family "Cascadia Mono") --
note :family, the resulting font looks fine, and is described as:
Family: Cascadia Mono
Foundry: SAJA
Width: normal
Height: 109
Weight: semi-light
Starting the session with (set-face-attribute 'default nil :height 110
:weight 'semi-light :font "Cascadia Mono") also has this problem.
However, switching from :family to :font -- (set-face-attribute 'default
nil :height 110 :weight 'semi-light :family "Cascadia Mono") followed by
(set-face-attribute 'default nil :height 110 :weight 'semi-light :font
"Cascadia Mono") -- is a no-op.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-22 10:15 ` martin rudalics
@ 2022-12-22 20:39 ` Dmitry Gutov
2022-12-23 9:14 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-22 20:39 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 22/12/2022 12:15, martin rudalics wrote:
> Thanks. Please with the new patch attached eval in *scratch* the first
> form
>
> (defun foo-set-face-attribute ()
> (foo-it "set-face-attribute")
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC"))
>
> (foo-set-face-attribute)
>
> and then eval the last form a couple of times. This should help us to
> discern whether and how 'set-face-attribute' has an effect on the size
> hints.
The contents of the buffer *foo* are below.
I'm not sure if you caught one of my previous messages, however, so I'd
like to repeat:
The problem is easily repeatable in the above scenario. But not if I
change "InconsolataLGC" to "Inconsolata LGC". Then the resizing stops
after the first iteration.
In either case, 'M-x describe-face RET default' shows "Family:
Inconsolata LGC", though. So it's not like "InconsolataLGC" is entirely
unrecognized.
Anyway, here's the log (evaled the form 3 times):
adjust_frame_size .. pixel_height .. 25 .. text_height .. 24
adjust_frame_size .. pixel_height .. 900 .. text_height .. 900
adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 43 ..
height_inc .. 18
xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 84 ..
height_inc .. 18
set-face-attribute
xg_wm_set_size_hint .. line_height .. 45 .. base_height .. 88 ..
height_inc .. 22
adjust_frame_size .. pixel_height .. 1584 .. text_height .. 1584
xg_wm_set_size_hint .. line_height .. 37 .. base_height .. 84 ..
height_inc .. 18
adjust_frame_size .. pixel_height .. 1260 .. text_height .. 1260
set-face-attribute
adjust_frame_size .. pixel_height .. 1224 .. text_height .. 1224
adjust_frame_size .. pixel_height .. 1188 .. text_height .. 1188
set-face-attribute
adjust_frame_size .. pixel_height .. 1152 .. text_height .. 1152
adjust_frame_size .. pixel_height .. 1116 .. text_height .. 1116
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-22 20:39 ` Dmitry Gutov
@ 2022-12-23 9:14 ` martin rudalics
2022-12-23 9:19 ` martin rudalics
2022-12-23 18:48 ` Dmitry Gutov
0 siblings, 2 replies; 169+ messages in thread
From: martin rudalics @ 2022-12-23 9:14 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
> I'm not sure if you caught one of my previous messages, however, so I'd like to repeat:
>
> The problem is easily repeatable in the above scenario. But not if I change "InconsolataLGC" to "Inconsolata LGC". Then the resizing stops after the first iteration.
>
> In either case, 'M-x describe-face RET default' shows "Family: Inconsolata LGC", though. So it's not like "InconsolataLGC" is entirely unrecognized.
Does it matter? Whatever you do - have the same form evaluated twice in
a row causing a frame resize must be a bug - somewhere.
> Anyway, here's the log (evaled the form 3 times):
>
> adjust_frame_size .. pixel_height .. 25 .. text_height .. 24
> adjust_frame_size .. pixel_height .. 900 .. text_height .. 900
> adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
> adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
> xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 43 .. height_inc .. 18
> xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 84 .. height_inc .. 18
We start here
> set-face-attribute
> xg_wm_set_size_hint .. line_height .. 45 .. base_height .. 88 .. height_inc .. 22
and come up with a frame line height of 45 pixels and an increment hint
of 22 which means that some scaling (by 2 apparently) is in effect here.
Honestly, I have no idea how this is supposed to work.
> adjust_frame_size .. pixel_height .. 1584 .. text_height .. 1584
> xg_wm_set_size_hint .. line_height .. 37 .. base_height .. 84 .. height_inc .. 18
Here we ask for the same (due to rounding) increment ...
> adjust_frame_size .. pixel_height .. 1260 .. text_height .. 1260
> set-face-attribute
> adjust_frame_size .. pixel_height .. 1224 .. text_height .. 1224
> adjust_frame_size .. pixel_height .. 1188 .. text_height .. 1188
> set-face-attribute
> adjust_frame_size .. pixel_height .. 1152 .. text_height .. 1152
> adjust_frame_size .. pixel_height .. 1116 .. text_height .. 1116
... but then we do not set hints any more so it seems that we do all the
shrinking ourselves - just how can we shrink and not send size hints at
the same time is yet a mystery to me.
Please run again with the new patch but also evaluate
(setq frame-size-history '(100))
Then perform some 'set-face-attribute' calls, evaluate
(frame--size-history)
and get me the contents of both buffers *foo* and *frame-size-history*.
Thanks, martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-23 9:14 ` martin rudalics
@ 2022-12-23 9:19 ` martin rudalics
2022-12-23 18:48 ` Dmitry Gutov
1 sibling, 0 replies; 169+ messages in thread
From: martin rudalics @ 2022-12-23 9:19 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 97 bytes --]
> Please run again with the new patch but also evaluate
Attaching the "new" patch now.
martin
[-- Attachment #2: Gutov.diff --]
[-- Type: text/x-patch, Size: 2338 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..3fba03d61a 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,10 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ call5 (Qfoo_it, intern ("adjust_frame_size"),
+ intern ("pixel_height"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("text_height"), make_fixnum (FRAME_TEXT_HEIGHT (f)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..3a6d14b3a9 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2028,6 +2028,11 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call8 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height & scale"),
+ make_fixnum (FRAME_LINE_HEIGHT (f)), make_fixnum (scale),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-23 9:14 ` martin rudalics
2022-12-23 9:19 ` martin rudalics
@ 2022-12-23 18:48 ` Dmitry Gutov
2022-12-24 9:27 ` martin rudalics
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-23 18:48 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 2829 bytes --]
On 23/12/2022 11:14, martin rudalics wrote:
> > I'm not sure if you caught one of my previous messages, however, so
> I'd like to repeat:
> >
> > The problem is easily repeatable in the above scenario. But not if I
> change "InconsolataLGC" to "Inconsolata LGC". Then the resizing stops
> after the first iteration.
> >
> > In either case, 'M-x describe-face RET default' shows "Family:
> Inconsolata LGC", though. So it's not like "InconsolataLGC" is entirely
> unrecognized.
>
> Does it matter? Whatever you do - have the same form evaluated twice in
> a row causing a frame resize must be a bug - somewhere.
Yep.
I just figured that it might give you ideas as to the cause and/or
affect the priority of having this fixed.
> > Anyway, here's the log (evaled the form 3 times):
> >
> > adjust_frame_size .. pixel_height .. 25 .. text_height .. 24
> > adjust_frame_size .. pixel_height .. 900 .. text_height .. 900
> > adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
> > adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
> > xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 43 ..
> height_inc .. 18
> > xg_wm_set_size_hint .. line_height .. 36 .. base_height .. 84 ..
> height_inc .. 18
>
> We start here
>
> > set-face-attribute
> > xg_wm_set_size_hint .. line_height .. 45 .. base_height .. 88 ..
> height_inc .. 22
>
> and come up with a frame line height of 45 pixels and an increment hint
> of 22 which means that some scaling (by 2 apparently) is in effect here.
> Honestly, I have no idea how this is supposed to work.
2x scaling, yes (I have a 4K display).
> > adjust_frame_size .. pixel_height .. 1584 .. text_height .. 1584
> > xg_wm_set_size_hint .. line_height .. 37 .. base_height .. 84 ..
> height_inc .. 18
>
> Here we ask for the same (due to rounding) increment ...
>
> > adjust_frame_size .. pixel_height .. 1260 .. text_height .. 1260
> > set-face-attribute
> > adjust_frame_size .. pixel_height .. 1224 .. text_height .. 1224
> > adjust_frame_size .. pixel_height .. 1188 .. text_height .. 1188
> > set-face-attribute
> > adjust_frame_size .. pixel_height .. 1152 .. text_height .. 1152
> > adjust_frame_size .. pixel_height .. 1116 .. text_height .. 1116
>
> ... but then we do not set hints any more so it seems that we do all the
> shrinking ourselves - just how can we shrink and not send size hints at
> the same time is yet a mystery to me.
>
> Please run again with the new patch but also evaluate
>
> (setq frame-size-history '(100))
>
> Then perform some 'set-face-attribute' calls, evaluate
>
> (frame--size-history)
>
> and get me the contents of both buffers *foo* and *frame-size-history*.
Here you go, both attached.
I called set-face-attributes 8 times, might have got a little
over-enthusiastic.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 1790 bytes --]
adjust_frame_size .. pixel_height .. 25 .. text_height .. 24
adjust_frame_size .. pixel_height .. 900 .. text_height .. 900
adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height .. 43 .. height_inc .. 18
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height .. 84 .. height_inc .. 18
xg_wm_set_size_hint .. line_height & scale .. 45 .. 2 .. base_height .. 88 .. height_inc .. 22
adjust_frame_size .. pixel_height .. 1584 .. text_height .. 1584
xg_wm_set_size_hint .. line_height & scale .. 37 .. 2 .. base_height .. 84 .. height_inc .. 18
adjust_frame_size .. pixel_height .. 1260 .. text_height .. 1260
adjust_frame_size .. pixel_height .. 1224 .. text_height .. 1224
adjust_frame_size .. pixel_height .. 1188 .. text_height .. 1188
adjust_frame_size .. pixel_height .. 1152 .. text_height .. 1152
adjust_frame_size .. pixel_height .. 1116 .. text_height .. 1116
adjust_frame_size .. pixel_height .. 1080 .. text_height .. 1080
adjust_frame_size .. pixel_height .. 1044 .. text_height .. 1044
adjust_frame_size .. pixel_height .. 1008 .. text_height .. 1008
adjust_frame_size .. pixel_height .. 972 .. text_height .. 972
adjust_frame_size .. pixel_height .. 936 .. text_height .. 936
adjust_frame_size .. pixel_height .. 900 .. text_height .. 900
adjust_frame_size .. pixel_height .. 864 .. text_height .. 864
adjust_frame_size .. pixel_height .. 828 .. text_height .. 828
adjust_frame_size .. pixel_height .. 792 .. text_height .. 792
adjust_frame_size .. pixel_height .. 756 .. text_height .. 756
adjust_frame_size .. pixel_height .. 1900 .. text_height .. 1900
adjust_frame_size .. pixel_height .. 1964 .. text_height .. 1964
[-- Attachment #3: frame-size-history.txt --]
[-- Type: text/plain, Size: 7006 bytes --]
Frame size history of #<frame *scratch* - GNU Emacs at potemkin 0x55d4b64acb70>
font (3), TS=1440x1296~>1680x1620, NS=1488x1296~>1728x1620, IS=1488x1296~>1728x1620, MS=210x225
xg_frame_set_char_size, visible, PS=1488x1296, XS=1728x1620
ConfigureNotify, PS=1488x1296, XS=1728x1584
xg_frame_resized, changed, PS=1488x1296, XS=1728x1584
change_frame_size_1, delayed, PS=1488x1296, XS=1728x1584
change_frame_size (5), TS=1440x1296~>1680x1584, TC=80x36~>80x35, NS=1488x1296~>1728x1584, IS=1488x1296~>1728x1584, MS=42x90 IH IV
font (3), TS=1680x1584~>1360x1295, NS=1728x1584~>1408x1295, IS=1728x1584~>1408x1295, MS=170x185
xg_frame_set_char_size, visible, PS=1728x1584, XS=1408x1295
ConfigureNotify, PS=1728x1584, XS=1408x1260
xg_frame_resized, changed, PS=1728x1584, XS=1408x1260
change_frame_size_1, delayed, PS=1728x1584, XS=1408x1260
change_frame_size (5), TS=1680x1584~>1360x1260, TC=80x35~>80x34, NS=1728x1584~>1408x1260, IS=1728x1584~>1408x1260, MS=34x74 IH IV
font (3), TS=1360x1260~>1360x1258, NS=1408x1260~>1408x1258, IS=1408x1260~>1408x1258, MS=170x185
xg_frame_set_char_size, visible, PS=1408x1260, XS=1408x1258
ConfigureNotify, PS=1408x1260, XS=1408x1224
xg_frame_resized, changed, PS=1408x1260, XS=1408x1224
change_frame_size_1, delayed, PS=1408x1260, XS=1408x1224
change_frame_size (5), TS=1360x1260~>1360x1224, TC=80x34~>80x33, NS=1408x1260~>1408x1224, IS=1408x1260~>1408x1224, MS=34x74 IH IV
font (3), TS=1360x1224~>1360x1221, NS=1408x1224~>1408x1221, IS=1408x1224~>1408x1221, MS=170x185
xg_frame_set_char_size, visible, PS=1408x1224, XS=1408x1221
ConfigureNotify, PS=1408x1224, XS=1408x1188
xg_frame_resized, changed, PS=1408x1224, XS=1408x1188
change_frame_size_1, delayed, PS=1408x1224, XS=1408x1188
change_frame_size (5), TS=1360x1224~>1360x1188, TC=80x33~>80x32, NS=1408x1224~>1408x1188, IS=1408x1224~>1408x1188, MS=34x74 IH IV
font (3), TS=1360x1188~>1360x1184, NS=1408x1188~>1408x1184, IS=1408x1188~>1408x1184, MS=170x185
xg_frame_set_char_size, visible, PS=1408x1188, XS=1408x1184
ConfigureNotify, PS=1408x1188, XS=1408x1152
xg_frame_resized, changed, PS=1408x1188, XS=1408x1152
change_frame_size_1, delayed, PS=1408x1188, XS=1408x1152
change_frame_size (5), TS=1360x1188~>1360x1152, TC=80x32~>80x31, NS=1408x1188~>1408x1152, IS=1408x1188~>1408x1152, MS=34x74 IH IV
font (3), TS=1360x1152~>1360x1147, NS=1408x1152~>1408x1147, IS=1408x1152~>1408x1147, MS=170x185
xg_frame_set_char_size, visible, PS=1408x1152, XS=1408x1147
ConfigureNotify, PS=1408x1152, XS=1408x1116
xg_frame_resized, changed, PS=1408x1152, XS=1408x1116
change_frame_size_1, delayed, PS=1408x1152, XS=1408x1116
change_frame_size (5), TS=1360x1152~>1360x1116, TC=80x31~>80x30, NS=1408x1152~>1408x1116, IS=1408x1152~>1408x1116, MS=34x74 IH IV
font (3), TS=1360x1116~>1360x1110, NS=1408x1116~>1408x1110, IS=1408x1116~>1408x1110, MS=170x185
xg_frame_set_char_size, visible, PS=1408x1116, XS=1408x1110
ConfigureNotify, PS=1408x1116, XS=1408x1080
xg_frame_resized, changed, PS=1408x1116, XS=1408x1080
change_frame_size_1, delayed, PS=1408x1116, XS=1408x1080
change_frame_size (5), TS=1360x1116~>1360x1080, TC=80x30~>80x29, NS=1408x1116~>1408x1080, IS=1408x1116~>1408x1080, MS=34x74 IH IV
font (3), TS=1360x1080~>1360x1073, NS=1408x1080~>1408x1073, IS=1408x1080~>1408x1073, MS=170x185
xg_frame_set_char_size, visible, PS=1408x1080, XS=1408x1073
ConfigureNotify, PS=1408x1080, XS=1408x1044
xg_frame_resized, changed, PS=1408x1080, XS=1408x1044
change_frame_size_1, delayed, PS=1408x1080, XS=1408x1044
change_frame_size (5), TS=1360x1080~>1360x1044, TC=80x29~>80x28, NS=1408x1080~>1408x1044, IS=1408x1080~>1408x1044, MS=34x74 IH IV
font (3), TS=1360x1044~>1360x1036, NS=1408x1044~>1408x1036, IS=1408x1044~>1408x1036, MS=170x185
xg_frame_set_char_size, visible, PS=1408x1044, XS=1408x1036
ConfigureNotify, PS=1408x1044, XS=1408x1008
xg_frame_resized, changed, PS=1408x1044, XS=1408x1008
change_frame_size_1, delayed, PS=1408x1044, XS=1408x1008
change_frame_size (5), TS=1360x1044~>1360x1008, TC=80x28~>80x27, NS=1408x1044~>1408x1008, IS=1408x1044~>1408x1008, MS=34x74 IH IV
font (3), TS=1360x1008~>1360x999, NS=1408x1008~>1408x999, IS=1408x1008~>1408x999, MS=170x185
xg_frame_set_char_size, visible, PS=1408x1008, XS=1408x999
ConfigureNotify, PS=1408x1008, XS=1408x972
xg_frame_resized, changed, PS=1408x1008, XS=1408x972
change_frame_size_1, delayed, PS=1408x1008, XS=1408x972
change_frame_size (5), TS=1360x1008~>1360x972, TC=80x27~>80x26, NS=1408x1008~>1408x972, IS=1408x1008~>1408x972, MS=34x74 IH IV
font (3), TS=1360x972~>1360x962, NS=1408x972~>1408x962, IS=1408x972~>1408x962, MS=170x185
xg_frame_set_char_size, visible, PS=1408x972, XS=1408x962
ConfigureNotify, PS=1408x972, XS=1408x936
xg_frame_resized, changed, PS=1408x972, XS=1408x936
change_frame_size_1, delayed, PS=1408x972, XS=1408x936
change_frame_size (5), TS=1360x972~>1360x936, TC=80x26~>80x25, NS=1408x972~>1408x936, IS=1408x972~>1408x936, MS=34x74 IH IV
font (3), TS=1360x936~>1360x925, NS=1408x936~>1408x925, IS=1408x936~>1408x925, MS=170x185
xg_frame_set_char_size, visible, PS=1408x936, XS=1408x925
ConfigureNotify, PS=1408x936, XS=1408x900
xg_frame_resized, changed, PS=1408x936, XS=1408x900
change_frame_size_1, delayed, PS=1408x936, XS=1408x900
change_frame_size (5), TS=1360x936~>1360x900, TC=80x25~>80x24, NS=1408x936~>1408x900, IS=1408x936~>1408x900, MS=34x74 IH IV
font (3), TS=1360x900~>1360x888, NS=1408x900~>1408x888, IS=1408x900~>1408x888, MS=170x185
xg_frame_set_char_size, visible, PS=1408x900, XS=1408x888
ConfigureNotify, PS=1408x900, XS=1408x864
xg_frame_resized, changed, PS=1408x900, XS=1408x864
change_frame_size_1, delayed, PS=1408x900, XS=1408x864
change_frame_size (5), TS=1360x900~>1360x864, TC=80x24~>80x23, NS=1408x900~>1408x864, IS=1408x900~>1408x864, MS=34x74 IH IV
font (3), TS=1360x864~>1360x851, NS=1408x864~>1408x851, IS=1408x864~>1408x851, MS=170x185
xg_frame_set_char_size, visible, PS=1408x864, XS=1408x851
ConfigureNotify, PS=1408x864, XS=1408x828
xg_frame_resized, changed, PS=1408x864, XS=1408x828
change_frame_size_1, delayed, PS=1408x864, XS=1408x828
change_frame_size (5), TS=1360x864~>1360x828, TC=80x23~>80x22, NS=1408x864~>1408x828, IS=1408x864~>1408x828, MS=34x74 IH IV
font (3), TS=1360x828~>1360x814, NS=1408x828~>1408x814, IS=1408x828~>1408x814, MS=170x185
xg_frame_set_char_size, visible, PS=1408x828, XS=1408x814
ConfigureNotify, PS=1408x828, XS=1408x792
xg_frame_resized, changed, PS=1408x828, XS=1408x792
change_frame_size_1, delayed, PS=1408x828, XS=1408x792
change_frame_size (5), TS=1360x828~>1360x792, TC=80x22~>80x21, NS=1408x828~>1408x792, IS=1408x828~>1408x792, MS=34x74 IH IV
font (3), TS=1360x792~>1360x777, NS=1408x792~>1408x777, IS=1408x792~>1408x777, MS=170x185
xg_frame_set_char_size, visible, PS=1408x792, XS=1408x777
ConfigureNotify, PS=1408x792, XS=1408x756
xg_frame_resized, changed, PS=1408x792, XS=1408x756
change_frame_size_1, delayed, PS=1408x792, XS=1408x756
change_frame_size (5), TS=1360x792~>1360x756, TC=80x21~>80x20, NS=1408x792~>1408x756, IS=1408x792~>1408x756, MS=34x74 IH IV
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 19:17 ` martin rudalics
2022-12-21 1:08 ` Dmitry Gutov
@ 2022-12-24 1:03 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 8:52 ` martin rudalics
1 sibling, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-24 1:03 UTC (permalink / raw)
To: martin rudalics; +Cc: Eli Zaretskii, 52493, rpluim, Dmitry Gutov
martin rudalics <rudalics@gmx.at> writes:
>> When I evaluate
>>
>> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>>
>> (this variation of the font doesn't have the original problem), the height of the window shrinks, unless the window is maximized.
>
> When a frame is maximized, no implied resizing is done. With
>
> (push 'font frame-inhibit-implied-resize)
>
> a non-maximized frame should also keep its size in your case.
>
>> If I evaluate it multiple times, the height shrinks every time I do
>> that
>
> This might be a rounding error or some misunderstanding wrt what the WM
> (mutter in your case?) thinks our frame size is and what Emacs thinks.
> In x_new_font (in xterm.c) we do
>
> FRAME_COLUMN_WIDTH (f) = font->average_width;
> ...
> FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
> ...
> adjust_frame_size
> (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
> FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
>
> which should have the effect that (frame-height) and (frame-width)
> remain unaltered when changing the default font. Apparently, this fails
> in your case.
>
>> (stopping at height 5, when even the minibuffer becomes
>> inaccessible
>
> This is a separate issue I fixed here some time ago. But I don't
> remember whether I pushed it and/or whether it requires additional
> customizations to make it DTRT (it might depend on the ability to drop
> window decorations one by one when a frame is shrunk).
>
>> ).
>
>> If I evaluate
>>
>> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
>>
>> (with your fix applied), it only shrinks twice (from 33 to 29 to 27, as reported by (window-height)). And then stops shrinking on subsequent attempts.
>>
>> Doing the same with InconsolataLGC on the latter build still makes it shrink indefinitely.
>
> Here as above, stepping with GDB through the x_new_font code sketched
> above might help tracking down this issue.
>
> martin
Would someone explain what the problem is, and what has already been
fixed? I cannot gather that information from reading the bug report.
Thanks.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-24 1:03 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-12-24 8:52 ` martin rudalics
2022-12-24 9:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-24 8:52 UTC (permalink / raw)
To: Po Lu; +Cc: Eli Zaretskii, 52493, rpluim, Dmitry Gutov
> Would someone explain what the problem is, and what has already been
> fixed? I cannot gather that information from reading the bug report.
In a nutshell, Dmitry repeatedly evaluates 'set-face-attribute' with the
same arguments and has his frame height decrease by 36 pixels each time
he does that.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-23 18:48 ` Dmitry Gutov
@ 2022-12-24 9:27 ` martin rudalics
2022-12-24 13:38 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-24 9:27 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
> I called set-face-attributes 8 times, might have got a little over-enthusiastic.
Thanks. It didn't harm. IIUC the problem is in x_new_font. With the
attached please do a few calls again and post the contents of *foo*.
martin
[-- Attachment #2: Gutov.diff --]
[-- Type: text/x-patch, Size: 2983 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..3fba03d61a 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,10 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ call5 (Qfoo_it, intern ("adjust_frame_size"),
+ intern ("pixel_height"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("text_height"), make_fixnum (FRAME_TEXT_HEIGHT (f)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..3a6d14b3a9 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2028,6 +2028,11 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call8 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height & scale"),
+ make_fixnum (FRAME_LINE_HEIGHT (f)), make_fixnum (scale),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..a701bae9af 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26175,6 +26175,11 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
get_font_ascent_descent (font, &font_ascent, &font_descent);
FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
+ call7 (Qfoo_it, intern ("x_new_font"),
+ intern ("ascent"), make_fixnum (font_ascent),
+ intern ("descent"), make_fixnum (font_descent),
+ intern ("line_height"), make_fixnum (FRAME_LINE_HEIGHT (f)));
+
#ifndef USE_X_TOOLKIT
FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
#endif
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-24 8:52 ` martin rudalics
@ 2022-12-24 9:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 10:45 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-24 9:39 UTC (permalink / raw)
To: martin rudalics; +Cc: Eli Zaretskii, 52493, rpluim, Dmitry Gutov
martin rudalics <rudalics@gmx.at> writes:
>> Would someone explain what the problem is, and what has already been
>> fixed? I cannot gather that information from reading the bug report.
>
> In a nutshell, Dmitry repeatedly evaluates 'set-face-attribute' with the
> same arguments and has his frame height decrease by 36 pixels each time
> he does that.
>
> martin
Right. What exact invocation of `set-face-attribute'?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-24 9:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-12-24 10:45 ` martin rudalics
2022-12-24 11:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-24 10:45 UTC (permalink / raw)
To: Po Lu; +Cc: Eli Zaretskii, 52493, rpluim, Dmitry Gutov
> Right. What exact invocation of `set-face-attribute'?
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
AFAICT the problem is either with
get_font_ascent_descent (font, &font_ascent, &font_descent);
for that font or in an ensuing size hints base height conflict.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-24 10:45 ` martin rudalics
@ 2022-12-24 11:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 13:02 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-12-24 11:24 UTC (permalink / raw)
To: martin rudalics; +Cc: Eli Zaretskii, 52493, rpluim, Dmitry Gutov
martin rudalics <rudalics@gmx.at> writes:
>> Right. What exact invocation of `set-face-attribute'?
>
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>
> AFAICT the problem is either with
>
> get_font_ascent_descent (font, &font_ascent, &font_descent);
>
> for that font or in an ensuing size hints base height conflict.
>
> martin
I don't have that font, would you please attach it in a reply?
Thanks a lot.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-24 11:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-12-24 13:02 ` Dmitry Gutov
0 siblings, 0 replies; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-24 13:02 UTC (permalink / raw)
To: Po Lu, martin rudalics; +Cc: Eli Zaretskii, 52493, rpluim
[-- Attachment #1: Type: text/plain, Size: 502 bytes --]
On 24/12/2022 13:24, Po Lu wrote:
> martin rudalics<rudalics@gmx.at> writes:
>
>>> Right. What exact invocation of `set-face-attribute'?
>> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>>
>> AFAICT the problem is either with
>>
>> get_font_ascent_descent (font, &font_ascent, &font_descent);
>>
>> for that font or in an ensuing size hints base height conflict.
>>
>> martin
> I don't have that font, would you please attach it in a reply?
> Thanks a lot.
Here it is.
[-- Attachment #2: InconsolataLGC-Regular.otf --]
[-- Type: application/vnd.oasis.opendocument.formula-template, Size: 62236 bytes --]
[-- Attachment #3: InconsolataLGC-Bold.otf --]
[-- Type: application/vnd.oasis.opendocument.formula-template, Size: 66652 bytes --]
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-24 9:27 ` martin rudalics
@ 2022-12-24 13:38 ` Dmitry Gutov
2022-12-25 10:21 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-24 13:38 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 24/12/2022 11:27, martin rudalics wrote:
> > I called set-face-attributes 8 times, might have got a little
> over-enthusiastic.
>
> Thanks. It didn't harm. IIUC the problem is in x_new_font. With the
> attached please do a few calls again and post the contents of *foo*.
Here you go:
x_new_font .. ascent .. 30 .. descent .. 6 .. line_height .. 36
adjust_frame_size .. pixel_height .. 25 .. text_height .. 24
adjust_frame_size .. pixel_height .. 900 .. text_height .. 900
adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
adjust_frame_size .. pixel_height .. 1296 .. text_height .. 1296
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height ..
43 .. height_inc .. 18
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height ..
84 .. height_inc .. 18
x_new_font .. ascent .. 37 .. descent .. 8 .. line_height .. 45
xg_wm_set_size_hint .. line_height & scale .. 45 .. 2 .. base_height ..
88 .. height_inc .. 22
adjust_frame_size .. pixel_height .. 1584 .. text_height .. 1584
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
xg_wm_set_size_hint .. line_height & scale .. 37 .. 2 .. base_height ..
84 .. height_inc .. 18
adjust_frame_size .. pixel_height .. 1260 .. text_height .. 1260
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 1224 .. text_height .. 1224
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 1188 .. text_height .. 1188
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 1152 .. text_height .. 1152
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 1116 .. text_height .. 1116
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 1080 .. text_height .. 1080
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 1044 .. text_height .. 1044
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 1008 .. text_height .. 1008
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 972 .. text_height .. 972
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 936 .. text_height .. 936
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. pixel_height .. 900 .. text_height .. 900
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-24 13:38 ` Dmitry Gutov
@ 2022-12-25 10:21 ` martin rudalics
2022-12-25 13:01 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-25 10:21 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]
> adjust_frame_size .. pixel_height .. 1260 .. text_height .. 1260
> x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
> adjust_frame_size .. pixel_height .. 1224 .. text_height .. 1224
> x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
> adjust_frame_size .. pixel_height .. 1188 .. text_height .. 1188
> x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
FWIW I can't see anything wrong with the font. From the earlier
xg_frame_set_char_size, visible, PS=1408x1188, XS=1408x1184
ConfigureNotify, PS=1408x1188, XS=1408x1152
xg_frame_resized, changed, PS=1408x1188, XS=1408x1152
I can only tell that, for example, we want to resize the frame from
1408x1188 to 1408x1184 pixels but the ensuing ConfigureNotify tells us
that mutter has sized us down to 1408x1152 pixels (that's the -36
increment you see every time) and we comply. I have no idea why that
should happen - after all 1184 is (* 37 32) so it's rather the earlier
1188 that's wrong here. But we've also set the base height to 84 and a
height increment of 18 which are both suspicious.
Anyway: I attach a new patch to shed more light on this. Three
'set-face-attribute' iterations suffice, post me the contents of *foo*
please.
Thanks, martin
[-- Attachment #2: Gutov.diff --]
[-- Type: text/x-patch, Size: 3924 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..eae0b6127b 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -718,6 +718,18 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
new_text_height = FRAME_PIXEL_TO_TEXT_HEIGHT (f, new_native_height);
new_text_lines = new_text_height / unit_height;
+ call7 (Qfoo_it, intern ("adjust_frame_size_1"),
+ intern ("new_text_height"), make_fixnum (new_text_height),
+ intern ("old_native_height"), make_fixnum (old_native_height),
+ intern ("text_to_pixel"),
+ make_fixnum (FRAME_TEXT_TO_PIXEL_HEIGHT (f, new_text_height)));
+
+ call8 (Qfoo_it,
+ intern (" top_margin"), make_fixnum (FRAME_TOP_MARGIN_HEIGHT (f)),
+ intern ("scroll_bar"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("2*border"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern (" min_inner_height"), make_fixnum (min_inner_height));
+
if (FRAME_WINDOW_P (f)
&& f->can_set_window_size
/* For inhibit == 1 call the window_size_hook only if a native
@@ -906,6 +918,10 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ call5 (Qfoo_it, intern ("adjust_frame_size_2"),
+ intern ("pixel_height"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("text_height"), make_fixnum (FRAME_TEXT_HEIGHT (f)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..3a6d14b3a9 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2028,6 +2028,11 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call8 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height & scale"),
+ make_fixnum (FRAME_LINE_HEIGHT (f)), make_fixnum (scale),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..a701bae9af 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26175,6 +26175,11 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
get_font_ascent_descent (font, &font_ascent, &font_descent);
FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
+ call7 (Qfoo_it, intern ("x_new_font"),
+ intern ("ascent"), make_fixnum (font_ascent),
+ intern ("descent"), make_fixnum (font_descent),
+ intern ("line_height"), make_fixnum (FRAME_LINE_HEIGHT (f)));
+
#ifndef USE_X_TOOLKIT
FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
#endif
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-25 10:21 ` martin rudalics
@ 2022-12-25 13:01 ` Dmitry Gutov
2022-12-25 16:07 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-25 13:01 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 25/12/2022 12:21, martin rudalics wrote:
> FWIW I can't see anything wrong with the font. From the earlier
>
> xg_frame_set_char_size, visible, PS=1408x1188, XS=1408x1184
> ConfigureNotify, PS=1408x1188, XS=1408x1152
> xg_frame_resized, changed, PS=1408x1188, XS=1408x1152
>
> I can only tell that, for example, we want to resize the frame from
> 1408x1188 to 1408x1184 pixels but the ensuing ConfigureNotify tells us
> that mutter has sized us down to 1408x1152 pixels (that's the -36
> increment you see every time) and we comply. I have no idea why that
> should happen - after all 1184 is (* 37 32) so it's rather the earlier
> 1188 that's wrong here. But we've also set the base height to 84 and a
> height increment of 18 which are both suspicious.
>
> Anyway: I attach a new patch to shed more light on this. Three
> 'set-face-attribute' iterations suffice, post me the contents of *foo*
> please.
Done, here:
x_new_font .. ascent .. 30 .. descent .. 6 .. line_height .. 36
adjust_frame_size_1 .. new_text_height .. 24 .. old_native_height .. 25
.. text_to_pixel .. 25
top_margin .. 1 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 2
adjust_frame_size_2 .. pixel_height .. 25 .. text_height .. 24
adjust_frame_size_1 .. new_text_height .. 900 .. old_native_height .. 25
.. text_to_pixel .. 900
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 72
adjust_frame_size_2 .. pixel_height .. 900 .. text_height .. 900
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
900 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 72
adjust_frame_size_2 .. pixel_height .. 1296 .. text_height .. 1296
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 180
adjust_frame_size_2 .. pixel_height .. 1296 .. text_height .. 1296
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 180
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 180
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 180
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 72
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 180
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 72
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height ..
43 .. height_inc .. 18
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 72
adjust_frame_size_1 .. new_text_height .. 1296 .. old_native_height ..
1296 .. text_to_pixel .. 1296
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 180
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height ..
84 .. height_inc .. 18
x_new_font .. ascent .. 37 .. descent .. 8 .. line_height .. 45
adjust_frame_size_1 .. new_text_height .. 1620 .. old_native_height ..
1296 .. text_to_pixel .. 1620
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 225
xg_wm_set_size_hint .. line_height & scale .. 45 .. 2 .. base_height ..
88 .. height_inc .. 22
adjust_frame_size_1 .. new_text_height .. 1584 .. old_native_height ..
1296 .. text_to_pixel .. 1584
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 90
adjust_frame_size_2 .. pixel_height .. 1584 .. text_height .. 1584
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size_1 .. new_text_height .. 1295 .. old_native_height ..
1584 .. text_to_pixel .. 1295
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 185
xg_wm_set_size_hint .. line_height & scale .. 37 .. 2 .. base_height ..
84 .. height_inc .. 18
adjust_frame_size_1 .. new_text_height .. 1260 .. old_native_height ..
1584 .. text_to_pixel .. 1260
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 74
adjust_frame_size_2 .. pixel_height .. 1260 .. text_height .. 1260
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size_1 .. new_text_height .. 1258 .. old_native_height ..
1260 .. text_to_pixel .. 1258
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 185
adjust_frame_size_1 .. new_text_height .. 1224 .. old_native_height ..
1260 .. text_to_pixel .. 1224
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 74
adjust_frame_size_2 .. pixel_height .. 1224 .. text_height .. 1224
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size_1 .. new_text_height .. 1221 .. old_native_height ..
1224 .. text_to_pixel .. 1221
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 185
adjust_frame_size_1 .. new_text_height .. 1188 .. old_native_height ..
1224 .. text_to_pixel .. 1188
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 74
adjust_frame_size_2 .. pixel_height .. 1188 .. text_height .. 1188
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size_1 .. new_text_height .. 1184 .. old_native_height ..
1188 .. text_to_pixel .. 1184
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 185
adjust_frame_size_1 .. new_text_height .. 1152 .. old_native_height ..
1188 .. text_to_pixel .. 1152
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 74
adjust_frame_size_2 .. pixel_height .. 1152 .. text_height .. 1152
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size_1 .. new_text_height .. 1147 .. old_native_height ..
1152 .. text_to_pixel .. 1147
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 185
adjust_frame_size_1 .. new_text_height .. 1116 .. old_native_height ..
1152 .. text_to_pixel .. 1116
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 74
adjust_frame_size_2 .. pixel_height .. 1116 .. text_height .. 1116
adjust_frame_size_1 .. new_text_height .. 1116 .. old_native_height ..
1116 .. text_to_pixel .. 1116
top_margin .. 0 .. scroll_bar .. 0 .. 2*border .. 0 ..
min_inner_height .. 185
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-25 13:01 ` Dmitry Gutov
@ 2022-12-25 16:07 ` martin rudalics
2022-12-25 16:52 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-25 16:07 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
> Done, here:
Still tapping in the dark. One other possibility I see is that we
somehow mess things up with the menu or tool bar. Next patch, three
iterations suffice, please post contents of *foo*.
Thanks, martin
[-- Attachment #2: Gutov.diff --]
[-- Type: text/x-patch, Size: 3788 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..e4f3c1c559 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,12 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ call7 (Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old pixels/lines"), make_fixnum (old_native_height),
+ make_fixnum (old_text_lines),
+ intern ("new pixels/lines"), make_fixnum (new_native_height),
+ make_fixnum (new_text_lines));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..1219a148cc 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1972,8 +1972,7 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
- + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
+ base_height = FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
size_hints.base_width = base_width;
size_hints.base_height = base_height;
@@ -2028,6 +2027,13 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call8 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height & scale"),
+ make_fixnum (FRAME_LINE_HEIGHT (f)), make_fixnum (scale),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
+ call4 (Qfoo_it, intern (" menubar_height"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar_height"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..a701bae9af 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26175,6 +26175,11 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
get_font_ascent_descent (font, &font_ascent, &font_descent);
FRAME_LINE_HEIGHT (f) = font_ascent + font_descent;
+ call7 (Qfoo_it, intern ("x_new_font"),
+ intern ("ascent"), make_fixnum (font_ascent),
+ intern ("descent"), make_fixnum (font_descent),
+ intern ("line_height"), make_fixnum (FRAME_LINE_HEIGHT (f)));
+
#ifndef USE_X_TOOLKIT
FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
#endif
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-25 16:07 ` martin rudalics
@ 2022-12-25 16:52 ` Dmitry Gutov
2022-12-26 9:10 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-25 16:52 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 25/12/2022 18:07, martin rudalics wrote:
> > Done, here:
>
> Still tapping in the dark. One other possibility I see is that we
> somehow mess things up with the menu or tool bar. Next patch, three
> iterations suffice, please post contents of *foo*.
Aaand, here you go:
x_new_font .. ascent .. 30 .. descent .. 6 .. line_height .. 36
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines ..
25 .. 24
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines ..
900 .. 25
adjust_frame_size .. old pixels/lines .. 900 .. 25 .. new pixels/lines
.. 1296 .. 36
adjust_frame_size .. old pixels/lines .. 1296 .. 36 .. new pixels/lines
.. 1296 .. 36
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height ..
25 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 0
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height ..
66 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 82
x_new_font .. ascent .. 37 .. descent .. 8 .. line_height .. 45
xg_wm_set_size_hint .. line_height & scale .. 45 .. 2 .. base_height ..
66 .. height_inc .. 22
menubar_height .. 50 .. toolbar_height .. 82
adjust_frame_size .. old pixels/lines .. 1296 .. 36 .. new pixels/lines
.. 1584 .. 35
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
xg_wm_set_size_hint .. line_height & scale .. 37 .. 2 .. base_height ..
66 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 82
adjust_frame_size .. old pixels/lines .. 1584 .. 35 .. new pixels/lines
.. 1260 .. 34
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. old pixels/lines .. 1260 .. 34 .. new pixels/lines
.. 1224 .. 33
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. old pixels/lines .. 1224 .. 33 .. new pixels/lines
.. 1188 .. 32
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. old pixels/lines .. 1188 .. 32 .. new pixels/lines
.. 1152 .. 31
x_new_font .. ascent .. 31 .. descent .. 6 .. line_height .. 37
adjust_frame_size .. old pixels/lines .. 1152 .. 31 .. new pixels/lines
.. 1116 .. 30
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-22 7:18 ` Eli Zaretskii
@ 2022-12-25 22:42 ` Gregory Heytings
0 siblings, 0 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-25 22:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> So this result from Dmitry:
>
>>>> It's a weird scenario, but evaluating this in 'emacs -Q' will make
>>>> characters render more narrowly (and a little shorter) than it did
>>>> previously:
>>>>
>>>> (set-face-attribute 'default nil :height 110 :family "Inconsolata_dz")
>>>>
>>>> See the attached screenshot with comparison (master is on the left).
>>>
>>> Indeed, weird. What does the below show?
>>>
>>> M-: (face-font 'default) RET
>>>
>>> after you evaluate the above in "emacs -Q"?
>>
>> "-DAMA-Ubuntu Condensed-regular-normal-normal-*-29-*-*-*-*-0-iso10646-1"
>
> is not reproduced on your system, is that right?
>
Correct. But I don't have the Ubuntu Condensed font installed, so it's
not surprising that this result cannot be reproduced exactly. It does not
reproduce approximately either, in the sense that (set-face-attribute
'default nil :height 110 :family "Inconsolata_dz") does not change the
font at all, not even temporarily.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-22 7:20 ` Eli Zaretskii
@ 2022-12-25 22:42 ` Gregory Heytings
2022-12-26 12:20 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Gregory Heytings @ 2022-12-25 22:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, larsi, 52493, rpluim, dgutov
>>> 2. I start 'emacs -Q' and evaluate (set-face-attribute 'default nil
>>> :height 105 :family "Inconsolata_dz") in *scratch*. I get that
>>> weird-looking font that blinks briefly in scenario 1. 'M-x
>>> describe-face RET default' reports "Ubuntu Condensed" as family.
>>
>> Again, can you try to evaluate (set-face-attribute 'default nil :height
>> 110 :font "Inconsolata_dz") (with ":font", not ":family") instead, and
>> tell us what happens?
>>
>> Can you try your other recipes, using ":font" where you used ":family",
>> and tell us whether what happens is what you expected?
>
> What is the significance of using :font instead of :family in these
> cases, for the purpose of discussing and investigating this issue?
>
The two reasons are:
1. IME passing an font name in the :font attribute gives in general better
results than passing a font name in the :family attribute. (And Dmitry
confirmed that the problem he was facing was mostly solved with that
change.)
2. Dmitry's specific recipe, which worked with Emacs 28, cannot work
anymore with Emacs 29 because of dae3c4e89b.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-22 20:32 ` Dmitry Gutov
@ 2022-12-25 22:42 ` Gregory Heytings
2022-12-26 0:46 ` Gregory Heytings
2022-12-27 1:58 ` Dmitry Gutov
0 siblings, 2 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-25 22:42 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
>
> Almost good, with one problem jumping out, however:
>
> - Evaluate (set-face-attribute 'default nil :height 105 :weight 'regular
> :font "Inconsolata LGC"), result:
>
> Family: Inconsolata LGC
> Foundry: PfEd
> Width: normal
> Height: 105
> Weight: regular
>
> - Then I evaluate (set-face-attribute 'default nil :height 110 :weight
> 'semi-light :font "Cascadia Mono"), the result is:
>
> Family: Inconsolata LGC
> Foundry: PfEd
> Width: normal
> Height: 105
> Weight: regular
>
You mean
Family: Cascadia Mono
Foundry: SAJA
Width: normal
Height: 105
Weight: regular
right? That is, the :weight 'semi-light attribute is not obeyed? I
observe the same behavior with Emacs 26-27-28, so at least it's not a
regression.
>
> If I, however, follow (set-face-attribute 'default nil :height 105
> :weight 'regular :font "Inconsolata LGC") with (set-face-attribute
> 'default nil :height 110 :weight 'semi-light :family "Cascadia Mono") --
> note :family, the resulting font looks fine, and is described as:
>
> Family: Cascadia Mono
> Foundry: SAJA
> Width: normal
> Height: 109
> Weight: semi-light
>
Indeed. A better way to do what you want is to move the :font attribute
to the front:
(set-face-attribute 'default nil :font "Inconsolata LGC" :height 105 :weight 'regular)
(set-face-attribute 'default nil :font "Cascadia Mono" :height 105 :weight 'semi-light)
>
> Starting the session with (set-face-attribute 'default nil :height 110
> :weight 'semi-light :font "Cascadia Mono") also has this problem.
>
Likewise: move the :font attribute to the front and it will work.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2021-12-17 0:49 ` Dmitry Gutov
2021-12-17 7:37 ` Eli Zaretskii
2021-12-17 19:17 ` martin rudalics
@ 2022-12-25 22:52 ` Gregory Heytings
2 siblings, 0 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-25 22:52 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: Eli Zaretskii, 52493, rpluim
>
> This is one additional piece of misbehavior (perhaps unrelated) that
> really caught my eye during these tests:
>
> When I evaluate
>
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>
> (this variation of the font doesn't have the original problem), the
> height of the window shrinks, unless the window is maximized.
>
FWIW, I cannot reproduce this part of your bug report here.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-25 22:42 ` Gregory Heytings
@ 2022-12-26 0:46 ` Gregory Heytings
2022-12-26 12:25 ` Eli Zaretskii
2022-12-26 15:48 ` Dmitry Gutov
2022-12-27 1:58 ` Dmitry Gutov
1 sibling, 2 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-26 0:46 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
[-- Attachment #1: Type: text/plain, Size: 208 bytes --]
By the way, I did not realize that the docstring of 'set-face-attribute'
says nothing about the evaluation order of its arguments. I suggest the
attached patch.
Eli, is this okay for the release branch?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Clarify-evaluation-order-in-set-face-attribute.patch --]
[-- Type: text/x-diff; name=Clarify-evaluation-order-in-set-face-attribute.patch, Size: 1433 bytes --]
From 738f8172127b5eb180d97ba793ad77477c00b494 Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Mon, 26 Dec 2022 00:42:23 +0000
Subject: [PATCH] Clarify evaluation order in 'set-face-attribute'
* lisp/faces.el (set-face-attribute): Add a paragraph to clarify
in what order the arguments are evaluated, and the consequences of
that evaluation order.
---
lisp/faces.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lisp/faces.el b/lisp/faces.el
index 29e26e4c651..8cdc739fa7c 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -690,6 +690,17 @@ set-face-attribute
what the FACE's face spec says, call this function with FRAME set to
t and the ATTRIBUTE's value set to `unspecified'.
+Note that the ATTRIBUTE VALUE pairs are evaluated in the order
+they are specified, except the `:family' and `:foundry'
+attributes which are evaluated first. This means both that only
+the last VALUE of a given ATTRIBUTE will be used, and that in
+some cases a different order will give different results. For
+example, when `:weight' is placed before `:font', the weight
+value is applied to the current font of the face and might be
+rounded to the closest available weight of that font, whereas
+when `:font' is placed before `:weight' the weight value is
+applied to the specified font.
+
The following attributes are recognized:
`:family'
--
2.35.1
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-25 16:52 ` Dmitry Gutov
@ 2022-12-26 9:10 ` martin rudalics
2022-12-27 23:15 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-26 9:10 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 528 bytes --]
> Aaand, here you go:
So far I'm pretty sure that we have some rounding problem here - maybe
due to scaling. The last version of my patch is attached, please use
that for further experiments.
Now first do what you have done so far (three iterations) and post the
results.
Next, if possible, try to turn scaling off, do the same experiments and
post the results.
Finally, with scaling turned on again, start Emacs with
--eval "(setq frame-resize-pixelwise t)"
do the same experiments and post the results.
Thanks, martin
[-- Attachment #2: Gutov.diff --]
[-- Type: text/x-patch, Size: 4892 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..4501c8dc14 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,14 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_height != new_native_height
+ || old_text_lines != new_text_lines)
+ call7 (Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old pixels/lines"), make_fixnum (old_native_height),
+ make_fixnum (old_text_lines),
+ intern ("new pixels/lines"), make_fixnum (new_native_height),
+ make_fixnum (new_text_lines));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..c201669a49 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,13 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ call8 (Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("req"), make_fixnum (f->new_height),
+ intern ("con/text"), make_fixnum (height),
+ make_fixnum (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1317,6 +1324,14 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ call7 (Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("arg"), make_fixnum (height),
+ intern ("new"), make_fixnum (f->new_height));
+ call4 (Qfoo_it,
+ intern (" outer"), make_fixnum (outer_height),
+ intern ("gheight"), make_fixnum (gheight));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -2028,6 +2043,13 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call8 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height & scale"),
+ make_fixnum (FRAME_LINE_HEIGHT (f)), make_fixnum (scale),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
+ call4 (Qfoo_it, intern (" menubar_height"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar_height"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..277b53043a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26197,9 +26197,17 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ call7 (Qfoo_it, intern ("x_new_font"),
+ intern ("line_height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("lines"), make_fixnum (FRAME_LINES (f)),
+ intern ("new_text_height"),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f)));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-25 22:42 ` Gregory Heytings
@ 2022-12-26 12:20 ` Eli Zaretskii
2022-12-26 14:05 ` Gregory Heytings
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-26 12:20 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Sun, 25 Dec 2022 22:42:40 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: dgutov@yandex.ru, larsi@gnus.org, rudalics@gmx.at, rpluim@gmail.com,
> 52493@debbugs.gnu.org
>
> > What is the significance of using :font instead of :family in these
> > cases, for the purpose of discussing and investigating this issue?
> >
>
> The two reasons are:
>
> 1. IME passing an font name in the :font attribute gives in general better
> results than passing a font name in the :family attribute. (And Dmitry
> confirmed that the problem he was facing was mostly solved with that
> change.)
It is strange, because if the family is simply the name of the font,
it should be interpreted the same, because what else could family mean
in that case?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-26 0:46 ` Gregory Heytings
@ 2022-12-26 12:25 ` Eli Zaretskii
2022-12-29 22:45 ` Gregory Heytings
2022-12-26 15:48 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-26 12:25 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Mon, 26 Dec 2022 00:46:30 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: rudalics@gmx.at, Eli Zaretskii <eliz@gnu.org>, 52493@debbugs.gnu.org,
> Lars Ingebrigtsen <larsi@gnus.org>, rpluim@gmail.com
>
> --- a/lisp/faces.el
> +++ b/lisp/faces.el
> @@ -690,6 +690,17 @@ set-face-attribute
> what the FACE's face spec says, call this function with FRAME set to
> t and the ATTRIBUTE's value set to `unspecified'.
>
> +Note that the ATTRIBUTE VALUE pairs are evaluated in the order
> +they are specified, except the `:family' and `:foundry'
> +attributes which are evaluated first. This means both that only
> +the last VALUE of a given ATTRIBUTE will be used, and that in
> +some cases a different order will give different results. For
> +example, when `:weight' is placed before `:font', the weight
> +value is applied to the current font of the face and might be
> +rounded to the closest available weight of that font, whereas
> +when `:font' is placed before `:weight' the weight value is
> +applied to the specified font.
The text is OK, but please put this in the manual, not in the doc
string. If we want something to this effect in the doc string, let's
just have the first sentence there, and then a reference to the
manual.
Thanks.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-26 12:20 ` Eli Zaretskii
@ 2022-12-26 14:05 ` Gregory Heytings
0 siblings, 0 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-26 14:05 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, larsi, 52493, rpluim, dgutov
>> IME passing an font name in the :font attribute gives in general better
>> results than passing a font name in the :family attribute. (And Dmitry
>> confirmed that the problem he was facing was mostly solved with that
>> change.)
>
> It is strange, because if the family is simply the name of the font, it
> should be interpreted the same, because what else could family mean in
> that case?
>
In theory, yes, but in practice the code paths are different in both
cases. The :font attribute gets a special treatment in
Finternal_set_lisp_face_attribute, which is more "direct" than the
treatment of the :family attribute, and (again IME) gives better results.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-26 0:46 ` Gregory Heytings
2022-12-26 12:25 ` Eli Zaretskii
@ 2022-12-26 15:48 ` Dmitry Gutov
2022-12-26 16:19 ` Gregory Heytings
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-26 15:48 UTC (permalink / raw)
To: Gregory Heytings
Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
On 26/12/2022 02:46, Gregory Heytings wrote:
> By the way, I did not realize that the docstring of 'set-face-attribute'
> says nothing about the evaluation order of its arguments. I suggest the
> attached patch.
Are we sure that having order-dependent behavior is a good idea?
Since all args are available at the time of evaluation, wouldn't it be
better to handle :font and/or :family before all the others?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-26 15:48 ` Dmitry Gutov
@ 2022-12-26 16:19 ` Gregory Heytings
2022-12-27 2:04 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Gregory Heytings @ 2022-12-26 16:19 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
[-- Attachment #1: Type: text/plain, Size: 816 bytes --]
>> By the way, I did not realize that the docstring of
>> 'set-face-attribute' says nothing about the evaluation order of its
>> arguments. I suggest the attached patch.
>
> Are we sure that having order-dependent behavior is a good idea?
>
I did not design that function, that's how it works. But given how
intricate the face machinery is, I'm not sure it's possible to do much
better.
>
> Since all args are available at the time of evaluation, wouldn't it be
> better to handle :font and/or :family before all the others?
>
You may have seen in the attached patch that :family is indeed handled
before all other attributes, but not :font.
Can you please confirm that the recipes you sent are working as expected
when you place the :font attribute before all other attributes?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-25 22:42 ` Gregory Heytings
2022-12-26 0:46 ` Gregory Heytings
@ 2022-12-27 1:58 ` Dmitry Gutov
2022-12-28 15:19 ` Gregory Heytings
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-27 1:58 UTC (permalink / raw)
To: Gregory Heytings
Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
On 26/12/2022 00:42, Gregory Heytings wrote:
>>
>> Almost good, with one problem jumping out, however:
>>
>> - Evaluate (set-face-attribute 'default nil :height 105 :weight
>> 'regular :font "Inconsolata LGC"), result:
>>
>> Family: Inconsolata LGC
>> Foundry: PfEd
>> Width: normal
>> Height: 105
>> Weight: regular
>>
>> - Then I evaluate (set-face-attribute 'default nil :height 110 :weight
>> 'semi-light :font "Cascadia Mono"), the result is:
>>
>> Family: Inconsolata LGC
>> Foundry: PfEd
>> Width: normal
>> Height: 105
>> Weight: regular
>>
>
> You mean
>
> Family: Cascadia Mono
> Foundry: SAJA
> Width: normal
> Height: 105
> Weight: regular
>
> right? That is, the :weight 'semi-light attribute is not obeyed? I
> observe the same behavior with Emacs 26-27-28, so at least it's not a
> regression.
It's not there if I use :family, though. So if from now on we recommend
people use :font where whey might have used :family in the past, this
might be perceived as a regression.
>> Starting the session with (set-face-attribute 'default nil :height 110
>> :weight 'semi-light :font "Cascadia Mono") also has this problem.
>>
>
> Likewise: move the :font attribute to the front and it will work.
Thanks, that works fine.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-26 16:19 ` Gregory Heytings
@ 2022-12-27 2:04 ` Dmitry Gutov
2022-12-28 15:20 ` Gregory Heytings
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-27 2:04 UTC (permalink / raw)
To: Gregory Heytings
Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
On 26/12/2022 18:19, Gregory Heytings wrote:
>
>>> By the way, I did not realize that the docstring of
>>> 'set-face-attribute' says nothing about the evaluation order of its
>>> arguments. I suggest the attached patch.
>>
>> Are we sure that having order-dependent behavior is a good idea?
>>
>
> I did not design that function, that's how it works. But given how
> intricate the face machinery is, I'm not sure it's possible to do much
> better.
It does feel a little odd, though. Could you explain why :family does
get evaluated first, but :font does not? And yet, it's better
recommended to use :font?
I'm not saying these are regressions to be fixed now (Emacs 29 is too
near), but maybe a better design is possible and not too difficult to
transition to later.
>> Since all args are available at the time of evaluation, wouldn't it be
>> better to handle :font and/or :family before all the others?
>>
>
> You may have seen in the attached patch that :family is indeed handled
> before all other attributes, but not :font.
>
> Can you please confirm that the recipes you sent are working as expected
> when you place the :font attribute before all other attributes?
They seem to, thank you.
Except for the frame-height-shrinking one, but that's a separate story.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-26 9:10 ` martin rudalics
@ 2022-12-27 23:15 ` Dmitry Gutov
2022-12-28 10:08 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-27 23:15 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 744 bytes --]
On 26/12/2022 11:10, martin rudalics wrote:
> > Aaand, here you go:
>
> So far I'm pretty sure that we have some rounding problem here - maybe
> due to scaling. The last version of my patch is attached, please use
> that for further experiments.
>
> Now first do what you have done so far (three iterations) and post the
> results.
>
> Next, if possible, try to turn scaling off, do the same experiments and
> post the results.
>
> Finally, with scaling turned on again, start Emacs with
>
> --eval "(setq frame-resize-pixelwise t)"
>
> do the same experiments and post the results.
Here you go, three attachments.
As you previously guessed, the effect didn't show up when the scaling
was off, or when resize-pixelwise was enabled.
[-- Attachment #2: foo-resize-pixelwise.txt --]
[-- Type: text/plain, Size: 2226 bytes --]
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines .. 25 .. 24
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines .. 900 .. 25
adjust_frame_size .. old pixels/lines .. 900 .. 25 .. new pixels/lines .. 1296 .. 36
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. 1296
outer .. 698 .. gheight .. 200
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. 1296
outer .. 673 .. gheight .. 200
xg_frame_resized .. old .. 1296 .. req .. 1296 .. con/text .. 1346 .. 1346
xg_frame_resized .. old .. 1296 .. req .. 1346 .. con/text .. 1296 .. 1296
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height .. 43 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 0
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height .. 84 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. -1
outer .. 714 .. gheight .. 673
x_new_font .. line_height .. 45 .. lines .. 36 .. new_text_height .. 1620
xg_wm_set_size_hint .. line_height & scale .. 45 .. 2 .. base_height .. 88 .. height_inc .. 0
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1296 .. arg .. 1620 .. new .. -1
outer .. 876 .. gheight .. 714
xg_frame_resized .. old .. 1296 .. req .. -1 .. con/text .. 1620 .. 1620
adjust_frame_size .. old pixels/lines .. 1296 .. 36 .. new pixels/lines .. 1620 .. 36
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
xg_wm_set_size_hint .. line_height & scale .. 37 .. 2 .. base_height .. 84 .. height_inc .. 0
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1620 .. arg .. 1332 .. new .. -1
outer .. 732 .. gheight .. 876
xg_frame_resized .. old .. 1620 .. req .. -1 .. con/text .. 1332 .. 1332
adjust_frame_size .. old pixels/lines .. 1620 .. 36 .. new pixels/lines .. 1332 .. 36
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
[-- Attachment #3: foo-without-scaling.txt --]
[-- Type: text/plain, Size: 1954 bytes --]
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines .. 25 .. 24
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines .. 450 .. 25
adjust_frame_size .. old pixels/lines .. 450 .. 25 .. new pixels/lines .. 648 .. 36
xg_frame_set_char_size .. old .. 648 .. arg .. 648 .. new .. 648
outer .. 673 .. gheight .. 200
xg_wm_set_size_hint .. line_height & scale .. 18 .. 1 .. base_height .. 43 .. height_inc .. 18
menubar_height .. 25 .. toolbar_height .. 0
xg_wm_set_size_hint .. line_height & scale .. 18 .. 1 .. base_height .. 84 .. height_inc .. 18
menubar_height .. 25 .. toolbar_height .. 41
xg_frame_set_char_size .. old .. 648 .. arg .. 648 .. new .. 648
outer .. 714 .. gheight .. 673
x_new_font .. line_height .. 22 .. lines .. 36 .. new_text_height .. 792
xg_wm_set_size_hint .. line_height & scale .. 22 .. 1 .. base_height .. 88 .. height_inc .. 22
menubar_height .. 25 .. toolbar_height .. 41
xg_frame_set_char_size .. old .. 648 .. arg .. 792 .. new .. 648
outer .. 858 .. gheight .. 714
xg_frame_resized .. old .. 648 .. req .. 648 .. con/text .. 792 .. 792
adjust_frame_size .. old pixels/lines .. 648 .. 36 .. new pixels/lines .. 792 .. 36
x_new_font .. line_height .. 20 .. lines .. 36 .. new_text_height .. 720
xg_wm_set_size_hint .. line_height & scale .. 20 .. 1 .. base_height .. 86 .. height_inc .. 20
menubar_height .. 25 .. toolbar_height .. 41
xg_frame_set_char_size .. old .. 792 .. arg .. 720 .. new .. -1
outer .. 786 .. gheight .. 858
xg_frame_resized .. old .. 792 .. req .. -1 .. con/text .. 720 .. 720
adjust_frame_size .. old pixels/lines .. 792 .. 36 .. new pixels/lines .. 720 .. 36
x_new_font .. line_height .. 20 .. lines .. 36 .. new_text_height .. 720
x_new_font .. line_height .. 20 .. lines .. 36 .. new_text_height .. 720
x_new_font .. line_height .. 20 .. lines .. 36 .. new_text_height .. 720
x_new_font .. line_height .. 20 .. lines .. 36 .. new_text_height .. 720
[-- Attachment #4: foo-with-scaling.txt --]
[-- Type: text/plain, Size: 3260 bytes --]
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines .. 25 .. 24
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines .. 900 .. 25
adjust_frame_size .. old pixels/lines .. 900 .. 25 .. new pixels/lines .. 1296 .. 36
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. 1296
outer .. 698 .. gheight .. 200
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. 1296
outer .. 673 .. gheight .. 200
xg_frame_resized .. old .. 1296 .. req .. 1296 .. con/text .. 1346 .. 1346
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height .. 43 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 0
xg_frame_resized .. old .. 1296 .. req .. 1346 .. con/text .. 1296 .. 1296
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height .. 84 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. -1
outer .. 714 .. gheight .. 673
x_new_font .. line_height .. 45 .. lines .. 36 .. new_text_height .. 1620
xg_wm_set_size_hint .. line_height & scale .. 45 .. 2 .. base_height .. 88 .. height_inc .. 22
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1296 .. arg .. 1620 .. new .. -1
outer .. 876 .. gheight .. 714
xg_frame_resized .. old .. 1296 .. req .. -1 .. con/text .. 1584 .. 1584
adjust_frame_size .. old pixels/lines .. 1296 .. 36 .. new pixels/lines .. 1584 .. 35
x_new_font .. line_height .. 37 .. lines .. 35 .. new_text_height .. 1295
xg_wm_set_size_hint .. line_height & scale .. 37 .. 2 .. base_height .. 84 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1584 .. arg .. 1295 .. new .. -1
outer .. 713 .. gheight .. 858
xg_frame_resized .. old .. 1584 .. req .. -1 .. con/text .. 1260 .. 1260
adjust_frame_size .. old pixels/lines .. 1584 .. 35 .. new pixels/lines .. 1260 .. 34
x_new_font .. line_height .. 37 .. lines .. 34 .. new_text_height .. 1258
xg_frame_set_char_size .. old .. 1260 .. arg .. 1258 .. new .. -1
outer .. 695 .. gheight .. 696
xg_frame_resized .. old .. 1260 .. req .. -1 .. con/text .. 1224 .. 1224
adjust_frame_size .. old pixels/lines .. 1260 .. 34 .. new pixels/lines .. 1224 .. 33
x_new_font .. line_height .. 37 .. lines .. 33 .. new_text_height .. 1221
xg_frame_set_char_size .. old .. 1224 .. arg .. 1221 .. new .. -1
outer .. 676 .. gheight .. 678
xg_frame_resized .. old .. 1224 .. req .. -1 .. con/text .. 1188 .. 1188
adjust_frame_size .. old pixels/lines .. 1224 .. 33 .. new pixels/lines .. 1188 .. 32
x_new_font .. line_height .. 37 .. lines .. 32 .. new_text_height .. 1184
xg_frame_set_char_size .. old .. 1188 .. arg .. 1184 .. new .. -1
outer .. 658 .. gheight .. 660
xg_frame_resized .. old .. 1188 .. req .. -1 .. con/text .. 1152 .. 1152
adjust_frame_size .. old pixels/lines .. 1188 .. 32 .. new pixels/lines .. 1152 .. 31
x_new_font .. line_height .. 37 .. lines .. 31 .. new_text_height .. 1147
xg_frame_set_char_size .. old .. 1152 .. arg .. 1147 .. new .. -1
outer .. 639 .. gheight .. 642
xg_frame_resized .. old .. 1152 .. req .. -1 .. con/text .. 1116 .. 1116
adjust_frame_size .. old pixels/lines .. 1152 .. 31 .. new pixels/lines .. 1116 .. 30
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-27 23:15 ` Dmitry Gutov
@ 2022-12-28 10:08 ` martin rudalics
2022-12-28 12:31 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-28 10:08 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]
> Here you go, three attachments.
Thank you, they now contain all we need.
> As you previously guessed, the effect didn't show up when the scaling was off, or when resize-pixelwise was enabled.
In both cases we don't scale. Scaling introduces a rounding effect
mutter apparently doesn't like. Take, for example, these lines of
foo-with-scaling.txt produced when we set a new font (actually the first
line belongs to the previous request and is here only to show that we
start with a frame of 35 lines):
adjust_frame_size .. old pixels/lines .. 1296 .. 36 .. new pixels/lines .. 1584 .. 35
x_new_font .. line_height .. 37 .. lines .. 35 .. new_text_height .. 1295
xg_wm_set_size_hint .. line_height & scale .. 37 .. 2 .. base_height .. 84 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1584 .. arg .. 1295 .. new .. -1
outer .. 713 .. gheight .. 858
xg_frame_resized .. old .. 1584 .. req .. -1 .. con/text .. 1260 .. 1260
adjust_frame_size .. old pixels/lines .. 1584 .. 35 .. new pixels/lines .. 1260 .. 34
The base_height value (84 pixels) we calculate here is the sum of the
line_height value, the menubar_height value and the toolbar_height
values divided by the scale factor:
(/ (+ 37 50 82) 2)
height_inc (18) is the line height divided by the scale factor (/ 37 2).
These size hints have mutter expect us to resize our frame to something
like
(+ base_height (* height_inc N))
for some positive integer N. Now we want to resize the frame to
line_height times lines, that is (* 37 35) yielding 1295 pixels.
But (% (/ 1295 2) 18) is not zero and so mutter declines our request
giving us 1260 pixels text height instead. Apparently, mutter starts
with (/ 1295 2) that is 647, 630 is the next multiple of 18 it finds, so
(* 630 2) is the value it concedes us.
So the height we should ask for with scaling is 1296 instead of 1295.
Please try the attached patch - I can't test it here because I don't
scale. If it doesn't work, please post the contents of *foo* as usual.
Thanks, martin
[-- Attachment #2: x_scale_font.diff --]
[-- Type: text/x-patch, Size: 6009 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..4501c8dc14 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,14 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_height != new_native_height
+ || old_text_lines != new_text_lines)
+ call7 (Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old pixels/lines"), make_fixnum (old_native_height),
+ make_fixnum (old_text_lines),
+ intern ("new pixels/lines"), make_fixnum (new_native_height),
+ make_fixnum (new_text_lines));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..681cbcd52c 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,13 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ call8 (Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("req"), make_fixnum (f->new_height),
+ intern ("con/text"), make_fixnum (height),
+ make_fixnum (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1181,23 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ if (FRAME_COLUMN_WIDTH (f) % 2 != 0)
+ {
+ width = FRAME_COLS (f) * (FRAME_COLUMN_WIDTH (f) + 1);
+ outer_width = width + FRAME_TOOLBAR_WIDTH (f);
+ }
+
+ if (FRAME_LINE_HEIGHT (f) % 2 != 0)
+ {
+ height = FRAME_LINES (f) * (FRAME_LINE_HEIGHT (f) + 1);
+ outer_height
+ = height + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f);
+ }
+ }
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,8 +1220,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
xg_wm_set_size_hint (f, 0, 0);
@@ -1317,6 +1341,14 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ call7 (Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("arg"), make_fixnum (height),
+ intern ("new"), make_fixnum (f->new_height));
+ call4 (Qfoo_it,
+ intern (" outer"), make_fixnum (outer_height),
+ intern ("gheight"), make_fixnum (gheight));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -2028,6 +2060,13 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call8 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height & scale"),
+ make_fixnum (FRAME_LINE_HEIGHT (f)), make_fixnum (scale),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
+ call4 (Qfoo_it, intern (" menubar_height"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar_height"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..277b53043a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26197,9 +26197,17 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ call7 (Qfoo_it, intern ("x_new_font"),
+ intern ("line_height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("lines"), make_fixnum (FRAME_LINES (f)),
+ intern ("new_text_height"),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f)));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-28 10:08 ` martin rudalics
@ 2022-12-28 12:31 ` Dmitry Gutov
2022-12-28 17:35 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-28 12:31 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
Hi Martin!
On 28/12/2022 12:08, martin rudalics wrote:
> The base_height value (84 pixels) we calculate here is the sum of the
> line_height value, the menubar_height value and the toolbar_height
> values divided by the scale factor:
>
> (/ (+ 37 50 82) 2)
>
> height_inc (18) is the line height divided by the scale factor (/ 37 2).
>
> These size hints have mutter expect us to resize our frame to something
> like
>
> (+ base_height (* height_inc N))
>
> for some positive integer N. Now we want to resize the frame to
> line_height times lines, that is (* 37 35) yielding 1295 pixels.
>
> But (% (/ 1295 2) 18) is not zero and so mutter declines our request
> giving us 1260 pixels text height instead. Apparently, mutter starts
> with (/ 1295 2) that is 647, 630 is the next multiple of 18 it finds, so
> (* 630 2) is the value it concedes us.
>
> So the height we should ask for with scaling is 1296 instead of 1295.
>
> Please try the attached patch - I can't test it here because I don't
> scale. If it doesn't work, please post the contents of *foo* as usual.
It certainly does work. One of the changes I saw right away is the width
of the frame right after startup with my config increased from 84 to 90
columns. Not sure if it's good or bad, so let's go back to the behavior
with '-Q'.
The height stopped shrinking.
The width started growing. :-D
I don't know if *foo* is helpful here yet, but here you go:
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines ..
25 .. 24
adjust_frame_size .. old pixels/lines .. 25 .. 25 .. new pixels/lines ..
900 .. 25
adjust_frame_size .. old pixels/lines .. 900 .. 25 .. new pixels/lines
.. 1296 .. 36
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. 1296
outer .. 698 .. gheight .. 200
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. 1296
outer .. 673 .. gheight .. 200
xg_frame_resized .. old .. 1296 .. req .. 1296 .. con/text .. 1346 .. 1346
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height ..
43 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 0
xg_frame_resized .. old .. 1296 .. req .. 1346 .. con/text .. 1296 .. 1296
xg_wm_set_size_hint .. line_height & scale .. 36 .. 2 .. base_height ..
84 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1296 .. arg .. 1296 .. new .. -1
outer .. 714 .. gheight .. 673
x_new_font .. line_height .. 45 .. lines .. 36 .. new_text_height .. 1620
xg_wm_set_size_hint .. line_height & scale .. 45 .. 2 .. base_height ..
88 .. height_inc .. 22
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1296 .. arg .. 1656 .. new .. -1
outer .. 894 .. gheight .. 714
xg_frame_resized .. old .. 1296 .. req .. -1 .. con/text .. 1628 .. 1628
adjust_frame_size .. old pixels/lines .. 1296 .. 36 .. new pixels/lines
.. 1628 .. 36
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
xg_wm_set_size_hint .. line_height & scale .. 37 .. 2 .. base_height ..
84 .. height_inc .. 18
menubar_height .. 50 .. toolbar_height .. 82
xg_frame_set_char_size .. old .. 1628 .. arg .. 1368 .. new .. -1
outer .. 750 .. gheight .. 880
xg_frame_resized .. old .. 1628 .. req .. -1 .. con/text .. 1368 .. 1368
adjust_frame_size .. old pixels/lines .. 1628 .. 36 .. new pixels/lines
.. 1368 .. 36
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
xg_frame_set_char_size .. old .. 1368 .. arg .. 1368 .. new .. -1
outer .. 750 .. gheight .. 750
xg_frame_resized .. old .. 1368 .. req .. -1 .. con/text .. 1368 .. 1368
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
xg_frame_set_char_size .. old .. 1368 .. arg .. 1368 .. new .. -1
outer .. 750 .. gheight .. 750
xg_frame_resized .. old .. 1368 .. req .. -1 .. con/text .. 1368 .. 1368
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
xg_frame_set_char_size .. old .. 1368 .. arg .. 1368 .. new .. -1
outer .. 750 .. gheight .. 750
xg_frame_resized .. old .. 1368 .. req .. -1 .. con/text .. 1368 .. 1368
x_new_font .. line_height .. 37 .. lines .. 36 .. new_text_height .. 1332
xg_frame_set_char_size .. old .. 1368 .. arg .. 1368 .. new .. -1
outer .. 750 .. gheight .. 750
xg_frame_resized .. old .. 1368 .. req .. -1 .. con/text .. 1368 .. 1368
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-27 1:58 ` Dmitry Gutov
@ 2022-12-28 15:19 ` Gregory Heytings
0 siblings, 0 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-28 15:19 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
[-- Attachment #1: Type: text/plain, Size: 644 bytes --]
>> That is, the :weight 'semi-light attribute is not obeyed? I observe
>> the same behavior with Emacs 26-27-28, so at least it's not a
>> regression.
>
> It's not there if I use :family, though.
>
Indeed, that's because the :family attribute is evaluated first, and the
:font attribute isn't.
>
> So if from now on we recommend people use :font where they might have
> used :family in the past, this might be perceived as a regression.
>
That's what I would recommend, indeed, but I'm not the one who decides.
The regression would be fixed by adding :font to the attributes that are
evaluated before all others.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-27 2:04 ` Dmitry Gutov
@ 2022-12-28 15:20 ` Gregory Heytings
2022-12-28 17:01 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Gregory Heytings @ 2022-12-28 15:20 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: rudalics, Eli Zaretskii, 52493, Lars Ingebrigtsen, rpluim
[-- Attachment #1: Type: text/plain, Size: 908 bytes --]
>> I did not design that function, that's how it works. But given how
>> intricate the face machinery is, I'm not sure it's possible to do much
>> better.
>
> It does feel a little odd, though. Could you explain why :family does
> get evaluated first, but :font does not?
>
I can't explain that, no. If you look at bug#1127, you'll see that moving
the evaluation of :family and :foundry before other attributes was (in
2008) perceived as a workaround. Apparently that worked well enough, and
it's still there in its original form.
IMO it would make sense to move the evaluation of the :font attribute
before other attributes, for the same reason.
Eli, what do you think of the attached patch?
>
> And yet, it's better recommended to use :font?
>
Again, that's why I'd recommend, but it's not the officially recommended
way of doing things (if such a thing exists).
[-- Attachment #2: Evaluate-font-attribute-earlier-in-set-face-attribut.patch --]
[-- Type: text/x-diff, Size: 2328 bytes --]
From a74dea03d4bd42677e1cc03feaf625c33ca6bfe4 Mon Sep 17 00:00:00 2001
From: Gregory Heytings <gregory@heytings.org>
Date: Wed, 28 Dec 2022 15:16:50 +0000
Subject: [PATCH] Evaluate :font attribute earlier in set-face-attribute
* lisp/faces.el (set-face-attribute): Evaluate the :font attribute
before other attributes when it is specified.
---
lisp/faces.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/lisp/faces.el b/lisp/faces.el
index 29e26e4c651..7320d1f0e03 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -844,20 +844,22 @@ set-face-attribute
(setq args (purecopy args))
(let ((where (if (null frame) 0 frame))
(spec args)
- family foundry orig-family orig-foundry)
+ family foundry orig-family orig-foundry font)
;; If we set the new-frame defaults, this face is modified outside Custom.
(if (memq where '(0 t))
(put (or (get face 'face-alias) face) 'face-modified t))
- ;; If family and/or foundry are specified, set it first. Certain
+ ;; If family, foundry and/or font are specified, set it first. Certain
;; face attributes, e.g. :weight semi-condensed, are not supported
;; in every font. See bug#1127.
(while spec
(cond ((eq (car spec) :family)
(setq family (cadr spec)))
((eq (car spec) :foundry)
- (setq foundry (cadr spec))))
+ (setq foundry (cadr spec)))
+ ((eq (car spec) :font)
+ (setq font (cadr spec))))
(setq spec (cddr spec)))
- (when (or family foundry)
+ (when (or family foundry font)
(when (and (stringp family)
(string-match "\\([^-]*\\)-\\([^-]*\\)" family))
(setq orig-foundry foundry
@@ -875,9 +877,12 @@ set-face-attribute
where))
(when (or (stringp foundry) (eq foundry 'unspecified))
(internal-set-lisp-face-attribute face :foundry (purecopy foundry)
+ where))
+ (when (or (stringp font) (eq font 'unspecified))
+ (internal-set-lisp-face-attribute face :font (purecopy font)
where)))
(while args
- (unless (memq (car args) '(:family :foundry))
+ (unless (memq (car args) '(:family :foundry :font))
(internal-set-lisp-face-attribute face (car args)
(purecopy (cadr args))
where))
--
2.35.1
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-28 15:20 ` Gregory Heytings
@ 2022-12-28 17:01 ` Eli Zaretskii
0 siblings, 0 replies; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-28 17:01 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Wed, 28 Dec 2022 15:20:59 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: rudalics@gmx.at, Eli Zaretskii <eliz@gnu.org>, 52493@debbugs.gnu.org,
> Lars Ingebrigtsen <larsi@gnus.org>, rpluim@gmail.com
>
> > It does feel a little odd, though. Could you explain why :family does
> > get evaluated first, but :font does not?
> >
>
> I can't explain that, no. If you look at bug#1127, you'll see that moving
> the evaluation of :family and :foundry before other attributes was (in
> 2008) perceived as a workaround. Apparently that worked well enough, and
> it's still there in its original form.
>
> IMO it would make sense to move the evaluation of the :font attribute
> before other attributes, for the same reason.
>
> Eli, what do you think of the attached patch?
If you want to experiment with this on master, I'm okay with trying
that there. But not on the release branch, where I think we currently
have a reasonably good state (famous last words...) and the issue
being discussed here seems quite marginal and obscure to me to risk
destabilizing what we have.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-28 12:31 ` Dmitry Gutov
@ 2022-12-28 17:35 ` martin rudalics
2022-12-28 22:35 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-28 17:35 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]
> It certainly does work. One of the changes I saw right away is the
> width of the frame right after startup with my config increased from
> 84 to 90 columns.
What are you asking for in your configuration?
> Not sure if it's good or bad, so let's go back to
> the behavior with '-Q'.
>
> The height stopped shrinking.
>
> The width started growing. :-D
Repeatedly?
> I don't know if *foo* is helpful here yet, but here you go:
Not for the width. But that's another issue. If mutter complains about
the width not conforming to the (+ base_width (* width_inc N)) rule,
then we have already lost when the sum of fringes and scroll bar is not
a multiple of the frame's column width. Which means, you get a "wrong"
size without any scaling and you may be lucky if that scaling does not
propagate during further 'set-face-attribute' calls. Does each setting
of 'set-face-attribute' increase the width or is it just the first one?
Strictly spoken, Emacs is wrong here and mutter is right. But fixing
this is quite involved since we'd have to disentangle those insane
FRAME_TEXT_COLS_TO_PIXEL_WIDTH and FRAME_TEXT_LINES_TO_PIXEL_HEIGHT
macros into xg_frame_set_char_size which would constitute a real pain.
More precisely, we'd have to treat scroll bars, fringes and internal
border like menu and toolbar and count them into the base_width value.
Try the attached which should work for any scaling and tell me what
happens now - in particular what the initial frame size is and whether
the frame grows or shrinks repeatedly.
martin
[-- Attachment #2: x_scale_font.diff --]
[-- Type: text/x-patch, Size: 5925 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..3d064e12d7 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,17 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (insert (format "%s" (car rest)))
+ (setq rest (cdr rest))
+ (while rest
+ (insert (format " .. %s" (car rest)))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..4501c8dc14 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,14 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_height != new_native_height
+ || old_text_lines != new_text_lines)
+ call7 (Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old pixels/lines"), make_fixnum (old_native_height),
+ make_fixnum (old_text_lines),
+ intern ("new pixels/lines"), make_fixnum (new_native_height),
+ make_fixnum (new_text_lines));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..cad337552f 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,13 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ call8 (Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("req"), make_fixnum (f->new_height),
+ intern ("con/text"), make_fixnum (height),
+ make_fixnum (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1181,17 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ width = width + (width % (FRAME_COLUMN_WIDTH (f) / scale));
+ outer_width = width + FRAME_TOOLBAR_WIDTH (f);
+
+ height = height + (height % (FRAME_LINE_HEIGHT (f) / scale));
+ outer_height
+ = height + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f);
+ }
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,8 +1214,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
xg_wm_set_size_hint (f, 0, 0);
@@ -1317,6 +1335,14 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ call7 (Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old"), make_fixnum (FRAME_PIXEL_HEIGHT (f)),
+ intern ("arg"), make_fixnum (height),
+ intern ("new"), make_fixnum (f->new_height));
+ call4 (Qfoo_it,
+ intern (" outer"), make_fixnum (outer_height),
+ intern ("gheight"), make_fixnum (gheight));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -2028,6 +2054,13 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ call8 (Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("line_height & scale"),
+ make_fixnum (FRAME_LINE_HEIGHT (f)), make_fixnum (scale),
+ intern ("base_height"), make_fixnum (size_hints.base_height),
+ intern ("height_inc"), make_fixnum (size_hints.height_inc));
+ call4 (Qfoo_it, intern (" menubar_height"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar_height"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)));
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..277b53043a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26197,9 +26197,17 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ call7 (Qfoo_it, intern ("x_new_font"),
+ intern ("line_height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("lines"), make_fixnum (FRAME_LINES (f)),
+ intern ("new_text_height"),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f)));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-28 17:35 ` martin rudalics
@ 2022-12-28 22:35 ` Dmitry Gutov
2022-12-29 9:05 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-28 22:35 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 28/12/2022 19:35, martin rudalics wrote:
> > It certainly does work. One of the changes I saw right away is the
> > width of the frame right after startup with my config increased from
> > 84 to 90 columns.
>
> What are you asking for in your configuration?
With your latest patch it's slightly different (the max width is 84).
But what I'm also seeing, is that even without your patch the starting
frame width is not deterministic either: the frame resizes a few times
during loading, and may end up at width either 80 or 84. I think I
mentioned similar behavior in some other bug report too.
So it seems like your latest patch doesn't change this behavior in any
significant way. Still either 80 or 84, at random.
> > Not sure if it's good or bad, so let's go back to
> > the behavior with '-Q'.
> >
> > The height stopped shrinking.
> >
> > The width started growing. :-D
>
> Repeatedly?
Yup. Without limit.
> > I don't know if *foo* is helpful here yet, but here you go:
>
> Not for the width. But that's another issue. If mutter complains about
> the width not conforming to the (+ base_width (* width_inc N)) rule,
> then we have already lost when the sum of fringes and scroll bar is not
> a multiple of the frame's column width. Which means, you get a "wrong"
> size without any scaling and you may be lucky if that scaling does not
> propagate during further 'set-face-attribute' calls. Does each setting
> of 'set-face-attribute' increase the width or is it just the first one?
Every one (at certain starting widths), just like it was with the
shrinking of height.
> Strictly spoken, Emacs is wrong here and mutter is right. But fixing
> this is quite involved since we'd have to disentangle those insane
> FRAME_TEXT_COLS_TO_PIXEL_WIDTH and FRAME_TEXT_LINES_TO_PIXEL_HEIGHT
> macros into xg_frame_set_char_size which would constitute a real pain.
> More precisely, we'd have to treat scroll bars, fringes and internal
> border like menu and toolbar and count them into the base_width value.
I'm sure you are right, but before we continue the thorough
investigation, do you have any idea why
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
exhibits this kooky behavior, while
(set-face-attribute 'default nil :height 110 :family "Inconsolata LGC")
does not? That might point to a weird kludge or workaround somewhere
which just needs moving somewhere else.
> Try the attached which should work for any scaling and tell me what
> happens now - in particular what the initial frame size is and whether
> the frame grows or shrinks repeatedly.
Now the width shrinks. Not from all starting widths, but from many of them.
Suppose the starting width is 80 (that's what frame-text-cols returns).
Evaluating the set-face-attribute form changes the frame size once, but
not the width in columns. Successive invocations don't change the frame
size.
I increase the frame to width 112 with a mouse. Doesn't shrink. 111-108
- nope.
I resize it to 107 (according to frame-text-cols; the wm reports
109x36), and evaluating the form shrinks the frame by 2 columns. That
repeats until frame-text-cols is 96.
Widths 96-92 don't shrink.
I resize to 91 - it continues shrinking (in steps of 2) until 80. 80-76
don't shrink.
75 - shrinks until 64. And so on.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-28 22:35 ` Dmitry Gutov
@ 2022-12-29 9:05 ` martin rudalics
2022-12-29 22:29 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-29 9:05 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
>> > It certainly does work. One of the changes I saw right away is the
>> > width of the frame right after startup with my config increased from
>> > 84 to 90 columns.
>>
>> What are you asking for in your configuration?
>
> With your latest patch it's slightly different (the max width is 84).
What is the "max width"? The interesting return values are those of
(frame-text-width), (frame-text-cols) and (frame-char-width) so we can
relate the previous ones.
> But what I'm also seeing, is that even without your patch the starting
> frame width is not deterministic either: the frame resizes a few times
> during loading, and may end up at width either 80 or 84. I think I
> mentioned similar behavior in some other bug report too.
I'm quite sure that this is due to the scroll bar width and the fringes.
You could try to make these a multiple of (frame-char-width). That is
(+ (frame-parameter nil 'scroll-bar-width)
(frame-parameter nil 'left-fringe)
(frame-parameter nil 'right-fringe))
would have to equal (* N (frame-char-width)) for some N >= 0.
> So it seems like your latest patch doesn't change this behavior in any significant way. Still either 80 or 84, at random.
[...]
> I'm sure you are right, but before we continue the thorough investigation, do you have any idea why
>
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>
> exhibits this kooky behavior, while
>
> (set-face-attribute 'default nil :height 110 :family "Inconsolata LGC")
No idea. You could try to step through normal_char_ascent_descent (best
when called from get_font_ascent_descent) for each of these fonts and
find out whether and how they differ.
> does not? That might point to a weird kludge or workaround somewhere which just needs moving somewhere else.
>
>> Try the attached which should work for any scaling and tell me what
>> happens now - in particular what the initial frame size is and whether
>> the frame grows or shrinks repeatedly.
>
> Now the width shrinks. Not from all starting widths, but from many of them.
>
> Suppose the starting width is 80 (that's what frame-text-cols
> returns). Evaluating the set-face-attribute form changes the frame
> size once, but not the width in columns. Successive invocations don't
> change the frame size.
So we at least have the improvement that the frame does not change size
for repeated, apparently idempotent, invocations. Right?
> I increase the frame to width 112 with a mouse. Doesn't shrink. 111-108 - nope.
>
> I resize it to 107 (according to frame-text-cols; the wm reports 109x36), and evaluating the form shrinks the frame by 2 columns. That repeats until frame-text-cols is 96.
>
> Widths 96-92 don't shrink.
>
> I resize to 91 - it continues shrinking (in steps of 2) until 80. 80-76 don't shrink.
>
> 75 - shrinks until 64. And so on.
Does shrinking the height with the mouse work as expected? I'm quite
confident that neither of these can work reliably - after all, the one
pixel lost during rounding will continue to affect the intuitive
behavior. I'd say that it's already a success when attempting to shrink
the frame with the mouse does not increase it initially.
Our handling of size hints is antediluvian. In particular when
'frame-resize-pixelwise' is nil and on the other end a presumably
Teutonic WM designer interprets size hints literally. I can try to come
up with a patch for these but don't expect too much.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-29 9:05 ` martin rudalics
@ 2022-12-29 22:29 ` Dmitry Gutov
2022-12-30 9:51 ` martin rudalics
2022-12-31 19:01 ` martin rudalics
0 siblings, 2 replies; 169+ messages in thread
From: Dmitry Gutov @ 2022-12-29 22:29 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 29/12/2022 11:05, martin rudalics wrote:
> >> > It certainly does work. One of the changes I saw right away is the
> >> > width of the frame right after startup with my config increased from
> >> > 84 to 90 columns.
> >>
> >> What are you asking for in your configuration?
> >
> > With your latest patch it's slightly different (the max width is 84).
>
> What is the "max width"? The interesting return values are those of
> (frame-text-width), (frame-text-cols) and (frame-char-width) so we can
> relate the previous ones.
Max among the return values of (frame-text-cols). With the next-to-last
patch it was 90.
> > But what I'm also seeing, is that even without your patch the starting
> > frame width is not deterministic either: the frame resizes a few times
> > during loading, and may end up at width either 80 or 84. I think I
> > mentioned similar behavior in some other bug report too.
>
> I'm quite sure that this is due to the scroll bar width and the fringes.
> You could try to make these a multiple of (frame-char-width). That is
>
> (+ (frame-parameter nil 'scroll-bar-width)
> (frame-parameter nil 'left-fringe)
> (frame-parameter nil 'right-fringe))
>
> would have to equal (* N (frame-char-width)) for some N >= 0.
When frame-text-cols is 84, it's (+ 32 8 8) = 48, frame-char-width=17
When frame-text-cols is 80, all the above values are the same.
Oh, BTW, I have menu-bar, scroll-bar and tool-bar all disabled. The
fringes should be on, though.
> > So it seems like your latest patch doesn't change this behavior in
> any significant way. Still either 80 or 84, at random.
> [...]
> > I'm sure you are right, but before we continue the thorough
> investigation, do you have any idea why
> >
> > (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
> >
> > exhibits this kooky behavior, while
> >
> > (set-face-attribute 'default nil :height 110 :family "Inconsolata
> LGC")
>
> No idea. You could try to step through normal_char_ascent_descent (best
> when called from get_font_ascent_descent) for each of these fonts and
> find out whether and how they differ.
I'm reasonably certain it's the same font.
Evaluating either form ends up with the same face definition, IIUC. At
least the output of 'M-x describe-face RET default' is exactly the same
after either (I checked with 'diff'):
Family: Inconsolata LGC
Foundry: PfEd
Width: normal
Height: 109
Weight: regular
Slant: normal
Foreground: black
DistantForeground: unspecified
Background: white
Underline: nil
Overline: nil
Strike-through: nil
Box: nil
Inverse: nil
Stipple: nil
Font: #<font-object -PfEd-Inconsolata
LGC-regular-normal-normal-*-29-*-*-*-m-0-iso10646-1>
Fontset: -PfEd-Inconsolata
LGC-regular-normal-normal-*-29-*-*-*-m-0-fontset-auto2
Extend: nil
Inherit: nil
If you think it will help, I can still try stepping through the
functions you mentioned, but no earlier than tomorrow.
> > does not? That might point to a weird kludge or workaround somewhere
> which just needs moving somewhere else.
> >
> >> Try the attached which should work for any scaling and tell me what
> >> happens now - in particular what the initial frame size is and whether
> >> the frame grows or shrinks repeatedly.
> >
> > Now the width shrinks. Not from all starting widths, but from many of
> them.
> >
> > Suppose the starting width is 80 (that's what frame-text-cols
> > returns). Evaluating the set-face-attribute form changes the frame
> > size once, but not the width in columns. Successive invocations don't
> > change the frame size.
>
> So we at least have the improvement that the frame does not change size
> for repeated, apparently idempotent, invocations. Right?
For some frame widths it does not. For others (for ranges of widths) --
it does.
> > I increase the frame to width 112 with a mouse. Doesn't shrink.
> 111-108 - nope.
> >
> > I resize it to 107 (according to frame-text-cols; the wm reports
> 109x36), and evaluating the form shrinks the frame by 2 columns. That
> repeats until frame-text-cols is 96.
> >
> > Widths 96-92 don't shrink.
> >
> > I resize to 91 - it continues shrinking (in steps of 2) until 80.
> 80-76 don't shrink.
> >
> > 75 - shrinks until 64. And so on.
>
> Does shrinking the height with the mouse work as expected? I'm quite
> confident that neither of these can work reliably - after all, the one
> pixel lost during rounding will continue to affect the intuitive
> behavior. I'd say that it's already a success when attempting to shrink
> the frame with the mouse does not increase it initially.
Resizing with the mouse works without any apparent glitches. The corner
of the frame follows the mouse almost exactly, within the margin of a
char's height/width (when resizing is not pixelwise).
> Our handling of size hints is antediluvian. In particular when
> 'frame-resize-pixelwise' is nil and on the other end a presumably
> Teutonic WM designer interprets size hints literally. I can try to come
> up with a patch for these but don't expect too much.
Thanks.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-26 12:25 ` Eli Zaretskii
@ 2022-12-29 22:45 ` Gregory Heytings
2022-12-30 14:47 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Gregory Heytings @ 2022-12-29 22:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, larsi, 52493, rpluim, dgutov
>
> The text is OK, but please put this in the manual, not in the doc
> string. If we want something to this effect in the doc string, let's
> just have the first sentence there, and then a reference to the manual.
>
Now done (d086cd6cf8). I also aligned the documentation of
set-face-attribute in the manual with that of the docstring, with what was
discussed in bug#57499.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-29 22:29 ` Dmitry Gutov
@ 2022-12-30 9:51 ` martin rudalics
2022-12-31 19:01 ` martin rudalics
1 sibling, 0 replies; 169+ messages in thread
From: martin rudalics @ 2022-12-30 9:51 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
> Oh, BTW, I have menu-bar, scroll-bar and tool-bar all disabled. The fringes should be on, though.
Then try setting the fringes to one 'frame-char-width' each or set them
to zero.
>> No idea. You could try to step through normal_char_ascent_descent (best
>> when called from get_font_ascent_descent) for each of these fonts and
>> find out whether and how they differ.
>
> I'm reasonably certain it's the same font.
[...]
> If you think it will help, I can still try stepping through the functions you mentioned, but no earlier than tomorrow.
Please do that. 'describe-face' is one thing. What the display engine
thinks of a font might be another.
>> So we at least have the improvement that the frame does not change size
>> for repeated, apparently idempotent, invocations. Right?
>
> For some frame widths it does not. For others (for ranges of widths) -- it does.
I see.
> Resizing with the mouse works without any apparent glitches. The
> corner of the frame follows the mouse almost exactly, within the
> margin of a char's height/width (when resizing is not pixelwise).
It should do that in terms of whatever we ask for in the width and
height increments - after all, those mouse operations are under full
control of the WM. Whatever size the WM gives us, we comply. Take
these two assignments in xg_wm_set_size_hint:
size_hints.width_inc /= scale;
size_hints.height_inc /= scale;
Instead of the "/= scale"s put some assignments with arbitrary constants
there, say
size_hints.width_inc = 51;
size_hints.height_inc = 7;
You should see that mouse dragging will resize the frame by exactly what
you've put there. BTW: Try with these two lines commented out and tell
me whether mouse dragging becomes _perceptibly_ worse. Removing them
could be a substantial relieve in the future.
The problems start after Emacs takes the values it has been told by the
WM and tries to retrofit them into its own lines/columns framework.
When you next ask Emacs programmatically to resize the frame in terms of
the values it stored there, all those rounding and scaling errors that
piled up fire back. Resizing frames is a continuous dialogue between
Emacs and the WM. If one of them refuses to listen to the other, users
will suffer.
Thanks, martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-29 22:45 ` Gregory Heytings
@ 2022-12-30 14:47 ` Eli Zaretskii
2022-12-30 15:40 ` Gregory Heytings
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-30 14:47 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Thu, 29 Dec 2022 22:45:46 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: dgutov@yandex.ru, rudalics@gmx.at, 52493@debbugs.gnu.org, larsi@gnus.org,
> rpluim@gmail.com
>
> > The text is OK, but please put this in the manual, not in the doc
> > string. If we want something to this effect in the doc string, let's
> > just have the first sentence there, and then a reference to the manual.
> >
>
> Now done (d086cd6cf8). I also aligned the documentation of
> set-face-attribute in the manual with that of the docstring, with what was
> discussed in bug#57499.
Thanks.
Unfortunately, you also decided to take this opportunity to make
changes to which I explicitly objected in bug#57499. I reverted that
part. Please don't increase my load of work by making changes we
didn't agree to make.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-30 14:47 ` Eli Zaretskii
@ 2022-12-30 15:40 ` Gregory Heytings
2022-12-30 16:14 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Gregory Heytings @ 2022-12-30 15:40 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, larsi, 52493, rpluim, dgutov
>>> The text is OK, but please put this in the manual, not in the doc
>>> string. If we want something to this effect in the doc string, let's
>>> just have the first sentence there, and then a reference to the
>>> manual.
>>
>> Now done (d086cd6cf8). I also aligned the documentation of
>> set-face-attribute in the manual with that of the docstring, with what
>> was discussed in bug#57499.
>
> Thanks.
>
> Unfortunately, you also decided to take this opportunity to make changes
> to which I explicitly objected in bug#57499. I reverted that part.
> Please don't increase my load of work by making changes we didn't agree
> to make.
>
There must be some misunderstanding here. What I did was nothing more
than to align the manual with the docstring, something which was forgotten
in bug#57499. The paragraph you now restored in the manual is similar to
the paragraph you removed from the docstring in 89695bce3e, and the
paragraph you added in 89695bce3e ("When a new frame is created, attribute
values...") means, as far as I understand, the same as the sentence
If @var{frame} is @code{t}, this function sets the default attributes for
newly created frames; they will effectively override the attribute values
specified by @code{defface}.
which is already in the manual.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-30 15:40 ` Gregory Heytings
@ 2022-12-30 16:14 ` Eli Zaretskii
2022-12-30 16:27 ` Gregory Heytings
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-30 16:14 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Fri, 30 Dec 2022 15:40:02 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: rudalics@gmx.at, larsi@gnus.org, 52493@debbugs.gnu.org, rpluim@gmail.com,
> dgutov@yandex.ru
>
> > Unfortunately, you also decided to take this opportunity to make changes
> > to which I explicitly objected in bug#57499. I reverted that part.
> > Please don't increase my load of work by making changes we didn't agree
> > to make.
> >
>
> There must be some misunderstanding here. What I did was nothing more
> than to align the manual with the docstring, something which was forgotten
> in bug#57499. The paragraph you now restored in the manual is similar to
> the paragraph you removed from the docstring in 89695bce3e, and the
> paragraph you added in 89695bce3e ("When a new frame is created, attribute
> values...") means, as far as I understand, the same as the sentence
>
> If @var{frame} is @code{t}, this function sets the default attributes for
> newly created frames; they will effectively override the attribute values
> specified by @code{defface}.
>
> which is already in the manual.
Yes. That was the compromise we reached back then, and I want it to
stay that way.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-30 16:14 ` Eli Zaretskii
@ 2022-12-30 16:27 ` Gregory Heytings
2022-12-30 17:01 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Gregory Heytings @ 2022-12-30 16:27 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, larsi, 52493, rpluim, dgutov
>
> Yes. That was the compromise we reached back then, and I want it to
> stay that way.
>
Sorry, I don't understand what you mean. Do you mean that the compromise
was to remove the paragraph your removed in 89695bce3e from the docstring,
but not from the manual?
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-30 16:27 ` Gregory Heytings
@ 2022-12-30 17:01 ` Eli Zaretskii
2022-12-30 17:28 ` Gregory Heytings
0 siblings, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2022-12-30 17:01 UTC (permalink / raw)
To: Gregory Heytings; +Cc: rudalics, larsi, 52493, rpluim, dgutov
> Date: Fri, 30 Dec 2022 16:27:04 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: rudalics@gmx.at, larsi@gnus.org, 52493@debbugs.gnu.org, rpluim@gmail.com,
> dgutov@yandex.ru
>
> > Yes. That was the compromise we reached back then, and I want it to
> > stay that way.
>
> Sorry, I don't understand what you mean. Do you mean that the compromise
> was to remove the paragraph your removed in 89695bce3e from the docstring,
> but not from the manual?
Yes. See
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57499#100
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-30 17:01 ` Eli Zaretskii
@ 2022-12-30 17:28 ` Gregory Heytings
0 siblings, 0 replies; 169+ messages in thread
From: Gregory Heytings @ 2022-12-30 17:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, larsi, 52493, rpluim, dgutov
>>> Yes. That was the compromise we reached back then, and I want it to
>>> stay that way.
>>
>> Sorry, I don't understand what you mean. Do you mean that the
>> compromise was to remove the paragraph your removed in 89695bce3e from
>> the docstring, but not from the manual?
>
> Yes. See
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57499#100
>
Okay, that's not what I understood (and TBH that's still not what I
understand now), but I don't think it's useful to continue this
discussion. Sorry for the additional work.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-29 22:29 ` Dmitry Gutov
2022-12-30 9:51 ` martin rudalics
@ 2022-12-31 19:01 ` martin rudalics
2023-01-05 1:50 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: martin rudalics @ 2022-12-31 19:01 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 5211 bytes --]
I've rewritten the output routines so they catch the width changes but
didn't change anything else. The output in *foo* should be almost
self-explanatory now but see first one I ran with emacs -Q and the
following four evaluations
(set-face-attribute 'default nil :height 120 :family "DejaVu Sans Mono")
(set-face-attribute 'default nil :height 140 :family "DejaVu Sans Mono")
(set-face-attribute 'default nil :height 130 :family "DejaVu Sans Mono")
(set-face-attribute 'default nil :height 120 :family "DejaVu Sans Mono")
here. This got me
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 736x450 old text pixels 80x25 new text pixels 720x450 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 736x450 new native pixels 736x648 old text pixels 720x450 new text pixels 720x648 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 736x648 new native pixels 752x648 old text pixels 720x648 new text pixels 720x648 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 752x648 new native pixels 752x648 outer pixels 752x673
xg_wm_set_size_hint scale 1 char width 9 vscroll 16 fringes 16 borders 0 base width 41 width inc 9
char height 18 menubar 25 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_wm_set_size_hint scale 1 char width 9 vscroll 16 fringes 16 borders 0 base width 41 width inc 9
char height 18 menubar 25 toolbar 41 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 752x648 new native pixels 752x648 outer pixels 752x714 outer rest 0x0
x_new_font old char size 9x18 new char size 10x19 text chars 80x36 old text pixels 720x648 new text pixels 800x684
xg_wm_set_size_hint scale 1 char width 10 vscroll 16 fringes 16 borders 0 base width 42 width inc 10
char height 19 menubar 25 toolbar 41 hscroll 0 borders 0 base height 85 height inc 19
xg_frame_set_char_size old native pixels 752x648 new native pixels 832x684 outer pixels 832x750 outer rest 0x0
xg_frame_resized old native pixels 752x648 new native pixels 832x684
adjust_frame_size old native pixels 752x648 new native pixels 832x684 old text pixels 720x648 new text pixels 800x684 old text chars 80x36 new text chars 80x36
x_new_font old char size 10x19 new char size 11x23 text chars 80x36 old text pixels 800x684 new text pixels 880x828
xg_wm_set_size_hint scale 1 char width 11 vscroll 16 fringes 16 borders 0 base width 43 width inc 11
char height 23 menubar 25 toolbar 41 hscroll 0 borders 0 base height 89 height inc 23
xg_frame_set_char_size old native pixels 832x684 new native pixels 912x828 outer pixels 912x894 outer rest 0x0
xg_frame_resized old native pixels 832x684 new native pixels 912x828
adjust_frame_size old native pixels 832x684 new native pixels 912x828 old text pixels 800x684 new text pixels 880x828 old text chars 80x36 new text chars 80x36
x_new_font old char size 11x23 new char size 10x21 text chars 80x36 old text pixels 880x828 new text pixels 800x756
xg_wm_set_size_hint scale 1 char width 10 vscroll 16 fringes 16 borders 0 base width 42 width inc 10
char height 21 menubar 25 toolbar 41 hscroll 0 borders 0 base height 87 height inc 21
xg_frame_set_char_size old native pixels 912x828 new native pixels 832x756 outer pixels 832x822 outer rest 0x0
xg_frame_resized old native pixels 912x828 new native pixels 832x756
adjust_frame_size old native pixels 912x828 new native pixels 832x756 old text pixels 880x828 new text pixels 800x756 old text chars 80x36 new text chars 80x36
x_new_font old char size 10x21 new char size 10x19 text chars 80x36 old text pixels 800x756 new text pixels 800x684
xg_wm_set_size_hint scale 1 char width 10 vscroll 16 fringes 16 borders 0 base width 42 width inc 10
char height 19 menubar 25 toolbar 41 hscroll 0 borders 0 base height 85 height inc 19
xg_frame_set_char_size old native pixels 832x756 new native pixels 832x684 outer pixels 832x750 outer rest 0x0
xg_frame_resized old native pixels 832x756 new native pixels 832x684
adjust_frame_size old native pixels 832x756 new native pixels 832x684 old text pixels 800x756 new text pixels 800x684 old text chars 80x36 new text chars 80x36
where each x_new_font paragraph corresponds to one evaluation above.
Note the following two properties:
- As soon as things clear up, the size of the frame in text characters
is 80x36 and never changes after that. The same will have to hold for
your 'set-face-attribute' calls regardless of what the pixel sizes
say.
- "outer rest 0x0" stands for a zero rest when dividing the requested
size minus the base size by the size increments. The same will have
to hold for your 'set-face-attribute' calls.
Maybe I'm just lucky here or it's because I do not scale. I invite
everyone on GTK with some spare time to apply the attached
x_scale_font.diff, do some random 'set-face-attribute' calls and consult
the contents of the *foo* buffer. If the two properties don't hold,
something might be wrong and we should investigate that.
martin
[-- Attachment #2: x_scale_font.diff --]
[-- Type: text/x-patch, Size: 9076 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..16e906269a 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,18 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints;
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ width = width + (width % (FRAME_COLUMN_WIDTH (f) / scale));
+ outer_width = width + FRAME_TOOLBAR_WIDTH (f);
+
+ height = height + (height % (FRAME_LINE_HEIGHT (f) / scale));
+ outer_height
+ = height + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f);
+ }
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,8 +1216,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
xg_wm_set_size_hint (f, 0, 0);
@@ -1317,6 +1337,30 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0 && size_hints.width_inc > 0
+ && outer_height > 0 && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width) % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height) % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -2028,6 +2072,23 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b2e689fe84 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2022-12-31 19:01 ` martin rudalics
@ 2023-01-05 1:50 ` Dmitry Gutov
2023-01-05 9:47 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-05 1:50 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]
Hi Martin!
On 31/12/2022 21:01, martin rudalics wrote:
> where each x_new_font paragraph corresponds to one evaluation above.
> Note the following two properties:
>
> - As soon as things clear up, the size of the frame in text characters
> is 80x36 and never changes after that. The same will have to hold for
> your 'set-face-attribute' calls regardless of what the pixel sizes
> say.
>
> - "outer rest 0x0" stands for a zero rest when dividing the requested
> size minus the base size by the size increments. The same will have
> to hold for your 'set-face-attribute' calls.
>
> Maybe I'm just lucky here or it's because I do not scale. I invite
> everyone on GTK with some spare time to apply the attached
> x_scale_font.diff, do some random 'set-face-attribute' calls and consult
> the contents of the *foo* buffer. If the two properties don't hold,
> something might be wrong and we should investigate that.
Two points:
- My personal init script still results in a frame that's 84 columns
wide (according to frame-text-cols). There are no frame size settings in
the configuration.
- There are still widths of the frame where evaluating the previously
mentioned set-face-attribute form results in the frame shrinking
repeatedly until it reaches one of the "stable" widths. Like in prevous
test, the width 80 is stable. IOW, nothing seems to have changed WRT to
the shrinking behavior.
Here are the contents of *foo* accompanying the 'emacs -Q' session where
I first resize the frame to 90 columns (according to the wm) using the
mouse, and then evaluate the set-face-attribute form 7 times until it
reaches the width 80.
It does have a number of lines where "outer rest" is followed by values
other than 0x0. It's only 0x0 at the end.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 11248 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1491x1296 outer pixels 745x698
adjust_frame_size old native pixels 1488x1296 new native pixels 1491x1296 old text pixels 1440x1296 new text pixels 1443x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1491x1296 new native pixels 1491x1296 outer pixels 745x673
xg_frame_resized old native pixels 1491x1296 new native pixels 1490x1346
xg_wm_set_size_hint scale 2 char width 18 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_frame_resized old native pixels 1491x1296 new native pixels 1490x1296
xg_frame_resized old native pixels 1491x1296 new native pixels 1488x1296
adjust_frame_size old native pixels 1491x1296 new native pixels 1488x1296 old text pixels 1443x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_wm_set_size_hint scale 2 char width 18 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1491x1296 outer pixels 745x714 outer rest 1x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1506x1296
adjust_frame_size old native pixels 1488x1296 new native pixels 1506x1296 old text pixels 1440x1296 new text pixels 1458x1296 old text chars 80x36 new text chars 81x36
xg_frame_resized old native pixels 1506x1296 new native pixels 1524x1296
adjust_frame_size old native pixels 1506x1296 new native pixels 1524x1296 old text pixels 1458x1296 new text pixels 1476x1296 old text chars 81x36 new text chars 82x36
xg_frame_resized old native pixels 1524x1296 new native pixels 1560x1296
adjust_frame_size old native pixels 1524x1296 new native pixels 1560x1296 old text pixels 1476x1296 new text pixels 1512x1296 old text chars 82x36 new text chars 84x36
xg_frame_resized old native pixels 1560x1296 new native pixels 1578x1296
adjust_frame_size old native pixels 1560x1296 new native pixels 1578x1296 old text pixels 1512x1296 new text pixels 1530x1296 old text chars 84x36 new text chars 85x36
xg_frame_resized old native pixels 1578x1296 new native pixels 1614x1296
adjust_frame_size old native pixels 1578x1296 new native pixels 1614x1296 old text pixels 1530x1296 new text pixels 1566x1296 old text chars 85x36 new text chars 87x36
xg_frame_resized old native pixels 1614x1296 new native pixels 1632x1296
adjust_frame_size old native pixels 1614x1296 new native pixels 1632x1296 old text pixels 1566x1296 new text pixels 1584x1296 old text chars 87x36 new text chars 88x36
xg_frame_resized old native pixels 1632x1296 new native pixels 1650x1296
adjust_frame_size old native pixels 1632x1296 new native pixels 1650x1296 old text pixels 1584x1296 new text pixels 1602x1296 old text chars 88x36 new text chars 89x36
xg_frame_resized old native pixels 1650x1296 new native pixels 1668x1296
adjust_frame_size old native pixels 1650x1296 new native pixels 1668x1296 old text pixels 1602x1296 new text pixels 1620x1296 old text chars 89x36 new text chars 90x36
xg_frame_resized old native pixels 1668x1296 new native pixels 1686x1296
adjust_frame_size old native pixels 1668x1296 new native pixels 1686x1296 old text pixels 1620x1296 new text pixels 1638x1296 old text chars 90x36 new text chars 91x36
xg_frame_resized old native pixels 1686x1296 new native pixels 1704x1296
adjust_frame_size old native pixels 1686x1296 new native pixels 1704x1296 old text pixels 1638x1296 new text pixels 1656x1296 old text chars 91x36 new text chars 92x36
x_new_font old char size 18x36 new char size 21x45 text chars 92x36 old text pixels 1656x1296 new text pixels 1932x1620
xg_wm_set_size_hint scale 2 char width 21 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1704x1296 new native pixels 1980x1634 outer pixels 990x883 outer rest 6x3
xg_frame_resized old native pixels 1704x1296 new native pixels 1968x1628
adjust_frame_size old native pixels 1704x1296 new native pixels 1968x1628 old text pixels 1656x1296 new text pixels 1920x1628 old text chars 92x36 new text chars 91x36
x_new_font old char size 21x45 new char size 17x37 text chars 91x36 old text pixels 1920x1628 new text pixels 1547x1332
xg_wm_set_size_hint scale 2 char width 17 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1968x1628 new native pixels 1598x1332 outer pixels 799x732 outer rest 7x0
xg_frame_resized old native pixels 1968x1628 new native pixels 1584x1332
adjust_frame_size old native pixels 1968x1628 new native pixels 1584x1332 old text pixels 1920x1628 new text pixels 1536x1332 old text chars 91x36 new text chars 90x36
x_new_font old char size 17x37 new char size 17x37 text chars 90x36 old text pixels 1536x1332 new text pixels 1530x1332
xg_frame_set_char_size old native pixels 1584x1332 new native pixels 1580x1332 outer pixels 790x732 outer rest 6x0
xg_frame_resized old native pixels 1584x1332 new native pixels 1568x1332
adjust_frame_size old native pixels 1584x1332 new native pixels 1568x1332 old text pixels 1536x1332 new text pixels 1520x1332 old text chars 90x36 new text chars 89x36
x_new_font old char size 17x37 new char size 17x37 text chars 89x36 old text pixels 1520x1332 new text pixels 1513x1332
xg_frame_set_char_size old native pixels 1568x1332 new native pixels 1562x1332 outer pixels 781x732 outer rest 5x0
xg_frame_resized old native pixels 1568x1332 new native pixels 1552x1332
adjust_frame_size old native pixels 1568x1332 new native pixels 1552x1332 old text pixels 1520x1332 new text pixels 1504x1332 old text chars 89x36 new text chars 88x36
x_new_font old char size 17x37 new char size 17x37 text chars 88x36 old text pixels 1504x1332 new text pixels 1496x1332
xg_frame_set_char_size old native pixels 1552x1332 new native pixels 1544x1332 outer pixels 772x732 outer rest 4x0
xg_frame_resized old native pixels 1552x1332 new native pixels 1536x1332
adjust_frame_size old native pixels 1552x1332 new native pixels 1536x1332 old text pixels 1504x1332 new text pixels 1488x1332 old text chars 88x36 new text chars 87x36
x_new_font old char size 17x37 new char size 17x37 text chars 87x36 old text pixels 1488x1332 new text pixels 1479x1332
xg_frame_set_char_size old native pixels 1536x1332 new native pixels 1534x1332 outer pixels 767x732 outer rest 7x0
xg_frame_resized old native pixels 1536x1332 new native pixels 1520x1332
adjust_frame_size old native pixels 1536x1332 new native pixels 1520x1332 old text pixels 1488x1332 new text pixels 1472x1332 old text chars 87x36 new text chars 86x36
x_new_font old char size 17x37 new char size 17x37 text chars 86x36 old text pixels 1472x1332 new text pixels 1462x1332
xg_frame_set_char_size old native pixels 1520x1332 new native pixels 1516x1332 outer pixels 758x732 outer rest 6x0
xg_frame_resized old native pixels 1520x1332 new native pixels 1504x1332
adjust_frame_size old native pixels 1520x1332 new native pixels 1504x1332 old text pixels 1472x1332 new text pixels 1456x1332 old text chars 86x36 new text chars 85x36
x_new_font old char size 17x37 new char size 17x37 text chars 85x36 old text pixels 1456x1332 new text pixels 1445x1332
xg_frame_set_char_size old native pixels 1504x1332 new native pixels 1498x1332 outer pixels 749x732 outer rest 5x0
xg_frame_resized old native pixels 1504x1332 new native pixels 1488x1332
adjust_frame_size old native pixels 1504x1332 new native pixels 1488x1332 old text pixels 1456x1332 new text pixels 1440x1332 old text chars 85x36 new text chars 84x36
x_new_font old char size 17x37 new char size 17x37 text chars 84x36 old text pixels 1440x1332 new text pixels 1428x1332
xg_frame_set_char_size old native pixels 1488x1332 new native pixels 1480x1332 outer pixels 740x732 outer rest 4x0
xg_frame_resized old native pixels 1488x1332 new native pixels 1472x1332
adjust_frame_size old native pixels 1488x1332 new native pixels 1472x1332 old text pixels 1440x1332 new text pixels 1424x1332 old text chars 84x36 new text chars 83x36
x_new_font old char size 17x37 new char size 17x37 text chars 83x36 old text pixels 1424x1332 new text pixels 1411x1332
xg_frame_set_char_size old native pixels 1472x1332 new native pixels 1462x1332 outer pixels 731x732 outer rest 3x0
xg_frame_resized old native pixels 1472x1332 new native pixels 1456x1332
adjust_frame_size old native pixels 1472x1332 new native pixels 1456x1332 old text pixels 1424x1332 new text pixels 1408x1332 old text chars 83x36 new text chars 82x36
x_new_font old char size 17x37 new char size 17x37 text chars 82x36 old text pixels 1408x1332 new text pixels 1394x1332
xg_frame_set_char_size old native pixels 1456x1332 new native pixels 1444x1332 outer pixels 722x732 outer rest 2x0
xg_frame_resized old native pixels 1456x1332 new native pixels 1440x1332
adjust_frame_size old native pixels 1456x1332 new native pixels 1440x1332 old text pixels 1408x1332 new text pixels 1392x1332 old text chars 82x36 new text chars 81x36
x_new_font old char size 17x37 new char size 17x37 text chars 81x36 old text pixels 1392x1332 new text pixels 1377x1332
xg_frame_set_char_size old native pixels 1440x1332 new native pixels 1426x1332 outer pixels 713x732 outer rest 1x0
xg_frame_resized old native pixels 1440x1332 new native pixels 1424x1332
adjust_frame_size old native pixels 1440x1332 new native pixels 1424x1332 old text pixels 1392x1332 new text pixels 1376x1332 old text chars 81x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1376x1332 new text pixels 1360x1332
xg_frame_set_char_size old native pixels 1424x1332 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
xg_frame_resized old native pixels 1424x1332 new native pixels 1408x1332
adjust_frame_size old native pixels 1424x1332 new native pixels 1408x1332 old text pixels 1376x1332 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-05 1:50 ` Dmitry Gutov
@ 2023-01-05 9:47 ` martin rudalics
2023-01-05 14:14 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-05 9:47 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
> xg_wm_set_size_hint scale 2 char width 18 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
> char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
> xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1491x1296 outer pixels 745x714 outer rest 1x0
Apparently, rounding the native pixels doesn't make sense. Let's round
just the outer pixels instead. Patch attached.
martin
[-- Attachment #2: x_scale_font.diff --]
[-- Type: text/x-patch, Size: 8974 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..ebcc9507d5 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,8 +1206,16 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ outer_width
+ = outer_width + (outer_width % (FRAME_COLUMN_WIDTH (f) / scale));
+ outer_height
+ = outer_height + (outer_height % (FRAME_LINE_HEIGHT (f) / scale));
+ }
xg_wm_set_size_hint (f, 0, 0);
@@ -1317,6 +1335,30 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0 && size_hints.width_inc > 0
+ && outer_height > 0 && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width) % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height) % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -2028,6 +2070,23 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b2e689fe84 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-05 9:47 ` martin rudalics
@ 2023-01-05 14:14 ` Dmitry Gutov
2023-01-05 16:59 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-05 14:14 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 868 bytes --]
Hi Martin,
On 05/01/2023 11:47, martin rudalics wrote:
> > xg_wm_set_size_hint scale 2 char width 18 vscroll 32 fringes 16
> borders 0 base width 33 width inc 9
> > char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base
> height 84 height inc 18
> > xg_frame_set_char_size old native pixels 1488x1296 new native pixels
> 1491x1296 outer pixels 745x714 outer rest 1x0
>
> Apparently, rounding the native pixels doesn't make sense. Let's round
> just the outer pixels instead. Patch attached.
I'm not seeing much of a change, if any:
- My init script stills results in a frame 84 columns wide.
- The frame still shrinks at certain width ranges.
Attached are the contents of foo after doing this:
(set-frame-width nil 102)
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
The second line was evaluated 5 times.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 6351 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 750x712
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 750x680
xg_frame_resized old native pixels 1488x1296 new native pixels 1500x1374
xg_frame_resized old native pixels 1488x1296 new native pixels 1500x1310
xg_wm_set_size_hint scale 2 char width 18 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
adjust_frame_size old native pixels 1488x1296 new native pixels 1500x1310 old text pixels 1440x1296 new text pixels 1452x1310 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1500x1310 new native pixels 1488x1296
adjust_frame_size old native pixels 1500x1310 new native pixels 1488x1296 old text pixels 1452x1310 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_wm_set_size_hint scale 2 char width 18 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 750x726 outer rest 6x12
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1884x1296 outer pixels 948x726 outer rest 6x12
xg_frame_resized old native pixels 1488x1296 new native pixels 1884x1296
adjust_frame_size old native pixels 1488x1296 new native pixels 1884x1296 old text pixels 1440x1296 new text pixels 1836x1296 old text chars 80x36 new text chars 102x36
x_new_font old char size 18x36 new char size 21x45 text chars 102x36 old text pixels 1836x1296 new text pixels 2142x1620
xg_wm_set_size_hint scale 2 char width 21 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1884x1296 new native pixels 2190x1620 outer pixels 1100x894 outer rest 6x14
xg_frame_resized old native pixels 1884x1296 new native pixels 2188x1628
adjust_frame_size old native pixels 1884x1296 new native pixels 2188x1628 old text pixels 1836x1296 new text pixels 2140x1628 old text chars 102x36 new text chars 101x36
x_new_font old char size 21x45 new char size 17x37 text chars 101x36 old text pixels 2140x1628 new text pixels 1717x1332
xg_wm_set_size_hint scale 2 char width 17 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 2188x1628 new native pixels 1765x1332 outer pixels 884x744 outer rest 4x12
xg_frame_resized old native pixels 2188x1628 new native pixels 1760x1332
adjust_frame_size old native pixels 2188x1628 new native pixels 1760x1332 old text pixels 2140x1628 new text pixels 1712x1332 old text chars 101x36 new text chars 100x36
x_new_font old char size 17x37 new char size 17x37 text chars 100x36 old text pixels 1712x1332 new text pixels 1700x1332
xg_frame_set_char_size old native pixels 1760x1332 new native pixels 1748x1332 outer pixels 876x744 outer rest 4x12
xg_frame_resized old native pixels 1760x1332 new native pixels 1744x1332
adjust_frame_size old native pixels 1760x1332 new native pixels 1744x1332 old text pixels 1712x1332 new text pixels 1696x1332 old text chars 100x36 new text chars 99x36
x_new_font old char size 17x37 new char size 17x37 text chars 99x36 old text pixels 1696x1332 new text pixels 1683x1332
xg_frame_set_char_size old native pixels 1744x1332 new native pixels 1731x1332 outer pixels 866x744 outer rest 2x12
xg_frame_resized old native pixels 1744x1332 new native pixels 1728x1332
adjust_frame_size old native pixels 1744x1332 new native pixels 1728x1332 old text pixels 1696x1332 new text pixels 1680x1332 old text chars 99x36 new text chars 98x36
x_new_font old char size 17x37 new char size 17x37 text chars 98x36 old text pixels 1680x1332 new text pixels 1666x1332
xg_frame_set_char_size old native pixels 1728x1332 new native pixels 1714x1332 outer pixels 858x744 outer rest 2x12
xg_frame_resized old native pixels 1728x1332 new native pixels 1712x1332
adjust_frame_size old native pixels 1728x1332 new native pixels 1712x1332 old text pixels 1680x1332 new text pixels 1664x1332 old text chars 98x36 new text chars 97x36
x_new_font old char size 17x37 new char size 17x37 text chars 97x36 old text pixels 1664x1332 new text pixels 1649x1332
xg_frame_set_char_size old native pixels 1712x1332 new native pixels 1697x1332 outer pixels 848x744 outer rest 0x12
xg_frame_resized old native pixels 1712x1332 new native pixels 1696x1332
adjust_frame_size old native pixels 1712x1332 new native pixels 1696x1332 old text pixels 1664x1332 new text pixels 1648x1332 old text chars 97x36 new text chars 96x36
x_new_font old char size 17x37 new char size 17x37 text chars 96x36 old text pixels 1648x1332 new text pixels 1632x1332
xg_frame_set_char_size old native pixels 1696x1332 new native pixels 1680x1332 outer pixels 840x744 outer rest 0x12
xg_frame_resized old native pixels 1696x1332 new native pixels 1680x1332
adjust_frame_size old native pixels 1696x1332 new native pixels 1680x1332 old text pixels 1648x1332 new text pixels 1632x1332 old text chars 96x36 new text chars 96x36
x_new_font old char size 17x37 new char size 17x37 text chars 96x36 old text pixels 1632x1332 new text pixels 1632x1332
x_new_font old char size 17x37 new char size 17x37 text chars 96x36 old text pixels 1632x1332 new text pixels 1632x1332
x_new_font old char size 17x37 new char size 17x37 text chars 96x36 old text pixels 1632x1332 new text pixels 1632x1332
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-05 14:14 ` Dmitry Gutov
@ 2023-01-05 16:59 ` martin rudalics
2023-01-05 19:08 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-05 16:59 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
> I'm not seeing much of a change, if any:
>
> - My init script stills results in a frame 84 columns wide.
>
> - The frame still shrinks at certain width ranges.
>
> Attached are the contents of foo after doing this:
>
> (set-frame-width nil 102)
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>
> The second line was evaluated 5 times.
Thanks. It seems that we really have to disentangle the entire size
hint stuff to get reasonable outer sizes. Next patch attached.
martin
[-- Attachment #2: x_scale_font.diff --]
[-- Type: text/x-patch, Size: 9644 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..0c8f08eb65 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,8 +1206,36 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ int base_width = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f)) / scale;
+ int base_height = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + FRAME_TOOLBAR_HEIGHT (f)) / scale;
+ int width_inc = FRAME_COLUMN_WIDTH (f) / scale;
+ int height_inc = FRAME_LINE_HEIGHT (f) / scale;
+
+ if (width_inc < 1)
+ width_inc = 1;
+
+ if (height_inc < 1)
+ height_inc = 1;
+
+ if (outer_width < base_width)
+ outer_width = base_width;
+
+ if (outer_height < base_height)
+ outer_height = base_height;
+
+ outer_width
+ = outer_width - ((outer_width - base_width) % width_inc);
+ outer_height
+ = outer_height - ((outer_height - base_height) % height_inc);
+ }
xg_wm_set_size_hint (f, 0, 0);
@@ -1317,6 +1355,30 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0 && size_hints.width_inc > 0
+ && outer_height > 0 && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width) % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height) % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -2028,6 +2090,24 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b2e689fe84 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-05 16:59 ` martin rudalics
@ 2023-01-05 19:08 ` Dmitry Gutov
2023-01-06 17:47 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-05 19:08 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]
On 05/01/2023 18:59, martin rudalics wrote:
> > I'm not seeing much of a change, if any:
> >
> > - My init script stills results in a frame 84 columns wide.
> >
> > - The frame still shrinks at certain width ranges.
> >
> > Attached are the contents of foo after doing this:
> >
> > (set-frame-width nil 102)
> > (set-face-attribute 'default nil :height 110 :family
> "InconsolataLGC")
> >
> > The second line was evaluated 5 times.
>
> Thanks. It seems that we really have to disentangle the entire size
> hint stuff to get reasonable outer sizes. Next patch attached.
- frame-text-cols from my init script is still ends up at 84 cols.
- 'emacs -Q' has its height shrinking again now.
- Its width is shrinking too, at certain widths. Not at 80 cols.
So I double-checked -- and both behaviors with the latest patch match
what the current (unpatched) emacs-29 does. I just hadn't noticed width
shrinking because I haven't tried to resize the frame first.
Attached are the contents of *foo* again after
(set-frame-width nil 102) ; x1
(set-face-attribute 'default nil :height 110 :family
"InconsolataLGC") ; x6
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 7970 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1884x1296 outer pixels 942x714 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1884x1296
adjust_frame_size old native pixels 1488x1296 new native pixels 1884x1296 old text pixels 1440x1296 new text pixels 1836x1296 old text chars 80x36 new text chars 102x36
x_new_font old char size 18x36 new char size 21x45 text chars 102x36 old text pixels 1836x1296 new text pixels 2142x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1884x1296 new native pixels 2190x1620 outer pixels 1094x858 outer rest 0x0
xg_frame_resized old native pixels 1884x1296 new native pixels 2188x1584
adjust_frame_size old native pixels 1884x1296 new native pixels 2188x1584 old text pixels 1836x1296 new text pixels 2140x1584 old text chars 102x36 new text chars 101x35
x_new_font old char size 21x45 new char size 17x37 text chars 101x35 old text pixels 2140x1584 new text pixels 1717x1295
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 2188x1584 new native pixels 1765x1295 outer pixels 880x696 outer rest 0x0
xg_frame_resized old native pixels 2188x1584 new native pixels 1760x1260
adjust_frame_size old native pixels 2188x1584 new native pixels 1760x1260 old text pixels 2140x1584 new text pixels 1712x1260 old text chars 101x35 new text chars 100x34
x_new_font old char size 17x37 new char size 17x37 text chars 100x34 old text pixels 1712x1260 new text pixels 1700x1258
xg_frame_set_char_size old native pixels 1760x1260 new native pixels 1748x1258 outer pixels 872x678 outer rest 0x0
xg_frame_resized old native pixels 1760x1260 new native pixels 1744x1224
adjust_frame_size old native pixels 1760x1260 new native pixels 1744x1224 old text pixels 1712x1260 new text pixels 1696x1224 old text chars 100x34 new text chars 99x33
x_new_font old char size 17x37 new char size 17x37 text chars 99x33 old text pixels 1696x1224 new text pixels 1683x1221
xg_frame_set_char_size old native pixels 1744x1224 new native pixels 1731x1221 outer pixels 864x660 outer rest 0x0
xg_frame_resized old native pixels 1744x1224 new native pixels 1728x1188
adjust_frame_size old native pixels 1744x1224 new native pixels 1728x1188 old text pixels 1696x1224 new text pixels 1680x1188 old text chars 99x33 new text chars 98x32
x_new_font old char size 17x37 new char size 17x37 text chars 98x32 old text pixels 1680x1188 new text pixels 1666x1184
xg_frame_set_char_size old native pixels 1728x1188 new native pixels 1714x1184 outer pixels 856x642 outer rest 0x0
xg_frame_resized old native pixels 1728x1188 new native pixels 1712x1152
adjust_frame_size old native pixels 1728x1188 new native pixels 1712x1152 old text pixels 1680x1188 new text pixels 1664x1152 old text chars 98x32 new text chars 97x31
x_new_font old char size 17x37 new char size 17x37 text chars 97x31 old text pixels 1664x1152 new text pixels 1649x1147
xg_frame_set_char_size old native pixels 1712x1152 new native pixels 1697x1147 outer pixels 848x624 outer rest 0x0
xg_frame_resized old native pixels 1712x1152 new native pixels 1696x1116
adjust_frame_size old native pixels 1712x1152 new native pixels 1696x1116 old text pixels 1664x1152 new text pixels 1648x1116 old text chars 97x31 new text chars 96x30
x_new_font old char size 17x37 new char size 17x37 text chars 96x30 old text pixels 1648x1116 new text pixels 1632x1110
xg_frame_set_char_size old native pixels 1696x1116 new native pixels 1680x1110 outer pixels 840x606 outer rest 0x0
xg_frame_resized old native pixels 1696x1116 new native pixels 1680x1080
adjust_frame_size old native pixels 1696x1116 new native pixels 1680x1080 old text pixels 1648x1116 new text pixels 1632x1080 old text chars 96x30 new text chars 96x29
x_new_font old char size 17x37 new char size 17x37 text chars 96x29 old text pixels 1632x1080 new text pixels 1632x1073
xg_frame_set_char_size old native pixels 1680x1080 new native pixels 1680x1073 outer pixels 840x588 outer rest 0x0
xg_frame_resized old native pixels 1680x1080 new native pixels 1680x1044
adjust_frame_size old native pixels 1680x1080 new native pixels 1680x1044 old text pixels 1632x1080 new text pixels 1632x1044 old text chars 96x29 new text chars 96x28
x_new_font old char size 17x37 new char size 17x37 text chars 96x28 old text pixels 1632x1044 new text pixels 1632x1036
xg_frame_set_char_size old native pixels 1680x1044 new native pixels 1680x1036 outer pixels 840x570 outer rest 0x0
xg_frame_resized old native pixels 1680x1044 new native pixels 1680x1008
adjust_frame_size old native pixels 1680x1044 new native pixels 1680x1008 old text pixels 1632x1044 new text pixels 1632x1008 old text chars 96x28 new text chars 96x27
x_new_font old char size 17x37 new char size 17x37 text chars 96x27 old text pixels 1632x1008 new text pixels 1632x999
xg_frame_set_char_size old native pixels 1680x1008 new native pixels 1680x999 outer pixels 840x552 outer rest 0x0
xg_frame_resized old native pixels 1680x1008 new native pixels 1680x972
adjust_frame_size old native pixels 1680x1008 new native pixels 1680x972 old text pixels 1632x1008 new text pixels 1632x972 old text chars 96x27 new text chars 96x26
x_new_font old char size 17x37 new char size 17x37 text chars 96x26 old text pixels 1632x972 new text pixels 1632x962
xg_frame_set_char_size old native pixels 1680x972 new native pixels 1680x962 outer pixels 840x534 outer rest 0x0
xg_frame_resized old native pixels 1680x972 new native pixels 1680x936
adjust_frame_size old native pixels 1680x972 new native pixels 1680x936 old text pixels 1632x972 new text pixels 1632x936 old text chars 96x26 new text chars 96x25
x_new_font old char size 17x37 new char size 17x37 text chars 96x25 old text pixels 1632x936 new text pixels 1632x925
xg_frame_set_char_size old native pixels 1680x936 new native pixels 1680x925 outer pixels 840x516 outer rest 0x0
xg_frame_resized old native pixels 1680x936 new native pixels 1680x900
adjust_frame_size old native pixels 1680x936 new native pixels 1680x900 old text pixels 1632x936 new text pixels 1632x900 old text chars 96x25 new text chars 96x24
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-05 19:08 ` Dmitry Gutov
@ 2023-01-06 17:47 ` martin rudalics
2023-01-06 18:14 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-06 17:47 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
> So I double-checked -- and both behaviors with the latest patch match
> what the current (unpatched) emacs-29 does.
With one subtle difference: In the unpatched version the WM shrinks the
size. In the patched version we do it ourselves and the WM does what we
are asking for.
x_new_font old char size 18x36 new char size 21x45 text chars 102x36 old text pixels 1836x1296 new text pixels 2142x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1884x1296 new native pixels 2190x1620 outer pixels 1094x858 outer rest 0x0
xg_frame_resized old native pixels 1884x1296 new native pixels 2188x1584
adjust_frame_size old native pixels 1884x1296 new native pixels 2188x1584 old text pixels 1836x1296 new text pixels 2140x1584 old text chars 102x36 new text chars 101x35
Here we round down the outer pixel sizes from 1095x876 to 1094x858 to
meet the WM requirements (outer rest is 0x0 in all your steps). So
incidentally, I reverse-engineered the WM. Now let's try to round up
instead. I'm quite confident that this will make your frames grow.
martin
[-- Attachment #2: x_scale_font.diff --]
[-- Type: text/x-patch, Size: 9812 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..0900fdfd72 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,8 +1206,41 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ int base_width = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f)) / scale;
+ int base_height = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + FRAME_TOOLBAR_HEIGHT (f)) / scale;
+ int width_inc = FRAME_COLUMN_WIDTH (f) / scale;
+ int height_inc = FRAME_LINE_HEIGHT (f) / scale;
+ int width_rest, height_rest;
+
+
+ if (width_inc < 1)
+ width_inc = 1;
+
+ if (height_inc < 1)
+ height_inc = 1;
+
+ if (outer_width < base_width)
+ outer_width = base_width;
+
+ if (outer_height < base_height)
+ outer_height = base_height;
+
+ width_rest = (outer_width - base_width) % width_inc;
+ height_rest = (outer_height - base_height) % height_inc;
+
+ if (width_rest > 0)
+ outer_width = outer_width + width_inc - width_rest;
+ if (height_rest > 0)
+ outer_height = outer_height + height_inc - height_rest;
+ }
xg_wm_set_size_hint (f, 0, 0);
@@ -1317,6 +1360,30 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0 && size_hints.width_inc > 0
+ && outer_height > 0 && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width) % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height) % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -2028,6 +2095,24 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b2e689fe84 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-06 17:47 ` martin rudalics
@ 2023-01-06 18:14 ` Dmitry Gutov
2023-01-06 22:40 ` Gregory Heytings
2023-01-07 9:15 ` martin rudalics
0 siblings, 2 replies; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-06 18:14 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]
On 06/01/2023 19:47, martin rudalics wrote:
> > So I double-checked -- and both behaviors with the latest patch match
> > what the current (unpatched) emacs-29 does.
>
> With one subtle difference: In the unpatched version the WM shrinks the
> size. In the patched version we do it ourselves and the WM does what we
> are asking for.
>
> x_new_font old char size 18x36 new char size 21x45 text chars 102x36
> old text pixels 1836x1296 new text pixels 2142x1620
> xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32
> fringes 16 borders 0 base width 34 width inc 10
> char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base
> height 88 height inc 22
> xg_frame_set_char_size old native pixels 1884x1296 new native pixels
> 2190x1620 outer pixels 1094x858 outer rest 0x0
> xg_frame_resized old native pixels 1884x1296 new native pixels 2188x1584
> adjust_frame_size old native pixels 1884x1296 new native pixels
> 2188x1584 old text pixels 1836x1296 new text pixels 2140x1584 old text
> chars 102x36 new text chars 101x35
>
> Here we round down the outer pixel sizes from 1095x876 to 1094x858 to
> meet the WM requirements (outer rest is 0x0 in all your steps). So
> incidentally, I reverse-engineered the WM. Now let's try to round up
> instead. I'm quite confident that this will make your frames grow.
Nope.
But this one seems the best one yet:
- No height shrinking.
- Width shrinks only once (at certain rare widths), and after that it is
stable.
Attaching *foo* after this:
(set-frame-width nil 113) ; x1
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC") ; x3
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 4070 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 2082x1296 outer pixels 1041x714 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 2082x1296
adjust_frame_size old native pixels 1488x1296 new native pixels 2082x1296 old text pixels 1440x1296 new text pixels 2034x1296 old text chars 80x36 new text chars 113x36
x_new_font old char size 18x36 new char size 21x45 text chars 113x36 old text pixels 2034x1296 new text pixels 2373x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 2082x1296 new native pixels 2421x1620 outer pixels 1214x880 outer rest 0x0
xg_frame_resized old native pixels 2082x1296 new native pixels 2428x1628
adjust_frame_size old native pixels 2082x1296 new native pixels 2428x1628 old text pixels 2034x1296 new text pixels 2380x1628 old text chars 113x36 new text chars 113x36
x_new_font old char size 21x45 new char size 17x37 text chars 113x36 old text pixels 2380x1628 new text pixels 1921x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 2428x1628 new native pixels 1969x1332 outer pixels 984x732 outer rest 0x0
xg_frame_resized old native pixels 2428x1628 new native pixels 1968x1332
adjust_frame_size old native pixels 2428x1628 new native pixels 1968x1332 old text pixels 2380x1628 new text pixels 1920x1332 old text chars 113x36 new text chars 112x36
x_new_font old char size 17x37 new char size 17x37 text chars 112x36 old text pixels 1920x1332 new text pixels 1904x1332
xg_frame_set_char_size old native pixels 1968x1332 new native pixels 1952x1332 outer pixels 976x732 outer rest 0x0
xg_frame_resized old native pixels 1968x1332 new native pixels 1952x1332
adjust_frame_size old native pixels 1968x1332 new native pixels 1952x1332 old text pixels 1920x1332 new text pixels 1904x1332 old text chars 112x36 new text chars 112x36
x_new_font old char size 17x37 new char size 17x37 text chars 112x36 old text pixels 1904x1332 new text pixels 1904x1332
x_new_font old char size 17x37 new char size 17x37 text chars 112x36 old text pixels 1904x1332 new text pixels 1904x1332
x_new_font old char size 17x37 new char size 17x37 text chars 112x36 old text pixels 1904x1332 new text pixels 1904x1332
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-06 18:14 ` Dmitry Gutov
@ 2023-01-06 22:40 ` Gregory Heytings
2023-01-06 23:45 ` Dmitry Gutov
` (2 more replies)
2023-01-07 9:15 ` martin rudalics
1 sibling, 3 replies; 169+ messages in thread
From: Gregory Heytings @ 2023-01-06 22:40 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, 52493, rpluim
Another user reported an apparently similar problem in bug#60585. It
disappears when scroll-bars are turned off. Is that by any chance also
the case for the problem you see, Dmitry? It's not a proper solution of
course, but it might perhaps hint at a proper solution.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-06 22:40 ` Gregory Heytings
@ 2023-01-06 23:45 ` Dmitry Gutov
2023-01-06 23:49 ` Gregory Heytings
2023-01-07 9:48 ` martin rudalics
2023-01-09 17:28 ` Eric Abrahamsen
2 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-06 23:45 UTC (permalink / raw)
To: Gregory Heytings; +Cc: martin rudalics, Eli Zaretskii, 52493, rpluim
On 07/01/2023 00:40, Gregory Heytings wrote:
>
> Another user reported an apparently similar problem in bug#60585. It
> disappears when scroll-bars are turned off. Is that by any chance also
> the case for the problem you see, Dmitry? It's not a proper solution of
> course, but it might perhaps hint at a proper solution.
I checked with and without the last patch (the base behavior of
emacs-29): the scroll-bar doesn't seem to make a difference.
The original complaint was about height shrinking anyway, and the only
scroll-bar visible by default is the vertical one (on the right). It
doesn't seem likely that it would affect the calculation of the window's
height.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-06 23:45 ` Dmitry Gutov
@ 2023-01-06 23:49 ` Gregory Heytings
2023-01-07 0:48 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Gregory Heytings @ 2023-01-06 23:49 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, 52493, rpluim
[-- Attachment #1: Type: text/plain, Size: 856 bytes --]
>> Another user reported an apparently similar problem in bug#60585. It
>> disappears when scroll-bars are turned off. Is that by any chance also
>> the case for the problem you see, Dmitry? It's not a proper solution
>> of course, but it might perhaps hint at a proper solution.
>
> I checked with and without the last patch (the base behavior of
> emacs-29): the scroll-bar doesn't seem to make a difference.
>
Okay, thanks.
>
> The original complaint was about height shrinking anyway, and the only
> scroll-bar visible by default is the vertical one (on the right). It
> doesn't seem likely that it would affect the calculation of the window's
> height.
>
Hmmm... Then can you perhaps also try with and without the menu-bar and
the tool-bar? Unless both are already disabled in your configuration, of
course.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-06 23:49 ` Gregory Heytings
@ 2023-01-07 0:48 ` Dmitry Gutov
2023-01-07 0:50 ` Gregory Heytings
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-07 0:48 UTC (permalink / raw)
To: Gregory Heytings; +Cc: martin rudalics, Eli Zaretskii, 52493, rpluim
On 07/01/2023 01:49, Gregory Heytings wrote:
>> The original complaint was about height shrinking anyway, and the only
>> scroll-bar visible by default is the vertical one (on the right). It
>> doesn't seem likely that it would affect the calculation of the
>> window's height.
>>
>
> Hmmm... Then can you perhaps also try with and without the menu-bar and
> the tool-bar? Unless both are already disabled in your configuration,
> of course.
IIRC think we've tried this already in this thread.
Anyway, tested this again: no change.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-07 0:48 ` Dmitry Gutov
@ 2023-01-07 0:50 ` Gregory Heytings
0 siblings, 0 replies; 169+ messages in thread
From: Gregory Heytings @ 2023-01-07 0:50 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, 52493, rpluim
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
>>> The original complaint was about height shrinking anyway, and the only
>>> scroll-bar visible by default is the vertical one (on the right). It
>>> doesn't seem likely that it would affect the calculation of the
>>> window's height.
>>
>> Hmmm... Then can you perhaps also try with and without the menu-bar
>> and the tool-bar? Unless both are already disabled in your
>> configuration, of course.
>
> IIRC think we've tried this already in this thread.
>
I followed this thread but I forgot that, sorry.
>
> Anyway, tested this again: no change.
>
Okay, so it's something similar but different from bug#60585.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-06 18:14 ` Dmitry Gutov
2023-01-06 22:40 ` Gregory Heytings
@ 2023-01-07 9:15 ` martin rudalics
2023-01-09 0:12 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-07 9:15 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]
> - Width shrinks only once (at certain rare widths), and after that it is stable.
x_new_font old char size 21x45 new char size 17x37 text chars 113x36 old text pixels 2380x1628 new text pixels 1921x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 2428x1628 new native pixels 1969x1332 outer pixels 984x732 outer rest 0x0
xg_frame_resized old native pixels 2428x1628 new native pixels 1968x1332
adjust_frame_size old native pixels 2428x1628 new native pixels 1968x1332 old text pixels 2380x1628 new text pixels 1920x1332 old text chars 113x36 new text chars 112x36
Here we calculate outer_width as (/ (+ 1921 32 16) 2) that is 984 and
outer_height as (/ (+ 1332 50 82) 2) that is 732. Since 1921 is impair
we lose one pixel due to scaling.
Now width_rest calculated as (% (- 984 32) 8) and height_rest calculated
as (% (- 732 84) 18) are both zero so we do not do any compensating and
lose one column after resizing.
I attach a version to handle this particular case. Let's see whether it
breaks something else.
martin
[-- Attachment #2: x_scale_font.diff --]
[-- Type: text/x-patch, Size: 10057 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..167329ccb8 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,8 +1206,42 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ int base_width_unscaled = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f));
+ int base_width_scaled = base_width_unscaled / scale;
+ int base_height_unscaled = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + FRAME_TOOLBAR_HEIGHT (f));
+ int base_height_scaled = base_height_unscaled / scale;
+ int width_inc = FRAME_COLUMN_WIDTH (f) / scale;
+ int height_inc = FRAME_LINE_HEIGHT (f) / scale;
+ int width_rest, height_rest;
+
+ if (width_inc < 1)
+ width_inc = 1;
+
+ if (height_inc < 1)
+ height_inc = 1;
+
+ if (outer_width < base_width_scaled)
+ outer_width = base_width_scaled;
+
+ if (outer_height < base_height_scaled)
+ outer_height = base_height_scaled;
+
+ width_rest = (outer_width - base_width_scaled) % width_inc;
+ height_rest = (outer_height - base_height_scaled) % height_inc;
+
+ if (width_rest > 0 || (base_width_unscaled % scale) > 0)
+ outer_width = outer_width + width_inc - width_rest;
+ if (height_rest > 0 || (base_height_unscaled % scale) > 0)
+ outer_height = outer_height + height_inc - height_rest;
+ }
xg_wm_set_size_hint (f, 0, 0);
@@ -1317,6 +1361,30 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0 && size_hints.width_inc > 0
+ && outer_height > 0 && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width) % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height) % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -2028,6 +2096,24 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b2e689fe84 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-06 22:40 ` Gregory Heytings
2023-01-06 23:45 ` Dmitry Gutov
@ 2023-01-07 9:48 ` martin rudalics
2023-01-08 9:45 ` martin rudalics
2023-01-08 22:38 ` Gregory Heytings
2023-01-09 17:28 ` Eric Abrahamsen
2 siblings, 2 replies; 169+ messages in thread
From: martin rudalics @ 2023-01-07 9:48 UTC (permalink / raw)
To: Gregory Heytings, Dmitry Gutov; +Cc: Eli Zaretskii, 52493, rpluim
> Another user reported an apparently similar problem in bug#60585.
Looking at that thread I noticed the following:
1. Why does
I have just pulled latest Emacs and used with -Q option:
`global-text-scale-adjust' which I have used last days upon first
startup.
try to adjust the frame size in the first place? IIUC it should do that
iff 'global-text-scale-adjust-resizes-frames' is non-nil and that option
is nil with emacs -Q.
2. This argument brought by gijsbers on
https://github.com/ice-wm/icewm/issues/115
If you look at the height of 761 then 761 - 71 is not a multiple of the vertical increment 22.
Hence the height is adjusted to 753, because (753 - 71) / 22 = 31 exactly.
Maybe the size is adjusted to match the Inc and Base.
is valid. We'd have to investigate how we produce these values.
3. OTOH this argument again brought by gijsbers on
https://github.com/ice-wm/icewm/issues/115
IceWM historically has ignored the USSize field in the WM_NORMAL_HINTS
property. To enforce a size an app must set both the PMinSize and the
PMaxSize to the same value. Because there is no PMaxSize, icewm is free
to adjust the size to a value which is in accordance to the emacs
provided PBaseSize and PResizeInc. See the ICCCM for details. IceWM is
still standards conformant. It just has a different interpretation than
other WMs.
is not valid IMO. min_width and min_height specify the minimum sizes
that should be applied, for example, when the user tries to shrink a
window with the mouse by dragging one of its borders or edges. Emacs
does not handle these reasonably well but here I can see them with
applications like Firefox or Thunderbird. Together with max_width and
max_height these can be used to specify a fixed-size window. But "To
enforce a size an app must set both the PMinSize and the PMaxSize to the
same value." is something I cannot derive from any sources I have on
this subject.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-07 9:48 ` martin rudalics
@ 2023-01-08 9:45 ` martin rudalics
2023-01-08 22:38 ` Gregory Heytings
1 sibling, 0 replies; 169+ messages in thread
From: martin rudalics @ 2023-01-08 9:45 UTC (permalink / raw)
To: Gregory Heytings, Dmitry Gutov; +Cc: Eli Zaretskii, 52493, rpluim
> 2. This argument brought by gijsbers on
> https://github.com/ice-wm/icewm/issues/115
>
> If you look at the height of 761 then 761 - 71 is not a multiple of the vertical increment 22.
> Hence the height is adjusted to 753, because (753 - 71) / 22 = 31 exactly.
> Maybe the size is adjusted to match the Inc and Base.
>
> is valid. We'd have to investigate how we produce these values.
This ordering in EmacsFrameResize
change_frame_size (f, ew->core.width, ew->core.height,
false, true, false);
if (get_wm_shell (widget))
update_wm_hints (get_wm_shell (widget), ew);
makes no sense. We first ask for a size change and then update the size
hints.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-07 9:48 ` martin rudalics
2023-01-08 9:45 ` martin rudalics
@ 2023-01-08 22:38 ` Gregory Heytings
2023-01-08 23:23 ` Gregory Heytings
2023-01-09 10:09 ` martin rudalics
1 sibling, 2 replies; 169+ messages in thread
From: Gregory Heytings @ 2023-01-08 22:38 UTC (permalink / raw)
To: martin rudalics; +Cc: Eli Zaretskii, 52493, rpluim, Dmitry Gutov
>
> OTOH this argument again brought by gijsbers on
> https://github.com/ice-wm/icewm/issues/115
>
> IceWM historically has ignored the USSize field in the WM_NORMAL_HINTS
> property. To enforce a size an app must set both the PMinSize and the
> PMaxSize to the same value. Because there is no PMaxSize, icewm is free
> to adjust the size to a value which is in accordance to the emacs
> provided PBaseSize and PResizeInc. See the ICCCM for details. IceWM is
> still standards conformant. It just has a different interpretation than
> other WMs.
>
> is not valid IMO. min_width and min_height specify the minimum sizes
> that should be applied, for example, when the user tries to shrink a
> window with the mouse by dragging one of its borders or edges. Emacs
> does not handle these reasonably well but here I can see them with
> applications like Firefox or Thunderbird. Together with max_width and
> max_height these can be used to specify a fixed-size window. But "To
> enforce a size an app must set both the PMinSize and the PMaxSize to the
> same value." is something I cannot derive from any sources I have on
> this subject.
>
As I just said in bug#60585, the bug seems to be specific to that window
manager (or at least to a few window managers), and disabling scroll-bars
or setting frame-resize-pixelwise to t fixes that problem. OTOH, what
gijsbers says does not seem unreasonable to me (but I'm not at all an
ICCCM expert), and I see here
https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html
that "Window Managers can identify a non-resizable window because its
minimum and maximum size in WM_NORMAL_HINTS will be the same." and that
"Windows can indicate that they are non-resizable by setting minheight =
maxheight and minwidth = maxwidth in the ICCCM WM_NORMAL_HINTS property."
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-08 22:38 ` Gregory Heytings
@ 2023-01-08 23:23 ` Gregory Heytings
2023-01-09 10:09 ` martin rudalics
1 sibling, 0 replies; 169+ messages in thread
From: Gregory Heytings @ 2023-01-08 23:23 UTC (permalink / raw)
To: martin rudalics; +Cc: Eli Zaretskii, 52493, rpluim, Dmitry Gutov
>
> As I just said in bug#60585, the bug seems to be specific to that window
> manager (or at least to a few window managers), and disabling
> scroll-bars or setting frame-resize-pixelwise to t fixes that problem.
>
I found another window manager which behaves similarly: Openbox. I'm not
100% sure the cause is the same, but the two workarounds above also fix
that problem under Openbox, and I see this in its source code:
/*! The minimum size of the client window
If the min is > the max, then the window is not resizable
*/
Size min_size;
/*! The maximum size of the client window
If the min is > the max, then the window is not resizable
*/
Size max_size;
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-07 9:15 ` martin rudalics
@ 2023-01-09 0:12 ` Dmitry Gutov
2023-01-09 10:07 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-09 0:12 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 2916 bytes --]
On 07/01/2023 11:15, martin rudalics wrote:
> > - Width shrinks only once (at certain rare widths), and after that it
> is stable.
>
> x_new_font old char size 21x45 new char size 17x37 text chars 113x36
> old text pixels 2380x1628 new text pixels 1921x1332
> xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32
> fringes 16 borders 0 base width 32 width inc 8
> char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base
> height 84 height inc 18
> xg_frame_set_char_size old native pixels 2428x1628 new native pixels
> 1969x1332 outer pixels 984x732 outer rest 0x0
> xg_frame_resized old native pixels 2428x1628 new native pixels 1968x1332
> adjust_frame_size old native pixels 2428x1628 new native pixels
> 1968x1332 old text pixels 2380x1628 new text pixels 1920x1332 old text
> chars 113x36 new text chars 112x36
>
> Here we calculate outer_width as (/ (+ 1921 32 16) 2) that is 984 and
> outer_height as (/ (+ 1332 50 82) 2) that is 732. Since 1921 is impair
> we lose one pixel due to scaling.
>
> Now width_rest calculated as (% (- 984 32) 8) and height_rest calculated
> as (% (- 732 84) 18) are both zero so we do not do any compensating and
> lose one column after resizing.
>
> I attach a version to handle this particular case. Let's see whether it
> breaks something else.
Thanks, it's almost perfect:
- My init script ends up at 80x36 pretty reliably, after a bunch of
frame resizings.
- There seems to be no scenario for successive set-face-attribute calls
to keep resizing the frame.
Here's a few more complex ones that seem off:
;;; Scenario 1
;; 1.
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
;; to get the frame sized right
;; call (set-frame-size nil 80 36)
;; or (set-frame-size nil 160 36)
;; or don't if the frame is at that size already (which it should be)
;; (frame-text-lines) returns 36
;; 2. !important
;; manually resize the frame using the mouse to have one line less
;; (frame-text-lines) will continue to return 36
;; 3.
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
;; The frame will get resized to the previous dimensions.
;; Note that the return value of (frame-text-lines) doesn't change.
;;; Scenario 2
;; Do the same steps, except for the width instead of height.
;; Optionally, use different dimensions:
;; (set-frame-size nil 160 36)
;; These are the only ones I found to have this effect for both dimensions.
;; I'm guessing 160x72 will work as well, but that's bigger than my screen.
;;; Scenario 3
;; 1. From Scenario 1.
;; 2. Resize with the mouse both width and height, to have 1 less.
;; 3. Eval the set-frame-attribute form. Nothing happens, the frame size
stays the same.
;; Step 2 still doesn't change the return values of frame-text-cols/lines.
Attaching the contents of foo for all scenarios.
These are very much non-critical, of course.
[-- Attachment #2: foo-scenario-1.txt --]
[-- Type: text/plain, Size: 3928 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 874x880 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1748x1628
adjust_frame_size old native pixels 1488x1296 new native pixels 1748x1628 old text pixels 1440x1296 new text pixels 1700x1628 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1700x1628 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1748x1628 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1748x1628 new native pixels 1424x1368
adjust_frame_size old native pixels 1748x1628 new native pixels 1424x1368 old text pixels 1700x1628 new text pixels 1376x1368 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1424x1368 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1424x1368 new native pixels 1424x1332
adjust_frame_size old native pixels 1424x1368 new native pixels 1424x1332 old text pixels 1376x1368 new text pixels 1376x1332 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1376x1332 new text pixels 1360x1332
xg_frame_set_char_size old native pixels 1424x1332 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1424x1332 new native pixels 1424x1368
adjust_frame_size old native pixels 1424x1332 new native pixels 1424x1368 old text pixels 1376x1332 new text pixels 1376x1368 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1376x1368 new text pixels 1360x1332
xg_frame_set_char_size old native pixels 1424x1368 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
[-- Attachment #3: foo-scenario-2.txt --]
[-- Type: text/plain, Size: 3813 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 874x880 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1748x1628
adjust_frame_size old native pixels 1488x1296 new native pixels 1748x1628 old text pixels 1440x1296 new text pixels 1700x1628 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1700x1628 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1748x1628 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1748x1628 new native pixels 1424x1368
adjust_frame_size old native pixels 1748x1628 new native pixels 1424x1368 old text pixels 1700x1628 new text pixels 1376x1368 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1424x1368 new native pixels 1408x1368
adjust_frame_size old native pixels 1424x1368 new native pixels 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1368 new text pixels 1360x1332
xg_frame_set_char_size old native pixels 1408x1368 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1408x1368 new native pixels 1424x1368
adjust_frame_size old native pixels 1408x1368 new native pixels 1424x1368 old text pixels 1360x1368 new text pixels 1376x1368 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1376x1368 new text pixels 1360x1332
xg_frame_set_char_size old native pixels 1424x1368 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
[-- Attachment #4: foo-scenario-3.txt --]
[-- Type: text/plain, Size: 3583 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 874x880 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1748x1628
adjust_frame_size old native pixels 1488x1296 new native pixels 1748x1628 old text pixels 1440x1296 new text pixels 1700x1628 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1700x1628 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1748x1628 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1748x1628 new native pixels 1424x1368
adjust_frame_size old native pixels 1748x1628 new native pixels 1424x1368 old text pixels 1700x1628 new text pixels 1376x1368 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1424x1368 new native pixels 1408x1368
adjust_frame_size old native pixels 1424x1368 new native pixels 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1408x1368 new native pixels 1408x1332
adjust_frame_size old native pixels 1408x1368 new native pixels 1408x1332 old text pixels 1360x1368 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-09 0:12 ` Dmitry Gutov
@ 2023-01-09 10:07 ` martin rudalics
2023-01-09 20:50 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-09 10:07 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
> Here's a few more complex ones that seem off:
>
> ;;; Scenario 1
> ;; 1.
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
> ;; to get the frame sized right
> ;; call (set-frame-size nil 80 36)
> ;; or (set-frame-size nil 160 36)
> ;; or don't if the frame is at that size already (which it should be)
> ;; (frame-text-lines) returns 36
Note that a frame with the "right height" is only one where
(= (* (frame-char-height) (frame-text-lines)) (frame-text-height))
holds. Here, for example, a maximized frame does not have the "right
height".
> ;; 2. !important
> ;; manually resize the frame using the mouse to have one line less
> ;; (frame-text-lines) will continue to return 36
Manually resizing a frame with a scaling factor of 2 will be off by one
pixel when the font has impair height. There is nothing we can do about
that - the height increment we send to the WM must be an integer. The
result is that while the frame's pixel height changes and so does the
height of the frame on the display, the height in lines stays the same.
> ;; 3.
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
> ;; The frame will get resized to the previous dimensions.
> ;; Note that the return value of (frame-text-lines) doesn't change.
Hopefully so. It's crucial that all executions of
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
starting with the same number of text lines result in the same pixel and
text heights.
> ;;; Scenario 2
> ;; Do the same steps, except for the width instead of height.
> ;; Optionally, use different dimensions:
> ;; (set-frame-size nil 160 36)
> ;; These are the only ones I found to have this effect for both dimensions.
> ;; I'm guessing 160x72 will work as well, but that's bigger than my screen.
IIUC this scenario is just a variation of the first one - with a
character size of 17x37 you will lose one pixel in both dimensions.
> ;;; Scenario 3
> ;; 1. From Scenario 1.
> ;; 2. Resize with the mouse both width and height, to have 1 less.
> ;; 3. Eval the set-frame-attribute form. Nothing happens, the frame size stays the same.
> ;; Step 2 still doesn't change the return values of frame-text-cols/lines.
IIUC these steps
xg_frame_resized old native pixels 1424x1368 new native pixels 1408x1368
adjust_frame_size old native pixels 1424x1368 new native pixels 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1408x1368 new native pixels 1408x1332
adjust_frame_size old native pixels 1408x1368 new native pixels 1408x1332 old text pixels 1360x1368 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
represent two mouse operations that resize the frame by 16 pixels, first
the width, then the height. Both are less that the character size so
while again the size of the frame should have changed, the numbers of
text characters didn't.
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
Here we have (= (* 80 17) 1360) and (= (* 36 37) 1332) so
adjust_frame_size triggered by x_new_font correctly decides that the
frame size should stay the same.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-08 22:38 ` Gregory Heytings
2023-01-08 23:23 ` Gregory Heytings
@ 2023-01-09 10:09 ` martin rudalics
1 sibling, 0 replies; 169+ messages in thread
From: martin rudalics @ 2023-01-09 10:09 UTC (permalink / raw)
To: Gregory Heytings; +Cc: Eli Zaretskii, 52493, rpluim, Dmitry Gutov
> As I just said in bug#60585, the bug seems to be specific to that
> window manager (or at least to a few window managers), and disabling
> scroll-bars or setting frame-resize-pixelwise to t fixes that problem.
I'm quite sure that even with scroll bars disabled the problem can
happen. 'frame-resize-pixelwise' OTOH means that size increments can be
ignored by the WM so that should fix the problem indeed.
> OTOH, what gijsbers says does not seem unreasonable to me (but I'm not
> at all an ICCCM expert), and I see here
>
> https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html
>
> that "Window Managers can identify a non-resizable window because its
> minimum and maximum size in WM_NORMAL_HINTS will be the same." and
> that "Windows can indicate that they are non-resizable by setting
> minheight = maxheight and minwidth = maxwidth in the ICCCM
> WM_NORMAL_HINTS property."
Right. But we eventually do want to resize that frame later and as soon
as the new character sizes make it to the size hints we see the effect.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-06 22:40 ` Gregory Heytings
2023-01-06 23:45 ` Dmitry Gutov
2023-01-07 9:48 ` martin rudalics
@ 2023-01-09 17:28 ` Eric Abrahamsen
2 siblings, 0 replies; 169+ messages in thread
From: Eric Abrahamsen @ 2023-01-09 17:28 UTC (permalink / raw)
To: Gregory Heytings
Cc: martin rudalics, Eli Zaretskii, 52493, rpluim, Dmitry Gutov
Gregory Heytings <gregory@heytings.org> writes:
> Another user reported an apparently similar problem in bug#60585. It
> disappears when scroll-bars are turned off. Is that by any chance
> also the case for the problem you see, Dmitry? It's not a proper
> solution of course, but it might perhaps hint at a proper solution.
I've been following along this bug report because I was seeing something
similar. I'm using the sway Wayland wm, with this in my init:
(add-to-list 'default-frame-alist '(font . "Inconsolata-12"))
Turning scroll bars off also fixed it for me. I can't even quite
describe what "it" was, but lettering looked a little vertically
stretched and "ugly".
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-09 10:07 ` martin rudalics
@ 2023-01-09 20:50 ` Dmitry Gutov
2023-01-10 12:05 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-09 20:50 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 09/01/2023 12:07, martin rudalics wrote:
> > Here's a few more complex ones that seem off:
> >
> > ;;; Scenario 1
> > ;; 1.
> > (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
> > ;; to get the frame sized right
> > ;; call (set-frame-size nil 80 36)
> > ;; or (set-frame-size nil 160 36)
> > ;; or don't if the frame is at that size already (which it should be)
> > ;; (frame-text-lines) returns 36
>
> Note that a frame with the "right height" is only one where
>
> (= (* (frame-char-height) (frame-text-lines)) (frame-text-height))
>
> holds. Here, for example, a maximized frame does not have the "right
> height".
Yeah ok, but none of the frames were maximized in those scenarios. And
the resizing by mouse "snapped" to the provided grid.
> > ;; 2. !important
> > ;; manually resize the frame using the mouse to have one line less
> > ;; (frame-text-lines) will continue to return 36
>
> Manually resizing a frame with a scaling factor of 2 will be off by one
> pixel when the font has impair height. There is nothing we can do about
> that - the height increment we send to the WM must be an integer. The
> result is that while the frame's pixel height changes and so does the
> height of the frame on the display, the height in lines stays the same.
I'm probably out of my depth here, but with 2x scaling, shouldn't the
height increment just be 2x larger than the original one? If N is
integer, 2xN must be an integer as well.
> > ;; 3.
> > (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
> > ;; The frame will get resized to the previous dimensions.
> > ;; Note that the return value of (frame-text-lines) doesn't change.
>
> Hopefully so. It's crucial that all executions of
>
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
>
> starting with the same number of text lines result in the same pixel and
> text heights.
Pixel dimensions do change in this scenario. But not the reported text
height.
> > ;;; Scenario 2
> > ;; Do the same steps, except for the width instead of height.
> > ;; Optionally, use different dimensions:
> > ;; (set-frame-size nil 160 36)
> > ;; These are the only ones I found to have this effect for both
> dimensions.
> > ;; I'm guessing 160x72 will work as well, but that's bigger than my
> screen.
>
> IIUC this scenario is just a variation of the first one - with a
> character size of 17x37 you will lose one pixel in both dimensions.
Yes, just width instead of height.
> > ;;; Scenario 3
> > ;; 1. From Scenario 1.
> > ;; 2. Resize with the mouse both width and height, to have 1 less.
> > ;; 3. Eval the set-frame-attribute form. Nothing happens, the frame
> size stays the same.
> > ;; Step 2 still doesn't change the return values of
> frame-text-cols/lines.
>
> IIUC these steps
>
> xg_frame_resized old native pixels 1424x1368 new native pixels 1408x1368
> adjust_frame_size old native pixels 1424x1368 new native pixels
> 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text
> chars 80x36 new text chars 80x36
> xg_frame_resized old native pixels 1408x1368 new native pixels 1408x1332
> adjust_frame_size old native pixels 1408x1368 new native pixels
> 1408x1332 old text pixels 1360x1368 new text pixels 1360x1332 old text
> chars 80x36 new text chars 80x36
>
> represent two mouse operations that resize the frame by 16 pixels, first
> the width, then the height. Both are less that the character size so
> while again the size of the frame should have changed, the numbers of
> text characters didn't.
The frame size didn't change either, however.
> x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old
> text pixels 1360x1332 new text pixels 1360x1332
>
> x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old
> text pixels 1360x1332 new text pixels 1360x1332
>
> Here we have (= (* 80 17) 1360) and (= (* 36 37) 1332) so
> adjust_frame_size triggered by x_new_font correctly decides that the
> frame size should stay the same.
All right. Where do we go from here?
The usability problems remaining are very minor, so if you're saying
Emacs is going right thing, we might as well go with the latest patch
and call it a day. Thank you.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-09 20:50 ` Dmitry Gutov
@ 2023-01-10 12:05 ` martin rudalics
2023-01-12 0:34 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-10 12:05 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
[-- Attachment #1: Type: text/plain, Size: 3058 bytes --]
>> Here, for example, a maximized frame does not have the "right
>> height".
>
> Yeah ok, but none of the frames were maximized in those scenarios.
I mentioned it because that's how it usually can be reproduced easily
with emacs -Q.
> And the resizing by mouse "snapped" to the provided grid.
The resolution of that grid is specified by Emacs via these four lines
size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
size_hints.width_inc /= scale;
size_hints.height_inc /= scale;
If you scale by 2 and you have a font with impair sizes, you lose one
pixel and the grid will be smaller than the character size. If we round
up in the last two lines, the grid will be larger than the character
size by one pixel. If we do not scale, the grid will have a resolution
of two characters. What would you prefer?
> I'm probably out of my depth here, but with 2x scaling, shouldn't the
> height increment just be 2x larger than the original one? If N is
> integer, 2xN must be an integer as well.
You're scaling down whatever you display probably because otherwise
displayed objects would appear to small for your eyes. That is, while
Emacs lives in a 4000x2000 pixels world say, it's presented to your eyes
in a 2000x1000 pixels form.
> Pixel dimensions do change in this scenario. But not the reported text height.
Right. That's what rounding is all about
>> xg_frame_resized old native pixels 1424x1368 new native pixels 1408x1368
>> adjust_frame_size old native pixels 1424x1368 new native pixels 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text chars 80x36 new text chars 80x36
>> xg_frame_resized old native pixels 1408x1368 new native pixels 1408x1332
>> adjust_frame_size old native pixels 1408x1368 new native pixels 1408x1332 old text pixels 1360x1368 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
>>
>> represent two mouse operations that resize the frame by 16 pixels, first
>> the width, then the height. Both are less that the character size so
>> while again the size of the frame should have changed, the numbers of
>> text characters didn't.
>
> The frame size didn't change either, however.
That's not what the numbers say. The first time, the width changed from
1424 to 1408 pixels. The second time, the height changed from 1368 to
1332 pixels.
> All right. Where do we go from here?
I think you should use the attached in your daily work. It's the same
as before with the tracing code omitted. If there are bigger problems,
use the former patch and post me the contents of *foo*.
> The usability problems remaining are very minor, so if you're saying Emacs is going right thing, we might as well go with the latest patch and call it a day. Thank you.
Note that I won't install anything in the near future because I've given
up synching with the repository. The last time I did, I spent a couple
of weeks to fix whatever got broken here.
martin
[-- Attachment #2: x_scale_font_only.diff --]
[-- Type: text/x-patch, Size: 2035 bytes --]
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..167329ccb8 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1174,6 +1182,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,8 +1206,42 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ int base_width_unscaled = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f));
+ int base_width_scaled = base_width_unscaled / scale;
+ int base_height_unscaled = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + FRAME_TOOLBAR_HEIGHT (f));
+ int base_height_scaled = base_height_unscaled / scale;
+ int width_inc = FRAME_COLUMN_WIDTH (f) / scale;
+ int height_inc = FRAME_LINE_HEIGHT (f) / scale;
+ int width_rest, height_rest;
+
+ if (width_inc < 1)
+ width_inc = 1;
+
+ if (height_inc < 1)
+ height_inc = 1;
+
+ if (outer_width < base_width_scaled)
+ outer_width = base_width_scaled;
+
+ if (outer_height < base_height_scaled)
+ outer_height = base_height_scaled;
+
+ width_rest = (outer_width - base_width_scaled) % width_inc;
+ height_rest = (outer_height - base_height_scaled) % height_inc;
+
+ if (width_rest > 0 || (base_width_unscaled % scale) > 0)
+ outer_width = outer_width + width_inc - width_rest;
+ if (height_rest > 0 || (base_height_unscaled % scale) > 0)
+ outer_height = outer_height + height_inc - height_rest;
+ }
xg_wm_set_size_hint (f, 0, 0);
^ permalink raw reply related [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-10 12:05 ` martin rudalics
@ 2023-01-12 0:34 ` Dmitry Gutov
2023-01-12 9:31 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-12 0:34 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 10/01/2023 14:05, martin rudalics wrote:
> >> Here, for example, a maximized frame does not have the "right
> >> height".
> >
> > Yeah ok, but none of the frames were maximized in those scenarios.
>
> I mentioned it because that's how it usually can be reproduced easily
> with emacs -Q.
>
> > And the resizing by mouse "snapped" to the provided grid.
>
> The resolution of that grid is specified by Emacs via these four lines
>
> size_hints.width_inc = frame_resize_pixelwise ? 1 :
> FRAME_COLUMN_WIDTH (f);
> size_hints.height_inc = frame_resize_pixelwise ? 1 :
> FRAME_LINE_HEIGHT (f);
>
> size_hints.width_inc /= scale;
> size_hints.height_inc /= scale;
>
> If you scale by 2 and you have a font with impair sizes, you lose one
> pixel and the grid will be smaller than the character size. If we round
> up in the last two lines, the grid will be larger than the character
> size by one pixel.
So... the window manager works with "unscaled" pixels it has to multiply
by 2? That's why we try to send half the actual value?
> If we do not scale, the grid will have a resolution
> of two characters. What would you prefer?
The current behavior seems more intuitive. Too bad we can't make it
behave precisely, but oh well.
> > I'm probably out of my depth here, but with 2x scaling, shouldn't the
> > height increment just be 2x larger than the original one? If N is
> > integer, 2xN must be an integer as well.
>
> You're scaling down whatever you display probably because otherwise
> displayed objects would appear to small for your eyes. That is, while
> Emacs lives in a 4000x2000 pixels world say, it's presented to your eyes
> in a 2000x1000 pixels form.
That makes sense.
> > Pixel dimensions do change in this scenario. But not the reported
> text height.
>
> Right. That's what rounding is all about
>
> >> xg_frame_resized old native pixels 1424x1368 new native pixels
> 1408x1368
> >> adjust_frame_size old native pixels 1424x1368 new native pixels
> 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text
> chars 80x36 new text chars 80x36
> >> xg_frame_resized old native pixels 1408x1368 new native pixels
> 1408x1332
> >> adjust_frame_size old native pixels 1408x1368 new native pixels
> 1408x1332 old text pixels 1360x1368 new text pixels 1360x1332 old text
> chars 80x36 new text chars 80x36
> >>
> >> represent two mouse operations that resize the frame by 16 pixels,
> first
> >> the width, then the height. Both are less that the character size so
> >> while again the size of the frame should have changed, the numbers of
> >> text characters didn't.
> >
> > The frame size didn't change either, however.
>
> That's not what the numbers say. The first time, the width changed from
> 1424 to 1408 pixels. The second time, the height changed from 1368 to
> 1332 pixels.
I was talking about the Scenario 3: the frame dimensions (pixelwise)
didn't change in it.
> > All right. Where do we go from here?
>
> I think you should use the attached in your daily work. It's the same
> as before with the tracing code omitted. If there are bigger problems,
> use the former patch and post me the contents of *foo*.
Thank you, but I'm not sure my work is particularly affected by it.
Having the frame width settle on 80 chars is pretty nice, I suppose, but
after that I usually maximize the frame anyway. Or make it take half the
screen.
I believe getting the details right is important, but it's probably not
worth too much as a personal patch.
It would be nice, though, to avoid the frame size contortions during
startup. I think it goes through 4 different sizes, at least. This patch
doesn't seem to change the number of transitions, however.
> > The usability problems remaining are very minor, so if you're saying
> Emacs is going right thing, we might as well go with the latest patch
> and call it a day. Thank you.
>
> Note that I won't install anything in the near future because I've given
> up synching with the repository. The last time I did, I spent a couple
> of weeks to fix whatever got broken here.
Is there anything I can do to help? Your patch applies cleanly to the
emacs-29 branch, at least.
If you send the patch together with a commit message, I can install it
no problem (to the release branch or to master, whatever it deemed to be
the best in this case).
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-12 0:34 ` Dmitry Gutov
@ 2023-01-12 9:31 ` martin rudalics
2023-01-12 9:46 ` Robert Pluim
2023-01-13 0:36 ` Dmitry Gutov
0 siblings, 2 replies; 169+ messages in thread
From: martin rudalics @ 2023-01-12 9:31 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
> So... the window manager works with "unscaled" pixels it has to multiply by 2? That's why we try to send half the actual value?
We send half the actual value because Robert (IIRC) has coded it that
way. I never scale here and so I can't tell whether that's the right
approach. Have a look at Bug#20432 where Jan says something about GTK
messing things up.
> I was talking about the Scenario 3: the frame dimensions (pixelwise) didn't change in it.
Please tell me precisely where it didn't change. The only cases where
it did not change are the last two lines below. And these represent the
cases we wanted to fix.
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 88 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 874x880 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1748x1628
adjust_frame_size old native pixels 1488x1296 new native pixels 1748x1628 old text pixels 1440x1296 new text pixels 1700x1628 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1700x1628 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1748x1628 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1748x1628 new native pixels 1424x1368
adjust_frame_size old native pixels 1748x1628 new native pixels 1424x1368 old text pixels 1700x1628 new text pixels 1376x1368 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1424x1368 new native pixels 1408x1368
adjust_frame_size old native pixels 1424x1368 new native pixels 1408x1368 old text pixels 1376x1368 new text pixels 1360x1368 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1408x1368 new native pixels 1408x1332
adjust_frame_size old native pixels 1408x1368 new native pixels 1408x1332 old text pixels 1360x1368 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
> Thank you, but I'm not sure my work is particularly affected by
> it. Having the frame width settle on 80 chars is pretty nice, I
> suppose, but after that I usually maximize the frame anyway. Or make
> it take half the screen.
Make it take half the screen? This works here (xfwm4) only with
'frame-resize-pixelwise' enabled.
> It would be nice, though, to avoid the frame size contortions during
> startup. I think it goes through 4 different sizes, at least. This
> patch doesn't seem to change the number of transitions, however.
Conceptually, most of these contortions should happen with a yet
invisible frame. Also, font-related contortions are a pain because
(IIUC) it takes some time to get the size of the default font as
specified by the user's init file. If Emacs were to start with a fixed
initial pixel size, things were easier. After all, Emacs is the only
application I know that specifies the size of the initial window WRT
some user specified font.
But don't worry: When you are using a separate minibuffer frame, Emacs
will start with one frame, create two additional ones and delete the
first one afterwards. That's what I call real contortions.
> If you send the patch together with a commit message, I can install it
> no problem (to the release branch or to master, whatever it deemed to
> be the best in this case).
I'll try to come up with a few comments in the code so you can install
it on master. We might be able to simplify it later using the idea I
had for Bug#60585. But there so far I was not able to convince anyone
of trying the patch I sent - and that one is much more involved.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-12 9:31 ` martin rudalics
@ 2023-01-12 9:46 ` Robert Pluim
2023-01-12 10:23 ` martin rudalics
2023-01-12 23:53 ` Dmitry Gutov
2023-01-13 0:36 ` Dmitry Gutov
1 sibling, 2 replies; 169+ messages in thread
From: Robert Pluim @ 2023-01-12 9:46 UTC (permalink / raw)
To: martin rudalics; +Cc: Eli Zaretskii, 52493, Dmitry Gutov
>>>>> On Thu, 12 Jan 2023 10:31:35 +0100, martin rudalics <rudalics@gmx.at> said:
>> So... the window manager works with "unscaled" pixels it has to multiply by 2? That's why we try to send half the actual value?
martin> We send half the actual value because Robert (IIRC) has coded it that
martin> way. I never scale here and so I can't tell whether that's the right
martin> approach. Have a look at Bug#20432 where Jan says something about GTK
martin> messing things up.
Itʼs done that way because thatʼs the way it works, not because of any
decision on my part. When scaling is in use, a screen that has eg
1920x1080 "physical pixels" is presented to us as being 960x540
"virtual pixels". Since Emacs uses physical pixels internally, we need
to divide all the numbers by 2.
Robert
--
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-12 9:46 ` Robert Pluim
@ 2023-01-12 10:23 ` martin rudalics
2023-01-12 23:53 ` Dmitry Gutov
1 sibling, 0 replies; 169+ messages in thread
From: martin rudalics @ 2023-01-12 10:23 UTC (permalink / raw)
To: Robert Pluim; +Cc: Eli Zaretskii, 52493, Dmitry Gutov
> Itʼs done that way because thatʼs the way it works, not because of any
> decision on my part. When scaling is in use, a screen that has eg
> 1920x1080 "physical pixels" is presented to us as being 960x540
> "virtual pixels". Since Emacs uses physical pixels internally, we need
> to divide all the numbers by 2.
That's what I understood from your code and also tried to tell Dmitry.
So I suppose that GTK and the WM deal with virtual pixels only and the
gtk_window_resize API is what separates us from them. But I've never
been able to understand where we translate virtual size values back to
our ones whenever we call xg_frame_resized. Bear with me - I have no
good idea how scaling works internally.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-12 9:46 ` Robert Pluim
2023-01-12 10:23 ` martin rudalics
@ 2023-01-12 23:53 ` Dmitry Gutov
1 sibling, 0 replies; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-12 23:53 UTC (permalink / raw)
To: Robert Pluim, martin rudalics; +Cc: Eli Zaretskii, 52493
On 12/01/2023 11:46, Robert Pluim wrote:
>>>>>> On Thu, 12 Jan 2023 10:31:35 +0100, martin rudalics<rudalics@gmx.at> said:
> >> So... the window manager works with "unscaled" pixels it has to multiply by 2? That's why we try to send half the actual value?
> martin> We send half the actual value because Robert (IIRC) has coded it that
> martin> way. I never scale here and so I can't tell whether that's the right
> martin> approach. Have a look at Bug#20432 where Jan says something about GTK
> martin> messing things up.
>
> Itʼs done that way because thatʼs the way it works, not because of any
> decision on my part. When scaling is in use, a screen that has eg
> 1920x1080 "physical pixels" is presented to us as being 960x540
> "virtual pixels". Since Emacs uses physical pixels internally, we need
> to divide all the numbers by 2.
But depending on the scaling of the display, the :height attribute of a
face translates to a different height value in pixels, doesn't it?
So at some point there has to be some scaling up performed first. I
suppose the uneven height of a font in pixels might be picked up because
that's the closest available shape, but perhaps the "actual" doubled
height value might be used for line height etc?
I'm just guessing, sorry if that's way off.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-12 9:31 ` martin rudalics
2023-01-12 9:46 ` Robert Pluim
@ 2023-01-13 0:36 ` Dmitry Gutov
2023-01-13 8:38 ` martin rudalics
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-13 0:36 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: rpluim, 52493
On 12/01/2023 11:31, martin rudalics wrote:
> > So... the window manager works with "unscaled" pixels it has to
> multiply by 2? That's why we try to send half the actual value?
>
> We send half the actual value because Robert (IIRC) has coded it that
> way. I never scale here and so I can't tell whether that's the right
> approach. Have a look at Bug#20432 where Jan says something about GTK
> messing things up.
He also says something about "doing things correctly in the trunk now".
> > I was talking about the Scenario 3: the frame dimensions (pixelwise)
> didn't change in it.
>
> Please tell me precisely where it didn't change. The only cases where
> it did not change are the last two lines below. And these represent the
> cases we wanted to fix.
The scenario number 3 (where both dimensions are off by 1).
The last two lines are indeed the ones that were printed when I
evaluated the set-face-attribute call.
I now re-read your previous message, and it made sense. No need to
continue with this particular inquiry, thank you.
> > Thank you, but I'm not sure my work is particularly affected by
> > it. Having the frame width settle on 80 chars is pretty nice, I
> > suppose, but after that I usually maximize the frame anyway. Or make
> > it take half the screen.
>
> Make it take half the screen? This works here (xfwm4) only with
> 'frame-resize-pixelwise' enabled.
Seems to work fine here (in GNOME) either way. But it's possible that my
screen width is just a convenient multiple of a char width, or very
close. Anyway, I don't stay with side-by-side configuration for a long
time either, it's mostly for bug reporting and associated testing.
> > It would be nice, though, to avoid the frame size contortions during
> > startup. I think it goes through 4 different sizes, at least. This
> > patch doesn't seem to change the number of transitions, however.
>
> Conceptually, most of these contortions should happen with a yet
> invisible frame. Also, font-related contortions are a pain because
> (IIUC) it takes some time to get the size of the default font as
> specified by the user's init file.
In an ideal world, I would expect this to result in just 2 frame
configurations: before and after the default face was changed. Oh well.
> If Emacs were to start with a fixed
> initial pixel size, things were easier. After all, Emacs is the only
> application I know that specifies the size of the initial window WRT
> some user specified font.
>
> But don't worry: When you are using a separate minibuffer frame, Emacs
> will start with one frame, create two additional ones and delete the
> first one afterwards. That's what I call real contortions.
Sounds fun.
> > If you send the patch together with a commit message, I can install it
> > no problem (to the release branch or to master, whatever it deemed to
> > be the best in this case).
>
> I'll try to come up with a few comments in the code so you can install
> it on master. We might be able to simplify it later using the idea I
> had for Bug#60585. But there so far I was not able to convince anyone
> of trying the patch I sent - and that one is much more involved.
I have tried it, but it seems to make no difference over here.
I cannot reproduce the problem reported in bug#60585, with or without
that patch (with GNOME).
It doesn't seem to change anything WRT behavior discussed in this one.
^ permalink raw reply [flat|nested] 169+ messages in thread
* bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong
2023-01-13 0:36 ` Dmitry Gutov
@ 2023-01-13 8:38 ` martin rudalics
2023-01-16 1:27 ` bug#60585: 30.0.50; global-text-scale-adjust shrinks window (was not before), was: " Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-13 8:38 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: rpluim, 52493
> I cannot reproduce the problem reported in bug#60585, with or without that patch (with GNOME).
That one is a real treat, however. With our current bug we are occupied
with things going awry when we want to explicitly change the size of a
frame. In Bug#60585 we do not want to change the size of a frame.
Rather we want to keep its size fixed when changing the default font's
size.
The problem is not reproducible with GTK because there we set the size
hints only when we want to resize a frame. With the Lucid build we set
size hints more often.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-13 8:38 ` martin rudalics
@ 2023-01-16 1:27 ` Dmitry Gutov
2023-01-16 10:03 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-16 1:27 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]
On 13/01/2023 10:38, martin rudalics wrote:
> > I cannot reproduce the problem reported in bug#60585, with or without
> that patch (with GNOME).
>
> That one is a real treat, however. With our current bug we are occupied
> with things going awry when we want to explicitly change the size of a
> frame. In Bug#60585 we do not want to change the size of a frame.
> Rather we want to keep its size fixed when changing the default font's
> size.
Indeed.
> The problem is not reproducible with GTK because there we set the size
> hints only when we want to resize a frame. With the Lucid build we set
> size hints more often.
OK, I have recompiled to Lucid, reproduced the problem and indeed your
patch seems to fix it. With seemingly no adverse effects.
I did get a segfault once when testing this, but wasn't able to
replicate it so far. Could be unrelated. Attaching both it and the
"decoded" version, which was produced with this command (note that the
regexp is different from what the manual advises):
sed -n 's/[a-z0-9_/-]\+(\([a-z0-9+]\+\))/\1/p' segfault.txt | addr2line
-C -f -i -p -e src/emacs
Not sure if you need the contents of *foo* from me, but attaching it
anyway (from a different session), because it might show something
different with 2x scaled display.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 129517 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1458x902 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1458x902 new native pixels 1458x938 old text pixels 1440x900 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1458x938 new native pixels 1458x1332 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
update_from_various_frame_slots native pixels 1458x1332
set_frame_size native pixels 1458x1332
update_wm_hints char width 18 vscroll 0 fringes 16 borders 2 base width 36 min width 36
char height 36 menubar 0 hscroll 0 borders 2 base height 72 min height 72
EmacsFrameResize old native pixels 1458x1332 new native pixels 1458x1332
update_wm_hints char width 18 vscroll 0 fringes 16 borders 2 base width 36 min width 36
char height 36 menubar 0 hscroll 0 borders 2 base height 72 min height 72
adjust_frame_size old native pixels 1458x1332 new native pixels 1474x1332 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
EmacsFrameResize old native pixels 1474x1332 new native pixels 1458x1287
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 36 menubar 45 hscroll 0 borders 2 base height 144 min height 144
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 117 min height 117
EmacsFrameResize old native pixels 1474x1332 new native pixels 1458x1287
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 36 menubar 45 hscroll 0 borders 2 base height 144 min height 144
EmacsFrameResize old native pixels 1474x1332 new native pixels 1458x1287
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 36 menubar 45 hscroll 0 borders 2 base height 144 min height 144
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 117 min height 117
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1332
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 117 min height 117
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1332
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 117 min height 117
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 117 min height 117
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 117 min height 117
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
adjust_frame_size old native pixels 1474x1332 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
x_new_font old char size 18x36 new char size 18x37 text chars 80x36 old text pixels 1440x1296 new text pixels 1440x1332
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x35
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
x_new_font old char size 18x37 new char size 19x38 text chars 80x35 old text pixels 1440x1296 new text pixels 1520x1330
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x35 new text chars 75x34
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
x_new_font old char size 19x38 new char size 19x39 text chars 75x34 old text pixels 1440x1296 new text pixels 1425x1326
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 75x34 new text chars 75x33
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 19x39 new char size 20x40 text chars 75x33 old text pixels 1440x1296 new text pixels 1500x1320
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 75x33 new text chars 72x32
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
x_new_font old char size 20x40 new char size 20x41 text chars 72x32 old text pixels 1440x1296 new text pixels 1440x1312
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 72x32 new text chars 72x31
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
x_new_font old char size 20x41 new char size 21x42 text chars 72x31 old text pixels 1440x1296 new text pixels 1512x1302
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 72x31 new text chars 68x30
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
x_new_font old char size 21x42 new char size 21x43 text chars 68x30 old text pixels 1440x1296 new text pixels 1428x1290
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
x_new_font old char size 21x43 new char size 22x44 text chars 68x30 old text pixels 1440x1296 new text pixels 1496x1320
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 68x30 new text chars 65x29
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
x_new_font old char size 22x44 new char size 22x45 text chars 65x29 old text pixels 1440x1296 new text pixels 1430x1305
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 65x29 new text chars 65x28
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
x_new_font old char size 22x45 new char size 23x46 text chars 65x28 old text pixels 1440x1296 new text pixels 1495x1288
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 65x28 new text chars 62x28
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
x_new_font old char size 23x46 new char size 23x47 text chars 62x28 old text pixels 1440x1296 new text pixels 1426x1316
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 62x28 new text chars 62x27
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
x_new_font old char size 23x47 new char size 24x48 text chars 62x27 old text pixels 1440x1296 new text pixels 1488x1296
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 62x27 new text chars 60x27
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 24x48 new char size 24x49 text chars 60x27 old text pixels 1440x1296 new text pixels 1440x1323
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 60x27 new text chars 60x26
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
x_new_font old char size 24x49 new char size 25x50 text chars 60x26 old text pixels 1440x1296 new text pixels 1500x1300
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 60x26 new text chars 57x25
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
x_new_font old char size 25x50 new char size 25x51 text chars 57x25 old text pixels 1440x1296 new text pixels 1425x1275
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
x_new_font old char size 25x51 new char size 26x52 text chars 57x25 old text pixels 1440x1296 new text pixels 1482x1300
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 57x25 new text chars 55x24
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
x_new_font old char size 26x52 new char size 26x53 text chars 55x24 old text pixels 1440x1296 new text pixels 1430x1272
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
x_new_font old char size 26x53 new char size 27x54 text chars 55x24 old text pixels 1440x1296 new text pixels 1485x1296
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 55x24 new text chars 53x24
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
x_new_font old char size 27x54 new char size 27x55 text chars 53x24 old text pixels 1440x1296 new text pixels 1431x1320
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 53x24 new text chars 53x23
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
x_new_font old char size 27x55 new char size 28x56 text chars 53x23 old text pixels 1440x1296 new text pixels 1484x1288
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 53x23 new text chars 51x23
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
x_new_font old char size 28x56 new char size 28x57 text chars 51x23 old text pixels 1440x1296 new text pixels 1428x1311
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 51x23 new text chars 51x22
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 57 menubar 45 hscroll 0 borders 2 base height 202 min height 202
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 57 menubar 45 hscroll 0 borders 2 base height 202 min height 202
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 57 menubar 45 hscroll 0 borders 2 base height 202 min height 202
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 57 menubar 45 hscroll 0 borders 2 base height 202 min height 202
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 57 menubar 45 hscroll 0 borders 2 base height 202 min height 202
x_new_font old char size 28x57 new char size 28x56 text chars 51x22 old text pixels 1440x1296 new text pixels 1428x1232
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 51x22 new text chars 51x23
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 28 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 56 menubar 45 hscroll 0 borders 2 base height 167 min height 167
x_new_font old char size 28x56 new char size 27x55 text chars 51x23 old text pixels 1440x1296 new text pixels 1377x1265
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 51x23 new text chars 53x23
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 55 menubar 45 hscroll 0 borders 2 base height 189 min height 189
x_new_font old char size 27x55 new char size 27x54 text chars 53x23 old text pixels 1440x1296 new text pixels 1431x1242
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 53x23 new text chars 53x24
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 27 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 54 menubar 45 hscroll 0 borders 2 base height 157 min height 157
x_new_font old char size 27x54 new char size 26x53 text chars 53x24 old text pixels 1440x1296 new text pixels 1378x1272
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 53x24 new text chars 55x24
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 53 menubar 45 hscroll 0 borders 2 base height 180 min height 180
x_new_font old char size 26x53 new char size 26x52 text chars 55x24 old text pixels 1440x1296 new text pixels 1430x1248
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
x_new_font old char size 26x52 new char size 25x51 text chars 55x24 old text pixels 1440x1296 new text pixels 1375x1224
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 55x24 new text chars 57x25
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
x_new_font old char size 25x51 new char size 25x50 text chars 57x25 old text pixels 1440x1296 new text pixels 1425x1250
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
x_new_font old char size 25x50 new char size 24x49 text chars 57x25 old text pixels 1440x1296 new text pixels 1368x1225
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 57x25 new text chars 60x26
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
x_new_font old char size 24x49 new char size 24x48 text chars 60x26 old text pixels 1440x1296 new text pixels 1440x1248
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 60x26 new text chars 60x27
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 24x48 new char size 23x47 text chars 60x27 old text pixels 1440x1296 new text pixels 1380x1269
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 60x27 new text chars 62x27
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
x_new_font old char size 23x47 new char size 23x46 text chars 62x27 old text pixels 1440x1296 new text pixels 1426x1242
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 62x27 new text chars 62x28
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
x_new_font old char size 23x46 new char size 22x45 text chars 62x28 old text pixels 1440x1296 new text pixels 1364x1260
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 62x28 new text chars 65x28
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
x_new_font old char size 22x45 new char size 22x44 text chars 65x28 old text pixels 1440x1296 new text pixels 1430x1232
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 65x28 new text chars 65x29
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
x_new_font old char size 22x44 new char size 21x43 text chars 65x29 old text pixels 1440x1296 new text pixels 1365x1247
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 65x29 new text chars 68x30
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
x_new_font old char size 21x43 new char size 21x42 text chars 68x30 old text pixels 1440x1296 new text pixels 1428x1260
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
x_new_font old char size 21x42 new char size 20x41 text chars 68x30 old text pixels 1440x1296 new text pixels 1360x1230
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 68x30 new text chars 72x31
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
x_new_font old char size 20x41 new char size 20x40 text chars 72x31 old text pixels 1440x1296 new text pixels 1440x1240
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 72x31 new text chars 72x32
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
x_new_font old char size 20x40 new char size 19x39 text chars 72x32 old text pixels 1440x1296 new text pixels 1368x1248
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 72x32 new text chars 75x33
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 19x39 new char size 19x38 text chars 75x33 old text pixels 1440x1296 new text pixels 1425x1254
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 75x33 new text chars 75x34
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
x_new_font old char size 19x38 new char size 18x37 text chars 75x34 old text pixels 1440x1296 new text pixels 1350x1258
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 75x34 new text chars 80x35
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
x_new_font old char size 18x37 new char size 18x36 text chars 80x35 old text pixels 1440x1296 new text pixels 1440x1260
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x35 new text chars 80x36
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
x_new_font old char size 18x36 new char size 17x35 text chars 80x36 old text pixels 1440x1296 new text pixels 1360x1260
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 84x37
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
x_new_font old char size 17x35 new char size 17x34 text chars 84x37 old text pixels 1440x1296 new text pixels 1428x1258
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 84x37 new text chars 84x38
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
x_new_font old char size 17x34 new char size 16x33 text chars 84x38 old text pixels 1440x1296 new text pixels 1344x1254
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 84x38 new text chars 90x39
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
x_new_font old char size 16x33 new char size 16x32 text chars 90x39 old text pixels 1440x1296 new text pixels 1440x1248
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 90x39 new text chars 90x40
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 32 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 32 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 32 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 32 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 32 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 16x32 new char size 16x33 text chars 90x40 old text pixels 1440x1296 new text pixels 1440x1320
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 90x40 new text chars 90x39
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 16 vscroll 16 fringes 16 borders 2 base width 50 min width 50
char height 33 menubar 45 hscroll 0 borders 2 base height 145 min height 145
x_new_font old char size 16x33 new char size 17x34 text chars 90x39 old text pixels 1440x1296 new text pixels 1530x1326
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 90x39 new text chars 84x38
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 34 menubar 45 hscroll 0 borders 2 base height 141 min height 141
x_new_font old char size 17x34 new char size 17x35 text chars 84x38 old text pixels 1440x1296 new text pixels 1428x1330
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 84x38 new text chars 84x37
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 17 vscroll 16 fringes 16 borders 2 base width 63 min width 63
char height 35 menubar 45 hscroll 0 borders 2 base height 139 min height 139
x_new_font old char size 17x35 new char size 18x36 text chars 84x37 old text pixels 1440x1296 new text pixels 1512x1332
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 84x37 new text chars 80x36
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 36 menubar 45 hscroll 0 borders 2 base height 139 min height 139
x_new_font old char size 18x36 new char size 18x37 text chars 80x36 old text pixels 1440x1296 new text pixels 1440x1332
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x35
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
x_new_font old char size 18x37 new char size 19x38 text chars 80x35 old text pixels 1440x1296 new text pixels 1520x1330
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x35 new text chars 75x34
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
x_new_font old char size 19x38 new char size 19x39 text chars 75x34 old text pixels 1440x1296 new text pixels 1425x1326
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 75x34 new text chars 75x33
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 19x39 new char size 20x40 text chars 75x33 old text pixels 1440x1296 new text pixels 1500x1320
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 75x33 new text chars 72x32
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
x_new_font old char size 20x40 new char size 20x41 text chars 72x32 old text pixels 1440x1296 new text pixels 1440x1312
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 72x32 new text chars 72x31
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
x_new_font old char size 20x41 new char size 21x42 text chars 72x31 old text pixels 1440x1296 new text pixels 1512x1302
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 72x31 new text chars 68x30
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
x_new_font old char size 21x42 new char size 21x43 text chars 68x30 old text pixels 1440x1296 new text pixels 1428x1290
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
x_new_font old char size 21x43 new char size 22x44 text chars 68x30 old text pixels 1440x1296 new text pixels 1496x1320
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 68x30 new text chars 65x29
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
x_new_font old char size 22x44 new char size 22x45 text chars 65x29 old text pixels 1440x1296 new text pixels 1430x1305
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 65x29 new text chars 65x28
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
x_new_font old char size 22x45 new char size 23x46 text chars 65x28 old text pixels 1440x1296 new text pixels 1495x1288
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 65x28 new text chars 62x28
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
x_new_font old char size 23x46 new char size 23x47 text chars 62x28 old text pixels 1440x1296 new text pixels 1426x1316
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 62x28 new text chars 62x27
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
x_new_font old char size 23x47 new char size 24x48 text chars 62x27 old text pixels 1440x1296 new text pixels 1488x1296
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 62x27 new text chars 60x27
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 24x48 new char size 24x49 text chars 60x27 old text pixels 1440x1296 new text pixels 1440x1323
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 60x27 new text chars 60x26
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
x_new_font old char size 24x49 new char size 25x50 text chars 60x26 old text pixels 1440x1296 new text pixels 1500x1300
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 60x26 new text chars 57x25
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
x_new_font old char size 25x50 new char size 25x51 text chars 57x25 old text pixels 1440x1296 new text pixels 1425x1275
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
x_new_font old char size 25x51 new char size 26x52 text chars 57x25 old text pixels 1440x1296 new text pixels 1482x1300
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 57x25 new text chars 55x24
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 26 vscroll 16 fringes 16 borders 2 base width 70 min width 70
char height 52 menubar 45 hscroll 0 borders 2 base height 203 min height 203
x_new_font old char size 26x52 new char size 25x51 text chars 55x24 old text pixels 1440x1296 new text pixels 1375x1224
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 55x24 new text chars 57x25
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 51 menubar 45 hscroll 0 borders 2 base height 175 min height 175
x_new_font old char size 25x51 new char size 25x50 text chars 57x25 old text pixels 1440x1296 new text pixels 1425x1250
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 25 vscroll 16 fringes 16 borders 2 base width 74 min width 74
char height 50 menubar 45 hscroll 0 borders 2 base height 199 min height 199
x_new_font old char size 25x50 new char size 24x49 text chars 57x25 old text pixels 1440x1296 new text pixels 1368x1225
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 57x25 new text chars 60x26
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 49 menubar 45 hscroll 0 borders 2 base height 174 min height 174
x_new_font old char size 24x49 new char size 24x48 text chars 60x26 old text pixels 1440x1296 new text pixels 1440x1248
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 60x26 new text chars 60x27
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 24 vscroll 16 fringes 16 borders 2 base width 58 min width 58
char height 48 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 24x48 new char size 23x47 text chars 60x27 old text pixels 1440x1296 new text pixels 1380x1269
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 60x27 new text chars 62x27
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 47 menubar 45 hscroll 0 borders 2 base height 177 min height 177
x_new_font old char size 23x47 new char size 23x46 text chars 62x27 old text pixels 1440x1296 new text pixels 1426x1242
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 62x27 new text chars 62x28
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 23 vscroll 16 fringes 16 borders 2 base width 71 min width 71
char height 46 menubar 45 hscroll 0 borders 2 base height 157 min height 157
x_new_font old char size 23x46 new char size 22x45 text chars 62x28 old text pixels 1440x1296 new text pixels 1364x1260
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 62x28 new text chars 65x28
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 45 menubar 45 hscroll 0 borders 2 base height 184 min height 184
x_new_font old char size 22x45 new char size 22x44 text chars 65x28 old text pixels 1440x1296 new text pixels 1430x1232
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 65x28 new text chars 65x29
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 22 vscroll 16 fringes 16 borders 2 base width 66 min width 66
char height 44 menubar 45 hscroll 0 borders 2 base height 167 min height 167
x_new_font old char size 22x44 new char size 21x43 text chars 65x29 old text pixels 1440x1296 new text pixels 1365x1247
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 65x29 new text chars 68x30
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 43 menubar 45 hscroll 0 borders 2 base height 152 min height 152
x_new_font old char size 21x43 new char size 21x42 text chars 68x30 old text pixels 1440x1296 new text pixels 1428x1260
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 21 vscroll 16 fringes 16 borders 2 base width 67 min width 67
char height 42 menubar 45 hscroll 0 borders 2 base height 181 min height 181
x_new_font old char size 21x42 new char size 20x41 text chars 68x30 old text pixels 1440x1296 new text pixels 1360x1230
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 68x30 new text chars 72x31
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 41 menubar 45 hscroll 0 borders 2 base height 169 min height 169
x_new_font old char size 20x41 new char size 20x40 text chars 72x31 old text pixels 1440x1296 new text pixels 1440x1240
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 72x31 new text chars 72x32
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 20 vscroll 16 fringes 16 borders 2 base width 54 min width 54
char height 40 menubar 45 hscroll 0 borders 2 base height 159 min height 159
x_new_font old char size 20x40 new char size 19x39 text chars 72x32 old text pixels 1440x1296 new text pixels 1368x1248
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 72x32 new text chars 75x33
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 39 menubar 45 hscroll 0 borders 2 base height 151 min height 151
x_new_font old char size 19x39 new char size 19x38 text chars 75x33 old text pixels 1440x1296 new text pixels 1425x1254
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 75x33 new text chars 75x34
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 19 vscroll 16 fringes 16 borders 2 base width 68 min width 68
char height 38 menubar 45 hscroll 0 borders 2 base height 145 min height 145
x_new_font old char size 19x38 new char size 18x37 text chars 75x34 old text pixels 1440x1296 new text pixels 1350x1258
adjust_frame_size old native pixels 1474x1354 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 75x34 new text chars 80x35
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
EmacsFrameResize old native pixels 1474x1354 new native pixels 1474x1354
update_wm_hints char width 18 vscroll 16 fringes 16 borders 2 base width 52 min width 52
char height 37 menubar 45 hscroll 0 borders 2 base height 141 min height 141
[-- Attachment #3: segfault.txt --]
[-- Type: text/plain, Size: 1664 bytes --]
$ src/emacs
Fatal error 11: Segmentation fault
Backtrace:
src/emacs(+0x1a56d7)[0x5617a839c6d7]
src/emacs(+0x4ddbf)[0x5617a8244dbf]
src/emacs(+0x4e303)[0x5617a8245303]
src/emacs(+0x1a3848)[0x5617a839a848]
src/emacs(+0x1a38cd)[0x5617a839a8cd]
/lib/x86_64-linux-gnu/libc.so.6(+0x3bcf0)[0x7f44e223bcf0]
src/emacs(+0x1ec23b)[0x5617a83e323b]
src/emacs(+0x1f2b1f)[0x5617a83e9b1f]
src/emacs(+0x26161d)[0x5617a845861d]
src/emacs(+0x21ac18)[0x5617a8411c18]
src/emacs(+0x2613be)[0x5617a84583be]
src/emacs(+0x21ac18)[0x5617a8411c18]
src/emacs(+0x21b154)[0x5617a8412154]
src/emacs(+0x219616)[0x5617a8410616]
src/emacs(+0x21c37a)[0x5617a841337a]
src/emacs(+0x215cfe)[0x5617a840ccfe]
src/emacs(+0x214589)[0x5617a840b589]
src/emacs(+0x72d33)[0x5617a8269d33]
src/emacs(+0x72e30)[0x5617a8269e30]
src/emacs(+0xa5125)[0x5617a829c125]
src/emacs(+0xa529e)[0x5617a829c29e]
src/emacs(+0xa529e)[0x5617a829c29e]
src/emacs(+0xa6db0)[0x5617a829ddb0]
src/emacs(+0xa905d)[0x5617a82a005d]
src/emacs(+0xbf8e9)[0x5617a82b68e9]
src/emacs(+0xc35b3)[0x5617a82ba5b3]
src/emacs(+0x21436c)[0x5617a840b36c]
src/emacs(+0x73f38)[0x5617a826af38]
src/emacs(+0xaa45a)[0x5617a82a145a]
src/emacs(+0xabb9d)[0x5617a82a2b9d]
src/emacs(+0x5816e)[0x5617a824f16e]
src/emacs(+0x26138e)[0x5617a845838e]
src/emacs(+0x215cfe)[0x5617a840ccfe]
src/emacs(+0x2119c2)[0x5617a84089c2]
src/emacs(+0x215cfe)[0x5617a840ccfe]
src/emacs(+0x2130de)[0x5617a840a0de]
src/emacs(+0x215cfe)[0x5617a840ccfe]
src/emacs(+0x215f80)[0x5617a840cf80]
src/emacs(+0x26138e)[0x5617a845838e]
src/emacs(+0x215cfe)[0x5617a840ccfe]
src/emacs(+0x215f80)[0x5617a840cf80]
...
fish: Job 1, 'src/emacs' terminated by signal SIGSEGV (Address boundary error)
[-- Attachment #4: segfault_decoded.txt --]
[-- Type: text/plain, Size: 3521 bytes --]
emacs_backtrace at /home/dgutov/vc/emacs-master/src/sysdep.c:2297
terminate_due_to_signal at /home/dgutov/vc/emacs-master/src/emacs.c:458
Fget_internal_run_time at /home/dgutov/vc/emacs-master/src/sysdep.c:4274
deliver_thread_signal at /home/dgutov/vc/emacs-master/src/sysdep.c:1765
stack_overflow at /home/dgutov/vc/emacs-master/src/sysdep.c:1841
(inlined by) handle_sigsegv at /home/dgutov/vc/emacs-master/src/sysdep.c:1884
?? ??:0
free_large_strings at /home/dgutov/vc/emacs-master/src/alloc.c:2217
(inlined by) sweep_strings at /home/dgutov/vc/emacs-master/src/alloc.c:2200
gc_sweep at /home/dgutov/vc/emacs-master/src/alloc.c:7681
(inlined by) garbage_collect at /home/dgutov/vc/emacs-master/src/alloc.c:6506
maybe_gc at /home/dgutov/vc/emacs-master/src/lisp.h:5607
(inlined by) exec_byte_code at /home/dgutov/vc/emacs-master/src/bytecode.c:782
fetch_and_exec_byte_code at /home/dgutov/vc/emacs-master/src/eval.c:3081
(inlined by) funcall_lambda at /home/dgutov/vc/emacs-master/src/eval.c:3242
exec_byte_code at /home/dgutov/vc/emacs-master/src/bytecode.c:813
fetch_and_exec_byte_code at /home/dgutov/vc/emacs-master/src/eval.c:3081
(inlined by) funcall_lambda at /home/dgutov/vc/emacs-master/src/eval.c:3242
apply_lambda at /home/dgutov/vc/emacs-master/src/eval.c:3103
eval_sub at /home/dgutov/vc/emacs-master/src/eval.c:2588
Feval at /home/dgutov/vc/emacs-master/src/eval.c:2362 (discriminator 2)
Ffuncall at /home/dgutov/vc/emacs-master/src/eval.c:2997
internal_condition_case_n at /home/dgutov/vc/emacs-master/src/eval.c:1560
safe_free_unbind_to at /home/dgutov/vc/emacs-master/src/lisp.h:5417
(inlined by) safe__call at /home/dgutov/vc/emacs-master/src/xdisp.c:3026
safe__call1 at /home/dgutov/vc/emacs-master/src/xdisp.c:3063
safe__eval at /home/dgutov/vc/emacs-master/src/xdisp.c:3074
(inlined by) display_mode_element at /home/dgutov/vc/emacs-master/src/xdisp.c:27249
display_mode_element at /home/dgutov/vc/emacs-master/src/xdisp.c:27331
display_mode_element at /home/dgutov/vc/emacs-master/src/xdisp.c:27331
display_mode_line at /home/dgutov/vc/emacs-master/src/xdisp.c:26761
display_mode_lines at /home/dgutov/vc/emacs-master/src/xdisp.c:26679 (discriminator 6)
redisplay_window at /home/dgutov/vc/emacs-master/src/xdisp.c:20364
redisplay_window_0 at /home/dgutov/vc/emacs-master/src/xdisp.c:17447
internal_condition_case_1 at /home/dgutov/vc/emacs-master/src/eval.c:1500
redisplay_windows at /home/dgutov/vc/emacs-master/src/xdisp.c:17415
redisplay_internal at /home/dgutov/vc/emacs-master/src/xdisp.c:16865
redisplay_preserve_echo_area at /home/dgutov/vc/emacs-master/src/xdisp.c:17228
Fredisplay at /home/dgutov/vc/emacs-master/src/dispnew.c:6288
exec_byte_code at /home/dgutov/vc/emacs-master/src/bytecode.c:809
Ffuncall at /home/dgutov/vc/emacs-master/src/eval.c:2997
Ffuncall_interactively at /home/dgutov/vc/emacs-master/src/callint.c:250
Ffuncall at /home/dgutov/vc/emacs-master/src/eval.c:2997
safe_free_unbind_to at /home/dgutov/vc/emacs-master/src/lisp.h:5417
(inlined by) Fcall_interactively at /home/dgutov/vc/emacs-master/src/callint.c:788
Ffuncall at /home/dgutov/vc/emacs-master/src/eval.c:2997
SPECPDL_INDEX at /home/dgutov/vc/emacs-master/src/lisp.h:3550
(inlined by) Fapply at /home/dgutov/vc/emacs-master/src/eval.c:2614
exec_byte_code at /home/dgutov/vc/emacs-master/src/bytecode.c:809
Ffuncall at /home/dgutov/vc/emacs-master/src/eval.c:2997
SPECPDL_INDEX at /home/dgutov/vc/emacs-master/src/lisp.h:3550
(inlined by) Fapply at /home/dgutov/vc/emacs-master/src/eval.c:2614
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-16 1:27 ` bug#60585: 30.0.50; global-text-scale-adjust shrinks window (was not before), was: " Dmitry Gutov
@ 2023-01-16 10:03 ` martin rudalics
2023-01-16 12:44 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-16 10:03 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
> OK, I have recompiled to Lucid, reproduced the problem
Thanks. This shows that we have to deal with an increasing number of
window managers that pay more attention to size hints than we have
bargained for. If Emacs doesn't keep pace with that development,
leaving 'frame-resize-pixelwise' at nil will become an obsolete option
soon.
> I did get a segfault once when testing this, but wasn't able to
> replicate it so far. Could be unrelated.
Did this happen with emacs -Q? An optimized build probably? Also the
line numbers do not really correspond to neither emacs-29 nor master as
I can check from here via savannah. In either case, dumping traces to a
buffer can produce all sorts of problems, although I try hard to do that
in "safe" places only. So it might be related.
> Not sure if you need the contents of *foo* from me, but attaching it
> anyway (from a different session), because it might show something
> different with 2x scaled display.
Now I'm confused. How on earth do we scale with Lucid? If we do, then
please show me how Lucid handles the Inconsolata scenario. And please
try also the Inconsolata scenario with a GTK build and the new code. I
doubt that the code can handle it out of the box but maybe we can tweak
it sufficiently.
Thanks, martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-16 10:03 ` martin rudalics
@ 2023-01-16 12:44 ` Dmitry Gutov
2023-01-16 16:10 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-16 12:44 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]
On 16/01/2023 12:03, martin rudalics wrote:
> > OK, I have recompiled to Lucid, reproduced the problem
>
> Thanks. This shows that we have to deal with an increasing number of
> window managers that pay more attention to size hints than we have
> bargained for. If Emacs doesn't keep pace with that development,
> leaving 'frame-resize-pixelwise' at nil will become an obsolete option
> soon.
>
> > I did get a segfault once when testing this, but wasn't able to
> > replicate it so far. Could be unrelated.
>
> Did this happen with emacs -Q? An optimized build probably? Also the
> line numbers do not really correspond to neither emacs-29 nor master as
> I can check from here via savannah. In either case, dumping traces to a
> buffer can produce all sorts of problems, although I try hard to do that
> in "safe" places only. So it might be related.
'emacs -Q', a build from master with your patch applied.
> > Not sure if you need the contents of *foo* from me, but attaching it
> > anyway (from a different session), because it might show something
> > different with 2x scaled display.
>
> Now I'm confused. How on earth do we scale with Lucid?
Apparently, we do scale with Lucid. Even the scroll bar probably
(although that one is harder to tell).
> If we do, then
> please show me how Lucid handles the Inconsolata scenario.
The InconsolataLGC problem doesn't reproduce on current master with
Lucid, without any extra patches.
> And please
> try also the Inconsolata scenario with a GTK build and the new code. I
> doubt that the code can handle it out of the box but maybe we can tweak
> it sufficiently.
x_rest.diff?
It doesn't seem to make any effect on the problem behavior.
Attaching *foo* after 2 evaluation, then resizing the frame with a
mouse, then 2 evaluations again.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 11170 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 base height 43 height inc 18
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 base height 102 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x4
xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1612
adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1612 old text pixels 1440x1296 new text pixels 1680x1612 old text chars 80x36 new text chars 80x35
x_new_font old char size 21x45 new char size 17x37 text chars 80x35 old text pixels 1680x1612 new text pixels 1360x1295
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 101 height inc 18
xg_frame_set_char_size old native pixels 1728x1612 new native pixels 1408x1295 outer pixels 704x713 outer rest 0x0
xg_frame_resized old native pixels 1728x1612 new native pixels 1408x1294
adjust_frame_size old native pixels 1728x1612 new native pixels 1408x1294 old text pixels 1680x1612 new text pixels 1360x1294 old text chars 80x35 new text chars 80x34
x_new_font old char size 17x37 new char size 17x37 text chars 80x34 old text pixels 1360x1294 new text pixels 1360x1258
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 100 height inc 18
xg_frame_set_char_size old native pixels 1408x1294 new native pixels 1408x1258 outer pixels 704x695 outer rest 0x1
xg_frame_resized old native pixels 1408x1294 new native pixels 1408x1256
adjust_frame_size old native pixels 1408x1294 new native pixels 1408x1256 old text pixels 1360x1294 new text pixels 1360x1256 old text chars 80x34 new text chars 80x33
x_new_font old char size 17x37 new char size 17x37 text chars 80x33 old text pixels 1360x1256 new text pixels 1360x1221
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 99 height inc 18
xg_frame_set_char_size old native pixels 1408x1256 new native pixels 1408x1221 outer pixels 704x676 outer rest 0x1
xg_frame_resized old native pixels 1408x1256 new native pixels 1408x1218
adjust_frame_size old native pixels 1408x1256 new native pixels 1408x1218 old text pixels 1360x1256 new text pixels 1360x1218 old text chars 80x33 new text chars 80x32
x_new_font old char size 17x37 new char size 17x37 text chars 80x32 old text pixels 1360x1218 new text pixels 1360x1184
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 98 height inc 18
xg_frame_set_char_size old native pixels 1408x1218 new native pixels 1408x1184 outer pixels 704x658 outer rest 0x2
xg_frame_resized old native pixels 1408x1218 new native pixels 1408x1180
adjust_frame_size old native pixels 1408x1218 new native pixels 1408x1180 old text pixels 1360x1218 new text pixels 1360x1180 old text chars 80x32 new text chars 80x31
x_new_font old char size 17x37 new char size 17x37 text chars 80x31 old text pixels 1360x1180 new text pixels 1360x1147
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 97 height inc 18
xg_frame_set_char_size old native pixels 1408x1180 new native pixels 1408x1147 outer pixels 704x639 outer rest 0x2
xg_frame_resized old native pixels 1408x1180 new native pixels 1408x1142
adjust_frame_size old native pixels 1408x1180 new native pixels 1408x1142 old text pixels 1360x1180 new text pixels 1360x1142 old text chars 80x31 new text chars 80x30
xg_frame_resized old native pixels 1408x1142 new native pixels 1424x1142
adjust_frame_size old native pixels 1408x1142 new native pixels 1424x1142 old text pixels 1360x1142 new text pixels 1376x1142 old text chars 80x30 new text chars 80x30
xg_frame_resized old native pixels 1424x1142 new native pixels 1440x1142
adjust_frame_size old native pixels 1424x1142 new native pixels 1440x1142 old text pixels 1376x1142 new text pixels 1392x1142 old text chars 80x30 new text chars 81x30
xg_frame_resized old native pixels 1440x1142 new native pixels 1488x1178
adjust_frame_size old native pixels 1440x1142 new native pixels 1488x1178 old text pixels 1392x1142 new text pixels 1440x1178 old text chars 81x30 new text chars 84x31
xg_frame_resized old native pixels 1488x1178 new native pixels 1504x1178
adjust_frame_size old native pixels 1488x1178 new native pixels 1504x1178 old text pixels 1440x1178 new text pixels 1456x1178 old text chars 84x31 new text chars 85x31
xg_frame_resized old native pixels 1504x1178 new native pixels 1520x1178
adjust_frame_size old native pixels 1504x1178 new native pixels 1520x1178 old text pixels 1456x1178 new text pixels 1472x1178 old text chars 85x31 new text chars 86x31
xg_frame_resized old native pixels 1520x1178 new native pixels 1536x1178
adjust_frame_size old native pixels 1520x1178 new native pixels 1536x1178 old text pixels 1472x1178 new text pixels 1488x1178 old text chars 86x31 new text chars 87x31
xg_frame_resized old native pixels 1536x1178 new native pixels 1552x1178
adjust_frame_size old native pixels 1536x1178 new native pixels 1552x1178 old text pixels 1488x1178 new text pixels 1504x1178 old text chars 87x31 new text chars 88x31
xg_frame_resized old native pixels 1552x1178 new native pixels 1568x1178
adjust_frame_size old native pixels 1552x1178 new native pixels 1568x1178 old text pixels 1504x1178 new text pixels 1520x1178 old text chars 88x31 new text chars 89x31
xg_frame_resized old native pixels 1568x1178 new native pixels 1584x1178
adjust_frame_size old native pixels 1568x1178 new native pixels 1584x1178 old text pixels 1520x1178 new text pixels 1536x1178 old text chars 89x31 new text chars 90x31
xg_frame_resized old native pixels 1584x1178 new native pixels 1600x1178
adjust_frame_size old native pixels 1584x1178 new native pixels 1600x1178 old text pixels 1536x1178 new text pixels 1552x1178 old text chars 90x31 new text chars 91x31
xg_frame_resized old native pixels 1600x1178 new native pixels 1616x1178
adjust_frame_size old native pixels 1600x1178 new native pixels 1616x1178 old text pixels 1552x1178 new text pixels 1568x1178 old text chars 91x31 new text chars 92x31
xg_frame_resized old native pixels 1616x1178 new native pixels 1616x1214
adjust_frame_size old native pixels 1616x1178 new native pixels 1616x1214 old text pixels 1568x1178 new text pixels 1568x1214 old text chars 92x31 new text chars 92x32
x_new_font old char size 17x37 new char size 17x37 text chars 92x32 old text pixels 1568x1214 new text pixels 1564x1184
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 36 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 98 height inc 18
xg_frame_set_char_size old native pixels 1616x1214 new native pixels 1612x1184 outer pixels 806x658 outer rest 2x2
xg_frame_resized old native pixels 1616x1214 new native pixels 1608x1180
adjust_frame_size old native pixels 1616x1214 new native pixels 1608x1180 old text pixels 1568x1214 new text pixels 1560x1180 old text chars 92x32 new text chars 91x31
x_new_font old char size 17x37 new char size 17x37 text chars 91x31 old text pixels 1560x1180 new text pixels 1547x1147
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 35 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 97 height inc 18
xg_frame_set_char_size old native pixels 1608x1180 new native pixels 1595x1147 outer pixels 797x639 outer rest 2x2
xg_frame_resized old native pixels 1608x1180 new native pixels 1590x1142
adjust_frame_size old native pixels 1608x1180 new native pixels 1590x1142 old text pixels 1560x1180 new text pixels 1542x1142 old text chars 91x31 new text chars 90x30
x_new_font old char size 17x37 new char size 17x37 text chars 90x30 old text pixels 1542x1142 new text pixels 1530x1110
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 34 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 96 height inc 18
xg_frame_set_char_size old native pixels 1590x1142 new native pixels 1578x1110 outer pixels 789x621 outer rest 3x3
xg_frame_resized old native pixels 1590x1142 new native pixels 1572x1104
adjust_frame_size old native pixels 1590x1142 new native pixels 1572x1104 old text pixels 1542x1142 new text pixels 1524x1104 old text chars 90x30 new text chars 89x29
x_new_font old char size 17x37 new char size 17x37 text chars 89x29 old text pixels 1524x1104 new text pixels 1513x1073
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 base width 33 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 base height 95 height inc 18
xg_frame_set_char_size old native pixels 1572x1104 new native pixels 1561x1073 outer pixels 780x602 outer rest 3x3
xg_frame_resized old native pixels 1572x1104 new native pixels 1554x1066
adjust_frame_size old native pixels 1572x1104 new native pixels 1554x1066 old text pixels 1524x1104 new text pixels 1506x1066 old text chars 89x29 new text chars 88x28
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-16 12:44 ` Dmitry Gutov
@ 2023-01-16 16:10 ` martin rudalics
2023-01-17 1:54 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-16 16:10 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
>> Now I'm confused. How on earth do we scale with Lucid?
>
> Apparently, we do scale with Lucid. Even the scroll bar probably (although that one is harder to tell).
Interesting.
> x_rest.diff?
Yes.
> It doesn't seem to make any effect on the problem behavior.
>
> Attaching *foo* after 2 evaluation, then resizing the frame with a mouse, then 2 evaluations again.
My bad. I didn't scale the text sizes when calculating the residue.
Please try again.
Thanks, martin
[-- Attachment #2: x_rest.diff --]
[-- Type: text/x-patch, Size: 31901 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..3dac368bee 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,10 +1206,11 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
/* Resize the top level widget so rows and columns remain constant.
@@ -1317,6 +1328,33 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0
+ && size_hints.width_inc > 0 && outer_height > 0
+ && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width)
+ % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height)
+ % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -1360,21 +1398,6 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
}
}
-/* Handle height/width changes (i.e. add/remove/move menu/toolbar).
- The policy is to keep the number of editable lines. */
-
-#if 0
-static void
-xg_height_or_width_changed (struct frame *f)
-{
- gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- FRAME_TOTAL_PIXEL_WIDTH (f),
- FRAME_TOTAL_PIXEL_HEIGHT (f));
- f->output_data.xp->hint_flags = 0;
- x_wm_set_size_hint (f, 0, 0);
-}
-#endif
-
#ifndef HAVE_PGTK
/* Convert an X Window WSESC on display DPY to its corresponding GtkWidget.
Must be done like this, because GtkWidget:s can have "hidden"
@@ -1917,7 +1940,8 @@ xg_free_frame_widgets (struct frame *f)
flag (this is useful when FLAGS is 0). */
void
-xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
+xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position,
+ int text_width, int text_height)
{
/* Must use GTK routines here, otherwise GTK resets the size hints
to its own defaults. */
@@ -1964,21 +1988,33 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags = f->output_data.xp->hint_flags;
hint_flags |= GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE;
- size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
- size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ size_hints.width_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_COLUMN_WIDTH (f) / scale);
+ size_hints.height_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_LINE_HEIGHT (f) / scale);
hint_flags |= GDK_HINT_BASE_SIZE;
/* Use one row/col here so base_height/width does not become zero.
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
- + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
+ base_width = ((FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f)) / scale);
+ base_height = ((FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
+ / scale);
- size_hints.base_width = base_width;
- size_hints.base_height = base_height;
- size_hints.min_width = base_width;
- size_hints.min_height = base_height;
+ if (text_width < 0)
+ text_width = FRAME_TEXT_WIDTH (f);
+ text_width /= scale;
+
+ if (text_height < 0)
+ text_height = FRAME_TEXT_HEIGHT (f);
+ text_height /= scale;
+
+ size_hints.base_width = base_width + (text_width % size_hints.width_inc);
+ size_hints.base_height = base_height + (text_height % size_hints.height_inc);
+ size_hints.min_width = size_hints.base_width;
+ size_hints.min_height = size_hints.base_height;
/* These currently have a one to one mapping with the X values, but I
don't think we should rely on that. */
@@ -2018,16 +2054,31 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags |= GDK_HINT_USER_POS;
}
- size_hints.base_width /= scale;
- size_hints.base_height /= scale;
- size_hints.width_inc /= scale;
- size_hints.height_inc /= scale;
-
if (hint_flags != f->output_data.xp->hint_flags
|| memcmp (&size_hints,
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text width"), make_fixnum (text_width),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text height"), make_fixnum (text_height),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 190d662831..21245dde5f 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -153,7 +153,7 @@ #define XG_ITEM_DATA "emacs_menuitem"
extern int xg_get_default_scrollbar_width (struct frame *f);
extern int xg_get_default_scrollbar_height (struct frame *f);
-extern void xg_wm_set_size_hint (struct frame *, long int, bool);
+extern void xg_wm_set_size_hint (struct frame *, long int, bool, int, int);
extern void update_frame_tool_bar (struct frame *f);
extern void free_frame_tool_bar (struct frame *f);
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index a32067af81..a391541e10 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1662,7 +1662,8 @@ #define INSTALL_CURSOR(FIELD, NAME) \
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- xg_wm_set_size_hint (f, window_prompting, false);
+ xg_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 13f6c6c3c4..8b077be178 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -658,7 +658,7 @@ pgtk_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
pgtk_calc_absolute_position (f);
block_input ();
- xg_wm_set_size_hint (f, 0, false);
+ xg_wm_set_size_hint (f, 0, false, -1, -1);
if (change_gravity != 0)
{
@@ -705,7 +705,8 @@ pgtk_set_window_size (struct frame *f, bool change_gravity,
f->output_data.pgtk->preferred_width = pixelwidth;
f->output_data.pgtk->preferred_height = pixelheight;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (pixelwidth),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (pixelheight));
xg_frame_set_char_size (f, pixelwidth, pixelheight);
gtk_widget_queue_resize (FRAME_WIDGET (f));
@@ -993,7 +994,10 @@ pgtk_set_parent_frame (struct frame *f, Lisp_Object new_value,
fixed, TRUE, TRUE, 0);
f->output_data.pgtk->preferred_width = alloc.width;
f->output_data.pgtk->preferred_height = alloc.height;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (alloc.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (alloc.height));
+ /* Why convert here? xg_frame_set_char_size wants native
+ pixels. */
xg_frame_set_char_size (f, FRAME_PIXEL_TO_TEXT_WIDTH (f, alloc.width),
FRAME_PIXEL_TO_TEXT_HEIGHT (f, alloc.height));
gtk_widget_queue_resize (FRAME_WIDGET (f));
diff --git a/src/widget.c b/src/widget.c
index aaab33b6d8..7468bf63fc 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -32,6 +32,7 @@
#include "sysstdio.h"
#include "xterm.h"
#include "frame.h"
+#include "blockinput.h"
#include <X11/StringDefs.h>
#include <X11/IntrinsicP.h>
@@ -154,15 +155,6 @@ emacsFrameClass (void)
return (WidgetClass) &emacsFrameClassRec;
}
-static void
-get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
-{
- struct frame *f = ew->emacs_frame.frame;
-
- *pixel_width = FRAME_COLUMN_WIDTH (f);
- *pixel_height = FRAME_LINE_HEIGHT (f);
-}
-
static void
pixel_to_char_size (EmacsFrame ew, Dimension pixel_width,
Dimension pixel_height, int *char_width, int *char_height)
@@ -207,120 +199,97 @@ get_wm_shell (Widget w)
return (WMShellWidget) wmshell;
}
-#if 0 /* Currently not used. */
-
-static void
-mark_shell_size_user_specified (Widget wmshell)
-{
- if (! XtIsWMShell (wmshell)) emacs_abort ();
- /* This is kind of sleazy, but I can't see how else to tell it to make it
- mark the WM_SIZE_HINTS size as user specified when appropriate. */
- ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;
-}
-
-#endif
-
-
static void
set_frame_size (EmacsFrame ew)
{
- /* The widget hierarchy is
-
- argv[0] emacsShell pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
-
- We accept geometry specs in this order:
-
- *Frame-NAME.geometry
- *EmacsFrame.geometry
- Emacs.geometry
-
- Other possibilities for widget hierarchies might be
-
- argv[0] frame pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane emacsTextPane
- ApplicationShell EmacsFrame Paned EmacsTextPane
-
- With the current setup, the text-display-area is the part which is
- an emacs "frame", since that's the only part managed by emacs proper
- (the menubar and the parent of the menubar and all that sort of thing
- are managed by lwlib.)
-
- The EmacsShell widget is simply a replacement for the Shell widget
- which is able to deal with using an externally-supplied window instead
- of always creating its own. It is not actually emacs specific, and
- should possibly have class "Shell" instead of "EmacsShell" to simplify
- the resources.
-
- */
-
struct frame *f = ew->emacs_frame.frame;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.height = FRAME_PIXEL_HEIGHT (f);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("set_frame_size"));
+ CALLN (Ffuncall, Qfoo_it, build_string ("set_frame_size"),
+ build_string ("native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))));
}
static bool
-update_wm_hints (WMShellWidget wmshell, EmacsFrame ew)
+update_wm_hints (WMShellWidget wmshell, EmacsFrame ew, int width, int height)
{
- int cw;
- int ch;
- Dimension rounded_width;
- Dimension rounded_height;
- int char_width;
- int char_height;
- int base_width;
- int base_height;
- char buffer[sizeof wmshell->wm.size_hints];
- char *hints_ptr;
-
- /* Copy the old size hints to the buffer. */
- memcpy (buffer, &wmshell->wm.size_hints,
- sizeof wmshell->wm.size_hints);
-
- pixel_to_char_size (ew, ew->core.width, ew->core.height,
- &char_width, &char_height);
- char_to_pixel_size (ew, char_width, char_height,
- &rounded_width, &rounded_height);
- get_default_char_pixel_size (ew, &cw, &ch);
-
- base_width = (wmshell->core.width - ew->core.width
- + (rounded_width - (char_width * cw)));
- base_height = (wmshell->core.height - ew->core.height
- + (rounded_height - (char_height * ch)));
+ struct frame *f = ew->emacs_frame.frame;
+ int char_width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
+ int char_height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ int base_width
+ = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + (((width < 0) ? FRAME_TEXT_WIDTH (f) : width) % char_width));
+ int base_height
+ = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + (((height < 0) ? FRAME_TEXT_HEIGHT (f) : height) % char_height));
+ int min_width = base_width;
+ int min_height = base_height;
+ bool value;
+
+ int old_base_width, old_base_height;
+ int old_char_width, old_char_height;
+ int old_min_width, old_min_height;
+
+ block_input ();
+ XtVaGetValues ((Widget) wmshell,
+ XtNbaseWidth, &old_base_width,
+ XtNbaseHeight, &old_base_height,
+ XtNwidthInc, &old_char_width,
+ XtNheightInc, &old_char_height,
+ XtNminWidth, &old_min_width,
+ XtNminHeight, &old_min_height,
+ NULL);
+ unblock_input ();
XtVaSetValues ((Widget) wmshell,
XtNbaseWidth, (XtArgVal) base_width,
XtNbaseHeight, (XtArgVal) base_height,
- XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
- XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
- XtNminWidth, (XtArgVal) base_width,
- XtNminHeight, (XtArgVal) base_height,
+ XtNwidthInc, (XtArgVal) char_width,
+ XtNheightInc, (XtArgVal) char_height,
+ XtNminWidth, (XtArgVal) min_width,
+ XtNminHeight, (XtArgVal) min_height,
NULL);
- /* Return if size hints really changed. If they did not, then Xt
- probably didn't set them either (or take the flags into
- account.) */
- hints_ptr = (char *) &wmshell->wm.size_hints;
+ value = (base_width != old_base_width || base_height != old_base_height
+ || char_width != old_char_width || char_height != old_char_height
+ || min_width != old_min_width || min_height != old_min_height);
- /* Skip flags, which is unsigned long. */
- return memcmp (hints_ptr + sizeof (long), buffer + sizeof (long),
- sizeof wmshell->wm.wm_hints - sizeof (long));
+ if (value)
+ {
+ CALLN (Ffuncall, Qfoo_it, build_string ("update_wm_hints"),
+ build_string ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ build_string ("old char width"), make_fixnum (old_char_width),
+ build_string ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ build_string ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base width"), make_fixnum (base_width),
+ build_string ("old_base width"), make_fixnum (old_base_width),
+ build_string ("min width"), make_fixnum (min_width),
+ build_string ("old min width"), make_fixnum (old_min_width));
+ CALLN (Ffuncall, Qfoo_it, build_string (" "),
+ build_string ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ build_string ("old char height"), make_fixnum (old_char_height),
+ build_string ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ build_string ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base height"), make_fixnum (base_height),
+ build_string ("old base height"), make_fixnum (old_base_height),
+ build_string ("min height"), make_fixnum (min_height),
+ build_string ("old min height"), make_fixnum (old_min_height));
+ }
+
+ return value;
}
bool
-widget_update_wm_size_hints (Widget widget, Widget frame)
+widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height)
{
- return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame);
+ return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame,
+ width, height);
}
static void
@@ -337,7 +306,7 @@ update_from_various_frame_slots (EmacsFrame ew)
struct frame *f = ew->emacs_frame.frame;
struct x_output *x = f->output_data.x;
- ew->core.height = FRAME_PIXEL_HEIGHT (f) - x->menubar_height;
+ ew->core.height = FRAME_PIXEL_HEIGHT (f); // - x->menubar_height;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.background_pixel = FRAME_BACKGROUND_PIXEL (f);
ew->emacs_frame.internal_border_width = f->internal_border_width;
@@ -345,12 +314,11 @@ update_from_various_frame_slots (EmacsFrame ew)
ew->emacs_frame.cursor_color = x->cursor_pixel;
ew->core.border_pixel = x->border_pixel;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("update_from_various_frame_slots"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ CALLN (Ffuncall, Qfoo_it,
+ build_string ("update_from_various_frame_slots"),
+ build_string ("native pixels"),
+ (Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f)))));
}
static void
@@ -384,7 +352,6 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
XSetWindowAttributes *attrs)
{
EmacsFrame ew = (EmacsFrame) widget;
- struct frame *f = ew->emacs_frame.frame;
/* This used to contain SubstructureRedirectMask, but this turns out
to be a problem with XIM on Solaris, and events from that mask
@@ -399,12 +366,8 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
make sure we get them all. Seen with xfcwm4 for example. */
XtAddRawEventHandler (widget, StructureNotifyMask, False, resize_cb, NULL);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("EmacsFrameRealize"));
-
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew, -1, -1);
}
static void
@@ -419,18 +382,23 @@ EmacsFrameResize (Widget widget)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameResize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ if (FRAME_PIXEL_WIDTH (f) != ew->core.width
+ || FRAME_PIXEL_HEIGHT (f) != ew->core.height)
+ CALLN (Ffuncall, Qfoo_it, build_string ("EmacsFrameResize"),
+ build_string ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ build_string ("new native pixels"),
+ Fcons (make_fixnum (ew->core.width),
+ make_fixnum (ew->core.height)));
change_frame_size (f, ew->core.width, ew->core.height,
false, true, false);
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew,
+ FRAME_PIXEL_TO_TEXT_WIDTH (f, ew->core.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, ew->core.height));
update_various_frame_slots (ew);
cancel_mouse_face (f);
@@ -472,13 +440,6 @@ EmacsFrameSetCharSize (Widget widget, int columns, int rows)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameSetCharSize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- columns, rows,
- f->new_width, f->new_height);
-
if (!frame_inhibit_resize (f, 0, Qfont)
&& !frame_inhibit_resize (f, 1, Qfont))
x_set_window_size (f, 0, columns * FRAME_COLUMN_WIDTH (f),
diff --git a/src/widget.h b/src/widget.h
index cf83cb1078..03bc809c41 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -97,6 +97,6 @@ #define XtCInitialGeometry "InitialGeometry"
/* Special entry points */
void EmacsFrameSetCharSize (Widget, int, int);
void widget_store_internal_border (Widget widget);
-bool widget_update_wm_size_hints (Widget widget, Widget frame);
+bool widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height);
#endif /* _EmacsFrame_h */
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xfns.c b/src/xfns.c
index 36b51a3011..25e1af279d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4575,7 +4575,7 @@ DEFUN ("x-wm-set-size-hint", Fx_wm_set_size_hint, Sx_wm_set_size_hint,
struct frame *f = decode_window_system_frame (frame);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
unblock_input ();
return Qnil;
}
@@ -5097,7 +5097,8 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- x_wm_set_size_hint (f, window_prompting, false);
+ x_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b1d65ce59d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
@@ -26589,7 +26609,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
x_calc_absolute_position (f);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
#ifdef USE_GTK
if (x_gtk_use_window_move)
@@ -27279,7 +27299,7 @@ x_check_fullscreen (struct frame *f)
emacs_abort ();
}
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height);
@@ -27453,7 +27473,8 @@ x_set_window_size_1 (struct frame *f, bool change_gravity,
{
if (change_gravity)
f->win_gravity = NorthWestGravity;
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height + FRAME_MENUBAR_HEIGHT (f));
@@ -28243,7 +28264,7 @@ x_make_frame_invisible (struct frame *f)
program-specified, so that when the window is mapped again, it will be
placed at the same location, without forcing the user to position it
by hand again (they have already done that once for this window.) */
- x_wm_set_size_hint (f, 0, true);
+ x_wm_set_size_hint (f, 0, true, -1, -1);
#ifdef USE_GTK
if (FRAME_GTK_OUTER_WIDGET (f))
@@ -28896,7 +28917,8 @@ x_embed_frame (struct x_display_info *dpyinfo, struct frame *f)
The GTK version is in gtkutils.c. */
void
-x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
+x_wm_set_size_hint (struct frame *f, long flags, bool user_position,
+ int width, int height)
{
#ifndef USE_GTK
XSizeHints size_hints;
@@ -28935,10 +28957,12 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
#ifndef USE_MOTIF
hints_changed
= widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
#else
widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
/* Do this all over again for the benefit of Motif, which always
knows better than the programmer. */
@@ -29012,8 +29036,16 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
{
int base_width, base_height;
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
+ if (width == -1)
+ width = FRAME_TEXT_WIDTH (f);
+
+ if (height == -1)
+ height = FRAME_TEXT_HEIGHT (f);
+
+ base_width = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0)
+ + width % FRAME_COLUMN_WIDTH (f));
+ base_height = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0)
+ + height % FRAME_LINE_HEIGHT (f));
/* The window manager uses the base width hints to calculate the
current number of rows and columns in the frame while
@@ -29075,7 +29107,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
#else
- xg_wm_set_size_hint (f, flags, user_position);
+ xg_wm_set_size_hint (f, flags, user_position, width, height);
#endif /* USE_GTK */
}
diff --git a/src/xterm.h b/src/xterm.h
index ee429e9c68..61512f1117 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1653,7 +1653,7 @@ #define SELECTION_EVENT_TIME(eventp) \
extern void x_make_frame_invisible (struct frame *);
extern void x_iconify_frame (struct frame *);
extern void x_free_frame_resources (struct frame *);
-extern void x_wm_set_size_hint (struct frame *, long, bool);
+extern void x_wm_set_size_hint (struct frame *, long, bool, int, int);
#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \
&& defined HAVE_CLOCK_GETTIME
extern void x_sync_init_fences (struct frame *);
^ permalink raw reply related [flat|nested] 169+ messages in thread
* 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
2023-01-16 16:10 ` martin rudalics
@ 2023-01-17 1:54 ` Dmitry Gutov
2023-01-17 10:04 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-17 1:54 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
On 16/01/2023 18:10, martin rudalics wrote:
> >> Now I'm confused. How on earth do we scale with Lucid?
> >
> > Apparently, we do scale with Lucid. Even the scroll bar probably
> (although that one is harder to tell).
>
> Interesting.
>
> > x_rest.diff?
>
> Yes.
>
> > It doesn't seem to make any effect on the problem behavior.
> >
> > Attaching *foo* after 2 evaluation, then resizing the frame with a
> mouse, then 2 evaluations again.
>
> My bad. I didn't scale the text sizes when calculating the residue.
> Please try again.
Thanks, this one reminds me of some previous patch in the respective bug
report: repeated set-frace-attribute are stable WRT the frame size, but
resizing the frame with the mouse and then evaling the
set-frame-attribute form resizes the frame (in the smaller direction).
foo attached.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 15021 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text height 648 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1728x1620 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
xg_frame_resized old native pixels 1408x1332 new native pixels 1424x1332
adjust_frame_size old native pixels 1408x1332 new native pixels 1424x1332 old text pixels 1360x1332 new text pixels 1376x1332 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1424x1332 new native pixels 1440x1332
adjust_frame_size old native pixels 1424x1332 new native pixels 1440x1332 old text pixels 1376x1332 new text pixels 1392x1332 old text chars 80x36 new text chars 81x36
xg_frame_resized old native pixels 1440x1332 new native pixels 1440x1368
adjust_frame_size old native pixels 1440x1332 new native pixels 1440x1368 old text pixels 1392x1332 new text pixels 1392x1368 old text chars 81x36 new text chars 81x36
x_new_font old char size 17x37 new char size 17x37 text chars 81x36 old text pixels 1392x1368 new text pixels 1377x1332
xg_frame_set_char_size old native pixels 1440x1368 new native pixels 1425x1332 outer pixels 712x732 outer rest 0x0
xg_frame_resized old native pixels 1440x1368 new native pixels 1424x1332
adjust_frame_size old native pixels 1440x1368 new native pixels 1424x1332 old text pixels 1392x1368 new text pixels 1376x1332 old text chars 81x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1376x1332 new text pixels 1360x1332
xg_frame_set_char_size old native pixels 1424x1332 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
xg_frame_resized old native pixels 1424x1332 new native pixels 1408x1332
adjust_frame_size old native pixels 1424x1332 new native pixels 1408x1332 old text pixels 1376x1332 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
xg_frame_resized old native pixels 1408x1332 new native pixels 1424x1332
adjust_frame_size old native pixels 1408x1332 new native pixels 1424x1332 old text pixels 1360x1332 new text pixels 1376x1332 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1424x1332 new native pixels 1520x1332
adjust_frame_size old native pixels 1424x1332 new native pixels 1520x1332 old text pixels 1376x1332 new text pixels 1472x1332 old text chars 80x36 new text chars 86x36
xg_frame_resized old native pixels 1520x1332 new native pixels 1616x1368
adjust_frame_size old native pixels 1520x1332 new native pixels 1616x1368 old text pixels 1472x1332 new text pixels 1568x1368 old text chars 86x36 new text chars 92x36
xg_frame_resized old native pixels 1616x1368 new native pixels 1712x1368
adjust_frame_size old native pixels 1616x1368 new native pixels 1712x1368 old text pixels 1568x1368 new text pixels 1664x1368 old text chars 92x36 new text chars 97x36
xg_frame_resized old native pixels 1712x1368 new native pixels 1760x1404
adjust_frame_size old native pixels 1712x1368 new native pixels 1760x1404 old text pixels 1664x1368 new text pixels 1712x1404 old text chars 97x36 new text chars 100x37
xg_frame_resized old native pixels 1760x1404 new native pixels 1824x1404
adjust_frame_size old native pixels 1760x1404 new native pixels 1824x1404 old text pixels 1712x1404 new text pixels 1776x1404 old text chars 100x37 new text chars 104x37
xg_frame_resized old native pixels 1824x1404 new native pixels 1872x1440
adjust_frame_size old native pixels 1824x1404 new native pixels 1872x1440 old text pixels 1776x1404 new text pixels 1824x1440 old text chars 104x37 new text chars 107x38
xg_frame_resized old native pixels 1872x1440 new native pixels 1888x1440
adjust_frame_size old native pixels 1872x1440 new native pixels 1888x1440 old text pixels 1824x1440 new text pixels 1840x1440 old text chars 107x38 new text chars 108x38
xg_frame_resized old native pixels 1888x1440 new native pixels 1920x1476
adjust_frame_size old native pixels 1888x1440 new native pixels 1920x1476 old text pixels 1840x1440 new text pixels 1872x1476 old text chars 108x38 new text chars 110x39
xg_frame_resized old native pixels 1920x1476 new native pixels 1936x1476
adjust_frame_size old native pixels 1920x1476 new native pixels 1936x1476 old text pixels 1872x1476 new text pixels 1888x1476 old text chars 110x39 new text chars 111x39
x_new_font old char size 17x37 new char size 17x37 text chars 111x39 old text pixels 1888x1476 new text pixels 1887x1443
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 943 base width 39 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 721 base height 85 height inc 18
xg_frame_set_char_size old native pixels 1936x1476 new native pixels 1935x1443 outer pixels 967x787 outer rest 0x0
xg_frame_resized old native pixels 1936x1476 new native pixels 1934x1442
adjust_frame_size old native pixels 1936x1476 new native pixels 1934x1442 old text pixels 1888x1476 new text pixels 1886x1442 old text chars 111x39 new text chars 110x38
x_new_font old char size 17x37 new char size 17x37 text chars 110x38 old text pixels 1886x1442 new text pixels 1870x1406
xg_frame_set_char_size old native pixels 1934x1442 new native pixels 1918x1406 outer pixels 959x769 outer rest 0x0
xg_frame_resized old native pixels 1934x1442 new native pixels 1918x1406
adjust_frame_size old native pixels 1934x1442 new native pixels 1918x1406 old text pixels 1886x1442 new text pixels 1870x1406 old text chars 110x38 new text chars 110x38
xg_frame_resized old native pixels 1918x1406 new native pixels 1918x1370
adjust_frame_size old native pixels 1918x1406 new native pixels 1918x1370 old text pixels 1870x1406 new text pixels 1870x1370 old text chars 110x38 new text chars 110x37
xg_frame_resized old native pixels 1918x1370 new native pixels 1918x1406
adjust_frame_size old native pixels 1918x1370 new native pixels 1918x1406 old text pixels 1870x1370 new text pixels 1870x1406 old text chars 110x37 new text chars 110x38
xg_frame_resized old native pixels 1918x1406 new native pixels 1918x1442
adjust_frame_size old native pixels 1918x1406 new native pixels 1918x1442 old text pixels 1870x1406 new text pixels 1870x1442 old text chars 110x38 new text chars 110x38
xg_frame_resized old native pixels 1918x1442 new native pixels 1934x1478
adjust_frame_size old native pixels 1918x1442 new native pixels 1934x1478 old text pixels 1870x1442 new text pixels 1886x1478 old text chars 110x38 new text chars 110x39
xg_frame_resized old native pixels 1934x1478 new native pixels 1934x1514
adjust_frame_size old native pixels 1934x1478 new native pixels 1934x1514 old text pixels 1886x1478 new text pixels 1886x1514 old text chars 110x39 new text chars 110x40
x_new_font old char size 17x37 new char size 17x37 text chars 110x40 old text pixels 1886x1514 new text pixels 1870x1480
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 935 base width 39 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 740 base height 86 height inc 18
xg_frame_set_char_size old native pixels 1934x1514 new native pixels 1918x1480 outer pixels 959x806 outer rest 0x0
xg_frame_resized old native pixels 1934x1514 new native pixels 1918x1480
adjust_frame_size old native pixels 1934x1514 new native pixels 1918x1480 old text pixels 1886x1514 new text pixels 1870x1480 old text chars 110x40 new text chars 110x40
x_new_font old char size 17x37 new char size 17x37 text chars 110x40 old text pixels 1870x1480 new text pixels 1870x1480
xg_frame_resized old native pixels 1918x1480 new native pixels 1934x1480
adjust_frame_size old native pixels 1918x1480 new native pixels 1934x1480 old text pixels 1870x1480 new text pixels 1886x1480 old text chars 110x40 new text chars 110x40
xg_frame_resized old native pixels 1934x1480 new native pixels 1966x1480
adjust_frame_size old native pixels 1934x1480 new native pixels 1966x1480 old text pixels 1886x1480 new text pixels 1918x1480 old text chars 110x40 new text chars 112x40
xg_frame_resized old native pixels 1966x1480 new native pixels 2062x1480
adjust_frame_size old native pixels 1966x1480 new native pixels 2062x1480 old text pixels 1918x1480 new text pixels 2014x1480 old text chars 112x40 new text chars 118x40
xg_frame_resized old native pixels 2062x1480 new native pixels 2158x1480
adjust_frame_size old native pixels 2062x1480 new native pixels 2158x1480 old text pixels 2014x1480 new text pixels 2110x1480 old text chars 118x40 new text chars 124x40
xg_frame_resized old native pixels 2158x1480 new native pixels 2334x1480
adjust_frame_size old native pixels 2158x1480 new native pixels 2334x1480 old text pixels 2110x1480 new text pixels 2286x1480 old text chars 124x40 new text chars 134x40
xg_frame_resized old native pixels 2334x1480 new native pixels 2350x1480
adjust_frame_size old native pixels 2334x1480 new native pixels 2350x1480 old text pixels 2286x1480 new text pixels 2302x1480 old text chars 134x40 new text chars 135x40
x_new_font old char size 17x37 new char size 17x37 text chars 135x40 old text pixels 2302x1480 new text pixels 2295x1480
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 1147 base width 35 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 740 base height 86 height inc 18
xg_frame_set_char_size old native pixels 2350x1480 new native pixels 2343x1480 outer pixels 1171x806 outer rest 0x0
xg_frame_resized old native pixels 2350x1480 new native pixels 2342x1480
adjust_frame_size old native pixels 2350x1480 new native pixels 2342x1480 old text pixels 2302x1480 new text pixels 2294x1480 old text chars 135x40 new text chars 134x40
x_new_font old char size 17x37 new char size 17x37 text chars 134x40 old text pixels 2294x1480 new text pixels 2278x1480
xg_frame_set_char_size old native pixels 2342x1480 new native pixels 2326x1480 outer pixels 1163x806 outer rest 0x0
xg_frame_resized old native pixels 2342x1480 new native pixels 2326x1480
adjust_frame_size old native pixels 2342x1480 new native pixels 2326x1480 old text pixels 2294x1480 new text pixels 2278x1480 old text chars 134x40 new text chars 134x40
xg_frame_resized old native pixels 2326x1480 new native pixels 2326x1516
adjust_frame_size old native pixels 2326x1480 new native pixels 2326x1516 old text pixels 2278x1480 new text pixels 2278x1516 old text chars 134x40 new text chars 134x40
xg_frame_resized old native pixels 2326x1516 new native pixels 2326x1552
adjust_frame_size old native pixels 2326x1516 new native pixels 2326x1552 old text pixels 2278x1516 new text pixels 2278x1552 old text chars 134x40 new text chars 134x41
xg_frame_resized old native pixels 2326x1552 new native pixels 2326x1588
adjust_frame_size old native pixels 2326x1552 new native pixels 2326x1588 old text pixels 2278x1552 new text pixels 2278x1588 old text chars 134x41 new text chars 134x42
x_new_font old char size 17x37 new char size 17x37 text chars 134x42 old text pixels 2278x1588 new text pixels 2278x1554
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 1139 base width 35 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 777 base height 87 height inc 18
xg_frame_set_char_size old native pixels 2326x1588 new native pixels 2326x1554 outer pixels 1163x843 outer rest 0x0
xg_frame_resized old native pixels 2326x1588 new native pixels 2326x1554
adjust_frame_size old native pixels 2326x1588 new native pixels 2326x1554 old text pixels 2278x1588 new text pixels 2278x1554 old text chars 134x42 new text chars 134x42
x_new_font old char size 17x37 new char size 17x37 text chars 134x42 old text pixels 2278x1554 new text pixels 2278x1554
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-17 1:54 ` Dmitry Gutov
@ 2023-01-17 10:04 ` martin rudalics
2023-01-17 17:35 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-17 10:04 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
> Thanks, this one reminds me of some previous patch in the respective
> bug report: repeated set-frace-attribute are stable WRT the frame
> size, but resizing the frame with the mouse and then evaling the
> set-frame-attribute form resizes the frame (in the smaller direction).
That's the one where we then tried to make the frame larger by an entire
size increment minus the scaling residue. Which means that here we
should make the frame larger by an entire size increment in the hope
that we size it back when we get notified. Please try again.
martin
[-- Attachment #2: x_rest.diff --]
[-- Type: text/x-patch, Size: 32288 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..6a955a9fa7 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,10 +1206,22 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ outer_height /= scale;
+ outer_width /= scale;
+
+ if (scale != 1 && !frame_resize_pixelwise)
+ {
+ /* Heuristically add one scaled character if the font has impair
+ size. When the WM gets back to us we remove it. */
+ if ((FRAME_COLUMN_WIDTH (f) % scale) > 0)
+ outer_width += FRAME_COLUMN_WIDTH (f) / scale;
+
+ if ((FRAME_LINE_HEIGHT (f) % scale) > 0)
+ outer_height += FRAME_LINE_HEIGHT (f) / scale;
+ }
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
/* Resize the top level widget so rows and columns remain constant.
@@ -1317,6 +1339,33 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0
+ && size_hints.width_inc > 0 && outer_height > 0
+ && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width)
+ % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height)
+ % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -1360,21 +1409,6 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
}
}
-/* Handle height/width changes (i.e. add/remove/move menu/toolbar).
- The policy is to keep the number of editable lines. */
-
-#if 0
-static void
-xg_height_or_width_changed (struct frame *f)
-{
- gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- FRAME_TOTAL_PIXEL_WIDTH (f),
- FRAME_TOTAL_PIXEL_HEIGHT (f));
- f->output_data.xp->hint_flags = 0;
- x_wm_set_size_hint (f, 0, 0);
-}
-#endif
-
#ifndef HAVE_PGTK
/* Convert an X Window WSESC on display DPY to its corresponding GtkWidget.
Must be done like this, because GtkWidget:s can have "hidden"
@@ -1917,7 +1951,8 @@ xg_free_frame_widgets (struct frame *f)
flag (this is useful when FLAGS is 0). */
void
-xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
+xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position,
+ int text_width, int text_height)
{
/* Must use GTK routines here, otherwise GTK resets the size hints
to its own defaults. */
@@ -1964,21 +1999,33 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags = f->output_data.xp->hint_flags;
hint_flags |= GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE;
- size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
- size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ size_hints.width_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_COLUMN_WIDTH (f) / scale);
+ size_hints.height_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_LINE_HEIGHT (f) / scale);
hint_flags |= GDK_HINT_BASE_SIZE;
/* Use one row/col here so base_height/width does not become zero.
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
- + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
+ base_width = ((FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f)) / scale);
+ base_height = ((FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
+ / scale);
+
+ if (text_width < 0)
+ text_width = FRAME_TEXT_WIDTH (f);
+ text_width /= scale;
+
+ if (text_height < 0)
+ text_height = FRAME_TEXT_HEIGHT (f);
+ text_height /= scale;
- size_hints.base_width = base_width;
- size_hints.base_height = base_height;
- size_hints.min_width = base_width;
- size_hints.min_height = base_height;
+ size_hints.base_width = base_width + (text_width % size_hints.width_inc);
+ size_hints.base_height = base_height + (text_height % size_hints.height_inc);
+ size_hints.min_width = size_hints.base_width;
+ size_hints.min_height = size_hints.base_height;
/* These currently have a one to one mapping with the X values, but I
don't think we should rely on that. */
@@ -2018,16 +2065,31 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags |= GDK_HINT_USER_POS;
}
- size_hints.base_width /= scale;
- size_hints.base_height /= scale;
- size_hints.width_inc /= scale;
- size_hints.height_inc /= scale;
-
if (hint_flags != f->output_data.xp->hint_flags
|| memcmp (&size_hints,
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text width"), make_fixnum (text_width),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text height"), make_fixnum (text_height),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 190d662831..21245dde5f 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -153,7 +153,7 @@ #define XG_ITEM_DATA "emacs_menuitem"
extern int xg_get_default_scrollbar_width (struct frame *f);
extern int xg_get_default_scrollbar_height (struct frame *f);
-extern void xg_wm_set_size_hint (struct frame *, long int, bool);
+extern void xg_wm_set_size_hint (struct frame *, long int, bool, int, int);
extern void update_frame_tool_bar (struct frame *f);
extern void free_frame_tool_bar (struct frame *f);
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index a32067af81..a391541e10 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1662,7 +1662,8 @@ #define INSTALL_CURSOR(FIELD, NAME) \
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- xg_wm_set_size_hint (f, window_prompting, false);
+ xg_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 13f6c6c3c4..8b077be178 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -658,7 +658,7 @@ pgtk_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
pgtk_calc_absolute_position (f);
block_input ();
- xg_wm_set_size_hint (f, 0, false);
+ xg_wm_set_size_hint (f, 0, false, -1, -1);
if (change_gravity != 0)
{
@@ -705,7 +705,8 @@ pgtk_set_window_size (struct frame *f, bool change_gravity,
f->output_data.pgtk->preferred_width = pixelwidth;
f->output_data.pgtk->preferred_height = pixelheight;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (pixelwidth),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (pixelheight));
xg_frame_set_char_size (f, pixelwidth, pixelheight);
gtk_widget_queue_resize (FRAME_WIDGET (f));
@@ -993,7 +994,10 @@ pgtk_set_parent_frame (struct frame *f, Lisp_Object new_value,
fixed, TRUE, TRUE, 0);
f->output_data.pgtk->preferred_width = alloc.width;
f->output_data.pgtk->preferred_height = alloc.height;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (alloc.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (alloc.height));
+ /* Why convert here? xg_frame_set_char_size wants native
+ pixels. */
xg_frame_set_char_size (f, FRAME_PIXEL_TO_TEXT_WIDTH (f, alloc.width),
FRAME_PIXEL_TO_TEXT_HEIGHT (f, alloc.height));
gtk_widget_queue_resize (FRAME_WIDGET (f));
diff --git a/src/widget.c b/src/widget.c
index aaab33b6d8..7468bf63fc 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -32,6 +32,7 @@
#include "sysstdio.h"
#include "xterm.h"
#include "frame.h"
+#include "blockinput.h"
#include <X11/StringDefs.h>
#include <X11/IntrinsicP.h>
@@ -154,15 +155,6 @@ emacsFrameClass (void)
return (WidgetClass) &emacsFrameClassRec;
}
-static void
-get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
-{
- struct frame *f = ew->emacs_frame.frame;
-
- *pixel_width = FRAME_COLUMN_WIDTH (f);
- *pixel_height = FRAME_LINE_HEIGHT (f);
-}
-
static void
pixel_to_char_size (EmacsFrame ew, Dimension pixel_width,
Dimension pixel_height, int *char_width, int *char_height)
@@ -207,120 +199,97 @@ get_wm_shell (Widget w)
return (WMShellWidget) wmshell;
}
-#if 0 /* Currently not used. */
-
-static void
-mark_shell_size_user_specified (Widget wmshell)
-{
- if (! XtIsWMShell (wmshell)) emacs_abort ();
- /* This is kind of sleazy, but I can't see how else to tell it to make it
- mark the WM_SIZE_HINTS size as user specified when appropriate. */
- ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;
-}
-
-#endif
-
-
static void
set_frame_size (EmacsFrame ew)
{
- /* The widget hierarchy is
-
- argv[0] emacsShell pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
-
- We accept geometry specs in this order:
-
- *Frame-NAME.geometry
- *EmacsFrame.geometry
- Emacs.geometry
-
- Other possibilities for widget hierarchies might be
-
- argv[0] frame pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane emacsTextPane
- ApplicationShell EmacsFrame Paned EmacsTextPane
-
- With the current setup, the text-display-area is the part which is
- an emacs "frame", since that's the only part managed by emacs proper
- (the menubar and the parent of the menubar and all that sort of thing
- are managed by lwlib.)
-
- The EmacsShell widget is simply a replacement for the Shell widget
- which is able to deal with using an externally-supplied window instead
- of always creating its own. It is not actually emacs specific, and
- should possibly have class "Shell" instead of "EmacsShell" to simplify
- the resources.
-
- */
-
struct frame *f = ew->emacs_frame.frame;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.height = FRAME_PIXEL_HEIGHT (f);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("set_frame_size"));
+ CALLN (Ffuncall, Qfoo_it, build_string ("set_frame_size"),
+ build_string ("native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))));
}
static bool
-update_wm_hints (WMShellWidget wmshell, EmacsFrame ew)
+update_wm_hints (WMShellWidget wmshell, EmacsFrame ew, int width, int height)
{
- int cw;
- int ch;
- Dimension rounded_width;
- Dimension rounded_height;
- int char_width;
- int char_height;
- int base_width;
- int base_height;
- char buffer[sizeof wmshell->wm.size_hints];
- char *hints_ptr;
-
- /* Copy the old size hints to the buffer. */
- memcpy (buffer, &wmshell->wm.size_hints,
- sizeof wmshell->wm.size_hints);
-
- pixel_to_char_size (ew, ew->core.width, ew->core.height,
- &char_width, &char_height);
- char_to_pixel_size (ew, char_width, char_height,
- &rounded_width, &rounded_height);
- get_default_char_pixel_size (ew, &cw, &ch);
-
- base_width = (wmshell->core.width - ew->core.width
- + (rounded_width - (char_width * cw)));
- base_height = (wmshell->core.height - ew->core.height
- + (rounded_height - (char_height * ch)));
+ struct frame *f = ew->emacs_frame.frame;
+ int char_width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
+ int char_height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ int base_width
+ = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + (((width < 0) ? FRAME_TEXT_WIDTH (f) : width) % char_width));
+ int base_height
+ = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + (((height < 0) ? FRAME_TEXT_HEIGHT (f) : height) % char_height));
+ int min_width = base_width;
+ int min_height = base_height;
+ bool value;
+
+ int old_base_width, old_base_height;
+ int old_char_width, old_char_height;
+ int old_min_width, old_min_height;
+
+ block_input ();
+ XtVaGetValues ((Widget) wmshell,
+ XtNbaseWidth, &old_base_width,
+ XtNbaseHeight, &old_base_height,
+ XtNwidthInc, &old_char_width,
+ XtNheightInc, &old_char_height,
+ XtNminWidth, &old_min_width,
+ XtNminHeight, &old_min_height,
+ NULL);
+ unblock_input ();
XtVaSetValues ((Widget) wmshell,
XtNbaseWidth, (XtArgVal) base_width,
XtNbaseHeight, (XtArgVal) base_height,
- XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
- XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
- XtNminWidth, (XtArgVal) base_width,
- XtNminHeight, (XtArgVal) base_height,
+ XtNwidthInc, (XtArgVal) char_width,
+ XtNheightInc, (XtArgVal) char_height,
+ XtNminWidth, (XtArgVal) min_width,
+ XtNminHeight, (XtArgVal) min_height,
NULL);
- /* Return if size hints really changed. If they did not, then Xt
- probably didn't set them either (or take the flags into
- account.) */
- hints_ptr = (char *) &wmshell->wm.size_hints;
+ value = (base_width != old_base_width || base_height != old_base_height
+ || char_width != old_char_width || char_height != old_char_height
+ || min_width != old_min_width || min_height != old_min_height);
- /* Skip flags, which is unsigned long. */
- return memcmp (hints_ptr + sizeof (long), buffer + sizeof (long),
- sizeof wmshell->wm.wm_hints - sizeof (long));
+ if (value)
+ {
+ CALLN (Ffuncall, Qfoo_it, build_string ("update_wm_hints"),
+ build_string ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ build_string ("old char width"), make_fixnum (old_char_width),
+ build_string ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ build_string ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base width"), make_fixnum (base_width),
+ build_string ("old_base width"), make_fixnum (old_base_width),
+ build_string ("min width"), make_fixnum (min_width),
+ build_string ("old min width"), make_fixnum (old_min_width));
+ CALLN (Ffuncall, Qfoo_it, build_string (" "),
+ build_string ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ build_string ("old char height"), make_fixnum (old_char_height),
+ build_string ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ build_string ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base height"), make_fixnum (base_height),
+ build_string ("old base height"), make_fixnum (old_base_height),
+ build_string ("min height"), make_fixnum (min_height),
+ build_string ("old min height"), make_fixnum (old_min_height));
+ }
+
+ return value;
}
bool
-widget_update_wm_size_hints (Widget widget, Widget frame)
+widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height)
{
- return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame);
+ return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame,
+ width, height);
}
static void
@@ -337,7 +306,7 @@ update_from_various_frame_slots (EmacsFrame ew)
struct frame *f = ew->emacs_frame.frame;
struct x_output *x = f->output_data.x;
- ew->core.height = FRAME_PIXEL_HEIGHT (f) - x->menubar_height;
+ ew->core.height = FRAME_PIXEL_HEIGHT (f); // - x->menubar_height;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.background_pixel = FRAME_BACKGROUND_PIXEL (f);
ew->emacs_frame.internal_border_width = f->internal_border_width;
@@ -345,12 +314,11 @@ update_from_various_frame_slots (EmacsFrame ew)
ew->emacs_frame.cursor_color = x->cursor_pixel;
ew->core.border_pixel = x->border_pixel;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("update_from_various_frame_slots"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ CALLN (Ffuncall, Qfoo_it,
+ build_string ("update_from_various_frame_slots"),
+ build_string ("native pixels"),
+ (Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f)))));
}
static void
@@ -384,7 +352,6 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
XSetWindowAttributes *attrs)
{
EmacsFrame ew = (EmacsFrame) widget;
- struct frame *f = ew->emacs_frame.frame;
/* This used to contain SubstructureRedirectMask, but this turns out
to be a problem with XIM on Solaris, and events from that mask
@@ -399,12 +366,8 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
make sure we get them all. Seen with xfcwm4 for example. */
XtAddRawEventHandler (widget, StructureNotifyMask, False, resize_cb, NULL);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("EmacsFrameRealize"));
-
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew, -1, -1);
}
static void
@@ -419,18 +382,23 @@ EmacsFrameResize (Widget widget)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameResize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ if (FRAME_PIXEL_WIDTH (f) != ew->core.width
+ || FRAME_PIXEL_HEIGHT (f) != ew->core.height)
+ CALLN (Ffuncall, Qfoo_it, build_string ("EmacsFrameResize"),
+ build_string ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ build_string ("new native pixels"),
+ Fcons (make_fixnum (ew->core.width),
+ make_fixnum (ew->core.height)));
change_frame_size (f, ew->core.width, ew->core.height,
false, true, false);
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew,
+ FRAME_PIXEL_TO_TEXT_WIDTH (f, ew->core.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, ew->core.height));
update_various_frame_slots (ew);
cancel_mouse_face (f);
@@ -472,13 +440,6 @@ EmacsFrameSetCharSize (Widget widget, int columns, int rows)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameSetCharSize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- columns, rows,
- f->new_width, f->new_height);
-
if (!frame_inhibit_resize (f, 0, Qfont)
&& !frame_inhibit_resize (f, 1, Qfont))
x_set_window_size (f, 0, columns * FRAME_COLUMN_WIDTH (f),
diff --git a/src/widget.h b/src/widget.h
index cf83cb1078..03bc809c41 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -97,6 +97,6 @@ #define XtCInitialGeometry "InitialGeometry"
/* Special entry points */
void EmacsFrameSetCharSize (Widget, int, int);
void widget_store_internal_border (Widget widget);
-bool widget_update_wm_size_hints (Widget widget, Widget frame);
+bool widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height);
#endif /* _EmacsFrame_h */
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xfns.c b/src/xfns.c
index 36b51a3011..25e1af279d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4575,7 +4575,7 @@ DEFUN ("x-wm-set-size-hint", Fx_wm_set_size_hint, Sx_wm_set_size_hint,
struct frame *f = decode_window_system_frame (frame);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
unblock_input ();
return Qnil;
}
@@ -5097,7 +5097,8 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- x_wm_set_size_hint (f, window_prompting, false);
+ x_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b1d65ce59d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
@@ -26589,7 +26609,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
x_calc_absolute_position (f);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
#ifdef USE_GTK
if (x_gtk_use_window_move)
@@ -27279,7 +27299,7 @@ x_check_fullscreen (struct frame *f)
emacs_abort ();
}
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height);
@@ -27453,7 +27473,8 @@ x_set_window_size_1 (struct frame *f, bool change_gravity,
{
if (change_gravity)
f->win_gravity = NorthWestGravity;
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height + FRAME_MENUBAR_HEIGHT (f));
@@ -28243,7 +28264,7 @@ x_make_frame_invisible (struct frame *f)
program-specified, so that when the window is mapped again, it will be
placed at the same location, without forcing the user to position it
by hand again (they have already done that once for this window.) */
- x_wm_set_size_hint (f, 0, true);
+ x_wm_set_size_hint (f, 0, true, -1, -1);
#ifdef USE_GTK
if (FRAME_GTK_OUTER_WIDGET (f))
@@ -28896,7 +28917,8 @@ x_embed_frame (struct x_display_info *dpyinfo, struct frame *f)
The GTK version is in gtkutils.c. */
void
-x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
+x_wm_set_size_hint (struct frame *f, long flags, bool user_position,
+ int width, int height)
{
#ifndef USE_GTK
XSizeHints size_hints;
@@ -28935,10 +28957,12 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
#ifndef USE_MOTIF
hints_changed
= widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
#else
widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
/* Do this all over again for the benefit of Motif, which always
knows better than the programmer. */
@@ -29012,8 +29036,16 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
{
int base_width, base_height;
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
+ if (width == -1)
+ width = FRAME_TEXT_WIDTH (f);
+
+ if (height == -1)
+ height = FRAME_TEXT_HEIGHT (f);
+
+ base_width = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0)
+ + width % FRAME_COLUMN_WIDTH (f));
+ base_height = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0)
+ + height % FRAME_LINE_HEIGHT (f));
/* The window manager uses the base width hints to calculate the
current number of rows and columns in the frame while
@@ -29075,7 +29107,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
#else
- xg_wm_set_size_hint (f, flags, user_position);
+ xg_wm_set_size_hint (f, flags, user_position, width, height);
#endif /* USE_GTK */
}
diff --git a/src/xterm.h b/src/xterm.h
index ee429e9c68..61512f1117 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1653,7 +1653,7 @@ #define SELECTION_EVENT_TIME(eventp) \
extern void x_make_frame_invisible (struct frame *);
extern void x_iconify_frame (struct frame *);
extern void x_free_frame_resources (struct frame *);
-extern void x_wm_set_size_hint (struct frame *, long, bool);
+extern void x_wm_set_size_hint (struct frame *, long, bool, int, int);
#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \
&& defined HAVE_CLOCK_GETTIME
extern void x_sync_init_fences (struct frame *);
^ permalink raw reply related [flat|nested] 169+ messages in thread
* 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
2023-01-17 10:04 ` martin rudalics
@ 2023-01-17 17:35 ` Dmitry Gutov
2023-01-18 17:13 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-17 17:35 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 768 bytes --]
On 17/01/2023 12:04, martin rudalics wrote:
> > Thanks, this one reminds me of some previous patch in the respective
> > bug report: repeated set-frace-attribute are stable WRT the frame
> > size, but resizing the frame with the mouse and then evaling the
> > set-frame-attribute form resizes the frame (in the smaller direction).
>
> That's the one where we then tried to make the frame larger by an entire
> size increment minus the scaling residue. Which means that here we
> should make the frame larger by an entire size increment in the hope
> that we size it back when we get notified. Please try again.
This time around, the frame jumps in size a little bit, even time after
I first resize with a mouse and then evaluate the set-face-attribute form.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 16408 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text height 648 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 874x898 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1748x1664
adjust_frame_size old native pixels 1488x1296 new native pixels 1748x1664 old text pixels 1440x1296 new text pixels 1700x1664 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1700x1664 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1748x1664 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1748x1664 new native pixels 1424x1368
adjust_frame_size old native pixels 1748x1664 new native pixels 1424x1368 old text pixels 1700x1664 new text pixels 1376x1368 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1376x1368 new text pixels 1360x1332
xg_frame_set_char_size old native pixels 1424x1368 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1376x1368 new text pixels 1360x1332
xg_frame_set_char_size old native pixels 1424x1368 new native pixels 1408x1332 outer pixels 712x750 outer rest 0x0
xg_frame_resized old native pixels 1424x1368 new native pixels 1440x1368
adjust_frame_size old native pixels 1424x1368 new native pixels 1440x1368 old text pixels 1376x1368 new text pixels 1392x1368 old text chars 80x36 new text chars 81x36
xg_frame_resized old native pixels 1440x1368 new native pixels 1456x1368
adjust_frame_size old native pixels 1440x1368 new native pixels 1456x1368 old text pixels 1392x1368 new text pixels 1408x1368 old text chars 81x36 new text chars 82x36
xg_frame_resized old native pixels 1456x1368 new native pixels 1472x1368
adjust_frame_size old native pixels 1456x1368 new native pixels 1472x1368 old text pixels 1408x1368 new text pixels 1424x1368 old text chars 82x36 new text chars 83x36
xg_frame_resized old native pixels 1472x1368 new native pixels 1472x1404
adjust_frame_size old native pixels 1472x1368 new native pixels 1472x1404 old text pixels 1424x1368 new text pixels 1424x1404 old text chars 83x36 new text chars 83x37
xg_frame_resized old native pixels 1472x1404 new native pixels 1488x1404
adjust_frame_size old native pixels 1472x1404 new native pixels 1488x1404 old text pixels 1424x1404 new text pixels 1440x1404 old text chars 83x37 new text chars 84x37
x_new_font old char size 17x37 new char size 17x37 text chars 84x37 old text pixels 1440x1404 new text pixels 1428x1369
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 714 base width 34 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 684 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1404 new native pixels 1476x1369 outer pixels 746x768 outer rest 0x0
xg_frame_resized old native pixels 1488x1404 new native pixels 1492x1404
adjust_frame_size old native pixels 1488x1404 new native pixels 1492x1404 old text pixels 1440x1404 new text pixels 1444x1404 old text chars 84x37 new text chars 84x37
x_new_font old char size 17x37 new char size 17x37 text chars 84x37 old text pixels 1444x1404 new text pixels 1428x1369
xg_frame_set_char_size old native pixels 1492x1404 new native pixels 1476x1369 outer pixels 746x768 outer rest 0x0
xg_frame_resized old native pixels 1492x1404 new native pixels 1492x1368
adjust_frame_size old native pixels 1492x1404 new native pixels 1492x1368 old text pixels 1444x1404 new text pixels 1444x1368 old text chars 84x37 new text chars 84x36
xg_frame_resized old native pixels 1492x1368 new native pixels 1508x1368
adjust_frame_size old native pixels 1492x1368 new native pixels 1508x1368 old text pixels 1444x1368 new text pixels 1460x1368 old text chars 84x36 new text chars 85x36
xg_frame_resized old native pixels 1508x1368 new native pixels 1556x1368
adjust_frame_size old native pixels 1508x1368 new native pixels 1556x1368 old text pixels 1460x1368 new text pixels 1508x1368 old text chars 85x36 new text chars 88x36
xg_frame_resized old native pixels 1556x1368 new native pixels 1572x1368
adjust_frame_size old native pixels 1556x1368 new native pixels 1572x1368 old text pixels 1508x1368 new text pixels 1524x1368 old text chars 88x36 new text chars 89x36
xg_frame_resized old native pixels 1572x1368 new native pixels 1588x1368
adjust_frame_size old native pixels 1572x1368 new native pixels 1588x1368 old text pixels 1524x1368 new text pixels 1540x1368 old text chars 89x36 new text chars 90x36
xg_frame_resized old native pixels 1588x1368 new native pixels 1588x1332
adjust_frame_size old native pixels 1588x1368 new native pixels 1588x1332 old text pixels 1540x1368 new text pixels 1540x1332 old text chars 90x36 new text chars 90x36
xg_frame_resized old native pixels 1588x1332 new native pixels 1604x1332
adjust_frame_size old native pixels 1588x1332 new native pixels 1604x1332 old text pixels 1540x1332 new text pixels 1556x1332 old text chars 90x36 new text chars 91x36
xg_frame_resized old native pixels 1604x1332 new native pixels 1604x1296
adjust_frame_size old native pixels 1604x1332 new native pixels 1604x1296 old text pixels 1556x1332 new text pixels 1556x1296 old text chars 91x36 new text chars 91x35
xg_frame_resized old native pixels 1604x1296 new native pixels 1620x1296
adjust_frame_size old native pixels 1604x1296 new native pixels 1620x1296 old text pixels 1556x1296 new text pixels 1572x1296 old text chars 91x35 new text chars 92x35
xg_frame_resized old native pixels 1620x1296 new native pixels 1636x1296
adjust_frame_size old native pixels 1620x1296 new native pixels 1636x1296 old text pixels 1572x1296 new text pixels 1588x1296 old text chars 92x35 new text chars 93x35
xg_frame_resized old native pixels 1636x1296 new native pixels 1636x1260
adjust_frame_size old native pixels 1636x1296 new native pixels 1636x1260 old text pixels 1588x1296 new text pixels 1588x1260 old text chars 93x35 new text chars 93x34
x_new_font old char size 17x37 new char size 17x37 text chars 93x34 old text pixels 1588x1260 new text pixels 1581x1258
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 790 base width 38 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 629 base height 101 height inc 18
xg_frame_set_char_size old native pixels 1636x1260 new native pixels 1629x1258 outer pixels 822x713 outer rest 0x0
xg_frame_resized old native pixels 1636x1260 new native pixels 1644x1294
adjust_frame_size old native pixels 1636x1260 new native pixels 1644x1294 old text pixels 1588x1260 new text pixels 1596x1294 old text chars 93x34 new text chars 93x34
x_new_font old char size 17x37 new char size 17x37 text chars 93x34 old text pixels 1596x1294 new text pixels 1581x1258
xg_frame_set_char_size old native pixels 1644x1294 new native pixels 1629x1258 outer pixels 822x713 outer rest 0x0
xg_frame_resized old native pixels 1644x1294 new native pixels 1628x1294
adjust_frame_size old native pixels 1644x1294 new native pixels 1628x1294 old text pixels 1596x1294 new text pixels 1580x1294 old text chars 93x34 new text chars 92x34
xg_frame_resized old native pixels 1628x1294 new native pixels 1596x1258
adjust_frame_size old native pixels 1628x1294 new native pixels 1596x1258 old text pixels 1580x1294 new text pixels 1548x1258 old text chars 92x34 new text chars 91x34
xg_frame_resized old native pixels 1596x1258 new native pixels 1436x1186
adjust_frame_size old native pixels 1596x1258 new native pixels 1436x1186 old text pixels 1548x1258 new text pixels 1388x1186 old text chars 91x34 new text chars 81x32
xg_frame_resized old native pixels 1436x1186 new native pixels 1356x1150
adjust_frame_size old native pixels 1436x1186 new native pixels 1356x1150 old text pixels 1388x1186 new text pixels 1308x1150 old text chars 81x32 new text chars 76x31
xg_frame_resized old native pixels 1356x1150 new native pixels 1292x1150
adjust_frame_size old native pixels 1356x1150 new native pixels 1292x1150 old text pixels 1308x1150 new text pixels 1244x1150 old text chars 76x31 new text chars 73x31
xg_frame_resized old native pixels 1292x1150 new native pixels 1276x1114
adjust_frame_size old native pixels 1292x1150 new native pixels 1276x1114 old text pixels 1244x1150 new text pixels 1228x1114 old text chars 73x31 new text chars 72x30
xg_frame_resized old native pixels 1276x1114 new native pixels 1260x1114
adjust_frame_size old native pixels 1276x1114 new native pixels 1260x1114 old text pixels 1228x1114 new text pixels 1212x1114 old text chars 72x30 new text chars 71x30
xg_frame_resized old native pixels 1260x1114 new native pixels 1260x1078
adjust_frame_size old native pixels 1260x1114 new native pixels 1260x1078 old text pixels 1212x1114 new text pixels 1212x1078 old text chars 71x30 new text chars 71x29
xg_frame_resized old native pixels 1260x1078 new native pixels 1244x1078
adjust_frame_size old native pixels 1260x1078 new native pixels 1244x1078 old text pixels 1212x1078 new text pixels 1196x1078 old text chars 71x29 new text chars 70x29
x_new_font old char size 17x37 new char size 17x37 text chars 70x29 old text pixels 1196x1078 new text pixels 1190x1073
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 595 base width 35 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 536 base height 98 height inc 18
xg_frame_set_char_size old native pixels 1244x1078 new native pixels 1238x1073 outer pixels 627x620 outer rest 0x0
xg_frame_resized old native pixels 1244x1078 new native pixels 1254x1108
adjust_frame_size old native pixels 1244x1078 new native pixels 1254x1108 old text pixels 1196x1078 new text pixels 1206x1108 old text chars 70x29 new text chars 70x29
x_new_font old char size 17x37 new char size 17x37 text chars 70x29 old text pixels 1206x1108 new text pixels 1190x1073
xg_frame_set_char_size old native pixels 1254x1108 new native pixels 1238x1073 outer pixels 627x620 outer rest 0x0
xg_frame_resized old native pixels 1254x1108 new native pixels 1270x1108
adjust_frame_size old native pixels 1254x1108 new native pixels 1270x1108 old text pixels 1206x1108 new text pixels 1222x1108 old text chars 70x29 new text chars 71x29
xg_frame_resized old native pixels 1270x1108 new native pixels 1302x1144
adjust_frame_size old native pixels 1270x1108 new native pixels 1302x1144 old text pixels 1222x1108 new text pixels 1254x1144 old text chars 71x29 new text chars 73x30
xg_frame_resized old native pixels 1302x1144 new native pixels 1446x1216
adjust_frame_size old native pixels 1302x1144 new native pixels 1446x1216 old text pixels 1254x1144 new text pixels 1398x1216 old text chars 73x30 new text chars 82x32
xg_frame_resized old native pixels 1446x1216 new native pixels 1510x1252
adjust_frame_size old native pixels 1446x1216 new native pixels 1510x1252 old text pixels 1398x1216 new text pixels 1462x1252 old text chars 82x32 new text chars 86x33
xg_frame_resized old native pixels 1510x1252 new native pixels 1638x1324
adjust_frame_size old native pixels 1510x1252 new native pixels 1638x1324 old text pixels 1462x1252 new text pixels 1590x1324 old text chars 86x33 new text chars 93x35
xg_frame_resized old native pixels 1638x1324 new native pixels 1718x1360
adjust_frame_size old native pixels 1638x1324 new native pixels 1718x1360 old text pixels 1590x1324 new text pixels 1670x1360 old text chars 93x35 new text chars 98x36
xg_frame_resized old native pixels 1718x1360 new native pixels 1766x1396
adjust_frame_size old native pixels 1718x1360 new native pixels 1766x1396 old text pixels 1670x1360 new text pixels 1718x1396 old text chars 98x36 new text chars 101x37
xg_frame_resized old native pixels 1766x1396 new native pixels 1846x1432
adjust_frame_size old native pixels 1766x1396 new native pixels 1846x1432 old text pixels 1718x1396 new text pixels 1798x1432 old text chars 101x37 new text chars 105x38
xg_frame_resized old native pixels 1846x1432 new native pixels 1894x1468
adjust_frame_size old native pixels 1846x1432 new native pixels 1894x1468 old text pixels 1798x1432 new text pixels 1846x1468 old text chars 105x38 new text chars 108x39
xg_frame_resized old native pixels 1894x1468 new native pixels 1910x1504
adjust_frame_size old native pixels 1894x1468 new native pixels 1910x1504 old text pixels 1846x1468 new text pixels 1862x1504 old text chars 108x39 new text chars 109x40
xg_frame_resized old native pixels 1910x1504 new native pixels 1926x1504
adjust_frame_size old native pixels 1910x1504 new native pixels 1926x1504 old text pixels 1862x1504 new text pixels 1878x1504 old text chars 109x40 new text chars 110x40
xg_frame_resized old native pixels 1926x1504 new native pixels 1942x1504
adjust_frame_size old native pixels 1926x1504 new native pixels 1942x1504 old text pixels 1878x1504 new text pixels 1894x1504 old text chars 110x40 new text chars 111x40
xg_frame_resized old native pixels 1942x1504 new native pixels 1942x1540
adjust_frame_size old native pixels 1942x1504 new native pixels 1942x1540 old text pixels 1894x1504 new text pixels 1894x1540 old text chars 111x40 new text chars 111x41
x_new_font old char size 17x37 new char size 17x37 text chars 111x41 old text pixels 1894x1540 new text pixels 1887x1517
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 943 base width 39 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 758 base height 86 height inc 18
xg_frame_set_char_size old native pixels 1942x1540 new native pixels 1935x1517 outer pixels 975x842 outer rest 0x0
xg_frame_resized old native pixels 1942x1540 new native pixels 1950x1552
adjust_frame_size old native pixels 1942x1540 new native pixels 1950x1552 old text pixels 1894x1540 new text pixels 1902x1552 old text chars 111x41 new text chars 111x41
x_new_font old char size 17x37 new char size 17x37 text chars 111x41 old text pixels 1902x1552 new text pixels 1887x1517
xg_frame_set_char_size old native pixels 1950x1552 new native pixels 1935x1517 outer pixels 975x842 outer rest 0x0
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-17 17:35 ` Dmitry Gutov
@ 2023-01-18 17:13 ` martin rudalics
2023-01-21 3:12 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-18 17:13 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
> This time around, the frame jumps in size a little bit, even time
_every_ right?
> after I first resize with a mouse and then evaluate the
> set-face-attribute form.
I'm not sure what to do here. As we previously discussed, you contract
an off-by-one pixel error every time you resize the frame with the mouse
and the default font has impair size. That pixel is lost in the frame
size the WM allots us. So after N mouse operations we are usually off
by N pixels unless N equals the size of the font in which case the
deviation should be compensated by our calculation of the text size in
chars.
So the size adjustments you see in the latest two patches are inherently
correct - they restore the text pixel size of the frame as the product
of the character and font sizes.
We could try to make 'set-face-attribute' adjust the pixel size of a
frame iff this would also change the size in text characters. Hiding
the rest in the base sizes would allow such behavior now. But how would
we explain such behavior to the user? Also such a beast is non-trivial
to implement - I have no idea what else it could break. Try the
attached and let's hope that it won't blow up your frame.
martin
[-- Attachment #2: x_rest.diff --]
[-- Type: text/x-patch, Size: 32323 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..3a88a3bff3 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,10 +1206,20 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ if (scale != 1 && !frame_resize_pixelwise
+ && (FRAME_PIXEL_TO_TEXT_WIDTH (f, width) / FRAME_COLS (f)
+ == FRAME_TEXT_WIDTH (f) / FRAME_COLS (f))
+ && (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height) / FRAME_LINES (f)
+ == FRAME_TEXT_HEIGHT (f) / FRAME_LINES (f)))
+ /* If we wouldn't get an increase in the number of text columns or
+ text lines, don't bother. This is controversial. */
+ return;
+
+ outer_height /= scale;
+ outer_width /= scale;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
/* Resize the top level widget so rows and columns remain constant.
@@ -1317,6 +1337,33 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0
+ && size_hints.width_inc > 0 && outer_height > 0
+ && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width)
+ % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height)
+ % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -1360,21 +1407,6 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
}
}
-/* Handle height/width changes (i.e. add/remove/move menu/toolbar).
- The policy is to keep the number of editable lines. */
-
-#if 0
-static void
-xg_height_or_width_changed (struct frame *f)
-{
- gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- FRAME_TOTAL_PIXEL_WIDTH (f),
- FRAME_TOTAL_PIXEL_HEIGHT (f));
- f->output_data.xp->hint_flags = 0;
- x_wm_set_size_hint (f, 0, 0);
-}
-#endif
-
#ifndef HAVE_PGTK
/* Convert an X Window WSESC on display DPY to its corresponding GtkWidget.
Must be done like this, because GtkWidget:s can have "hidden"
@@ -1917,7 +1949,8 @@ xg_free_frame_widgets (struct frame *f)
flag (this is useful when FLAGS is 0). */
void
-xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
+xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position,
+ int text_width, int text_height)
{
/* Must use GTK routines here, otherwise GTK resets the size hints
to its own defaults. */
@@ -1964,21 +1997,33 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags = f->output_data.xp->hint_flags;
hint_flags |= GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE;
- size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
- size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ size_hints.width_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_COLUMN_WIDTH (f) / scale);
+ size_hints.height_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_LINE_HEIGHT (f) / scale);
hint_flags |= GDK_HINT_BASE_SIZE;
/* Use one row/col here so base_height/width does not become zero.
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
- + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
+ base_width = ((FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f)) / scale);
+ base_height = ((FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
+ / scale);
- size_hints.base_width = base_width;
- size_hints.base_height = base_height;
- size_hints.min_width = base_width;
- size_hints.min_height = base_height;
+ if (text_width < 0)
+ text_width = FRAME_TEXT_WIDTH (f);
+ text_width /= scale;
+
+ if (text_height < 0)
+ text_height = FRAME_TEXT_HEIGHT (f);
+ text_height /= scale;
+
+ size_hints.base_width = base_width + (text_width % size_hints.width_inc);
+ size_hints.base_height = base_height + (text_height % size_hints.height_inc);
+ size_hints.min_width = size_hints.base_width;
+ size_hints.min_height = size_hints.base_height;
/* These currently have a one to one mapping with the X values, but I
don't think we should rely on that. */
@@ -2018,16 +2063,31 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags |= GDK_HINT_USER_POS;
}
- size_hints.base_width /= scale;
- size_hints.base_height /= scale;
- size_hints.width_inc /= scale;
- size_hints.height_inc /= scale;
-
if (hint_flags != f->output_data.xp->hint_flags
|| memcmp (&size_hints,
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text width"), make_fixnum (text_width),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text height"), make_fixnum (text_height),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 190d662831..21245dde5f 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -153,7 +153,7 @@ #define XG_ITEM_DATA "emacs_menuitem"
extern int xg_get_default_scrollbar_width (struct frame *f);
extern int xg_get_default_scrollbar_height (struct frame *f);
-extern void xg_wm_set_size_hint (struct frame *, long int, bool);
+extern void xg_wm_set_size_hint (struct frame *, long int, bool, int, int);
extern void update_frame_tool_bar (struct frame *f);
extern void free_frame_tool_bar (struct frame *f);
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index a32067af81..a391541e10 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1662,7 +1662,8 @@ #define INSTALL_CURSOR(FIELD, NAME) \
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- xg_wm_set_size_hint (f, window_prompting, false);
+ xg_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 13f6c6c3c4..8b077be178 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -658,7 +658,7 @@ pgtk_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
pgtk_calc_absolute_position (f);
block_input ();
- xg_wm_set_size_hint (f, 0, false);
+ xg_wm_set_size_hint (f, 0, false, -1, -1);
if (change_gravity != 0)
{
@@ -705,7 +705,8 @@ pgtk_set_window_size (struct frame *f, bool change_gravity,
f->output_data.pgtk->preferred_width = pixelwidth;
f->output_data.pgtk->preferred_height = pixelheight;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (pixelwidth),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (pixelheight));
xg_frame_set_char_size (f, pixelwidth, pixelheight);
gtk_widget_queue_resize (FRAME_WIDGET (f));
@@ -993,7 +994,10 @@ pgtk_set_parent_frame (struct frame *f, Lisp_Object new_value,
fixed, TRUE, TRUE, 0);
f->output_data.pgtk->preferred_width = alloc.width;
f->output_data.pgtk->preferred_height = alloc.height;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (alloc.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (alloc.height));
+ /* Why convert here? xg_frame_set_char_size wants native
+ pixels. */
xg_frame_set_char_size (f, FRAME_PIXEL_TO_TEXT_WIDTH (f, alloc.width),
FRAME_PIXEL_TO_TEXT_HEIGHT (f, alloc.height));
gtk_widget_queue_resize (FRAME_WIDGET (f));
diff --git a/src/widget.c b/src/widget.c
index aaab33b6d8..7468bf63fc 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -32,6 +32,7 @@
#include "sysstdio.h"
#include "xterm.h"
#include "frame.h"
+#include "blockinput.h"
#include <X11/StringDefs.h>
#include <X11/IntrinsicP.h>
@@ -154,15 +155,6 @@ emacsFrameClass (void)
return (WidgetClass) &emacsFrameClassRec;
}
-static void
-get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
-{
- struct frame *f = ew->emacs_frame.frame;
-
- *pixel_width = FRAME_COLUMN_WIDTH (f);
- *pixel_height = FRAME_LINE_HEIGHT (f);
-}
-
static void
pixel_to_char_size (EmacsFrame ew, Dimension pixel_width,
Dimension pixel_height, int *char_width, int *char_height)
@@ -207,120 +199,97 @@ get_wm_shell (Widget w)
return (WMShellWidget) wmshell;
}
-#if 0 /* Currently not used. */
-
-static void
-mark_shell_size_user_specified (Widget wmshell)
-{
- if (! XtIsWMShell (wmshell)) emacs_abort ();
- /* This is kind of sleazy, but I can't see how else to tell it to make it
- mark the WM_SIZE_HINTS size as user specified when appropriate. */
- ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;
-}
-
-#endif
-
-
static void
set_frame_size (EmacsFrame ew)
{
- /* The widget hierarchy is
-
- argv[0] emacsShell pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
-
- We accept geometry specs in this order:
-
- *Frame-NAME.geometry
- *EmacsFrame.geometry
- Emacs.geometry
-
- Other possibilities for widget hierarchies might be
-
- argv[0] frame pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane emacsTextPane
- ApplicationShell EmacsFrame Paned EmacsTextPane
-
- With the current setup, the text-display-area is the part which is
- an emacs "frame", since that's the only part managed by emacs proper
- (the menubar and the parent of the menubar and all that sort of thing
- are managed by lwlib.)
-
- The EmacsShell widget is simply a replacement for the Shell widget
- which is able to deal with using an externally-supplied window instead
- of always creating its own. It is not actually emacs specific, and
- should possibly have class "Shell" instead of "EmacsShell" to simplify
- the resources.
-
- */
-
struct frame *f = ew->emacs_frame.frame;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.height = FRAME_PIXEL_HEIGHT (f);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("set_frame_size"));
+ CALLN (Ffuncall, Qfoo_it, build_string ("set_frame_size"),
+ build_string ("native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))));
}
static bool
-update_wm_hints (WMShellWidget wmshell, EmacsFrame ew)
+update_wm_hints (WMShellWidget wmshell, EmacsFrame ew, int width, int height)
{
- int cw;
- int ch;
- Dimension rounded_width;
- Dimension rounded_height;
- int char_width;
- int char_height;
- int base_width;
- int base_height;
- char buffer[sizeof wmshell->wm.size_hints];
- char *hints_ptr;
-
- /* Copy the old size hints to the buffer. */
- memcpy (buffer, &wmshell->wm.size_hints,
- sizeof wmshell->wm.size_hints);
-
- pixel_to_char_size (ew, ew->core.width, ew->core.height,
- &char_width, &char_height);
- char_to_pixel_size (ew, char_width, char_height,
- &rounded_width, &rounded_height);
- get_default_char_pixel_size (ew, &cw, &ch);
-
- base_width = (wmshell->core.width - ew->core.width
- + (rounded_width - (char_width * cw)));
- base_height = (wmshell->core.height - ew->core.height
- + (rounded_height - (char_height * ch)));
+ struct frame *f = ew->emacs_frame.frame;
+ int char_width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
+ int char_height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ int base_width
+ = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + (((width < 0) ? FRAME_TEXT_WIDTH (f) : width) % char_width));
+ int base_height
+ = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + (((height < 0) ? FRAME_TEXT_HEIGHT (f) : height) % char_height));
+ int min_width = base_width;
+ int min_height = base_height;
+ bool value;
+
+ int old_base_width, old_base_height;
+ int old_char_width, old_char_height;
+ int old_min_width, old_min_height;
+
+ block_input ();
+ XtVaGetValues ((Widget) wmshell,
+ XtNbaseWidth, &old_base_width,
+ XtNbaseHeight, &old_base_height,
+ XtNwidthInc, &old_char_width,
+ XtNheightInc, &old_char_height,
+ XtNminWidth, &old_min_width,
+ XtNminHeight, &old_min_height,
+ NULL);
+ unblock_input ();
XtVaSetValues ((Widget) wmshell,
XtNbaseWidth, (XtArgVal) base_width,
XtNbaseHeight, (XtArgVal) base_height,
- XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
- XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
- XtNminWidth, (XtArgVal) base_width,
- XtNminHeight, (XtArgVal) base_height,
+ XtNwidthInc, (XtArgVal) char_width,
+ XtNheightInc, (XtArgVal) char_height,
+ XtNminWidth, (XtArgVal) min_width,
+ XtNminHeight, (XtArgVal) min_height,
NULL);
- /* Return if size hints really changed. If they did not, then Xt
- probably didn't set them either (or take the flags into
- account.) */
- hints_ptr = (char *) &wmshell->wm.size_hints;
+ value = (base_width != old_base_width || base_height != old_base_height
+ || char_width != old_char_width || char_height != old_char_height
+ || min_width != old_min_width || min_height != old_min_height);
- /* Skip flags, which is unsigned long. */
- return memcmp (hints_ptr + sizeof (long), buffer + sizeof (long),
- sizeof wmshell->wm.wm_hints - sizeof (long));
+ if (value)
+ {
+ CALLN (Ffuncall, Qfoo_it, build_string ("update_wm_hints"),
+ build_string ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ build_string ("old char width"), make_fixnum (old_char_width),
+ build_string ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ build_string ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base width"), make_fixnum (base_width),
+ build_string ("old_base width"), make_fixnum (old_base_width),
+ build_string ("min width"), make_fixnum (min_width),
+ build_string ("old min width"), make_fixnum (old_min_width));
+ CALLN (Ffuncall, Qfoo_it, build_string (" "),
+ build_string ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ build_string ("old char height"), make_fixnum (old_char_height),
+ build_string ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ build_string ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base height"), make_fixnum (base_height),
+ build_string ("old base height"), make_fixnum (old_base_height),
+ build_string ("min height"), make_fixnum (min_height),
+ build_string ("old min height"), make_fixnum (old_min_height));
+ }
+
+ return value;
}
bool
-widget_update_wm_size_hints (Widget widget, Widget frame)
+widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height)
{
- return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame);
+ return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame,
+ width, height);
}
static void
@@ -337,7 +306,7 @@ update_from_various_frame_slots (EmacsFrame ew)
struct frame *f = ew->emacs_frame.frame;
struct x_output *x = f->output_data.x;
- ew->core.height = FRAME_PIXEL_HEIGHT (f) - x->menubar_height;
+ ew->core.height = FRAME_PIXEL_HEIGHT (f); // - x->menubar_height;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.background_pixel = FRAME_BACKGROUND_PIXEL (f);
ew->emacs_frame.internal_border_width = f->internal_border_width;
@@ -345,12 +314,11 @@ update_from_various_frame_slots (EmacsFrame ew)
ew->emacs_frame.cursor_color = x->cursor_pixel;
ew->core.border_pixel = x->border_pixel;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("update_from_various_frame_slots"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ CALLN (Ffuncall, Qfoo_it,
+ build_string ("update_from_various_frame_slots"),
+ build_string ("native pixels"),
+ (Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f)))));
}
static void
@@ -384,7 +352,6 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
XSetWindowAttributes *attrs)
{
EmacsFrame ew = (EmacsFrame) widget;
- struct frame *f = ew->emacs_frame.frame;
/* This used to contain SubstructureRedirectMask, but this turns out
to be a problem with XIM on Solaris, and events from that mask
@@ -399,12 +366,8 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
make sure we get them all. Seen with xfcwm4 for example. */
XtAddRawEventHandler (widget, StructureNotifyMask, False, resize_cb, NULL);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("EmacsFrameRealize"));
-
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew, -1, -1);
}
static void
@@ -419,18 +382,23 @@ EmacsFrameResize (Widget widget)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameResize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ if (FRAME_PIXEL_WIDTH (f) != ew->core.width
+ || FRAME_PIXEL_HEIGHT (f) != ew->core.height)
+ CALLN (Ffuncall, Qfoo_it, build_string ("EmacsFrameResize"),
+ build_string ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ build_string ("new native pixels"),
+ Fcons (make_fixnum (ew->core.width),
+ make_fixnum (ew->core.height)));
change_frame_size (f, ew->core.width, ew->core.height,
false, true, false);
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew,
+ FRAME_PIXEL_TO_TEXT_WIDTH (f, ew->core.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, ew->core.height));
update_various_frame_slots (ew);
cancel_mouse_face (f);
@@ -472,13 +440,6 @@ EmacsFrameSetCharSize (Widget widget, int columns, int rows)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameSetCharSize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- columns, rows,
- f->new_width, f->new_height);
-
if (!frame_inhibit_resize (f, 0, Qfont)
&& !frame_inhibit_resize (f, 1, Qfont))
x_set_window_size (f, 0, columns * FRAME_COLUMN_WIDTH (f),
diff --git a/src/widget.h b/src/widget.h
index cf83cb1078..03bc809c41 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -97,6 +97,6 @@ #define XtCInitialGeometry "InitialGeometry"
/* Special entry points */
void EmacsFrameSetCharSize (Widget, int, int);
void widget_store_internal_border (Widget widget);
-bool widget_update_wm_size_hints (Widget widget, Widget frame);
+bool widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height);
#endif /* _EmacsFrame_h */
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xfns.c b/src/xfns.c
index 36b51a3011..25e1af279d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4575,7 +4575,7 @@ DEFUN ("x-wm-set-size-hint", Fx_wm_set_size_hint, Sx_wm_set_size_hint,
struct frame *f = decode_window_system_frame (frame);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
unblock_input ();
return Qnil;
}
@@ -5097,7 +5097,8 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- x_wm_set_size_hint (f, window_prompting, false);
+ x_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b1d65ce59d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
@@ -26589,7 +26609,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
x_calc_absolute_position (f);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
#ifdef USE_GTK
if (x_gtk_use_window_move)
@@ -27279,7 +27299,7 @@ x_check_fullscreen (struct frame *f)
emacs_abort ();
}
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height);
@@ -27453,7 +27473,8 @@ x_set_window_size_1 (struct frame *f, bool change_gravity,
{
if (change_gravity)
f->win_gravity = NorthWestGravity;
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height + FRAME_MENUBAR_HEIGHT (f));
@@ -28243,7 +28264,7 @@ x_make_frame_invisible (struct frame *f)
program-specified, so that when the window is mapped again, it will be
placed at the same location, without forcing the user to position it
by hand again (they have already done that once for this window.) */
- x_wm_set_size_hint (f, 0, true);
+ x_wm_set_size_hint (f, 0, true, -1, -1);
#ifdef USE_GTK
if (FRAME_GTK_OUTER_WIDGET (f))
@@ -28896,7 +28917,8 @@ x_embed_frame (struct x_display_info *dpyinfo, struct frame *f)
The GTK version is in gtkutils.c. */
void
-x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
+x_wm_set_size_hint (struct frame *f, long flags, bool user_position,
+ int width, int height)
{
#ifndef USE_GTK
XSizeHints size_hints;
@@ -28935,10 +28957,12 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
#ifndef USE_MOTIF
hints_changed
= widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
#else
widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
/* Do this all over again for the benefit of Motif, which always
knows better than the programmer. */
@@ -29012,8 +29036,16 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
{
int base_width, base_height;
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
+ if (width == -1)
+ width = FRAME_TEXT_WIDTH (f);
+
+ if (height == -1)
+ height = FRAME_TEXT_HEIGHT (f);
+
+ base_width = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0)
+ + width % FRAME_COLUMN_WIDTH (f));
+ base_height = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0)
+ + height % FRAME_LINE_HEIGHT (f));
/* The window manager uses the base width hints to calculate the
current number of rows and columns in the frame while
@@ -29075,7 +29107,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
#else
- xg_wm_set_size_hint (f, flags, user_position);
+ xg_wm_set_size_hint (f, flags, user_position, width, height);
#endif /* USE_GTK */
}
diff --git a/src/xterm.h b/src/xterm.h
index ee429e9c68..61512f1117 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1653,7 +1653,7 @@ #define SELECTION_EVENT_TIME(eventp) \
extern void x_make_frame_invisible (struct frame *);
extern void x_iconify_frame (struct frame *);
extern void x_free_frame_resources (struct frame *);
-extern void x_wm_set_size_hint (struct frame *, long, bool);
+extern void x_wm_set_size_hint (struct frame *, long, bool, int, int);
#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \
&& defined HAVE_CLOCK_GETTIME
extern void x_sync_init_fences (struct frame *);
^ permalink raw reply related [flat|nested] 169+ messages in thread
* 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
2023-01-18 17:13 ` martin rudalics
@ 2023-01-21 3:12 ` Dmitry Gutov
2023-01-21 10:08 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-21 3:12 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
On 18/01/2023 19:13, martin rudalics wrote:
> > This time around, the frame jumps in size a little bit, even time
> _every_ right?
>
> > after I first resize with a mouse and then evaluate the
> > set-face-attribute form.
>
> I'm not sure what to do here. As we previously discussed, you contract
> an off-by-one pixel error every time you resize the frame with the mouse
> and the default font has impair size. That pixel is lost in the frame
> size the WM allots us. So after N mouse operations we are usually off
> by N pixels unless N equals the size of the font in which case the
> deviation should be compensated by our calculation of the text size in
> chars.
The previous scenarios (with one of the patches from the other bug
thread) had frame at "impair" size only after some resizings with the
mouse. For most sizes the frame ended up at "correct" sizes, but there
were relatively rare sizes where this was not the case.
With your last patch here, however, the frame seemingly ended up at an
"impair" size every time I resized it with the mouse.
> So the size adjustments you see in the latest two patches are inherently
> correct - they restore the text pixel size of the frame as the product
> of the character and font sizes.
>
> We could try to make 'set-face-attribute' adjust the pixel size of a
> frame iff this would also change the size in text characters. Hiding
> the rest in the base sizes would allow such behavior now. But how would
> we explain such behavior to the user? Also such a beast is non-trivial
> to implement - I have no idea what else it could break. Try the
> attached and let's hope that it won't blow up your frame.
With this patch 'emacs -Q' starts up at 32x6 columns/lines. :-)
Very small window, that.
Otherwise, the behavior seems pretty stable:
- Repeated invocations of set-face-attribute don't change frame size,
- After resizing with the mouse, at some frame sizes set-face-attribute
does cause one resize (e.g. at 80x30, according to GNOME), but most do
not -- just like the older patch I referred to in the first paragraph.
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-21 3:12 ` Dmitry Gutov
@ 2023-01-21 10:08 ` martin rudalics
2023-01-22 1:56 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-21 10:08 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
> The previous scenarios (with one of the patches from the other bug
> thread) had frame at "impair" size only after some resizings with the
> mouse. For most sizes the frame ended up at "correct" sizes, but there
> were relatively rare sizes where this was not the case.
For reference let's try to stick to the last x_scale_font.diff patch I
sent you. What was the "impair" size there? Note in all theses cases:
The real size of a frame as it is displayed (or better cut off) by the
WM is only reflected in our pixel sizes. The character sizes (including
those displayed by GNOME) are just approximations which reflect the
displayed sizes faithfully iff when multiplied by the character sizes
they result in the corresponding pixel size.
> With your last patch here, however, the frame seemingly ended up at an "impair" size every time I resized it with the mouse.
The present one or the one I sent you before?
> With this patch 'emacs -Q' starts up at 32x6 columns/lines. :-)
>
> Very small window, that.
"The Incredible Shrinking Frame"
> Otherwise, the behavior seems pretty stable:
>
> - Repeated invocations of set-face-attribute don't change frame size,
> - After resizing with the mouse, at some frame sizes set-face-attribute does cause one resize (e.g. at 80x30, according to GNOME), but most do not -- just like the older patch I referred to in the first paragraph.
Please send me the *foo* transcript.
Thanks, martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-21 10:08 ` martin rudalics
@ 2023-01-22 1:56 ` Dmitry Gutov
2023-01-22 9:54 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-22 1:56 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 2726 bytes --]
On 21/01/2023 12:08, martin rudalics wrote:
> > The previous scenarios (with one of the patches from the other bug
> > thread) had frame at "impair" size only after some resizings with the
> > mouse. For most sizes the frame ended up at "correct" sizes, but there
> > were relatively rare sizes where this was not the case.
>
> For reference let's try to stick to the last x_scale_font.diff patch I
> sent you. What was the "impair" size there?
According to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52493#332,
some impair sizes were 80x36 minus 1 in any dimension using the mouse.
> Note in all theses cases:
> The real size of a frame as it is displayed (or better cut off) by the
> WM is only reflected in our pixel sizes. The character sizes (including
> those displayed by GNOME) are just approximations which reflect the
> displayed sizes faithfully iff when multiplied by the character sizes
> they result in the corresponding pixel size.
Sure.
> > With your last patch here, however, the frame seemingly ended up at
> an "impair" size every time I resized it with the mouse.
>
> The present one or the one I sent you before?
The one from the message in this thread which I was responding to. File
called x_rest.diff.
> > With this patch 'emacs -Q' starts up at 32x6 columns/lines. :-)
> >
> > Very small window, that.
>
> "The Incredible Shrinking Frame"
>
> > Otherwise, the behavior seems pretty stable:
> >
> > - Repeated invocations of set-face-attribute don't change frame size,
> > - After resizing with the mouse, at some frame sizes
> set-face-attribute does cause one resize (e.g. at 80x30, according to
> GNOME), but most do not -- just like the older patch I referred to in
> the first paragraph.
>
> Please send me the *foo* transcript.
Sorry, forgot about it last time. So, with x_rest.diff, the attached
transcript is of:
1. Resizing the frame to 80x36 (according to GNOME).
2. Evaluating the set-face-attribute form twice.
3. Resizing the frame to 80x20 (per GNOME), which is 76x20 according to
our internal measurements.
4. Evaluating the set-face-attribute form twice again.
5. Resizing to 80x32.
6. Evaluating s-f-a twice again.
In this scenario, step 4 doesn't change the frame size. But if I skip
step 1, step 4 (evaluating s-f-a after resizing to 80x20) does change
the frame size. And step 6 (s-f-a at size 80x32) does not.
So it seems the history of size changes now (?) affects which sizes are
"impair".
Also, only height is important now: if height 20 is "impair", then I can
resize the frame to any width with this height, and evaling s-f-a will
shrink the frame in both dimensions by one char. Same for height 34 in
the alternative scenario.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 34430 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1488x1296 new native pixels 634x350
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
adjust_frame_size old native pixels 1488x1296 new native pixels 634x350 old text pixels 1440x1296 new text pixels 586x350 old text chars 80x36 new text chars 32x9
xg_frame_resized old native pixels 634x350 new native pixels 624x324
adjust_frame_size old native pixels 634x350 new native pixels 624x324 old text pixels 586x350 new text pixels 576x324 old text chars 32x9 new text chars 32x9
xg_frame_resized old native pixels 624x324 new native pixels 624x242
adjust_frame_size old native pixels 624x324 new native pixels 624x242 old text pixels 576x324 new text pixels 576x242 old text chars 32x9 new text chars 32x6
xg_frame_resized old native pixels 624x242 new native pixels 624x278
adjust_frame_size old native pixels 624x242 new native pixels 624x278 old text pixels 576x242 new text pixels 576x278 old text chars 32x6 new text chars 32x7
xg_frame_resized old native pixels 624x278 new native pixels 642x314
adjust_frame_size old native pixels 624x278 new native pixels 642x314 old text pixels 576x278 new text pixels 594x314 old text chars 32x7 new text chars 33x8
xg_frame_resized old native pixels 642x314 new native pixels 660x350
adjust_frame_size old native pixels 642x314 new native pixels 660x350 old text pixels 594x314 new text pixels 612x350 old text chars 33x8 new text chars 34x9
xg_frame_resized old native pixels 660x350 new native pixels 678x422
adjust_frame_size old native pixels 660x350 new native pixels 678x422 old text pixels 612x350 new text pixels 630x422 old text chars 34x9 new text chars 35x11
xg_frame_resized old native pixels 678x422 new native pixels 732x494
adjust_frame_size old native pixels 678x422 new native pixels 732x494 old text pixels 630x422 new text pixels 684x494 old text chars 35x11 new text chars 38x13
xg_frame_resized old native pixels 732x494 new native pixels 750x530
adjust_frame_size old native pixels 732x494 new native pixels 750x530 old text pixels 684x494 new text pixels 702x530 old text chars 38x13 new text chars 39x14
xg_frame_resized old native pixels 750x530 new native pixels 768x602
adjust_frame_size old native pixels 750x530 new native pixels 768x602 old text pixels 702x530 new text pixels 720x602 old text chars 39x14 new text chars 40x16
xg_frame_resized old native pixels 768x602 new native pixels 786x638
adjust_frame_size old native pixels 768x602 new native pixels 786x638 old text pixels 720x602 new text pixels 738x638 old text chars 40x16 new text chars 41x17
xg_frame_resized old native pixels 786x638 new native pixels 804x674
adjust_frame_size old native pixels 786x638 new native pixels 804x674 old text pixels 738x638 new text pixels 756x674 old text chars 41x17 new text chars 42x18
xg_frame_resized old native pixels 804x674 new native pixels 822x710
adjust_frame_size old native pixels 804x674 new native pixels 822x710 old text pixels 756x674 new text pixels 774x710 old text chars 42x18 new text chars 43x19
xg_frame_resized old native pixels 822x710 new native pixels 840x746
adjust_frame_size old native pixels 822x710 new native pixels 840x746 old text pixels 774x710 new text pixels 792x746 old text chars 43x19 new text chars 44x20
xg_frame_resized old native pixels 840x746 new native pixels 858x746
adjust_frame_size old native pixels 840x746 new native pixels 858x746 old text pixels 792x746 new text pixels 810x746 old text chars 44x20 new text chars 45x20
xg_frame_resized old native pixels 858x746 new native pixels 876x818
adjust_frame_size old native pixels 858x746 new native pixels 876x818 old text pixels 810x746 new text pixels 828x818 old text chars 45x20 new text chars 46x22
xg_frame_resized old native pixels 876x818 new native pixels 894x818
adjust_frame_size old native pixels 876x818 new native pixels 894x818 old text pixels 828x818 new text pixels 846x818 old text chars 46x22 new text chars 47x22
xg_frame_resized old native pixels 894x818 new native pixels 894x854
adjust_frame_size old native pixels 894x818 new native pixels 894x854 old text pixels 846x818 new text pixels 846x854 old text chars 47x22 new text chars 47x23
xg_frame_resized old native pixels 894x854 new native pixels 912x854
adjust_frame_size old native pixels 894x854 new native pixels 912x854 old text pixels 846x854 new text pixels 864x854 old text chars 47x23 new text chars 48x23
xg_frame_resized old native pixels 912x854 new native pixels 912x890
adjust_frame_size old native pixels 912x854 new native pixels 912x890 old text pixels 864x854 new text pixels 864x890 old text chars 48x23 new text chars 48x24
xg_frame_resized old native pixels 912x890 new native pixels 930x890
adjust_frame_size old native pixels 912x890 new native pixels 930x890 old text pixels 864x890 new text pixels 882x890 old text chars 48x24 new text chars 49x24
xg_frame_resized old native pixels 930x890 new native pixels 930x926
adjust_frame_size old native pixels 930x890 new native pixels 930x926 old text pixels 882x890 new text pixels 882x926 old text chars 49x24 new text chars 49x25
xg_frame_resized old native pixels 930x926 new native pixels 948x926
adjust_frame_size old native pixels 930x926 new native pixels 948x926 old text pixels 882x926 new text pixels 900x926 old text chars 49x25 new text chars 50x25
xg_frame_resized old native pixels 948x926 new native pixels 966x926
adjust_frame_size old native pixels 948x926 new native pixels 966x926 old text pixels 900x926 new text pixels 918x926 old text chars 50x25 new text chars 51x25
xg_frame_resized old native pixels 966x926 new native pixels 984x962
adjust_frame_size old native pixels 966x926 new native pixels 984x962 old text pixels 918x926 new text pixels 936x962 old text chars 51x25 new text chars 52x26
xg_frame_resized old native pixels 984x962 new native pixels 1002x962
adjust_frame_size old native pixels 984x962 new native pixels 1002x962 old text pixels 936x962 new text pixels 954x962 old text chars 52x26 new text chars 53x26
xg_frame_resized old native pixels 1002x962 new native pixels 1002x998
adjust_frame_size old native pixels 1002x962 new native pixels 1002x998 old text pixels 954x962 new text pixels 954x998 old text chars 53x26 new text chars 53x27
xg_frame_resized old native pixels 1002x998 new native pixels 1020x998
adjust_frame_size old native pixels 1002x998 new native pixels 1020x998 old text pixels 954x998 new text pixels 972x998 old text chars 53x27 new text chars 54x27
xg_frame_resized old native pixels 1020x998 new native pixels 1038x998
adjust_frame_size old native pixels 1020x998 new native pixels 1038x998 old text pixels 972x998 new text pixels 990x998 old text chars 54x27 new text chars 55x27
xg_frame_resized old native pixels 1038x998 new native pixels 1056x998
adjust_frame_size old native pixels 1038x998 new native pixels 1056x998 old text pixels 990x998 new text pixels 1008x998 old text chars 55x27 new text chars 56x27
xg_frame_resized old native pixels 1056x998 new native pixels 1056x1034
adjust_frame_size old native pixels 1056x998 new native pixels 1056x1034 old text pixels 1008x998 new text pixels 1008x1034 old text chars 56x27 new text chars 56x28
xg_frame_resized old native pixels 1056x1034 new native pixels 1074x1034
adjust_frame_size old native pixels 1056x1034 new native pixels 1074x1034 old text pixels 1008x1034 new text pixels 1026x1034 old text chars 56x28 new text chars 57x28
xg_frame_resized old native pixels 1074x1034 new native pixels 1092x1034
adjust_frame_size old native pixels 1074x1034 new native pixels 1092x1034 old text pixels 1026x1034 new text pixels 1044x1034 old text chars 57x28 new text chars 58x28
xg_frame_resized old native pixels 1092x1034 new native pixels 1110x1034
adjust_frame_size old native pixels 1092x1034 new native pixels 1110x1034 old text pixels 1044x1034 new text pixels 1062x1034 old text chars 58x28 new text chars 59x28
xg_frame_resized old native pixels 1110x1034 new native pixels 1110x1070
adjust_frame_size old native pixels 1110x1034 new native pixels 1110x1070 old text pixels 1062x1034 new text pixels 1062x1070 old text chars 59x28 new text chars 59x29
xg_frame_resized old native pixels 1110x1070 new native pixels 1128x1070
adjust_frame_size old native pixels 1110x1070 new native pixels 1128x1070 old text pixels 1062x1070 new text pixels 1080x1070 old text chars 59x29 new text chars 60x29
xg_frame_resized old native pixels 1128x1070 new native pixels 1146x1070
adjust_frame_size old native pixels 1128x1070 new native pixels 1146x1070 old text pixels 1080x1070 new text pixels 1098x1070 old text chars 60x29 new text chars 61x29
xg_frame_resized old native pixels 1146x1070 new native pixels 1164x1070
adjust_frame_size old native pixels 1146x1070 new native pixels 1164x1070 old text pixels 1098x1070 new text pixels 1116x1070 old text chars 61x29 new text chars 62x29
xg_frame_resized old native pixels 1164x1070 new native pixels 1164x1106
adjust_frame_size old native pixels 1164x1070 new native pixels 1164x1106 old text pixels 1116x1070 new text pixels 1116x1106 old text chars 62x29 new text chars 62x30
xg_frame_resized old native pixels 1164x1106 new native pixels 1182x1106
adjust_frame_size old native pixels 1164x1106 new native pixels 1182x1106 old text pixels 1116x1106 new text pixels 1134x1106 old text chars 62x30 new text chars 63x30
xg_frame_resized old native pixels 1182x1106 new native pixels 1200x1142
adjust_frame_size old native pixels 1182x1106 new native pixels 1200x1142 old text pixels 1134x1106 new text pixels 1152x1142 old text chars 63x30 new text chars 64x31
xg_frame_resized old native pixels 1200x1142 new native pixels 1218x1178
adjust_frame_size old native pixels 1200x1142 new native pixels 1218x1178 old text pixels 1152x1142 new text pixels 1170x1178 old text chars 64x31 new text chars 65x32
xg_frame_resized old native pixels 1218x1178 new native pixels 1218x1214
adjust_frame_size old native pixels 1218x1178 new native pixels 1218x1214 old text pixels 1170x1178 new text pixels 1170x1214 old text chars 65x32 new text chars 65x33
xg_frame_resized old native pixels 1218x1214 new native pixels 1236x1214
adjust_frame_size old native pixels 1218x1214 new native pixels 1236x1214 old text pixels 1170x1214 new text pixels 1188x1214 old text chars 65x33 new text chars 66x33
xg_frame_resized old native pixels 1236x1214 new native pixels 1236x1250
adjust_frame_size old native pixels 1236x1214 new native pixels 1236x1250 old text pixels 1188x1214 new text pixels 1188x1250 old text chars 66x33 new text chars 66x34
xg_frame_resized old native pixels 1236x1250 new native pixels 1254x1250
adjust_frame_size old native pixels 1236x1250 new native pixels 1254x1250 old text pixels 1188x1250 new text pixels 1206x1250 old text chars 66x34 new text chars 67x34
xg_frame_resized old native pixels 1254x1250 new native pixels 1272x1286
adjust_frame_size old native pixels 1254x1250 new native pixels 1272x1286 old text pixels 1206x1250 new text pixels 1224x1286 old text chars 67x34 new text chars 68x35
xg_frame_resized old native pixels 1272x1286 new native pixels 1290x1286
adjust_frame_size old native pixels 1272x1286 new native pixels 1290x1286 old text pixels 1224x1286 new text pixels 1242x1286 old text chars 68x35 new text chars 69x35
xg_frame_resized old native pixels 1290x1286 new native pixels 1290x1322
adjust_frame_size old native pixels 1290x1286 new native pixels 1290x1322 old text pixels 1242x1286 new text pixels 1242x1322 old text chars 69x35 new text chars 69x36
xg_frame_resized old native pixels 1290x1322 new native pixels 1308x1322
adjust_frame_size old native pixels 1290x1322 new native pixels 1308x1322 old text pixels 1242x1322 new text pixels 1260x1322 old text chars 69x36 new text chars 70x36
xg_frame_resized old native pixels 1308x1322 new native pixels 1326x1322
adjust_frame_size old native pixels 1308x1322 new native pixels 1326x1322 old text pixels 1260x1322 new text pixels 1278x1322 old text chars 70x36 new text chars 71x36
xg_frame_resized old native pixels 1326x1322 new native pixels 1326x1358
adjust_frame_size old native pixels 1326x1322 new native pixels 1326x1358 old text pixels 1278x1322 new text pixels 1278x1358 old text chars 71x36 new text chars 71x37
xg_frame_resized old native pixels 1326x1358 new native pixels 1326x1394
adjust_frame_size old native pixels 1326x1358 new native pixels 1326x1394 old text pixels 1278x1358 new text pixels 1278x1394 old text chars 71x37 new text chars 71x38
xg_frame_resized old native pixels 1326x1394 new native pixels 1344x1394
adjust_frame_size old native pixels 1326x1394 new native pixels 1344x1394 old text pixels 1278x1394 new text pixels 1296x1394 old text chars 71x38 new text chars 72x38
xg_frame_resized old native pixels 1344x1394 new native pixels 1362x1430
adjust_frame_size old native pixels 1344x1394 new native pixels 1362x1430 old text pixels 1296x1394 new text pixels 1314x1430 old text chars 72x38 new text chars 73x39
xg_frame_resized old native pixels 1362x1430 new native pixels 1380x1430
adjust_frame_size old native pixels 1362x1430 new native pixels 1380x1430 old text pixels 1314x1430 new text pixels 1332x1430 old text chars 73x39 new text chars 74x39
xg_frame_resized old native pixels 1380x1430 new native pixels 1380x1466
adjust_frame_size old native pixels 1380x1430 new native pixels 1380x1466 old text pixels 1332x1430 new text pixels 1332x1466 old text chars 74x39 new text chars 74x40
xg_frame_resized old native pixels 1380x1466 new native pixels 1398x1466
adjust_frame_size old native pixels 1380x1466 new native pixels 1398x1466 old text pixels 1332x1466 new text pixels 1350x1466 old text chars 74x40 new text chars 75x40
xg_frame_resized old native pixels 1398x1466 new native pixels 1398x1502
adjust_frame_size old native pixels 1398x1466 new native pixels 1398x1502 old text pixels 1350x1466 new text pixels 1350x1502 old text chars 75x40 new text chars 75x41
xg_frame_resized old native pixels 1398x1502 new native pixels 1416x1502
adjust_frame_size old native pixels 1398x1502 new native pixels 1416x1502 old text pixels 1350x1502 new text pixels 1368x1502 old text chars 75x41 new text chars 76x41
xg_frame_resized old native pixels 1416x1502 new native pixels 1416x1538
adjust_frame_size old native pixels 1416x1502 new native pixels 1416x1538 old text pixels 1368x1502 new text pixels 1368x1538 old text chars 76x41 new text chars 76x42
xg_frame_resized old native pixels 1416x1538 new native pixels 1416x1502
adjust_frame_size old native pixels 1416x1538 new native pixels 1416x1502 old text pixels 1368x1538 new text pixels 1368x1502 old text chars 76x42 new text chars 76x41
xg_frame_resized old native pixels 1416x1502 new native pixels 1398x1502
adjust_frame_size old native pixels 1416x1502 new native pixels 1398x1502 old text pixels 1368x1502 new text pixels 1350x1502 old text chars 76x41 new text chars 75x41
xg_frame_resized old native pixels 1398x1502 new native pixels 1398x1466
adjust_frame_size old native pixels 1398x1502 new native pixels 1398x1466 old text pixels 1350x1502 new text pixels 1350x1466 old text chars 75x41 new text chars 75x40
xg_frame_resized old native pixels 1398x1466 new native pixels 1380x1430
adjust_frame_size old native pixels 1398x1466 new native pixels 1380x1430 old text pixels 1350x1466 new text pixels 1332x1430 old text chars 75x40 new text chars 74x39
xg_frame_resized old native pixels 1380x1430 new native pixels 1380x1394
adjust_frame_size old native pixels 1380x1430 new native pixels 1380x1394 old text pixels 1332x1430 new text pixels 1332x1394 old text chars 74x39 new text chars 74x38
xg_frame_resized old native pixels 1380x1394 new native pixels 1362x1394
adjust_frame_size old native pixels 1380x1394 new native pixels 1362x1394 old text pixels 1332x1394 new text pixels 1314x1394 old text chars 74x38 new text chars 73x38
xg_frame_resized old native pixels 1362x1394 new native pixels 1362x1358
adjust_frame_size old native pixels 1362x1394 new native pixels 1362x1358 old text pixels 1314x1394 new text pixels 1314x1358 old text chars 73x38 new text chars 73x37
xg_frame_resized old native pixels 1362x1358 new native pixels 1362x1322
adjust_frame_size old native pixels 1362x1358 new native pixels 1362x1322 old text pixels 1314x1358 new text pixels 1314x1322 old text chars 73x37 new text chars 73x36
xg_frame_resized old native pixels 1362x1322 new native pixels 1362x1286
adjust_frame_size old native pixels 1362x1322 new native pixels 1362x1286 old text pixels 1314x1322 new text pixels 1314x1286 old text chars 73x36 new text chars 73x35
xg_frame_resized old native pixels 1362x1286 new native pixels 1344x1286
adjust_frame_size old native pixels 1362x1286 new native pixels 1344x1286 old text pixels 1314x1286 new text pixels 1296x1286 old text chars 73x35 new text chars 72x35
xg_frame_resized old native pixels 1344x1286 new native pixels 1344x1250
adjust_frame_size old native pixels 1344x1286 new native pixels 1344x1250 old text pixels 1296x1286 new text pixels 1296x1250 old text chars 72x35 new text chars 72x34
xg_frame_resized old native pixels 1344x1250 new native pixels 1344x1214
adjust_frame_size old native pixels 1344x1250 new native pixels 1344x1214 old text pixels 1296x1250 new text pixels 1296x1214 old text chars 72x34 new text chars 72x33
xg_frame_resized old native pixels 1344x1214 new native pixels 1344x1178
adjust_frame_size old native pixels 1344x1214 new native pixels 1344x1178 old text pixels 1296x1214 new text pixels 1296x1178 old text chars 72x33 new text chars 72x32
xg_frame_resized old native pixels 1344x1178 new native pixels 1362x1178
adjust_frame_size old native pixels 1344x1178 new native pixels 1362x1178 old text pixels 1296x1178 new text pixels 1314x1178 old text chars 72x32 new text chars 73x32
xg_frame_resized old native pixels 1362x1178 new native pixels 1362x1142
adjust_frame_size old native pixels 1362x1178 new native pixels 1362x1142 old text pixels 1314x1178 new text pixels 1314x1142 old text chars 73x32 new text chars 73x31
xg_frame_resized old native pixels 1362x1142 new native pixels 1362x1106
adjust_frame_size old native pixels 1362x1142 new native pixels 1362x1106 old text pixels 1314x1142 new text pixels 1314x1106 old text chars 73x31 new text chars 73x30
xg_frame_resized old native pixels 1362x1106 new native pixels 1380x1106
adjust_frame_size old native pixels 1362x1106 new native pixels 1380x1106 old text pixels 1314x1106 new text pixels 1332x1106 old text chars 73x30 new text chars 74x30
xg_frame_resized old native pixels 1380x1106 new native pixels 1380x1070
adjust_frame_size old native pixels 1380x1106 new native pixels 1380x1070 old text pixels 1332x1106 new text pixels 1332x1070 old text chars 74x30 new text chars 74x29
xg_frame_resized old native pixels 1380x1070 new native pixels 1380x1106
adjust_frame_size old native pixels 1380x1070 new native pixels 1380x1106 old text pixels 1332x1070 new text pixels 1332x1106 old text chars 74x29 new text chars 74x30
xg_frame_resized old native pixels 1380x1106 new native pixels 1362x1106
adjust_frame_size old native pixels 1380x1106 new native pixels 1362x1106 old text pixels 1332x1106 new text pixels 1314x1106 old text chars 74x30 new text chars 73x30
xg_frame_resized old native pixels 1362x1106 new native pixels 1362x1142
adjust_frame_size old native pixels 1362x1106 new native pixels 1362x1142 old text pixels 1314x1106 new text pixels 1314x1142 old text chars 73x30 new text chars 73x31
xg_frame_resized old native pixels 1362x1142 new native pixels 1362x1106
adjust_frame_size old native pixels 1362x1142 new native pixels 1362x1106 old text pixels 1314x1142 new text pixels 1314x1106 old text chars 73x31 new text chars 73x30
xg_frame_resized old native pixels 1362x1106 new native pixels 1380x1106
adjust_frame_size old native pixels 1362x1106 new native pixels 1380x1106 old text pixels 1314x1106 new text pixels 1332x1106 old text chars 73x30 new text chars 74x30
xg_frame_resized old native pixels 1380x1106 new native pixels 1380x1070
adjust_frame_size old native pixels 1380x1106 new native pixels 1380x1070 old text pixels 1332x1106 new text pixels 1332x1070 old text chars 74x30 new text chars 74x29
xg_frame_resized old native pixels 1380x1070 new native pixels 1380x1034
adjust_frame_size old native pixels 1380x1070 new native pixels 1380x1034 old text pixels 1332x1070 new text pixels 1332x1034 old text chars 74x29 new text chars 74x28
xg_frame_resized old native pixels 1380x1034 new native pixels 1398x1034
adjust_frame_size old native pixels 1380x1034 new native pixels 1398x1034 old text pixels 1332x1034 new text pixels 1350x1034 old text chars 74x28 new text chars 75x28
xg_frame_resized old native pixels 1398x1034 new native pixels 1416x1034
adjust_frame_size old native pixels 1398x1034 new native pixels 1416x1034 old text pixels 1350x1034 new text pixels 1368x1034 old text chars 75x28 new text chars 76x28
xg_frame_resized old native pixels 1416x1034 new native pixels 1434x1034
adjust_frame_size old native pixels 1416x1034 new native pixels 1434x1034 old text pixels 1368x1034 new text pixels 1386x1034 old text chars 76x28 new text chars 77x28
xg_frame_resized old native pixels 1434x1034 new native pixels 1452x1034
adjust_frame_size old native pixels 1434x1034 new native pixels 1452x1034 old text pixels 1386x1034 new text pixels 1404x1034 old text chars 77x28 new text chars 78x28
xg_frame_resized old native pixels 1452x1034 new native pixels 1470x1034
adjust_frame_size old native pixels 1452x1034 new native pixels 1470x1034 old text pixels 1404x1034 new text pixels 1422x1034 old text chars 78x28 new text chars 79x28
xg_frame_resized old native pixels 1470x1034 new native pixels 1488x1034
adjust_frame_size old native pixels 1470x1034 new native pixels 1488x1034 old text pixels 1422x1034 new text pixels 1440x1034 old text chars 79x28 new text chars 80x28
xg_frame_resized old native pixels 1488x1034 new native pixels 1506x1034
adjust_frame_size old native pixels 1488x1034 new native pixels 1506x1034 old text pixels 1440x1034 new text pixels 1458x1034 old text chars 80x28 new text chars 81x28
x_new_font old char size 18x36 new char size 21x45 text chars 81x28 old text pixels 1458x1034 new text pixels 1701x1260
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 850 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 630 base height 102 height inc 22
xg_frame_set_char_size old native pixels 1506x1034 new native pixels 1749x1260 outer pixels 874x696 outer rest 0x0
xg_frame_resized old native pixels 1506x1034 new native pixels 1748x1260
adjust_frame_size old native pixels 1506x1034 new native pixels 1748x1260 old text pixels 1458x1034 new text pixels 1700x1260 old text chars 81x28 new text chars 80x28
x_new_font old char size 21x45 new char size 17x37 text chars 80x28 old text pixels 1700x1260 new text pixels 1360x1036
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 518 base height 98 height inc 18
xg_frame_set_char_size old native pixels 1748x1260 new native pixels 1408x1036 outer pixels 704x584 outer rest 0x0
xg_frame_resized old native pixels 1748x1260 new native pixels 1408x1036
adjust_frame_size old native pixels 1748x1260 new native pixels 1408x1036 old text pixels 1700x1260 new text pixels 1360x1036 old text chars 80x28 new text chars 80x28
x_new_font old char size 17x37 new char size 17x37 text chars 80x28 old text pixels 1360x1036 new text pixels 1360x1036
x_new_font old char size 17x37 new char size 17x37 text chars 80x28 old text pixels 1360x1036 new text pixels 1360x1036
xg_frame_resized old native pixels 1408x1036 new native pixels 1392x1036
adjust_frame_size old native pixels 1408x1036 new native pixels 1392x1036 old text pixels 1360x1036 new text pixels 1344x1036 old text chars 80x28 new text chars 79x28
xg_frame_resized old native pixels 1392x1036 new native pixels 1392x1000
adjust_frame_size old native pixels 1392x1036 new native pixels 1392x1000 old text pixels 1344x1036 new text pixels 1344x1000 old text chars 79x28 new text chars 79x27
xg_frame_resized old native pixels 1392x1000 new native pixels 1408x1000
adjust_frame_size old native pixels 1392x1000 new native pixels 1408x1000 old text pixels 1344x1000 new text pixels 1360x1000 old text chars 79x27 new text chars 80x27
xg_frame_resized old native pixels 1408x1000 new native pixels 1408x964
adjust_frame_size old native pixels 1408x1000 new native pixels 1408x964 old text pixels 1360x1000 new text pixels 1360x964 old text chars 80x27 new text chars 80x26
xg_frame_resized old native pixels 1408x964 new native pixels 1408x928
adjust_frame_size old native pixels 1408x964 new native pixels 1408x928 old text pixels 1360x964 new text pixels 1360x928 old text chars 80x26 new text chars 80x25
xg_frame_resized old native pixels 1408x928 new native pixels 1408x892
adjust_frame_size old native pixels 1408x928 new native pixels 1408x892 old text pixels 1360x928 new text pixels 1360x892 old text chars 80x25 new text chars 80x24
xg_frame_resized old native pixels 1408x892 new native pixels 1408x856
adjust_frame_size old native pixels 1408x892 new native pixels 1408x856 old text pixels 1360x892 new text pixels 1360x856 old text chars 80x24 new text chars 80x23
xg_frame_resized old native pixels 1408x856 new native pixels 1408x820
adjust_frame_size old native pixels 1408x856 new native pixels 1408x820 old text pixels 1360x856 new text pixels 1360x820 old text chars 80x23 new text chars 80x22
xg_frame_resized old native pixels 1408x820 new native pixels 1424x820
adjust_frame_size old native pixels 1408x820 new native pixels 1424x820 old text pixels 1360x820 new text pixels 1376x820 old text chars 80x22 new text chars 80x22
xg_frame_resized old native pixels 1424x820 new native pixels 1424x784
adjust_frame_size old native pixels 1424x820 new native pixels 1424x784 old text pixels 1376x820 new text pixels 1376x784 old text chars 80x22 new text chars 80x21
xg_frame_resized old native pixels 1424x784 new native pixels 1424x748
adjust_frame_size old native pixels 1424x784 new native pixels 1424x748 old text pixels 1376x784 new text pixels 1376x748 old text chars 80x21 new text chars 80x20
xg_frame_resized old native pixels 1424x748 new native pixels 1424x784
adjust_frame_size old native pixels 1424x748 new native pixels 1424x784 old text pixels 1376x748 new text pixels 1376x784 old text chars 80x20 new text chars 80x21
xg_frame_resized old native pixels 1424x784 new native pixels 1440x784
adjust_frame_size old native pixels 1424x784 new native pixels 1440x784 old text pixels 1376x784 new text pixels 1392x784 old text chars 80x21 new text chars 81x21
xg_frame_resized old native pixels 1440x784 new native pixels 1424x784
adjust_frame_size old native pixels 1440x784 new native pixels 1424x784 old text pixels 1392x784 new text pixels 1376x784 old text chars 81x21 new text chars 80x21
xg_frame_resized old native pixels 1424x784 new native pixels 1424x748
adjust_frame_size old native pixels 1424x784 new native pixels 1424x748 old text pixels 1376x784 new text pixels 1376x748 old text chars 80x21 new text chars 80x20
xg_frame_resized old native pixels 1424x748 new native pixels 1408x748
adjust_frame_size old native pixels 1424x748 new native pixels 1408x748 old text pixels 1376x748 new text pixels 1360x748 old text chars 80x20 new text chars 80x20
xg_frame_resized old native pixels 1408x748 new native pixels 1392x748
adjust_frame_size old native pixels 1408x748 new native pixels 1392x748 old text pixels 1360x748 new text pixels 1344x748 old text chars 80x20 new text chars 79x20
xg_frame_resized old native pixels 1392x748 new native pixels 1376x748
adjust_frame_size old native pixels 1392x748 new native pixels 1376x748 old text pixels 1344x748 new text pixels 1328x748 old text chars 79x20 new text chars 78x20
xg_frame_resized old native pixels 1376x748 new native pixels 1360x748
adjust_frame_size old native pixels 1376x748 new native pixels 1360x748 old text pixels 1328x748 new text pixels 1312x748 old text chars 78x20 new text chars 77x20
xg_frame_resized old native pixels 1360x748 new native pixels 1360x784
adjust_frame_size old native pixels 1360x748 new native pixels 1360x784 old text pixels 1312x748 new text pixels 1312x784 old text chars 77x20 new text chars 77x21
xg_frame_resized old native pixels 1360x784 new native pixels 1344x784
adjust_frame_size old native pixels 1360x784 new native pixels 1344x784 old text pixels 1312x784 new text pixels 1296x784 old text chars 77x21 new text chars 76x21
x_new_font old char size 17x37 new char size 17x37 text chars 76x21 old text pixels 1296x784 new text pixels 1292x777
x_new_font old char size 17x37 new char size 17x37 text chars 76x21 old text pixels 1296x784 new text pixels 1292x777
x_new_font old char size 17x37 new char size 17x37 text chars 76x21 old text pixels 1296x784 new text pixels 1292x777
x_new_font old char size 17x37 new char size 17x37 text chars 76x21 old text pixels 1296x784 new text pixels 1292x777
xg_frame_resized old native pixels 1344x784 new native pixels 1328x784
adjust_frame_size old native pixels 1344x784 new native pixels 1328x784 old text pixels 1296x784 new text pixels 1280x784 old text chars 76x21 new text chars 75x21
xg_frame_resized old native pixels 1328x784 new native pixels 1328x820
adjust_frame_size old native pixels 1328x784 new native pixels 1328x820 old text pixels 1280x784 new text pixels 1280x820 old text chars 75x21 new text chars 75x22
xg_frame_resized old native pixels 1328x820 new native pixels 1328x856
adjust_frame_size old native pixels 1328x820 new native pixels 1328x856 old text pixels 1280x820 new text pixels 1280x856 old text chars 75x22 new text chars 75x23
xg_frame_resized old native pixels 1328x856 new native pixels 1328x892
adjust_frame_size old native pixels 1328x856 new native pixels 1328x892 old text pixels 1280x856 new text pixels 1280x892 old text chars 75x23 new text chars 75x24
xg_frame_resized old native pixels 1328x892 new native pixels 1344x892
adjust_frame_size old native pixels 1328x892 new native pixels 1344x892 old text pixels 1280x892 new text pixels 1296x892 old text chars 75x24 new text chars 76x24
xg_frame_resized old native pixels 1344x892 new native pixels 1344x928
adjust_frame_size old native pixels 1344x892 new native pixels 1344x928 old text pixels 1296x892 new text pixels 1296x928 old text chars 76x24 new text chars 76x25
xg_frame_resized old native pixels 1344x928 new native pixels 1344x964
adjust_frame_size old native pixels 1344x928 new native pixels 1344x964 old text pixels 1296x928 new text pixels 1296x964 old text chars 76x25 new text chars 76x26
xg_frame_resized old native pixels 1344x964 new native pixels 1344x1000
adjust_frame_size old native pixels 1344x964 new native pixels 1344x1000 old text pixels 1296x964 new text pixels 1296x1000 old text chars 76x26 new text chars 76x27
xg_frame_resized old native pixels 1344x1000 new native pixels 1344x1036
adjust_frame_size old native pixels 1344x1000 new native pixels 1344x1036 old text pixels 1296x1000 new text pixels 1296x1036 old text chars 76x27 new text chars 76x28
xg_frame_resized old native pixels 1344x1036 new native pixels 1344x1072
adjust_frame_size old native pixels 1344x1036 new native pixels 1344x1072 old text pixels 1296x1036 new text pixels 1296x1072 old text chars 76x28 new text chars 76x28
xg_frame_resized old native pixels 1344x1072 new native pixels 1344x1108
adjust_frame_size old native pixels 1344x1072 new native pixels 1344x1108 old text pixels 1296x1072 new text pixels 1296x1108 old text chars 76x28 new text chars 76x29
xg_frame_resized old native pixels 1344x1108 new native pixels 1344x1144
adjust_frame_size old native pixels 1344x1108 new native pixels 1344x1144 old text pixels 1296x1108 new text pixels 1296x1144 old text chars 76x29 new text chars 76x30
xg_frame_resized old native pixels 1344x1144 new native pixels 1344x1180
adjust_frame_size old native pixels 1344x1144 new native pixels 1344x1180 old text pixels 1296x1144 new text pixels 1296x1180 old text chars 76x30 new text chars 76x31
xg_frame_resized old native pixels 1344x1180 new native pixels 1344x1216
adjust_frame_size old native pixels 1344x1180 new native pixels 1344x1216 old text pixels 1296x1180 new text pixels 1296x1216 old text chars 76x31 new text chars 76x32
x_new_font old char size 17x37 new char size 17x37 text chars 76x32 old text pixels 1296x1216 new text pixels 1292x1184
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 646 base width 38 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 592 base height 100 height inc 18
xg_frame_set_char_size old native pixels 1344x1216 new native pixels 1340x1184 outer pixels 670x658 outer rest 0x0
xg_frame_resized old native pixels 1344x1216 new native pixels 1340x1184
adjust_frame_size old native pixels 1344x1216 new native pixels 1340x1184 old text pixels 1296x1216 new text pixels 1292x1184 old text chars 76x32 new text chars 76x32
x_new_font old char size 17x37 new char size 17x37 text chars 76x32 old text pixels 1292x1184 new text pixels 1292x1184
x_new_font old char size 17x37 new char size 17x37 text chars 76x32 old text pixels 1292x1184 new text pixels 1292x1184
x_new_font old char size 17x37 new char size 17x37 text chars 76x32 old text pixels 1292x1184 new text pixels 1292x1184
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-22 1:56 ` Dmitry Gutov
@ 2023-01-22 9:54 ` martin rudalics
2023-01-22 22:25 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-22 9:54 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]
>> For reference let's try to stick to the last x_scale_font.diff patch I
>> sent you. What was the "impair" size there?
>
> According to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52493#332, some impair sizes were 80x36 minus 1 in any dimension using the mouse.
You mean the ones where you resized a frame with the mouse by 16 or 36
pixels with a character size of 17x37?
> So, with x_rest.diff, the attached transcript is of:
>
> 1. Resizing the frame to 80x36 (according to GNOME).
> 2. Evaluating the set-face-attribute form twice.
> 3. Resizing the frame to 80x20 (per GNOME), which is 76x20 according to our internal measurements.
Do you mean that 80x36 according to GNOME is 80x36 according to our
internal measurements while 80x20 to GNOME is 76x20 according to our
internal measurements?
> 4. Evaluating the set-face-attribute form twice again.
> 5. Resizing to 80x32.
> 6. Evaluating s-f-a twice again.
>
> In this scenario, step 4 doesn't change the frame size. But if I skip
> step 1, step 4 (evaluating s-f-a after resizing to 80x20) does change
> the frame size. And step 6 (s-f-a at size 80x32) does not.
>
> So it seems the history of size changes now (?) affects which sizes are "impair".
Didn't we always have that? The present code simply tries to reduce
some noise when setting the font would otherwise cause a resize of a few
pixels.
> Also, only height is important now: if height 20 is "impair", then I
> can resize the frame to any width with this height, and evaling s-f-a
> will shrink the frame in both dimensions by one char. Same for height
> 34 in the alternative scenario.
Please try the next patch so at least the initial size becomes
reasonable again.
martin
[-- Attachment #2: x_rest.diff --]
[-- Type: text/x-patch, Size: 32691 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..b607ba964f 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,10 +1206,26 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ if (scale != 1 && !frame_resize_pixelwise
+ /* Don't bother the WM when the number of text columns or text
+ lines wouldn't change and only the pixel sizes would. But make
+ sure first that these sizes are "out of synch" due to a
+ preceding "imprecise by scaling" operation like a mouse drag.
+ Otherwise, we might end up with a frame that doesn't get a
+ suitable initial size. */
+ && (FRAME_PIXEL_TO_TEXT_WIDTH (f, width) / FRAME_COLS (f)
+ == FRAME_TEXT_WIDTH (f) / FRAME_COLS (f))
+ && FRAME_TEXT_WIDTH (f) != FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)
+ && (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height) / FRAME_LINES (f)
+ == FRAME_TEXT_HEIGHT (f) / FRAME_LINES (f))
+ && FRAME_TEXT_HEIGHT (f) != FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))
+ return;
+
+ outer_height /= scale;
+ outer_width /= scale;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
/* Resize the top level widget so rows and columns remain constant.
@@ -1317,6 +1343,33 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0
+ && size_hints.width_inc > 0 && outer_height > 0
+ && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width)
+ % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height)
+ % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -1360,21 +1413,6 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
}
}
-/* Handle height/width changes (i.e. add/remove/move menu/toolbar).
- The policy is to keep the number of editable lines. */
-
-#if 0
-static void
-xg_height_or_width_changed (struct frame *f)
-{
- gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- FRAME_TOTAL_PIXEL_WIDTH (f),
- FRAME_TOTAL_PIXEL_HEIGHT (f));
- f->output_data.xp->hint_flags = 0;
- x_wm_set_size_hint (f, 0, 0);
-}
-#endif
-
#ifndef HAVE_PGTK
/* Convert an X Window WSESC on display DPY to its corresponding GtkWidget.
Must be done like this, because GtkWidget:s can have "hidden"
@@ -1917,7 +1955,8 @@ xg_free_frame_widgets (struct frame *f)
flag (this is useful when FLAGS is 0). */
void
-xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
+xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position,
+ int text_width, int text_height)
{
/* Must use GTK routines here, otherwise GTK resets the size hints
to its own defaults. */
@@ -1964,21 +2003,33 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags = f->output_data.xp->hint_flags;
hint_flags |= GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE;
- size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
- size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ size_hints.width_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_COLUMN_WIDTH (f) / scale);
+ size_hints.height_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_LINE_HEIGHT (f) / scale);
hint_flags |= GDK_HINT_BASE_SIZE;
/* Use one row/col here so base_height/width does not become zero.
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
- + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
+ base_width = ((FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f)) / scale);
+ base_height = ((FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
+ / scale);
- size_hints.base_width = base_width;
- size_hints.base_height = base_height;
- size_hints.min_width = base_width;
- size_hints.min_height = base_height;
+ if (text_width < 0)
+ text_width = FRAME_TEXT_WIDTH (f);
+ text_width /= scale;
+
+ if (text_height < 0)
+ text_height = FRAME_TEXT_HEIGHT (f);
+ text_height /= scale;
+
+ size_hints.base_width = base_width + (text_width % size_hints.width_inc);
+ size_hints.base_height = base_height + (text_height % size_hints.height_inc);
+ size_hints.min_width = size_hints.base_width;
+ size_hints.min_height = size_hints.base_height;
/* These currently have a one to one mapping with the X values, but I
don't think we should rely on that. */
@@ -2018,16 +2069,31 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags |= GDK_HINT_USER_POS;
}
- size_hints.base_width /= scale;
- size_hints.base_height /= scale;
- size_hints.width_inc /= scale;
- size_hints.height_inc /= scale;
-
if (hint_flags != f->output_data.xp->hint_flags
|| memcmp (&size_hints,
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text width"), make_fixnum (text_width),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text height"), make_fixnum (text_height),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 190d662831..21245dde5f 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -153,7 +153,7 @@ #define XG_ITEM_DATA "emacs_menuitem"
extern int xg_get_default_scrollbar_width (struct frame *f);
extern int xg_get_default_scrollbar_height (struct frame *f);
-extern void xg_wm_set_size_hint (struct frame *, long int, bool);
+extern void xg_wm_set_size_hint (struct frame *, long int, bool, int, int);
extern void update_frame_tool_bar (struct frame *f);
extern void free_frame_tool_bar (struct frame *f);
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index a32067af81..a391541e10 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1662,7 +1662,8 @@ #define INSTALL_CURSOR(FIELD, NAME) \
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- xg_wm_set_size_hint (f, window_prompting, false);
+ xg_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 13f6c6c3c4..8b077be178 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -658,7 +658,7 @@ pgtk_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
pgtk_calc_absolute_position (f);
block_input ();
- xg_wm_set_size_hint (f, 0, false);
+ xg_wm_set_size_hint (f, 0, false, -1, -1);
if (change_gravity != 0)
{
@@ -705,7 +705,8 @@ pgtk_set_window_size (struct frame *f, bool change_gravity,
f->output_data.pgtk->preferred_width = pixelwidth;
f->output_data.pgtk->preferred_height = pixelheight;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (pixelwidth),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (pixelheight));
xg_frame_set_char_size (f, pixelwidth, pixelheight);
gtk_widget_queue_resize (FRAME_WIDGET (f));
@@ -993,7 +994,10 @@ pgtk_set_parent_frame (struct frame *f, Lisp_Object new_value,
fixed, TRUE, TRUE, 0);
f->output_data.pgtk->preferred_width = alloc.width;
f->output_data.pgtk->preferred_height = alloc.height;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (alloc.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (alloc.height));
+ /* Why convert here? xg_frame_set_char_size wants native
+ pixels. */
xg_frame_set_char_size (f, FRAME_PIXEL_TO_TEXT_WIDTH (f, alloc.width),
FRAME_PIXEL_TO_TEXT_HEIGHT (f, alloc.height));
gtk_widget_queue_resize (FRAME_WIDGET (f));
diff --git a/src/widget.c b/src/widget.c
index aaab33b6d8..7468bf63fc 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -32,6 +32,7 @@
#include "sysstdio.h"
#include "xterm.h"
#include "frame.h"
+#include "blockinput.h"
#include <X11/StringDefs.h>
#include <X11/IntrinsicP.h>
@@ -154,15 +155,6 @@ emacsFrameClass (void)
return (WidgetClass) &emacsFrameClassRec;
}
-static void
-get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
-{
- struct frame *f = ew->emacs_frame.frame;
-
- *pixel_width = FRAME_COLUMN_WIDTH (f);
- *pixel_height = FRAME_LINE_HEIGHT (f);
-}
-
static void
pixel_to_char_size (EmacsFrame ew, Dimension pixel_width,
Dimension pixel_height, int *char_width, int *char_height)
@@ -207,120 +199,97 @@ get_wm_shell (Widget w)
return (WMShellWidget) wmshell;
}
-#if 0 /* Currently not used. */
-
-static void
-mark_shell_size_user_specified (Widget wmshell)
-{
- if (! XtIsWMShell (wmshell)) emacs_abort ();
- /* This is kind of sleazy, but I can't see how else to tell it to make it
- mark the WM_SIZE_HINTS size as user specified when appropriate. */
- ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;
-}
-
-#endif
-
-
static void
set_frame_size (EmacsFrame ew)
{
- /* The widget hierarchy is
-
- argv[0] emacsShell pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
-
- We accept geometry specs in this order:
-
- *Frame-NAME.geometry
- *EmacsFrame.geometry
- Emacs.geometry
-
- Other possibilities for widget hierarchies might be
-
- argv[0] frame pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane emacsTextPane
- ApplicationShell EmacsFrame Paned EmacsTextPane
-
- With the current setup, the text-display-area is the part which is
- an emacs "frame", since that's the only part managed by emacs proper
- (the menubar and the parent of the menubar and all that sort of thing
- are managed by lwlib.)
-
- The EmacsShell widget is simply a replacement for the Shell widget
- which is able to deal with using an externally-supplied window instead
- of always creating its own. It is not actually emacs specific, and
- should possibly have class "Shell" instead of "EmacsShell" to simplify
- the resources.
-
- */
-
struct frame *f = ew->emacs_frame.frame;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.height = FRAME_PIXEL_HEIGHT (f);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("set_frame_size"));
+ CALLN (Ffuncall, Qfoo_it, build_string ("set_frame_size"),
+ build_string ("native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))));
}
static bool
-update_wm_hints (WMShellWidget wmshell, EmacsFrame ew)
+update_wm_hints (WMShellWidget wmshell, EmacsFrame ew, int width, int height)
{
- int cw;
- int ch;
- Dimension rounded_width;
- Dimension rounded_height;
- int char_width;
- int char_height;
- int base_width;
- int base_height;
- char buffer[sizeof wmshell->wm.size_hints];
- char *hints_ptr;
-
- /* Copy the old size hints to the buffer. */
- memcpy (buffer, &wmshell->wm.size_hints,
- sizeof wmshell->wm.size_hints);
-
- pixel_to_char_size (ew, ew->core.width, ew->core.height,
- &char_width, &char_height);
- char_to_pixel_size (ew, char_width, char_height,
- &rounded_width, &rounded_height);
- get_default_char_pixel_size (ew, &cw, &ch);
-
- base_width = (wmshell->core.width - ew->core.width
- + (rounded_width - (char_width * cw)));
- base_height = (wmshell->core.height - ew->core.height
- + (rounded_height - (char_height * ch)));
+ struct frame *f = ew->emacs_frame.frame;
+ int char_width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
+ int char_height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ int base_width
+ = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + (((width < 0) ? FRAME_TEXT_WIDTH (f) : width) % char_width));
+ int base_height
+ = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + (((height < 0) ? FRAME_TEXT_HEIGHT (f) : height) % char_height));
+ int min_width = base_width;
+ int min_height = base_height;
+ bool value;
+
+ int old_base_width, old_base_height;
+ int old_char_width, old_char_height;
+ int old_min_width, old_min_height;
+
+ block_input ();
+ XtVaGetValues ((Widget) wmshell,
+ XtNbaseWidth, &old_base_width,
+ XtNbaseHeight, &old_base_height,
+ XtNwidthInc, &old_char_width,
+ XtNheightInc, &old_char_height,
+ XtNminWidth, &old_min_width,
+ XtNminHeight, &old_min_height,
+ NULL);
+ unblock_input ();
XtVaSetValues ((Widget) wmshell,
XtNbaseWidth, (XtArgVal) base_width,
XtNbaseHeight, (XtArgVal) base_height,
- XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
- XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
- XtNminWidth, (XtArgVal) base_width,
- XtNminHeight, (XtArgVal) base_height,
+ XtNwidthInc, (XtArgVal) char_width,
+ XtNheightInc, (XtArgVal) char_height,
+ XtNminWidth, (XtArgVal) min_width,
+ XtNminHeight, (XtArgVal) min_height,
NULL);
- /* Return if size hints really changed. If they did not, then Xt
- probably didn't set them either (or take the flags into
- account.) */
- hints_ptr = (char *) &wmshell->wm.size_hints;
+ value = (base_width != old_base_width || base_height != old_base_height
+ || char_width != old_char_width || char_height != old_char_height
+ || min_width != old_min_width || min_height != old_min_height);
- /* Skip flags, which is unsigned long. */
- return memcmp (hints_ptr + sizeof (long), buffer + sizeof (long),
- sizeof wmshell->wm.wm_hints - sizeof (long));
+ if (value)
+ {
+ CALLN (Ffuncall, Qfoo_it, build_string ("update_wm_hints"),
+ build_string ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ build_string ("old char width"), make_fixnum (old_char_width),
+ build_string ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ build_string ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base width"), make_fixnum (base_width),
+ build_string ("old_base width"), make_fixnum (old_base_width),
+ build_string ("min width"), make_fixnum (min_width),
+ build_string ("old min width"), make_fixnum (old_min_width));
+ CALLN (Ffuncall, Qfoo_it, build_string (" "),
+ build_string ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ build_string ("old char height"), make_fixnum (old_char_height),
+ build_string ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ build_string ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base height"), make_fixnum (base_height),
+ build_string ("old base height"), make_fixnum (old_base_height),
+ build_string ("min height"), make_fixnum (min_height),
+ build_string ("old min height"), make_fixnum (old_min_height));
+ }
+
+ return value;
}
bool
-widget_update_wm_size_hints (Widget widget, Widget frame)
+widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height)
{
- return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame);
+ return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame,
+ width, height);
}
static void
@@ -337,7 +306,7 @@ update_from_various_frame_slots (EmacsFrame ew)
struct frame *f = ew->emacs_frame.frame;
struct x_output *x = f->output_data.x;
- ew->core.height = FRAME_PIXEL_HEIGHT (f) - x->menubar_height;
+ ew->core.height = FRAME_PIXEL_HEIGHT (f); // - x->menubar_height;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.background_pixel = FRAME_BACKGROUND_PIXEL (f);
ew->emacs_frame.internal_border_width = f->internal_border_width;
@@ -345,12 +314,11 @@ update_from_various_frame_slots (EmacsFrame ew)
ew->emacs_frame.cursor_color = x->cursor_pixel;
ew->core.border_pixel = x->border_pixel;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("update_from_various_frame_slots"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ CALLN (Ffuncall, Qfoo_it,
+ build_string ("update_from_various_frame_slots"),
+ build_string ("native pixels"),
+ (Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f)))));
}
static void
@@ -384,7 +352,6 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
XSetWindowAttributes *attrs)
{
EmacsFrame ew = (EmacsFrame) widget;
- struct frame *f = ew->emacs_frame.frame;
/* This used to contain SubstructureRedirectMask, but this turns out
to be a problem with XIM on Solaris, and events from that mask
@@ -399,12 +366,8 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
make sure we get them all. Seen with xfcwm4 for example. */
XtAddRawEventHandler (widget, StructureNotifyMask, False, resize_cb, NULL);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("EmacsFrameRealize"));
-
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew, -1, -1);
}
static void
@@ -419,18 +382,23 @@ EmacsFrameResize (Widget widget)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameResize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ if (FRAME_PIXEL_WIDTH (f) != ew->core.width
+ || FRAME_PIXEL_HEIGHT (f) != ew->core.height)
+ CALLN (Ffuncall, Qfoo_it, build_string ("EmacsFrameResize"),
+ build_string ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ build_string ("new native pixels"),
+ Fcons (make_fixnum (ew->core.width),
+ make_fixnum (ew->core.height)));
change_frame_size (f, ew->core.width, ew->core.height,
false, true, false);
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew,
+ FRAME_PIXEL_TO_TEXT_WIDTH (f, ew->core.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, ew->core.height));
update_various_frame_slots (ew);
cancel_mouse_face (f);
@@ -472,13 +440,6 @@ EmacsFrameSetCharSize (Widget widget, int columns, int rows)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameSetCharSize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- columns, rows,
- f->new_width, f->new_height);
-
if (!frame_inhibit_resize (f, 0, Qfont)
&& !frame_inhibit_resize (f, 1, Qfont))
x_set_window_size (f, 0, columns * FRAME_COLUMN_WIDTH (f),
diff --git a/src/widget.h b/src/widget.h
index cf83cb1078..03bc809c41 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -97,6 +97,6 @@ #define XtCInitialGeometry "InitialGeometry"
/* Special entry points */
void EmacsFrameSetCharSize (Widget, int, int);
void widget_store_internal_border (Widget widget);
-bool widget_update_wm_size_hints (Widget widget, Widget frame);
+bool widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height);
#endif /* _EmacsFrame_h */
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xfns.c b/src/xfns.c
index 36b51a3011..25e1af279d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4575,7 +4575,7 @@ DEFUN ("x-wm-set-size-hint", Fx_wm_set_size_hint, Sx_wm_set_size_hint,
struct frame *f = decode_window_system_frame (frame);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
unblock_input ();
return Qnil;
}
@@ -5097,7 +5097,8 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- x_wm_set_size_hint (f, window_prompting, false);
+ x_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b1d65ce59d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
@@ -26589,7 +26609,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
x_calc_absolute_position (f);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
#ifdef USE_GTK
if (x_gtk_use_window_move)
@@ -27279,7 +27299,7 @@ x_check_fullscreen (struct frame *f)
emacs_abort ();
}
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height);
@@ -27453,7 +27473,8 @@ x_set_window_size_1 (struct frame *f, bool change_gravity,
{
if (change_gravity)
f->win_gravity = NorthWestGravity;
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height + FRAME_MENUBAR_HEIGHT (f));
@@ -28243,7 +28264,7 @@ x_make_frame_invisible (struct frame *f)
program-specified, so that when the window is mapped again, it will be
placed at the same location, without forcing the user to position it
by hand again (they have already done that once for this window.) */
- x_wm_set_size_hint (f, 0, true);
+ x_wm_set_size_hint (f, 0, true, -1, -1);
#ifdef USE_GTK
if (FRAME_GTK_OUTER_WIDGET (f))
@@ -28896,7 +28917,8 @@ x_embed_frame (struct x_display_info *dpyinfo, struct frame *f)
The GTK version is in gtkutils.c. */
void
-x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
+x_wm_set_size_hint (struct frame *f, long flags, bool user_position,
+ int width, int height)
{
#ifndef USE_GTK
XSizeHints size_hints;
@@ -28935,10 +28957,12 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
#ifndef USE_MOTIF
hints_changed
= widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
#else
widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
/* Do this all over again for the benefit of Motif, which always
knows better than the programmer. */
@@ -29012,8 +29036,16 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
{
int base_width, base_height;
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
+ if (width == -1)
+ width = FRAME_TEXT_WIDTH (f);
+
+ if (height == -1)
+ height = FRAME_TEXT_HEIGHT (f);
+
+ base_width = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0)
+ + width % FRAME_COLUMN_WIDTH (f));
+ base_height = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0)
+ + height % FRAME_LINE_HEIGHT (f));
/* The window manager uses the base width hints to calculate the
current number of rows and columns in the frame while
@@ -29075,7 +29107,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
#else
- xg_wm_set_size_hint (f, flags, user_position);
+ xg_wm_set_size_hint (f, flags, user_position, width, height);
#endif /* USE_GTK */
}
diff --git a/src/xterm.h b/src/xterm.h
index ee429e9c68..61512f1117 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1653,7 +1653,7 @@ #define SELECTION_EVENT_TIME(eventp) \
extern void x_make_frame_invisible (struct frame *);
extern void x_iconify_frame (struct frame *);
extern void x_free_frame_resources (struct frame *);
-extern void x_wm_set_size_hint (struct frame *, long, bool);
+extern void x_wm_set_size_hint (struct frame *, long, bool, int, int);
#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \
&& defined HAVE_CLOCK_GETTIME
extern void x_sync_init_fences (struct frame *);
^ permalink raw reply related [flat|nested] 169+ messages in thread
* 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
2023-01-22 9:54 ` martin rudalics
@ 2023-01-22 22:25 ` Dmitry Gutov
2023-01-24 10:50 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-22 22:25 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]
On 22/01/2023 11:54, martin rudalics wrote:
> >> For reference let's try to stick to the last x_scale_font.diff patch I
> >> sent you. What was the "impair" size there?
> >
> > According to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52493#332,
> some impair sizes were 80x36 minus 1 in any dimension using the mouse.
>
> You mean the ones where you resized a frame with the mouse by 16 or 36
> pixels with a character size of 17x37?
I guess so.
> > So, with x_rest.diff, the attached transcript is of:
> >
> > 1. Resizing the frame to 80x36 (according to GNOME).
> > 2. Evaluating the set-face-attribute form twice.
> > 3. Resizing the frame to 80x20 (per GNOME), which is 76x20 according
> to our internal measurements.
>
> Do you mean that 80x36 according to GNOME is 80x36 according to our
> internal measurements> while 80x20 to GNOME is 76x20 according to our
> internal measurements?
Not at all, I just got a little tired looking up our internal
measurements every time. GNOME's measurements, OTOH, are listed under
the mouse while I'm resizing the window.
I wasn't sure you really needed the internal ones here, so at some steps
I only mentioned GNOME's ones.
> > 4. Evaluating the set-face-attribute form twice again.
> > 5. Resizing to 80x32.
> > 6. Evaluating s-f-a twice again.
> >
> > In this scenario, step 4 doesn't change the frame size. But if I skip
> > step 1, step 4 (evaluating s-f-a after resizing to 80x20) does change
> > the frame size. And step 6 (s-f-a at size 80x32) does not.
> >
> > So it seems the history of size changes now (?) affects which sizes
> are "impair".
>
> Didn't we always have that?
Not to my recollection. If the current pixel dimensions of the frame are
FONT_HEIGHT*LINES-1, wouldn't that be a stable condition?
I could be wrong, though.
> The present code simply tries to reduce
> some noise when setting the font would otherwise cause a resize of a few
> pixels.
Cool.
> > Also, only height is important now: if height 20 is "impair", then I
> > can resize the frame to any width with this height, and evaling s-f-a
> > will shrink the frame in both dimensions by one char. Same for height
> > 34 in the alternative scenario.
>
> Please try the next patch so at least the initial size becomes
> reasonable again.
It does, thank you.
Here's a new scenario (very much similar to the old one):
1. Evaluate s-f-a twice.
2. Resize to 80x18 (internally it's 76x18).
3. Evaluate s-f-a twice.
The transcript attached, in case it's useful. But I guess, as per the
previous discussion, this is the point where we could stop, with no
further improvement feasible.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 9502 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text height 648 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1728x1620 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
xg_frame_resized old native pixels 1408x1332 new native pixels 1408x1296
adjust_frame_size old native pixels 1408x1332 new native pixels 1408x1296 old text pixels 1360x1332 new text pixels 1360x1296 old text chars 80x36 new text chars 80x35
xg_frame_resized old native pixels 1408x1296 new native pixels 1392x1296
adjust_frame_size old native pixels 1408x1296 new native pixels 1392x1296 old text pixels 1360x1296 new text pixels 1344x1296 old text chars 80x35 new text chars 79x35
xg_frame_resized old native pixels 1392x1296 new native pixels 1392x1260
adjust_frame_size old native pixels 1392x1296 new native pixels 1392x1260 old text pixels 1344x1296 new text pixels 1344x1260 old text chars 79x35 new text chars 79x34
xg_frame_resized old native pixels 1392x1260 new native pixels 1392x1224
adjust_frame_size old native pixels 1392x1260 new native pixels 1392x1224 old text pixels 1344x1260 new text pixels 1344x1224 old text chars 79x34 new text chars 79x33
xg_frame_resized old native pixels 1392x1224 new native pixels 1392x1188
adjust_frame_size old native pixels 1392x1224 new native pixels 1392x1188 old text pixels 1344x1224 new text pixels 1344x1188 old text chars 79x33 new text chars 79x32
xg_frame_resized old native pixels 1392x1188 new native pixels 1392x1152
adjust_frame_size old native pixels 1392x1188 new native pixels 1392x1152 old text pixels 1344x1188 new text pixels 1344x1152 old text chars 79x32 new text chars 79x31
xg_frame_resized old native pixels 1392x1152 new native pixels 1392x1080
adjust_frame_size old native pixels 1392x1152 new native pixels 1392x1080 old text pixels 1344x1152 new text pixels 1344x1080 old text chars 79x31 new text chars 79x29
xg_frame_resized old native pixels 1392x1080 new native pixels 1392x1008
adjust_frame_size old native pixels 1392x1080 new native pixels 1392x1008 old text pixels 1344x1080 new text pixels 1344x1008 old text chars 79x29 new text chars 79x27
xg_frame_resized old native pixels 1392x1008 new native pixels 1392x972
adjust_frame_size old native pixels 1392x1008 new native pixels 1392x972 old text pixels 1344x1008 new text pixels 1344x972 old text chars 79x27 new text chars 79x26
xg_frame_resized old native pixels 1392x972 new native pixels 1392x936
adjust_frame_size old native pixels 1392x972 new native pixels 1392x936 old text pixels 1344x972 new text pixels 1344x936 old text chars 79x26 new text chars 79x25
xg_frame_resized old native pixels 1392x936 new native pixels 1392x900
adjust_frame_size old native pixels 1392x936 new native pixels 1392x900 old text pixels 1344x936 new text pixels 1344x900 old text chars 79x25 new text chars 79x24
xg_frame_resized old native pixels 1392x900 new native pixels 1376x900
adjust_frame_size old native pixels 1392x900 new native pixels 1376x900 old text pixels 1344x900 new text pixels 1328x900 old text chars 79x24 new text chars 78x24
xg_frame_resized old native pixels 1376x900 new native pixels 1376x864
adjust_frame_size old native pixels 1376x900 new native pixels 1376x864 old text pixels 1328x900 new text pixels 1328x864 old text chars 78x24 new text chars 78x23
xg_frame_resized old native pixels 1376x864 new native pixels 1376x828
adjust_frame_size old native pixels 1376x864 new native pixels 1376x828 old text pixels 1328x864 new text pixels 1328x828 old text chars 78x23 new text chars 78x22
xg_frame_resized old native pixels 1376x828 new native pixels 1376x792
adjust_frame_size old native pixels 1376x828 new native pixels 1376x792 old text pixels 1328x828 new text pixels 1328x792 old text chars 78x22 new text chars 78x21
xg_frame_resized old native pixels 1376x792 new native pixels 1392x792
adjust_frame_size old native pixels 1376x792 new native pixels 1392x792 old text pixels 1328x792 new text pixels 1344x792 old text chars 78x21 new text chars 79x21
xg_frame_resized old native pixels 1392x792 new native pixels 1376x792
adjust_frame_size old native pixels 1392x792 new native pixels 1376x792 old text pixels 1344x792 new text pixels 1328x792 old text chars 79x21 new text chars 78x21
xg_frame_resized old native pixels 1376x792 new native pixels 1360x792
adjust_frame_size old native pixels 1376x792 new native pixels 1360x792 old text pixels 1328x792 new text pixels 1312x792 old text chars 78x21 new text chars 77x21
xg_frame_resized old native pixels 1360x792 new native pixels 1344x792
adjust_frame_size old native pixels 1360x792 new native pixels 1344x792 old text pixels 1312x792 new text pixels 1296x792 old text chars 77x21 new text chars 76x21
xg_frame_resized old native pixels 1344x792 new native pixels 1344x756
adjust_frame_size old native pixels 1344x792 new native pixels 1344x756 old text pixels 1296x792 new text pixels 1296x756 old text chars 76x21 new text chars 76x20
xg_frame_resized old native pixels 1344x756 new native pixels 1344x720
adjust_frame_size old native pixels 1344x756 new native pixels 1344x720 old text pixels 1296x756 new text pixels 1296x720 old text chars 76x20 new text chars 76x19
xg_frame_resized old native pixels 1344x720 new native pixels 1344x684
adjust_frame_size old native pixels 1344x720 new native pixels 1344x684 old text pixels 1296x720 new text pixels 1296x684 old text chars 76x19 new text chars 76x18
x_new_font old char size 17x37 new char size 17x37 text chars 76x18 old text pixels 1296x684 new text pixels 1292x666
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 646 base width 38 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 333 base height 93 height inc 18
xg_frame_set_char_size old native pixels 1344x684 new native pixels 1340x666 outer pixels 670x399 outer rest 0x0
xg_frame_resized old native pixels 1344x684 new native pixels 1340x666
adjust_frame_size old native pixels 1344x684 new native pixels 1340x666 old text pixels 1296x684 new text pixels 1292x666 old text chars 76x18 new text chars 76x18
x_new_font old char size 17x37 new char size 17x37 text chars 76x18 old text pixels 1292x666 new text pixels 1292x666
x_new_font old char size 17x37 new char size 17x37 text chars 76x18 old text pixels 1292x666 new text pixels 1292x666
x_new_font old char size 17x37 new char size 17x37 text chars 76x18 old text pixels 1292x666 new text pixels 1292x666
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-22 22:25 ` Dmitry Gutov
@ 2023-01-24 10:50 ` martin rudalics
2023-01-25 4:20 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-24 10:50 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
> The transcript attached, in case it's useful. But I guess, as per the
> previous discussion, this is the point where we could stop, with no
> further improvement feasible.
I'm afraid I don't know whether the filter worked at all. Please try
with the next patch two or three times to
(1) resize the frame with the mouse by two or three lines or columns or
both, and do
(2) 'set-face-attribute'
The idea is that (2) should not try to change the frame size by a very
few pixels (less than the font size) only and that in the *foo*
transcript lines starting with "xg_frame_set_char_size_return" appear
confirming that the filter was effective.
martin
[-- Attachment #2: x_rest.diff --]
[-- Type: text/x-patch, Size: 33339 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..d7d069d908 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,32 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..00ece49bad 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,10 +1206,42 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ if (scale != 1 && !frame_resize_pixelwise
+ /* Don't bother the WM when the number of text columns or text
+ lines wouldn't change and only the pixel sizes would. But make
+ sure first that these sizes are "out of synch" due to a
+ preceding "imprecise by scaling" operation like a mouse drag.
+ Otherwise, we might end up with a frame that doesn't get a
+ suitable initial size. */
+ && (FRAME_PIXEL_TO_TEXT_WIDTH (f, width) / FRAME_COLS (f)
+ == FRAME_TEXT_WIDTH (f) / FRAME_COLS (f))
+ && FRAME_TEXT_WIDTH (f) != FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)
+ && (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height) / FRAME_LINES (f)
+ == FRAME_TEXT_HEIGHT (f) / FRAME_LINES (f))
+ && FRAME_TEXT_HEIGHT (f) != FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size_return"),
+ intern ("char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text columns/lines"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("pixels to text width/height"),
+ Fcons (make_fixnum (FRAME_PIXEL_TO_TEXT_WIDTH (f, width)),
+ make_fixnum (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height))),
+ intern ("text width/height"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))));
+
+ return;
+ }
+
+ outer_height /= scale;
+ outer_width /= scale;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
/* Resize the top level widget so rows and columns remain constant.
@@ -1317,6 +1359,33 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0
+ && size_hints.width_inc > 0 && outer_height > 0
+ && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width)
+ % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height)
+ % size_hints.height_inc)));
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -1360,21 +1429,6 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
}
}
-/* Handle height/width changes (i.e. add/remove/move menu/toolbar).
- The policy is to keep the number of editable lines. */
-
-#if 0
-static void
-xg_height_or_width_changed (struct frame *f)
-{
- gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- FRAME_TOTAL_PIXEL_WIDTH (f),
- FRAME_TOTAL_PIXEL_HEIGHT (f));
- f->output_data.xp->hint_flags = 0;
- x_wm_set_size_hint (f, 0, 0);
-}
-#endif
-
#ifndef HAVE_PGTK
/* Convert an X Window WSESC on display DPY to its corresponding GtkWidget.
Must be done like this, because GtkWidget:s can have "hidden"
@@ -1917,7 +1971,8 @@ xg_free_frame_widgets (struct frame *f)
flag (this is useful when FLAGS is 0). */
void
-xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
+xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position,
+ int text_width, int text_height)
{
/* Must use GTK routines here, otherwise GTK resets the size hints
to its own defaults. */
@@ -1964,21 +2019,33 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags = f->output_data.xp->hint_flags;
hint_flags |= GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE;
- size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
- size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ size_hints.width_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_COLUMN_WIDTH (f) / scale);
+ size_hints.height_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_LINE_HEIGHT (f) / scale);
hint_flags |= GDK_HINT_BASE_SIZE;
/* Use one row/col here so base_height/width does not become zero.
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
- + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
+ base_width = ((FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f)) / scale);
+ base_height = ((FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
+ / scale);
+
+ if (text_width < 0)
+ text_width = FRAME_TEXT_WIDTH (f);
+ text_width /= scale;
+
+ if (text_height < 0)
+ text_height = FRAME_TEXT_HEIGHT (f);
+ text_height /= scale;
- size_hints.base_width = base_width;
- size_hints.base_height = base_height;
- size_hints.min_width = base_width;
- size_hints.min_height = base_height;
+ size_hints.base_width = base_width + (text_width % size_hints.width_inc);
+ size_hints.base_height = base_height + (text_height % size_hints.height_inc);
+ size_hints.min_width = size_hints.base_width;
+ size_hints.min_height = size_hints.base_height;
/* These currently have a one to one mapping with the X values, but I
don't think we should rely on that. */
@@ -2018,16 +2085,31 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags |= GDK_HINT_USER_POS;
}
- size_hints.base_width /= scale;
- size_hints.base_height /= scale;
- size_hints.width_inc /= scale;
- size_hints.height_inc /= scale;
-
if (hint_flags != f->output_data.xp->hint_flags
|| memcmp (&size_hints,
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text width"), make_fixnum (text_width),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text height"), make_fixnum (text_height),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 190d662831..21245dde5f 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -153,7 +153,7 @@ #define XG_ITEM_DATA "emacs_menuitem"
extern int xg_get_default_scrollbar_width (struct frame *f);
extern int xg_get_default_scrollbar_height (struct frame *f);
-extern void xg_wm_set_size_hint (struct frame *, long int, bool);
+extern void xg_wm_set_size_hint (struct frame *, long int, bool, int, int);
extern void update_frame_tool_bar (struct frame *f);
extern void free_frame_tool_bar (struct frame *f);
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index a32067af81..a391541e10 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1662,7 +1662,8 @@ #define INSTALL_CURSOR(FIELD, NAME) \
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- xg_wm_set_size_hint (f, window_prompting, false);
+ xg_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 13f6c6c3c4..8b077be178 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -658,7 +658,7 @@ pgtk_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
pgtk_calc_absolute_position (f);
block_input ();
- xg_wm_set_size_hint (f, 0, false);
+ xg_wm_set_size_hint (f, 0, false, -1, -1);
if (change_gravity != 0)
{
@@ -705,7 +705,8 @@ pgtk_set_window_size (struct frame *f, bool change_gravity,
f->output_data.pgtk->preferred_width = pixelwidth;
f->output_data.pgtk->preferred_height = pixelheight;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (pixelwidth),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (pixelheight));
xg_frame_set_char_size (f, pixelwidth, pixelheight);
gtk_widget_queue_resize (FRAME_WIDGET (f));
@@ -993,7 +994,10 @@ pgtk_set_parent_frame (struct frame *f, Lisp_Object new_value,
fixed, TRUE, TRUE, 0);
f->output_data.pgtk->preferred_width = alloc.width;
f->output_data.pgtk->preferred_height = alloc.height;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (alloc.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (alloc.height));
+ /* Why convert here? xg_frame_set_char_size wants native
+ pixels. */
xg_frame_set_char_size (f, FRAME_PIXEL_TO_TEXT_WIDTH (f, alloc.width),
FRAME_PIXEL_TO_TEXT_HEIGHT (f, alloc.height));
gtk_widget_queue_resize (FRAME_WIDGET (f));
diff --git a/src/widget.c b/src/widget.c
index aaab33b6d8..7468bf63fc 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -32,6 +32,7 @@
#include "sysstdio.h"
#include "xterm.h"
#include "frame.h"
+#include "blockinput.h"
#include <X11/StringDefs.h>
#include <X11/IntrinsicP.h>
@@ -154,15 +155,6 @@ emacsFrameClass (void)
return (WidgetClass) &emacsFrameClassRec;
}
-static void
-get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
-{
- struct frame *f = ew->emacs_frame.frame;
-
- *pixel_width = FRAME_COLUMN_WIDTH (f);
- *pixel_height = FRAME_LINE_HEIGHT (f);
-}
-
static void
pixel_to_char_size (EmacsFrame ew, Dimension pixel_width,
Dimension pixel_height, int *char_width, int *char_height)
@@ -207,120 +199,97 @@ get_wm_shell (Widget w)
return (WMShellWidget) wmshell;
}
-#if 0 /* Currently not used. */
-
-static void
-mark_shell_size_user_specified (Widget wmshell)
-{
- if (! XtIsWMShell (wmshell)) emacs_abort ();
- /* This is kind of sleazy, but I can't see how else to tell it to make it
- mark the WM_SIZE_HINTS size as user specified when appropriate. */
- ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;
-}
-
-#endif
-
-
static void
set_frame_size (EmacsFrame ew)
{
- /* The widget hierarchy is
-
- argv[0] emacsShell pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
-
- We accept geometry specs in this order:
-
- *Frame-NAME.geometry
- *EmacsFrame.geometry
- Emacs.geometry
-
- Other possibilities for widget hierarchies might be
-
- argv[0] frame pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane emacsTextPane
- ApplicationShell EmacsFrame Paned EmacsTextPane
-
- With the current setup, the text-display-area is the part which is
- an emacs "frame", since that's the only part managed by emacs proper
- (the menubar and the parent of the menubar and all that sort of thing
- are managed by lwlib.)
-
- The EmacsShell widget is simply a replacement for the Shell widget
- which is able to deal with using an externally-supplied window instead
- of always creating its own. It is not actually emacs specific, and
- should possibly have class "Shell" instead of "EmacsShell" to simplify
- the resources.
-
- */
-
struct frame *f = ew->emacs_frame.frame;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.height = FRAME_PIXEL_HEIGHT (f);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("set_frame_size"));
+ CALLN (Ffuncall, Qfoo_it, build_string ("set_frame_size"),
+ build_string ("native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))));
}
static bool
-update_wm_hints (WMShellWidget wmshell, EmacsFrame ew)
+update_wm_hints (WMShellWidget wmshell, EmacsFrame ew, int width, int height)
{
- int cw;
- int ch;
- Dimension rounded_width;
- Dimension rounded_height;
- int char_width;
- int char_height;
- int base_width;
- int base_height;
- char buffer[sizeof wmshell->wm.size_hints];
- char *hints_ptr;
-
- /* Copy the old size hints to the buffer. */
- memcpy (buffer, &wmshell->wm.size_hints,
- sizeof wmshell->wm.size_hints);
-
- pixel_to_char_size (ew, ew->core.width, ew->core.height,
- &char_width, &char_height);
- char_to_pixel_size (ew, char_width, char_height,
- &rounded_width, &rounded_height);
- get_default_char_pixel_size (ew, &cw, &ch);
-
- base_width = (wmshell->core.width - ew->core.width
- + (rounded_width - (char_width * cw)));
- base_height = (wmshell->core.height - ew->core.height
- + (rounded_height - (char_height * ch)));
+ struct frame *f = ew->emacs_frame.frame;
+ int char_width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
+ int char_height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ int base_width
+ = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + (((width < 0) ? FRAME_TEXT_WIDTH (f) : width) % char_width));
+ int base_height
+ = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + (((height < 0) ? FRAME_TEXT_HEIGHT (f) : height) % char_height));
+ int min_width = base_width;
+ int min_height = base_height;
+ bool value;
+
+ int old_base_width, old_base_height;
+ int old_char_width, old_char_height;
+ int old_min_width, old_min_height;
+
+ block_input ();
+ XtVaGetValues ((Widget) wmshell,
+ XtNbaseWidth, &old_base_width,
+ XtNbaseHeight, &old_base_height,
+ XtNwidthInc, &old_char_width,
+ XtNheightInc, &old_char_height,
+ XtNminWidth, &old_min_width,
+ XtNminHeight, &old_min_height,
+ NULL);
+ unblock_input ();
XtVaSetValues ((Widget) wmshell,
XtNbaseWidth, (XtArgVal) base_width,
XtNbaseHeight, (XtArgVal) base_height,
- XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
- XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
- XtNminWidth, (XtArgVal) base_width,
- XtNminHeight, (XtArgVal) base_height,
+ XtNwidthInc, (XtArgVal) char_width,
+ XtNheightInc, (XtArgVal) char_height,
+ XtNminWidth, (XtArgVal) min_width,
+ XtNminHeight, (XtArgVal) min_height,
NULL);
- /* Return if size hints really changed. If they did not, then Xt
- probably didn't set them either (or take the flags into
- account.) */
- hints_ptr = (char *) &wmshell->wm.size_hints;
+ value = (base_width != old_base_width || base_height != old_base_height
+ || char_width != old_char_width || char_height != old_char_height
+ || min_width != old_min_width || min_height != old_min_height);
- /* Skip flags, which is unsigned long. */
- return memcmp (hints_ptr + sizeof (long), buffer + sizeof (long),
- sizeof wmshell->wm.wm_hints - sizeof (long));
+ if (value)
+ {
+ CALLN (Ffuncall, Qfoo_it, build_string ("update_wm_hints"),
+ build_string ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ build_string ("old char width"), make_fixnum (old_char_width),
+ build_string ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ build_string ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base width"), make_fixnum (base_width),
+ build_string ("old_base width"), make_fixnum (old_base_width),
+ build_string ("min width"), make_fixnum (min_width),
+ build_string ("old min width"), make_fixnum (old_min_width));
+ CALLN (Ffuncall, Qfoo_it, build_string (" "),
+ build_string ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ build_string ("old char height"), make_fixnum (old_char_height),
+ build_string ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ build_string ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base height"), make_fixnum (base_height),
+ build_string ("old base height"), make_fixnum (old_base_height),
+ build_string ("min height"), make_fixnum (min_height),
+ build_string ("old min height"), make_fixnum (old_min_height));
+ }
+
+ return value;
}
bool
-widget_update_wm_size_hints (Widget widget, Widget frame)
+widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height)
{
- return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame);
+ return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame,
+ width, height);
}
static void
@@ -337,7 +306,7 @@ update_from_various_frame_slots (EmacsFrame ew)
struct frame *f = ew->emacs_frame.frame;
struct x_output *x = f->output_data.x;
- ew->core.height = FRAME_PIXEL_HEIGHT (f) - x->menubar_height;
+ ew->core.height = FRAME_PIXEL_HEIGHT (f); // - x->menubar_height;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.background_pixel = FRAME_BACKGROUND_PIXEL (f);
ew->emacs_frame.internal_border_width = f->internal_border_width;
@@ -345,12 +314,11 @@ update_from_various_frame_slots (EmacsFrame ew)
ew->emacs_frame.cursor_color = x->cursor_pixel;
ew->core.border_pixel = x->border_pixel;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("update_from_various_frame_slots"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ CALLN (Ffuncall, Qfoo_it,
+ build_string ("update_from_various_frame_slots"),
+ build_string ("native pixels"),
+ (Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f)))));
}
static void
@@ -384,7 +352,6 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
XSetWindowAttributes *attrs)
{
EmacsFrame ew = (EmacsFrame) widget;
- struct frame *f = ew->emacs_frame.frame;
/* This used to contain SubstructureRedirectMask, but this turns out
to be a problem with XIM on Solaris, and events from that mask
@@ -399,12 +366,8 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
make sure we get them all. Seen with xfcwm4 for example. */
XtAddRawEventHandler (widget, StructureNotifyMask, False, resize_cb, NULL);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("EmacsFrameRealize"));
-
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew, -1, -1);
}
static void
@@ -419,18 +382,23 @@ EmacsFrameResize (Widget widget)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameResize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ if (FRAME_PIXEL_WIDTH (f) != ew->core.width
+ || FRAME_PIXEL_HEIGHT (f) != ew->core.height)
+ CALLN (Ffuncall, Qfoo_it, build_string ("EmacsFrameResize"),
+ build_string ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ build_string ("new native pixels"),
+ Fcons (make_fixnum (ew->core.width),
+ make_fixnum (ew->core.height)));
change_frame_size (f, ew->core.width, ew->core.height,
false, true, false);
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew,
+ FRAME_PIXEL_TO_TEXT_WIDTH (f, ew->core.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, ew->core.height));
update_various_frame_slots (ew);
cancel_mouse_face (f);
@@ -472,13 +440,6 @@ EmacsFrameSetCharSize (Widget widget, int columns, int rows)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameSetCharSize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- columns, rows,
- f->new_width, f->new_height);
-
if (!frame_inhibit_resize (f, 0, Qfont)
&& !frame_inhibit_resize (f, 1, Qfont))
x_set_window_size (f, 0, columns * FRAME_COLUMN_WIDTH (f),
diff --git a/src/widget.h b/src/widget.h
index cf83cb1078..03bc809c41 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -97,6 +97,6 @@ #define XtCInitialGeometry "InitialGeometry"
/* Special entry points */
void EmacsFrameSetCharSize (Widget, int, int);
void widget_store_internal_border (Widget widget);
-bool widget_update_wm_size_hints (Widget widget, Widget frame);
+bool widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height);
#endif /* _EmacsFrame_h */
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xfns.c b/src/xfns.c
index 36b51a3011..25e1af279d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4575,7 +4575,7 @@ DEFUN ("x-wm-set-size-hint", Fx_wm_set_size_hint, Sx_wm_set_size_hint,
struct frame *f = decode_window_system_frame (frame);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
unblock_input ();
return Qnil;
}
@@ -5097,7 +5097,8 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- x_wm_set_size_hint (f, window_prompting, false);
+ x_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b1d65ce59d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
@@ -26589,7 +26609,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
x_calc_absolute_position (f);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
#ifdef USE_GTK
if (x_gtk_use_window_move)
@@ -27279,7 +27299,7 @@ x_check_fullscreen (struct frame *f)
emacs_abort ();
}
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height);
@@ -27453,7 +27473,8 @@ x_set_window_size_1 (struct frame *f, bool change_gravity,
{
if (change_gravity)
f->win_gravity = NorthWestGravity;
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height + FRAME_MENUBAR_HEIGHT (f));
@@ -28243,7 +28264,7 @@ x_make_frame_invisible (struct frame *f)
program-specified, so that when the window is mapped again, it will be
placed at the same location, without forcing the user to position it
by hand again (they have already done that once for this window.) */
- x_wm_set_size_hint (f, 0, true);
+ x_wm_set_size_hint (f, 0, true, -1, -1);
#ifdef USE_GTK
if (FRAME_GTK_OUTER_WIDGET (f))
@@ -28896,7 +28917,8 @@ x_embed_frame (struct x_display_info *dpyinfo, struct frame *f)
The GTK version is in gtkutils.c. */
void
-x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
+x_wm_set_size_hint (struct frame *f, long flags, bool user_position,
+ int width, int height)
{
#ifndef USE_GTK
XSizeHints size_hints;
@@ -28935,10 +28957,12 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
#ifndef USE_MOTIF
hints_changed
= widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
#else
widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
/* Do this all over again for the benefit of Motif, which always
knows better than the programmer. */
@@ -29012,8 +29036,16 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
{
int base_width, base_height;
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
+ if (width == -1)
+ width = FRAME_TEXT_WIDTH (f);
+
+ if (height == -1)
+ height = FRAME_TEXT_HEIGHT (f);
+
+ base_width = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0)
+ + width % FRAME_COLUMN_WIDTH (f));
+ base_height = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0)
+ + height % FRAME_LINE_HEIGHT (f));
/* The window manager uses the base width hints to calculate the
current number of rows and columns in the frame while
@@ -29075,7 +29107,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
#else
- xg_wm_set_size_hint (f, flags, user_position);
+ xg_wm_set_size_hint (f, flags, user_position, width, height);
#endif /* USE_GTK */
}
diff --git a/src/xterm.h b/src/xterm.h
index ee429e9c68..61512f1117 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1653,7 +1653,7 @@ #define SELECTION_EVENT_TIME(eventp) \
extern void x_make_frame_invisible (struct frame *);
extern void x_iconify_frame (struct frame *);
extern void x_free_frame_resources (struct frame *);
-extern void x_wm_set_size_hint (struct frame *, long, bool);
+extern void x_wm_set_size_hint (struct frame *, long, bool, int, int);
#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \
&& defined HAVE_CLOCK_GETTIME
extern void x_sync_init_fences (struct frame *);
^ permalink raw reply related [flat|nested] 169+ messages in thread
* 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
2023-01-24 10:50 ` martin rudalics
@ 2023-01-25 4:20 ` Dmitry Gutov
2023-01-26 15:44 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-25 4:20 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]
On 24/01/2023 12:50, martin rudalics wrote:
> > The transcript attached, in case it's useful. But I guess, as per the
> > previous discussion, this is the point where we could stop, with no
> > further improvement feasible.
>
> I'm afraid I don't know whether the filter worked at all. Please try
> with the next patch two or three times to
>
> (1) resize the frame with the mouse by two or three lines or columns or
> both, and do
>
> (2) 'set-face-attribute'
>
> The idea is that (2) should not try to change the frame size by a very
> few pixels (less than the font size) only and that in the *foo*
> transcript lines starting with "xg_frame_set_char_size_return" appear
> confirming that the filter was effective.
It seems to have a different effect: the last version at least has one
size where s-f-a changes the height by 2 line heights.
See this transcript where at the end (and multiple times before that)
change the frame to 118x35 (per GNOME) which is 112x35 internally, and
s-f-a changes the height to 33 (per GNOME) which is 34 internally.
The lines xg_frame_set_char_size_return do appear in the transcript.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 61441 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text height 648 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x0
xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1728x1620 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
xg_frame_resized old native pixels 1408x1332 new native pixels 1424x1332
adjust_frame_size old native pixels 1408x1332 new native pixels 1424x1332 old text pixels 1360x1332 new text pixels 1376x1332 old text chars 80x36 new text chars 80x36
xg_frame_resized old native pixels 1424x1332 new native pixels 1488x1368
adjust_frame_size old native pixels 1424x1332 new native pixels 1488x1368 old text pixels 1376x1332 new text pixels 1440x1368 old text chars 80x36 new text chars 84x36
xg_frame_resized old native pixels 1488x1368 new native pixels 1568x1368
adjust_frame_size old native pixels 1488x1368 new native pixels 1568x1368 old text pixels 1440x1368 new text pixels 1520x1368 old text chars 84x36 new text chars 89x36
xg_frame_resized old native pixels 1568x1368 new native pixels 1648x1404
adjust_frame_size old native pixels 1568x1368 new native pixels 1648x1404 old text pixels 1520x1368 new text pixels 1600x1404 old text chars 89x36 new text chars 94x37
xg_frame_resized old native pixels 1648x1404 new native pixels 1776x1440
adjust_frame_size old native pixels 1648x1404 new native pixels 1776x1440 old text pixels 1600x1404 new text pixels 1728x1440 old text chars 94x37 new text chars 101x38
xg_frame_resized old native pixels 1776x1440 new native pixels 1856x1440
adjust_frame_size old native pixels 1776x1440 new native pixels 1856x1440 old text pixels 1728x1440 new text pixels 1808x1440 old text chars 101x38 new text chars 106x38
xg_frame_resized old native pixels 1856x1440 new native pixels 1920x1476
adjust_frame_size old native pixels 1856x1440 new native pixels 1920x1476 old text pixels 1808x1440 new text pixels 1872x1476 old text chars 106x38 new text chars 110x39
xg_frame_resized old native pixels 1920x1476 new native pixels 1952x1476
adjust_frame_size old native pixels 1920x1476 new native pixels 1952x1476 old text pixels 1872x1476 new text pixels 1904x1476 old text chars 110x39 new text chars 112x39
x_new_font old char size 17x37 new char size 17x37 text chars 112x39 old text pixels 1904x1476 new text pixels 1904x1443
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 952 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 721 base height 85 height inc 18
xg_frame_set_char_size old native pixels 1952x1476 new native pixels 1952x1443 outer pixels 976x787 outer rest 0x0
xg_frame_resized old native pixels 1952x1476 new native pixels 1952x1442
adjust_frame_size old native pixels 1952x1476 new native pixels 1952x1442 old text pixels 1904x1476 new text pixels 1904x1442 old text chars 112x39 new text chars 112x38
x_new_font old char size 17x37 new char size 17x37 text chars 112x38 old text pixels 1904x1442 new text pixels 1904x1406
xg_frame_set_char_size old native pixels 1952x1442 new native pixels 1952x1406 outer pixels 976x769 outer rest 0x0
xg_frame_resized old native pixels 1952x1442 new native pixels 1952x1406
adjust_frame_size old native pixels 1952x1442 new native pixels 1952x1406 old text pixels 1904x1442 new text pixels 1904x1406 old text chars 112x38 new text chars 112x38
x_new_font old char size 17x37 new char size 17x37 text chars 112x38 old text pixels 1904x1406 new text pixels 1904x1406
x_new_font old char size 17x37 new char size 17x37 text chars 112x38 old text pixels 1904x1406 new text pixels 1904x1406
x_new_font old char size 17x37 new char size 17x37 text chars 112x38 old text pixels 1904x1406 new text pixels 1904x1406
x_new_font old char size 17x37 new char size 17x37 text chars 112x38 old text pixels 1904x1406 new text pixels 1904x1406
xg_frame_resized old native pixels 1952x1406 new native pixels 1936x1370
adjust_frame_size old native pixels 1952x1406 new native pixels 1936x1370 old text pixels 1904x1406 new text pixels 1888x1370 old text chars 112x38 new text chars 111x37
xg_frame_resized old native pixels 1936x1370 new native pixels 1920x1370
adjust_frame_size old native pixels 1936x1370 new native pixels 1920x1370 old text pixels 1888x1370 new text pixels 1872x1370 old text chars 111x37 new text chars 110x37
xg_frame_resized old native pixels 1920x1370 new native pixels 1904x1370
adjust_frame_size old native pixels 1920x1370 new native pixels 1904x1370 old text pixels 1872x1370 new text pixels 1856x1370 old text chars 110x37 new text chars 109x37
xg_frame_resized old native pixels 1904x1370 new native pixels 1888x1370
adjust_frame_size old native pixels 1904x1370 new native pixels 1888x1370 old text pixels 1856x1370 new text pixels 1840x1370 old text chars 109x37 new text chars 108x37
xg_frame_resized old native pixels 1888x1370 new native pixels 1872x1370
adjust_frame_size old native pixels 1888x1370 new native pixels 1872x1370 old text pixels 1840x1370 new text pixels 1824x1370 old text chars 108x37 new text chars 107x37
xg_frame_resized old native pixels 1872x1370 new native pixels 1872x1334
adjust_frame_size old native pixels 1872x1370 new native pixels 1872x1334 old text pixels 1824x1370 new text pixels 1824x1334 old text chars 107x37 new text chars 107x36
x_new_font old char size 17x37 new char size 17x37 text chars 107x36 old text pixels 1824x1334 new text pixels 1819x1332
xg_frame_set_char_size_return char size 17x37 text columns/lines 107x36 pixels to text width/height 1819x1332 text width/height 1824x1334
x_new_font old char size 17x37 new char size 17x37 text chars 107x36 old text pixels 1824x1334 new text pixels 1819x1332
xg_frame_set_char_size_return char size 17x37 text columns/lines 107x36 pixels to text width/height 1819x1332 text width/height 1824x1334
xg_frame_resized old native pixels 1872x1334 new native pixels 1888x1334
adjust_frame_size old native pixels 1872x1334 new native pixels 1888x1334 old text pixels 1824x1334 new text pixels 1840x1334 old text chars 107x36 new text chars 108x36
xg_frame_resized old native pixels 1888x1334 new native pixels 1904x1334
adjust_frame_size old native pixels 1888x1334 new native pixels 1904x1334 old text pixels 1840x1334 new text pixels 1856x1334 old text chars 108x36 new text chars 109x36
xg_frame_resized old native pixels 1904x1334 new native pixels 1936x1406
adjust_frame_size old native pixels 1904x1334 new native pixels 1936x1406 old text pixels 1856x1334 new text pixels 1888x1406 old text chars 109x36 new text chars 111x38
xg_frame_resized old native pixels 1936x1406 new native pixels 1952x1406
adjust_frame_size old native pixels 1936x1406 new native pixels 1952x1406 old text pixels 1888x1406 new text pixels 1904x1406 old text chars 111x38 new text chars 112x38
xg_frame_resized old native pixels 1952x1406 new native pixels 1968x1406
adjust_frame_size old native pixels 1952x1406 new native pixels 1968x1406 old text pixels 1904x1406 new text pixels 1920x1406 old text chars 112x38 new text chars 112x38
xg_frame_resized old native pixels 1968x1406 new native pixels 1968x1442
adjust_frame_size old native pixels 1968x1406 new native pixels 1968x1442 old text pixels 1920x1406 new text pixels 1920x1442 old text chars 112x38 new text chars 112x38
xg_frame_resized old native pixels 1968x1442 new native pixels 1984x1442
adjust_frame_size old native pixels 1968x1442 new native pixels 1984x1442 old text pixels 1920x1442 new text pixels 1936x1442 old text chars 112x38 new text chars 113x38
x_new_font old char size 17x37 new char size 17x37 text chars 113x38 old text pixels 1936x1442 new text pixels 1921x1406
xg_frame_set_char_size_return char size 17x37 text columns/lines 113x38 pixels to text width/height 1921x1406 text width/height 1936x1442
x_new_font old char size 17x37 new char size 17x37 text chars 113x38 old text pixels 1936x1442 new text pixels 1921x1406
xg_frame_set_char_size_return char size 17x37 text columns/lines 113x38 pixels to text width/height 1921x1406 text width/height 1936x1442
xg_frame_resized old native pixels 1984x1442 new native pixels 1968x1406
adjust_frame_size old native pixels 1984x1442 new native pixels 1968x1406 old text pixels 1936x1442 new text pixels 1920x1406 old text chars 113x38 new text chars 112x38
x_new_font old char size 17x37 new char size 17x37 text chars 112x38 old text pixels 1920x1406 new text pixels 1904x1406
xg_frame_set_char_size old native pixels 1968x1406 new native pixels 1952x1406 outer pixels 976x769 outer rest 0x0
xg_frame_resized old native pixels 1968x1406 new native pixels 1952x1406
adjust_frame_size old native pixels 1968x1406 new native pixels 1952x1406 old text pixels 1920x1406 new text pixels 1904x1406 old text chars 112x38 new text chars 112x38
x_new_font old char size 17x37 new char size 17x37 text chars 112x38 old text pixels 1904x1406 new text pixels 1904x1406
xg_frame_resized old native pixels 1952x1406 new native pixels 1952x1442
adjust_frame_size old native pixels 1952x1406 new native pixels 1952x1442 old text pixels 1904x1406 new text pixels 1904x1442 old text chars 112x38 new text chars 112x38
xg_frame_resized old native pixels 1952x1442 new native pixels 1968x1442
adjust_frame_size old native pixels 1952x1442 new native pixels 1968x1442 old text pixels 1904x1442 new text pixels 1920x1442 old text chars 112x38 new text chars 112x38
xg_frame_resized old native pixels 1968x1442 new native pixels 1968x1478
adjust_frame_size old native pixels 1968x1442 new native pixels 1968x1478 old text pixels 1920x1442 new text pixels 1920x1478 old text chars 112x38 new text chars 112x39
xg_frame_resized old native pixels 1968x1478 new native pixels 1984x1514
adjust_frame_size old native pixels 1968x1478 new native pixels 1984x1514 old text pixels 1920x1478 new text pixels 1936x1514 old text chars 112x39 new text chars 113x40
xg_frame_resized old native pixels 1984x1514 new native pixels 1984x1550
adjust_frame_size old native pixels 1984x1514 new native pixels 1984x1550 old text pixels 1936x1514 new text pixels 1936x1550 old text chars 113x40 new text chars 113x41
x_new_font old char size 17x37 new char size 17x37 text chars 113x41 old text pixels 1936x1550 new text pixels 1921x1517
xg_frame_set_char_size_return char size 17x37 text columns/lines 113x41 pixels to text width/height 1921x1517 text width/height 1936x1550
x_new_font old char size 17x37 new char size 17x37 text chars 113x41 old text pixels 1936x1550 new text pixels 1921x1517
xg_frame_set_char_size_return char size 17x37 text columns/lines 113x41 pixels to text width/height 1921x1517 text width/height 1936x1550
xg_frame_resized old native pixels 1984x1550 new native pixels 1984x1514
adjust_frame_size old native pixels 1984x1550 new native pixels 1984x1514 old text pixels 1936x1550 new text pixels 1936x1514 old text chars 113x41 new text chars 113x40
xg_frame_resized old native pixels 1984x1514 new native pixels 1968x1514
adjust_frame_size old native pixels 1984x1514 new native pixels 1968x1514 old text pixels 1936x1514 new text pixels 1920x1514 old text chars 113x40 new text chars 112x40
xg_frame_resized old native pixels 1968x1514 new native pixels 1968x1478
adjust_frame_size old native pixels 1968x1514 new native pixels 1968x1478 old text pixels 1920x1514 new text pixels 1920x1478 old text chars 112x40 new text chars 112x39
x_new_font old char size 17x37 new char size 17x37 text chars 112x39 old text pixels 1920x1478 new text pixels 1904x1443
xg_frame_set_char_size_return char size 17x37 text columns/lines 112x39 pixels to text width/height 1904x1443 text width/height 1920x1478
x_new_font old char size 17x37 new char size 17x37 text chars 112x39 old text pixels 1920x1478 new text pixels 1904x1443
xg_frame_set_char_size_return char size 17x37 text columns/lines 112x39 pixels to text width/height 1904x1443 text width/height 1920x1478
xg_frame_resized old native pixels 1968x1478 new native pixels 1984x1478
adjust_frame_size old native pixels 1968x1478 new native pixels 1984x1478 old text pixels 1920x1478 new text pixels 1936x1478 old text chars 112x39 new text chars 113x39
xg_frame_resized old native pixels 1984x1478 new native pixels 2064x1514
adjust_frame_size old native pixels 1984x1478 new native pixels 2064x1514 old text pixels 1936x1478 new text pixels 2016x1514 old text chars 113x39 new text chars 118x40
xg_frame_resized old native pixels 2064x1514 new native pixels 2208x1550
adjust_frame_size old native pixels 2064x1514 new native pixels 2208x1550 old text pixels 2016x1514 new text pixels 2160x1550 old text chars 118x40 new text chars 127x41
xg_frame_resized old native pixels 2208x1550 new native pixels 2352x1622
adjust_frame_size old native pixels 2208x1550 new native pixels 2352x1622 old text pixels 2160x1550 new text pixels 2304x1622 old text chars 127x41 new text chars 135x43
xg_frame_resized old native pixels 2352x1622 new native pixels 2400x1622
adjust_frame_size old native pixels 2352x1622 new native pixels 2400x1622 old text pixels 2304x1622 new text pixels 2352x1622 old text chars 135x43 new text chars 138x43
xg_frame_resized old native pixels 2400x1622 new native pixels 2480x1658
adjust_frame_size old native pixels 2400x1622 new native pixels 2480x1658 old text pixels 2352x1622 new text pixels 2432x1658 old text chars 138x43 new text chars 143x44
xg_frame_resized old native pixels 2480x1658 new native pixels 2496x1658
adjust_frame_size old native pixels 2480x1658 new native pixels 2496x1658 old text pixels 2432x1658 new text pixels 2448x1658 old text chars 143x44 new text chars 144x44
x_new_font old char size 17x37 new char size 17x37 text chars 144x44 old text pixels 2448x1658 new text pixels 2448x1628
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 1224 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 814 base height 88 height inc 18
xg_frame_set_char_size old native pixels 2496x1658 new native pixels 2496x1628 outer pixels 1248x880 outer rest 0x0
xg_frame_resized old native pixels 2496x1658 new native pixels 2496x1628
adjust_frame_size old native pixels 2496x1658 new native pixels 2496x1628 old text pixels 2448x1658 new text pixels 2448x1628 old text chars 144x44 new text chars 144x44
x_new_font old char size 17x37 new char size 17x37 text chars 144x44 old text pixels 2448x1628 new text pixels 2448x1628
xg_frame_resized old native pixels 2496x1628 new native pixels 2496x1592
adjust_frame_size old native pixels 2496x1628 new native pixels 2496x1592 old text pixels 2448x1628 new text pixels 2448x1592 old text chars 144x44 new text chars 144x43
xg_frame_resized old native pixels 2496x1592 new native pixels 2480x1592
adjust_frame_size old native pixels 2496x1592 new native pixels 2480x1592 old text pixels 2448x1592 new text pixels 2432x1592 old text chars 144x43 new text chars 143x43
xg_frame_resized old native pixels 2480x1592 new native pixels 2352x1520
adjust_frame_size old native pixels 2480x1592 new native pixels 2352x1520 old text pixels 2432x1592 new text pixels 2304x1520 old text chars 143x43 new text chars 135x41
xg_frame_resized old native pixels 2352x1520 new native pixels 2272x1448
adjust_frame_size old native pixels 2352x1520 new native pixels 2272x1448 old text pixels 2304x1520 new text pixels 2224x1448 old text chars 135x41 new text chars 130x39
xg_frame_resized old native pixels 2272x1448 new native pixels 2080x1376
adjust_frame_size old native pixels 2272x1448 new native pixels 2080x1376 old text pixels 2224x1448 new text pixels 2032x1376 old text chars 130x39 new text chars 119x37
xg_frame_resized old native pixels 2080x1376 new native pixels 2016x1340
adjust_frame_size old native pixels 2080x1376 new native pixels 2016x1340 old text pixels 2032x1376 new text pixels 1968x1340 old text chars 119x37 new text chars 115x36
xg_frame_resized old native pixels 2016x1340 new native pixels 1984x1340
adjust_frame_size old native pixels 2016x1340 new native pixels 1984x1340 old text pixels 1968x1340 new text pixels 1936x1340 old text chars 115x36 new text chars 113x36
xg_frame_resized old native pixels 1984x1340 new native pixels 1968x1304
adjust_frame_size old native pixels 1984x1340 new native pixels 1968x1304 old text pixels 1936x1340 new text pixels 1920x1304 old text chars 113x36 new text chars 112x35
xg_frame_resized old native pixels 1968x1304 new native pixels 1952x1304
adjust_frame_size old native pixels 1968x1304 new native pixels 1952x1304 old text pixels 1920x1304 new text pixels 1904x1304 old text chars 112x35 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1304 new text pixels 1904x1295
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 952 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 647 base height 101 height inc 18
xg_frame_set_char_size old native pixels 1952x1304 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1304 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1304 new native pixels 1952x1294 old text pixels 1904x1304 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1222
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1222 old text pixels 1904x1258 new text pixels 1904x1222 old text chars 112x34 new text chars 112x33
xg_frame_resized old native pixels 1952x1222 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1222 new native pixels 1952x1258 old text pixels 1904x1222 new text pixels 1904x1258 old text chars 112x33 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1936x1294
adjust_frame_size old native pixels 1952x1294 new native pixels 1936x1294 old text pixels 1904x1294 new text pixels 1888x1294 old text chars 112x34 new text chars 111x34
xg_frame_resized old native pixels 1936x1294 new native pixels 1936x1330
adjust_frame_size old native pixels 1936x1294 new native pixels 1936x1330 old text pixels 1888x1294 new text pixels 1888x1330 old text chars 111x34 new text chars 111x35
xg_frame_resized old native pixels 1936x1330 new native pixels 1952x1330
adjust_frame_size old native pixels 1936x1330 new native pixels 1952x1330 old text pixels 1888x1330 new text pixels 1904x1330 old text chars 111x35 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1222
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1222 old text pixels 1904x1258 new text pixels 1904x1222 old text chars 112x34 new text chars 112x33
xg_frame_resized old native pixels 1952x1222 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1222 new native pixels 1952x1258 old text pixels 1904x1222 new text pixels 1904x1258 old text chars 112x33 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1222
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1222 old text pixels 1904x1258 new text pixels 1904x1222 old text chars 112x34 new text chars 112x33
xg_frame_resized old native pixels 1952x1222 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1222 new native pixels 1952x1258 old text pixels 1904x1222 new text pixels 1904x1258 old text chars 112x33 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1258 new text pixels 1904x1258
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1258 new text pixels 1904x1258
xg_frame_resized old native pixels 1952x1258 new native pixels 1936x1258
adjust_frame_size old native pixels 1952x1258 new native pixels 1936x1258 old text pixels 1904x1258 new text pixels 1888x1258 old text chars 112x34 new text chars 111x34
xg_frame_resized old native pixels 1936x1258 new native pixels 1936x1294
adjust_frame_size old native pixels 1936x1258 new native pixels 1936x1294 old text pixels 1888x1258 new text pixels 1888x1294 old text chars 111x34 new text chars 111x34
xg_frame_resized old native pixels 1936x1294 new native pixels 1952x1294
adjust_frame_size old native pixels 1936x1294 new native pixels 1952x1294 old text pixels 1888x1294 new text pixels 1904x1294 old text chars 111x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1968x1294
adjust_frame_size old native pixels 1952x1294 new native pixels 1968x1294 old text pixels 1904x1294 new text pixels 1920x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1968x1294 new native pixels 1968x1330
adjust_frame_size old native pixels 1968x1294 new native pixels 1968x1330 old text pixels 1920x1294 new text pixels 1920x1330 old text chars 112x34 new text chars 112x35
xg_frame_resized old native pixels 1968x1330 new native pixels 1952x1330
adjust_frame_size old native pixels 1968x1330 new native pixels 1952x1330 old text pixels 1920x1330 new text pixels 1904x1330 old text chars 112x35 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1222
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1222 old text pixels 1904x1258 new text pixels 1904x1222 old text chars 112x34 new text chars 112x33
xg_frame_resized old native pixels 1952x1222 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1222 new native pixels 1952x1258 old text pixels 1904x1222 new text pixels 1904x1258 old text chars 112x33 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1936x1258
adjust_frame_size old native pixels 1952x1258 new native pixels 1936x1258 old text pixels 1904x1258 new text pixels 1888x1258 old text chars 112x34 new text chars 111x34
xg_frame_resized old native pixels 1936x1258 new native pixels 1952x1258
adjust_frame_size old native pixels 1936x1258 new native pixels 1952x1258 old text pixels 1888x1258 new text pixels 1904x1258 old text chars 111x34 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1258 new text pixels 1904x1258
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1258 new text pixels 1904x1258
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1258 new text pixels 1904x1258
xg_frame_resized old native pixels 1952x1258 new native pixels 1936x1258
adjust_frame_size old native pixels 1952x1258 new native pixels 1936x1258 old text pixels 1904x1258 new text pixels 1888x1258 old text chars 112x34 new text chars 111x34
xg_frame_resized old native pixels 1936x1258 new native pixels 1936x1294
adjust_frame_size old native pixels 1936x1258 new native pixels 1936x1294 old text pixels 1888x1258 new text pixels 1888x1294 old text chars 111x34 new text chars 111x34
xg_frame_resized old native pixels 1936x1294 new native pixels 1952x1294
adjust_frame_size old native pixels 1936x1294 new native pixels 1952x1294 old text pixels 1888x1294 new text pixels 1904x1294 old text chars 111x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
xg_frame_resized old native pixels 1952x1330 new native pixels 1936x1330
adjust_frame_size old native pixels 1952x1330 new native pixels 1936x1330 old text pixels 1904x1330 new text pixels 1888x1330 old text chars 112x35 new text chars 111x35
xg_frame_resized old native pixels 1936x1330 new native pixels 1904x1330
adjust_frame_size old native pixels 1936x1330 new native pixels 1904x1330 old text pixels 1888x1330 new text pixels 1856x1330 old text chars 111x35 new text chars 109x35
xg_frame_resized old native pixels 1904x1330 new native pixels 1824x1330
adjust_frame_size old native pixels 1904x1330 new native pixels 1824x1330 old text pixels 1856x1330 new text pixels 1776x1330 old text chars 109x35 new text chars 104x35
xg_frame_resized old native pixels 1824x1330 new native pixels 1760x1294
adjust_frame_size old native pixels 1824x1330 new native pixels 1760x1294 old text pixels 1776x1330 new text pixels 1712x1294 old text chars 104x35 new text chars 100x34
xg_frame_resized old native pixels 1760x1294 new native pixels 1696x1294
adjust_frame_size old native pixels 1760x1294 new native pixels 1696x1294 old text pixels 1712x1294 new text pixels 1648x1294 old text chars 100x34 new text chars 96x34
xg_frame_resized old native pixels 1696x1294 new native pixels 1664x1294
adjust_frame_size old native pixels 1696x1294 new native pixels 1664x1294 old text pixels 1648x1294 new text pixels 1616x1294 old text chars 96x34 new text chars 95x34
xg_frame_resized old native pixels 1664x1294 new native pixels 1616x1294
adjust_frame_size old native pixels 1664x1294 new native pixels 1616x1294 old text pixels 1616x1294 new text pixels 1568x1294 old text chars 95x34 new text chars 92x34
xg_frame_resized old native pixels 1616x1294 new native pixels 1584x1294
adjust_frame_size old native pixels 1616x1294 new native pixels 1584x1294 old text pixels 1568x1294 new text pixels 1536x1294 old text chars 92x34 new text chars 90x34
xg_frame_resized old native pixels 1584x1294 new native pixels 1504x1294
adjust_frame_size old native pixels 1584x1294 new native pixels 1504x1294 old text pixels 1536x1294 new text pixels 1456x1294 old text chars 90x34 new text chars 85x34
xg_frame_resized old native pixels 1504x1294 new native pixels 1488x1294
adjust_frame_size old native pixels 1504x1294 new native pixels 1488x1294 old text pixels 1456x1294 new text pixels 1440x1294 old text chars 85x34 new text chars 84x34
xg_frame_resized old native pixels 1488x1294 new native pixels 1472x1294
adjust_frame_size old native pixels 1488x1294 new native pixels 1472x1294 old text pixels 1440x1294 new text pixels 1424x1294 old text chars 84x34 new text chars 83x34
xg_frame_resized old native pixels 1472x1294 new native pixels 1472x1258
adjust_frame_size old native pixels 1472x1294 new native pixels 1472x1258 old text pixels 1424x1294 new text pixels 1424x1258 old text chars 83x34 new text chars 83x34
xg_frame_resized old native pixels 1472x1258 new native pixels 1456x1258
adjust_frame_size old native pixels 1472x1258 new native pixels 1456x1258 old text pixels 1424x1258 new text pixels 1408x1258 old text chars 83x34 new text chars 82x34
xg_frame_resized old native pixels 1456x1258 new native pixels 1440x1258
adjust_frame_size old native pixels 1456x1258 new native pixels 1440x1258 old text pixels 1408x1258 new text pixels 1392x1258 old text chars 82x34 new text chars 81x34
xg_frame_resized old native pixels 1440x1258 new native pixels 1424x1258
adjust_frame_size old native pixels 1440x1258 new native pixels 1424x1258 old text pixels 1392x1258 new text pixels 1376x1258 old text chars 81x34 new text chars 80x34
xg_frame_resized old native pixels 1424x1258 new native pixels 1408x1258
adjust_frame_size old native pixels 1424x1258 new native pixels 1408x1258 old text pixels 1376x1258 new text pixels 1360x1258 old text chars 80x34 new text chars 80x34
xg_frame_resized old native pixels 1408x1258 new native pixels 1392x1258
adjust_frame_size old native pixels 1408x1258 new native pixels 1392x1258 old text pixels 1360x1258 new text pixels 1344x1258 old text chars 80x34 new text chars 79x34
xg_frame_resized old native pixels 1392x1258 new native pixels 1376x1258
adjust_frame_size old native pixels 1392x1258 new native pixels 1376x1258 old text pixels 1344x1258 new text pixels 1328x1258 old text chars 79x34 new text chars 78x34
xg_frame_resized old native pixels 1376x1258 new native pixels 1360x1258
adjust_frame_size old native pixels 1376x1258 new native pixels 1360x1258 old text pixels 1328x1258 new text pixels 1312x1258 old text chars 78x34 new text chars 77x34
xg_frame_resized old native pixels 1360x1258 new native pixels 1344x1258
adjust_frame_size old native pixels 1360x1258 new native pixels 1344x1258 old text pixels 1312x1258 new text pixels 1296x1258 old text chars 77x34 new text chars 76x34
xg_frame_resized old native pixels 1344x1258 new native pixels 1344x1294
adjust_frame_size old native pixels 1344x1258 new native pixels 1344x1294 old text pixels 1296x1258 new text pixels 1296x1294 old text chars 76x34 new text chars 76x34
xg_frame_resized old native pixels 1344x1294 new native pixels 1344x1330
adjust_frame_size old native pixels 1344x1294 new native pixels 1344x1330 old text pixels 1296x1294 new text pixels 1296x1330 old text chars 76x34 new text chars 76x35
x_new_font old char size 17x37 new char size 17x37 text chars 76x35 old text pixels 1296x1330 new text pixels 1292x1295
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 646 base width 38 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 647 base height 101 height inc 18
xg_frame_set_char_size old native pixels 1344x1330 new native pixels 1340x1295 outer pixels 670x713 outer rest 0x0
xg_frame_resized old native pixels 1344x1330 new native pixels 1340x1294
adjust_frame_size old native pixels 1344x1330 new native pixels 1340x1294 old text pixels 1296x1330 new text pixels 1292x1294 old text chars 76x35 new text chars 76x34
x_new_font old char size 17x37 new char size 17x37 text chars 76x34 old text pixels 1292x1294 new text pixels 1292x1258
xg_frame_set_char_size old native pixels 1340x1294 new native pixels 1340x1258 outer pixels 670x695 outer rest 0x0
xg_frame_resized old native pixels 1340x1294 new native pixels 1340x1258
adjust_frame_size old native pixels 1340x1294 new native pixels 1340x1258 old text pixels 1292x1294 new text pixels 1292x1258 old text chars 76x34 new text chars 76x34
xg_frame_resized old native pixels 1340x1258 new native pixels 1340x1222
adjust_frame_size old native pixels 1340x1258 new native pixels 1340x1222 old text pixels 1292x1258 new text pixels 1292x1222 old text chars 76x34 new text chars 76x33
xg_frame_resized old native pixels 1340x1222 new native pixels 1324x1258
adjust_frame_size old native pixels 1340x1222 new native pixels 1324x1258 old text pixels 1292x1222 new text pixels 1276x1258 old text chars 76x33 new text chars 75x34
xg_frame_resized old native pixels 1324x1258 new native pixels 1340x1258
adjust_frame_size old native pixels 1324x1258 new native pixels 1340x1258 old text pixels 1276x1258 new text pixels 1292x1258 old text chars 75x34 new text chars 76x34
xg_frame_resized old native pixels 1340x1258 new native pixels 1340x1294
adjust_frame_size old native pixels 1340x1258 new native pixels 1340x1294 old text pixels 1292x1258 new text pixels 1292x1294 old text chars 76x34 new text chars 76x34
xg_frame_resized old native pixels 1340x1294 new native pixels 1340x1330
adjust_frame_size old native pixels 1340x1294 new native pixels 1340x1330 old text pixels 1292x1294 new text pixels 1292x1330 old text chars 76x34 new text chars 76x35
xg_frame_resized old native pixels 1340x1330 new native pixels 1356x1330
adjust_frame_size old native pixels 1340x1330 new native pixels 1356x1330 old text pixels 1292x1330 new text pixels 1308x1330 old text chars 76x35 new text chars 76x35
x_new_font old char size 17x37 new char size 17x37 text chars 76x35 old text pixels 1308x1330 new text pixels 1292x1295
xg_frame_set_char_size old native pixels 1356x1330 new native pixels 1340x1295 outer pixels 670x713 outer rest 0x0
xg_frame_resized old native pixels 1356x1330 new native pixels 1340x1294
adjust_frame_size old native pixels 1356x1330 new native pixels 1340x1294 old text pixels 1308x1330 new text pixels 1292x1294 old text chars 76x35 new text chars 76x34
x_new_font old char size 17x37 new char size 17x37 text chars 76x34 old text pixels 1292x1294 new text pixels 1292x1258
xg_frame_set_char_size old native pixels 1340x1294 new native pixels 1340x1258 outer pixels 670x695 outer rest 0x0
xg_frame_resized old native pixels 1340x1294 new native pixels 1340x1258
adjust_frame_size old native pixels 1340x1294 new native pixels 1340x1258 old text pixels 1292x1294 new text pixels 1292x1258 old text chars 76x34 new text chars 76x34
xg_frame_resized old native pixels 1340x1258 new native pixels 1356x1258
adjust_frame_size old native pixels 1340x1258 new native pixels 1356x1258 old text pixels 1292x1258 new text pixels 1308x1258 old text chars 76x34 new text chars 76x34
xg_frame_resized old native pixels 1356x1258 new native pixels 1468x1258
adjust_frame_size old native pixels 1356x1258 new native pixels 1468x1258 old text pixels 1308x1258 new text pixels 1420x1258 old text chars 76x34 new text chars 83x34
xg_frame_resized old native pixels 1468x1258 new native pixels 1580x1258
adjust_frame_size old native pixels 1468x1258 new native pixels 1580x1258 old text pixels 1420x1258 new text pixels 1532x1258 old text chars 83x34 new text chars 90x34
xg_frame_resized old native pixels 1580x1258 new native pixels 1628x1258
adjust_frame_size old native pixels 1580x1258 new native pixels 1628x1258 old text pixels 1532x1258 new text pixels 1580x1258 old text chars 90x34 new text chars 92x34
xg_frame_resized old native pixels 1628x1258 new native pixels 1740x1294
adjust_frame_size old native pixels 1628x1258 new native pixels 1740x1294 old text pixels 1580x1258 new text pixels 1692x1294 old text chars 92x34 new text chars 99x34
xg_frame_resized old native pixels 1740x1294 new native pixels 1852x1294
adjust_frame_size old native pixels 1740x1294 new native pixels 1852x1294 old text pixels 1692x1294 new text pixels 1804x1294 old text chars 99x34 new text chars 106x34
xg_frame_resized old native pixels 1852x1294 new native pixels 1948x1294
adjust_frame_size old native pixels 1852x1294 new native pixels 1948x1294 old text pixels 1804x1294 new text pixels 1900x1294 old text chars 106x34 new text chars 111x34
xg_frame_resized old native pixels 1948x1294 new native pixels 1980x1294
adjust_frame_size old native pixels 1948x1294 new native pixels 1980x1294 old text pixels 1900x1294 new text pixels 1932x1294 old text chars 111x34 new text chars 113x34
xg_frame_resized old native pixels 1980x1294 new native pixels 1964x1294
adjust_frame_size old native pixels 1980x1294 new native pixels 1964x1294 old text pixels 1932x1294 new text pixels 1916x1294 old text chars 113x34 new text chars 112x34
xg_frame_resized old native pixels 1964x1294 new native pixels 1964x1258
adjust_frame_size old native pixels 1964x1294 new native pixels 1964x1258 old text pixels 1916x1294 new text pixels 1916x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1964x1258 new native pixels 1948x1258
adjust_frame_size old native pixels 1964x1258 new native pixels 1948x1258 old text pixels 1916x1258 new text pixels 1900x1258 old text chars 112x34 new text chars 111x34
xg_frame_resized old native pixels 1948x1258 new native pixels 1932x1258
adjust_frame_size old native pixels 1948x1258 new native pixels 1932x1258 old text pixels 1900x1258 new text pixels 1884x1258 old text chars 111x34 new text chars 110x34
xg_frame_resized old native pixels 1932x1258 new native pixels 1916x1258
adjust_frame_size old native pixels 1932x1258 new native pixels 1916x1258 old text pixels 1884x1258 new text pixels 1868x1258 old text chars 110x34 new text chars 109x34
xg_frame_resized old native pixels 1916x1258 new native pixels 1932x1258
adjust_frame_size old native pixels 1916x1258 new native pixels 1932x1258 old text pixels 1868x1258 new text pixels 1884x1258 old text chars 109x34 new text chars 110x34
xg_frame_resized old native pixels 1932x1258 new native pixels 1932x1294
adjust_frame_size old native pixels 1932x1258 new native pixels 1932x1294 old text pixels 1884x1258 new text pixels 1884x1294 old text chars 110x34 new text chars 110x34
xg_frame_resized old native pixels 1932x1294 new native pixels 1948x1294
adjust_frame_size old native pixels 1932x1294 new native pixels 1948x1294 old text pixels 1884x1294 new text pixels 1900x1294 old text chars 110x34 new text chars 111x34
xg_frame_resized old native pixels 1948x1294 new native pixels 1964x1294
adjust_frame_size old native pixels 1948x1294 new native pixels 1964x1294 old text pixels 1900x1294 new text pixels 1916x1294 old text chars 111x34 new text chars 112x34
xg_frame_resized old native pixels 1964x1294 new native pixels 1964x1258
adjust_frame_size old native pixels 1964x1294 new native pixels 1964x1258 old text pixels 1916x1294 new text pixels 1916x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1964x1258 new native pixels 1964x1294
adjust_frame_size old native pixels 1964x1258 new native pixels 1964x1294 old text pixels 1916x1258 new text pixels 1916x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1964x1294 new native pixels 1964x1330
adjust_frame_size old native pixels 1964x1294 new native pixels 1964x1330 old text pixels 1916x1294 new text pixels 1916x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1916x1330 new text pixels 1904x1295
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 952 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 647 base height 101 height inc 18
xg_frame_set_char_size old native pixels 1964x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1964x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1964x1330 new native pixels 1952x1294 old text pixels 1916x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1222
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1222 old text pixels 1904x1258 new text pixels 1904x1222 old text chars 112x34 new text chars 112x33
xg_frame_resized old native pixels 1952x1222 new native pixels 1936x1258
adjust_frame_size old native pixels 1952x1222 new native pixels 1936x1258 old text pixels 1904x1222 new text pixels 1888x1258 old text chars 112x33 new text chars 111x34
xg_frame_resized old native pixels 1936x1258 new native pixels 1952x1258
adjust_frame_size old native pixels 1936x1258 new native pixels 1952x1258 old text pixels 1888x1258 new text pixels 1904x1258 old text chars 111x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-25 4:20 ` Dmitry Gutov
@ 2023-01-26 15:44 ` martin rudalics
2023-01-27 3:07 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-26 15:44 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]
> It seems to have a different effect: the last version at least has one size where s-f-a changes the height by 2 line heights.
>
> See this transcript where at the end (and multiple times before that) change the frame to 118x35 (per GNOME) which is 112x35 internally, and s-f-a changes the height to 33 (per GNOME) which is 34 internally.
I suppose you're talking about this part:
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
And what you probably mean here is that you've seen the GNOME window
show 118x35, then you did 'set-face-attribute' and after that the GNOME
window showed 118x33. The explanation is probably that GNOME shows the
N from the
frame_height = base_height + N * height_inc
calculation and after 'set-face-attribute' already removed one line,
increasing base_height to make the equation hold removed another one.
I attach a patch where I try to mimic in *foo*, after a text "WM hint",
what a WM would typically show there. Please switch to *foo* right away
and, while you drag a border, check whether the numbers are the same
GNOME displays. If so, please show me again the transcript of the
above. (118 vs 112 looks slightly preposterous BTW - it would mean that
scroll bar and fringes are six characters wide. Here both width and
height differ by 1 only.)
martin
[-- Attachment #2: x_rest.diff --]
[-- Type: text/x-patch, Size: 35470 bytes --]
diff --git a/lisp/window.el b/lisp/window.el
index a11293d372..706c988b2e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -10596,6 +10596,21 @@ window-prefix-map
"0" #'delete-windows-on)
(define-key ctl-x-map "w" window-prefix-map)
+(defun foo-it (&rest rest)
+ (with-current-buffer (get-buffer-create "*foo*")
+ (goto-char (point-max))
+ (when rest
+ (if (consp (car rest))
+ (insert (format "%sx%s" (caar rest) (cdar rest)))
+ (insert (format "%s" (car rest))))
+ (setq rest (cdr rest))
+ (while rest
+ (if (consp (car rest))
+ (insert (format " %sx%s" (caar rest) (cdar rest)))
+ (insert (format " %s" (car rest))))
+ (setq rest (cdr rest)))
+ (insert "\n"))))
+
(provide 'window)
;;; window.el ends here
diff --git a/src/frame.c b/src/frame.c
index b57b296be5..f000540ce1 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -906,6 +906,64 @@ adjust_frame_size (struct frame *f, int new_text_width, int new_text_height,
unblock_input ();
+ if (old_native_width != new_native_width
+ || old_native_height != new_native_height
+ || old_text_width != new_text_width
+ || old_text_height != new_text_height
+ || old_text_cols != new_text_cols
+ || old_text_lines != new_text_lines)
+ CALLN (Ffuncall, Qfoo_it, intern ("adjust_frame_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (old_native_width),
+ make_fixnum (old_native_height)),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (new_native_width),
+ make_fixnum (new_native_height)),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (old_text_width),
+ make_fixnum (old_text_height)),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (new_text_width),
+ make_fixnum (new_text_height)),
+ intern ("old text chars"),
+ Fcons (make_fixnum (old_text_cols),
+ make_fixnum (old_text_lines)),
+ intern ("new text chars"),
+ Fcons (make_fixnum (new_text_cols),
+ make_fixnum (new_text_lines)));
+
+#ifdef USE_GTK
+ if (f->resized_once_p)
+ {
+ int outer_height
+ = FRAME_PIXEL_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f);
+ int outer_width = FRAME_PIXEL_WIDTH (f) + FRAME_TOOLBAR_WIDTH (f);
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.x->size_hints;
+
+ outer_height /= scale;
+ outer_width /= scale;
+
+ if (outer_width > 0 && size_hints.base_width > 0
+ && size_hints.width_inc > 0 && outer_height > 0
+ && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ {
+ CALLN (Ffuncall, Qfoo_it,
+ intern (" base_size"),
+ Fcons (make_fixnum (size_hints.base_width),
+ make_fixnum (size_hints.base_height)),
+ intern ("size increments"),
+ Fcons (make_fixnum (size_hints.width_inc),
+ make_fixnum (size_hints.height_inc)),
+ intern ("WM hint"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width)
+ / size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height)
+ / size_hints.height_inc)));
+ }
+ }
+#endif
+
#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
diff --git a/src/frame.h b/src/frame.h
index d6fd62b2ac..724b652eec 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -265,6 +265,8 @@ #define EMACS_FRAME_H
changed. Clear the frame in clear_garbaged_frames if set. */
bool_bf resized_p : 1;
+ bool_bf resized_once_p : 1;
+
/* Set to true if the default face for the frame has been
realized. Reset to zero whenever the default face changes.
Used to see the difference between a font change and face change. */
diff --git a/src/gtkutil.c b/src/gtkutil.c
index a6bba096a4..8946636f0b 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1149,6 +1149,14 @@ xg_frame_resized (struct frame *f, int width, int height)
f->new_size_p ? f->new_height : -1);
FRAME_RIF (f)->clear_under_internal_border (f);
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_resized"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)));
+
change_frame_size (f, width, height, false, true, false);
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
@@ -1174,6 +1182,8 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
int outer_width = width + FRAME_TOOLBAR_WIDTH (f);
bool was_visible = false;
bool hide_child_frame;
+ int scale = xg_get_scale (f);
+ GdkGeometry size_hints = f->output_data.xp->size_hints;
#ifndef HAVE_PGTK
gtk_window_get_size (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
@@ -1196,10 +1206,42 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
/* Do this before resize, as we don't know yet if we will be resized. */
FRAME_RIF (f)->clear_under_internal_border (f);
- outer_height /= xg_get_scale (f);
- outer_width /= xg_get_scale (f);
+ if (scale != 1 && !frame_resize_pixelwise
+ /* Don't bother the WM when the number of text columns or text
+ lines wouldn't change and only the pixel sizes would. But make
+ sure first that these sizes are "out of synch" due to a
+ preceding "imprecise by scaling" operation like a mouse drag.
+ Otherwise, we might end up with a frame that doesn't get a
+ suitable initial size. */
+ && (FRAME_PIXEL_TO_TEXT_WIDTH (f, width) / FRAME_COLS (f)
+ == FRAME_TEXT_WIDTH (f) / FRAME_COLS (f))
+ && FRAME_TEXT_WIDTH (f) != FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)
+ && (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height) / FRAME_LINES (f)
+ == FRAME_TEXT_HEIGHT (f) / FRAME_LINES (f))
+ && FRAME_TEXT_HEIGHT (f) != FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size_return"),
+ intern ("char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text columns/lines"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("pixels to text width/height"),
+ Fcons (make_fixnum (FRAME_PIXEL_TO_TEXT_WIDTH (f, width)),
+ make_fixnum (FRAME_PIXEL_TO_TEXT_HEIGHT (f, height))),
+ intern ("text width/height"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))));
+
+ return;
+ }
- xg_wm_set_size_hint (f, 0, 0);
+ outer_height /= scale;
+ outer_width /= scale;
+
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
/* Resize the top level widget so rows and columns remain constant.
@@ -1317,6 +1359,50 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
+ f->resized_once_p = true;
+
+ size_hints = f->output_data.xp->size_hints;
+ if (outer_width > 0 && size_hints.base_width > 0
+ && size_hints.width_inc > 0 && outer_height > 0
+ && size_hints.base_height > 0 && size_hints.height_inc > 0)
+ {
+
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)),
+ intern ("outer rest"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width)
+ % size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height)
+ % size_hints.height_inc)));
+ CALLN (Ffuncall, Qfoo_it,
+ intern (" base_size"),
+ Fcons (make_fixnum (size_hints.base_width),
+ make_fixnum (size_hints.base_height)),
+ intern ("size increments"),
+ Fcons (make_fixnum (size_hints.width_inc),
+ make_fixnum (size_hints.height_inc)),
+ intern ("WM hint"),
+ Fcons (make_fixnum ((outer_width - size_hints.base_width)
+ / size_hints.width_inc),
+ make_fixnum ((outer_height - size_hints.base_height)
+ / size_hints.height_inc)));
+ }
+ else
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_frame_set_char_size"),
+ intern ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ intern ("new native pixels"),
+ Fcons (make_fixnum (width), make_fixnum (height)),
+ intern ("outer pixels"),
+ Fcons (make_fixnum (outer_width), make_fixnum (outer_height)));
+
/* We can not call change_frame_size for a mapped frame,
we can not set pixel width/height either. The window manager may
override our resize request, XMonad does this all the time.
@@ -1360,21 +1446,6 @@ xg_frame_set_char_size (struct frame *f, int width, int height)
}
}
-/* Handle height/width changes (i.e. add/remove/move menu/toolbar).
- The policy is to keep the number of editable lines. */
-
-#if 0
-static void
-xg_height_or_width_changed (struct frame *f)
-{
- gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- FRAME_TOTAL_PIXEL_WIDTH (f),
- FRAME_TOTAL_PIXEL_HEIGHT (f));
- f->output_data.xp->hint_flags = 0;
- x_wm_set_size_hint (f, 0, 0);
-}
-#endif
-
#ifndef HAVE_PGTK
/* Convert an X Window WSESC on display DPY to its corresponding GtkWidget.
Must be done like this, because GtkWidget:s can have "hidden"
@@ -1917,7 +1988,8 @@ xg_free_frame_widgets (struct frame *f)
flag (this is useful when FLAGS is 0). */
void
-xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
+xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position,
+ int text_width, int text_height)
{
/* Must use GTK routines here, otherwise GTK resets the size hints
to its own defaults. */
@@ -1964,21 +2036,33 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags = f->output_data.xp->hint_flags;
hint_flags |= GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE;
- size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
- size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ size_hints.width_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_COLUMN_WIDTH (f) / scale);
+ size_hints.height_inc
+ = frame_resize_pixelwise ? 1 : (FRAME_LINE_HEIGHT (f) / scale);
hint_flags |= GDK_HINT_BASE_SIZE;
/* Use one row/col here so base_height/width does not become zero.
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1) + FRAME_TOOLBAR_WIDTH (f);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
- + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
+ base_width = ((FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + FRAME_TOOLBAR_WIDTH (f)) / scale);
+ base_height = ((FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
+ / scale);
+
+ if (text_width < 0)
+ text_width = FRAME_TEXT_WIDTH (f);
+ text_width /= scale;
+
+ if (text_height < 0)
+ text_height = FRAME_TEXT_HEIGHT (f);
+ text_height /= scale;
- size_hints.base_width = base_width;
- size_hints.base_height = base_height;
- size_hints.min_width = base_width;
- size_hints.min_height = base_height;
+ size_hints.base_width = base_width + (text_width % size_hints.width_inc);
+ size_hints.base_height = base_height + (text_height % size_hints.height_inc);
+ size_hints.min_width = size_hints.base_width;
+ size_hints.min_height = size_hints.base_height;
/* These currently have a one to one mapping with the X values, but I
don't think we should rely on that. */
@@ -2018,16 +2102,31 @@ xg_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
hint_flags |= GDK_HINT_USER_POS;
}
- size_hints.base_width /= scale;
- size_hints.base_height /= scale;
- size_hints.width_inc /= scale;
- size_hints.height_inc /= scale;
-
if (hint_flags != f->output_data.xp->hint_flags
|| memcmp (&size_hints,
&f->output_data.xp->size_hints,
sizeof (size_hints)) != 0)
{
+ CALLN (Ffuncall, Qfoo_it, intern ("xg_wm_set_size_hint"),
+ intern ("scale"), make_fixnum (scale),
+ intern ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_WIDTH (f)),
+ intern ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ intern ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text width"), make_fixnum (text_width),
+ intern ("base width"), make_fixnum (size_hints.base_width),
+ intern ("width inc"), make_fixnum (size_hints.width_inc));
+ CALLN (Ffuncall, Qfoo_it, intern (" "),
+ intern ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ intern ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ intern ("toolbar"), make_fixnum (FRAME_TOOLBAR_HEIGHT (f)),
+ intern ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ intern ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ intern ("text height"), make_fixnum (text_height),
+ intern ("base height"), make_fixnum (size_hints.base_height),
+ intern ("height inc"), make_fixnum (size_hints.height_inc));
+
block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 190d662831..21245dde5f 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -153,7 +153,7 @@ #define XG_ITEM_DATA "emacs_menuitem"
extern int xg_get_default_scrollbar_width (struct frame *f);
extern int xg_get_default_scrollbar_height (struct frame *f);
-extern void xg_wm_set_size_hint (struct frame *, long int, bool);
+extern void xg_wm_set_size_hint (struct frame *, long int, bool, int, int);
extern void update_frame_tool_bar (struct frame *f);
extern void free_frame_tool_bar (struct frame *f);
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index a32067af81..a391541e10 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1662,7 +1662,8 @@ #define INSTALL_CURSOR(FIELD, NAME) \
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- xg_wm_set_size_hint (f, window_prompting, false);
+ xg_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 13f6c6c3c4..8b077be178 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -658,7 +658,7 @@ pgtk_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
pgtk_calc_absolute_position (f);
block_input ();
- xg_wm_set_size_hint (f, 0, false);
+ xg_wm_set_size_hint (f, 0, false, -1, -1);
if (change_gravity != 0)
{
@@ -705,7 +705,8 @@ pgtk_set_window_size (struct frame *f, bool change_gravity,
f->output_data.pgtk->preferred_width = pixelwidth;
f->output_data.pgtk->preferred_height = pixelheight;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (pixelwidth),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (pixelheight));
xg_frame_set_char_size (f, pixelwidth, pixelheight);
gtk_widget_queue_resize (FRAME_WIDGET (f));
@@ -993,7 +994,10 @@ pgtk_set_parent_frame (struct frame *f, Lisp_Object new_value,
fixed, TRUE, TRUE, 0);
f->output_data.pgtk->preferred_width = alloc.width;
f->output_data.pgtk->preferred_height = alloc.height;
- xg_wm_set_size_hint (f, 0, 0);
+ xg_wm_set_size_hint (f, 0, 0, FRAME_PIXEL_TO_TEXT_WIDTH (alloc.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (alloc.height));
+ /* Why convert here? xg_frame_set_char_size wants native
+ pixels. */
xg_frame_set_char_size (f, FRAME_PIXEL_TO_TEXT_WIDTH (f, alloc.width),
FRAME_PIXEL_TO_TEXT_HEIGHT (f, alloc.height));
gtk_widget_queue_resize (FRAME_WIDGET (f));
diff --git a/src/widget.c b/src/widget.c
index aaab33b6d8..7468bf63fc 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -32,6 +32,7 @@
#include "sysstdio.h"
#include "xterm.h"
#include "frame.h"
+#include "blockinput.h"
#include <X11/StringDefs.h>
#include <X11/IntrinsicP.h>
@@ -154,15 +155,6 @@ emacsFrameClass (void)
return (WidgetClass) &emacsFrameClassRec;
}
-static void
-get_default_char_pixel_size (EmacsFrame ew, int *pixel_width, int *pixel_height)
-{
- struct frame *f = ew->emacs_frame.frame;
-
- *pixel_width = FRAME_COLUMN_WIDTH (f);
- *pixel_height = FRAME_LINE_HEIGHT (f);
-}
-
static void
pixel_to_char_size (EmacsFrame ew, Dimension pixel_width,
Dimension pixel_height, int *char_width, int *char_height)
@@ -207,120 +199,97 @@ get_wm_shell (Widget w)
return (WMShellWidget) wmshell;
}
-#if 0 /* Currently not used. */
-
-static void
-mark_shell_size_user_specified (Widget wmshell)
-{
- if (! XtIsWMShell (wmshell)) emacs_abort ();
- /* This is kind of sleazy, but I can't see how else to tell it to make it
- mark the WM_SIZE_HINTS size as user specified when appropriate. */
- ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;
-}
-
-#endif
-
-
static void
set_frame_size (EmacsFrame ew)
{
- /* The widget hierarchy is
-
- argv[0] emacsShell pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
-
- We accept geometry specs in this order:
-
- *Frame-NAME.geometry
- *EmacsFrame.geometry
- Emacs.geometry
-
- Other possibilities for widget hierarchies might be
-
- argv[0] frame pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane Frame-NAME
- ApplicationShell EmacsShell Paned EmacsFrame
- or
- argv[0] Frame-NAME pane emacsTextPane
- ApplicationShell EmacsFrame Paned EmacsTextPane
-
- With the current setup, the text-display-area is the part which is
- an emacs "frame", since that's the only part managed by emacs proper
- (the menubar and the parent of the menubar and all that sort of thing
- are managed by lwlib.)
-
- The EmacsShell widget is simply a replacement for the Shell widget
- which is able to deal with using an externally-supplied window instead
- of always creating its own. It is not actually emacs specific, and
- should possibly have class "Shell" instead of "EmacsShell" to simplify
- the resources.
-
- */
-
struct frame *f = ew->emacs_frame.frame;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.height = FRAME_PIXEL_HEIGHT (f);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("set_frame_size"));
+ CALLN (Ffuncall, Qfoo_it, build_string ("set_frame_size"),
+ build_string ("native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))));
}
static bool
-update_wm_hints (WMShellWidget wmshell, EmacsFrame ew)
+update_wm_hints (WMShellWidget wmshell, EmacsFrame ew, int width, int height)
{
- int cw;
- int ch;
- Dimension rounded_width;
- Dimension rounded_height;
- int char_width;
- int char_height;
- int base_width;
- int base_height;
- char buffer[sizeof wmshell->wm.size_hints];
- char *hints_ptr;
-
- /* Copy the old size hints to the buffer. */
- memcpy (buffer, &wmshell->wm.size_hints,
- sizeof wmshell->wm.size_hints);
-
- pixel_to_char_size (ew, ew->core.width, ew->core.height,
- &char_width, &char_height);
- char_to_pixel_size (ew, char_width, char_height,
- &rounded_width, &rounded_height);
- get_default_char_pixel_size (ew, &cw, &ch);
-
- base_width = (wmshell->core.width - ew->core.width
- + (rounded_width - (char_width * cw)));
- base_height = (wmshell->core.height - ew->core.height
- + (rounded_height - (char_height * ch)));
+ struct frame *f = ew->emacs_frame.frame;
+ int char_width = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
+ int char_height = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
+ int base_width
+ = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 1)
+ + (((width < 0) ? FRAME_TEXT_WIDTH (f) : width) % char_width));
+ int base_height
+ = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1)
+ + FRAME_MENUBAR_HEIGHT (f)
+ + (((height < 0) ? FRAME_TEXT_HEIGHT (f) : height) % char_height));
+ int min_width = base_width;
+ int min_height = base_height;
+ bool value;
+
+ int old_base_width, old_base_height;
+ int old_char_width, old_char_height;
+ int old_min_width, old_min_height;
+
+ block_input ();
+ XtVaGetValues ((Widget) wmshell,
+ XtNbaseWidth, &old_base_width,
+ XtNbaseHeight, &old_base_height,
+ XtNwidthInc, &old_char_width,
+ XtNheightInc, &old_char_height,
+ XtNminWidth, &old_min_width,
+ XtNminHeight, &old_min_height,
+ NULL);
+ unblock_input ();
XtVaSetValues ((Widget) wmshell,
XtNbaseWidth, (XtArgVal) base_width,
XtNbaseHeight, (XtArgVal) base_height,
- XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw),
- XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch),
- XtNminWidth, (XtArgVal) base_width,
- XtNminHeight, (XtArgVal) base_height,
+ XtNwidthInc, (XtArgVal) char_width,
+ XtNheightInc, (XtArgVal) char_height,
+ XtNminWidth, (XtArgVal) min_width,
+ XtNminHeight, (XtArgVal) min_height,
NULL);
- /* Return if size hints really changed. If they did not, then Xt
- probably didn't set them either (or take the flags into
- account.) */
- hints_ptr = (char *) &wmshell->wm.size_hints;
+ value = (base_width != old_base_width || base_height != old_base_height
+ || char_width != old_char_width || char_height != old_char_height
+ || min_width != old_min_width || min_height != old_min_height);
- /* Skip flags, which is unsigned long. */
- return memcmp (hints_ptr + sizeof (long), buffer + sizeof (long),
- sizeof wmshell->wm.wm_hints - sizeof (long));
+ if (value)
+ {
+ CALLN (Ffuncall, Qfoo_it, build_string ("update_wm_hints"),
+ build_string ("char width"), make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ build_string ("old char width"), make_fixnum (old_char_width),
+ build_string ("vscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (f)),
+ build_string ("fringes"), make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base width"), make_fixnum (base_width),
+ build_string ("old_base width"), make_fixnum (old_base_width),
+ build_string ("min width"), make_fixnum (min_width),
+ build_string ("old min width"), make_fixnum (old_min_width));
+ CALLN (Ffuncall, Qfoo_it, build_string (" "),
+ build_string ("char height"), make_fixnum (FRAME_LINE_HEIGHT (f)),
+ build_string ("old char height"), make_fixnum (old_char_height),
+ build_string ("menubar"), make_fixnum (FRAME_MENUBAR_HEIGHT (f)),
+ build_string ("hscroll"), make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ build_string ("borders"), make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f)),
+ build_string ("base height"), make_fixnum (base_height),
+ build_string ("old base height"), make_fixnum (old_base_height),
+ build_string ("min height"), make_fixnum (min_height),
+ build_string ("old min height"), make_fixnum (old_min_height));
+ }
+
+ return value;
}
bool
-widget_update_wm_size_hints (Widget widget, Widget frame)
+widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height)
{
- return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame);
+ return update_wm_hints ((WMShellWidget) widget, (EmacsFrame) frame,
+ width, height);
}
static void
@@ -337,7 +306,7 @@ update_from_various_frame_slots (EmacsFrame ew)
struct frame *f = ew->emacs_frame.frame;
struct x_output *x = f->output_data.x;
- ew->core.height = FRAME_PIXEL_HEIGHT (f) - x->menubar_height;
+ ew->core.height = FRAME_PIXEL_HEIGHT (f); // - x->menubar_height;
ew->core.width = FRAME_PIXEL_WIDTH (f);
ew->core.background_pixel = FRAME_BACKGROUND_PIXEL (f);
ew->emacs_frame.internal_border_width = f->internal_border_width;
@@ -345,12 +314,11 @@ update_from_various_frame_slots (EmacsFrame ew)
ew->emacs_frame.cursor_color = x->cursor_pixel;
ew->core.border_pixel = x->border_pixel;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("update_from_various_frame_slots"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ CALLN (Ffuncall, Qfoo_it,
+ build_string ("update_from_various_frame_slots"),
+ build_string ("native pixels"),
+ (Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f)))));
}
static void
@@ -384,7 +352,6 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
XSetWindowAttributes *attrs)
{
EmacsFrame ew = (EmacsFrame) widget;
- struct frame *f = ew->emacs_frame.frame;
/* This used to contain SubstructureRedirectMask, but this turns out
to be a problem with XIM on Solaris, and events from that mask
@@ -399,12 +366,8 @@ EmacsFrameRealize (Widget widget, XtValueMask *mask,
make sure we get them all. Seen with xfcwm4 for example. */
XtAddRawEventHandler (widget, StructureNotifyMask, False, resize_cb, NULL);
- if (CONSP (frame_size_history))
- frame_size_history_plain
- (f, build_string ("EmacsFrameRealize"));
-
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew, -1, -1);
}
static void
@@ -419,18 +382,23 @@ EmacsFrameResize (Widget widget)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameResize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- ew->core.width, ew->core.height,
- f->new_width, f->new_height);
+ if (FRAME_PIXEL_WIDTH (f) != ew->core.width
+ || FRAME_PIXEL_HEIGHT (f) != ew->core.height)
+ CALLN (Ffuncall, Qfoo_it, build_string ("EmacsFrameResize"),
+ build_string ("old native pixels"),
+ Fcons (make_fixnum (FRAME_PIXEL_WIDTH (f)),
+ make_fixnum (FRAME_PIXEL_HEIGHT (f))),
+ build_string ("new native pixels"),
+ Fcons (make_fixnum (ew->core.width),
+ make_fixnum (ew->core.height)));
change_frame_size (f, ew->core.width, ew->core.height,
false, true, false);
if (get_wm_shell (widget))
- update_wm_hints (get_wm_shell (widget), ew);
+ update_wm_hints (get_wm_shell (widget), ew,
+ FRAME_PIXEL_TO_TEXT_WIDTH (f, ew->core.width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, ew->core.height));
update_various_frame_slots (ew);
cancel_mouse_face (f);
@@ -472,13 +440,6 @@ EmacsFrameSetCharSize (Widget widget, int columns, int rows)
EmacsFrame ew = (EmacsFrame) widget;
struct frame *f = ew->emacs_frame.frame;
- if (CONSP (frame_size_history))
- frame_size_history_extra
- (f, build_string ("EmacsFrameSetCharSize"),
- FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f),
- columns, rows,
- f->new_width, f->new_height);
-
if (!frame_inhibit_resize (f, 0, Qfont)
&& !frame_inhibit_resize (f, 1, Qfont))
x_set_window_size (f, 0, columns * FRAME_COLUMN_WIDTH (f),
diff --git a/src/widget.h b/src/widget.h
index cf83cb1078..03bc809c41 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -97,6 +97,6 @@ #define XtCInitialGeometry "InitialGeometry"
/* Special entry points */
void EmacsFrameSetCharSize (Widget, int, int);
void widget_store_internal_border (Widget widget);
-bool widget_update_wm_size_hints (Widget widget, Widget frame);
+bool widget_update_wm_size_hints (Widget widget, Widget frame, int width, int height);
#endif /* _EmacsFrame_h */
diff --git a/src/window.c b/src/window.c
index f116b9a9d7..c090f29461 100644
--- a/src/window.c
+++ b/src/window.c
@@ -8394,6 +8394,7 @@ syms_of_window (void)
DEFSYM (Qheader_line_format, "header-line-format");
DEFSYM (Qtab_line_format, "tab-line-format");
DEFSYM (Qno_other_window, "no-other-window");
+ DEFSYM (Qfoo_it, "foo-it");
DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function,
doc: /* Non-nil means call as function to display a help buffer.
diff --git a/src/xfns.c b/src/xfns.c
index 36b51a3011..25e1af279d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -4575,7 +4575,7 @@ DEFUN ("x-wm-set-size-hint", Fx_wm_set_size_hint, Sx_wm_set_size_hint,
struct frame *f = decode_window_system_frame (frame);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
unblock_input ();
return Qnil;
}
@@ -5097,7 +5097,8 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
badly we want them. This should be done after we have the menu
bar so that its size can be taken into account. */
block_input ();
- x_wm_set_size_hint (f, window_prompting, false);
+ x_wm_set_size_hint (f, window_prompting, false,
+ FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f));
unblock_input ();
adjust_frame_size (f, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
diff --git a/src/xterm.c b/src/xterm.c
index 7eaf59d54b..b1d65ce59d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -26160,6 +26160,8 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
{
struct font *font = XFONT_OBJECT (font_object);
int unit, font_ascent, font_descent;
+ int old_width = FRAME_COLUMN_WIDTH (f);
+ int old_height = FRAME_LINE_HEIGHT (f);
if (fontset < 0)
fontset = fontset_from_font (font_object);
@@ -26197,9 +26199,27 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
because it's done in Fx_show_tip, and it leads to problems because
the tip frame has no widget. */
if (FRAME_X_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f))
- adjust_frame_size
- (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
- FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ {
+ CALLN (Ffuncall, Qfoo_it, intern ("\nx_new_font"),
+ intern ("old char size"),
+ Fcons (make_fixnum (old_width), make_fixnum (old_height)),
+ intern ("new char size"),
+ Fcons (make_fixnum (FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINE_HEIGHT (f))),
+ intern ("text chars"),
+ Fcons (make_fixnum (FRAME_COLS (f)),
+ make_fixnum (FRAME_LINES (f))),
+ intern ("old text pixels"),
+ Fcons (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f))),
+ intern ("new text pixels"),
+ Fcons (make_fixnum (FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f)),
+ make_fixnum (FRAME_LINES (f) * FRAME_LINE_HEIGHT (f))));
+
+ adjust_frame_size
+ (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+ FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont);
+ }
#ifdef HAVE_X_I18N
if (FRAME_XIC (f)
@@ -26589,7 +26609,7 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_gravity)
x_calc_absolute_position (f);
block_input ();
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
#ifdef USE_GTK
if (x_gtk_use_window_move)
@@ -27279,7 +27299,7 @@ x_check_fullscreen (struct frame *f)
emacs_abort ();
}
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, -1, -1);
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height);
@@ -27453,7 +27473,8 @@ x_set_window_size_1 (struct frame *f, bool change_gravity,
{
if (change_gravity)
f->win_gravity = NorthWestGravity;
- x_wm_set_size_hint (f, 0, false);
+ x_wm_set_size_hint (f, 0, false, FRAME_PIXEL_TO_TEXT_WIDTH (f, width),
+ FRAME_PIXEL_TO_TEXT_HEIGHT (f, height));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
width, height + FRAME_MENUBAR_HEIGHT (f));
@@ -28243,7 +28264,7 @@ x_make_frame_invisible (struct frame *f)
program-specified, so that when the window is mapped again, it will be
placed at the same location, without forcing the user to position it
by hand again (they have already done that once for this window.) */
- x_wm_set_size_hint (f, 0, true);
+ x_wm_set_size_hint (f, 0, true, -1, -1);
#ifdef USE_GTK
if (FRAME_GTK_OUTER_WIDGET (f))
@@ -28896,7 +28917,8 @@ x_embed_frame (struct x_display_info *dpyinfo, struct frame *f)
The GTK version is in gtkutils.c. */
void
-x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
+x_wm_set_size_hint (struct frame *f, long flags, bool user_position,
+ int width, int height)
{
#ifndef USE_GTK
XSizeHints size_hints;
@@ -28935,10 +28957,12 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
#ifndef USE_MOTIF
hints_changed
= widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
#else
widget_update_wm_size_hints (f->output_data.x->widget,
- f->output_data.x->edit_widget);
+ f->output_data.x->edit_widget,
+ width, height);
/* Do this all over again for the benefit of Motif, which always
knows better than the programmer. */
@@ -29012,8 +29036,16 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
{
int base_width, base_height;
- base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
- base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0);
+ if (width == -1)
+ width = FRAME_TEXT_WIDTH (f);
+
+ if (height == -1)
+ height = FRAME_TEXT_HEIGHT (f);
+
+ base_width = (FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0)
+ + width % FRAME_COLUMN_WIDTH (f));
+ base_height = (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0)
+ + height % FRAME_LINE_HEIGHT (f));
/* The window manager uses the base width hints to calculate the
current number of rows and columns in the frame while
@@ -29075,7 +29107,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
#else
- xg_wm_set_size_hint (f, flags, user_position);
+ xg_wm_set_size_hint (f, flags, user_position, width, height);
#endif /* USE_GTK */
}
diff --git a/src/xterm.h b/src/xterm.h
index ee429e9c68..61512f1117 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1653,7 +1653,7 @@ #define SELECTION_EVENT_TIME(eventp) \
extern void x_make_frame_invisible (struct frame *);
extern void x_iconify_frame (struct frame *);
extern void x_free_frame_resources (struct frame *);
-extern void x_wm_set_size_hint (struct frame *, long, bool);
+extern void x_wm_set_size_hint (struct frame *, long, bool, int, int);
#if defined HAVE_XSYNCTRIGGERFENCE && !defined USE_GTK \
&& defined HAVE_CLOCK_GETTIME
extern void x_sync_init_fences (struct frame *);
^ permalink raw reply related [flat|nested] 169+ messages in thread
* 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
2023-01-26 15:44 ` martin rudalics
@ 2023-01-27 3:07 ` Dmitry Gutov
2023-01-27 9:35 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-27 3:07 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 786 bytes --]
On 26/01/2023 17:44, martin rudalics wrote:
> I attach a patch where I try to mimic in *foo*, after a text "WM hint",
> what a WM would typically show there. Please switch to *foo* right away
> and, while you drag a border, check whether the numbers are the same
> GNOME displays.
They always do, as far as I checked. Multiple times, with different fonts.
> If so, please show me again the transcript of the
> above.
Please see attached.
> (118 vs 112 looks slightly preposterous BTW - it would mean that
> scroll bar and fringes are six characters wide. Here both width and
> height differ by 1 only.)
They're definitely not that. I would roughly estimate that the scroll
bar plus the right fringe are about 2-3 characters wide. And the left
fringe is about 1/2 a character.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 22251 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text height 648 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
base_size 33x84 size increments 9x18 WM hint 79x35
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x0
base_size 34x106 size increments 10x22 WM hint 83x35
xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36
base_size 34x106 size increments 10x22 WM hint 83x35
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1728x1620 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
base_size 32x84 size increments 8x18 WM hint 84x36
xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
base_size 32x84 size increments 8x18 WM hint 84x36
xg_frame_resized old native pixels 1408x1332 new native pixels 1424x1332
adjust_frame_size old native pixels 1408x1332 new native pixels 1424x1332 old text pixels 1360x1332 new text pixels 1376x1332 old text chars 80x36 new text chars 80x36
base_size 32x84 size increments 8x18 WM hint 85x36
xg_frame_resized old native pixels 1424x1332 new native pixels 1472x1368
adjust_frame_size old native pixels 1424x1332 new native pixels 1472x1368 old text pixels 1376x1332 new text pixels 1424x1368 old text chars 80x36 new text chars 83x36
base_size 32x84 size increments 8x18 WM hint 88x37
xg_frame_resized old native pixels 1472x1368 new native pixels 1568x1404
adjust_frame_size old native pixels 1472x1368 new native pixels 1568x1404 old text pixels 1424x1368 new text pixels 1520x1404 old text chars 83x36 new text chars 89x37
base_size 32x84 size increments 8x18 WM hint 94x38
xg_frame_resized old native pixels 1568x1404 new native pixels 1712x1440
adjust_frame_size old native pixels 1568x1404 new native pixels 1712x1440 old text pixels 1520x1404 new text pixels 1664x1440 old text chars 89x37 new text chars 97x38
base_size 32x84 size increments 8x18 WM hint 103x39
xg_frame_resized old native pixels 1712x1440 new native pixels 1984x1548
adjust_frame_size old native pixels 1712x1440 new native pixels 1984x1548 old text pixels 1664x1440 new text pixels 1936x1548 old text chars 97x38 new text chars 113x41
base_size 32x84 size increments 8x18 WM hint 120x42
xg_frame_resized old native pixels 1984x1548 new native pixels 2096x1548
adjust_frame_size old native pixels 1984x1548 new native pixels 2096x1548 old text pixels 1936x1548 new text pixels 2048x1548 old text chars 113x41 new text chars 120x41
base_size 32x84 size increments 8x18 WM hint 127x42
xg_frame_resized old native pixels 2096x1548 new native pixels 2160x1584
adjust_frame_size old native pixels 2096x1548 new native pixels 2160x1584 old text pixels 2048x1548 new text pixels 2112x1584 old text chars 120x41 new text chars 124x42
base_size 32x84 size increments 8x18 WM hint 131x43
xg_frame_resized old native pixels 2160x1584 new native pixels 2208x1584
adjust_frame_size old native pixels 2160x1584 new native pixels 2208x1584 old text pixels 2112x1584 new text pixels 2160x1584 old text chars 124x42 new text chars 127x42
base_size 32x84 size increments 8x18 WM hint 134x43
xg_frame_resized old native pixels 2208x1584 new native pixels 2224x1620
adjust_frame_size old native pixels 2208x1584 new native pixels 2224x1620 old text pixels 2160x1584 new text pixels 2176x1620 old text chars 127x42 new text chars 128x43
base_size 32x84 size increments 8x18 WM hint 135x44
xg_frame_resized old native pixels 2224x1620 new native pixels 2240x1620
adjust_frame_size old native pixels 2224x1620 new native pixels 2240x1620 old text pixels 2176x1620 new text pixels 2192x1620 old text chars 128x43 new text chars 128x43
base_size 32x84 size increments 8x18 WM hint 136x44
xg_frame_resized old native pixels 2240x1620 new native pixels 2256x1620
adjust_frame_size old native pixels 2240x1620 new native pixels 2256x1620 old text pixels 2192x1620 new text pixels 2208x1620 old text chars 128x43 new text chars 129x43
base_size 32x84 size increments 8x18 WM hint 137x44
xg_frame_resized old native pixels 2256x1620 new native pixels 2240x1620
adjust_frame_size old native pixels 2256x1620 new native pixels 2240x1620 old text pixels 2208x1620 new text pixels 2192x1620 old text chars 129x43 new text chars 128x43
base_size 32x84 size increments 8x18 WM hint 136x44
xg_frame_resized old native pixels 2240x1620 new native pixels 2224x1584
adjust_frame_size old native pixels 2240x1620 new native pixels 2224x1584 old text pixels 2192x1620 new text pixels 2176x1584 old text chars 128x43 new text chars 128x42
base_size 32x84 size increments 8x18 WM hint 135x43
xg_frame_resized old native pixels 2224x1584 new native pixels 2208x1584
adjust_frame_size old native pixels 2224x1584 new native pixels 2208x1584 old text pixels 2176x1584 new text pixels 2160x1584 old text chars 128x42 new text chars 127x42
base_size 32x84 size increments 8x18 WM hint 134x43
xg_frame_resized old native pixels 2208x1584 new native pixels 2192x1584
adjust_frame_size old native pixels 2208x1584 new native pixels 2192x1584 old text pixels 2160x1584 new text pixels 2144x1584 old text chars 127x42 new text chars 126x42
base_size 32x84 size increments 8x18 WM hint 133x43
xg_frame_resized old native pixels 2192x1584 new native pixels 2192x1548
adjust_frame_size old native pixels 2192x1584 new native pixels 2192x1548 old text pixels 2144x1584 new text pixels 2144x1548 old text chars 126x42 new text chars 126x41
base_size 32x84 size increments 8x18 WM hint 133x42
xg_frame_resized old native pixels 2192x1548 new native pixels 2176x1548
adjust_frame_size old native pixels 2192x1548 new native pixels 2176x1548 old text pixels 2144x1548 new text pixels 2128x1548 old text chars 126x41 new text chars 125x41
base_size 32x84 size increments 8x18 WM hint 132x42
xg_frame_resized old native pixels 2176x1548 new native pixels 2160x1548
adjust_frame_size old native pixels 2176x1548 new native pixels 2160x1548 old text pixels 2128x1548 new text pixels 2112x1548 old text chars 125x41 new text chars 124x41
base_size 32x84 size increments 8x18 WM hint 131x42
xg_frame_resized old native pixels 2160x1548 new native pixels 2144x1548
adjust_frame_size old native pixels 2160x1548 new native pixels 2144x1548 old text pixels 2112x1548 new text pixels 2096x1548 old text chars 124x41 new text chars 123x41
base_size 32x84 size increments 8x18 WM hint 130x42
xg_frame_resized old native pixels 2144x1548 new native pixels 2144x1512
adjust_frame_size old native pixels 2144x1548 new native pixels 2144x1512 old text pixels 2096x1548 new text pixels 2096x1512 old text chars 123x41 new text chars 123x40
base_size 32x84 size increments 8x18 WM hint 130x41
xg_frame_resized old native pixels 2144x1512 new native pixels 2128x1512
adjust_frame_size old native pixels 2144x1512 new native pixels 2128x1512 old text pixels 2096x1512 new text pixels 2080x1512 old text chars 123x40 new text chars 122x40
base_size 32x84 size increments 8x18 WM hint 129x41
xg_frame_resized old native pixels 2128x1512 new native pixels 2112x1512
adjust_frame_size old native pixels 2128x1512 new native pixels 2112x1512 old text pixels 2080x1512 new text pixels 2064x1512 old text chars 122x40 new text chars 121x40
base_size 32x84 size increments 8x18 WM hint 128x41
xg_frame_resized old native pixels 2112x1512 new native pixels 2096x1512
adjust_frame_size old native pixels 2112x1512 new native pixels 2096x1512 old text pixels 2064x1512 new text pixels 2048x1512 old text chars 121x40 new text chars 120x40
base_size 32x84 size increments 8x18 WM hint 127x41
xg_frame_resized old native pixels 2096x1512 new native pixels 2080x1512
adjust_frame_size old native pixels 2096x1512 new native pixels 2080x1512 old text pixels 2048x1512 new text pixels 2032x1512 old text chars 120x40 new text chars 119x40
base_size 32x84 size increments 8x18 WM hint 126x41
xg_frame_resized old native pixels 2080x1512 new native pixels 2064x1512
adjust_frame_size old native pixels 2080x1512 new native pixels 2064x1512 old text pixels 2032x1512 new text pixels 2016x1512 old text chars 119x40 new text chars 118x40
base_size 32x84 size increments 8x18 WM hint 125x41
xg_frame_resized old native pixels 2064x1512 new native pixels 2048x1512
adjust_frame_size old native pixels 2064x1512 new native pixels 2048x1512 old text pixels 2016x1512 new text pixels 2000x1512 old text chars 118x40 new text chars 117x40
base_size 32x84 size increments 8x18 WM hint 124x41
xg_frame_resized old native pixels 2048x1512 new native pixels 2000x1512
adjust_frame_size old native pixels 2048x1512 new native pixels 2000x1512 old text pixels 2000x1512 new text pixels 1952x1512 old text chars 117x40 new text chars 114x40
base_size 32x84 size increments 8x18 WM hint 121x41
xg_frame_resized old native pixels 2000x1512 new native pixels 1984x1512
adjust_frame_size old native pixels 2000x1512 new native pixels 1984x1512 old text pixels 1952x1512 new text pixels 1936x1512 old text chars 114x40 new text chars 113x40
base_size 32x84 size increments 8x18 WM hint 120x41
xg_frame_resized old native pixels 1984x1512 new native pixels 1984x1476
adjust_frame_size old native pixels 1984x1512 new native pixels 1984x1476 old text pixels 1936x1512 new text pixels 1936x1476 old text chars 113x40 new text chars 113x39
base_size 32x84 size increments 8x18 WM hint 120x40
xg_frame_resized old native pixels 1984x1476 new native pixels 1968x1476
adjust_frame_size old native pixels 1984x1476 new native pixels 1968x1476 old text pixels 1936x1476 new text pixels 1920x1476 old text chars 113x39 new text chars 112x39
base_size 32x84 size increments 8x18 WM hint 119x40
xg_frame_resized old native pixels 1968x1476 new native pixels 1952x1476
adjust_frame_size old native pixels 1968x1476 new native pixels 1952x1476 old text pixels 1920x1476 new text pixels 1904x1476 old text chars 112x39 new text chars 112x39
base_size 32x84 size increments 8x18 WM hint 118x40
xg_frame_resized old native pixels 1952x1476 new native pixels 1936x1476
adjust_frame_size old native pixels 1952x1476 new native pixels 1936x1476 old text pixels 1904x1476 new text pixels 1888x1476 old text chars 112x39 new text chars 111x39
base_size 32x84 size increments 8x18 WM hint 117x40
xg_frame_resized old native pixels 1936x1476 new native pixels 1936x1440
adjust_frame_size old native pixels 1936x1476 new native pixels 1936x1440 old text pixels 1888x1476 new text pixels 1888x1440 old text chars 111x39 new text chars 111x38
base_size 32x84 size increments 8x18 WM hint 117x39
xg_frame_resized old native pixels 1936x1440 new native pixels 1952x1440
adjust_frame_size old native pixels 1936x1440 new native pixels 1952x1440 old text pixels 1888x1440 new text pixels 1904x1440 old text chars 111x38 new text chars 112x38
base_size 32x84 size increments 8x18 WM hint 118x39
xg_frame_resized old native pixels 1952x1440 new native pixels 1952x1404
adjust_frame_size old native pixels 1952x1440 new native pixels 1952x1404 old text pixels 1904x1440 new text pixels 1904x1404 old text chars 112x38 new text chars 112x37
base_size 32x84 size increments 8x18 WM hint 118x38
xg_frame_resized old native pixels 1952x1404 new native pixels 1952x1368
adjust_frame_size old native pixels 1952x1404 new native pixels 1952x1368 old text pixels 1904x1404 new text pixels 1904x1368 old text chars 112x37 new text chars 112x36
base_size 32x84 size increments 8x18 WM hint 118x37
xg_frame_resized old native pixels 1952x1368 new native pixels 1936x1368
adjust_frame_size old native pixels 1952x1368 new native pixels 1936x1368 old text pixels 1904x1368 new text pixels 1888x1368 old text chars 112x36 new text chars 111x36
base_size 32x84 size increments 8x18 WM hint 117x37
xg_frame_resized old native pixels 1936x1368 new native pixels 1952x1368
adjust_frame_size old native pixels 1936x1368 new native pixels 1952x1368 old text pixels 1888x1368 new text pixels 1904x1368 old text chars 111x36 new text chars 112x36
base_size 32x84 size increments 8x18 WM hint 118x37
xg_frame_resized old native pixels 1952x1368 new native pixels 1952x1332
adjust_frame_size old native pixels 1952x1368 new native pixels 1952x1332 old text pixels 1904x1368 new text pixels 1904x1332 old text chars 112x36 new text chars 112x36
base_size 32x84 size increments 8x18 WM hint 118x36
xg_frame_resized old native pixels 1952x1332 new native pixels 1952x1296
adjust_frame_size old native pixels 1952x1332 new native pixels 1952x1296 old text pixels 1904x1332 new text pixels 1904x1296 old text chars 112x36 new text chars 112x35
base_size 32x84 size increments 8x18 WM hint 118x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1296 new text pixels 1904x1295
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 952 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 647 base height 101 height inc 18
xg_frame_set_char_size old native pixels 1952x1296 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1296 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1296 new native pixels 1952x1294 old text pixels 1904x1296 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x33
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x33
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1258 new text pixels 1904x1258
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1258 new text pixels 1904x1258
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1222
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1222 old text pixels 1904x1258 new text pixels 1904x1222 old text chars 112x34 new text chars 112x33
base_size 32x101 size increments 8x18 WM hint 118x32
xg_frame_resized old native pixels 1952x1222 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1222 new native pixels 1952x1258 old text pixels 1904x1222 new text pixels 1904x1258 old text chars 112x33 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x33
xg_frame_resized old native pixels 1952x1258 new native pixels 1936x1258
adjust_frame_size old native pixels 1952x1258 new native pixels 1936x1258 old text pixels 1904x1258 new text pixels 1888x1258 old text chars 112x34 new text chars 111x34
base_size 32x101 size increments 8x18 WM hint 117x33
xg_frame_resized old native pixels 1936x1258 new native pixels 1952x1258
adjust_frame_size old native pixels 1936x1258 new native pixels 1952x1258 old text pixels 1888x1258 new text pixels 1904x1258 old text chars 111x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x33
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1936x1294
adjust_frame_size old native pixels 1952x1294 new native pixels 1936x1294 old text pixels 1904x1294 new text pixels 1888x1294 old text chars 112x34 new text chars 111x34
base_size 32x101 size increments 8x18 WM hint 117x34
xg_frame_resized old native pixels 1936x1294 new native pixels 1936x1330
adjust_frame_size old native pixels 1936x1294 new native pixels 1936x1330 old text pixels 1888x1294 new text pixels 1888x1330 old text chars 111x34 new text chars 111x35
base_size 32x101 size increments 8x18 WM hint 117x35
xg_frame_resized old native pixels 1936x1330 new native pixels 1952x1330
adjust_frame_size old native pixels 1936x1330 new native pixels 1952x1330 old text pixels 1888x1330 new text pixels 1904x1330 old text chars 111x35 new text chars 112x35
base_size 32x101 size increments 8x18 WM hint 118x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x33
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x33
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels 1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text chars 112x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text chars 112x34 new text chars 112x35
base_size 32x101 size increments 8x18 WM hint 118x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels 1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x33
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x33
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-27 3:07 ` Dmitry Gutov
@ 2023-01-27 9:35 ` martin rudalics
2023-01-28 0:22 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-27 9:35 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
>> (118 vs 112 looks slightly preposterous BTW - it would mean that
>> scroll bar and fringes are six characters wide. Here both width and
>> height differ by 1 only.)
>
> They're definitely not that. I would roughly estimate that the scroll
> bar plus the right fringe are about 2-3 characters wide. And the left
> fringe is about 1/2 a character.
I underestimated the scaling effect. With a character width scaled from
17 to 8 a base_width of 32 and a native width of 1952 pixels we get
(/ (- (/ 1952 2) 32) 8) ~> 118
On the other hand with 1904 text pixels (scroll bar + fringes are the
remaining 48 pixels) and the unscaled character width we get
(/ 1904 17) ~> 112
This shows how scaling strongly affects whatever GNOME displays here and
what Emacs uses internally. It might be illustrative to put two equally
sized frames above each other - one from a GTK and one from a Lucid
build - and look at what size hints GNOME displays for each of them.
For the rest, the transcript nowhere shows that the GNOME hints jump by
two or more after 'set-face-attribute'. Can you spot such behavior?
There are jumps like these
xg_frame_resized old native pixels 1472x1368 new native pixels 1568x1404
adjust_frame_size old native pixels 1472x1368 new native pixels 1568x1404 old text pixels 1424x1368 new text pixels 1520x1404 old text chars 83x36 new text chars 89x37
base_size 32x84 size increments 8x18 WM hint 94x38
xg_frame_resized old native pixels 1568x1404 new native pixels 1712x1440
adjust_frame_size old native pixels 1568x1404 new native pixels 1712x1440 old text pixels 1520x1404 new text pixels 1664x1440 old text chars 89x37 new text chars 97x38
base_size 32x84 size increments 8x18 WM hint 103x39
xg_frame_resized old native pixels 1712x1440 new native pixels 1984x1548
adjust_frame_size old native pixels 1712x1440 new native pixels 1984x1548 old text pixels 1664x1440 new text pixels 1936x1548 old text chars 97x38 new text chars 113x41
base_size 32x84 size increments 8x18 WM hint 120x42
during mouse dragging. But these result from redisplay lagging behind
your drag speed. Hence subsequent drags are collapsed into larger ones
and Emacs "adjusts" the frame size only after redisplay has decided in
good faith that it now can present the frame to your eyes.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-27 9:35 ` martin rudalics
@ 2023-01-28 0:22 ` Dmitry Gutov
2023-01-28 15:36 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-28 0:22 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
On 27/01/2023 11:35, martin rudalics wrote:
> This shows how scaling strongly affects whatever GNOME displays here and
> what Emacs uses internally. It might be illustrative to put two equally
> sized frames above each other - one from a GTK and one from a Lucid
> build - and look at what size hints GNOME displays for each of them.
Let me know if you really need that -- I'd have to compile Emacs in two
separate directories.
> For the rest, the transcript nowhere shows that the GNOME hints jump by
> two or more after 'set-face-attribute'. Can you spot such behavior?
The jumps in the log look smooth, but one set-face-attribute evaluation
creates several log entries. After I resize the frame to 118x35 and
evaluate the s-f-a form, all of this is printed in the log:
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old
text pixels 1904x1296 new text pixels 1904x1295
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes
16 borders 0 text width 952 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text
height 647 base height 101 height inc 18
xg_frame_set_char_size old native pixels 1952x1296 new native pixels
1952x1295 outer pixels 976x713 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1296 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1296 new native pixels
1952x1294 old text pixels 1904x1296 new text pixels 1904x1294 old text
chars 112x35 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old
text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels
1952x1258 outer pixels 976x695 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x33
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels
1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text
chars 112x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x33
...and the frame is 118x33 at the end, naturally.
Then I can resize the frame again, this is printed:
xg_frame_resized old native pixels 1952x1258 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1258 new native pixels
1952x1294 old text pixels 1904x1258 new text pixels 1904x1294 old text
chars 112x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1330
adjust_frame_size old native pixels 1952x1294 new native pixels
1952x1330 old text pixels 1904x1294 new text pixels 1904x1330 old text
chars 112x34 new text chars 112x35
base_size 32x101 size increments 8x18 WM hint 118x35
Then I call s-a-f again, and a lot of stuff (slightly different: it
seems the xg_wm_set_size_hint calls is missing) is printed again:
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old
text pixels 1904x1330 new text pixels 1904x1295
xg_frame_set_char_size old native pixels 1952x1330 new native pixels
1952x1295 outer pixels 976x713 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1330 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1330 new native pixels
1952x1294 old text pixels 1904x1330 new text pixels 1904x1294 old text
chars 112x35 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old
text pixels 1904x1294 new text pixels 1904x1258
xg_frame_set_char_size old native pixels 1952x1294 new native pixels
1952x1258 outer pixels 976x695 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x33
xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
adjust_frame_size old native pixels 1952x1294 new native pixels
1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text
chars 112x34 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x33
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-28 0:22 ` Dmitry Gutov
@ 2023-01-28 15:36 ` martin rudalics
2023-01-29 1:25 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-28 15:36 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
>> This shows how scaling strongly affects whatever GNOME displays here and
>> what Emacs uses internally. It might be illustrative to put two equally
>> sized frames above each other - one from a GTK and one from a Lucid
>> build - and look at what size hints GNOME displays for each of them.
>
> Let me know if you really need that -- I'd have to compile Emacs in two separate directories.
One of these days please do. Eventually we need someone to tell us how
Lucid builds scale and whether the results look different from the GTK
builds. If nobody knows, we could try to guess from what Lucid and GTK
frames look like on your display.
>> For the rest, the transcript nowhere shows that the GNOME hints jump by
>> two or more after 'set-face-attribute'. Can you spot such behavior?
>
> The jumps in the log look smooth, but one set-face-attribute
> evaluation creates several log entries. After I resize the frame to
> 118x35 and evaluate the s-f-a form, all of this is printed in the log:
>
> x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old text pixels 1904x1296 new text pixels 1904x1295
> xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 952 base width 32 width inc 8
> char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 647 base height 101 height inc 18
> xg_frame_set_char_size old native pixels 1952x1296 new native pixels 1952x1295 outer pixels 976x713 outer rest 0x0
> base_size 32x101 size increments 8x18 WM hint 118x34
> xg_frame_resized old native pixels 1952x1296 new native pixels 1952x1294
> adjust_frame_size old native pixels 1952x1296 new native pixels 1952x1294 old text pixels 1904x1296 new text pixels 1904x1294 old text chars 112x35 new text chars 112x34
> base_size 32x101 size increments 8x18 WM hint 118x34
>
> x_new_font old char size 17x37 new char size 17x37 text chars 112x34 old text pixels 1904x1294 new text pixels 1904x1258
> xg_frame_set_char_size old native pixels 1952x1294 new native pixels 1952x1258 outer pixels 976x695 outer rest 0x0
> base_size 32x101 size increments 8x18 WM hint 118x33
> xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
> adjust_frame_size old native pixels 1952x1294 new native pixels 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text chars 112x34 new text chars 112x34
> base_size 32x101 size increments 8x18 WM hint 118x33
>
> ...and the frame is 118x33 at the end, naturally.
This means that if you are sure that you have called it once only,
'set-face-attribute' manages to run set_new_font_hook twice. Which
would be a real pain. Maybe someone has an idea. Otherwise I have to
invent a counter, increment it in 'set-face-attribute', print it in
x_new_font, have you test it again ...
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-28 15:36 ` martin rudalics
@ 2023-01-29 1:25 ` Dmitry Gutov
2023-01-30 9:28 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-01-29 1:25 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
On 28/01/2023 17:36, martin rudalics wrote:
> >> This shows how scaling strongly affects whatever GNOME displays here
> and
> >> what Emacs uses internally. It might be illustrative to put two
> equally
> >> sized frames above each other - one from a GTK and one from a Lucid
> >> build - and look at what size hints GNOME displays for each of them.
> >
> > Let me know if you really need that -- I'd have to compile Emacs in
> two separate directories.
>
> One of these days please do. Eventually we need someone to tell us how
> Lucid builds scale and whether the results look different from the GTK
> builds. If nobody knows, we could try to guess from what Lucid and GTK
> frames look like on your display.
OK, I have done so now.
First of all, they start up with different dimensions: Lucid's is a bit
shorter and narrower. GNOME says Lucid is 78x34 and GTK3 is 79x35.
Internally, both think they are 80x36.
The end of *foo* for GTK3 contains:
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes
16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height
648 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes
16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text
height 648 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels
1488x1296 outer pixels 744x714 outer rest 0x0
base_size 33x84 size increments 9x18 WM hint 79x35
And for Lucid, it contains:
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
adjust_frame_size old native pixels 1474x1332 new native pixels
1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text
chars 80x36 new text chars 80x36
(I avoid inserting the full contents for brevity, they are several times
longer in both cases.)
Lucid's menu bar and tool bar look shorter in height, with less padding.
The font size seems to be equal, however. And the tool bar icons are
scaled on Lucid too.
I tried to resize them, but (as long as pixelwise resizing is disabled),
they don't match exactly. But if I line them up very close, GNOME says
Lucid (which is slightly larger) is 81x37 and GTK3 is 80x36. Here are
respective logs:
GTK3:
xg_frame_resized old native pixels 1506x1296 new native pixels 1488x1296
adjust_frame_size old native pixels 1506x1296 new native pixels
1488x1296 old text pixels 1458x1296 new text pixels 1440x1296 old text
chars 81x36 new text chars 80x36
base_size 33x84 size increments 9x18 WM hint 79x35
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1332
adjust_frame_size old native pixels 1488x1296 new native pixels
1488x1332 old text pixels 1440x1296 new text pixels 1440x1332 old text
chars 80x36 new text chars 80x37
base_size 33x84 size increments 9x18 WM hint 79x36
xg_frame_resized old native pixels 1488x1332 new native pixels 1506x1332
adjust_frame_size old native pixels 1488x1332 new native pixels
1506x1332 old text pixels 1440x1332 new text pixels 1458x1332 old text
chars 80x37 new text chars 81x37
base_size 33x84 size increments 9x18 WM hint 80x36
Lucid:
EmacsFrameResize old native pixels 1492x1354 new native pixels 1492x1390
adjust_frame_size old native pixels 1492x1354 new native pixels
1492x1390 old text pixels 1458x1296 new text pixels 1458x1332 old text
chars 81x36 new text chars 81x37
EmacsFrameResize old native pixels 1492x1390 new native pixels 1510x1390
adjust_frame_size old native pixels 1492x1390 new native pixels
1510x1390 old text pixels 1458x1332 new text pixels 1476x1332 old text
chars 81x37 new text chars 82x37
EmacsFrameResize old native pixels 1510x1390 new native pixels 1510x1426
adjust_frame_size old native pixels 1510x1390 new native pixels
1510x1426 old text pixels 1476x1332 new text pixels 1476x1368 old text
chars 82x37 new text chars 82x38
Which is to say Lucid's log is slightly inaccurate here because, again,
GNOME reports that window to be 81x37.
> >> For the rest, the transcript nowhere shows that the GNOME hints jump by
> >> two or more after 'set-face-attribute'. Can you spot such behavior?
> >
> > The jumps in the log look smooth, but one set-face-attribute
> > evaluation creates several log entries. After I resize the frame to
> > 118x35 and evaluate the s-f-a form, all of this is printed in the log:
> >
> > x_new_font old char size 17x37 new char size 17x37 text chars 112x35
> old text pixels 1904x1296 new text pixels 1904x1295
> > xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32
> fringes 16 borders 0 text width 952 base width 32 width inc 8
> > char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text
> height 647 base height 101 height inc 18
> > xg_frame_set_char_size old native pixels 1952x1296 new native pixels
> 1952x1295 outer pixels 976x713 outer rest 0x0
> > base_size 32x101 size increments 8x18 WM hint 118x34
> > xg_frame_resized old native pixels 1952x1296 new native pixels 1952x1294
> > adjust_frame_size old native pixels 1952x1296 new native pixels
> 1952x1294 old text pixels 1904x1296 new text pixels 1904x1294 old text
> chars 112x35 new text chars 112x34
> > base_size 32x101 size increments 8x18 WM hint 118x34
> >
> > x_new_font old char size 17x37 new char size 17x37 text chars 112x34
> old text pixels 1904x1294 new text pixels 1904x1258
> > xg_frame_set_char_size old native pixels 1952x1294 new native pixels
> 1952x1258 outer pixels 976x695 outer rest 0x0
> > base_size 32x101 size increments 8x18 WM hint 118x33
> > xg_frame_resized old native pixels 1952x1294 new native pixels 1952x1258
> > adjust_frame_size old native pixels 1952x1294 new native pixels
> 1952x1258 old text pixels 1904x1294 new text pixels 1904x1258 old text
> chars 112x34 new text chars 112x34
> > base_size 32x101 size increments 8x18 WM hint 118x33
> >
> > ...and the frame is 118x33 at the end, naturally.
>
> This means that if you are sure that you have called it once only,
> 'set-face-attribute' manages to run set_new_font_hook twice. Which
> would be a real pain. Maybe someone has an idea. Otherwise I have to
> invent a counter, increment it in 'set-face-attribute', print it in
> x_new_font, have you test it again ...
I'm pretty sure, yes. I performed that experiment and observed the log
several times.
Would a counter really help? I guess you'll be able to confirm what I'm
saying, but then what? Would that bring any new information?
Should we try to circle back to finding the difference between
"InconsolataLGC" and "Inconsolata LGC"? The latter doesn't exhibit most
of the problematic behaviors we have been discussing here.
And when s-f-a is evaluated at dimensions 118x35 with the latter family
name, it first corrects the dimensions slightly to 118x34 (with like a
few pixel difference in height, 2 or 3), and then no subsequent
evaluations of s-f-a change frame dimensions, no matter how I resize it
with a mouse first.
Visually, the resulting text seems identical between these two fonts.
Maybe the former font name is somehow "autocorrected" into the latter?
And that triggers some kind of callback internally that can additionally
resize the frame?
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-29 1:25 ` Dmitry Gutov
@ 2023-01-30 9:28 ` martin rudalics
2023-02-09 19:40 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-01-30 9:28 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 6541 bytes --]
> OK, I have done so now.
Great. If possible please keep the Lucid build around for a couple of
days - there are yet a lot of mysteries to solve.
> First of all, they start up with different dimensions: Lucid's is a
> bit shorter and narrower. GNOME says Lucid is 78x34 and GTK3 is 79x35.
Can you try both with unpatched builds? My unpatched Emacsen start here
(according to xfce/xfwm4, no scaling) as 80x36 the patched ones as 79x35.
> Internally, both think they are 80x36.
Same here.
> The end of *foo* for GTK3 contains:
>
> xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
> xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
> xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
> char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
> xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
> char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text height 648 base height 84 height inc 18
> xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
> base_size 33x84 size increments 9x18 WM hint 79x35
Can you show me the text pixels values? These are the ones we should
compare. The native values differ because for Lucid the height includes
the toolbar which we draw ourselves into the rectangle the WM allots to
us. GTK draws the toolbar into its own area which is outside the native
rectangle.
> And for Lucid, it contains:
>
> EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
> EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
> adjust_frame_size old native pixels 1474x1332 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
Here I would have liked to see the value for the scroll bar - vscroll.
I suppose these differ on Lucid and GTK.
> Lucid's menu bar and tool bar look shorter in height, with less padding. The font size seems to be equal, however.
When you put the two frames side by side, does the text area start lower
with GTK? Here they start at exactly the same pixel position. I attach
a screenshot so you can see.
> And the tool bar icons are scaled on Lucid too.
Is that the reason for the height difference?
> I tried to resize them, but (as long as pixelwise resizing is
> disabled), they don't match exactly. But if I line them up very close,
> GNOME says Lucid (which is slightly larger) is 81x37 and GTK3 is
> 80x36. Here are respective logs:
>
> GTK3:
>
> xg_frame_resized old native pixels 1506x1296 new native pixels 1488x1296
> adjust_frame_size old native pixels 1506x1296 new native pixels 1488x1296 old text pixels 1458x1296 new text pixels 1440x1296 old text chars 81x36 new text chars 80x36
> base_size 33x84 size increments 9x18 WM hint 79x35
> xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1332
> adjust_frame_size old native pixels 1488x1296 new native pixels 1488x1332 old text pixels 1440x1296 new text pixels 1440x1332 old text chars 80x36 new text chars 80x37
> base_size 33x84 size increments 9x18 WM hint 79x36
> xg_frame_resized old native pixels 1488x1332 new native pixels 1506x1332
> adjust_frame_size old native pixels 1488x1332 new native pixels 1506x1332 old text pixels 1440x1332 new text pixels 1458x1332 old text chars 80x37 new text chars 81x37
> base_size 33x84 size increments 9x18 WM hint 80x36
>
> Lucid:
>
> EmacsFrameResize old native pixels 1492x1354 new native pixels 1492x1390
> adjust_frame_size old native pixels 1492x1354 new native pixels 1492x1390 old text pixels 1458x1296 new text pixels 1458x1332 old text chars 81x36 new text chars 81x37
> EmacsFrameResize old native pixels 1492x1390 new native pixels 1510x1390
> adjust_frame_size old native pixels 1492x1390 new native pixels 1510x1390 old text pixels 1458x1332 new text pixels 1476x1332 old text chars 81x37 new text chars 82x37
> EmacsFrameResize old native pixels 1510x1390 new native pixels 1510x1426
> adjust_frame_size old native pixels 1510x1390 new native pixels 1510x1426 old text pixels 1476x1332 new text pixels 1476x1368 old text chars 82x37 new text chars 82x38
>
> Which is to say Lucid's log is slightly inaccurate here because, again, GNOME reports that window to be 81x37.
Lucid builds do not report the "WM hint" values (yet). What stupefies
me most here is one thing: The Lucid build apparently also resizes in
18x36 increments although your font should ask for 17x37 pixels and we
nowhere do any scaling. Please show me what the Lucid build outputs
after x_new_font.
> I'm pretty sure, yes. I performed that experiment and observed the log several times.
>
> Would a counter really help? I guess you'll be able to confirm what I'm saying, but then what? Would that bring any new information?
Maybe. You could try putting a breakpoint at x_new_font and, whenever
it has triggered a second time in a row after you've done
'set-face-attribute', show me the backtrace for that second time. Then
we could find out what strange force is triggering that. If you manage
to do that, we don't need the counter.
> Should we try to circle back to finding the difference between
> "InconsolataLGC" and "Inconsolata LGC"? The latter doesn't exhibit
> most of the problematic behaviors we have been discussing here.
The first thing to try would be obvious: Does the latter trigger the
"two x_new_font entries in *foo* in a row behavior"?
> And when s-f-a is evaluated at dimensions 118x35 with the latter
> family name, it first corrects the dimensions slightly to 118x34 (with
> like a few pixel difference in height, 2 or 3), and then no subsequent
> evaluations of s-f-a change frame dimensions, no matter how I resize
> it with a mouse first.
Please send me the *foo* transcript for that.
> Visually, the resulting text seems identical between these two
> fonts. Maybe the former font name is somehow "autocorrected" into the
> latter? And that triggers some kind of callback internally that can
> additionally resize the frame?
Maybe fontset_from_font does such a thing. We'd have to find out first
whether the values x_new_font finds for font->average_width and
font_ascent + font_descent differ for the two Inconsolatas.
martin
[-- Attachment #2: Lucid vs GTK3.png --]
[-- Type: image/png, Size: 59510 bytes --]
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-01-30 9:28 ` martin rudalics
@ 2023-02-09 19:40 ` Dmitry Gutov
2023-02-11 1:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-13 10:09 ` martin rudalics
0 siblings, 2 replies; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-09 19:40 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 16944 bytes --]
Hi Martin,
Sorry for the pause.
On 30/01/2023 11:28, martin rudalics wrote:
> > OK, I have done so now.
>
> Great. If possible please keep the Lucid build around for a couple of
> days - there are yet a lot of mysteries to solve.
Sure, it's a separate worktree, it can stay around a while.
> > First of all, they start up with different dimensions: Lucid's is a
> > bit shorter and narrower. GNOME says Lucid is 78x34 and GTK3 is 79x35.
>
> Can you try both with unpatched builds? My unpatched Emacsen start here
> (according to xfce/xfwm4, no scaling) as 80x36 the patched ones as 79x35.
Unpatched Lucid agrees with GNOME (both say 80x36).
GTK3 is 79x36 still, again according to GNOME.
> > Internally, both think they are 80x36.
>
> Same here.
Yep.
> > The end of *foo* for GTK3 contains:
> >
> > xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
> > xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
> > xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32
> fringes 16 borders 0 text width 720 base width 33 width inc 9
> > char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text
> height 648 base height 43 height inc 18
> > xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32
> fringes 16 borders 0 text width 720 base width 33 width inc 9
> > char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text
> height 648 base height 84 height inc 18
> > xg_frame_set_char_size old native pixels 1488x1296 new native pixels
> 1488x1296 outer pixels 744x714 outer rest 0x0
> > base_size 33x84 size increments 9x18 WM hint 79x35
>
> Can you show me the text pixels values? These are the ones we should
> compare. The native values differ because for Lucid the height includes
> the toolbar which we draw ourselves into the rectangle the WM allots to
> us. GTK draws the toolbar into its own area which is outside the native
> rectangle.
How do I get that numbers?
In case that's relevant, (buffer-text-pixel-size) evaluated in *scratch*
with its default message returns (1296 . 72).
> > And for Lucid, it contains:
> >
> > EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
> > EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
> > adjust_frame_size old native pixels 1474x1332 new native pixels
> 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text
> chars 80x36 new text chars 80x36
>
> Here I would have liked to see the value for the scroll bar - vscroll.
> I suppose these differ on Lucid and GTK.
window-vscroll is a built-in function in ‘C source code’.
Return the amount by which WINDOW is scrolled vertically.
Is that the value you were looking for? If not, please tell me how to
find it.
> > Lucid's menu bar and tool bar look shorter in height, with less
> padding. The font size seems to be equal, however.
>
> When you put the two frames side by side, does the text area start lower
> with GTK? Here they start at exactly the same pixel position. I attach
> a screenshot so you can see.
It does. See the attached screenshots with unpatched builds.
> > And the tool bar icons are scaled on Lucid too.
>
> Is that the reason for the height difference?
More likely, the reason is smaller padding in the Lucid build -- both in
the menu and in the toolbar.
> > I tried to resize them, but (as long as pixelwise resizing is
> > disabled), they don't match exactly. But if I line them up very close,
> > GNOME says Lucid (which is slightly larger) is 81x37 and GTK3 is
> > 80x36. Here are respective logs:
> >
> > GTK3:
> >
> > xg_frame_resized old native pixels 1506x1296 new native pixels 1488x1296
> > adjust_frame_size old native pixels 1506x1296 new native pixels
> 1488x1296 old text pixels 1458x1296 new text pixels 1440x1296 old text
> chars 81x36 new text chars 80x36
> > base_size 33x84 size increments 9x18 WM hint 79x35
> > xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1332
> > adjust_frame_size old native pixels 1488x1296 new native pixels
> 1488x1332 old text pixels 1440x1296 new text pixels 1440x1332 old text
> chars 80x36 new text chars 80x37
> > base_size 33x84 size increments 9x18 WM hint 79x36
> > xg_frame_resized old native pixels 1488x1332 new native pixels 1506x1332
> > adjust_frame_size old native pixels 1488x1332 new native pixels
> 1506x1332 old text pixels 1440x1332 new text pixels 1458x1332 old text
> chars 80x37 new text chars 81x37
> > base_size 33x84 size increments 9x18 WM hint 80x36
> >
> > Lucid:
> >
> > EmacsFrameResize old native pixels 1492x1354 new native pixels 1492x1390
> > adjust_frame_size old native pixels 1492x1354 new native pixels
> 1492x1390 old text pixels 1458x1296 new text pixels 1458x1332 old text
> chars 81x36 new text chars 81x37
> > EmacsFrameResize old native pixels 1492x1390 new native pixels 1510x1390
> > adjust_frame_size old native pixels 1492x1390 new native pixels
> 1510x1390 old text pixels 1458x1332 new text pixels 1476x1332 old text
> chars 81x37 new text chars 82x37
> > EmacsFrameResize old native pixels 1510x1390 new native pixels 1510x1426
> > adjust_frame_size old native pixels 1510x1390 new native pixels
> 1510x1426 old text pixels 1476x1332 new text pixels 1476x1368 old text
> chars 82x37 new text chars 82x38
> >
> > Which is to say Lucid's log is slightly inaccurate here because,
> again, GNOME reports that window to be 81x37.
>
> Lucid builds do not report the "WM hint" values (yet). What stupefies
> me most here is one thing: The Lucid build apparently also resizes in
> 18x36 increments although your font should ask for 17x37 pixels and we
> nowhere do any scaling. Please show me what the Lucid build outputs
> after x_new_font.
If I understood your request correctly:
Here's the output after I evaluate s-f-a for the first time:
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old
text pixels 1440x1296 new text pixels 1680x1620
update_wm_hints char width 21 old char width 18 vscroll 16 fringes 16
borders 2 base width 55 old_base width 52 min width 55 old min width 52
char height 45 old char height 36 menubar 45 hscroll 0 borders 2
base height 148 old base height 139 min height 148 old min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1714x1678
EmacsFrameResize old native pixels 1474x1354 new native pixels 1714x1678
adjust_frame_size old native pixels 1474x1354 new native pixels
1714x1678 old text pixels 1440x1296 new text pixels 1680x1620 old text
chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old
text pixels 1680x1620 new text pixels 1360x1332
update_wm_hints char width 17 old char width 21 vscroll 16 fringes 16
borders 2 base width 51 old_base width 55 min width 51 old min width 55
char height 37 old char height 45 menubar 45 hscroll 0 borders 2
base height 140 old base height 148 min height 140 old min height 148
EmacsFrameResize old native pixels 1714x1678 new native pixels 1394x1390
EmacsFrameResize old native pixels 1714x1678 new native pixels 1394x1390
adjust_frame_size old native pixels 1714x1678 new native pixels
1394x1390 old text pixels 1680x1620 new text pixels 1360x1332 old text
chars 80x36 new text chars 80x36
And here's its output when I call s-f-a for the second time:
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old
text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old
text pixels 1360x1332 new text pixels 1360x1332
> > I'm pretty sure, yes. I performed that experiment and observed the
> log several times.
> >
> > Would a counter really help? I guess you'll be able to confirm what
> I'm saying, but then what? Would that bring any new information?
>
> Maybe. You could try putting a breakpoint at x_new_font and, whenever
> it has triggered a second time in a row after you've done
> 'set-face-attribute', show me the backtrace for that second time. Then
> we could find out what strange force is triggering that. If you manage
> to do that, we don't need the counter.
I think the above means that x_new_font is called for the second time
even in the Lucid build. Anyway, with GNOME and the patch:
It is hit twice, and both calls seems to have the same backtrace.
(gdb) xbacktrace
"internal-set-lisp-face-attribute" (0xf09ff218)
"set-face-attribute" (0xffffd8c0)
"progn" (0xffffda70)
"eval" (0xf09ff180)
"elisp--eval-last-sexp" (0xf09ff100)
"eval-last-sexp" (0xffffdc50)
"funcall-interactively" (0xffffdc48)
"call-interactively" (0xf09ff070)
"command-execute" (0xffffdef8)
and
(gdb) backtrace
#0 x_new_font (f=0x5555562f8430, font_object=0x5555569e1a45,
fontset=-1) at xterm.c:26517
#1 0x00005555555c4656 in gui_set_font (f=0x5555562f8430,
arg=0x5555568fe364, oldval=0x55555622d224) at frame.c:4733
#2 0x00005555555c1ff9 in gui_set_frame_parameters_1
(f=f@entry=0x5555562f8430, alist=<optimized out>,
alist@entry=0x7fffffffd6f3,
default_parameter=default_parameter@entry=true) at frame.c:4325
#3 0x000055555567fea1 in set_font_frame_param (lface=0x5555562f6e45,
frame=0x5555562f8435) at xfaces.c:3816
#4 Finternal_set_lisp_face_attribute (face=0x5940, attr=<optimized
out>, value=<optimized out>, frame=<optimized out>) at xfaces.c:3629
#5 0x000055555567eb38 in Finternal_set_lisp_face_attribute
(face=0x5940, attr=0xdb0, value=0x5555568fe544, frame=<optimized out>)
at xfaces.c:3092
...
vs
(gdb) backtrace
#0 x_new_font (f=0x5555562f8430, font_object=0x555556945b6d,
fontset=-1) at xterm.c:26517
#1 0x00005555555c4656 in gui_set_font (f=0x5555562f8430,
arg=0x5555563e1e74, oldval=0x5555568fe364) at frame.c:4733
#2 0x00005555555c1ff9 in gui_set_frame_parameters_1
(f=f@entry=0x5555562f8430, alist=<optimized out>,
alist@entry=0x7fffffffd6f3,
default_parameter=default_parameter@entry=true) at frame.c:4325
#3 0x000055555567fea1 in set_font_frame_param (lface=0x5555562f6e45,
frame=0x5555562f8435) at xfaces.c:3816
#4 Finternal_set_lisp_face_attribute (face=0x5940, attr=<optimized
out>, value=<optimized out>, frame=<optimized out>) at xfaces.c:3629
#5 0x000055555567eb38 in Finternal_set_lisp_face_attribute
(face=0x5940, attr=0x1020, value=0x1ba, frame=<optimized out>) at
xfaces.c:3092
...
What seems to be different between the two are the font_object argument
to x_new_font and the arguments to Finternal_set_lisp_face_attribute at
the end of the backtrace.
It seems like they are called twice because my original example sets two
attributes: :height and :family.
> > Should we try to circle back to finding the difference between
> > "InconsolataLGC" and "Inconsolata LGC"? The latter doesn't exhibit
> > most of the problematic behaviors we have been discussing here.
>
> The first thing to try would be obvious: Does the latter trigger the
> "two x_new_font entries in *foo* in a row behavior"?
When called for the first time -- yes:
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old
text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes
16 borders 0 text width 840 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text
height 810 base height 106 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels
1728x1620 outer pixels 864x876 outer rest 0x0
base_size 34x106 size increments 10x22 WM hint 83x35
xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
adjust_frame_size old native pixels 1488x1296 new native pixels
1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text
chars 80x36 new text chars 80x36
base_size 34x106 size increments 10x22 WM hint 83x35
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old
text pixels 1680x1620 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes
16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text
height 666 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1728x1620 new native pixels
1408x1332 outer pixels 704x732 outer rest 0x0
base_size 32x84 size increments 8x18 WM hint 84x36
xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
adjust_frame_size old native pixels 1728x1620 new native pixels
1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text
chars 80x36 new text chars 80x36
base_size 32x84 size increments 8x18 WM hint 84x36
When called the second time -- no:
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old
text pixels 1360x1332 new text pixels 1360x1332
When called the third time and further -- no entries are added to *foo*
at all.
I can resize the frame -- and xg_frame_resized stuff is printed -- but
when I evaluate the s-f-a form again, still nothing gets added to the
output. Nor does the frame get resized, naturally.
> > And when s-f-a is evaluated at dimensions 118x35 with the latter
> > family name, it first corrects the dimensions slightly to 118x34 (with
> > like a few pixel difference in height, 2 or 3), and then no subsequent
> > evaluations of s-f-a change frame dimensions, no matter how I resize
> > it with a mouse first.
>
> Please send me the *foo* transcript for that.
...
base_size 32x84 size increments 8x18 WM hint 118x41
xg_frame_resized old native pixels 1952x1512 new native pixels 1952x1476
adjust_frame_size old native pixels 1952x1512 new native pixels
1952x1476 old text pixels 1904x1512 new text pixels 1904x1476 old text
chars 112x40 new text chars 112x39
base_size 32x84 size increments 8x18 WM hint 118x40
xg_frame_resized old native pixels 1952x1476 new native pixels 1952x1440
adjust_frame_size old native pixels 1952x1476 new native pixels
1952x1440 old text pixels 1904x1476 new text pixels 1904x1440 old text
chars 112x39 new text chars 112x38
base_size 32x84 size increments 8x18 WM hint 118x39
xg_frame_resized old native pixels 1952x1440 new native pixels 1952x1404
adjust_frame_size old native pixels 1952x1440 new native pixels
1952x1404 old text pixels 1904x1440 new text pixels 1904x1404 old text
chars 112x38 new text chars 112x37
base_size 32x84 size increments 8x18 WM hint 118x38
xg_frame_resized old native pixels 1952x1404 new native pixels 1952x1368
adjust_frame_size old native pixels 1952x1404 new native pixels
1952x1368 old text pixels 1904x1404 new text pixels 1904x1368 old text
chars 112x37 new text chars 112x36
base_size 32x84 size increments 8x18 WM hint 118x37
xg_frame_resized old native pixels 1952x1368 new native pixels 1952x1332
adjust_frame_size old native pixels 1952x1368 new native pixels
1952x1332 old text pixels 1904x1368 new text pixels 1904x1332 old text
chars 112x36 new text chars 112x36
base_size 32x84 size increments 8x18 WM hint 118x36
xg_frame_resized old native pixels 1952x1332 new native pixels 1952x1296
adjust_frame_size old native pixels 1952x1332 new native pixels
1952x1296 old text pixels 1904x1332 new text pixels 1904x1296 old text
chars 112x36 new text chars 112x35
base_size 32x84 size increments 8x18 WM hint 118x35
x_new_font old char size 17x37 new char size 17x37 text chars 112x35 old
text pixels 1904x1296 new text pixels 1904x1295
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes
16 borders 0 text width 952 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text
height 647 base height 101 height inc 18
xg_frame_set_char_size old native pixels 1952x1296 new native pixels
1952x1295 outer pixels 976x713 outer rest 0x0
base_size 32x101 size increments 8x18 WM hint 118x34
xg_frame_resized old native pixels 1952x1296 new native pixels 1952x1294
adjust_frame_size old native pixels 1952x1296 new native pixels
1952x1294 old text pixels 1904x1296 new text pixels 1904x1294 old text
chars 112x35 new text chars 112x34
base_size 32x101 size increments 8x18 WM hint 118x34
Like mentioned above, the additional s-f-a evaluations don't get
reflected in the log. I evaluated it about 10 times at the end.
> > Visually, the resulting text seems identical between these two
> > fonts. Maybe the former font name is somehow "autocorrected" into the
> > latter? And that triggers some kind of callback internally that can
> > additionally resize the frame?
>
> Maybe fontset_from_font does such a thing. We'd have to find out first
> whether the values x_new_font finds for font->average_width and
> font_ascent + font_descent differ for the two Inconsolatas.
Anything I can evaluate to find that out?
[-- Attachment #2: Screenshot from 2023-02-09 20-46-24.png --]
[-- Type: image/png, Size: 104596 bytes --]
[-- Attachment #3: Screenshot from 2023-02-09 20-46-30.png --]
[-- Type: image/png, Size: 93453 bytes --]
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-09 19:40 ` Dmitry Gutov
@ 2023-02-11 1:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 8:17 ` Eli Zaretskii
2023-02-11 10:15 ` Dmitry Gutov
2023-02-13 10:09 ` martin rudalics
1 sibling, 2 replies; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-11 1:36 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
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.
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-11 1:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-11 8:17 ` Eli Zaretskii
2023-02-11 9:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 10:15 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: Eli Zaretskii @ 2023-02-11 8:17 UTC (permalink / raw)
To: Po Lu; +Cc: rudalics, rpluim, 60585, dgutov
> From: Po Lu <luangruo@yahoo.com>
> Cc: martin rudalics <rudalics@gmx.at>, Eli Zaretskii <eliz@gnu.org>,
> 60585@debbugs.gnu.org, rpluim@gmail.com
> Date: Sat, 11 Feb 2023 09:36:41 +0800
>
>
> 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.
Should this perhaps be in etc/DEBUG?
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-11 8:17 ` Eli Zaretskii
@ 2023-02-11 9:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 10:39 ` Eli Zaretskii
0 siblings, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-11 9:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rudalics, rpluim, 60585, dgutov
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Po Lu <luangruo@yahoo.com>
>> Cc: martin rudalics <rudalics@gmx.at>, Eli Zaretskii <eliz@gnu.org>,
>> 60585@debbugs.gnu.org, rpluim@gmail.com
>> Date: Sat, 11 Feb 2023 09:36:41 +0800
>>
>>
>> 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.
>
> Should this perhaps be in etc/DEBUG?
I think so. As xprop is also useful when debugging any kind of problem
involving X window properties, so I guess the other uses should be
written down as well.
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-11 1:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 8:17 ` Eli Zaretskii
@ 2023-02-11 10:15 ` Dmitry Gutov
2023-02-11 10:22 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-11 10:15 UTC (permalink / raw)
To: Po Lu; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
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
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
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-11 10:15 ` Dmitry Gutov
@ 2023-02-11 10:22 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 22:08 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-11 10:22 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
Dmitry Gutov <dgutov@yandex.ru> 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?
^ permalink raw reply related [flat|nested] 169+ messages in thread
* 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
2023-02-11 9:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-11 10:39 ` Eli Zaretskii
0 siblings, 0 replies; 169+ messages in thread
From: Eli Zaretskii @ 2023-02-11 10:39 UTC (permalink / raw)
To: Po Lu; +Cc: rudalics, rpluim, 60585, dgutov
> From: Po Lu <luangruo@yahoo.com>
> Cc: dgutov@yandex.ru, rudalics@gmx.at, 60585@debbugs.gnu.org,
> rpluim@gmail.com
> Date: Sat, 11 Feb 2023 17:30:14 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Po Lu <luangruo@yahoo.com>
> >> Cc: martin rudalics <rudalics@gmx.at>, Eli Zaretskii <eliz@gnu.org>,
> >> 60585@debbugs.gnu.org, rpluim@gmail.com
> >> Date: Sat, 11 Feb 2023 09:36:41 +0800
> >>
> >>
> >> 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.
> >
> > Should this perhaps be in etc/DEBUG?
>
> I think so. As xprop is also useful when debugging any kind of problem
> involving X window properties, so I guess the other uses should be
> written down as well.
Then please add this there, and thanks.
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-11 10:22 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-11 22:08 ` Dmitry Gutov
2023-02-12 1:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-11 22:08 UTC (permalink / raw)
To: Po Lu; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
On 11/02/2023 12:22, Po Lu via Bug reports for GNU Emacs, the Swiss army
knife of text editors wrote:
> Dmitry Gutov <dgutov@yandex.ru> 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?
Apply it on top of the already patched Emacs, correct? The one I've been
running most of the tests lately.
During startup, it prints:
XSetWMSizeHints: 2, 2
XSetWMSizeHints: 18, 36
XSetWMSizeHints: 18, 36
XSetWMSizeHints: 18, 36
After I evaluate (set-face-attribute ...), it adds:
XSetWMSizeHints: 20, 44
XSetWMSizeHints: 16, 36
XSetWMSizeHints: 16, 36
After that, whenever the same evaluation results in frame shrinking
(after I resized it with a mouse), it also prints
XSetWMSizeHints: 16, 36
That's it.
But if I repeat the same experiment using the value of :family
"Inconsolata LGC" (with a space), it prints exactly the same values.
Except, since no s-f-a evaluations with that :family cause frame
shrinking, it doesn't print any additional XSetWMSizeHints logs.
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-11 22:08 ` Dmitry Gutov
@ 2023-02-12 1:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12 2:06 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-12 1:45 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 11/02/2023 12:22, Po Lu via Bug reports for GNU Emacs, the Swiss
> army knife of text editors wrote:
>> Dmitry Gutov <dgutov@yandex.ru> 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?
>
> Apply it on top of the already patched Emacs, correct? The one I've
> been running most of the tests lately.
>
> During startup, it prints:
>
> XSetWMSizeHints: 2, 2
> XSetWMSizeHints: 18, 36
> XSetWMSizeHints: 18, 36
> XSetWMSizeHints: 18, 36
>
> After I evaluate (set-face-attribute ...), it adds:
>
> XSetWMSizeHints: 20, 44
> XSetWMSizeHints: 16, 36
> XSetWMSizeHints: 16, 36
>
> After that, whenever the same evaluation results in frame shrinking
> (after I resized it with a mouse), it also prints
>
> XSetWMSizeHints: 16, 36
>
> That's it.
Right... thanks.
I'm interested in why XSetWMSizeHints might be called with 20, 44.
Would you please put a breakpoint there and make it conditional on
those values of hints->width_inc and hints->height_inc?
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-12 1:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-12 2:06 ` Dmitry Gutov
2023-02-12 3:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-12 2:06 UTC (permalink / raw)
To: Po Lu; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
On 12/02/2023 03:45, Po Lu via Bug reports for GNU Emacs, the Swiss army
knife of text editors wrote:
> Dmitry Gutov<dgutov@yandex.ru> writes:
>
>> On 11/02/2023 12:22, Po Lu via Bug reports for GNU Emacs, the Swiss
>> army knife of text editors wrote:
>>> Dmitry Gutov<dgutov@yandex.ru> 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?
>> Apply it on top of the already patched Emacs, correct? The one I've
>> been running most of the tests lately.
>>
>> During startup, it prints:
>>
>> XSetWMSizeHints: 2, 2
>> XSetWMSizeHints: 18, 36
>> XSetWMSizeHints: 18, 36
>> XSetWMSizeHints: 18, 36
>>
>> After I evaluate (set-face-attribute ...), it adds:
>>
>> XSetWMSizeHints: 20, 44
>> XSetWMSizeHints: 16, 36
>> XSetWMSizeHints: 16, 36
>>
>> After that, whenever the same evaluation results in frame shrinking
>> (after I resized it with a mouse), it also prints
>>
>> XSetWMSizeHints: 16, 36
>>
>> That's it.
> Right... thanks.
>
> I'm interested in why XSetWMSizeHints might be called with 20, 44.
> Would you please put a breakpoint there and make it conditional on
> those values of hints->width_inc and hints->height_inc?
Done.
You didn't specify what information you wanted from that breakpoint, so
here's everything that came to mind:
Thread 1 "emacs" hit Breakpoint 3, XSetWMSizeHints (d=0x555555eb5e20,
w=58720469, hints=0x7fffffffc870, prop=40) at emacsgtkfixed.c:187
187 if (hints->flags & PResizeInc)
(gdb) xbacktrace
"internal-set-lisp-face-attribute" (0xf09ff218)
"set-face-attribute" (0xffffd8c0)
"progn" (0xffffda70)
"eval" (0xf09ff180)
"elisp--eval-last-sexp" (0xf09ff100)
"eval-last-sexp" (0xffffdc50)
"funcall-interactively" (0xffffdc48)
"call-interactively" (0xf09ff070)
"command-execute" (0xffffdef8)
(gdb) p hints->width_inc
$1 = 20
(gdb) p hints->height_inc
$2 = 44
(gdb) backtrace
#0 XSetWMSizeHints (d=0x555555eb5e20, w=58720469, hints=0x7fffffffc870,
prop=40) at emacsgtkfixed.c:187
#1 0x00007ffff7575fa5 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#2 0x00007ffff79bd37b in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#3 0x00007ffff706231c in g_signal_emit_valist () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4 0x00007ffff7062403 in g_signal_emit () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5 0x00007ffff7774980 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
#6 0x00007ffff706231c in g_signal_emit_valist () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7 0x00007ffff7062403 in g_signal_emit () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8 0x00007ffff753ec3b in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#9 0x00007ffff752b2ab in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
#10 0x00007ffff6f4bb02 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff6f4b43f in g_main_context_dispatch () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff6fa03c8 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff6f48d20 in g_main_context_iteration () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff7847609 in gtk_main_iteration () at
/lib/x86_64-linux-gnu/libgtk-3.so.0
#15 0x000055555569ad52 in XTread_socket (terminal=<optimized out>,
hold_quit=0x7fffffffd0a0) at xterm.c:25148
#16 0x00005555556e8491 in gobble_input () at keyboard.c:7416
#17 0x00005555556eb66d in handle_async_input () at keyboard.c:7647
#18 process_pending_signals () at keyboard.c:7661
#19 unblock_input_to (level=0) at keyboard.c:7676
#20 unblock_input_to (level=0) at keyboard.c:7670
#21 totally_unblock_input () at keyboard.c:7704
#22 0x00005555556a2a0c in x_wait_for_event (f=f@entry=0x5555563131e0,
eventtype=eventtype@entry=22) at xterm.c:27809
#23 0x00005555556d097f in xg_frame_set_char_size
(f=f@entry=0x5555563131e0, width=width@entry=1728,
height=height@entry=1620) at gtkutil.c:1425
#24 0x00005555556a2d71 in x_set_window_size (f=0x5555563131e0,
change_gravity=<optimized out>, width=1728, height=1620) at xterm.c:27916
#25 0x00005555555bd8b4 in adjust_frame_size
(f=f@entry=0x5555563131e0, new_text_width=1680,
new_text_height=<optimized out>, inhibit=inhibit@entry=3,
pretend=pretend@entry=false, parameter=parameter@entry=XIL(0x7860)) at
frame.c:779
#26 0x000055555568f0e6 in x_new_font (f=0x5555563131e0,
font_object=XIL(0x55555695e80d), fontset=28) at xterm.c:26576
#27 0x00005555555c49a6 in gui_set_font (f=0x5555563131e0,
arg=XIL(0x5555569060a4), oldval=XIL(0x55555627fa54)) at frame.c:4791
#28 0x00005555555c2349 in gui_set_frame_parameters_1
(f=f@entry=0x5555563131e0, alist=<optimized out>,
alist@entry=XIL(0x7fffffffd6f3),
default_parameter=default_parameter@entry=true) at frame.c:4383
#29 0x0000555555680221 in set_font_frame_param
(lface=XIL(0x5555563650d5), frame=XIL(0x5555563131e5)) at xfaces.c:3816
#30 Finternal_set_lisp_face_attribute (face=XIL(0x5940), attr=<optimized
out>, value=<optimized out>, frame=<optimized out>) at xfaces.c:3629
#31 0x000055555567eeb8 in Finternal_set_lisp_face_attribute
(face=XIL(0x5940), attr=XIL(0xdb0), value=XIL(0x555556905a94),
frame=<optimized out>) at xfaces.c:3092
...
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-12 2:06 ` Dmitry Gutov
@ 2023-02-12 3:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12 12:41 ` Dmitry Gutov
2023-02-12 12:55 ` Dmitry Gutov
0 siblings, 2 replies; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-12 3:26 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
Dmitry Gutov <dgutov@yandex.ru> writes:
> Thread 1 "emacs" hit Breakpoint 3, XSetWMSizeHints (d=0x555555eb5e20,
> w=58720469, hints=0x7fffffffc870, prop=40) at emacsgtkfixed.c:187
> 187 if (hints->flags & PResizeInc)
> (gdb) xbacktrace
> "internal-set-lisp-face-attribute" (0xf09ff218)
> "set-face-attribute" (0xffffd8c0)
> "progn" (0xffffda70)
> "eval" (0xf09ff180)
> "elisp--eval-last-sexp" (0xf09ff100)
> "eval-last-sexp" (0xffffdc50)
> "funcall-interactively" (0xffffdc48)
> "call-interactively" (0xf09ff070)
> "command-execute" (0xffffdef8)
> (gdb) p hints->width_inc
> $1 = 20
> (gdb) p hints->height_inc
> $2 = 44
> (gdb) backtrace
> #0 XSetWMSizeHints (d=0x555555eb5e20, w=58720469,
> hints=0x7fffffffc870, prop=40) at emacsgtkfixed.c:187
> #1 0x00007ffff7575fa5 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
> #2 0x00007ffff79bd37b in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
> #3 0x00007ffff706231c in g_signal_emit_valist () at
> /lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #4 0x00007ffff7062403 in g_signal_emit () at
> /lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #5 0x00007ffff7774980 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0
> #6 0x00007ffff706231c in g_signal_emit_valist () at
> /lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #7 0x00007ffff7062403 in g_signal_emit () at
> /lib/x86_64-linux-gnu/libgobject-2.0.so.0
> #8 0x00007ffff753ec3b in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
> #9 0x00007ffff752b2ab in () at /lib/x86_64-linux-gnu/libgdk-3.so.0
> #10 0x00007ffff6f4bb02 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #11 0x00007ffff6f4b43f in g_main_context_dispatch () at
> /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #12 0x00007ffff6fa03c8 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #13 0x00007ffff6f48d20 in g_main_context_iteration () at
> /lib/x86_64-linux-gnu/libglib-2.0.so.0
> #14 0x00007ffff7847609 in gtk_main_iteration () at
> /lib/x86_64-linux-gnu/libgtk-3.so.0
> #15 0x000055555569ad52 in XTread_socket (terminal=<optimized out>,
> hold_quit=0x7fffffffd0a0) at xterm.c:25148
> #16 0x00005555556e8491 in gobble_input () at keyboard.c:7416
> #17 0x00005555556eb66d in handle_async_input () at keyboard.c:7647
> #18 process_pending_signals () at keyboard.c:7661
> #19 unblock_input_to (level=0) at keyboard.c:7676
> #20 unblock_input_to (level=0) at keyboard.c:7670
> #21 totally_unblock_input () at keyboard.c:7704
> #22 0x00005555556a2a0c in x_wait_for_event (f=f@entry=0x5555563131e0,
> eventtype=eventtype@entry=22) at xterm.c:27809
> #23 0x00005555556d097f in xg_frame_set_char_size
> (f=f@entry=0x5555563131e0, width=width@entry=1728,
> height=height@entry=1620) at gtkutil.c:1425
> #24 0x00005555556a2d71 in x_set_window_size (f=0x5555563131e0,
> change_gravity=<optimized out>, width=1728, height=1620) at
> xterm.c:27916
> #25 0x00005555555bd8b4 in adjust_frame_size
> (f=f@entry=0x5555563131e0, new_text_width=1680,
> new_text_height=<optimized out>, inhibit=inhibit@entry=3,
> pretend=pretend@entry=false,
> parameter=parameter@entry=XIL(0x7860)) at frame.c:779
> #26 0x000055555568f0e6 in x_new_font (f=0x5555563131e0,
> font_object=XIL(0x55555695e80d), fontset=28) at xterm.c:26576
> #27 0x00005555555c49a6 in gui_set_font (f=0x5555563131e0,
> arg=XIL(0x5555569060a4), oldval=XIL(0x55555627fa54)) at frame.c:4791
> #28 0x00005555555c2349 in gui_set_frame_parameters_1
> (f=f@entry=0x5555563131e0, alist=<optimized out>,
> alist@entry=XIL(0x7fffffffd6f3),
> default_parameter=default_parameter@entry=true) at frame.c:4383
> #29 0x0000555555680221 in set_font_frame_param
> (lface=XIL(0x5555563650d5), frame=XIL(0x5555563131e5)) at
> xfaces.c:3816
> #30 Finternal_set_lisp_face_attribute (face=XIL(0x5940),
> attr=<optimized out>, value=<optimized out>, frame=<optimized out>)
> at xfaces.c:3629
> #31 0x000055555567eeb8 in Finternal_set_lisp_face_attribute
> (face=XIL(0x5940), attr=XIL(0xdb0), value=XIL(0x555556905a94),
> frame=<optimized out>) at xfaces.c:3092
> ...
Right, thank you. If you go up to frame 23, and then:
(gdb) p f->size_hints
(gdb) p f->hint_flags
What is displayed?
Also, what is:
(gdb) p xg_get_scale (f)
?
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-12 3:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-12 12:41 ` Dmitry Gutov
2023-02-13 2:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12 12:55 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-12 12:41 UTC (permalink / raw)
To: Po Lu; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
On 12/02/2023 05:26, Po Lu wrote:
> Right, thank you. If you go up to frame 23, and then:
>
> (gdb) p f->size_hints
> (gdb) p f->hint_flags
>
> What is displayed?
> Also, what is:
>
> (gdb) p xg_get_scale (f)
(gdb) p f->size_hints
There is no member named size_hints.
(gdb) p f->hint_flags
There is no member named hint_flags.
(gdb) p f
$5 = (struct frame *) 0x5555562c3060
(gdb) xpr
Lisp_Symbol
$6 = (struct Lisp_Symbol *) 0xaaaaac05fc40
Cannot access memory at address 0xaaaaac05fc48
(gdb) p f->output_data.x->size_hints
$8 = {
min_width = 34,
min_height = 106,
max_width = 0,
max_height = 0,
base_width = 34,
base_height = 106,
width_inc = 10,
height_inc = 22,
min_aspect = 0,
max_aspect = 0,
win_gravity = GDK_GRAVITY_NORTH_WEST
}
(gdb) p f->output_data.x->hint_flags
$9 = 106
(gdb) xpr
Lisp_Int0
$10 = 26
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-12 3:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12 12:41 ` Dmitry Gutov
@ 2023-02-12 12:55 ` Dmitry Gutov
1 sibling, 0 replies; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-12 12:55 UTC (permalink / raw)
To: Po Lu; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
On 12/02/2023 05:26, Po Lu wrote:
> Also, what is:
>
> (gdb) p xg_get_scale (f)
(gdb) p xg_get_scale (f)
$1 = 2
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-12 12:41 ` Dmitry Gutov
@ 2023-02-13 2:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-16 2:09 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-13 2:56 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 12/02/2023 05:26, Po Lu wrote:
>> Right, thank you. If you go up to frame 23, and then:
>> (gdb) p f->size_hints
>> (gdb) p f->hint_flags
>> What is displayed?
>> Also, what is:
>> (gdb) p xg_get_scale (f)
>
> (gdb) p f->size_hints
> There is no member named size_hints.
> (gdb) p f->hint_flags
> There is no member named hint_flags.
> (gdb) p f
> $5 = (struct frame *) 0x5555562c3060
> (gdb) xpr
> Lisp_Symbol
> $6 = (struct Lisp_Symbol *) 0xaaaaac05fc40
> Cannot access memory at address 0xaaaaac05fc48
>
> (gdb) p f->output_data.x->size_hints
> $8 = {
> min_width = 34,
> min_height = 106,
> max_width = 0,
> max_height = 0,
> base_width = 34,
> base_height = 106,
> width_inc = 10,
> height_inc = 22,
> min_aspect = 0,
> max_aspect = 0,
> win_gravity = GDK_GRAVITY_NORTH_WEST
> }
> (gdb) p f->output_data.x->hint_flags
> $9 = 106
> (gdb) xpr
> Lisp_Int0
> $10 = 26
Thanks.
What is f->column_width and f->line_height? If you go up to x_new_font,
what is font->average_width, font_ascent and font_descent?
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-09 19:40 ` Dmitry Gutov
2023-02-11 1:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-13 10:09 ` martin rudalics
2023-02-17 2:05 ` Dmitry Gutov
1 sibling, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-02-13 10:09 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
>> > The end of *foo* for GTK3 contains:
>> >
>> > xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
>> > xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
>> > xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
>> > char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
>> > xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
>> > char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text height 648 base height 84 height inc 18
>> > xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
>> > base_size 33x84 size increments 9x18 WM hint 79x35
>>
>> Can you show me the text pixels values? These are the ones we should
>> compare. The native values differ because for Lucid the height includes
>> the toolbar which we draw ourselves into the rectangle the WM allots to
>> us. GTK draws the toolbar into its own area which is outside the native
>> rectangle.
>
> How do I get that numbers?
It's what in *foo* should appear after "new text pixels".
>> > And for Lucid, it contains:
>> >
>> > EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
>> > EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
>> > adjust_frame_size old native pixels 1474x1332 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
>>
>> Here I would have liked to see the value for the scroll bar - vscroll.
>> I suppose these differ on Lucid and GTK.
That's what in *foo* should appear after "vscroll".
>> > Lucid's menu bar and tool bar look shorter in height, with less padding. The font size seems to be equal, however.
>>
>> When you put the two frames side by side, does the text area start lower
>> with GTK? Here they start at exactly the same pixel position. I attach
>> a screenshot so you can see.
>
> It does. See the attached screenshots with unpatched builds.
I see. BTW, your Lucid scroll bar doesn't seem to have a ruler (or
thumb, or whatever you call it) nor the arrows at top and bottom.
> I think the above means that x_new_font is called for the second time even in the Lucid build. Anyway, with GNOME and the patch:
>
> It is hit twice, and both calls seems to have the same backtrace.
>
> (gdb) xbacktrace
> "internal-set-lisp-face-attribute" (0xf09ff218)
> "set-face-attribute" (0xffffd8c0)
> "progn" (0xffffda70)
> "eval" (0xf09ff180)
> "elisp--eval-last-sexp" (0xf09ff100)
> "eval-last-sexp" (0xffffdc50)
> "funcall-interactively" (0xffffdc48)
> "call-interactively" (0xf09ff070)
> "command-execute" (0xffffdef8)
>
> and
>
> (gdb) backtrace
> #0 x_new_font (f=0x5555562f8430, font_object=0x5555569e1a45, fontset=-1) at xterm.c:26517
> #1 0x00005555555c4656 in gui_set_font (f=0x5555562f8430, arg=0x5555568fe364, oldval=0x55555622d224) at frame.c:4733
> #2 0x00005555555c1ff9 in gui_set_frame_parameters_1 (f=f@entry=0x5555562f8430, alist=<optimized out>, alist@entry=0x7fffffffd6f3, default_parameter=default_parameter@entry=true) at frame.c:4325
> #3 0x000055555567fea1 in set_font_frame_param (lface=0x5555562f6e45, frame=0x5555562f8435) at xfaces.c:3816
> #4 Finternal_set_lisp_face_attribute (face=0x5940, attr=<optimized out>, value=<optimized out>, frame=<optimized out>) at xfaces.c:3629
> #5 0x000055555567eb38 in Finternal_set_lisp_face_attribute (face=0x5940, attr=0xdb0, value=0x5555568fe544, frame=<optimized out>) at xfaces.c:3092
> ...
>
> vs
>
> (gdb) backtrace
> #0 x_new_font (f=0x5555562f8430, font_object=0x555556945b6d, fontset=-1) at xterm.c:26517
> #1 0x00005555555c4656 in gui_set_font (f=0x5555562f8430, arg=0x5555563e1e74, oldval=0x5555568fe364) at frame.c:4733
> #2 0x00005555555c1ff9 in gui_set_frame_parameters_1 (f=f@entry=0x5555562f8430, alist=<optimized out>, alist@entry=0x7fffffffd6f3, default_parameter=default_parameter@entry=true) at frame.c:4325
> #3 0x000055555567fea1 in set_font_frame_param (lface=0x5555562f6e45, frame=0x5555562f8435) at xfaces.c:3816
> #4 Finternal_set_lisp_face_attribute (face=0x5940, attr=<optimized out>, value=<optimized out>, frame=<optimized out>) at xfaces.c:3629
> #5 0x000055555567eb38 in Finternal_set_lisp_face_attribute (face=0x5940, attr=0x1020, value=0x1ba, frame=<optimized out>) at xfaces.c:3092
> ...
>
> What seems to be different between the two are the font_object argument to x_new_font and the arguments to Finternal_set_lisp_face_attribute at the end of the backtrace.
>
> It seems like they are called twice because my original example sets two attributes: :height and :family.
So whenever we do 'set-face-attribute' to set both :height and :family,
we do the frame resizing twice, once for the family which apparently
assigns a new character size and once for the height. This is bad: Why
ask the WM twice to set the frame size in one and the same call? When
'frame-inhibit-implied-resize' is nil, these calls should be collapsed
into one and setting the size hint values should be always delayed.
>> > Should we try to circle back to finding the difference between
>> > "InconsolataLGC" and "Inconsolata LGC"? The latter doesn't exhibit
>> > most of the problematic behaviors we have been discussing here.
>>
>> The first thing to try would be obvious: Does the latter trigger the
>> "two x_new_font entries in *foo* in a row behavior"?
>
> When called for the first time -- yes:
>
> x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
> xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10
> char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22
> xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x0
> base_size 34x106 size increments 10x22 WM hint 83x35
> xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
> adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36
> base_size 34x106 size increments 10x22 WM hint 83x35
>
> x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332
> xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
> char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18
> xg_frame_set_char_size old native pixels 1728x1620 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
> base_size 32x84 size increments 8x18 WM hint 84x36
> xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
> adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
> base_size 32x84 size increments 8x18 WM hint 84x36
>
> When called the second time -- no:
>
> x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
>
> When called the third time and further -- no entries are added to *foo* at all.
OK. But what _is_ the difference between the "InconsolataLGC" and
"Inconsolata LGC" calls here? IIUC the "called for the first time"
behavior for "InconsolataLGC" is that the second x_new_font call does
not happen. Is that right? Please post the respective section of *foo*
for that first call so we can compare how it differs from the
"Inconsolata LGC" one.
To elaborate: The trace you show above resizes the frame twice,
apparently once for the :height and once for the :family change. So we
should find out why the call for "InconsolataLGC" does not try to resize
the frame twice. It should be something like not finding a suitable
font with "InconsolataLGC" or at least one that does not ask for
changing the height
BTW - do we call x_new_font for the :height first here (which would be
bad IMO)?
>> > Visually, the resulting text seems identical between these two
>> > fonts. Maybe the former font name is somehow "autocorrected" into the
>> > latter? And that triggers some kind of callback internally that can
>> > additionally resize the frame?
>>
>> Maybe fontset_from_font does such a thing. We'd have to find out first
>> whether the values x_new_font finds for font->average_width and
>> font_ascent + font_descent differ for the two Inconsolatas.
>
> Anything I can evaluate to find that out?
We had it in *foo* but I removed it because it didn't show anything
unexpected. Putting a breakpoint after the line
get_font_ascent_descent (font, &font_ascent, &font_descent);
in xterm.c should do (it's probably the second hit). Then print the
values of font->average_width, font_ascent and font_descent but make
sure to do it for both - "InconsolataLGC" and "Inconsolata LGC" - so we
can compare them.
Thanks, martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-13 2:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-16 2:09 ` Dmitry Gutov
2023-02-16 3:00 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-16 2:09 UTC (permalink / raw)
To: Po Lu; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
On 13/02/2023 04:56, Po Lu wrote:
> Dmitry Gutov<dgutov@yandex.ru> writes:
>
>> On 12/02/2023 05:26, Po Lu wrote:
>>> Right, thank you. If you go up to frame 23, and then:
>>> (gdb) p f->size_hints
>>> (gdb) p f->hint_flags
>>> What is displayed?
>>> Also, what is:
>>> (gdb) p xg_get_scale (f)
>> (gdb) p f->size_hints
>> There is no member named size_hints.
>> (gdb) p f->hint_flags
>> There is no member named hint_flags.
>> (gdb) p f
>> $5 = (struct frame *) 0x5555562c3060
>> (gdb) xpr
>> Lisp_Symbol
>> $6 = (struct Lisp_Symbol *) 0xaaaaac05fc40
>> Cannot access memory at address 0xaaaaac05fc48
>>
>> (gdb) p f->output_data.x->size_hints
>> $8 = {
>> min_width = 34,
>> min_height = 106,
>> max_width = 0,
>> max_height = 0,
>> base_width = 34,
>> base_height = 106,
>> width_inc = 10,
>> height_inc = 22,
>> min_aspect = 0,
>> max_aspect = 0,
>> win_gravity = GDK_GRAVITY_NORTH_WEST
>> }
>> (gdb) p f->output_data.x->hint_flags
>> $9 = 106
>> (gdb) xpr
>> Lisp_Int0
>> $10 = 26
> Thanks.
>
> What is f->column_width and f->line_height? If you go up to x_new_font,
> what is font->average_width, font_ascent and font_descent?
Here you go:
(gdb) frame 23
#23 0x00005555556d097f in xg_frame_set_char_size
(f=f@entry=0x55555630eb60, width=width@entry=1728,
height=height@entry=1620) at gtkutil.c:1425
1425 x_wait_for_event (f, ConfigureNotify);
(gdb) print f->column_width
$2 = 21
(gdb) print f->line_height
$3 = 45
(gdb) frame 26
#26 0x000055555568f0e6 in x_new_font (f=0x55555630eb60,
font_object=XIL(0x5555560e3465), fontset=27) at xterm.c:26576
26576 adjust_frame_size
(gdb) print font->average_width
$4 = 21
(gdb) print font_ascent
$5 = 37
(gdb) print font_descent
$6 = 8
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-16 2:09 ` Dmitry Gutov
@ 2023-02-16 3:00 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-16 22:18 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-16 3:00 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
Dmitry Gutov <dgutov@yandex.ru> writes:
> Here you go:
>
> (gdb) frame 23
> #23 0x00005555556d097f in xg_frame_set_char_size
> (f=f@entry=0x55555630eb60, width=width@entry=1728,
> height=height@entry=1620) at gtkutil.c:1425
> 1425 x_wait_for_event (f, ConfigureNotify);
> (gdb) print f->column_width
> $2 = 21
> (gdb) print f->line_height
> $3 = 45
> (gdb) frame 26
> #26 0x000055555568f0e6 in x_new_font (f=0x55555630eb60,
> font_object=XIL(0x5555560e3465), fontset=27) at xterm.c:26576
> 26576 adjust_frame_size
> (gdb) print font->average_width
> $4 = 21
> (gdb) print font_ascent
> $5 = 37
> (gdb) print font_descent
> $6 = 8
These ascent and descent measurements are not correct for your font,
right? What does:
(gdb) p font_object
(gdb) xfont
say?
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-16 3:00 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-16 22:18 ` Dmitry Gutov
2023-02-17 2:43 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-16 22:18 UTC (permalink / raw)
To: Po Lu; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
On 16/02/2023 05:00, Po Lu wrote:
> Dmitry Gutov<dgutov@yandex.ru> writes:
>
>> Here you go:
>>
>> (gdb) frame 23
>> #23 0x00005555556d097f in xg_frame_set_char_size
>> (f=f@entry=0x55555630eb60, width=width@entry=1728,
>> height=height@entry=1620) at gtkutil.c:1425
>> 1425 x_wait_for_event (f, ConfigureNotify);
>> (gdb) print f->column_width
>> $2 = 21
>> (gdb) print f->line_height
>> $3 = 45
>> (gdb) frame 26
>> #26 0x000055555568f0e6 in x_new_font (f=0x55555630eb60,
>> font_object=XIL(0x5555560e3465), fontset=27) at xterm.c:26576
>> 26576 adjust_frame_size
>> (gdb) print font->average_width
>> $4 = 21
>> (gdb) print font_ascent
>> $5 = 37
>> (gdb) print font_descent
>> $6 = 8
> These ascent and descent measurements are not correct for your font,
> right? What does:
>
> (gdb) p font_object
> (gdb) xfont
>
> say?
The output doesn't seem very useful:
(gdb) p font_object
$6 = XIL(0x55555692631d)
(gdb) xfont
$7 = (struct font *) 0x555556926318
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-13 10:09 ` martin rudalics
@ 2023-02-17 2:05 ` Dmitry Gutov
2023-02-20 9:05 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-17 2:05 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
[-- Attachment #1: Type: text/plain, Size: 11643 bytes --]
Hi Martin,
It becomes ever more difficult to remember the context. E.g. which
operations I should do with each build before looking up this or that value.
On 13/02/2023 12:09, martin rudalics wrote:
> >> > The end of *foo* for GTK3 contains:
> >> >
> >> > xg_frame_resized old native pixels 1488x1296 new native pixels
> 1488x1346
> >> > xg_frame_resized old native pixels 1488x1296 new native pixels
> 1488x1296
> >> > xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32
> fringes 16 borders 0 text width 720 base width 33 width inc 9
> >> > char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text
> height 648 base height 43 height inc 18
> >> > xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32
> fringes 16 borders 0 text width 720 base width 33 width inc 9
> >> > char height 36 menubar 50 toolbar 82 hscroll 0 borders 0
> text height 648 base height 84 height inc 18
> >> > xg_frame_set_char_size old native pixels 1488x1296 new native
> pixels 1488x1296 outer pixels 744x714 outer rest 0x0
> >> > base_size 33x84 size increments 9x18 WM hint 79x35
> >>
> >> Can you show me the text pixels values? These are the ones we should
> >> compare. The native values differ because for Lucid the height
> includes
> >> the toolbar which we draw ourselves into the rectangle the WM allots to
> >> us. GTK draws the toolbar into its own area which is outside the
> native
> >> rectangle.
> >
> > How do I get that numbers?
>
> It's what in *foo* should appear after "new text pixels".
>
> >> > And for Lucid, it contains:
> >> >
> >> > EmacsFrameResize old native pixels 1474x1332 new native pixels
> 1474x1354
> >> > EmacsFrameResize old native pixels 1474x1332 new native pixels
> 1474x1354
> >> > adjust_frame_size old native pixels 1474x1332 new native pixels
> 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text
> chars 80x36 new text chars 80x36
> >>
> >> Here I would have liked to see the value for the scroll bar - vscroll.
> >> I suppose these differ on Lucid and GTK.
>
> That's what in *foo* should appear after "vscroll".
It seems like it would be better to just attach the foo logs for both.
See foo-gtk3.txt and foo-lucid.txt attached.
These logs are of 'emacs -Q' followed by evaluating
(set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
> >> > Lucid's menu bar and tool bar look shorter in height, with less
> padding. The font size seems to be equal, however.
> >>
> >> When you put the two frames side by side, does the text area start
> lower
> >> with GTK? Here they start at exactly the same pixel position. I
> attach
> >> a screenshot so you can see.
> >
> > It does. See the attached screenshots with unpatched builds.
>
> I see. BTW, your Lucid scroll bar doesn't seem to have a ruler (or
> thumb, or whatever you call it) nor the arrows at top and bottom.
Indeed. Not sure if it's supposed to.
The scrollbar itself is not very functional: it shows the scroll
progress of the buffer, but to scroll back using the mouse clicks seems
impossible (all scrolling proceeds in one direction).
> > What seems to be different between the two are the font_object
> argument to x_new_font and the arguments to
> Finternal_set_lisp_face_attribute at the end of the backtrace.
> >
> > It seems like they are called twice because my original example sets
> two attributes: :height and :family.
>
> So whenever we do 'set-face-attribute' to set both :height and :family,
> we do the frame resizing twice, once for the family which apparently
> assigns a new character size and once for the height. This is bad: Why
> ask the WM twice to set the frame size in one and the same call? When
> 'frame-inhibit-implied-resize' is nil, these calls should be collapsed
> into one and setting the size hint values should be always delayed.
Makes sense. Though it's hard for me to tell at which step the variable
should be appled.
> >> > Should we try to circle back to finding the difference between
> >> > "InconsolataLGC" and "Inconsolata LGC"? The latter doesn't exhibit
> >> > most of the problematic behaviors we have been discussing here.
> >>
> >> The first thing to try would be obvious: Does the latter trigger the
> >> "two x_new_font entries in *foo* in a row behavior"?
> >
> > When called for the first time -- yes:
> >
> > x_new_font old char size 18x36 new char size 21x45 text chars 80x36
> old text pixels 1440x1296 new text pixels 1680x1620
> > xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32
> fringes 16 borders 0 text width 840 base width 34 width inc 10
> > char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text
> height 810 base height 106 height inc 22
> > xg_frame_set_char_size old native pixels 1488x1296 new native pixels
> 1728x1620 outer pixels 864x876 outer rest 0x0
> > base_size 34x106 size increments 10x22 WM hint 83x35
> > xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
> > adjust_frame_size old native pixels 1488x1296 new native pixels
> 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text
> chars 80x36 new text chars 80x36
> > base_size 34x106 size increments 10x22 WM hint 83x35
> >
> > x_new_font old char size 21x45 new char size 17x37 text chars 80x36
> old text pixels 1680x1620 new text pixels 1360x1332
> > xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32
> fringes 16 borders 0 text width 680 base width 32 width inc 8
> > char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text
> height 666 base height 84 height inc 18
> > xg_frame_set_char_size old native pixels 1728x1620 new native pixels
> 1408x1332 outer pixels 704x732 outer rest 0x0
> > base_size 32x84 size increments 8x18 WM hint 84x36
> > xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
> > adjust_frame_size old native pixels 1728x1620 new native pixels
> 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text
> chars 80x36 new text chars 80x36
> > base_size 32x84 size increments 8x18 WM hint 84x36
> >
> > When called the second time -- no:
> >
> > x_new_font old char size 17x37 new char size 17x37 text chars 80x36
> old text pixels 1360x1332 new text pixels 1360x1332
> >
> > When called the third time and further -- no entries are added to
> *foo* at all.
>
> OK. But what _is_ the difference between the "InconsolataLGC" and
> "Inconsolata LGC" calls here? IIUC the "called for the first time"
> behavior for "InconsolataLGC" is that the second x_new_font call does
> not happen. Is that right? Please post the respective section of *foo*
> for that first call so we can compare how it differs from the
> "Inconsolata LGC" one.
First call for "InconsolataLGC":
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old
text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes
16 borders 0 text width 840 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text
height 810 base height 106 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels
1728x1620 outer pixels 864x876 outer rest 0x0
base_size 34x106 size increments 10x22 WM hint 83x35
xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
adjust_frame_size old native pixels 1488x1296 new native pixels
1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text
chars 80x36 new text chars 80x36
base_size 34x106 size increments 10x22 WM hint 83x35
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old
text pixels 1680x1620 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes
16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text
height 666 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1728x1620 new native pixels
1408x1332 outer pixels 704x732 outer rest 0x0
base_size 32x84 size increments 8x18 WM hint 84x36
xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
adjust_frame_size old native pixels 1728x1620 new native pixels
1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text
chars 80x36 new text chars 80x36
base_size 32x84 size increments 8x18 WM hint 84x36
The second and all subsequent ones look like this:
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old
text pixels 1360x1332 new text pixels 1360x1332
x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old
text pixels 1360x1332 new text pixels 1360x1332
(This is while keeping the frame in its default size; no resizing with
the mouse.)
> To elaborate: The trace you show above resizes the frame twice,
> apparently once for the :height and once for the :family change. So we
> should find out why the call for "InconsolataLGC" does not try to resize
> the frame twice.
It looks like both trigger two x_new_fonts calls the first time. And
maybe resize the frame twice, which could be hard to register with the
human eye. But then one continues to do that (under certain conditions),
and another stops.
> It should be something like not finding a suitable
> font with "InconsolataLGC" or at least one that does not ask for
> changing the height
That's what I was thinking: "InconsolataLGC" falls back to "Inconsolata
LGC", but that's not registered in some internal data structure, so
whenever a new set-face-attribute call arrives, the comparison fails,
and the search is repeated.
> BTW - do we call x_new_font for the :height first here (which would be
> bad IMO)?
That seems difficult to answer with gdb: too many
internal-set-lisp-face-attribute calls during Emacs's startup.
But set-face-attribute's definition (and stepping through it with edebug
for good measure) shows that :family is processed first.
I think this was also brought up in a recent bug discussion with
Gregory: :family and :foundary and processed before the other
attributes. But he recommended people used :font instead, for other reasons.
> >> > Visually, the resulting text seems identical between these two
> >> > fonts. Maybe the former font name is somehow "autocorrected" into
> the
> >> > latter? And that triggers some kind of callback internally that can
> >> > additionally resize the frame?
> >>
> >> Maybe fontset_from_font does such a thing. We'd have to find out first
> >> whether the values x_new_font finds for font->average_width and
> >> font_ascent + font_descent differ for the two Inconsolatas.
> >
> > Anything I can evaluate to find that out?
>
> We had it in *foo* but I removed it because it didn't show anything
> unexpected. Putting a breakpoint after the line
>
> get_font_ascent_descent (font, &font_ascent, &font_descent);
>
> in xterm.c should do (it's probably the second hit). Then print the
> values of font->average_width, font_ascent and font_descent but make
> sure to do it for both - "InconsolataLGC" and "Inconsolata LGC" - so we
> can compare them.
InconsolataLGC:
first hit:
(gdb) p font->average_width
$1 = 21
(gdb) p font_ascent
$2 = 37
(gdb) p font_descent
$3 = 8
second hit:
(gdb) p font->average_width
$4 = 17
(gdb) p font_ascent
$5 = 31
(gdb) p font_descent
$6 = 6
Inconsolata LGC:
Exactly the same.
[-- Attachment #2: foo-gtk3.txt --]
[-- Type: text/plain, Size: 3263 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1456x900 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1456x900 new native pixels 1456x1296 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
adjust_frame_size old native pixels 1456x1296 new native pixels 1488x1296 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x698
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x673
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1346
xg_frame_resized old native pixels 1488x1296 new native pixels 1488x1296
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 0 hscroll 0 borders 0 text height 648 base height 43 height inc 18
xg_wm_set_size_hint scale 2 char width 18 toolbar 0 vscroll 32 fringes 16 borders 0 text width 720 base width 33 width inc 9
char height 36 menubar 50 toolbar 82 hscroll 0 borders 0 text height 648 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1488x1296 outer pixels 744x714 outer rest 0x0
base_size 33x84 size increments 9x18 WM hint 79x35
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10
char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22
xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x0
base_size 34x106 size increments 10x22 WM hint 83x35
xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36
base_size 34x106 size increments 10x22 WM hint 83x35
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332
xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18
xg_frame_set_char_size old native pixels 1728x1620 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
base_size 32x84 size increments 8x18 WM hint 84x36
xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
base_size 32x84 size increments 8x18 WM hint 84x36
[-- Attachment #3: foo-lucid.txt --]
[-- Type: text/plain, Size: 4546 bytes --]
adjust_frame_size old native pixels 80x25 new native pixels 80x25 old text pixels 80x25 new text pixels 80x24 old text chars 80x25 new text chars 80x24
adjust_frame_size old native pixels 80x25 new native pixels 1458x902 old text pixels 80x25 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1458x902 new native pixels 1458x938 old text pixels 1440x900 new text pixels 1440x900 old text chars 80x25 new text chars 80x25
adjust_frame_size old native pixels 1458x938 new native pixels 1458x1332 old text pixels 1440x900 new text pixels 1440x1296 old text chars 80x25 new text chars 80x36
update_from_various_frame_slots native pixels 1458x1332
set_frame_size native pixels 1458x1332
update_wm_hints char width 18 old char width -1 vscroll 0 fringes 16 borders 2 base width 36 old_base width -1 min width 36 old min width -1
char height 36 old char height -1 menubar 0 hscroll 0 borders 2 base height 72 old base height -1 min height 72 old min height -1
adjust_frame_size old native pixels 1458x1332 new native pixels 1474x1332 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
EmacsFrameResize old native pixels 1474x1332 new native pixels 1458x1287
update_wm_hints char width 18 old char width 18 vscroll 16 fringes 16 borders 2 base width 54 old_base width 36 min width 54 old min width 36
char height 36 old char height 36 menubar 45 hscroll 0 borders 2 base height 144 old base height 72 min height 144 old min height 72
update_wm_hints char width 18 old char width 18 vscroll 16 fringes 16 borders 2 base width 52 old_base width 54 min width 52 old min width 54
char height 36 old char height 36 menubar 45 hscroll 0 borders 2 base height 117 old base height 144 min height 117 old min height 144
EmacsFrameResize old native pixels 1474x1332 new native pixels 1458x1287
update_wm_hints char width 18 old char width 18 vscroll 16 fringes 16 borders 2 base width 54 old_base width 52 min width 54 old min width 52
char height 36 old char height 36 menubar 45 hscroll 0 borders 2 base height 144 old base height 117 min height 144 old min height 117
EmacsFrameResize old native pixels 1474x1332 new native pixels 1458x1287
update_wm_hints char width 18 old char width 18 vscroll 16 fringes 16 borders 2 base width 52 old_base width 54 min width 52 old min width 54
char height 36 old char height 36 menubar 45 hscroll 0 borders 2 base height 117 old base height 144 min height 117 old min height 144
update_wm_hints char width 18 old char width 18 vscroll 16 fringes 16 borders 2 base width 52 old_base width 52 min width 52 old min width 52
char height 36 old char height 36 menubar 45 hscroll 0 borders 2 base height 139 old base height 117 min height 139 old min height 117
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
EmacsFrameResize old native pixels 1474x1332 new native pixels 1474x1354
adjust_frame_size old native pixels 1474x1332 new native pixels 1474x1354 old text pixels 1440x1296 new text pixels 1440x1296 old text chars 80x36 new text chars 80x36
x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
update_wm_hints char width 21 old char width 18 vscroll 16 fringes 16 borders 2 base width 55 old_base width 52 min width 55 old min width 52
char height 45 old char height 36 menubar 45 hscroll 0 borders 2 base height 148 old base height 139 min height 148 old min height 139
EmacsFrameResize old native pixels 1474x1354 new native pixels 1714x1678
EmacsFrameResize old native pixels 1474x1354 new native pixels 1714x1678
adjust_frame_size old native pixels 1474x1354 new native pixels 1714x1678 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36
x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332
update_wm_hints char width 17 old char width 21 vscroll 16 fringes 16 borders 2 base width 51 old_base width 55 min width 51 old min width 55
char height 37 old char height 45 menubar 45 hscroll 0 borders 2 base height 140 old base height 148 min height 140 old min height 148
EmacsFrameResize old native pixels 1714x1678 new native pixels 1394x1390
EmacsFrameResize old native pixels 1714x1678 new native pixels 1394x1390
adjust_frame_size old native pixels 1714x1678 new native pixels 1394x1390 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-16 22:18 ` Dmitry Gutov
@ 2023-02-17 2:43 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-17 11:54 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-02-17 2:43 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 16/02/2023 05:00, Po Lu wrote:
>> Dmitry Gutov<dgutov@yandex.ru> writes:
>>
>>> Here you go:
>>>
>>> (gdb) frame 23
>>> #23 0x00005555556d097f in xg_frame_set_char_size
>>> (f=f@entry=0x55555630eb60, width=width@entry=1728,
>>> height=height@entry=1620) at gtkutil.c:1425
>>> 1425 x_wait_for_event (f, ConfigureNotify);
>>> (gdb) print f->column_width
>>> $2 = 21
>>> (gdb) print f->line_height
>>> $3 = 45
>>> (gdb) frame 26
>>> #26 0x000055555568f0e6 in x_new_font (f=0x55555630eb60,
>>> font_object=XIL(0x5555560e3465), fontset=27) at xterm.c:26576
>>> 26576 adjust_frame_size
>>> (gdb) print font->average_width
>>> $4 = 21
>>> (gdb) print font_ascent
>>> $5 = 37
>>> (gdb) print font_descent
>>> $6 = 8
>> These ascent and descent measurements are not correct for your font,
>> right? What does:
>> (gdb) p font_object
>> (gdb) xfont
>> say?
>
> The output doesn't seem very useful:
>
> (gdb) p font_object
> $6 = XIL(0x55555692631d)
> (gdb) xfont
> $7 = (struct font *) 0x555556926318
Ah, please type:
(gdb) *$7
after this, thanks.
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-17 2:43 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-02-17 11:54 ` Dmitry Gutov
0 siblings, 0 replies; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-17 11:54 UTC (permalink / raw)
To: Po Lu; +Cc: martin rudalics, Eli Zaretskii, rpluim, 60585
On 17/02/2023 04:43, Po Lu via Bug reports for GNU Emacs, the Swiss army
knife of text editors wrote:
> Dmitry Gutov<dgutov@yandex.ru> writes:
>
>> On 16/02/2023 05:00, Po Lu wrote:
>>> Dmitry Gutov<dgutov@yandex.ru> writes:
>>>
>>>> Here you go:
>>>>
>>>> (gdb) frame 23
>>>> #23 0x00005555556d097f in xg_frame_set_char_size
>>>> (f=f@entry=0x55555630eb60, width=width@entry=1728,
>>>> height=height@entry=1620) at gtkutil.c:1425
>>>> 1425 x_wait_for_event (f, ConfigureNotify);
>>>> (gdb) print f->column_width
>>>> $2 = 21
>>>> (gdb) print f->line_height
>>>> $3 = 45
>>>> (gdb) frame 26
>>>> #26 0x000055555568f0e6 in x_new_font (f=0x55555630eb60,
>>>> font_object=XIL(0x5555560e3465), fontset=27) at xterm.c:26576
>>>> 26576 adjust_frame_size
>>>> (gdb) print font->average_width
>>>> $4 = 21
>>>> (gdb) print font_ascent
>>>> $5 = 37
>>>> (gdb) print font_descent
>>>> $6 = 8
>>> These ascent and descent measurements are not correct for your font,
>>> right? What does:
>>> (gdb) p font_object
>>> (gdb) xfont
>>> say?
>> The output doesn't seem very useful:
>>
>> (gdb) p font_object
>> $6 = XIL(0x55555692631d)
>> (gdb) xfont
>> $7 = (struct font *) 0x555556926318
> Ah, please type:
>
> (gdb) *$7
>
> after this, thanks.
Thanks, looks like an exact match:
#26 0x000055555568f0e6 in x_new_font (f=0x55555633b5c0,
font_object=XIL(0x555556222605),
fontset=28) at xterm.c:26576
26576 adjust_frame_size
(gdb) p font_object
$1 = XIL(0x555556222605)
(gdb) xfont
$2 = (struct font *) 0x555556222600
(gdb) *$2
Undefined command: "". Try "help".
(gdb) print *$2
$3 = {
header = {
size = 4611686018997903377
},
props = {XIL(0x7f20), XIL(0x2ee260), XIL(0x746b20), XIL(0),
XIL(0x9ed0), make_fixnum(20544),
make_fixnum(25632), make_fixnum(25664), make_fixnum(35), XIL(0),
make_fixnum(100),
make_fixnum(0), XIL(0x555555e760f3), XIL(0), XIL(0x555556905ac4),
XIL(0x555556905aa4),
XIL(0x555556905b24)},
min_width = 21,
max_width = 21,
pixel_size = 35,
height = 45,
space_width = 21,
average_width = 21,
ascent = 37,
descent = 8,
underline_thickness = 1,
underline_position = 6,
vertical_centering = false,
baseline_offset = 0,
relative_compose = 0,
default_ascent = 0,
encoding_charset = -1,
repertory_charset = -1,
driver = 0x555555dc4900 <ftcrhbfont_driver>
}
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-17 2:05 ` Dmitry Gutov
@ 2023-02-20 9:05 ` martin rudalics
2023-02-22 1:42 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-02-20 9:05 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
> It becomes ever more difficult to remember the context. E.g. which
> operations I should do with each build before looking up this or that
> value.
Same here. In fact, I think we have investigated most of what can be
done here. So unless someone has a better idea I'll try to come up with
a patch that comprises most of what I sent you so far and some further
fixes - size hints on xfwm have become off by one here and I don't yet
know what causes it.
So as a general guideline I plan to cook up something like:
- Make the base size hints handle any irregularities caused by increment
hints not being integral multiples of our line/column sizes.
- Implement correct minimum size hints and make them independent from
the base sizes.
- Do away with our attempts to override GTK which means to get rid of
emacsgtkfixed.c/.h.
All this will take some time and testing.
> These logs are of 'emacs -Q' followed by evaluating
>
> (set-face-attribute 'default nil :height 110 :family "InconsolataLGC")
FWIW, it would be nice to get the 80x36 and 84x36 below
adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
base_size 32x84 size increments 8x18 WM hint 84x36
in synch but I have no clear idea yet how to do that. IIRC I added the last
line to that comment in gtkutil.c
/* Use one row/col here so base_height/width does not become zero.
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
some time ago but am not sure whether it explains the problem in its
entirety or something else has to be done too.
>> I see. BTW, your Lucid scroll bar doesn't seem to have a ruler (or
>> thumb, or whatever you call it) nor the arrows at top and bottom.
>
> Indeed. Not sure if it's supposed to.
>
> The scrollbar itself is not very functional: it shows the scroll
> progress of the buffer, but to scroll back using the mouse clicks
> seems impossible (all scrolling proceeds in one direction).
Are these toolkit scroll bars? What are your build options for Lucid?
Whatever it is, this behavior deserves a separate bug report.
> First call for "InconsolataLGC":
>
> x_new_font old char size 18x36 new char size 21x45 text chars 80x36 old text pixels 1440x1296 new text pixels 1680x1620
> xg_wm_set_size_hint scale 2 char width 21 toolbar 0 vscroll 32 fringes 16 borders 0 text width 840 base width 34 width inc 10
> char height 45 menubar 50 toolbar 82 hscroll 0 borders 0 text height 810 base height 106 height inc 22
> xg_frame_set_char_size old native pixels 1488x1296 new native pixels 1728x1620 outer pixels 864x876 outer rest 0x0
> base_size 34x106 size increments 10x22 WM hint 83x35
> xg_frame_resized old native pixels 1488x1296 new native pixels 1728x1620
> adjust_frame_size old native pixels 1488x1296 new native pixels 1728x1620 old text pixels 1440x1296 new text pixels 1680x1620 old text chars 80x36 new text chars 80x36
> base_size 34x106 size increments 10x22 WM hint 83x35
>
> x_new_font old char size 21x45 new char size 17x37 text chars 80x36 old text pixels 1680x1620 new text pixels 1360x1332
> xg_wm_set_size_hint scale 2 char width 17 toolbar 0 vscroll 32 fringes 16 borders 0 text width 680 base width 32 width inc 8
> char height 37 menubar 50 toolbar 82 hscroll 0 borders 0 text height 666 base height 84 height inc 18
> xg_frame_set_char_size old native pixels 1728x1620 new native pixels 1408x1332 outer pixels 704x732 outer rest 0x0
> base_size 32x84 size increments 8x18 WM hint 84x36
> xg_frame_resized old native pixels 1728x1620 new native pixels 1408x1332
> adjust_frame_size old native pixels 1728x1620 new native pixels 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text chars 80x36 new text chars 80x36
> base_size 32x84 size increments 8x18 WM hint 84x36
>
> The second and all subsequent ones look like this:
>
> x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
>
> x_new_font old char size 17x37 new char size 17x37 text chars 80x36 old text pixels 1360x1332 new text pixels 1360x1332
>
> (This is while keeping the frame in its default size; no resizing with the mouse.)
All these show no differences between the two Inconsolatas. So the
reason why one keeps your frame shrinking and the other doesn't still
remains a mystery.
> It looks like both trigger two x_new_fonts calls the first time. And maybe resize the frame twice, which could be hard to register with the human eye. But then one continues to do that (under certain conditions), and another stops.
>
>> It should be something like not finding a suitable
>> font with "InconsolataLGC" or at least one that does not ask for
>> changing the height
>
> That's what I was thinking: "InconsolataLGC" falls back to
> "Inconsolata LGC", but that's not registered in some internal data
> structure, so whenever a new set-face-attribute call arrives, the
> comparison fails, and the search is repeated.
You could try with two separate 'set-face-attribute' calls. That is: Do
the below for both Inconsolata fonts
> InconsolataLGC:
>
> first hit:
>
> (gdb) p font->average_width
> $1 = 21
> (gdb) p font_ascent
> $2 = 37
> (gdb) p font_descent
> $3 = 8
>
> second hit:
>
> (gdb) p font->average_width
> $4 = 17
> (gdb) p font_ascent
> $5 = 31
> (gdb) p font_descent
> $6 = 6
>
> Inconsolata LGC:
>
> Exactly the same.
first with only :family set leaving :height alone and then with only
:height set leaving :family alone. Then do the reverse - that is first
with only :height set leaving :family alone and then with only :family
set leaving :height alone.
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-20 9:05 ` martin rudalics
@ 2023-02-22 1:42 ` Dmitry Gutov
2023-02-24 17:54 ` martin rudalics
0 siblings, 1 reply; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-22 1:42 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
On 20/02/2023 11:05, martin rudalics wrote:
> > It becomes ever more difficult to remember the context. E.g. which
> > operations I should do with each build before looking up this or that
> > value.
>
> Same here. In fact, I think we have investigated most of what can be
> done here. So unless someone has a better idea I'll try to come up with
> a patch that comprises most of what I sent you so far and some further
> fixes - size hints on xfwm have become off by one here and I don't yet
> know what causes it.
>
> So as a general guideline I plan to cook up something like:
>
> - Make the base size hints handle any irregularities caused by increment
> hints not being integral multiples of our line/column sizes.
>
> - Implement correct minimum size hints and make them independent from
> the base sizes.
>
> - Do away with our attempts to override GTK which means to get rid of
> emacsgtkfixed.c/.h.
Sounds promising! Especially the last part.
> All this will take some time and testing.
>
> > These logs are of 'emacs -Q' followed by evaluating
> >
> > (set-face-attribute 'default nil :height 110 :family
> "InconsolataLGC")
>
> FWIW, it would be nice to get the 80x36 and 84x36 below
>
> adjust_frame_size old native pixels 1728x1620 new native pixels
> 1408x1332 old text pixels 1680x1620 new text pixels 1360x1332 old text
> chars 80x36 new text chars 80x36
> base_size 32x84 size increments 8x18 WM hint 84x36
>
> in synch but I have no clear idea yet how to do that. IIRC I added the
> last
> line to that comment in gtkutil.c
>
> /* Use one row/col here so base_height/width does not become zero.
> Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
> Obviously this makes the row/col value displayed off by 1. */
>
> some time ago but am not sure whether it explains the problem in its
> entirety or something else has to be done too.
>
> >> I see. BTW, your Lucid scroll bar doesn't seem to have a ruler (or
> >> thumb, or whatever you call it) nor the arrows at top and bottom.
> >
> > Indeed. Not sure if it's supposed to.
> >
> > The scrollbar itself is not very functional: it shows the scroll
> > progress of the buffer, but to scroll back using the mouse clicks
> > seems impossible (all scrolling proceeds in one direction).
>
> Are these toolkit scroll bars? What are your build options for Lucid?
Configured using:
'configure --with-x-toolkit=lucid'
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11
XDBE XIM XINPUT2 XPM LUCID ZLIB
> Whatever it is, this behavior deserves a separate bug report.
Actually, it seems like I just didn't understand how to use it at first:
when I hover the mouse over the scrollbar, a two-sided arrow appears.
With that, clicking the left mouse button scrolls the buffer in one
direction, and clicking the right mouse button (anywhere) scrolls the
buffer in another direction. I've very little experience with
Lucid/Motif applications, so this took some experimentation.
And it does have a thumb when the buffer is taller than the window.
Sometimes the thumb gets bigger and sometimes smaller, though. That's a
little odd. Perhaps it works off the number of visible characters rather
than lines.
> > The second and all subsequent ones look like this:
> >
> > x_new_font old char size 17x37 new char size 17x37 text chars 80x36
> old text pixels 1360x1332 new text pixels 1360x1332
> >
> > x_new_font old char size 17x37 new char size 17x37 text chars 80x36
> old text pixels 1360x1332 new text pixels 1360x1332
> >
> > (This is while keeping the frame in its default size; no resizing
> with the mouse.)
>
> All these show no differences between the two Inconsolatas. So the
> reason why one keeps your frame shrinking and the other doesn't still
> remains a mystery.
>
> > It looks like both trigger two x_new_fonts calls the first time. And
> maybe resize the frame twice, which could be hard to register with the
> human eye. But then one continues to do that (under certain conditions),
> and another stops.
> >
> >> It should be something like not finding a suitable
> >> font with "InconsolataLGC" or at least one that does not ask for
> >> changing the height
> >
> > That's what I was thinking: "InconsolataLGC" falls back to
> > "Inconsolata LGC", but that's not registered in some internal data
> > structure, so whenever a new set-face-attribute call arrives, the
> > comparison fails, and the search is repeated.
>
> You could try with two separate 'set-face-attribute' calls. That is: Do
> the below for both Inconsolata fonts
>
> > InconsolataLGC:
> >
> > first hit:
> >
> > (gdb) p font->average_width
> > $1 = 21
> > (gdb) p font_ascent
> > $2 = 37
> > (gdb) p font_descent
> > $3 = 8
> >
> > second hit:
> >
> > (gdb) p font->average_width
> > $4 = 17
> > (gdb) p font_ascent
> > $5 = 31
> > (gdb) p font_descent
> > $6 = 6
> >
> > Inconsolata LGC:
> >
> > Exactly the same.
>
> first with only :family set leaving :height alone and then with only
> :height set leaving :family alone. Then do the reverse - that is first
> with only :height set leaving :family alone and then with only :family
> set leaving :height alone.
Okay.
InconsolataLGC:
(set-face-attribute 'default nil :family "InconsolataLGC")
(gdb) p font->average_width
$1 = 21
(gdb) p font_ascent
$2 = 37
(gdb) p font_descent
$3 = 8
(set-face-attribute 'default nil :height 110)
(gdb) p font->average_width
$7 = 17
(gdb) p font_ascent
$8 = 31
(gdb) p font_descent
$9 = 6
Now the reverse:
(set-face-attribute 'default nil :height 110)
(gdb) p font->average_width
$10 = 15
(gdb) p font_ascent
$11 = 25
(gdb) p font_descent
$12 = 5
(set-face-attribute 'default nil :family "InconsolataLGC")
(gdb) p font->average_width
$13 = 17
(gdb) p font_ascent
$14 = 31
(gdb) p font_descent
$15 = 6
(I did restart Emacs between tries, just not GDB.)
Inconsolata LGC:
All exactly the same. Omitted to save space.
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-22 1:42 ` Dmitry Gutov
@ 2023-02-24 17:54 ` martin rudalics
2023-02-27 1:29 ` Dmitry Gutov
0 siblings, 1 reply; 169+ messages in thread
From: martin rudalics @ 2023-02-24 17:54 UTC (permalink / raw)
To: Dmitry Gutov, Eli Zaretskii; +Cc: 60585, rpluim
> And it does have a thumb when the buffer is taller than the
> window. Sometimes the thumb gets bigger and sometimes smaller,
> though. That's a little odd. Perhaps it works off the number of
> visible characters rather than lines.
Interesting. I've never seen such behavior.
> InconsolataLGC:
>
> (set-face-attribute 'default nil :family "InconsolataLGC")
>
> (gdb) p font->average_width
> $1 = 21
> (gdb) p font_ascent
> $2 = 37
> (gdb) p font_descent
> $3 = 8
>
> (set-face-attribute 'default nil :height 110)
>
> (gdb) p font->average_width
> $7 = 17
> (gdb) p font_ascent
> $8 = 31
> (gdb) p font_descent
> $9 = 6
>
> Now the reverse:
>
> (set-face-attribute 'default nil :height 110)
>
> (gdb) p font->average_width
> $10 = 15
> (gdb) p font_ascent
> $11 = 25
> (gdb) p font_descent
> $12 = 5
>
> (set-face-attribute 'default nil :family "InconsolataLGC")
>
> (gdb) p font->average_width
> $13 = 17
> (gdb) p font_ascent
> $14 = 31
> (gdb) p font_descent
> $15 = 6
>
> (I did restart Emacs between tries, just not GDB.)
>
> Inconsolata LGC:
>
> All exactly the same. Omitted to save space.
There's one thing that we haven't checked yet and I don't know how to do
that. When you evaluate :height first you get a line height of 30 which
scaling should reduce to 15 without loss. When you evaluate :family
first you scale twice with a loss. I have no idea whether this has any
impact. You can try whether either of the following
(progn
(set-face-attribute 'default nil :family "Inconsolata LGC")
(set-face-attribute 'default nil :height 110))
(progn
(set-face-attribute 'default nil :height 110)
(set-face-attribute 'default nil :family "Inconsolata LGC"))
causes a different shrinking behavior but I doubt that it will reveal
anything useful. So I ran out of ideas ...
martin
^ permalink raw reply [flat|nested] 169+ messages in thread
* 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
2023-02-24 17:54 ` martin rudalics
@ 2023-02-27 1:29 ` Dmitry Gutov
0 siblings, 0 replies; 169+ messages in thread
From: Dmitry Gutov @ 2023-02-27 1:29 UTC (permalink / raw)
To: martin rudalics, Eli Zaretskii; +Cc: 60585, rpluim
On 24/02/2023 19:54, martin rudalics wrote:
> There's one thing that we haven't checked yet and I don't know how to do
> that. When you evaluate :height first you get a line height of 30 which
> scaling should reduce to 15 without loss. When you evaluate :family
> first you scale twice with a loss. I have no idea whether this has any
> impact. You can try whether either of the following
>
> (progn
> (set-face-attribute 'default nil :family "Inconsolata LGC")
> (set-face-attribute 'default nil :height 110))
>
> (progn
> (set-face-attribute 'default nil :height 110)
> (set-face-attribute 'default nil :family "Inconsolata LGC"))
>
> causes a different shrinking behavior but I doubt that it will reveal
> anything useful. So I ran out of ideas ...
Alas, I'm not seeing much of a change.
"Inconsolata LGC" is "stable" with either.
"InconsolataLGC" reliably shrinks at e.g. 104x37 (GNOME size), again,
with either.
^ permalink raw reply [flat|nested] 169+ messages in thread
end of thread, other threads:[~2023-02-27 1:29 UTC | newest]
Thread overview: 169+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14 23:43 bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong Dmitry Gutov
2021-12-15 14:57 ` Eli Zaretskii
2021-12-15 22:43 ` Dmitry Gutov
2021-12-16 7:29 ` Eli Zaretskii
2021-12-16 13:01 ` Dmitry Gutov
2021-12-16 13:31 ` Eli Zaretskii
2021-12-16 13:42 ` Dmitry Gutov
2021-12-16 14:08 ` Eli Zaretskii
2021-12-16 14:57 ` Dmitry Gutov
2021-12-16 15:15 ` Eli Zaretskii
2021-12-16 15:34 ` Eli Zaretskii
2021-12-16 15:42 ` Dmitry Gutov
2021-12-16 16:56 ` Eli Zaretskii
2021-12-17 0:49 ` Dmitry Gutov
2021-12-17 7:37 ` Eli Zaretskii
2021-12-17 7:46 ` Lars Ingebrigtsen
2021-12-17 8:38 ` Eli Zaretskii
2022-12-21 1:14 ` Dmitry Gutov
2022-12-21 9:38 ` Gregory Heytings
2022-12-21 12:49 ` Eli Zaretskii
2022-12-21 23:39 ` Gregory Heytings
2022-12-22 7:18 ` Eli Zaretskii
2022-12-25 22:42 ` Gregory Heytings
2022-12-21 13:40 ` Dmitry Gutov
2022-12-21 23:39 ` Gregory Heytings
2022-12-22 7:20 ` Eli Zaretskii
2022-12-25 22:42 ` Gregory Heytings
2022-12-26 12:20 ` Eli Zaretskii
2022-12-26 14:05 ` Gregory Heytings
2022-12-22 20:32 ` Dmitry Gutov
2022-12-25 22:42 ` Gregory Heytings
2022-12-26 0:46 ` Gregory Heytings
2022-12-26 12:25 ` Eli Zaretskii
2022-12-29 22:45 ` Gregory Heytings
2022-12-30 14:47 ` Eli Zaretskii
2022-12-30 15:40 ` Gregory Heytings
2022-12-30 16:14 ` Eli Zaretskii
2022-12-30 16:27 ` Gregory Heytings
2022-12-30 17:01 ` Eli Zaretskii
2022-12-30 17:28 ` Gregory Heytings
2022-12-26 15:48 ` Dmitry Gutov
2022-12-26 16:19 ` Gregory Heytings
2022-12-27 2:04 ` Dmitry Gutov
2022-12-28 15:20 ` Gregory Heytings
2022-12-28 17:01 ` Eli Zaretskii
2022-12-27 1:58 ` Dmitry Gutov
2022-12-28 15:19 ` Gregory Heytings
2022-12-21 12:11 ` Eli Zaretskii
2021-12-17 12:30 ` Dmitry Gutov
2021-12-17 13:01 ` Eli Zaretskii
2021-12-17 13:21 ` Dmitry Gutov
2021-12-17 13:46 ` Eli Zaretskii
2021-12-17 14:06 ` Dmitry Gutov
2021-12-17 14:42 ` Eli Zaretskii
2021-12-17 19:17 ` martin rudalics
2022-12-21 1:08 ` Dmitry Gutov
2022-12-21 9:22 ` martin rudalics
2022-12-21 12:56 ` Dmitry Gutov
2022-12-21 17:05 ` martin rudalics
2022-12-21 23:00 ` Dmitry Gutov
2022-12-22 10:15 ` martin rudalics
2022-12-22 20:39 ` Dmitry Gutov
2022-12-23 9:14 ` martin rudalics
2022-12-23 9:19 ` martin rudalics
2022-12-23 18:48 ` Dmitry Gutov
2022-12-24 9:27 ` martin rudalics
2022-12-24 13:38 ` Dmitry Gutov
2022-12-25 10:21 ` martin rudalics
2022-12-25 13:01 ` Dmitry Gutov
2022-12-25 16:07 ` martin rudalics
2022-12-25 16:52 ` Dmitry Gutov
2022-12-26 9:10 ` martin rudalics
2022-12-27 23:15 ` Dmitry Gutov
2022-12-28 10:08 ` martin rudalics
2022-12-28 12:31 ` Dmitry Gutov
2022-12-28 17:35 ` martin rudalics
2022-12-28 22:35 ` Dmitry Gutov
2022-12-29 9:05 ` martin rudalics
2022-12-29 22:29 ` Dmitry Gutov
2022-12-30 9:51 ` martin rudalics
2022-12-31 19:01 ` martin rudalics
2023-01-05 1:50 ` Dmitry Gutov
2023-01-05 9:47 ` martin rudalics
2023-01-05 14:14 ` Dmitry Gutov
2023-01-05 16:59 ` martin rudalics
2023-01-05 19:08 ` Dmitry Gutov
2023-01-06 17:47 ` martin rudalics
2023-01-06 18:14 ` Dmitry Gutov
2023-01-06 22:40 ` Gregory Heytings
2023-01-06 23:45 ` Dmitry Gutov
2023-01-06 23:49 ` Gregory Heytings
2023-01-07 0:48 ` Dmitry Gutov
2023-01-07 0:50 ` Gregory Heytings
2023-01-07 9:48 ` martin rudalics
2023-01-08 9:45 ` martin rudalics
2023-01-08 22:38 ` Gregory Heytings
2023-01-08 23:23 ` Gregory Heytings
2023-01-09 10:09 ` martin rudalics
2023-01-09 17:28 ` Eric Abrahamsen
2023-01-07 9:15 ` martin rudalics
2023-01-09 0:12 ` Dmitry Gutov
2023-01-09 10:07 ` martin rudalics
2023-01-09 20:50 ` Dmitry Gutov
2023-01-10 12:05 ` martin rudalics
2023-01-12 0:34 ` Dmitry Gutov
2023-01-12 9:31 ` martin rudalics
2023-01-12 9:46 ` Robert Pluim
2023-01-12 10:23 ` martin rudalics
2023-01-12 23:53 ` Dmitry Gutov
2023-01-13 0:36 ` Dmitry Gutov
2023-01-13 8:38 ` martin rudalics
2023-01-16 1:27 ` bug#60585: 30.0.50; global-text-scale-adjust shrinks window (was not before), was: " Dmitry Gutov
2023-01-16 10:03 ` martin rudalics
2023-01-16 12:44 ` Dmitry Gutov
2023-01-16 16:10 ` martin rudalics
2023-01-17 1:54 ` Dmitry Gutov
2023-01-17 10:04 ` martin rudalics
2023-01-17 17:35 ` Dmitry Gutov
2023-01-18 17:13 ` martin rudalics
2023-01-21 3:12 ` Dmitry Gutov
2023-01-21 10:08 ` martin rudalics
2023-01-22 1:56 ` Dmitry Gutov
2023-01-22 9:54 ` martin rudalics
2023-01-22 22:25 ` Dmitry Gutov
2023-01-24 10:50 ` martin rudalics
2023-01-25 4:20 ` Dmitry Gutov
2023-01-26 15:44 ` martin rudalics
2023-01-27 3:07 ` Dmitry Gutov
2023-01-27 9:35 ` martin rudalics
2023-01-28 0:22 ` Dmitry Gutov
2023-01-28 15:36 ` martin rudalics
2023-01-29 1:25 ` Dmitry Gutov
2023-01-30 9:28 ` martin rudalics
2023-02-09 19:40 ` Dmitry Gutov
2023-02-11 1:36 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 8:17 ` Eli Zaretskii
2023-02-11 9:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 10:39 ` Eli Zaretskii
2023-02-11 10:15 ` Dmitry Gutov
2023-02-11 10:22 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-11 22:08 ` Dmitry Gutov
2023-02-12 1:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12 2:06 ` Dmitry Gutov
2023-02-12 3:26 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-12 12:41 ` Dmitry Gutov
2023-02-13 2:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-16 2:09 ` Dmitry Gutov
2023-02-16 3:00 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-16 22:18 ` Dmitry Gutov
2023-02-17 2:43 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-17 11:54 ` Dmitry Gutov
2023-02-12 12:55 ` Dmitry Gutov
2023-02-13 10:09 ` martin rudalics
2023-02-17 2:05 ` Dmitry Gutov
2023-02-20 9:05 ` martin rudalics
2023-02-22 1:42 ` Dmitry Gutov
2023-02-24 17:54 ` martin rudalics
2023-02-27 1:29 ` Dmitry Gutov
2022-12-21 13:43 ` Dmitry Gutov
2022-12-24 1:03 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 8:52 ` martin rudalics
2022-12-24 9:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 10:45 ` martin rudalics
2022-12-24 11:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-24 13:02 ` Dmitry Gutov
2022-12-25 22:52 ` Gregory Heytings
2021-12-16 15:36 ` Dmitry Gutov
2021-12-16 16:54 ` Eli Zaretskii
2021-12-17 0:13 ` Dmitry Gutov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).