From f9da417163b6b2d6234d2542c1f375e33db7159a Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 28 Mar 2008 19:26:42 +0200 Subject: [PATCH] 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 --- hw/kdrive/ephyr/ephyr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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