RemoteClient: call get_key soon so that it may process a resize before size change checks are done

This commit is contained in:
Maxime Coste 2012-12-03 18:51:28 +01:00
parent 8724a12dc1
commit e8df81a39d

View File

@ -288,6 +288,10 @@ void RemoteClient::process_next_message()
void RemoteClient::write_next_key()
{
// read key before checking dimensions
// so that get_key may handle a resize event
Key key = m_ui->get_key();
DisplayCoord dimensions = m_ui->dimensions();
Message msg(m_socket);
if (dimensions != m_dimensions)
@ -296,7 +300,7 @@ void RemoteClient::write_next_key()
Key key{ resize_modifier, Codepoint(((int)dimensions.line << 16) | (int)dimensions.column) };
write(msg, key);
}
write(msg, m_ui->get_key());
write(msg, key);
}
}