diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/hw/kdrive/ephyr/ephyr.c | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr/ephyr.c')
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c index d0f02a16d..947a7ff1b 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.c +++ b/xorg-server/hw/kdrive/ephyr/ephyr.c @@ -432,7 +432,7 @@ ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) RRScreenSizePtr pSize; Rotation randr; int n = 0; - + struct { int width, height; } sizes[] = { { 1600, 1200 }, @@ -454,7 +454,7 @@ ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) }; EPHYR_LOG("mark"); - + *rotations = RR_Rotate_All|RR_Reflect_All; if (!hostx_want_preexisting_window (screen) @@ -746,6 +746,7 @@ ephyrScreenFini (KdScreenInfo *screen) void ephyrUpdateModifierState(unsigned int state) { +#if 0 DeviceIntPtr pkeydev; KeyClassPtr keyc; int i; @@ -756,6 +757,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 + */ + keyc = pkeydev->key; state = state & 0xff; @@ -773,7 +786,7 @@ ephyrUpdateModifierState(unsigned int state) int count = keyc->modifierKeyCount[i]; for (key = 0; key < MAP_LENGTH; key++) - if (keyc->modifierMap[key] & mask) + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { int bit; BYTE *kptr; @@ -793,14 +806,15 @@ ephyrUpdateModifierState(unsigned int state) /* Modifier shoud be down, but isn't */ if (!(keyc->state & mask) && (state & mask)) for (key = 0; key < MAP_LENGTH; key++) - if (keyc->modifierMap[key] & mask) + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { - if (keyc->modifierMap[key] & mask && ephyrKbd && + if (keyc->xkbInfo->desc->map->modmap[key] & mask && ephyrKbd && ((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE); /* press */ break; } } +#endif } static void @@ -1071,7 +1085,7 @@ MouseInit (KdPointerInfo *pi) ((EphyrPointerPrivate *)pi->driverPrivate)->enabled = FALSE; pi->nAxes = 3; pi->nButtons = 32; - pi->name = KdSaveString("Xephyr virtual mouse"); + pi->name = strdup("Xephyr virtual mouse"); ephyrMouse = pi; return Success; } @@ -1118,14 +1132,9 @@ EphyrKeyboardInit (KdKeyboardInfo *ki) ErrorF("Couldn't load keymap from host\n"); return BadAlloc; } - ki->keySyms.minKeyCode = ephyrKeySyms.minKeyCode; - ki->keySyms.maxKeyCode = ephyrKeySyms.maxKeyCode; - ki->minScanCode = ki->keySyms.minKeyCode; - ki->maxScanCode = ki->keySyms.maxKeyCode; - ki->keySyms.mapWidth = ephyrKeySyms.mapWidth; - xfree(ki->keySyms.map); - ki->keySyms.map = ephyrKeySyms.map; - ki->name = KdSaveString("Xephyr virtual keyboard"); + ki->minScanCode = ephyrKeySyms.minKeyCode; + ki->maxScanCode = ephyrKeySyms.maxKeyCode; + ki->name = strdup("Xephyr virtual keyboard"); ephyrKbd = ki; return Success; } @@ -1147,8 +1156,6 @@ EphyrKeyboardDisable (KdKeyboardInfo *ki) static void EphyrKeyboardFini (KdKeyboardInfo *ki) { - /* not xfree: we call malloc from hostx.c. */ - free(ki->keySyms.map); ephyrKbd = NULL; return; } |