提交 81468d73 编写于 作者: S Stefan Raspl 提交者: Paolo Bonzini

tools/kvm_stat: fix undue use of initial sleeptime

We should not use the initial sleeptime for any key press that does not
switch to a different screen, as that introduces an unaesthetic flicker due
to two updates in quick succession.
Signed-off-by: NStefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 124c2fc9
......@@ -1142,14 +1142,12 @@ class Tui(object):
if char == 'x':
self.refresh_header()
self.update_drilldown()
sleeptime = DELAY_INITIAL
if char == 'q':
break
if char == 'c':
self.stats.fields_filter = DEFAULT_REGEX
self.refresh_header(0)
self.update_pid(0)
sleeptime = DELAY_INITIAL
if char == 'f':
self.show_filter_selection()
sleeptime = DELAY_INITIAL
......@@ -1162,7 +1160,6 @@ class Tui(object):
if char == 'r':
self.refresh_header()
self.stats.reset()
sleeptime = DELAY_INITIAL
except KeyboardInterrupt:
break
except curses.error:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册