Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

Recreates and draws cursor on desktop related to SPEventContext.

Definition at line 181 of file event-context.cpp.

References SPEventContext::hot_y.

Referenced by sp_event_context_private_setup().

                                                        {
    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);
            }
        }
        gdk_window_set_cursor(w->window, ec->cursor);
        gdk_flush();
    }
    ec->desktop->waiting_cursor = false;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index