aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-02-10 15:49:07 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-02-10 16:13:08 -0500
commit095ddb1561001f21b812dbe0daa5e06bc688ed98 (patch)
tree5fb11d0f3212faae25c1ff94eae5081853fd7021 /sway/desktop/output.c
parentrefactor workspace.h (diff)
downloadsway-095ddb1561001f21b812dbe0daa5e06bc688ed98.tar.gz
sway-095ddb1561001f21b812dbe0daa5e06bc688ed98.tar.zst
sway-095ddb1561001f21b812dbe0daa5e06bc688ed98.zip
fix build for output damage
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c14
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,
125 double width = surface->surface->current->width; 125 double width = surface->surface->current->width;
126 double height = surface->surface->current->height; 126 double height = surface->surface->current->height;
127 127
128 struct wlr_xdg_surface_v6 *popup; 128 struct wlr_xdg_popup_v6 *popup_state;
129 wl_list_for_each(popup, &surface->popups, popup_link) { 129 wl_list_for_each(popup_state, &surface->popups, link) {
130 struct wlr_xdg_surface_v6 *popup = popup_state->base;
130 if (!popup->configured) { 131 if (!popup->configured) {
131 continue; 132 continue;
132 } 133 }
@@ -216,7 +217,12 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
216 struct wlr_output *wlr_output = data; 217 struct wlr_output *wlr_output = data;
217 struct sway_server *server = soutput->server; 218 struct sway_server *server = soutput->server;
218 219
219 wlr_output_make_current(wlr_output); 220 float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f};
221 struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend);
222 wlr_renderer_clear(renderer, &clear_color);
223
224 int buffer_age = -1;
225 wlr_output_make_current(wlr_output, &buffer_age);
220 wlr_renderer_begin(server->renderer, wlr_output); 226 wlr_renderer_begin(server->renderer, wlr_output);
221 227
222 swayc_t *workspace = soutput->swayc->focused; 228 swayc_t *workspace = soutput->swayc->focused;
@@ -236,7 +242,7 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
236 } 242 }
237 243
238 wlr_renderer_end(server->renderer); 244 wlr_renderer_end(server->renderer);
239 wlr_output_swap_buffers(wlr_output); 245 wlr_output_swap_buffers(wlr_output, &soutput->last_frame, NULL);
240 246
241 struct timespec now; 247 struct timespec now;
242 clock_gettime(CLOCK_MONOTONIC, &now); 248 clock_gettime(CLOCK_MONOTONIC, &now);