Files
streamctl/pkg/windowmanagerhandler/window_manager_handler_linux.go

28 lines
449 B
Go

//go:build linux
// +build linux
package windowmanagerhandler
import (
"context"
"os"
)
type WindowID uint64
type XWMOrWaylandWM interface {
WindowFocusChangeChan(ctx context.Context) <-chan WindowFocusChange
}
type PlatformSpecificWindowManagerHandler struct {
XWMOrWaylandWM
}
func (wmh *WindowManagerHandler) init() error {
if os.Getenv("DISPLAY") != "" {
return wmh.initUsingXServer()
} else {
return wmh.initUsingWayland()
}
}