Skip to content
Snippets Groups Projects
Commit 6d42ee69 authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

libxfce4panel: Strengthen sanity check for emitting "provider-signal"

This covers corner cases, for example when a menu is opened when the
panel is closed.
parent b715f716
No related branches found
No related tags found
No related merge requests found
......@@ -185,9 +185,9 @@ xfce_panel_plugin_provider_emit_signal (XfcePanelPluginProvider *provider,
{
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider));
/* emit the signal only if the plugin has not already been unparented (see
* panel_itembar_unref()) */
if (gtk_widget_get_parent (GTK_WIDGET (provider)) != NULL)
/* emit the signal only if the plugin is in a complete widget hierarchy (see
* in particular panel_itembar_unref()) */
if (GTK_IS_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (provider))))
g_signal_emit (provider, provider_signals[PROVIDER_SIGNAL], 0, provider_signal);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment