cpw.qulogic.gtk3: 381bba1c: Render the DND hint windows using the ne...
qulogic at pidgin.im
qulogic at pidgin.im
Sun Oct 9 04:32:07 EDT 2011
----------------------------------------------------------------------
Revision: 381bba1ca420d0754498ed2bbbe2a11783f61f14
Parent: f89e66a5722e074cb8a2fc6a66e0246c42f90755
Author: qulogic at pidgin.im
Date: 10/09/11 01:37:17
Branch: im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/381bba1ca420d0754498ed2bbbe2a11783f61f14
Changelog:
Render the DND hint windows using the new window's colourmap instead
of trying to force a colourmap on the window.
Changes against parent f89e66a5722e074cb8a2fc6a66e0246c42f90755
patched pidgin/gtkdnd-hints.c
-------------- next part --------------
============================================================
--- pidgin/gtkdnd-hints.c 8e45c61fe0d1753f5bb88ef80806da0e716c85d0
+++ pidgin/gtkdnd-hints.c 1f93eb44772b2bf4c500975a976813f8b0f63792
@@ -62,19 +62,20 @@ dnd_hints_init_window(const gchar *fname
GdkBitmap *bitmap;
GtkWidget *pix;
GtkWidget *win;
+ GdkColormap *colormap;
pixbuf = gdk_pixbuf_new_from_file(fname, NULL);
g_return_val_if_fail(pixbuf, NULL);
- gdk_pixbuf_render_pixmap_and_mask(pixbuf, &pixmap, &bitmap, 128);
+ win = gtk_window_new(GTK_WINDOW_POPUP);
+ colormap = gtk_widget_get_colormap(win);
+ gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, colormap,
+ &pixmap, &bitmap, 128);
g_object_unref(G_OBJECT(pixbuf));
- gtk_widget_push_colormap(gdk_rgb_get_colormap());
- win = gtk_window_new(GTK_WINDOW_POPUP);
pix = gtk_image_new_from_pixmap(pixmap, bitmap);
gtk_container_add(GTK_CONTAINER(win), pix);
gtk_widget_shape_combine_mask(win, bitmap, 0, 0);
- gtk_widget_pop_colormap();
g_object_unref(G_OBJECT(pixmap));
g_object_unref(G_OBJECT(bitmap));
More information about the Commits
mailing list