mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
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
This commit is contained in:
parent
4ee9f351ea
commit
5fd5024ca6
1 changed files with 4 additions and 3 deletions
|
|
@ -9,10 +9,9 @@
|
|||
#define _POSIX_C_SOURCE 200809L
|
||||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#include <types/wlr_output.h>
|
||||
#include <wlr/types/wlr_buffer.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_xdg_output_v1.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue