[gnome-remote-desktop] rdp-pipewire-stream: Hide mouse pointer correctly
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] rdp-pipewire-stream: Hide mouse pointer correctly
- Date: Fri, 5 Feb 2021 16:36:18 +0000 (UTC)
commit 16de25c687fd9eb47901c757b77198dd8d141f31
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Tue Jan 26 11:51:18 2021 +0100
rdp-pipewire-stream: Hide mouse pointer correctly
Currently, the PipeWire backend only updates the mouse pointer, when a
mouse pointer bitmap is available.
However, when the mouse pointer hides and there is no mouse pointer
bitmap, the RDP client won't receive the update.
Fix this by using the previously implemented API to hide the mouse
pointer.
src/grd-rdp-pipewire-stream.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/src/grd-rdp-pipewire-stream.c b/src/grd-rdp-pipewire-stream.c
index b99d795..f0c1b42 100644
--- a/src/grd-rdp-pipewire-stream.c
+++ b/src/grd-rdp-pipewire-stream.c
@@ -49,6 +49,7 @@ typedef struct _GrdRdpFrame
uint16_t pointer_hotspot_y;
uint16_t pointer_width;
uint16_t pointer_height;
+ gboolean pointer_is_hidden;
bool pointer_moved;
uint16_t pointer_x;
uint16_t pointer_y;
@@ -240,12 +241,18 @@ do_render (struct spa_loop *loop,
grd_session_rdp_take_buffer (stream->session_rdp, frame->data);
if (frame->pointer_bitmap)
- grd_session_rdp_update_pointer (stream->session_rdp,
- frame->pointer_hotspot_x,
- frame->pointer_hotspot_y,
- frame->pointer_width,
- frame->pointer_height,
- frame->pointer_bitmap);
+ {
+ grd_session_rdp_update_pointer (stream->session_rdp,
+ frame->pointer_hotspot_x,
+ frame->pointer_hotspot_y,
+ frame->pointer_width,
+ frame->pointer_height,
+ frame->pointer_bitmap);
+ }
+ else if (frame->pointer_is_hidden)
+ {
+ grd_session_rdp_hide_pointer (stream->session_rdp);
+ }
if (frame->pointer_moved)
grd_session_rdp_move_pointer (stream->session_rdp,
@@ -373,6 +380,10 @@ process_buffer (GrdRdpPipeWireStream *stream,
frame->pointer_width = spa_meta_bitmap->size.width;
frame->pointer_height = spa_meta_bitmap->size.height;
}
+ else if (spa_meta_bitmap)
+ {
+ frame->pointer_is_hidden = TRUE;
+ }
frame->pointer_moved = true;
frame->pointer_x = spa_meta_cursor->position.x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]