main: GDK_SCALE is read once

Both popups read it, each just before its own textinit, and the second
copy needed a comment to say why it was there at all.  One frontend runs
per session and popupscale is one global, so threadmain reads it before it
starts either -- which is before any setfont, the only ordering the two
copies were keeping.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-17 21:26:59 +09:00
parent aef577026d
commit bbc0c97656
3 changed files with 5 additions and 11 deletions

6
wl.c
View File

@@ -647,7 +647,6 @@ void
wlthread(void*)
{
struct pollfd pfd;
char *scale;
int n;
threadsetname("wl");
@@ -657,11 +656,6 @@ wlthread(void*)
wllog("cannot make an xkb context");
return;
}
/* drawthread no longer runs, so the scale comes first: setfont
* reads Fontsz. */
scale = getenv("GDK_SCALE");
if(scale != nil && atoi(scale) > 1)
popupscale = min(atoi(scale), 4);
textinit();
im = zwp_input_method_manager_v2_get_input_method(immgr, seat);
zwp_input_method_v2_add_listener(im, &imlisten, nil);