+void
+changed_favicon(GObject *obj, GParamSpec *pspec, gpointer data)
+{
+ struct Client *c = (struct Client *)data;
+ cairo_surface_t *f;
+ int w, h;
+ GdkPixbuf *pb;
+
+ f = webkit_web_view_get_favicon(WEBKIT_WEB_VIEW(c->web_view));
+ if (f != NULL)
+ {
+ w = cairo_image_surface_get_width(f);
+ h = cairo_image_surface_get_height(f);
+ pb = gdk_pixbuf_get_from_surface(f, 0, 0, w, h);
+ if (pb != NULL)
+ {
+ /* TODO: Resize icon */
+ gtk_image_set_from_pixbuf(GTK_IMAGE(c->tabicon), pb);
+ g_object_unref(pb);
+ }
+ }
+}
+