mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-07 00:12:55 +08:00
Continue the implementation of trigger rules (ex scene rules)
This commit is contained in:
27
pkg/windowmanagerhandler/window_manager_handler_linux.go
Normal file
27
pkg/windowmanagerhandler/window_manager_handler_linux.go
Normal file
@@ -0,0 +1,27 @@
|
||||
//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()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user