From 659fc345c81b615fc1b1d09c0ce51083a263a79e Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 15 Aug 2023 17:55:50 +0200 Subject: [PATCH] pass nanovg context to create/delete calls Signed-off-by: falkTX --- src/override/Window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/override/Window.cpp b/src/override/Window.cpp index e5a0748..b98cddc 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -325,11 +325,13 @@ void WindowSetPluginRemote(Window* const window, NanoTopLevelWidget* const tlw) WindowParametersRestore(window); widget::Widget::ContextCreateEvent e; + e.vg = window->vg; APP->scene->onContextCreate(e); } else { widget::Widget::ContextDestroyEvent e; + e.vg = window->vg; APP->scene->onContextDestroy(e); #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS @@ -436,11 +438,13 @@ void WindowSetPluginUI(Window* const window, DISTRHO_NAMESPACE::UI* const ui) WindowParametersRestore(window); widget::Widget::ContextCreateEvent e; + e.vg = window->vg; APP->scene->onContextCreate(e); } else { widget::Widget::ContextDestroyEvent e; + e.vg = window->vg; APP->scene->onContextDestroy(e); #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS