qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL v2 06/18] ui: rename cursor_{put->unref}


From: marcandre . lureau
Subject: [PULL v2 06/18] ui: rename cursor_{put->unref}
Date: Tue, 14 Mar 2023 00:01:22 +0400

From: Marc-André Lureau <marcandre.lureau@redhat.com>

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>
---
 include/ui/console.h    | 2 +-
 hw/display/qxl-render.c | 4 ++--
 hw/display/qxl.c        | 2 +-
 hw/display/vmware_vga.c | 4 ++--
 ui/cursor.c             | 2 +-
 ui/dbus-listener.c      | 2 +-
 ui/spice-display.c      | 4 ++--
 ui/vnc.c                | 2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/ui/console.h b/include/ui/console.h
index 1cb53acc33..3efd1f6b82 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -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);
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
index fcfd40c3ac..ec99ec887a 100644
--- a/hw/display/qxl-render.c
+++ b/hw/display/qxl-render.c
@@ -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;
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index ec712d3ca2..80ce1e9a93 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -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();
 }
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index 59ae7f74b8..09591fbd39 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -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
 
diff --git a/ui/cursor.c b/ui/cursor.c
index 835f0802f9..31b09bf058 100644
--- a/ui/cursor.c
+++ b/ui/cursor.c
@@ -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;
diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c
index 2dafd6569c..906ab296ca 100644
--- a/ui/dbus-listener.c
+++ b/ui/dbus-listener.c
@@ -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(
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 16802f99cb..243a794638 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -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;
diff --git a/ui/vnc.c b/ui/vnc.c
index d9eacad759..0bdcc3dfce 100644
--- 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;
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]