mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
output: Set output mode during main commit
Removes duplication across all the backends to finally apply the mode to the output.
This commit is contained in:
parent
530e58b96e
commit
8243399385
5 changed files with 14 additions and 21 deletions
|
|
@ -814,6 +814,20 @@ bool wlr_output_commit_state(struct wlr_output *output,
|
|||
wlr_swapchain_set_buffer_submitted(output->swapchain, pending.buffer);
|
||||
}
|
||||
|
||||
if (pending.committed & WLR_OUTPUT_STATE_MODE) {
|
||||
switch (pending.mode_type) {
|
||||
case WLR_OUTPUT_STATE_MODE_FIXED:
|
||||
wlr_output_update_mode(output, pending.mode);
|
||||
break;
|
||||
case WLR_OUTPUT_STATE_MODE_CUSTOM:
|
||||
wlr_output_update_custom_mode(output,
|
||||
pending.custom_mode.width,
|
||||
pending.custom_mode.height,
|
||||
pending.custom_mode.refresh);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
struct wlr_output_event_commit event = {
|
||||
.output = output,
|
||||
.committed = pending.committed,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue