From 47d5e1f40e25394950c91af67ba9112b5e3c1979 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Dec 09 2020 15:30:00 +0000 Subject: cursor-only-frame-fixes.patch patch_name: cursor-only-frame-fixes.patch present_in_specfile: true location_in_specfile: 6 --- diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c index 9fcbb69..7950d1e 100644 --- a/src/grd-session-vnc.c +++ b/src/grd-session-vnc.c @@ -180,6 +180,12 @@ grd_session_vnc_take_buffer (GrdSessionVnc *session_vnc, } void +grd_session_vnc_flush (GrdSessionVnc *session_vnc) +{ + rfbProcessEvents (session_vnc->rfb_screen, 0); +} + +void grd_session_vnc_set_cursor (GrdSessionVnc *session_vnc, rfbCursorPtr rfb_cursor) { diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h index 294860e..a065857 100644 --- a/src/grd-session-vnc.h +++ b/src/grd-session-vnc.h @@ -49,6 +49,8 @@ void grd_session_vnc_queue_resize_framebuffer (GrdSessionVnc *session_vnc, void grd_session_vnc_take_buffer (GrdSessionVnc *session_vnc, void *data); +void grd_session_vnc_flush (GrdSessionVnc *session_vnc); + void grd_session_vnc_set_cursor (GrdSessionVnc *session_vnc, rfbCursorPtr rfb_cursor); diff --git a/src/grd-vnc-pipewire-stream.c b/src/grd-vnc-pipewire-stream.c index a3f5fb6..791b71d 100644 --- a/src/grd-vnc-pipewire-stream.c +++ b/src/grd-vnc-pipewire-stream.c @@ -299,6 +299,8 @@ do_render (struct spa_loop *loop, if (frame->data) grd_session_vnc_take_buffer (stream->session, frame->data); + else + grd_session_vnc_flush (stream->session); g_free (frame); @@ -312,7 +314,6 @@ process_buffer (GrdVncPipeWireStream *stream, size_t size; uint8_t *map; void *src_data; - int y; struct spa_meta_cursor *spa_meta_cursor; g_autofree GrdVncFrame *frame = NULL; @@ -320,8 +321,8 @@ process_buffer (GrdVncPipeWireStream *stream, if (buffer->datas[0].chunk->size == 0) { - g_warning ("Received empty buffer"); - return NULL; + map = NULL; + src_data = NULL; } else if (buffer->datas[0].type == SPA_DATA_MemFd) { @@ -367,6 +368,7 @@ process_buffer (GrdVncPipeWireStream *stream, int src_stride; int dst_stride; int height; + int y; src_stride = buffer->datas[0].chunk->stride; dst_stride = grd_session_vnc_get_framebuffer_stride (stream->session);