forked from AuroraMiddleware/gtk
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:
parent
5870262ac3
commit
19b9451ce7
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user