diff options
Diffstat (limited to 'src/event-context.cpp')
| -rw-r--r-- | src/event-context.cpp | 27 |
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); } } |
