send frame_done to all visible surfaces
This commit is contained in:
parent
c8bf457c0f
commit
7de6920bd7
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 printstatus(void);
|
||||||
static void quit(const Arg *arg);
|
static void quit(const Arg *arg);
|
||||||
static void quitsignal(int signo);
|
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 rendermon(struct wl_listener *listener, void *data);
|
||||||
static void resize(Client *c, int x, int y, int w, int h, int interact);
|
static void resize(Client *c, int x, int y, int w, int h, int interact);
|
||||||
static void run(char *startup_cmd);
|
static void run(char *startup_cmd);
|
||||||
@ -1588,6 +1589,13 @@ quitsignal(int signo)
|
|||||||
quit(NULL);
|
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
|
void
|
||||||
rendermon(struct wl_listener *listener, void *data)
|
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 */
|
/* Let clients know a frame has been rendered */
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
wl_list_for_each(c, &clients, link)
|
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
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user