summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
Diffstat (limited to 'window.go')
-rw-r--r--window.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/window.go b/window.go
index 56081d2..7415010 100644
--- a/window.go
+++ b/window.go
@@ -147,18 +147,18 @@ func (parent *Node) makeNode(title string, x int, y int) *Node {
return &node
}
-func (parent *Node) AddNode(title string) *Node {
+func (n *Node) AddNode(title string) *Node {
var node Node
node.Name = title
- node.Width = parent.Width
- node.Height = parent.Height
+ node.Width = n.Width
+ node.Height = n.Height
id := Config.prefix + strconv.Itoa(Config.counter)
Config.counter += 1
node.id = id
- parent.Append(&node)
- node.parent = parent
+ n.Append(&node)
+ node.parent = n
return &node
}