Pregunta

I have recently been learning how to program with the Clutter GUI toolkit. One thing I haven't been able to figure out is how to set the programs title and icon for the window manager.

As illustrated in the image below, Gnome Shell says that the program name is "Unknown" and that the program does not have an icon.

enter image description here

So, how do I do this?

¿Fue útil?

Solución

you cannot do this from Clutter: the windowing system API inside Clutter only allows basic operations.

if you want proper integration in a windowing system you should use Clutter-GTK, and embed a ClutterStage into a Gtk application.

Otros consejos

In theory, you can do that in this way:

let stage = Clutter.Stage.get_default ();
let gdkWind = ClutterGdk.get_stage_window (stage);
// The list most containt icons in different sizes.
let list = [GdkPixbuf.Pixbuf.new_from_file("test.png")];
gdkWind.set_icon_list(list);
//The next line not work 
gdkWind.set_title("This title is not added");

In practice, you only will can load the icon and the windows title, but not the task bar title for the windows. The set_title won't work as Gdk.Window reference say it will (https://people.gnome.org/~gcampagna/docs/Gdk-3.0/Gdk.Window.set_title.html). Is then a Clutter issue, because is not a GDK "special case". But well is not working.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top