Browse Source

Fix deadlock when calling Pages.SendToFront

Resolves #21.
tablepad
Trevor Slocum 2 years ago
parent
commit
a0a7d39949
  1. 1
      CHANGELOG
  2. 8
      pages.go

1
CHANGELOG

@ -4,6 +4,7 @@ v1.4.7 (WIP)
- Fix default background transparency of Flex and Grid
- Fix negative List offset and DropDown selection
- Fix panic when clicking nil primitive in Flex
- Fix deadlock when calling Pages.SendToFront
- Fix ANSI colors 0-15
- Fix ANSI SGR codes

8
pages.go

@ -253,17 +253,17 @@ func (p *Pages) SendToFront(name string) *Pages {
p.pages = append(append(p.pages[:index], p.pages[index+1:]...), page)
}
if page.Visible && p.changed != nil {
p.Lock()
p.changed()
p.Unlock()
p.changed()
p.Lock()
}
break
}
}
if hasFocus {
p.Lock()
p.Focus(p.setFocus)
p.Unlock()
p.Focus(p.setFocus)
p.Lock()
}
return p
}

Loading…
Cancel
Save