Also apply resize to local emulator
This commit is contained in:
@@ -131,6 +131,8 @@ namespace Network {
|
|||||||
|
|
||||||
string get_remote_diff( void );
|
string get_remote_diff( void );
|
||||||
|
|
||||||
|
RemoteState &get_remote_state_mutable( void ) { return received_states.back().state; }
|
||||||
|
|
||||||
uint64_t get_remote_state_num( void ) { return received_states.back().num; }
|
uint64_t get_remote_state_num( void ) { return received_states.back().num; }
|
||||||
|
|
||||||
int fd( void ) { return connection.fd(); }
|
int fd( void ) { return connection.fd(); }
|
||||||
|
|||||||
@@ -187,8 +187,13 @@ void client( const char *ip, int port, const char *key )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tell emulator */
|
/* tell remote emulator */
|
||||||
network.get_current_state().push_back( Parser::Resize( window_size.ws_col, window_size.ws_row ) );
|
Parser::Resize res( window_size.ws_col, window_size.ws_row );
|
||||||
|
|
||||||
|
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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (pollfds[ 0 ].revents | pollfds[ 1 ].revents)
|
if ( (pollfds[ 0 ].revents | pollfds[ 1 ].revents)
|
||||||
|
|||||||
Reference in New Issue
Block a user