Documentation
¶
Overview ¶
Package gamescope makes externally launched windows visible and focused in gamescope Gaming Mode sessions. It does not register launches with Steam, so it cannot provide Steam/QAM menus, overlay injection, or Steam Input ownership.
Index ¶
- func BuildBaselayerValue(appID, original string) string
- func ParseBaselayerOutput(output string) string
- func ParseWindowPIDOutput(output string) (int, bool)
- type FocusManager
- type Manager
- func (m *Manager) Enabled() bool
- func (m *Manager) GamescopeDisplay() string
- func (m *Manager) IsGamingMode() bool
- func (m *Manager) ManageFocus(proc *os.Process)
- func (m *Manager) RevertFocus()
- func (m *Manager) WrapLauncher(launcher *platforms.Launcher)
- func (m *Manager) WrapLaunchers(launchers []platforms.Launcher)
- type SessionOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBaselayerValue ¶
BuildBaselayerValue prepends appID to existing baselayer values.
func ParseBaselayerOutput ¶
ParseBaselayerOutput extracts baselayer values from xprop output.
func ParseWindowPIDOutput ¶
ParseWindowPIDOutput extracts owning PID from xprop output.
Types ¶
type FocusManager ¶
type FocusManager struct {
// contains filtered or unexported fields
}
FocusManager tracks focus properties for restoration.
func (*FocusManager) Revert ¶
func (fm *FocusManager) Revert()
Revert restores original baselayer once.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager owns one platform session's gamescope detection and focus state.
func NewManager ¶
func NewManager(opts SessionOptions) *Manager
NewManager creates an independent gamescope session manager.
func (*Manager) GamescopeDisplay ¶
GamescopeDisplay returns detected gamescope X display.
func (*Manager) IsGamingMode ¶
IsGamingMode detects a gamescope Xwayland session. Positive results are briefly cached.
func (*Manager) ManageFocus ¶
ManageFocus makes proc's external window visible and focused by gamescope. This is compositor focus only; it does not make Steam own the launch.
func (*Manager) RevertFocus ¶
func (m *Manager) RevertFocus()
RevertFocus cancels this manager's pending focus and restores its active baselayer state.
func (*Manager) WrapLauncher ¶
WrapLauncher adds automatic gamescope focus handling to a non-Steam launcher. Launchers without a returned process remain fire-and-forget.
func (*Manager) WrapLaunchers ¶
WrapLaunchers adds automatic focus handling to every non-Steam launcher.
type SessionOptions ¶
type SessionOptions struct {
Enabled bool
}
SessionOptions controls gamescope integration. Zero value disables it.