[gnome-hwtest-simulator] Fix need to grab the mouse



commit 46119c4946ec55a5b76c90c02db70d97d9bfc2d8
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Thu Jun 26 16:15:34 2014 -0400

    Fix need to grab the mouse
    
    Start the qemu virtual machines with -usbdevice tablet which, by providing
    absolute pointing, means that spice can run in the "client" mouse mode and
    not grab the pointer - this is much more pleasant.

 src/machine.js |    1 +
 src/spice.js   |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/machine.js b/src/machine.js
index d4a1a99..78fc867 100644
--- a/src/machine.js
+++ b/src/machine.js
@@ -45,6 +45,7 @@ const Machine = new Lang.Class({
             '-chardev', 'stdio,id=mntr',
             '-mon', 'chardev=mntr,mode=control',
             '-vga', 'qxl',
+            '-usbdevice', 'tablet', // Having an absolute device removes the need for mouse grabbing
         ];
 
         if (this.privateHWAddr)
diff --git a/src/spice.js b/src/spice.js
index 2bbca19..351d11a 100644
--- a/src/spice.js
+++ b/src/spice.js
@@ -352,8 +352,8 @@ const MachineWidget = new Lang.Class({
         if (channel instanceof SpiceClientGLib.DisplayChannel) {
             this.display = SpiceClientGtk.Display.new(session, channel.channel_id);
             this.display.resize_guest = true;
-//            this.display.grab_keyboard = false;
-//            this.display.grab_mouse = false;
+            this.display.grab_keyboard = false;
+            this.display.grab_mouse = false;
 
             this.display.show();
             this.straightjacket.remove(this.placeholder);


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