DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 54d7cfef14f41883e81fa463ee201956e0146199
parent b4ec56fb2a255873b021cf7b3ce175aa31fba9b8
Author: falkTX <falktx@gmail.com>
Date:   Sat,  8 Feb 2014 20:02:42 +0000

Misc fix

Diffstat:
Mdgl/src/Window.cpp | 24++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp @@ -119,11 +119,11 @@ public: PrivateData(App& app, Window* const self, const intptr_t parentId) : fApp(app), fSelf(self), - fView(puglCreate(parentId, "Window", 100, 100, true, true)), + fView(puglCreate(parentId, "Window", 100, 100, (parentId == 0), (parentId != 0))), fFirstInit(true), - fVisible(true), - fResizable(false), - fUsingEmbed(true), + fVisible(parentId != 0), + fResizable(parentId == 0), + fUsingEmbed(parentId != 0), #if DGL_OS_WINDOWS hwnd(0) #elif DGL_OS_LINUX @@ -133,12 +133,20 @@ public: _dummy('\0') #endif { - DBG("Creating embedded window..."); DBGF; + if (parentId != 0) { + DBG("Creating embedded window..."); DBGF; + } else { + DBG("Creating window without parent..."); DBGF; + } + init(); - DBG("NOTE: Embed window is always visible and non-resizable\n"); - fApp._oneShown(); - fFirstInit = false; + if (parentId != 0) + { + DBG("NOTE: Embed window is always visible and non-resizable\n"); + fApp._oneShown(); + fFirstInit = false; + } } void init()