Get red and blue in place.

2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_get_image): Get
	red and blue in place.
This commit is contained in:
Matthias Clasen 2005-06-15 21:22:54 +00:00 committed by Matthias Clasen
parent 5870262ac3
commit 19b9451ce7
4 changed files with 17 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2005-06-15 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkcursor-x11.c (gdk_cursor_get_image): Get
red and blue in place.
* gtk/gtkwindow.c (gtk_window_parse_geometry): Fox doc
formatting, pointed out by Kjartan Maraas.

View File

@ -1,5 +1,8 @@
2005-06-15 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkcursor-x11.c (gdk_cursor_get_image): Get
red and blue in place.
* gtk/gtkwindow.c (gtk_window_parse_geometry): Fox doc
formatting, pointed out by Kjartan Maraas.

View File

@ -1,5 +1,8 @@
2005-06-15 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkcursor-x11.c (gdk_cursor_get_image): Get
red and blue in place.
* gtk/gtkwindow.c (gtk_window_parse_geometry): Fox doc
formatting, pointed out by Kjartan Maraas.

View File

@ -337,7 +337,7 @@ gdk_cursor_get_image (GdkCursor *cursor)
XcursorImage *image;
gint size;
gchar buf[32];
guchar *data;
guchar *data, *p, tmp;
GdkPixbuf *pixbuf;
gchar *theme;
@ -366,6 +366,13 @@ gdk_cursor_get_image (GdkCursor *cursor)
data = g_malloc (4 * image->width * image->height);
memcpy (data, image->pixels, 4 * image->width * image->height);
for (p = data; p < data + (4 * image->width * image->height); p += 4)
{
tmp = p[0];
p[0] = p[2];
p[2] = tmp;
}
pixbuf = gdk_pixbuf_new_from_data (data, GDK_COLORSPACE_RGB, TRUE,
8, image->width, image->height,
4 * image->width,