Fix initial cursor position without animations

draw_box and position_input are called because they need to be called
before *input_handles[active_input] for the cursor to be positioned
correctly.
This commit is contained in:
jakobrs 2022-04-24 13:56:10 +02:00
parent 9995d367d9
commit 4ecea4415f
1 changed files with 7 additions and 1 deletions

View File

@ -141,11 +141,17 @@ int main(int argc, char** argv)
struct term_buf buf;
uint8_t active_input = config.default_input;
(*input_handles[active_input])(input_structs[active_input], NULL);
// init drawing stuff
draw_init(&buf);
// draw_box and position_input are called because they need to be
// called before *input_handles[active_input] for the cursor to be
// positioned correctly
draw_box(&buf);
position_input(&buf, &desktop, &login, &password);
(*input_handles[active_input])(input_structs[active_input], NULL);
if (config.animate)
{
animate_init(&buf);