Fix aforementioned logic

This commit is contained in:
Sasha Koshka 2023-07-16 00:56:13 -04:00
parent 17d7035200
commit c193c25b15

5
box.go
View File

@ -148,7 +148,10 @@ func (this *box) SetFocusable (focusable bool) {
} }
func (this *box) Focused () bool { func (this *box) Focused () bool {
return this.outer == this.parent.window().focused if this.parent == nil { return false }
parentWindow := this.parent.window()
if parentWindow == nil { return false }
return this.outer == parentWindow.focused
} }
func (this *box) Modifiers () input.Modifiers { func (this *box) Modifiers () input.Modifiers {