summaryrefslogtreecommitdiffstats
path: root/src/sp-cursor.cpp
diff options
context:
space:
mode:
authorJosh Andler <scislac@gmail.com>2006-02-07 14:31:15 +0000
committerscislac <scislac@users.sourceforge.net>2006-02-07 14:31:15 +0000
commit287ae1cc1f9f282e43a333badf79f9deaadafbeb (patch)
tree638fd7191bdcbd51ac4c2c06fba606d399231560 /src/sp-cursor.cpp
parentfix wrong labels (diff)
downloadinkscape-287ae1cc1f9f282e43a333badf79f9deaadafbeb.tar.gz
inkscape-287ae1cc1f9f282e43a333badf79f9deaadafbeb.zip
reverted changes for color cursors
(bzr r102)
Diffstat (limited to 'src/sp-cursor.cpp')
-rw-r--r--src/sp-cursor.cpp44
1 files changed, 14 insertions, 30 deletions
diff --git a/src/sp-cursor.cpp b/src/sp-cursor.cpp
index 75b0affe3..f59c63487 100644
--- a/src/sp-cursor.cpp
+++ b/src/sp-cursor.cpp
@@ -84,38 +84,22 @@ void sp_cursor_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, g
GdkCursor *sp_cursor_new_from_xpm (gchar **xpm, gint hot_x, gint hot_y)
{
-GdkDisplay *display=gdk_display_get_default();
- if (
- gdk_display_supports_cursor_alpha(display) &
- gdk_display_supports_cursor_color(display)
- )
- {
- GdkPixbuf *pixbuf=NULL;
- GdkCursor *new_cursor=NULL;
- pixbuf=gdk_pixbuf_new_from_xpm_data((const char**)xpm);
- if (pixbuf != NULL){
- new_cursor = gdk_cursor_new_from_pixbuf(display,pixbuf,hot_x,hot_y);
- }
+ GdkColor const fg = { 0, 0, 0, 0 };
+ GdkColor const bg = { 0, 65535, 65535, 65535 };
+
+ GdkBitmap *bitmap = NULL;
+ GdkBitmap *mask = NULL;
+
+ sp_cursor_bitmap_and_mask_from_xpm (&bitmap, &mask, xpm);
+ if ( bitmap != NULL && mask != NULL ) {
+ GdkCursor *new_cursor = gdk_cursor_new_from_pixmap (bitmap, mask,
+ &fg, &bg,
+ hot_x, hot_y);
+ g_object_unref (bitmap);
+ g_object_unref (mask);
return new_cursor;
}
- else
- {
- GdkColor const fg = { 0, 0, 0, 0 };
- GdkColor const bg = { 0, 65535, 65535, 65535 };
-
- GdkBitmap *bitmap = NULL;
- GdkBitmap *mask = NULL;
-
- sp_cursor_bitmap_and_mask_from_xpm (&bitmap, &mask, xpm);
- if ( bitmap != NULL && mask != NULL ) {
- GdkCursor *new_cursor = gdk_cursor_new_from_pixmap (bitmap, mask,
- &fg, &bg,
- hot_x, hot_y);
- g_object_unref (bitmap);
- g_object_unref (mask);
- return new_cursor;
- }
- }
+
return NULL;
}