mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-16 15:32:09 +00:00
Create plugin windows off the webview callback stack
wx 3.3.2 delivers webview script messages synchronously inside the native callback on GTK and macOS, so script plugins run with the plugins-dialog webview's signal/delegate frame on the stack. Creating and presenting the orca.host.ui window from there crashed on Linux at Raise() -- gtk_window_present while GTK's deferred show was still in flight. Defer the whole window creation to a CallAfter with a pre-bound registry handle (post/close stay FIFO-safe, teardown races become a no-op), and drop Raise() plus the show_modeless_dialog wrapper: Show() already activates and fronts a new window on every platform.
This commit is contained in:
@@ -163,14 +163,6 @@ PluginWebDialog* PluginWebDialog::create_modeless_dialog(wxWindow* parent,
|
||||
std::move(on_destroyed));
|
||||
}
|
||||
|
||||
void PluginWebDialog::show_modeless_dialog(PluginWebDialog* dialog)
|
||||
{
|
||||
if (dialog == nullptr)
|
||||
return;
|
||||
dialog->Show();
|
||||
dialog->Raise();
|
||||
}
|
||||
|
||||
void PluginWebDialog::post_message(PluginWebDialog* dialog, const nlohmann::json& data)
|
||||
{
|
||||
if (dialog != nullptr && dialog->is_open())
|
||||
|
||||
Reference in New Issue
Block a user