From f919e65c386d6893c137589b6583aff1acfc963b Mon Sep 17 00:00:00 2001 From: "Pierre-Loup A. Griffais" Date: Wed, 20 Nov 2019 01:17:57 -0800 Subject: [PATCH] Notify XWayland surfaces when we're done with a frame from them. And remove rootston's output render path. This seems like it was the only strictly needed thing, frames seem to time out without that. Will probably find bugs later. --- src/output.c | 2 +- src/steamcompmgr.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/output.c b/src/output.c index 29cc0bd..7476d05 100644 --- a/src/output.c +++ b/src/output.c @@ -548,7 +548,7 @@ static void output_damage_handle_frame(struct wl_listener *listener, void *data) { struct roots_output *output = wl_container_of(listener, output, damage_frame); - output_render(output); +// output_render(output); } static void output_damage_handle_destroy(struct wl_listener *listener, diff --git a/src/steamcompmgr.c b/src/steamcompmgr.c index 060eccb..84972d1 100644 --- a/src/steamcompmgr.c +++ b/src/steamcompmgr.c @@ -2136,6 +2136,9 @@ steamcompmgr_main (int argc, char **argv) if (doRender) { + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + paint_all(dpy); // If we're in the middle of a fade, pump an event into the loop to @@ -2179,6 +2182,15 @@ steamcompmgr_main (int argc, char **argv) w->damaged = 1; } } + + // Send frame done event to all Wayland surfaces + for (win *w = list; w; w = w->next) + { + if ( w->xwl_surface && w->xwl_surface->surface ) + { + wlr_surface_send_frame_done(w->xwl_surface->surface, &now); + } + } } } }