MwbBrowser object was used instead of its ClutterStage to get the startup-notification window, leading to crash
Signed-off-by: Olivier Blin <[email protected]> --- browser/mwb-main.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/browser/mwb-main.c b/browser/mwb-main.c index abd7b9c..e73efbc 100644 --- a/browser/mwb-main.c +++ b/browser/mwb-main.c @@ -97,13 +97,18 @@ mwb_message_received_cb (UniqueApp *app, #ifdef MWB_SN_SUPPORT static gboolean -startup_cb (ClutterStage *stage) +startup_cb (MwbBrowser *mwb_browser) { SnLauncheeContext *context; + ClutterActor *stage; Window xwindow; - context = g_object_get_data (G_OBJECT (stage), "sn-context"); - xwindow = clutter_x11_get_stage_window (stage); + stage = clutter_actor_get_stage (CLUTTER_ACTOR (mwb_browser)); + if (!stage || !CLUTTER_ACTOR_IS_REALIZED (stage)) + return FALSE; + + context = g_object_get_data (G_OBJECT (mwb_browser), "sn-context"); + xwindow = clutter_x11_get_stage_window (CLUTTER_STAGE (stage)); sn_launchee_context_setup_window (context, xwindow); sn_launchee_context_complete (context); sn_launchee_context_unref (context); -- 1.6.4.4 _______________________________________________ Moblin dev Mailing List [email protected] To manage or unsubscribe from this mailing list visit: http://lists.moblin.org/listinfo/dev or your user account on http://moblin.org once logged in. For more information on the Moblin Developer Mailing lists visit: http://moblin.org/community/mailing-lists
