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) {
hierarchy := this.parent.getHierarchy()
hierarchy := this.getHierarchy()
if hierarchy == nil {
focusedCopy := focused
this.focusQueued = &focusedCopy
@@ -217,7 +217,7 @@ func (this *box) SetFocusable (focusable bool) {
func (this *box) Focused () bool {
hierarchy := this.getHierarchy()
if hierarchy == nil { return false }
return hierarchy.isFocused(this)
return hierarchy.isFocused(this.outer)
}
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.
func (this *Hierarchy) HandleKeyUp (key input.Key, numberPad bool) {
if target := this.keyboardTarget(); target != nil {
target.handleKeyDown(key, numberPad)
target.handleKeyUp(key, numberPad)
}
}