ref: c5b15b0705ec856623c093cdc77cb4836e35c8d8
parent: ee9f9d3ea405fb6e546ce68cc63df4008c7bd4f8
author: Philip Silva <philip.silva@protonmail.com>
date: Sun Feb 21 18:23:07 EST 2021
Fix bg artifacts on url change
--- a/browser/browser.go
+++ b/browser/browser.go
@@ -1450,9 +1450,18 @@
if emptyBody {
b.Website.UI = &duit.Label{}
}
+
+ // Workaround to clear background to white for websites that don't use the whole window
+ white, err := dui.Display.AllocImage(image.Rect(0, 0, 10, 10), draw.ARGB32, true, 0xffffffff)
+ if err != nil {
+ log.Errorf("%v", err)
+ }
+ tmp := dui.Background
+ dui.Background = white
dui.MarkLayout(dui.Top.UI)
dui.MarkDraw(dui.Top.UI)
dui.Render()
+ dui.Background = tmp
}
func (b *Browser) get(uri *url.URL, isNewOrigin bool) (buf []byte, contentType opossum.ContentType, err error) {