popup: no fallbacks for work areas no desktop has; text setup cannot fail

popuplayout had two refit stages for a work area shorter than one
padded row — 40 pixels — and popupdraw re-checked the layout it had
just been handed, against an Imgh that bounded no buffer any more.
Pango and Cairo abort rather than return nil, so textinit is void and
the layout is never nil; the stride Cairo computes for RGB24 is w*4 by
definition; and textdraw set the layout's width and ellipsis twice.
This commit is contained in:
2026-08-17 01:36:16 +09:00
parent cd637be4ca
commit 87cb03fdf8
7 changed files with 20 additions and 89 deletions

6
win.c
View File

@@ -250,11 +250,7 @@ wininit(void)
win, type, XCB_ATOM_ATOM, 32, 1, &tooltip);
gc = xcb_generate_id(conn);
xcb_create_gc(conn, gc, win, 0, nil);
if(!textinit()){
fprint(2, "strans: popup disabled: no usable fonts\n");
wincleanup();
return 0;
}
textinit();
return 1;
}