mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
fix close window bug
This commit is contained in:
parent
55181edef0
commit
9242d5f932
@ -835,7 +835,7 @@ event_esc(CPT_Event event, void *data) {
|
||||
self->remove_mouse(win);
|
||||
|
||||
// If we closed the last window, shut down.
|
||||
if (self->_windows.empty()) {
|
||||
if (self->all_windows_closed()) {
|
||||
self->_exit_flag = true;
|
||||
}
|
||||
}
|
||||
@ -1307,7 +1307,7 @@ event_window_event(CPT_Event event, void *data) {
|
||||
self->remove_mouse(win);
|
||||
|
||||
// If the last window was closed, exit the application.
|
||||
if (self->_windows.empty() && !self->_exit_flag) {
|
||||
if (self->all_windows_closed() && !self->_exit_flag) {
|
||||
framework_cat.info()
|
||||
<< "Last window was closed by user.\n";
|
||||
self->_exit_flag = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user