[PATCH 07/15] Update reds_update_mouse_mode() to take RedsState arg

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

 



From: Jonathon Jongsma <jjongsma@xxxxxxxxxx>

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

diff --git a/server/reds.c b/server/reds.c
index afb20e8..9089dda 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -614,7 +614,7 @@ int reds_get_agent_mouse(void)
     return agent_mouse;
 }
 
-static void reds_update_mouse_mode(void)
+static void reds_update_mouse_mode(RedsState *reds)
 {
     int allowed = 0;
     int qxl_count = red_dispatcher_qxl_count();
@@ -643,7 +643,7 @@ static void reds_agent_remove(void)
     reds_reset_vdp();
 
     vdagent = NULL;
-    reds_update_mouse_mode();
+    reds_update_mouse_mode(reds);
     if (reds_main_channel_connected() &&
         !red_channel_is_waiting_for_migrate_data(&reds->main_channel->base)) {
         main_channel_push_agent_disconnected(reds->main_channel);
@@ -1739,7 +1739,7 @@ void reds_set_client_mouse_allowed(int is_client_mouse_allowed, int x_res, int y
     reds->monitor_mode.x_res = x_res;
     reds->monitor_mode.y_res = y_res;
     reds->dispatcher_allows_client_mouse = is_client_mouse_allowed;
-    reds_update_mouse_mode();
+    reds_update_mouse_mode(reds);
     if (reds->is_client_mouse_allowed && inputs_has_tablet()) {
         inputs_set_tablet_logical_size(reds->monitor_mode.x_res, reds->monitor_mode.y_res);
     }
@@ -2993,7 +2993,7 @@ static SpiceCharDeviceState *attach_to_red_agent(SpiceCharDeviceInstance *sin)
     }
 
     vdagent = sin;
-    reds_update_mouse_mode();
+    reds_update_mouse_mode(reds);
 
     sif = SPICE_CONTAINEROF(vdagent->base.sif, SpiceCharDeviceInterface, base);
     if (sif->state) {
@@ -3239,7 +3239,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *s,
         if (inputs_set_tablet(SPICE_CONTAINEROF(sin, SpiceTabletInstance, base)) != 0) {
             return -1;
         }
-        reds_update_mouse_mode();
+        reds_update_mouse_mode(reds);
         if (reds->is_client_mouse_allowed) {
             inputs_set_tablet_logical_size(reds->monitor_mode.x_res, reds->monitor_mode.y_res);
         }
@@ -3296,7 +3296,7 @@ SPICE_GNUC_VISIBLE int spice_server_remove_interface(SpiceBaseInstance *sin)
     if (strcmp(interface->type, SPICE_INTERFACE_TABLET) == 0) {
         spice_info("remove SPICE_INTERFACE_TABLET");
         inputs_detach_tablet(SPICE_CONTAINEROF(sin, SpiceTabletInstance, base));
-        reds_update_mouse_mode();
+        reds_update_mouse_mode(reds);
     } else if (strcmp(interface->type, SPICE_INTERFACE_PLAYBACK) == 0) {
         spice_info("remove SPICE_INTERFACE_PLAYBACK");
         snd_detach_playback(SPICE_CONTAINEROF(sin, SpicePlaybackInstance, base));
@@ -3808,7 +3808,7 @@ SPICE_GNUC_VISIBLE int spice_server_set_agent_mouse(SpiceServer *s, int enable)
 {
     spice_assert(reds == s);
     agent_mouse = enable;
-    reds_update_mouse_mode();
+    reds_update_mouse_mode(reds);
     return 0;
 }
 
-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]