aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-04-23 20:36:28 +0300
committerDrew DeVault <sir@cmpwn.com>2019-04-23 14:37:44 -0600
commitb6e55064fe2422bcf2694a2ce97899108a75f077 (patch)
treeb1a150588874a984c1e68d77e0315eb5b948585f /sway
parente3d94cb83e3cc5eeb2a7761955c87a1f97bac514 (diff)
Update for wlroots#1660
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/output.c7
-rw-r--r--sway/desktop/render.c3
2 files changed, 6 insertions, 4 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index b1e3464a..0cc08525 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -378,14 +378,15 @@ static void damage_handle_frame(struct wl_listener *listener, void *data) {
struct timespec now;
clock_gettime(CLOCK_MONOTONIC, &now);
- bool needs_swap;
+ bool needs_frame;
pixman_region32_t 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;
}
- if (needs_swap) {
+ if (needs_frame) {
output_render(output, &now, &damage);
}
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 771bd908..8e848359 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -1086,7 +1086,8 @@ renderer_end:
wlr_output_transform_invert(wlr_output->transform);
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;
}
output->last_frame = *when;