mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-12-13 00:13:19 +00:00
use a swapchain buffer when enabling an output via wlr_output_management_v1
This commit is contained in:
parent
1b620900ba
commit
f81539eba8
7
dwl.c
7
dwl.c
@ -15,6 +15,7 @@
|
|||||||
#include <wlr/backend.h>
|
#include <wlr/backend.h>
|
||||||
#include <wlr/backend/libinput.h>
|
#include <wlr/backend/libinput.h>
|
||||||
#include <wlr/render/allocator.h>
|
#include <wlr/render/allocator.h>
|
||||||
|
#include <wlr/render/swapchain.h>
|
||||||
#include <wlr/render/wlr_renderer.h>
|
#include <wlr/render/wlr_renderer.h>
|
||||||
#include <wlr/types/wlr_alpha_modifier_v1.h>
|
#include <wlr/types/wlr_alpha_modifier_v1.h>
|
||||||
#include <wlr/types/wlr_compositor.h>
|
#include <wlr/types/wlr_compositor.h>
|
||||||
@ -1959,8 +1960,10 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
for (i = 0; i < states_len; i++) {
|
for (i = 0; i < states_len; i++) {
|
||||||
Monitor *m = states[i].output->data;
|
struct wlr_swapchain *swapchain = wlr_output_swapchain_manager_get_swapchain(
|
||||||
wlr_scene_output_build_state(m->scene_output, &states[i].base, NULL);
|
&swapchain_manager, states[i].output);
|
||||||
|
if (swapchain && !states[i].output->enabled)
|
||||||
|
wlr_output_state_set_buffer(&states[i].base, wlr_swapchain_acquire(swapchain));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(ok = wlr_backend_commit(backend, states, states_len)))
|
if (!(ok = wlr_backend_commit(backend, states, states_len)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user