summaryrefslogtreecommitdiff
path: root/examples/randr/main.go
diff options
context:
space:
mode:
authorsnyh <[email protected]>2013-12-31 09:20:13 +0800
committersnyh <[email protected]>2013-12-31 09:20:13 +0800
commitf96506e570f53aa7e93e2a14dec6f9e0717a4fd7 (patch)
tree1f78d25b7c8db4ec3df71c98007aebfea7564b8f /examples/randr/main.go
parent95ab1c95ecda369dff5e095f1dfa134dea1c1308 (diff)
examples:randr use info.Connection to detect whether there has any Randr.Modes
Diffstat (limited to 'examples/randr/main.go')
-rw-r--r--examples/randr/main.go2
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) {