forked from RepoMirrors/bemenu
Flush input buffer after showing menu first time.
This commit is contained in:
parent
66a6f08c8a
commit
850a8335d5
@ -79,6 +79,7 @@ static struct curses {
|
|||||||
int (*getmaxy)(WINDOW *win);
|
int (*getmaxy)(WINDOW *win);
|
||||||
int (*keypad)(WINDOW *win, bool bf);
|
int (*keypad)(WINDOW *win, bool bf);
|
||||||
int (*curs_set)(int visibility);
|
int (*curs_set)(int visibility);
|
||||||
|
int (*flushinp)(void);
|
||||||
int (*noecho)(void);
|
int (*noecho)(void);
|
||||||
int (*raw)(void);
|
int (*raw)(void);
|
||||||
int *ESCDELAY;
|
int *ESCDELAY;
|
||||||
@ -181,6 +182,7 @@ static void _bmDrawCursesRender(const bmMenu *menu)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
*curses.ESCDELAY = 25;
|
*curses.ESCDELAY = 25;
|
||||||
|
curses.flushinp();
|
||||||
curses.keypad(curses.stdscr, true);
|
curses.keypad(curses.stdscr, true);
|
||||||
curses.curs_set(1);
|
curses.curs_set(1);
|
||||||
curses.noecho();
|
curses.noecho();
|
||||||
@ -409,6 +411,8 @@ int _bmDrawCursesInit(struct _bmRenderApi *api)
|
|||||||
goto function_pointer_exception;
|
goto function_pointer_exception;
|
||||||
if (!bmLoadFunction(curs_set))
|
if (!bmLoadFunction(curs_set))
|
||||||
goto function_pointer_exception;
|
goto function_pointer_exception;
|
||||||
|
if (!bmLoadFunction(flushinp))
|
||||||
|
goto function_pointer_exception;
|
||||||
if (!bmLoadFunction(noecho))
|
if (!bmLoadFunction(noecho))
|
||||||
goto function_pointer_exception;
|
goto function_pointer_exception;
|
||||||
if (!bmLoadFunction(raw))
|
if (!bmLoadFunction(raw))
|
||||||
|
Loading…
Reference in New Issue
Block a user