The naming is more conventional in QEMU.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
return c;
fail:
- cursor_put(c);
+ cursor_unref(c);
return NULL;
}
}
qemu_mutex_lock(&qxl->ssd.lock);
if (qxl->ssd.cursor) {
- cursor_put(qxl->ssd.cursor);
+ cursor_unref(qxl->ssd.cursor);
}
qxl->ssd.cursor = c;
qxl->ssd.mouse_x = cmd->u.set.position.x;
qxl->guest_cursor = 0;
qemu_mutex_unlock(&qxl->track_lock);
if (qxl->ssd.cursor) {
- cursor_put(qxl->ssd.cursor);
+ cursor_unref(qxl->ssd.cursor);
}
qxl->ssd.cursor = cursor_builtin_hidden();
}
default:
fprintf(stderr, "%s: unhandled bpp %d, using fallback cursor\n",
__func__, c->bpp);
- cursor_put(qc);
+ cursor_unref(qc);
qc = cursor_builtin_left_ptr();
}
dpy_cursor_define(s->vga.con, qc);
- cursor_put(qc);
+ cursor_unref(qc);
}
#endif
QEMUCursor *cursor_alloc(int width, int height);
void cursor_get(QEMUCursor *c);
-void cursor_put(QEMUCursor *c);
+void cursor_unref(QEMUCursor *c);
QEMUCursor *cursor_builtin_hidden(void);
QEMUCursor *cursor_builtin_left_ptr(void);
void cursor_print_ascii_art(QEMUCursor *c, const char *prefix);
c->refcount++;
}
-void cursor_put(QEMUCursor *c)
+void cursor_unref(QEMUCursor *c)
{
if (c == NULL)
return;
c->data,
c->width * c->height * 4,
TRUE,
- (GDestroyNotify)cursor_put,
+ (GDestroyNotify)cursor_unref,
c);
qemu_dbus_display1_listener_call_cursor_define(
qemu_mutex_unlock(&ssd->lock);
dpy_cursor_define(ssd->dcl.con, c);
qemu_mutex_lock(&ssd->lock);
- cursor_put(c);
+ cursor_unref(c);
}
if (ssd->mouse_x != -1 && ssd->mouse_y != -1) {
qemu_mutex_lock(&ssd->lock);
cursor_get(c);
- cursor_put(ssd->cursor);
+ cursor_unref(ssd->cursor);
ssd->cursor = c;
ssd->hot_x = c->hot_x;
ssd->hot_y = c->hot_y;
VncDisplay *vd = container_of(dcl, VncDisplay, dcl);
VncState *vs;
- cursor_put(vd->cursor);
+ cursor_unref(vd->cursor);
g_free(vd->cursor_mask);
vd->cursor = c;