mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
output: re-introduce atomic mode, enabled, scale and transform
This reverts commit01f903874band re-applies commitee5f98ad49. Updates: https://github.com/swaywm/wlroots/issues/1640 (Atomic output updates issue) See also: https://github.com/swaywm/wlroots/pull/1762 (Atomic output updates original PR) See also: https://github.com/swaywm/wlroots/issues/1780 (Issue caused by atomic output updates) See also: https://github.com/swaywm/sway/issues/4419 (Issue caused by atomic output updates) See also: https://github.com/swaywm/wlroots/pull/1781 (Revert PR)
This commit is contained in:
parent
e0e5a167ed
commit
5d1ba0f446
9 changed files with 333 additions and 159 deletions
|
|
@ -58,8 +58,26 @@ static bool output_attach_render(struct wlr_output *wlr_output,
|
|||
}
|
||||
|
||||
static bool output_commit(struct wlr_output *wlr_output) {
|
||||
// Nothing needs to be done for pbuffers
|
||||
wlr_output_send_present(wlr_output, NULL);
|
||||
if (wlr_output->pending.committed & WLR_OUTPUT_STATE_ENABLED) {
|
||||
wlr_log(WLR_DEBUG, "Cannot disable a headless output");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (wlr_output->pending.committed & WLR_OUTPUT_STATE_MODE) {
|
||||
assert(wlr_output->pending.mode_type == WLR_OUTPUT_STATE_MODE_CUSTOM);
|
||||
if (!output_set_custom_mode(wlr_output,
|
||||
wlr_output->pending.custom_mode.width,
|
||||
wlr_output->pending.custom_mode.height,
|
||||
wlr_output->pending.custom_mode.refresh)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (wlr_output->pending.committed & WLR_OUTPUT_STATE_BUFFER) {
|
||||
// Nothing needs to be done for pbuffers
|
||||
wlr_output_send_present(wlr_output, NULL);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +94,6 @@ static void output_destroy(struct wlr_output *wlr_output) {
|
|||
}
|
||||
|
||||
static const struct wlr_output_impl output_impl = {
|
||||
.set_custom_mode = output_set_custom_mode,
|
||||
.destroy = output_destroy,
|
||||
.attach_render = output_attach_render,
|
||||
.commit = output_commit,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue