X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;ds=sidebyside;f=taskasaur.c;h=ce93ab746ce4de1c68dee0cbb88d18d06ffdd13d;hb=c263062e7183d2c56149c5188a70acd0ff5cb513;hp=119411e5e790a3e4c715f5f6da7c12970a583a2b;hpb=f270512184ab1c41eee46c76a149b7cbddb1b131;p=taskasaur.git diff --git a/taskasaur.c b/taskasaur.c index 119411e..ce93ab7 100644 --- a/taskasaur.c +++ b/taskasaur.c @@ -94,6 +94,7 @@ main(int argc, char** argv) todo_menu = create_todo_menu(todo_win, todos, todo_length); post_menu(todo_menu); + refresh(); wrefresh(todo_win); while ((ch = getch()) != 'q') { @@ -109,14 +110,15 @@ main(int argc, char** argv) menu_driver(todo_menu, REQ_LAST_ITEM); break; } - wrefresh(todo_win); + + /* wrefresh(todo_win); */ } endwin(); /* Free mem */ - unpost(todo_menu); + unpost_menu(todo_menu); free_todo(todos, todo_length); return 0; @@ -181,9 +183,10 @@ create_todo_menu(WINDOW* win, char** todo_list, int todo_length) todo_menu = new_menu(item_list); - getmaxyx(stdscr, wheight, wwidth); + getmaxyx(win, wheight, wwidth); set_menu_win(todo_menu, win); - set_menu_sub(todo_menu, derwin(win, wheight, wwidth, 0, 0)); + set_menu_sub(todo_menu, derwin(win, wheight-2, wwidth-2, 1, 1)); + set_menu_mark(todo_menu, ""); box(win, 0, 0); //temp