HACK: feat: make SPICE pass through QEMU monitor flags

This commit is contained in:
Rafael Gieschke 2026-05-27 16:34:46 +02:00
parent 9a595dc305
commit 56ab47e37f
2 changed files with 6 additions and 0 deletions

View File

@ -2345,6 +2345,7 @@ static void marshall_monitors_config(RedChannelClient *rcc, SpiceMarshaller *bas
msg->heads[count].height = monitors_config->heads[i].height;
msg->heads[count].x = monitors_config->heads[i].x;
msg->heads[count].y = monitors_config->heads[i].y;
msg->heads[count].flags = monitors_config->heads[i].flags;
count++;
}
msg->count = count;

View File

@ -2391,15 +2391,20 @@ void display_channel_set_monitors_config_to_primary(DisplayChannel *display)
DrawContext *context = &surface->context;
uint16_t old_max = 1;
int old_flags = 0;
if (display->priv->monitors_config) {
old_max = display->priv->monitors_config->max_allowed;
if (display->priv->monitors_config->count > 0) {
old_flags = display->priv->monitors_config->heads[0].flags;
}
monitors_config_unref(display->priv->monitors_config);
}
QXLHead head = { 0, };
head.width = context->width;
head.height = context->height;
head.flags = old_flags;
display->priv->monitors_config = monitors_config_new(&head, 1, old_max);
}