From dee29000a676bb5a4de5f1d04ecd414bbcb7dda3 Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Thu, 18 Dec 2003 20:17:58 +0000 Subject: [PATCH] Properly save and clear the pointer to the internal mode key state data when the keyboard is initialized, enabled, and disabled. (Takuma Murakami) --- hw/xwin/winkeybd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c index 2ffce8348..a1bd8e592 100644 --- a/hw/xwin/winkeybd.c +++ b/hw/xwin/winkeybd.c @@ -339,7 +339,7 @@ winKeybdBell (int iPercent, DeviceIntPtr pDeviceInt, void winKeybdCtrl (DeviceIntPtr pDevice, KeybdCtrl *pCtrl) { - + g_winInternalModeKeyStatesPtr = &(pDevice->key->state); } @@ -445,11 +445,13 @@ winKeybdProc (DeviceIntPtr pDeviceInt, int iState) case DEVICE_ON: pDevice->on = TRUE; + g_winInternalModeKeyStatesPtr = &(pDeviceInt->key->state); break; case DEVICE_CLOSE: case DEVICE_OFF: pDevice->on = FALSE; + g_winInternalModeKeyStatesPtr = NULL; break; }