From cb0314d1d6bd3bf5c4d5f5068e22667e9714b030 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Thu, 29 May 2025 21:03:02 +0100 Subject: [PATCH] invalidate the map display each time we repaint it really we should only need to do this when the app-state changes --- pkgs/maps/main.fnl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/maps/main.fnl b/pkgs/maps/main.fnl index 72f7559..dadd191 100644 --- a/pkgs/maps/main.fnl +++ b/pkgs/maps/main.fnl @@ -76,6 +76,7 @@ label.readout { ;; to fill the width of the screen plus a bit (fn cairo-the-map [self g] + (: (self:get_window) :invalidate_rect nil) (let [{ : lat : lon : zoom } app-state num-tiles-x (+ 0 (math.ceil (/ map-width tile-size))) num-tiles-y (+ 0 (math.ceil (/ map-height tile-size))) @@ -116,7 +117,7 @@ label.readout { (fn osm-widget [] - (Gtk.Label { + (Gtk.DrawingArea { :width map-width :height map-height :on_draw cairo-the-map }))