When output has no modes, send one anyway
This commit is contained in:
parent
08ccc7f653
commit
2ffa4f3fce
|
@ -33,6 +33,12 @@ static void wl_output_send_to_resource(struct wl_resource *resource) {
|
||||||
wl_output_send_mode(resource, flags,
|
wl_output_send_mode(resource, flags,
|
||||||
mode->width, mode->height, mode->refresh);
|
mode->width, mode->height, mode->refresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (output->modes->length == 0) {
|
||||||
|
// Output has no mode, send the current width/height
|
||||||
|
wl_output_send_mode(resource, WL_OUTPUT_MODE_CURRENT,
|
||||||
|
output->width, output->height, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (version >= WL_OUTPUT_SCALE_SINCE_VERSION) {
|
if (version >= WL_OUTPUT_SCALE_SINCE_VERSION) {
|
||||||
wl_output_send_scale(resource, output->scale);
|
wl_output_send_scale(resource, output->scale);
|
||||||
|
|
Loading…
Reference in New Issue