commit 8357aab222da57ff8cf753b70934a49610a691c5
parent d5e82d34272dd9fa3c9d236abd2a9b9b24825d9f
Author: Daniel Barlow <dan@telent.net>
Date: Thu, 29 May 2025 21:03:02 +0100
invalidate the map display each time we repaint it
really we should only need to do this when the app-state changes
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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
}))