Subject: bug#76481: 31.0.50; Extreme weirdness with GDK_SCALE=

From: Jonathan Corbet <[email-masked]>
Date: Fri, 21 Feb 2025 19:05:18 -0700

Po Lu <[email-masked]> writes:

> Jonathan Corbet <[email-masked]> writes:
>
>> With emacs built to use GTK, and running under Wayland...  run:
>>
>>    $ GDK_SCALE= emacs
>>
>> The result is a number of hallucinogenic effects ranging from emacs just
>> showing up as a black square on the screen to window-resizing attempts
>> setting the frame to random sizes unrelated to mouse movements.
>>
>> Things work much better without GDK_SCALE= and I can happily take that
>> out (it was put into my scripts years ago for long-forgotten reasons),
>> but other users may be tripped up by this too.
>>
>> This happens even with "emacs -q".
>
> Are you building the X11 configuration of Emacs with GTK, or the PGTK
> configuration?

PGTK.

> At all events, please place a breakpoint on xg_get_scale and ascertain
> what it returns.  I suspect an oversigt in GDK, as it appears that Emacs
> does not access this environment variable directly.

I'll try to get to that in the near future - stay tuned.

Thanks,

jon