[Spice-devel] [PATCH 15/15] Change reds_set_client_mouse_allowed() to take RedsState arg

Frediano Ziglio fziglio at redhat.com
Tue Jan 19 06:29:48 PST 2016


From: Jonathon Jongsma <jjongsma at redhat.com>

---
 server/red-dispatcher.c | 2 +-
 server/reds.c           | 2 +-
 server/reds.h           | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/server/red-dispatcher.c b/server/red-dispatcher.c
index dc958d9..b4bbe85 100644
--- a/server/red-dispatcher.c
+++ b/server/red-dispatcher.c
@@ -226,7 +226,7 @@ static void update_client_mouse_allowed(void)
 
     if (allow_now || allow_now != allowed) {
         allowed = allow_now;
-        reds_set_client_mouse_allowed(allowed, x_res, y_res);
+        reds_set_client_mouse_allowed(reds, allowed, x_res, y_res);
     }
 }
 
diff --git a/server/reds.c b/server/reds.c
index ad59cfc..0e31b59 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1740,7 +1740,7 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
      ((state & SPICE_MOUSE_BUTTON_MASK_MIDDLE) ? VD_AGENT_MBUTTON_MASK : 0) |    \
      ((state & SPICE_MOUSE_BUTTON_MASK_RIGHT) ? VD_AGENT_RBUTTON_MASK : 0))
 
-void reds_set_client_mouse_allowed(int is_client_mouse_allowed, int x_res, int y_res)
+void reds_set_client_mouse_allowed(RedsState *reds, int is_client_mouse_allowed, int x_res, int y_res)
 {
     reds->monitor_mode.x_res = x_res;
     reds->monitor_mode.y_res = y_res;
diff --git a/server/reds.h b/server/reds.h
index 75dc720..b38a7c0 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -53,7 +53,8 @@ void reds_handle_channel_event(int event, SpiceChannelEventInfo *info);
 void reds_disable_mm_time(void);
 void reds_enable_mm_time(void);
 uint32_t reds_get_mm_time(void);
-void reds_set_client_mouse_allowed(int is_client_mouse_allowed,
+void reds_set_client_mouse_allowed(RedsState *reds,
+                                   int is_client_mouse_allowed,
                                    int x_res, int y_res);
 void reds_register_channel(RedsState *reds, RedChannel *channel);
 void reds_unregister_channel(RedsState *reds, RedChannel *channel);
-- 
2.4.3



More information about the Spice-devel mailing list