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.
This commit is contained in:
Keith Packard 2003-11-13 09:14:29 +00:00
parent e9904cefa3
commit 318d525bf2
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;