send frame_done to all visible surfaces
This commit is contained in:
parent
c8bf457c0f
commit
7de6920bd7
1 changed files with 10 additions and 1 deletions
11
dwl.c
11
dwl.c
|
@ -261,6 +261,7 @@ 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);
|
||||
|
@ -1588,6 +1589,13 @@ 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)
|
||||
{
|
||||
|
@ -1607,7 +1615,8 @@ 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)
|
||||
wlr_surface_send_frame_done(client_surface(c), &now);
|
||||
if (VISIBLEON(c, c->mon))
|
||||
client_for_each_surface(c, rendered, &now);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue