xgb-image: fix visual searching
This commit is contained in:
parent
c3905349b0
commit
ca245e4aca
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue