remove invalid window handles caused by X11/xwayland
This commit is contained in:
parent
1fcd0f5cde
commit
600fe1aaa5
@ -3,6 +3,8 @@ package hypr
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
|
||||||
|
"git.milar.in/milarin/slices"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetWindows() ([]*Window, error) {
|
func GetWindows() ([]*Window, error) {
|
||||||
@ -26,5 +28,9 @@ func GetWindows() ([]*Window, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
windows = slices.Filter(windows, func(w *Window) bool {
|
||||||
|
return w.PID != -1
|
||||||
|
})
|
||||||
|
|
||||||
return windows, nil
|
return windows, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user