From 01f903874b7e27539488fad7f31476d5bcbc6ac9 Mon Sep 17 00:00:00 2001 From: Rouven Czerwinski Date: Wed, 7 Aug 2019 08:11:38 +0200 Subject: Revert "output: atomic mode" This reverts commit ee5f98ad49fed0439f3313ec685307831d1d1d05. This intoduced problems where outputs could not be turned off because they had flips pending. --- backend/x11/output.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'backend/x11') diff --git a/backend/x11/output.c b/backend/x11/output.c index 7194d7fb..1307f785 100644 --- a/backend/x11/output.c +++ b/backend/x11/output.c @@ -103,38 +103,21 @@ static bool output_commit(struct wlr_output *wlr_output) { struct wlr_x11_output *output = get_x11_output_from_output(wlr_output); struct wlr_x11_backend *x11 = output->x11; - if (wlr_output->pending.committed & WLR_OUTPUT_STATE_ENABLED) { - wlr_log(WLR_DEBUG, "Cannot disable an X11 output"); - return false; + pixman_region32_t *damage = NULL; + if (wlr_output->pending.committed & WLR_OUTPUT_STATE_DAMAGE) { + damage = &wlr_output->pending.damage; } - 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) { - pixman_region32_t *damage = NULL; - if (wlr_output->pending.committed & WLR_OUTPUT_STATE_DAMAGE) { - damage = &wlr_output->pending.damage; - } - - if (!wlr_egl_swap_buffers(&x11->egl, output->surf, damage)) { - return false; - } - - wlr_output_send_present(wlr_output, NULL); + if (!wlr_egl_swap_buffers(&x11->egl, output->surf, damage)) { + return false; } + wlr_output_send_present(wlr_output, NULL); return true; } 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, -- cgit v1.2.3