[gnome-remote-desktop] session-rdp: Remove API to move the mouse pointer



commit 865d01ef640f1430ac4ab3644a4eb25a0deb59ce
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Tue Mar 9 08:48:47 2021 +0100

    session-rdp: Remove API to move the mouse pointer
    
    It literally moved (warped) the mouse pointer on the client side,
    instead of blitting the mouse pointer bitmap onto the surface at the
    submitted location.
    
    Remove this API, as it is unlikely that gnome-remote-desktop will ever
    use it again.

 src/grd-session-rdp.c | 37 -------------------------------------
 src/grd-session-rdp.h |  4 ----
 2 files changed, 41 deletions(-)
---
diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c
index d87759c..49fc545 100644
--- a/src/grd-session-rdp.c
+++ b/src/grd-session-rdp.c
@@ -89,10 +89,6 @@ struct _GrdSessionRdp
   GHashTable *pointer_cache;
   PointerType pointer_type;
 
-  GMutex pointer_mutex;
-  uint16_t pointer_x;
-  uint16_t pointer_y;
-
   GHashTable *pressed_keys;
   GHashTable *pressed_unicode_keys;
   PauseKeyState pause_key_state;
@@ -520,33 +516,6 @@ grd_session_rdp_hide_pointer (GrdSessionRdp *session_rdp)
   rdp_update->pointer->PointerSystem (peer->context, &pointer_system);
 }
 
-void
-grd_session_rdp_move_pointer (GrdSessionRdp *session_rdp,
-                              uint16_t       x,
-                              uint16_t       y)
-{
-  freerdp_peer *peer = session_rdp->peer;
-  RdpPeerContext *rdp_peer_context = (RdpPeerContext *) peer->context;
-  rdpUpdate *rdp_update = peer->update;
-  POINTER_POSITION_UPDATE pointer_position = {0};
-
-  if (!is_rdp_peer_flag_set (rdp_peer_context, RDP_PEER_ACTIVATED))
-    return;
-
-  g_mutex_lock (&session_rdp->pointer_mutex);
-  if (session_rdp->pointer_x == x && session_rdp->pointer_y == y)
-    {
-      g_mutex_unlock (&session_rdp->pointer_mutex);
-      return;
-    }
-
-  pointer_position.xPos = session_rdp->pointer_x = x;
-  pointer_position.yPos = session_rdp->pointer_y = y;
-  g_mutex_unlock (&session_rdp->pointer_mutex);
-
-  rdp_update->pointer->PointerPosition (peer->context, &pointer_position);
-}
-
 static void
 maybe_queue_close_session_idle (GrdSessionRdp *session_rdp)
 {
@@ -1171,11 +1140,6 @@ rdp_input_mouse_event (rdpInput *rdp_input,
 
   if (flags & PTR_FLAGS_MOVE)
     {
-      g_mutex_lock (&session_rdp->pointer_mutex);
-      session_rdp->pointer_x = x;
-      session_rdp->pointer_y = y;
-      g_mutex_unlock (&session_rdp->pointer_mutex);
-
       grd_rdp_event_queue_add_input_event_pointer_motion_abs (rdp_event_queue,
                                                               x, y);
     }
@@ -1940,7 +1904,6 @@ grd_session_rdp_init (GrdSessionRdp *session_rdp)
 
   g_cond_init (&session_rdp->pending_jobs_cond);
   g_mutex_init (&session_rdp->pending_jobs_mutex);
-  g_mutex_init (&session_rdp->pointer_mutex);
 
   session_rdp->rdp_event_queue = grd_rdp_event_queue_new (session_rdp);
 }
diff --git a/src/grd-session-rdp.h b/src/grd-session-rdp.h
index 1884144..a855f50 100644
--- a/src/grd-session-rdp.h
+++ b/src/grd-session-rdp.h
@@ -54,8 +54,4 @@ void grd_session_rdp_update_pointer (GrdSessionRdp *session_rdp,
 
 void grd_session_rdp_hide_pointer (GrdSessionRdp *session_rdp);
 
-void grd_session_rdp_move_pointer (GrdSessionRdp *session_rdp,
-                                   uint16_t       x,
-                                   uint16_t       y);
-
 #endif /* GRD_SESSION_RDP_H */


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