summaryrefslogtreecommitdiff
path: root/hw/kdrive/ephyr
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-03-28 19:26:42 +0200
committerDaniel Stone <daniel@fooishbar.org>2009-01-22 14:23:24 +1100
commitf9da417163b6b2d6234d2542c1f375e33db7159a (patch)
tree8407bd65cb146abba20d418d2a8e94e71d7c4cba /hw/kdrive/ephyr
parent5c281446d2a8c38511d45baee6f0d25a640f12e1 (diff)
Xephyr: Disable state inheritance hack
Prepare for the impending removal of the state field by disabling this hack for a while: it's hell of nasty and I'm amazed it ever really worked. Basically, on focus out, it should do as current DDXes do and fake releases for all keys (not just mangle the core state) that are currently down; buttons too. When focus comes back in, we already have a KeymapNotify that lets us know what's currently down, so we can use this to fake the appropriate keypresses, and send it through the event routing layer. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'hw/kdrive/ephyr')
-rw-r--r--hw/kdrive/ephyr/ephyr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index ab8459cfc..740f66148 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -753,6 +753,18 @@ ephyrUpdateModifierState(unsigned int state)
if (!pkeydev)
return;
+/* This is pretty broken.
+ *
+ * What should happen is that focus out should do as a VT switch does in
+ * traditional servers: fake releases for all keys (and buttons too, come
+ * to think of it) currently down. Then, on focus in, get the state from
+ * the host, and fake keypresses for everything currently down.
+ *
+ * So I'm leaving this broken for a little while. Sorry, folks.
+ *
+ * -daniels
+ */
+#if 0
keyc = pkeydev->key;
state = state & 0xff;
@@ -798,6 +810,7 @@ ephyrUpdateModifierState(unsigned int state)
break;
}
}
+#endif
}
static void