From 51d0d89897022a45efa9f53e0328da91dd1a435b Mon Sep 17 00:00:00 2001 From: milarin Date: Mon, 9 Oct 2023 12:27:02 +0200 Subject: [PATCH] xorg window properties added --- node.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/node.go b/node.go index 7ff503f..7365f6d 100644 --- a/node.go +++ b/node.go @@ -16,7 +16,6 @@ type Node struct { WindowRect Rect `json:"window_rect"` Geometry Rect `json:"geometry"` Name string `json:"name"` - XorgWindowID *int64 `json:"window"` Nodes []Node `json:"nodes"` FloatingNodes []Node `json:"floating_nodes"` Focus []NodeID `json:"focus"` @@ -30,6 +29,10 @@ type Node struct { InhibitIdle bool `json:"inhibit_idle"` IdleInhibitors IdleInhibitors `json:"idle_inhibitors"` + // Xorg compatibility + XorgWindowID *int64 `json:"window"` + XorgProperties *XorgProperties `json:"window_properties"` + // NodeTypeOutput only Primary bool `json:"primary"` Make string `json:"make"` @@ -153,3 +156,11 @@ const ( OrientationHorizontal Orientation = "horizontal" OrientationVertical Orientation = "vertical" ) + +type XorgProperties struct { + Title string `json:"title"` + Instance string `json:"instance"` + Class string `json:"class"` + Role string `json:"window_role"` + Transient NodeID `json:"transient_for"` +}