bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64809: 29.1; Initial frame is wrong size when dimensions specified i


From: Po Lu
Subject: bug#64809: 29.1; Initial frame is wrong size when dimensions specified in init file
Date: Tue, 25 Jul 2023 08:09:03 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

Jim Porter <jporterbugs@gmail.com> writes:

> On 7/24/2023 9:33 AM, Jim Porter wrote:
>> I found a related issue that might make this easier to diagnose:
>> when I run the following in Emacs 28.2, it correctly sets the
>> default face height for the current frame. With Emacs 29.1, it
>> flashes for a second at the correct size, then reverts to the
>> default:
>> emacs -Q --eval "(set-face-attribute 'default (selected-frame)
>> :height 70)"
>
> At least for this case, I narrowed the regression down to the
> following commit:
>
>   commit 52d4c98cec0901ef5cc1c55d5b3b33ac9d9c519f
>   Author: Vincent Bernat <bernat@luffy.cx>
>   Date:   Tue Oct 25 23:02:16 2022 +0200
>
>       Fix detection of DPI changes in builds without Xft
>
>       * src/xsettings.c (apply_xft_settings) [!HAVE_XFT]: Support
>       XSETTINGS changes in non-XFT builds.  (Bug#43128)
>
> So maybe the DPI detection in this commit is happening too late, or
> the code should bail out if the user has already customized the
> default face height?

I see; then the problem is that the DPI provided by the settings manager
differs from the DPI specified in the Xft.dpi resource at display
initialization time.

So Emacs detects a change to the display density after reading the new
DPI from the settings manager, and sends a `font-render' event.  That
event later causes all fonts to be reinitialized with the new scaling
factor.

The easy workaround for Emacs 29 is for the user to set Xft.dpi to the
value provided by the settings manager, as any other value points to a
misconfiguration anyway.  For Emacs 30, using the settings manager to
provide the initial value in the first place should be a more robust
solution.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]