GdkPixmap as X11 Pixmap?
- From: Ingo Brückl <ib wupperonline de>
- To: gtk-list gnome org
- Subject: GdkPixmap as X11 Pixmap?
- Date: Thu, 09 Jun 2011 20:11:43 +0200
I'm trying to get an X11 Pixmap from a GDK rendering function as follows
(my_pixbuf has been created by gdk-pixbuf-csource):
GdkPixmap *gdkIcon;
GdkBitmap *gdkIconMask;
Pixmap Icon;
Pixmap IconMask;
gtk_init(&argc, &argv);
gdk_pixbuf_render_pixmap_and_mask_for_colormap
(
gdk_pixbuf_new_from_inline(-1, my_pixbuf, FALSE, NULL),
gdk_screen_get_system_colormap(gdk_screen_get_default()),
&gdkIcon,
&gdkIconMask,
128
);
Icon = GDK_PIXMAP_XID(gdkIcon);
IconMask = GDK_PIXMAP_XID(gdkIconMask);
Icon and IconMask are used then to set icon_pixmap and icon_mask with
XSetWMHints() for a window created by XCreateWindow().
What I see on the X11 window is an icon that "somehow" looks like my_pixbuf.
It seems that there is some "distortion" or that it is partly destroyed,
maybe overwritten with other data?
Different calls of the program show different distortions of the icon.
What am I doing wrong? Isn't GDK_PIXMAP_XID(gdkIcon) a X11 Pixmap that I can
use in X11 functions?
Ingo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]