diff options
| author | Josh Andler <scislac@gmail.com> | 2006-02-07 14:31:15 +0000 |
|---|---|---|
| committer | scislac <scislac@users.sourceforge.net> | 2006-02-07 14:31:15 +0000 |
| commit | 287ae1cc1f9f282e43a333badf79f9deaadafbeb (patch) | |
| tree | 638fd7191bdcbd51ac4c2c06fba606d399231560 /src/event-context.cpp | |
| parent | fix wrong labels (diff) | |
| download | inkscape-287ae1cc1f9f282e43a333badf79f9deaadafbeb.tar.gz inkscape-287ae1cc1f9f282e43a333badf79f9deaadafbeb.zip | |
reverted changes for color cursors
(bzr r102)
Diffstat (limited to 'src/event-context.cpp')
| -rw-r--r-- | src/event-context.cpp | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/src/event-context.cpp b/src/event-context.cpp index 8291d79a4..d67572e9c 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -174,35 +174,18 @@ sp_event_context_update_cursor(SPEventContext *ec) if (w->window) { /* fixme: */ if (ec->cursor_shape) { - GdkDisplay *display=gdk_display_get_default(); - if ( - gdk_display_supports_cursor_alpha(display) & - gdk_display_supports_cursor_color(display) - ) - { - GdkPixbuf *pixbuf =NULL; - pixbuf=gdk_pixbuf_new_from_xpm_data((const char**)ec->cursor_shape); - if (pixbuf !=NULL) { - ec->cursor = gdk_cursor_new_from_pixbuf(display,pixbuf, - ec->hot_x, - ec->hot_y); - } - } - else - { - GdkBitmap *bitmap = NULL; - GdkBitmap *mask = NULL; - sp_cursor_bitmap_and_mask_from_xpm(&bitmap, &mask, ec->cursor_shape); - if ((bitmap != NULL) && (mask != NULL)) { - if (ec->cursor) - gdk_cursor_unref (ec->cursor); - ec->cursor = gdk_cursor_new_from_pixmap(bitmap, mask, - &w->style->black, - &w->style->white, - ec->hot_x, ec->hot_y); - g_object_unref (bitmap); - g_object_unref (mask); - } + GdkBitmap *bitmap = NULL; + GdkBitmap *mask = NULL; + sp_cursor_bitmap_and_mask_from_xpm(&bitmap, &mask, ec->cursor_shape); + if ((bitmap != NULL) && (mask != NULL)) { + if (ec->cursor) + gdk_cursor_unref (ec->cursor); + ec->cursor = gdk_cursor_new_from_pixmap(bitmap, mask, + &w->style->black, + &w->style->white, + ec->hot_x, ec->hot_y); + g_object_unref (bitmap); + g_object_unref (mask); } } gdk_window_set_cursor(w->window, ec->cursor); |
