[Spice-commits] server/inputs-channel.c server/inputs-channel.h server/reds.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Nov 27 10:12:52 UTC 2017


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

New commits:
commit 9575713dfbd5e775f2be1f59f5b1d31cb6f8ce36
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Thu Nov 23 14:28:38 2017 +0000

    inputs-channel: Remove reds argument from inputs_channel_set_tablet
    
    All other inputs_channel_set_* functions do not have this
    parameter and get it from the channel.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Uri Lublin <uril at redhat.com>

diff --git a/server/inputs-channel.c b/server/inputs-channel.c
index b4292f0e..ac598424 100644
--- a/server/inputs-channel.c
+++ b/server/inputs-channel.c
@@ -633,7 +633,7 @@ static SpiceTabletInstance* inputs_channel_get_tablet(InputsChannel *inputs)
     return inputs->tablet;
 }
 
-int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet, RedsState *reds)
+int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet)
 {
     if (inputs->tablet) {
         spice_printerr("already have tablet");
@@ -641,7 +641,7 @@ int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet
     }
     inputs->tablet = tablet;
     inputs->tablet->st = spice_tablet_state_new();
-    inputs->tablet->st->reds = reds;
+    inputs->tablet->st->reds = red_channel_get_server(RED_CHANNEL(inputs));
     return 0;
 }
 
diff --git a/server/inputs-channel.h b/server/inputs-channel.h
index 27d81a87..1082d66c 100644
--- a/server/inputs-channel.h
+++ b/server/inputs-channel.h
@@ -52,7 +52,7 @@ void inputs_channel_set_tablet_logical_size(InputsChannel *inputs, int x_res, in
 
 int inputs_channel_set_keyboard(InputsChannel *inputs, SpiceKbdInstance *keyboard);
 int inputs_channel_set_mouse(InputsChannel *inputs, SpiceMouseInstance *mouse);
-int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet, RedsState *reds);
+int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet);
 int inputs_channel_has_tablet(InputsChannel *inputs);
 void inputs_channel_detach_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet);
 RedsState* spice_tablet_state_get_server(SpiceTabletState *dev);
diff --git a/server/reds.c b/server/reds.c
index 26789959..64b3a967 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3331,7 +3331,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *reds,
             spice_warning("unsupported tablet interface");
             return -1;
         }
-        if (inputs_channel_set_tablet(reds->inputs_channel, tablet, reds) != 0) {
+        if (inputs_channel_set_tablet(reds->inputs_channel, tablet) != 0) {
             return -1;
         }
         reds_update_mouse_mode(reds);


More information about the Spice-commits mailing list