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:
4
win.c
4
win.c
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user