From 1f8bd79abee5d96a41a934d1eb8c74e90ccbcc8f Mon Sep 17 00:00:00 2001 From: snyh Date: Tue, 31 Dec 2013 09:20:13 +0800 Subject: examples:randr use info.Connection to detect whether there has any Randr.Modes --- nexgb/examples/randr/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nexgb/examples/randr') diff --git a/nexgb/examples/randr/main.go b/nexgb/examples/randr/main.go index 427aed6..414ef8d 100644 --- a/nexgb/examples/randr/main.go +++ b/nexgb/examples/randr/main.go @@ -45,7 +45,7 @@ func main() { log.Fatal(err) } - if len(info.Modes) > 0 { + if info.Connection == randr.ConnectionConnected { bestMode := info.Modes[0] for _, mode := range resources.Modes { if mode.Id == uint32(bestMode) { -- cgit v1.2.3-70-g09d2