| 725 | } |
| 726 | |
| 727 | void Window::PrivateData::onPuglClose() |
| 728 | { |
| 729 | DGL_DBG("PUGL: onClose\n"); |
| 730 | |
| 731 | #ifndef DISTRHO_OS_MAC |
| 732 | // if we are running as standalone we can prevent closing in certain conditions |
| 733 | if (appData->isStandalone) |
| 734 | { |
| 735 | // a child window is active, gives focus to it |
| 736 | if (modal.child != nullptr) |
| 737 | return modal.child->focus(); |
| 738 | |
| 739 | // ask window if we should close |
| 740 | if (! self->onClose()) |
| 741 | return; |
| 742 | } |
| 743 | #endif |
| 744 | |
| 745 | if (modal.enabled) |
| 746 | stopModal(); |
| 747 | |
| 748 | if (modal.child != nullptr) |
| 749 | { |
| 750 | modal.child->close(); |
| 751 | modal.child = nullptr; |
| 752 | } |
| 753 | |
| 754 | close(); |
| 755 | } |
| 756 | |
| 757 | void Window::PrivateData::onPuglFocus(const bool focus, const CrossingMode mode) |
| 758 | { |
no test coverage detected