aboutsummaryrefslogtreecommitdiff
path: root/nexgb
diff options
context:
space:
mode:
authorsnyh <snyh@snyh.org>2013-12-31 09:20:13 +0800
committerPřemysl Janouch <p@janouch.name>2018-09-08 16:49:22 +0200
commit1f8bd79abee5d96a41a934d1eb8c74e90ccbcc8f (patch)
tree767f7c80698c162a855c843b56389b7e857e263b /nexgb
parent64c6e6170d86dd4b18d04c49888a6b8ac472c4d6 (diff)
downloadhaven-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.go2
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) {