code cleanup in remote.cc
This commit is contained in:
parent
9230ccc087
commit
db3a953961
|
@ -288,19 +288,18 @@ void RemoteClient::process_next_message()
|
||||||
|
|
||||||
void RemoteClient::write_next_key()
|
void RemoteClient::write_next_key()
|
||||||
{
|
{
|
||||||
// read key before checking dimensions
|
Message msg(m_socket);
|
||||||
// so that get_key may handle a resize event
|
// do that before checking dimensions as get_key may
|
||||||
Key key = m_ui->get_key();
|
// handle a resize event.
|
||||||
|
write(msg, m_ui->get_key());
|
||||||
|
|
||||||
DisplayCoord dimensions = m_ui->dimensions();
|
DisplayCoord dimensions = m_ui->dimensions();
|
||||||
Message msg(m_socket);
|
|
||||||
if (dimensions != m_dimensions)
|
if (dimensions != m_dimensions)
|
||||||
{
|
{
|
||||||
m_dimensions = dimensions;
|
m_dimensions = dimensions;
|
||||||
Key key{ resize_modifier, Codepoint(((int)dimensions.line << 16) | (int)dimensions.column) };
|
Key key{ resize_modifier, Codepoint(((int)dimensions.line << 16) | (int)dimensions.column) };
|
||||||
write(msg, key);
|
write(msg, key);
|
||||||
}
|
}
|
||||||
write(msg, key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user