GNOME Bugzilla – Bug 621584
notification area crashes with multiple screen setup
Last modified: 2010-06-22 17:26:57 UTC
Created attachment 163626 [details] [review] Defer tray setup until after it's added to panel Right now, the notification area doesn't handle multi-screen (old style "zaphod mode" setups i mean) configurations very well. It just nose dives when trying to add a notification area to a panel on the second screen. This is because it calls gtk_widget_get_screen on the applet before the applet is added to the panel, which means gtk_widget_get_screen is returning invalid information. The above patch just deferrs most of the guts until after the applet is realized.
Created attachment 163627 [details] [review] Same as attachment 163626 [details] [review] but for master This is an untested forward port of the patch to master
Hrm, both patches are for master, it seems. Do you have the 2.30 one available somewhere? :-)
Review of attachment 163627 [details] [review]: Thanks for finding this! It's been a long-standing bug, and I see now that I was just not looking at the right place! ::: applets/notification_area/main.c @@ -273,3 @@ - g_signal_connect (applet, "destroy", - G_CALLBACK (applet_destroy), data); - Why are we moving this? Is it to avoid checks that applet is realized in the callbacks? @@ -295,3 @@ - g_free (ui_path); - g_object_unref (action_group); - I don't think this needs to be moved.
*** Bug 346162 has been marked as a duplicate of this bug. ***
(In reply to comment #3) > @@ -295,3 @@ > - g_free (ui_path); > - g_object_unref (action_group); > - > > I don't think this needs to be moved. (I was commenting on the whole block, not just the last two lines, obviously)
Review of attachment 163627 [details] [review]: ::: applets/notification_area/main.c @@ -273,3 @@ - g_signal_connect (applet, "destroy", - G_CALLBACK (applet_destroy), data); - Those callbacks take the AppletData struct as user data. It isn't allocated until realization now. @@ -295,3 @@ - g_free (ui_path); - g_object_unref (action_group); - At least the add_actions call does, since it takes the data argument that's now allocated in realize. We could move the g_slice_new call back and just fully initialize it later, but there's also no advantage to creating the action group early afaict.
Created attachment 164313 [details] [review] patch against gnome-2-30
Thanks Ray!