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

Frediano Ziglio fziglio at redhat.com
Thu Jan 14 06:33:17 PST 2016


From: Jonathon Jongsma <jjongsma at redhat.com>

---
 server/reds.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index 85ec97b..afb20e8 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -599,7 +599,7 @@ int reds_get_mouse_mode(RedsState *reds)
     return reds->mouse_mode;
 }
 
-static void reds_set_mouse_mode(uint32_t mode)
+static void reds_set_mouse_mode(RedsState *reds, uint32_t mode)
 {
     if (reds->mouse_mode == mode) {
         return;
@@ -627,7 +627,7 @@ static void reds_update_mouse_mode(void)
     }
     reds->is_client_mouse_allowed = allowed;
     if (reds->mouse_mode == SPICE_MOUSE_MODE_CLIENT && !allowed) {
-        reds_set_mouse_mode(SPICE_MOUSE_MODE_SERVER);
+        reds_set_mouse_mode(reds, SPICE_MOUSE_MODE_SERVER);
         return;
     }
     if (reds->main_channel) {
@@ -1116,13 +1116,13 @@ void reds_on_main_mouse_mode_request(void *message, size_t size)
     switch (((SpiceMsgcMainMouseModeRequest *)message)->mode) {
     case SPICE_MOUSE_MODE_CLIENT:
         if (reds->is_client_mouse_allowed) {
-            reds_set_mouse_mode(SPICE_MOUSE_MODE_CLIENT);
+            reds_set_mouse_mode(reds, SPICE_MOUSE_MODE_CLIENT);
         } else {
             spice_info("client mouse is disabled");
         }
         break;
     case SPICE_MOUSE_MODE_SERVER:
-        reds_set_mouse_mode(SPICE_MOUSE_MODE_SERVER);
+        reds_set_mouse_mode(reds, SPICE_MOUSE_MODE_SERVER);
         break;
     default:
         spice_warning("unsupported mouse mode");
-- 
2.4.3



More information about the Spice-devel mailing list