diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-05-27 23:56:59 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-05-27 23:56:59 +0000 |
| commit | 732b61f8a63db0f01ea3e524f20e74ddcbab5c48 (patch) | |
| tree | 59ff4ec6efc38c69f62d97419fd4fbaa7d9b2a71 /src/event-context.cpp | |
| parent | Reorder measure context item painting for better legibility. (diff) | |
| download | inkscape-732b61f8a63db0f01ea3e524f20e74ddcbab5c48.tar.gz inkscape-732b61f8a63db0f01ea3e524f20e74ddcbab5c48.zip | |
Stop using deprecated GdkBitmap in custom cursors
Fixed bugs:
- https://launchpad.net/bugs/943200
(bzr r11429)
Diffstat (limited to 'src/event-context.cpp')
| -rw-r--r-- | src/event-context.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/event-context.cpp b/src/event-context.cpp index 63a77ec58..fbde681d8 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -212,21 +212,19 @@ void sp_event_context_update_cursor(SPEventContext *ec) { g_object_unref(pixbuf); } } else { - GdkBitmap *bitmap = NULL; - GdkBitmap *mask = NULL; - sp_cursor_bitmap_and_mask_from_xpm(&bitmap, &mask, ec->cursor_shape); - if ((bitmap != NULL) && (mask != NULL)) { + GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data((const gchar **)ec->cursor_shape); + + if (pixbuf) { if (ec->cursor) #if GTK_CHECK_VERSION(3,0,0) g_object_unref(ec->cursor); #else gdk_cursor_unref(ec->cursor); #endif - ec->cursor = gdk_cursor_new_from_pixmap(bitmap, mask, - &style->black, &style->white, ec->hot_x, - ec->hot_y); - g_object_unref(bitmap); - g_object_unref(mask); + ec->cursor = gdk_cursor_new_from_pixbuf(display, + pixbuf, ec->hot_x, ec->hot_y); + + g_object_unref(pixbuf); } } } |
