Tell all local emulators on resize

This commit is contained in:
Keith Winstein
2011-08-14 03:12:29 -04:00
parent fe68676787
commit e50b67b845
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -131,7 +131,8 @@ namespace Network {
string get_remote_diff( void );
RemoteState &get_remote_state_mutable( void ) { return received_states.back().state; }
typename list< TimestampedState<RemoteState > >::iterator begin( void ) { return received_states.begin(); }
typename list< TimestampedState<RemoteState > >::iterator end( void ) { return received_states.end(); }
uint64_t get_remote_state_num( void ) { return received_states.back().num; }
+5 -1
View File
@@ -193,7 +193,11 @@ void client( const char *ip, int port, const char *key )
network.get_current_state().push_back( res );
/* tell local emulator -- there is probably a safer way to do this */
network.get_remote_state_mutable().act( &res );
for ( list< Network::TimestampedState<Terminal::Complete> >::iterator i = network.begin();
i != network.end();
i++ ) {
i->state.act( &res );
}
}
if ( (pollfds[ 0 ].revents | pollfds[ 1 ].revents)