diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-02-14 14:55:38 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-02-14 14:55:38 -0500 |
commit | c6cb87be19dba185e32af59e1e7fd1217a15c08b (patch) | |
tree | c384812e6a7ab83a5c8ae0c3e192dcd3506c02f6 | |
parent | output destroy (diff) | |
download | sway-c6cb87be19dba185e32af59e1e7fd1217a15c08b.tar.gz sway-c6cb87be19dba185e32af59e1e7fd1217a15c08b.tar.zst sway-c6cb87be19dba185e32af59e1e7fd1217a15c08b.zip |
output damage fix
-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 16183870..a66601b5 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 | } |
@@ -215,8 +216,13 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { | |||
215 | struct sway_output *soutput = wl_container_of(listener, soutput, frame); | 216 | struct sway_output *soutput = wl_container_of(listener, soutput, frame); |
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; |
219 | float clear_color[] = {0.25f, 0.25f, 0.25f, 1.0f}; | ||
220 | struct wlr_renderer *renderer = wlr_backend_get_renderer(wlr_output->backend); | ||
221 | wlr_renderer_clear(renderer, &clear_color); | ||
218 | 222 | ||
219 | wlr_output_make_current(wlr_output); | 223 | int buffer_age = -1; |
224 | wlr_output_make_current(wlr_output, &buffer_age); | ||
225 | wlr_renderer_begin(server->renderer, wlr_output); | ||
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); |