commit 10c98a170349b8bb4c47b2cb0aa228ef9c0dcb6a
parent b30b92c0aaab7339cfa2648b35f11dcc2040626b
Author: falkTX <falktx@gmail.com>
Date: Sun, 17 Aug 2014 02:16:01 +0100
Fix invalid "! doLoop" assertion on plugin UI close
Diffstat:
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp
@@ -131,7 +131,7 @@ struct Window::PrivateData {
#endif
leakDetector_PrivateData()
{
- if (parentId != 0)
+ if (fUsingEmbed)
{
DBG("Creating embedded window..."); DBGF;
puglInitWindowParent(fView, parentId);
@@ -143,7 +143,7 @@ struct Window::PrivateData {
init();
- if (parentId != 0)
+ if (fUsingEmbed)
{
DBG("NOTE: Embed window is always visible and non-resizable\n");
puglShowWindow(fView);
@@ -206,6 +206,12 @@ struct Window::PrivateData {
//fOnModal = false;
fWidgets.clear();
+ if (fUsingEmbed)
+ {
+ puglHideWindow(fView);
+ fApp.pData->oneHidden();
+ }
+
if (fSelf != nullptr)
{
fApp.pData->windows.remove(fSelf);
@@ -235,6 +241,10 @@ struct Window::PrivateData {
void close()
{
DBG("Window close\n");
+
+ if (fUsingEmbed)
+ return;
+
setVisible(false);
if (! fFirstInit)