Proper handling of resize events.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@256 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-06 00:09:47 +00:00
parent ecb2fc7d57
commit 11506c5a61
8 changed files with 67 additions and 26 deletions
+6 -3
View File
@@ -74,9 +74,13 @@ main(int argc, char** argv) {
input::Bindings inputMain;
uiControl.get_input().push_back(&inputMain);
inputMain[KEY_RESIZE] = sigc::mem_fun(uiControl.get_display(), &display::Manager::adjust_layout);
poll.slot_read_stdin(sigc::mem_fun(uiControl.get_input(), &input::Manager::pressed));
poll.register_http();
poll.slot_select_interrupted(sigc::ptr_fun(display::Canvas::do_update));
torrent::initialize();
torrent::listen_open(6880, 6999);
@@ -91,15 +95,14 @@ main(int argc, char** argv) {
SignalHandler::set_handler(SIGINT, sigc::ptr_fun(&set_shutdown));
uiControl.get_display().adjust_layout();
while (!is_shutting_down || !torrent::get(torrent::SHUTDOWN_DONE)) {
if (start_shutdown && !is_shutting_down)
do_shutdown();
Timer::update();
if (is_resized())
uiControl.get_display().adjust_layout();
uiControl.get_display().do_update();
poll.poll();