calendar
git clone https://git.lucas.co/cce-calendar.git
feat(osk): the new-event field says it is open for typing
The sidebar's hand-drawn input claims text input at its caret while it is
open, so a tap on it raises the compositor's on-screen keyboard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
src/main.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index d4970e5..4173a72 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -834,8 +834,10 @@ impl CalendarApp {
pc.text_with(buffer, x, text_y, size, [0xee, 0xee, 0xf5], Some(font), Some(clip));
}
let caret_h = size * 1.15;
- pc.quad(Rect { x: x + advance, y: text_y + (size - caret_h) / 2.0, width: 1.5, height: caret_h },
- [0.80, 0.80, 0.85, 1.0]);
+ let caret = Rect { x: x + advance, y: text_y + (size - caret_h) / 2.0, width: 1.5, height: caret_h };
+ // Open for typing: the on-screen keyboard follows this.
+ cce_ui::text_input::claim(caret.x, caret.y, caret.width, caret.height);
+ pc.quad(caret, [0.80, 0.80, 0.85, 1.0]);
}
}