mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-15 06:59:43 -05:00
Add wlr_output_set_custom_mode
This commit is contained in:
parent
301850ec5d
commit
529675b7b0
6 changed files with 53 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue