mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-05 15:37:00 +08:00
28 lines
449 B
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()
|
|
}
|
|
}
|