Merge pull request #480 from go-vgo/bitmap-pr

Optimize x11 alert show
This commit is contained in:
Evans 2022-02-22 14:55:37 -08:00 committed by GitHub
commit e7c518eb2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,6 @@ package robotgo
import (
"errors"
"fmt"
"log"
"github.com/robotn/xgb"
@ -224,10 +223,11 @@ func Alert(title, msg string, args ...string) bool {
c += cancelBtn + ":1"
}
c += ` -default ` + defaultBtn
c += ` -geometry 400x200`
out, err := Run(c)
if err != nil {
fmt.Println("Alert: ", err, ". ", string(out))
// fmt.Println("Alert: ", err, ". ", string(out))
return false
}