zenity: [macOS] Dialogs don't get focus automatically
Test code:
package main
import (
"fmt"
"github.com/ncruces/zenity"
)
func main() {
file, err := zenity.SelectFile(zenity.Title("Test focus on MacOS"))
if err != nil {
fmt.Println(err)
}
fmt.Println(file)
}
Run in iTerm2
, the SelectFile dialog does not get focus unless click the title bar.
Similar to https://discussions.apple.com/thread/2548172
Run in native Terminal
, the SelectFile dialog get focus with one click.
Is it possible to get focus automatically?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 32 (15 by maintainers)
Commits related to this issue
- Focus issues, see #28. — committed to ncruces/zenity by ncruces 2 years ago
zenity.WindowIcon(icon)
is inmaster
solving all focus issues.I’ll have a go at
zenity.Attach(id)
whereid
can be:int
) or app name (string
) on macOSuintptr
) on Windowsuint32
) on UnixIt’ll be the app’s responsibility to figure out what to attach to (the
zenity
command might try to attach to a parent terminal).How about this? It works on my macOS.