2006/10/26, cmonst <[EMAIL PROTECTED]>:
Hi! I tried to solve this problem but still the same happens. I'm running program from xterm so I think I don't need osso_initialize(), and on console I don't get any error messages.
Depends, if you a) have a .desktop file for it b) define a service there then you need to call it, otherwise it won't matter I guess... (in the "will it be killed" context).
This is code I'm using (I'm out of ideas what can be wrong): //main gui function gui(){ HildonProgram *app; /* Create the hildon application and setup the title */ app = HILDON_PROGRAM (hildon_program_get_instance ()); g_set_application_name ("Menu Example App"); /* Create HildonAppView and set it to HildonApp */ appview = HILDON_WINDOW (hildon_window_new ()); hildon_program_add_window (app, appview); /* Create menu for view */ create_menu (appview); ///box1 = gtk_hbox_new (FALSE, 0); ///box2 = gtk_vbox_new (homogeneous, spacing); ///label = gtk_label_new ("Volume:"); ///gtk_misc_set_alignment (GTK_MISC (label), 0, 0); ///gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0); ///gtk_widget_show (label); ///adj1 = gtk_adjustment_new (1.0, 0.0, 4.0, 0.1, 1.0, 1.0); ///g_signal_connect (G_OBJECT (adj1), "value_changed",G_CALLBACK (cb_digits_scale), NULL); ///scale = gtk_vscrollbar_new (GTK_ADJUSTMENT (adj1)); ///gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0); ///gtk_box_pack_start (GTK_BOX (box1), box2, expand, fill, padding); content = gtk_event_box_new (); gtk_container_add (GTK_CONTAINER (appview), content); GstBus *bus; bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, NULL); gst_object_unref (bus); g_signal_connect (content, "expose-event", G_CALLBACK (cb_expose), videosink); //gtk_box_pack_start (GTK_BOX (box1), content, TRUE, TRUE, padding); ///gtk_container_add (GTK_CONTAINER (appview), box1); ///gtk_widget_show (box1); gtk_widget_show_all (appview); g_signal_connect(G_OBJECT(appview), "delete_event", G_CALLBACK(item_close_cb), NULL); } //callback functins static GstBusSyncReply create_window (GstBus * bus, GstMessage * message, GstPipeline * pipeline) { XGCValues values; if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT) return GST_BUS_PASS; if (!gst_structure_has_name (message->structure, "prepare-xwindow-id")) return GST_BUS_PASS; // ignore anything but 'prepare-xwindow-id' element messages content = gtk_event_box_new ();
You are creating this again here ;)
gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (GST_MESSAGE_SRC (message)), content->window);
You are giving the window pointer to the function, instead of the X id of it. Use the GDK_WINDOW_XID() macro to get the X window id for the window. You also need to be sure the GdkWindow of the event box is already created when you set it (otherwise the window pointer might be NULL or whatever), this can be done by calling gtk_widget_realize() on the event box. I suggest doing it just before entering the gtk main loop.
cb_expose (GtkWidget * w, GdkEventExpose * ev, GstElement * e) { if (GST_IS_X_OVERLAY (e) && !GTK_WIDGET_NO_WINDOW (w) && GTK_WIDGET_REALIZED (w)) { gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (e), GDK_WINDOW_XWINDOW (w->window)); } }
This should be removed too, as it may conflict with the setting above (and the call to gst_x_overlay_set_xwindow_id() should happen exactly once AFAIK). -- Kalle Vahlman, [EMAIL PROTECTED] Powered by http://movial.fi Interesting stuff at http://syslog.movial.fi _______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers