~eliasnaur/gio-patches

gio: app: change background for js v3 PROPOSED

Paulo Melo
Paulo Melo: 1
 app: change background for js

 1 files changed, 7 insertions(+), 1 deletions(-)
#428966 apple.yml success
#428967 freebsd.yml success
#428968 linux.yml failed
#428969 openbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~eliasnaur/gio-patches/patches/20343/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH gio v3] app: change background for js Export this patch

Paulo Melo
Default window background is white.
JS default background is transparent black.

Signed-off-by: Paulo Melo <paulo.durrer.melo@gmail.com>
---
 app/loop.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/loop.go b/app/loop.go
index cf00c41..32b579e 100644
--- a/app/loop.go
+++ b/app/loop.go
@@ -86,7 +86,13 @@ func (l *renderLoop) renderLoop(ctx window.Context) error {
				l.refreshErr <- ctx.MakeCurrent()
			case frame := <-l.frames:
				ctx.Lock()
				g.Clear(color.NRGBA{A: 0xff, R: 0xff, G: 0xff, B: 0xff})
				if runtime.GOOS == "js" {
					// Use transparent black when Gio is embedded, to allow mixing of Gio and
					// foreign content below.
					g.Clear(color.NRGBA{A: 0x00, R: 0x00, G: 0x00, B: 0x00})
				} else {
					g.Clear(color.NRGBA{A: 0xff, R: 0xff, G: 0xff, B: 0xff})
				}
				g.Collect(frame.viewport, frame.ops)
				// Signal that we're done with the frame ops.
				l.ack <- struct{}{}
-- 
2.26.2
builds.sr.ht
gio/patches: FAILED in 20m35s

[app: change background for js][0] v3 from [Paulo Melo][1]

[0]: https://lists.sr.ht/~eliasnaur/gio-patches/patches/20343
[1]: mailto:paulo.durrer.melo@gmail.com

✗ #428968 FAILED  gio/patches/linux.yml   https://builds.sr.ht/~eliasnaur/job/428968
✓ #428966 SUCCESS gio/patches/apple.yml   https://builds.sr.ht/~eliasnaur/job/428966
✓ #428969 SUCCESS gio/patches/openbsd.yml https://builds.sr.ht/~eliasnaur/job/428969
✓ #428967 SUCCESS gio/patches/freebsd.yml https://builds.sr.ht/~eliasnaur/job/428967
Thanks, merged.

Elias