-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgnome-boxes-disable-spice-usb.patch
93 lines (79 loc) · 2.38 KB
/
gnome-boxes-disable-spice-usb.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
--- gnome-boxes-5/src/spice-display.vala~ 2017-07-20 19:01:57.817177298 +0100
+++ gnome-boxes-5/src/spice-display.vala 2017-07-20 19:24:55.686539194 +0100
@@ -1,7 +1,7 @@
// This file is part of GNOME Boxes. License: LGPLv2+
using Gtk;
using Spice;
-using LibUSB;
+//using LibUSB;
private class Boxes.SpiceDisplay: Boxes.Display {
public override string protocol { get { return "SPICE"; } }
@@ -54,6 +54,7 @@
gtk_session = GtkSession.get (session);
Spice.set_session_option (session);
+#if 0
try {
var manager = UsbDeviceManager.get (session);
@@ -65,6 +66,7 @@
});
} catch (GLib.Error error) {
}
+#endif
}
private Spice.MainChannel? _main_channel;
@@ -173,14 +175,16 @@
}
public override bool should_keep_alive () {
+#if 0
try {
var manager = UsbDeviceManager.get (session);
var devs = get_usb_devices (manager);
return (!closed && (devs.length > 0));
} catch (GLib.Error error) {
+#endif
return false;
- }
+// }
}
public override void set_enable_audio (bool enable) {
@@ -207,6 +211,7 @@
builder.append_printf ("Agent: %s\n", main_channel.agent_connected ? "connected" : "disconnected");
}
+#if 0
try {
var manager = UsbDeviceManager.get (session);
var devs = manager.get_devices ();
@@ -217,6 +222,7 @@
}
} catch (GLib.Error error) {
}
+#endif
}
public override void connect_it (owned Display.OpenFDFunc? open_fd = null) {
@@ -338,6 +344,7 @@
if (!connected)
break;
+#if 0
try {
var manager = UsbDeviceManager.get (session);
var devs = get_usb_devices (manager);
@@ -407,6 +414,7 @@
});
} catch (GLib.Error error) {
}
+#endif
break;
}
@@ -420,6 +428,7 @@
display.send_keys (keyvals, DisplayKeyEvent.CLICK);
}
+#if 0
private GLib.GenericArray<UsbDevice> get_usb_devices (UsbDeviceManager manager) {
GLib.GenericArray<UsbDevice> ret = new GLib.GenericArray<UsbDevice> ();
var devs = manager.get_devices ();
@@ -492,6 +501,7 @@
return ret;
}
+#endif
}
private class Boxes.SpiceChannelHandler : GLib.Object {