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

From: Po Lu <[email-masked]>
Date: Sun, 23 Feb 2025 08:56:32 +0800

Jonathan Corbet <[email-masked]> writes:

> 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

My recollection is that on Wayland the scale is decided by the
compositor, but apparently GDK continues to report and use the value of
GDK_SCALE in some contexts, if present, which moves the two out of sync.
Or so I suspect.