commit 32cf611c9c90657bd3b2f92cde4128a6d8156513
parent 270145d1c214d855dbe32307403cdf46915f3f82
Author: Stacy Harper <contact@stacyharper.net>
Date: Wed, 25 Aug 2021 21:36:27 +0200
Remove useless cb
Diffstat:
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drw.c b/drw.c
@@ -41,8 +41,8 @@ static struct wl_callback_listener frame_listener = {
void
drwsurf_flip(struct drwsurf *ds) {
- ds->cb = wl_surface_frame(ds->surf);
- wl_callback_add_listener(ds->cb, &frame_listener, (void *)ds);
+ struct wl_callback *cb = wl_surface_frame(ds->surf);
+ wl_callback_add_listener(cb, &frame_listener, (void *)ds);
if (ds->dirty) {
wl_surface_damage(ds->surf, 0, 0, ds->width, ds->height);
@@ -58,7 +58,6 @@ void
surface_frame_callback(void *data, struct wl_callback *cb, uint32_t time) {
struct drwsurf *ds = (struct drwsurf *)data;
wl_callback_destroy(cb);
- ds->cb = NULL;
drwsurf_flip(ds);
}
diff --git a/drw.h b/drw.h
@@ -48,8 +48,6 @@ struct drwsurf {
cairo_t *cairo;
PangoLayout *layout;
-
- struct wl_callback *cb;
};
#endif