fix: harden caret and IBus dispatch

This commit is contained in:
2026-08-12 17:34:34 +09:00
parent de536da0bb
commit 4e90fdd5c7
5 changed files with 21 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
#include "test.h"
#include <limits.h>
void
popup_layout(struct ct *t)
@@ -24,4 +25,10 @@ popup_layout(struct ct *t)
popupposition(&caret, 0, 0, 800, 600, 100, 60, &x, &y);
CT_EQ_INT(t, 700, x);
CT_EQ_INT(t, 540, y);
caret.x = INT_MIN;
caret.y = INT_MAX;
caret.h = INT_MAX;
popupposition(&caret, 0, 0, 800, 600, 100, 60, &x, &y);
CT_EQ_INT(t, 0, x);
CT_EQ_INT(t, 540, y);
}