MCPcopy Create free account
hub / github.com/DISTRHO/DPF / onPuglClose

Method onPuglClose

dgl/src/WindowPrivateData.cpp:727–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727void 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
757void Window::PrivateData::onPuglFocus(const bool focus, const CrossingMode mode)
758{

Callers 1

puglEventCallbackMethod · 0.80

Calls 4

onCloseMethod · 0.80
closeFunction · 0.50
focusMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected