examples:randr use info.Connection to detect whether there has any Randr.Modes

This commit is contained in:
snyh 2013-12-31 09:20:13 +08:00 committed by Přemysl Janouch
parent 64c6e6170d
commit 1f8bd79abe
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 1 additions and 1 deletions

View File

@ -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) {