[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/18] ui/dbus: initialize cursor_fb
From: |
marcandre . lureau |
Subject: |
[PULL 01/18] ui/dbus: initialize cursor_fb |
Date: |
Mon, 13 Mar 2023 15:01:09 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Or else, we may randomly destroy some textures..
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/ui/egl-helpers.h | 2 ++
ui/dbus-listener.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h
index 2fb6e0dd6b..c92dd90e33 100644
--- a/include/ui/egl-helpers.h
+++ b/include/ui/egl-helpers.h
@@ -22,6 +22,8 @@ typedef struct egl_fb {
QemuDmaBuf *dmabuf;
} egl_fb;
+#define EGL_FB_INIT { 0, }
+
void egl_fb_destroy(egl_fb *fb);
void egl_fb_setup_default(egl_fb *fb, int width, int height);
void egl_fb_setup_for_tex(egl_fb *fb, int width, int height,
diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c
index 57d4e401db..2dafd6569c 100644
--- a/ui/dbus-listener.c
+++ b/ui/dbus-listener.c
@@ -149,7 +149,7 @@ static void dbus_cursor_dmabuf(DisplayChangeListener *dcl,
DBusDisplayListener *ddl = container_of(dcl, DBusDisplayListener, dcl);
DisplaySurface *ds;
GVariant *v_data = NULL;
- egl_fb cursor_fb;
+ egl_fb cursor_fb = EGL_FB_INIT;
if (!dmabuf) {
qemu_dbus_display1_listener_call_mouse_set(
--
2.39.2
- [PULL 00/18] UI patches, marcandre . lureau, 2023/03/13
- [PULL 01/18] ui/dbus: initialize cursor_fb,
marcandre . lureau <=
- [PULL 02/18] ui/dbus: unregister clipboard on connection close, marcandre . lureau, 2023/03/13
- [PULL 03/18] audio/dbus: there are no sender for p2p mode, marcandre . lureau, 2023/03/13
- [PULL 04/18] ui/dbus: set mouse is-absolute during console creation, marcandre . lureau, 2023/03/13
- [PULL 05/18] meson: ensure dbus-display generated code is built before other units, marcandre . lureau, 2023/03/13
- [PULL 06/18] ui: rename cursor_{put->unref}, marcandre . lureau, 2023/03/13
- [PULL 07/18] ui: rename cursor_{get->ref}, return it, marcandre . lureau, 2023/03/13
- [PULL 08/18] ui: keep current cursor with QemuConsole, marcandre . lureau, 2023/03/13
- [PULL 09/18] ui: set cursor upon listener registration, marcandre . lureau, 2023/03/13
- [PULL 10/18] ui: set cursor position upon listener registration, marcandre . lureau, 2023/03/13
- [PULL 11/18] ui/sdl: get the GL context from the window, marcandre . lureau, 2023/03/13