Window manager: call Close() instead of Hide() so that WindowClose event handlers fire always
This commit is contained in:
parent
c9c7b33647
commit
3b653e503c
|
@ -412,5 +412,5 @@ func (w *Window) Present(e render.Engine, P render.Point) {
|
|||
|
||||
// Destroy hides the window.
|
||||
func (w *Window) Destroy() {
|
||||
w.Hide()
|
||||
w.Close()
|
||||
}
|
||||
|
|
|
@ -171,8 +171,7 @@ func (s *Supervisor) CloseAllWindows() int {
|
|||
)
|
||||
for node != nil {
|
||||
i++
|
||||
node.window.Destroy()
|
||||
node.window.Hide()
|
||||
node.window.Close()
|
||||
node = node.next
|
||||
}
|
||||
return i
|
||||
|
@ -182,7 +181,7 @@ func (s *Supervisor) CloseAllWindows() int {
|
|||
func (s *Supervisor) CloseActiveWindow() bool {
|
||||
var node = s.winFocus
|
||||
if node != nil {
|
||||
node.window.Hide()
|
||||
node.window.Close()
|
||||
}
|
||||
|
||||
// Find the next visible window to focus.
|
||||
|
|
Loading…
Reference in New Issue
Block a user