From: Johan Malm Date: Tue, 15 Mar 2022 21:30:25 +0000 (+0000) Subject: output: fix incorrect call to private wlroots function X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=5fd5024ca655d07d04cfb3e9c829c1764dd8ee01;p=proto%2Flabwc.git output: fix incorrect call to private wlroots function Use wlr_output_test() instead of output_ensure_buffer() which is not a public function and only compiled when linking statically to wlroots. Also wlr_output_rollback() on failed test. Fixes issue #273 --- diff --git a/src/output.c b/src/output.c index 20f7c916..12ef53ed 100644 --- a/src/output.c +++ b/src/output.c @@ -9,10 +9,9 @@ #define _POSIX_C_SOURCE 200809L #include "config.h" #include -#include #include +#include #include -#include #include #include #include @@ -412,7 +411,9 @@ handle_output_power_manager_set_mode(struct wl_listener *listener, void *data) break; case ZWLR_OUTPUT_POWER_V1_MODE_ON: wlr_output_enable(event->output, true); - output_ensure_buffer(event->output); + if (!wlr_output_test(event->output)) { + wlr_output_rollback(event->output); + } wlr_output_commit(event->output); break; }