mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
namespace display {
|
||||
|
||||
Window::~Window() {
|
||||
delete m_canvas;
|
||||
}
|
||||
|
||||
void
|
||||
Window::refresh() {
|
||||
m_canvas->refresh();
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -36,6 +36,9 @@ public:
|
||||
void disable();
|
||||
|
||||
private:
|
||||
Download(const Download&);
|
||||
void operator = (const Download&);
|
||||
|
||||
void receive_next();
|
||||
void receive_prev();
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ public:
|
||||
void disable();
|
||||
|
||||
private:
|
||||
DownloadList(const DownloadList&);
|
||||
void operator = (const DownloadList&);
|
||||
|
||||
void receive_next();
|
||||
void receive_prev();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user