GNU bug report logs - #76481
31.0.50; Extreme weirdness with GDK_SCALE=

Previous Next

Package: emacs;

Reported by: Jonathan Corbet <corbet <at> lwn.net>

Date: Fri, 21 Feb 2025 22:12:01 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Jonathan Corbet <corbet <at> lwn.net>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 76481 <at> debbugs.gnu.org
Subject: bug#76481: 31.0.50; Extreme weirdness with GDK_SCALE=
Date: Sat, 22 Feb 2025 10:28:26 -0700
Po Lu <luangruo <at> yahoo.com> writes:

> Jonathan Corbet <corbet <at> lwn.net> 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?
>
> 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.

OK, if I run it normally (without GDK_SCALE=), I get this

First return, called from x_set_scroll_bar_default_width(): 32
 from xg_update_frame_menubar(): 2
 from xg_wm_set_size_hint(): 2
 from xg_frame_set_char_size(): 2

from here on it's always 2

with GDK_SCALE= :

First return, called from x_set_scroll_bar_default_width(): 16
 from xg_update_frame_menubar(): 1
 from xg_wm_set_size_hint(): 1
 from xg_frame_set_char_size(): 1

...and always 1 thereafter.

Hope that helps?

Thanks,

jon




This bug report was last modified 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.