popup: a border, a preedit as wide as its text, one place by the pointer, and no dying

The popup was a white box on the usually white text it covered, with
no edge to tell them apart; it has a border in the separator's colour.
A syllable being composed came in a bar twelve ems wide, wiping out the
line under it: only candidate rows share that steady width now, a
preedit alone hugs its text.  A popup placed by the pointer, when the
client sends no caret, was placed again on every key and so followed
the mouse; it stays where it came up.  Clicks on it no longer fall
through to the root window and its menu.  And one failed draw — a lost
pointer reply, a pixmap the server refused — ended the draw thread and
the popup for the rest of the session; only a dead connection does now.
This commit is contained in:
2026-08-17 01:41:54 +09:00
parent 87cb03fdf8
commit bab40c95a7
4 changed files with 45 additions and 28 deletions

View File

@@ -149,7 +149,8 @@ popuplayout(Drawcmd *dc, int areaw, int areah, Popup *p)
if(nmark == 0)
markrow = 0;
width = PopupBasew;
/* Rows share one steady width; a preedit alone hugs its text. */
width = p->n != 0 ? PopupBasew : 2*PopupPad;
if(npre)
width = max(width, textwidth(&dc->pre) + 2*PopupPad);
for(i = 0; i < p->n; i++)