use wlr_scene_output_send_frame_done()

This commit is contained in:
Leonardo Hernandez Hernandez 2021-09-24 16:07:06 -05:00 committed by Leonardo Hernández Hernández
parent 52a33a2f1e
commit 2b2f72d7c2
Failed to generate hash of commit

17
dwl.c
View file

@ -262,7 +262,6 @@ static void pointerfocus(Client *c, struct wlr_surface *surface,
static void printstatus(void);
static void quit(const Arg *arg);
static void quitsignal(int signo);
static void rendered(struct wlr_surface *surface, int sx, int sy, void *data);
static void rendermon(struct wl_listener *listener, void *data);
static void resize(Client *c, int x, int y, int w, int h, int interact);
static void run(char *startup_cmd);
@ -1605,13 +1604,6 @@ quitsignal(int signo)
quit(NULL);
}
void
rendered(struct wlr_surface *surface, int sx, int sy, void *data)
{
struct timespec *now = data;
wlr_surface_send_frame_done(surface, now);
}
void
rendermon(struct wl_listener *listener, void *data)
{
@ -1631,14 +1623,7 @@ rendermon(struct wl_listener *listener, void *data)
/* Let clients know a frame has been rendered */
clock_gettime(CLOCK_MONOTONIC, &now);
wl_list_for_each(c, &clients, link)
if (VISIBLEON(c, c->mon))
client_for_each_surface(c, rendered, &now);
for (i = 0; i < LENGTH(m->layers); i++)
wl_list_for_each(layer, &m->layers[i], link)
wlr_layer_surface_v1_for_each_surface(layer->layer_surface, rendered, &now);
wlr_scene_output_send_frame_done(m->scene_output, &now);
}
void