forked from RepoMirrors/bemenu
Enable noecho and raw mode.
This commit is contained in:
parent
60c1ab88cc
commit
9c0b25f6a9
@ -72,6 +72,8 @@ static struct curses {
|
||||
int (*getmaxx)(WINDOW *win);
|
||||
int (*getmaxy)(WINDOW *win);
|
||||
int (*keypad)(WINDOW *win, bool bf);
|
||||
int (*noecho)(void);
|
||||
int (*raw)(void);
|
||||
int *ESCDELAY;
|
||||
int oldStdin;
|
||||
int oldStdout;
|
||||
@ -173,6 +175,8 @@ static void _bmDrawCursesRender(const bmMenu *menu)
|
||||
|
||||
*curses.ESCDELAY = 25;
|
||||
curses.keypad(curses.stdscr, true);
|
||||
curses.noecho();
|
||||
curses.raw();
|
||||
|
||||
curses.start_color();
|
||||
curses.init_pair(1, COLOR_BLACK, COLOR_RED);
|
||||
@ -395,6 +399,10 @@ int _bmDrawCursesInit(struct _bmRenderApi *api)
|
||||
goto function_pointer_exception;
|
||||
if (!bmLoadFunction(keypad))
|
||||
goto function_pointer_exception;
|
||||
if (!bmLoadFunction(noecho))
|
||||
goto function_pointer_exception;
|
||||
if (!bmLoadFunction(raw))
|
||||
goto function_pointer_exception;
|
||||
if (!bmLoadFunction(ESCDELAY))
|
||||
goto function_pointer_exception;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user