From 34def3567365aabc3eb26029aa373ba47b1c02f4 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 8 Jun 2021 03:30:59 +0200 Subject: [PATCH] Add method to close X windows --- desktop_unix.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop_unix.go b/desktop_unix.go index 8eb0e31..372985c 100644 --- a/desktop_unix.go +++ b/desktop_unix.go @@ -153,6 +153,11 @@ func (x Xorg) RequestActivation(w Window) error { return ewmh.ActiveWindowReq(x.util, xproto.Window(w.ID)) } +// CloseWindow closes a window. +func (x Xorg) CloseWindow(w Window) error { + return ewmh.CloseWindow(x.util, xproto.Window(w.ID)) +} + func (x Xorg) atom(aname string) *xproto.InternAtomReply { a, err := xproto.InternAtom(x.conn, true, uint16(len(aname)), aname).Reply() if err != nil {