From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPtVo-0003FM-KH for qemu-devel@nongnu.org; Wed, 10 Apr 2013 07:48:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPtVn-000575-7L for qemu-devel@nongnu.org; Wed, 10 Apr 2013 07:48:24 -0400 Received: from david.siemens.de ([192.35.17.14]:21005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPtVm-00056j-U5 for qemu-devel@nongnu.org; Wed, 10 Apr 2013 07:48:23 -0400 Message-ID: <51655184.9050607@siemens.com> Date: Wed, 10 Apr 2013 13:48:20 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1364653300-26813-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1364653300-26813-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ui/gtk: Set QEMU window icon List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Anthony Liguori , qemu-devel@nongnu.org On 2013-03-30 15:21, Stefan Weil wrote: > The QEMU icon which is already used for SDL > is now also loaded by GTK. > > Signed-off-by: Stefan Weil > --- > ui/gtk.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/ui/gtk.c b/ui/gtk.c > index a5a8156..c15023b 100644 > --- a/ui/gtk.c > +++ b/ui/gtk.c > @@ -1363,6 +1363,7 @@ static const DisplayChangeListenerOps dcl_ops = { > void gtk_display_init(DisplayState *ds) > { > GtkDisplayState *s = g_malloc0(sizeof(*s)); > + char *filename; > > gtk_init(NULL, NULL); > > @@ -1394,6 +1395,18 @@ void gtk_display_init(DisplayState *ds) > > gtk_notebook_append_page(GTK_NOTEBOOK(s->notebook), s->drawing_area, gtk_label_new("VGA")); > > + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, "qemu-icon.bmp"); > + if (filename) { > + GError *error = NULL; > + GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(filename, &error); > + if (pixbuf) { > + gtk_window_set_icon(GTK_WINDOW(s->window), pixbuf); > + } else { > + g_error_free(error); > + } > + g_free(filename); > + } > + > gd_create_menus(s); > > gd_connect_signals(s); > With gtk 2.22 I'm lacking transparency of that icon (it has a white background). The icon is fine with SDL. Is that an issue of this particular gtk version or actually a general problem with gdk_pixbuf_new_from_file? Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux