mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 06:36:21 +00:00
Merge pull request #1930 from H3rnand3zzz/cleanup/inputwin
Minor `inputwin.c` refactoring/cleanup
This commit is contained in:
@@ -237,15 +237,16 @@ inp_win_resize(void)
|
||||
}
|
||||
|
||||
wbkgd(inp_win, theme_attrs(THEME_INPUT_TEXT));
|
||||
;
|
||||
|
||||
_inp_win_update_virtual();
|
||||
}
|
||||
|
||||
void
|
||||
inp_nonblocking(gboolean reset)
|
||||
{
|
||||
gint inpblock = prefs_get_inpblock();
|
||||
if (!prefs_get_boolean(PREF_INPBLOCK_DYNAMIC)) {
|
||||
inp_timeout = prefs_get_inpblock();
|
||||
inp_timeout = inpblock;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -254,14 +255,14 @@ inp_nonblocking(gboolean reset)
|
||||
no_input_count = 0;
|
||||
}
|
||||
|
||||
if (inp_timeout < prefs_get_inpblock()) {
|
||||
if (inp_timeout < inpblock) {
|
||||
no_input_count++;
|
||||
|
||||
if (no_input_count % 10 == 0) {
|
||||
inp_timeout += no_input_count;
|
||||
|
||||
if (inp_timeout > prefs_get_inpblock()) {
|
||||
inp_timeout = prefs_get_inpblock();
|
||||
if (inp_timeout > inpblock) {
|
||||
inp_timeout = inpblock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user