mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-11 16:55:33 +00:00
Implement display_mode message needed for backwards compat
This commit is contained in:
parent
2788b2ec46
commit
652c13e71b
@ -615,6 +615,7 @@ DisplayChannel::DisplayChannel(RedClient& client, uint32_t id,
|
||||
handler->set_handler(SPICE_MSG_DISCONNECTING, &DisplayChannel::handle_disconnect);
|
||||
handler->set_handler(SPICE_MSG_NOTIFY, &DisplayChannel::handle_notify);
|
||||
|
||||
handler->set_handler(SPICE_MSG_DISPLAY_MODE, &DisplayChannel::handle_mode);
|
||||
handler->set_handler(SPICE_MSG_DISPLAY_MARK, &DisplayChannel::handle_mark);
|
||||
handler->set_handler(SPICE_MSG_DISPLAY_RESET, &DisplayChannel::handle_reset);
|
||||
|
||||
@ -1195,6 +1196,17 @@ void DisplayChannel::create_canvas(int surface_id, const std::vector<int>& canva
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayChannel::handle_mode(RedPeer::InMessage* message)
|
||||
{
|
||||
SpiceMsgDisplayMode *mode = (SpiceMsgDisplayMode *)message->data();
|
||||
|
||||
if (screen()) {
|
||||
destroy_primary_surface();
|
||||
}
|
||||
create_primary_surface(mode->x_res, mode->y_res,
|
||||
mode->bits == 32 ? SPICE_SURFACE_FMT_32_xRGB : SPICE_SURFACE_FMT_16_555);
|
||||
}
|
||||
|
||||
void DisplayChannel::handle_mark(RedPeer::InMessage *message)
|
||||
{
|
||||
_mark = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user