]> xenbits.xensource.com Git - xenclient/ioemu-pq.git/commitdiff
Revert "[dom0-driver] code cleaning and documentation"
authorJean Guyader <jean.guyader@eu.citrix.com>
Mon, 27 Jul 2009 11:21:50 +0000 (12:21 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Mon, 27 Jul 2009 11:21:50 +0000 (12:21 +0100)
This reverts commit a7b5d2830bda6c201c9b2f6aec768fd22d343d49.

master/dom0-driver

index a222e5d2be869938535770416587773077f8d5c9..7bcd95b25a8d10c46acf7b0f41a4943820301386 100644 (file)
@@ -748,10 +748,10 @@ index 0000000..bdfe37c
 +}
 diff --git a/hid-linux.c b/hid-linux.c
 new file mode 100644
-index 0000000..73bb956
+index 0000000..51f70c2
 --- /dev/null
 +++ b/hid-linux.c
-@@ -0,0 +1,555 @@
+@@ -0,0 +1,538 @@
 +/*
 + * QEMU hid-linux /dev/input driver
 + *
@@ -982,24 +982,6 @@ index 0000000..73bb956
 +      kbd_put_keycode(keycode & 0x7f);
 +}
 +
-+/* This function has been introduced to allow some exceptionnal
-+ * pass through. For exemple when you're using ICA and you have
-+ * the mouse, but not the keyboard (the appserver has the keyboard),
-+ * you want to be able to do Alt+Tab inside the PVM even if you
-+ * don't have the keyboard. */
-+static bool hid_linux_check_modifiers_pt(void)
-+{
-+    /* We don't passthrough if we don't have the mouse */
-+    if (!hid_linux_driver.has_mouse)
-+        return false;
-+
-+    /* If Alt is pressed or just released, pass through */
-+    if (hid_linux_driver.key_status[KEY_LEFTALT] ||
-+        keycode == KEY_LEFTALT)
-+        return true;
-+    return false;
-+}
-+
 +static void hid_linux_key_event(int code, uint32_t keycode)
 +{
 +    if (code == 1)
@@ -1007,7 +989,8 @@ index 0000000..73bb956
 +          return;
 +
 +    if (hid_linux_driver.has_keyboard || // We have the keyboard
-+        hid_linux_check_modifiers_pt())
++        (hid_linux_driver.has_mouse &&   // We have the mouse and track Alt...
++         (hid_linux_driver.key_status[KEY_LEFTALT] || keycode == KEY_LEFTALT)))
 +        hid_linux_key_inject(code, keycode);
 +}
 +