New approach for Window (always valid; swap handles for real UI)

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-11-03 23:27:24 +00:00
parent 823ad6b53d
commit 9ff29396df
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
5 changed files with 209 additions and 78 deletions

View file

@ -379,6 +379,7 @@ public:
context->event = new rack::widget::EventState;
context->scene = new rack::app::Scene;
context->event->rootWidget = context->scene;
context->window = new rack::window::Window;
context->patch->loadTemplate();
context->scene->rackScroll->reset();
@ -386,16 +387,6 @@ public:
#ifdef HAVE_LIBLO
fInitializer->oscPlugin = this;
#endif
#if defined(__MOD_DEVICES__) && !defined(HEADLESS)
context->window = new rack::window::Window;
rack::window::WindowInit(context->window, this);
/*
context->scene->removeChild(context->scene->menuBar);
context->scene->menuBar = rack::app::createMenuBar(getWindow(), getApp().isStandalone());
context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll);
*/
#endif
}
~CardinalPlugin() override
@ -413,11 +404,6 @@ public:
{
const ScopedContext sc(this);
#if defined(__MOD_DEVICES__) && !defined(HEADLESS)
delete context->window;
context->window = nullptr;
#endif
delete context;
}