popup: follow GDK_SCALE on HiDPI

The popup was 32-pixel rows whatever the display; next to 2x application
text it was small. Its metrics now scale with the daemon's GDK_SCALE,
the setting the applications use.
This commit is contained in:
2026-08-16 21:35:43 +09:00
parent 30abd05e68
commit 4ff696d06c
6 changed files with 24 additions and 13 deletions

4
win.c
View File

@@ -206,7 +206,11 @@ wininit(void)
xcb_randr_query_version_cookie_t rc;
xcb_randr_query_version_reply_t *rr;
const xcb_query_extension_reply_t *rext;
char *scale;
scale = getenv("GDK_SCALE");
if(scale != nil && atoi(scale) > 1)
popupscale = min(atoi(scale), 4);
conn = xcb_connect(nil, &n);
if(xcb_connection_has_error(conn)){
fprint(2, "strans: popup disabled: cannot connect to X display\n");