diff options
| author | Josh Andler <scislac@gmail.com> | 2006-10-19 19:03:27 +0000 |
|---|---|---|
| committer | scislac <scislac@users.sourceforge.net> | 2006-10-19 19:03:27 +0000 |
| commit | 9e69eef83f511df18ca726085047e7cc4c41df31 (patch) | |
| tree | d092280e1ef9b3d3599a343852da0617e70faf4a /src/event-context.cpp | |
| parent | Turning on (diff) | |
| download | inkscape-9e69eef83f511df18ca726085047e7cc4c41df31.tar.gz inkscape-9e69eef83f511df18ca726085047e7cc4c41df31.zip | |
remove color cursors
(bzr r1811)
Diffstat (limited to 'src/event-context.cpp')
| -rw-r--r-- | src/event-context.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/event-context.cpp b/src/event-context.cpp index 7d80e1490..42557abdc 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -172,17 +172,22 @@ sp_event_context_update_cursor(SPEventContext *ec) { GtkWidget *w = GTK_WIDGET(sp_desktop_canvas(ec->desktop)); if (w->window) { - GdkDisplay *display=gdk_display_get_default(); - - if (ec->cursor) - gdk_cursor_unref(ec->cursor); - - ec->cursor=sp_cursor_new( - display, - ec->cursor_pixbuf, - ec->cursor_shape, - ec->hot_x, - ec->hot_y); + /* fixme: */ + if (ec->cursor_shape) { + 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); } } |
