diff options
author | marha <marha@users.sourceforge.net> | 2009-09-24 10:49:08 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-24 10:49:08 +0000 |
commit | 67b353c9ce039b254ba2e92cd6f842c505a8bd21 (patch) | |
tree | edb5f3ff6a9564a50f3b701913ab2b3aafa80a95 /xorg-server/dix | |
parent | f3d88db0960f1c23e55f2529764b096ac92d78d9 (diff) | |
download | vcxsrv-67b353c9ce039b254ba2e92cd6f842c505a8bd21.tar.gz vcxsrv-67b353c9ce039b254ba2e92cd6f842c505a8bd21.tar.bz2 vcxsrv-67b353c9ce039b254ba2e92cd6f842c505a8bd21.zip |
Update following packages:
- xproto-7.0.16
- libXdmcp-1.0.3
- bdftopcf-1.0.2
- xorg-server-1.6.99.902
Diffstat (limited to 'xorg-server/dix')
-rw-r--r-- | xorg-server/dix/devices.c | 15 | ||||
-rw-r--r-- | xorg-server/dix/dixfonts.c | 27 | ||||
-rw-r--r-- | xorg-server/dix/eventconvert.c | 10 | ||||
-rw-r--r-- | xorg-server/dix/events.c | 10 | ||||
-rw-r--r-- | xorg-server/dix/getevents.c | 24 |
5 files changed, 36 insertions, 50 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 76e962e4e..e86e606c0 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -246,7 +246,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) return dev; } -static void +void SendDevicePresenceEvent(int deviceid, int type) { DeviceIntRec dummyDev; @@ -281,9 +281,6 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent) DeviceIntPtr *prev; int ret; DeviceIntPtr other; - int evsize = sizeof(xEvent); - int listlen; - EventListPtr evlist; BOOL enabled; int flags[MAXDEVICES] = {0}; @@ -325,16 +322,6 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent) * list's events have enough memory for a ClassesChangedEvent from the * device */ - - evsize += SizeDeviceClasses(dev); - - listlen = GetEventList(&evlist); - OsBlockSignals(); - SetMinimumEventSize(evlist, listlen, evsize); - mieqResizeEvents(evsize); - OsReleaseSignals(); - - if ((*prev != dev) || !dev->inited || ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { ErrorF("[dix] couldn't enable device %d\n", dev->id); diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c index 7d7ae71de..d0a46c744 100644 --- a/xorg-server/dix/dixfonts.c +++ b/xorg-server/dix/dixfonts.c @@ -1810,6 +1810,9 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) int SetDefaultFontPath(char *path) { + char *temp_path, + *start, + *end; unsigned char *cp, *pp, *nump, @@ -1820,12 +1823,31 @@ SetDefaultFontPath(char *path) size = 0, bad; + /* ensure temp_path contains "built-ins" */ + start = path; + while (1) { + start = strstr(start, "built-ins"); + if (start == NULL) + break; + end = start + strlen("built-ins"); + if ((start == path || start[-1] == ',') && (!*end || *end == ',')) + break; + start = end; + } + if (!start) { + temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : ""); + } else { + temp_path = Xstrdup(path); + } + if (!temp_path) + return BadAlloc; + /* get enough for string, plus values -- use up commas */ - len = strlen(path) + 1; + len = strlen(temp_path) + 1; nump = cp = newpath = xalloc(len); if (!newpath) return BadAlloc; - pp = (unsigned char *) path; + pp = (unsigned char *) temp_path; cp++; while (*pp) { if (*pp == ',') { @@ -1844,6 +1866,7 @@ SetDefaultFontPath(char *path) err = SetFontPathElements(num, newpath, &bad, TRUE); xfree(newpath); + xfree(temp_path); return err; } diff --git a/xorg-server/dix/eventconvert.c b/xorg-server/dix/eventconvert.c index 21eed40e1..d91ba67c2 100644 --- a/xorg-server/dix/eventconvert.c +++ b/xorg-server/dix/eventconvert.c @@ -107,7 +107,7 @@ EventToCore(InternalEvent *event, xEvent *core) case ET_KeyPress: case ET_KeyRelease: { - DeviceEvent *e = (DeviceEvent*)event; + DeviceEvent *e = &event->device_event; if (e->detail.key > 0xFF) return BadMatch; @@ -167,7 +167,7 @@ EventToXI(InternalEvent *ev, xEvent **xi, int *count) case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: - return eventToKeyButtonPointer((DeviceEvent*)ev, xi, count); + return eventToKeyButtonPointer(&ev->device_event, xi, count); case ET_DeviceChanged: case ET_RawKeyPress: case ET_RawKeyRelease: @@ -215,19 +215,19 @@ EventToXI2(InternalEvent *ev, xEvent **xi) case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: - return eventToDeviceEvent((DeviceEvent*)ev, xi); + return eventToDeviceEvent(&ev->device_event, xi); case ET_ProximityIn: case ET_ProximityOut: *xi = NULL; return BadMatch; case ET_DeviceChanged: - return eventToDeviceChanged((DeviceChangedEvent*)ev, xi); + return eventToDeviceChanged(&ev->changed_event, xi); case ET_RawKeyPress: case ET_RawKeyRelease: case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: - return eventToRawEvent((RawDeviceEvent*)ev, xi); + return eventToRawEvent(&ev->raw_event, xi); default: break; } diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 0d01df512..a79cf6d2f 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -809,7 +809,7 @@ CheckVirtualMotion( if (qe) { - ev = (DeviceEvent*)qe->event; + ev = &qe->event->device_event; switch(ev->type) { case ET_Motion: @@ -1130,7 +1130,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) QdEventPtr qe; SpritePtr pSprite = device->spriteInfo->sprite; int eventlen; - DeviceEvent *event = (DeviceEvent*)ev; + DeviceEvent *event = &ev->device_event; NoticeTime((InternalEvent*)event); @@ -1179,7 +1179,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) (tail->device == device) && (tail->pScreen == pSprite->hotPhys.pScreen)) { - DeviceEvent *tailev = (DeviceEvent*)tail->event; + DeviceEvent *tailev = &tail->event->device_event; tailev->root_x = pSprite->hotPhys.x; tailev->root_y = pSprite->hotPhys.y; tailev->time = event->time; @@ -1238,7 +1238,7 @@ PlayReleasedEvents(void) will translate from sprite screen to screen 0 upon reentry to the DIX layer */ if(!noPanoramiXExtension) { - DeviceEvent *ev = (DeviceEvent*)(qe->event); + DeviceEvent *ev = &qe->event->device_event; switch(ev->type) { case ET_Motion: @@ -3993,7 +3993,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, FreezeThaw(thisDev, TRUE); if (!grabinfo->sync.event) grabinfo->sync.event = xcalloc(1, sizeof(InternalEvent)); - *grabinfo->sync.event = *(DeviceEvent*)event; + *grabinfo->sync.event = event->device_event; break; } } diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index 46e508002..7ddf88bad 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -964,30 +964,6 @@ InitEventList(int num_events) } /** - * Allocs min_size memory for each event in the list. - */ -void -SetMinimumEventSize(EventListPtr list, int num_events, int min_size) -{ - if (!list) - return; - - while(num_events--) - { - if (list[num_events].evlen < min_size) - { - list[num_events].evlen = min_size; - list[num_events].event = realloc(list[num_events].event, min_size); - if (!list[num_events].event) - { - FatalError("[dix] Failed to set event list's " - "min_size to %d.\n", min_size); - } - } - } -} - -/** * Free an event list. * * @param list The list to be freed. |