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.
|
// Destroy hides the window.
|
||||||
func (w *Window) Destroy() {
|
func (w *Window) Destroy() {
|
||||||
w.Hide()
|
w.Close()
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,8 +171,7 @@ func (s *Supervisor) CloseAllWindows() int {
|
||||||
)
|
)
|
||||||
for node != nil {
|
for node != nil {
|
||||||
i++
|
i++
|
||||||
node.window.Destroy()
|
node.window.Close()
|
||||||
node.window.Hide()
|
|
||||||
node = node.next
|
node = node.next
|
||||||
}
|
}
|
||||||
return i
|
return i
|
||||||
|
@ -182,7 +181,7 @@ func (s *Supervisor) CloseAllWindows() int {
|
||||||
func (s *Supervisor) CloseActiveWindow() bool {
|
func (s *Supervisor) CloseActiveWindow() bool {
|
||||||
var node = s.winFocus
|
var node = s.winFocus
|
||||||
if node != nil {
|
if node != nil {
|
||||||
node.window.Hide()
|
node.window.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the next visible window to focus.
|
// Find the next visible window to focus.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user