diff options
author | James Booth <boothj5@gmail.com> | 2015-01-14 23:57:45 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-01-14 23:57:45 +0000 |
commit | 3984c660b6c46533de5b03fd4ae583b68778bff7 (patch) | |
tree | 47ec77a87d657b61536e4f67fdddcec5cf1483c1 /src/ui | |
parent | a6160d52c6fc63cab8a8f7b7c5e8563713ac0964 (diff) | |
download | profani-tty-3984c660b6c46533de5b03fd4ae583b68778bff7.tar.gz |
Removed result from main loop
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/core.c | 9 | ||||
-rw-r--r-- | src/ui/ui.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 15dddbb7..855c600c 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -175,16 +175,19 @@ ui_close(void) } wint_t -ui_get_char(char *input, int *size, int *result) +ui_get_char(char *input, int *size) { - wint_t ch = inp_get_char(input, size, result); - if (ch != ERR && *result != ERR) { + int result = 0; + wint_t ch = inp_get_char(input, size, &result); + if (ch != ERR && result != ERR) { ui_reset_idle_time(); ui_input_nonblocking(TRUE); } else { ui_input_nonblocking(FALSE); } + ui_handle_special_keys(ch, result); + return ch; } diff --git a/src/ui/ui.h b/src/ui/ui.h index 58ce8fb5..600f7fe0 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -230,7 +230,7 @@ void ui_update_presence(const resource_presence_t resource_presence, void ui_about(void); void ui_statusbar_new(const int win); -wint_t ui_get_char(char *input, int *size, int *result); +wint_t ui_get_char(char *input, int *size); void ui_input_clear(void); void ui_input_nonblocking(gboolean); void ui_replace_input(char *input, const char * const new_input, int *size); |