diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-02-10 15:49:07 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-02-10 16:13:08 -0500 |
commit | 095ddb1561001f21b812dbe0daa5e06bc688ed98 (patch) | |
tree | 5fb11d0f3212faae25c1ff94eae5081853fd7021 /sway/desktop/output.c | |
parent | bfd2e8536485c2a8c21eadaa46d03b0709e85fcf (diff) |
fix build for output damage
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index a650665f..6b6d727a 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -125,8 +125,9 @@ static void render_xdg_v6_popups(struct wlr_xdg_surface_v6 *surface, double width = surface->surface->current->width; double height = surface->surface->current->height; - struct wlr_xdg_surface_v6 *popup; - wl_list_for_each(popup, &surface->popups, popup_link) { + struct wlr_xdg_popup_v6 *popup_state; + wl_list_for_each(popup_state, &surface->popups, link) { + struct wlr_xdg_surface_v6 *popup = popup_state->base; if (!popup->configured) { continue; } @@ -216,7 +217,12 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { struct wlr_output *wlr_output = data; struct sway_server *server = soutput->server; - wlr_output_make_current(wlr_output); + float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f}; + struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend); + wlr_renderer_clear(renderer, &clear_color); + + int buffer_age = -1; + wlr_output_make_current(wlr_output, &buffer_age); wlr_renderer_begin(server->renderer, wlr_output); swayc_t *workspace = soutput->swayc->focused; @@ -236,7 +242,7 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { } wlr_renderer_end(server->renderer); - wlr_output_swap_buffers(wlr_output); + wlr_output_swap_buffers(wlr_output, &soutput->last_frame, NULL); struct timespec now; clock_gettime(CLOCK_MONOTONIC, &now); |