diff options
author | snyh <snyh@snyh.org> | 2013-12-31 09:20:13 +0800 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-09-08 16:49:22 +0200 |
commit | 1f8bd79abee5d96a41a934d1eb8c74e90ccbcc8f (patch) | |
tree | 767f7c80698c162a855c843b56389b7e857e263b /nexgb | |
parent | 64c6e6170d86dd4b18d04c49888a6b8ac472c4d6 (diff) | |
download | haven-1f8bd79abee5d96a41a934d1eb8c74e90ccbcc8f.tar.gz haven-1f8bd79abee5d96a41a934d1eb8c74e90ccbcc8f.tar.xz haven-1f8bd79abee5d96a41a934d1eb8c74e90ccbcc8f.zip |
examples:randr use info.Connection to detect whether there has any Randr.Modes
Diffstat (limited to 'nexgb')
-rw-r--r-- | nexgb/examples/randr/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |