Properly set window timeout

This commit is contained in:
Andrzej Rybczak
2017-03-26 06:01:43 +02:00
parent a6612d3d8e
commit 5d12c9d544
2 changed files with 3 additions and 5 deletions

View File

@@ -126,11 +126,7 @@ void Scrollpad::clear()
{ {
m_real_height = m_height; m_real_height = m_height;
m_buffer.clear(); m_buffer.clear();
werase(m_window); Window::clear();
delwin(m_window);
m_window = newpad(m_height, m_width);
setTimeout(m_window_timeout);
setColor(m_color);
} }
const std::string &Scrollpad::buffer() const std::string &Scrollpad::buffer()

View File

@@ -483,6 +483,7 @@ Window::Window(size_t startx, size_t starty, size_t width, size_t height,
} }
m_window = newpad(m_height, m_width); m_window = newpad(m_height, m_width);
wtimeout(m_window, 0);
setBaseColor(color); setBaseColor(color);
setColor(m_base_color); setColor(m_base_color);
@@ -719,6 +720,7 @@ void Window::refresh()
void Window::clear() void Window::clear()
{ {
werase(m_window); werase(m_window);
setColor(m_base_color);
} }
void Window::bold(bool bold_state) const void Window::bold(bool bold_state) const