mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Update for wlroots#1660
This commit is contained in:
parent
e3d94cb83e
commit
b6e55064fe
2 changed files with 6 additions and 4 deletions
|
@ -378,14 +378,15 @@ static void damage_handle_frame(struct wl_listener *listener, void *data) {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
|
|
||||||
bool needs_swap;
|
bool needs_frame;
|
||||||
pixman_region32_t damage;
|
pixman_region32_t damage;
|
||||||
pixman_region32_init(&damage);
|
pixman_region32_init(&damage);
|
||||||
if (!wlr_output_damage_make_current(output->damage, &needs_swap, &damage)) {
|
if (!wlr_output_damage_attach_render(output->damage,
|
||||||
|
&needs_frame, &damage)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needs_swap) {
|
if (needs_frame) {
|
||||||
output_render(output, &now, &damage);
|
output_render(output, &now, &damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1086,7 +1086,8 @@ renderer_end:
|
||||||
wlr_output_transform_invert(wlr_output->transform);
|
wlr_output_transform_invert(wlr_output->transform);
|
||||||
wlr_region_transform(damage, damage, transform, width, height);
|
wlr_region_transform(damage, damage, transform, width, height);
|
||||||
|
|
||||||
if (!wlr_output_damage_swap_buffers(output->damage, when, damage)) {
|
wlr_output_set_damage(wlr_output, damage);
|
||||||
|
if (!wlr_output_commit(wlr_output)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
output->last_frame = *when;
|
output->last_frame = *when;
|
||||||
|
|
Loading…
Reference in a new issue