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:
6
main.c
6
main.c
@@ -47,11 +47,15 @@ erealloc(void *p, ulong n)
|
||||
void
|
||||
threadmain(int argc, char **argv)
|
||||
{
|
||||
char *display;
|
||||
char *display, *scale;
|
||||
|
||||
if(argc != 2)
|
||||
usage();
|
||||
|
||||
/* Whichever popup runs is sized from it, and setfont reads Fontsz. */
|
||||
scale = getenv("GDK_SCALE");
|
||||
if(scale != nil && atoi(scale) > 1)
|
||||
popupscale = min(atoi(scale), 4);
|
||||
drawc = chancreate(sizeof(Drawcmd), 4);
|
||||
keyc = chancreate(sizeof(Keyreq), 0);
|
||||
langinit(argv[1]);
|
||||
|
||||
Reference in New Issue
Block a user