3 Commits

2 changed files with 3 additions and 3 deletions

View File

@@ -191,7 +191,7 @@ func (this *box) SetDNDAccept (types ...data.Mime) {
} }
func (this *box) SetFocused (focused bool) { func (this *box) SetFocused (focused bool) {
hierarchy := this.parent.getHierarchy() hierarchy := this.getHierarchy()
if hierarchy == nil { if hierarchy == nil {
focusedCopy := focused focusedCopy := focused
this.focusQueued = &focusedCopy this.focusQueued = &focusedCopy
@@ -217,7 +217,7 @@ func (this *box) SetFocusable (focusable bool) {
func (this *box) Focused () bool { func (this *box) Focused () bool {
hierarchy := this.getHierarchy() hierarchy := this.getHierarchy()
if hierarchy == nil { return false } if hierarchy == nil { return false }
return hierarchy.isFocused(this) return hierarchy.isFocused(this.outer)
} }
func (this *box) Modifiers () input.Modifiers { func (this *box) Modifiers () input.Modifiers {

View File

@@ -36,7 +36,7 @@ func (this *Hierarchy) HandleKeyDown (key input.Key, numberPad bool) {
// be called *before* HandleKeyUp. // be called *before* HandleKeyUp.
func (this *Hierarchy) HandleKeyUp (key input.Key, numberPad bool) { func (this *Hierarchy) HandleKeyUp (key input.Key, numberPad bool) {
if target := this.keyboardTarget(); target != nil { if target := this.keyboardTarget(); target != nil {
target.handleKeyDown(key, numberPad) target.handleKeyUp(key, numberPad)
} }
} }