git.lucas.co / cce-designer
graphic design tool
git clone https://git.lucas.co/cce-designer.git

commitec313d9926455482458d4ccf644ad4f9cf2528c6
parente44b701a7f
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-05 21:39
feat(osk): the command palette's query says it takes typing

The palette owns the keyboard while it is up, so its hand-drawn query
field claims text input; a tap raises the compositor's on-screen keyboard.
The claim is the field rather than the caret, and is off by the slide
while the palette turns, which the board does not mind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 src/dialog.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/dialog.rs b/src/dialog.rs
index b82574b..4a19f2b 100644
--- a/src/dialog.rs
+++ b/src/dialog.rs
@@ -1007,6 +1007,11 @@ impl Paint for Dialog {
             ctx.text_with(shown, qtx, qty, font_size, [0xe6, 0xe6, 0xee], Some(family.clone()), own);
         }
         let caret_x = qtx + display::measure_text_width(&self.query, &family, font_size) + 1.0;
+        // The query owns the keyboard while the palette is up: say so, so a
+        // touch raises the on-screen keyboard. The field stands in for the
+        // caret (and is off by the slide while the palette turns — brief, and
+        // the board does not care where).
+        cce_ui::text_input::claim(q.x, q.y, q.width, q.height);
         if caret_x < q.x + q.width - 4.0 {
             ctx.quad(
                 Rect { x: caret_x, y: q.y + 6.0, width: 1.0, height: q.height - 12.0 },