Commited a possible fix to the screen update bug.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@258 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-06 18:17:13 +00:00
parent c2a0fd90dc
commit fc903274ae
7 changed files with 19 additions and 3 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ namespace display {
void
Canvas::resize(int x, int y, int w, int h) {
delwin(m_window);
m_window = newwin(h, w, y, x);
wresize(m_window, h, w);
mvwin(m_window, y, x);
}
void
+3
View File
@@ -66,6 +66,9 @@ public:
A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { mvwprintw(m_window, y, x, str, a1, a2, a3, a4, a5, a6); }
private:
Canvas(const Canvas&);
void operator = (const Canvas&);
WINDOW* m_window;
};
+2
View File
@@ -65,6 +65,8 @@ Manager::adjust_layout() {
void
Manager::do_update() {
wnoutrefresh(stdscr);
std::for_each(begin(), end(), std::mem_fun(&Window::redraw));
std::for_each(begin(), end(), std::mem_fun(&Window::refresh));
+4
View File
@@ -7,6 +7,10 @@
namespace display {
Window::~Window() {
delete m_canvas;
}
void
Window::refresh() {
m_canvas->refresh();
+2 -1
View File
@@ -11,7 +11,8 @@ class Window {
public:
Window(Canvas* c = NULL, bool d = false, int h = 1) :
m_canvas(c), m_dynamic(d), m_minHeight(h) {}
virtual ~Window() {}
virtual ~Window();
bool is_dynamic() { return m_dynamic; }
bool is_dirty() { return m_lastDraw == 0; }
+3
View File
@@ -36,6 +36,9 @@ public:
void disable();
private:
Download(const Download&);
void operator = (const Download&);
void receive_next();
void receive_prev();
+3
View File
@@ -30,6 +30,9 @@ public:
void disable();
private:
DownloadList(const DownloadList&);
void operator = (const DownloadList&);
void receive_next();
void receive_prev();