| @@ -131,7 +131,7 @@ struct Window::PrivateData { | |||||
| #endif | #endif | ||||
| leakDetector_PrivateData() | leakDetector_PrivateData() | ||||
| { | { | ||||
| if (parentId != 0) | |||||
| if (fUsingEmbed) | |||||
| { | { | ||||
| DBG("Creating embedded window..."); DBGF; | DBG("Creating embedded window..."); DBGF; | ||||
| puglInitWindowParent(fView, parentId); | puglInitWindowParent(fView, parentId); | ||||
| @@ -143,7 +143,7 @@ struct Window::PrivateData { | |||||
| init(); | init(); | ||||
| if (parentId != 0) | |||||
| if (fUsingEmbed) | |||||
| { | { | ||||
| DBG("NOTE: Embed window is always visible and non-resizable\n"); | DBG("NOTE: Embed window is always visible and non-resizable\n"); | ||||
| puglShowWindow(fView); | puglShowWindow(fView); | ||||
| @@ -206,6 +206,12 @@ struct Window::PrivateData { | |||||
| //fOnModal = false; | //fOnModal = false; | ||||
| fWidgets.clear(); | fWidgets.clear(); | ||||
| if (fUsingEmbed) | |||||
| { | |||||
| puglHideWindow(fView); | |||||
| fApp.pData->oneHidden(); | |||||
| } | |||||
| if (fSelf != nullptr) | if (fSelf != nullptr) | ||||
| { | { | ||||
| fApp.pData->windows.remove(fSelf); | fApp.pData->windows.remove(fSelf); | ||||
| @@ -235,6 +241,10 @@ struct Window::PrivateData { | |||||
| void close() | void close() | ||||
| { | { | ||||
| DBG("Window close\n"); | DBG("Window close\n"); | ||||
| if (fUsingEmbed) | |||||
| return; | |||||
| setVisible(false); | setVisible(false); | ||||
| if (! fFirstInit) | if (! fFirstInit) | ||||