summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-11-13 09:14:29 +0000
committerKeith Packard <keithp@keithp.com>2003-11-13 09:14:29 +0000
commit318d525bf2fe52b059b1568e9b31d144b297a781 (patch)
tree8a506caee315c24b3e682e18ddc9f4ca2178ea4c
parente9904cefa39e1c9d3c7bf2f335dbafb23809cdba (diff)
Have the composite extension tell the damage extension about clients which
have redirected subwindows in manual mode. Those clients are marked Critical and given a significant scheduling boost whenever they receive a damage notify event. This dramatically improves update frequency. If the kernel reported a large number of keys, readKernelMapping would walk off the end of the kdKeysym array. Fix usage of _IOWR; the 'size' argument is actually a datatype.
-rw-r--r--hw/kdrive/linux/keyboard.c12
-rw-r--r--hw/kdrive/vesa/vesa.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c
index 27757c3dd..97b0683de 100644
--- a/hw/kdrive/linux/keyboard.c
+++ b/hw/kdrive/linux/keyboard.c
@@ -118,16 +118,17 @@ readKernelMapping(void)
int i, j;
struct kbentry kbe;
int minKeyCode, maxKeyCode;
+ int row;
minKeyCode = NR_KEYS;
maxKeyCode = 0;
- k = kdKeymap;
- for (i = 0;
- i < NR_KEYS && (maxKeyCode - minKeyCode + 1) < KD_MAX_LENGTH;
- ++i)
+ row = 0;
+ for (i = 0; i < NR_KEYS && row < KD_MAX_LENGTH; ++i)
{
kbe.kb_index = i;
+ k = kdKeymap + row * KD_MAX_WIDTH;
+
for (j = 0; j < KD_MAX_WIDTH; ++j)
{
unsigned short kval;
@@ -367,8 +368,7 @@ readKernelMapping(void)
if (k[1] == k[0]) k[1] = NoSymbol;
if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol;
if (k[3] == k[0] && k[2] == k[1] && k[2] == NoSymbol) k[3] =NoSymbol;
-
- k += KD_MAX_WIDTH;
+ row++;
}
kdMinScanCode = minKeyCode;
kdMaxScanCode = maxKeyCode;
diff --git a/hw/kdrive/vesa/vesa.c b/hw/kdrive/vesa/vesa.c
index 9576bca04..74bfb857e 100644
--- a/hw/kdrive/vesa/vesa.c
+++ b/hw/kdrive/vesa/vesa.c
@@ -1428,7 +1428,7 @@ vesaEnable(ScreenPtr pScreen)
#include <sys/ioctl.h>
#define TOSH_PROC "/proc/toshiba"
#define TOSH_DEVICE "/dev/toshiba"
-#define TOSH_SMM _IOWR('t', 0x90, 24)
+#define TOSH_SMM _IOWR('t', 0x90, SMMRegisters)
typedef struct {
unsigned int eax;