mirror of
https://github.com/labwc/labwc.git
synced 2026-02-05 04:06:33 -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
Backport of 5fd5024ca6
This commit is contained in:
parent
0fb33066e9
commit
834ee3dfd4
1 changed files with 4 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#define _POSIX_C_SOURCE 200809L
|
||||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_xdg_output_v1.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
#include <wlr/util/region.h>
|
||||
|
|
@ -1299,7 +1300,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