> On Mon, 2006-08-07 at 08:06 +0000, [EMAIL PROTECTED] wrote: > > Hello, > > > > I'm having a problem with grabbing motion-notify events when reparenting > > widgets. Reparenting appears to stop you from receiving all of the events. > > I have written the test application below to highlight the problem. > > > > The application reparents a handle box to a window and then reparents it > > back to the main application window. > > I didn't reviewed the full source code but something that hit my eyes is your > re-parenting code. > > You should not take a GtkWidget out of its container without holding a > reference to it, as it can be destroyed when you do that. > > The steps for re-parenting a widget should be: > > g_object_ref() > gtk_container_remove > gtk_container_add > g_object_unref() > > But better to try gtk_widget_reparent (). > > -- > Iago Rubio
Thank you, It was just a quick hack. I'm beginning to think its a problem with the way events are filtered in the gtk bowels during a grab. I've managed to build gtk, gdk and the gtk-demo last night and it appears to run o.k, so I'll try debugging it later. At least now I will be able to turn the GTK_NOTE ouput on. If it turns out not to be a problem, I should at least be able to ascertain the cause. I'll post my findings here in a few days. ----------------------------------------- Email sent from www.ntlworld.com Virus-checked using McAfee(R) Software Visit www.ntlworld.com/security for more information _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list