- full_text = malloc((prompt_len + input_position) * 2 + 1);
- if (full_text == NULL)
- err(EXIT_FAILURE, "malloc() failed\n");
- memcpy(full_text, prompt, prompt_len * 2);
- memcpy(full_text + (prompt_len * 2), con, input_position * 2);
+ draw_text(prompt, pixmap, pixmap_gc, 4, 4, 492);
+ }
+ /* … and the text */
+ if (input_position > 0)
+ {
+ i3String *input = i3string_from_ucs2(glyphs_ucs, input_position);
+ draw_text(input, pixmap, pixmap_gc, prompt_offset + 4, 4, 492);
+ i3string_free(input);