From ee82bc69750659b900ce5e9de932444c2631bb7a Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Fri, 21 Apr 2023 19:26:38 -0700 Subject: [PATCH] Simple update all monitors function so that any file can an update if they need to. --- src/main.c | 7 +++++++ src/main.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/main.c b/src/main.c index 9c3bce9..a37a583 100644 --- a/src/main.c +++ b/src/main.c @@ -236,6 +236,13 @@ void monitor_update(struct Monitor *monitor) { pipeline_invalidate(monitor->pipeline); } +void monitors_update(void) { + struct Monitor *monitor; + wl_list_for_each(monitor, &monitors, link) { + monitor_update(monitor); + } +} + void pipe_in(int fd, short mask, void *data) { running = 0; } diff --git a/src/main.h b/src/main.h index 175a5e1..1eb15c7 100644 --- a/src/main.h +++ b/src/main.h @@ -22,6 +22,7 @@ struct Monitor { }; void panic(const char *fmt, ...); +void monitors_update(void); struct Monitor *monitor_from_surface(const struct wl_surface *surface); extern struct wl_compositor *compositor;