Add wlr_output_set_custom_mode

This commit is contained in:
emersion 2017-12-11 12:14:23 +01:00
parent 301850ec5d
commit 529675b7b0
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
6 changed files with 53 additions and 3 deletions

View file

@ -164,6 +164,23 @@ bool wlr_output_set_mode(struct wlr_output *output,
return result;
}
bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width,
int32_t height, int32_t refresh) {
if (!output->impl || !output->impl->set_custom_mode) {
return false;
}
bool result = output->impl->set_custom_mode(output, width, height, refresh);
if (result) {
wlr_output_update_matrix(output);
struct wl_resource *resource;
wl_resource_for_each(resource, &output->wl_resources) {
wlr_output_send_current_mode_to_resource(resource);
}
}
return result;
}
void wlr_output_update_size(struct wlr_output *output, int32_t width,
int32_t height) {
if (output->width == width && output->height == height) {