mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-04-06 00:32:05 +02:00
suppress: gtk_style_context_add_provider: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed
This commit is contained in:
@@ -2708,11 +2708,15 @@ bool GUI_App::on_init_inner()
|
||||
|
||||
#if defined(__WXGTK20__) || defined(__WXGTK3__)
|
||||
// Suppress harmless GTK critical warnings from the GTK3/wxWidgets interaction.
|
||||
// These include widget allocation on hidden widgets and events on unrealized widgets.
|
||||
// These include widget allocation on hidden widgets, events on unrealized widgets,
|
||||
// and style context operations during widget construction (SetBackgroundColour
|
||||
// before GTK widget realization).
|
||||
g_log_set_handler("Gtk", G_LOG_LEVEL_CRITICAL,
|
||||
[](const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) {
|
||||
if (message && (strstr(message, "gtk_widget_set_allocation") ||
|
||||
strstr(message, "WIDGET_REALIZED_FOR_EVENT")))
|
||||
strstr(message, "WIDGET_REALIZED_FOR_EVENT") ||
|
||||
strstr(message, "gtk_widget_get_style_context") ||
|
||||
strstr(message, "gtk_style_context_add_provider")))
|
||||
return;
|
||||
g_log_default_handler(log_domain, log_level, message, user_data);
|
||||
}, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user