diff options
| author | snyh <[email protected]> | 2013-12-31 09:20:13 +0800 |
|---|---|---|
| committer | snyh <[email protected]> | 2013-12-31 09:20:13 +0800 |
| commit | f96506e570f53aa7e93e2a14dec6f9e0717a4fd7 (patch) | |
| tree | 1f78d25b7c8db4ec3df71c98007aebfea7564b8f | |
| parent | 95ab1c95ecda369dff5e095f1dfa134dea1c1308 (diff) | |
examples:randr use info.Connection to detect whether there has any Randr.Modes
| -rw-r--r-- | examples/randr/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/randr/main.go b/examples/randr/main.go index 427aed6..414ef8d 100644 --- a/examples/randr/main.go +++ b/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) { |
