]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ui: rename cursor_{put->unref}
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 17 Jan 2023 11:07:02 +0000 (15:07 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 13 Mar 2023 18:57:39 +0000 (22:57 +0400)
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>
hw/display/qxl-render.c
hw/display/qxl.c
hw/display/vmware_vga.c
include/ui/console.h
ui/cursor.c
ui/dbus-listener.c
ui/spice-display.c
ui/vnc.c

index fcfd40c3ac1d622b6d27279e25be252c45ea0873..ec99ec887a6e68b5a83515f03cf58abb2a447ccd 100644 (file)
@@ -290,7 +290,7 @@ static QEMUCursor *qxl_cursor(PCIQXLDevice *qxl, QXLCursor *cursor,
     return c;
 
 fail:
-    cursor_put(c);
+    cursor_unref(c);
     return NULL;
 }
 
@@ -336,7 +336,7 @@ int qxl_render_cursor(PCIQXLDevice *qxl, QXLCommandExt *ext)
         }
         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;
index ec712d3ca2d948c4dab3a60a31368f40531ae7f1..80ce1e9a93ee10526a36248bf65ae7d2bf98bb0e 100644 (file)
@@ -299,7 +299,7 @@ void qxl_spice_reset_cursor(PCIQXLDevice *qxl)
     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();
 }
index 59ae7f74b8d806c2241de1d2c89a72a650c320a5..09591fbd39f9f1d5e0a1f61a2ab9a09936b13a91 100644 (file)
@@ -550,12 +550,12 @@ static inline void vmsvga_cursor_define(struct vmsvga_state_s *s,
     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
 
index 1cb53acc33088db07452ca6bb31306cc94e5fc00..3efd1f6b820d9e5928c70219e3bc004ae340f1a2 100644 (file)
@@ -152,7 +152,7 @@ typedef struct QEMUCursor {
 
 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);
index 835f0802f951a3ec965b95d7742eda1704c8fccd..31b09bf05836ac4764761898b3d70da59ac2ed7b 100644 (file)
@@ -111,7 +111,7 @@ void cursor_get(QEMUCursor *c)
     c->refcount++;
 }
 
-void cursor_put(QEMUCursor *c)
+void cursor_unref(QEMUCursor *c)
 {
     if (c == NULL)
         return;
index 2dafd6569c8bf7947ed843aa80dcaa7baa03f4e4..906ab296ca412281f14868b87805aac05922730c 100644 (file)
@@ -345,7 +345,7 @@ static void dbus_cursor_define(DisplayChangeListener *dcl,
         c->data,
         c->width * c->height * 4,
         TRUE,
-        (GDestroyNotify)cursor_put,
+        (GDestroyNotify)cursor_unref,
         c);
 
     qemu_dbus_display1_listener_call_cursor_define(
index 16802f99cbcb13dfda0f392f8a28b4db0675e85f..243a794638ee84e9f825a9ee0e55ce7e09ca34c9 100644 (file)
@@ -464,7 +464,7 @@ void qemu_spice_cursor_refresh_bh(void *opaque)
         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) {
@@ -766,7 +766,7 @@ static void display_mouse_define(DisplayChangeListener *dcl,
 
     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;
index d9eacad75938a61bebfebd4bed5f06e3c9d4b800..0bdcc3dfceed06b170f0ef704bc989c8b063ba21 100644 (file)
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1029,7 +1029,7 @@ static void vnc_dpy_cursor_define(DisplayChangeListener *dcl,
     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;