summaryrefslogtreecommitdiffstats
path: root/src/event-context.cpp
diff options
context:
space:
mode:
authorJosh Andler <scislac@gmail.com>2006-06-19 02:23:07 +0000
committerscislac <scislac@users.sourceforge.net>2006-06-19 02:23:07 +0000
commitbb05f0d4bf3818eec40efbf0ca30ae4bd21a65b4 (patch)
tree9b288ae8f76ae6ca2ed6ae4f4bc4fce0f7df6ab5 /src/event-context.cpp
parentadded vietnamese as translation package (diff)
downloadinkscape-bb05f0d4bf3818eec40efbf0ca30ae4bd21a65b4.tar.gz
inkscape-bb05f0d4bf3818eec40efbf0ca30ae4bd21a65b4.zip
initial color cursor implementation (reads from pixbufs, will work on reading from svg instead)
(bzr r1227)
Diffstat (limited to 'src/event-context.cpp')
-rw-r--r--src/event-context.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/event-context.cpp b/src/event-context.cpp
index 273251d59..ab79f999b 100644
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
@@ -172,22 +172,17 @@ sp_event_context_update_cursor(SPEventContext *ec)
{
GtkWidget *w = GTK_WIDGET(sp_desktop_canvas(ec->desktop));
if (w->window) {
- /* 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);
- }
- }
+ 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);
gdk_window_set_cursor(w->window, ec->cursor);
}
}