From 43bccd373ccb39b30c248cc726c720a50bf57469 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Mon, 1 Feb 2021 10:28:35 +0100 Subject: [PATCH] setup() also clears rects list Window resizing will call setup(), so it is now more cleanly resetting the module. --- modules/FadingRects/FadingRects.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/FadingRects/FadingRects.cpp b/modules/FadingRects/FadingRects.cpp index ad3c504..53f22fc 100644 --- a/modules/FadingRects/FadingRects.cpp +++ b/modules/FadingRects/FadingRects.cpp @@ -155,4 +155,5 @@ void FadingRects::setup(cairo_t* context, const cairo_rectangle_t& rect) { ScreensaverPlugin::setup(context, rect); std::uniform_real_distribution dist {0.0, 360.0}; _hue = dist(_eng); + _rects.clear(); }