mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-05 07:15:31 -04:00
use a swapchain buffer when enabling an output via wlr_output_management_v1
This commit is contained in:
parent
1b620900ba
commit
f81539eba8
1 changed files with 5 additions and 2 deletions
7
dwl.c
7
dwl.c
|
|
@ -15,6 +15,7 @@
|
|||
#include <wlr/backend.h>
|
||||
#include <wlr/backend/libinput.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/swapchain.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_alpha_modifier_v1.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
|
|
@ -1959,8 +1960,10 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, int test)
|
|||
goto out;
|
||||
|
||||
for (i = 0; i < states_len; i++) {
|
||||
Monitor *m = states[i].output->data;
|
||||
wlr_scene_output_build_state(m->scene_output, &states[i].base, NULL);
|
||||
struct wlr_swapchain *swapchain = wlr_output_swapchain_manager_get_swapchain(
|
||||
&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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue