basic X11 support

This commit is contained in:
piotr
2021-06-23 02:44:56 +02:00
parent 4711c36c56
commit fa9d9c3425
3 changed files with 41 additions and 24 deletions

View File

@@ -20,6 +20,10 @@ import (
"github.com/joshuarubin/go-sway"
)
func wayland() bool {
return os.Getenv("WAYLAND_DISPLAY") != "" || os.Getenv("XDG_SESSION_TYPE") == "wayland"
}
/*
Window leave-notify-event event quits the program with glib Timeout 500 ms.
We might have left the window by accident, so let's clear the timeout if window re-entered.