From ca245e4aca91747ed6a13a5343ef786d9bf034cb Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Mon, 15 Nov 2021 12:12:02 +0100 Subject: xgb-image: fix visual searching --- prototypes/xgb-image.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'prototypes') diff --git a/prototypes/xgb-image.go b/prototypes/xgb-image.go index b8bf145..e93fe60 100644 --- a/prototypes/xgb-image.go +++ b/prototypes/xgb-image.go @@ -115,6 +115,7 @@ func main() { // XXX: We don't /need/ alpha here, it's just a minor improvement--affects // the backpixel value. (And we reject it in 30-bit depth anyway.) +Depths: for _, i := range screen.AllowedDepths { for _, v := range i.Visuals { // TODO: Could/should check other parameters, e.g., the RGB masks. @@ -124,7 +125,7 @@ func main() { if i.Depth == 32 || i.Depth == 30 && prefer30 { visual, depth = v.VisualId, i.Depth if !prefer30 || i.Depth == 30 { - break + break Depths } } } -- cgit v1.2.3-70-g09d2