examples:randr use info.Connection to detect whether there has any Randr.Modes
This commit is contained in:
parent
64c6e6170d
commit
1f8bd79abe
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user