GDK_WINDOW_XWINDOW weirdness.



Hi guys,

I've been playing around with writing a Nautilus view for Mpeg movies, and
I've come across something I don't understand, and didn't expect. Basically,
calling GDK_WINDOW_XWINDOW () on any widget->window that is embedded in a
NautilusView crashes.

For example

da = gtk_drawing_area_new ();
gtk_container_add (GTK_CONTAINER (view), da);
gtk_widget_show (da);
sdl_win = g_strdup_printf ("SDL_WINDOW=%ld", GDK_WINDOW_XWINDOW
(da->window));
putenv (sdl_win);

crashes in a pthread callback.

whereas
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
da = gtk_drawing_area_new ();
gtk_container_add (GTK_CONTAINER (window), da);
gtk_widget_show_all (window);
sdl_win = g_strdup_printf ("SDL_WINDOW=%ld", GDK_WINDOW_XWINDOW
(da->window));
putenv (sdl_win);

works fine (execpt the movie plays outside the Nautilus window, which kinda
defeats the purpose)
Have I missed some finer point about this? I put gdk_threads_(enter|leave)
calls around the GDK_WINDOW_XWINDOW call, but it didn't help.

Thanks
iain





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]