From 22ee5ae151fa991cf23dbf1b3efb5a0d6fb9b092 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 10 Oct 2025 02:23:34 +0900 Subject: internal/app: filter ops in implementation This is cleaner and less error-prone, and should also result in negligibly less memory allocation. Signed-off-by: Ophestra --- internal/app/spx11.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/app/spx11.go') diff --git a/internal/app/spx11.go b/internal/app/spx11.go index e0e10672..219f2cb2 100644 --- a/internal/app/spx11.go +++ b/internal/app/spx11.go @@ -25,6 +25,10 @@ type spX11Op struct { } func (s *spX11Op) toSystem(state *outcomeStateSys) error { + if state.config.Enablements.Unwrap()&hst.EX11 == 0 { + return errNotEnabled + } + if d, ok := state.k.lookupEnv("DISPLAY"); !ok { return newWithMessage("DISPLAY is not set") } else { -- cgit v1.3.1