aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/ephyr/ephyr.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
committermarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
commita915739887477b28d924ecc8417ee107d125bd6c (patch)
treec02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/hw/kdrive/ephyr/ephyr.c
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr/ephyr.c')
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyr.c41
1 files changed, 24 insertions, 17 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c
index ab8459cfc..296284a01 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyr.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyr.c
@@ -429,9 +429,7 @@ ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
RRScreenSizePtr pSize;
Rotation randr;
int n = 0;
-
- EPHYR_LOG("mark");
-
+
struct { int width, height; } sizes[] =
{
{ 1600, 1200 },
@@ -452,6 +450,8 @@ ephyrRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
{ 0, 0 }
};
+ EPHYR_LOG("mark");
+
*rotations = RR_Rotate_All|RR_Reflect_All;
if (!hostx_want_preexisting_window (screen)
@@ -743,6 +743,7 @@ ephyrScreenFini (KdScreenInfo *screen)
void
ephyrUpdateModifierState(unsigned int state)
{
+#if 0
DeviceIntPtr pkeydev;
KeyClassPtr keyc;
int i;
@@ -753,6 +754,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;
@@ -770,7 +783,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;
@@ -790,14 +803,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
@@ -1060,7 +1074,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;
}
@@ -1107,14 +1121,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;
}
@@ -1136,8 +1145,6 @@ EphyrKeyboardDisable (KdKeyboardInfo *ki)
static void
EphyrKeyboardFini (KdKeyboardInfo *ki)
{
- /* not xfree: we call malloc from hostx.c. */
- free(ki->keySyms.map);
ephyrKbd = NULL;
return;
}