diff options
Diffstat (limited to 'dix')
-rw-r--r-- | dix/devices.c | 2 | ||||
-rw-r--r-- | dix/events.c | 27 | ||||
-rw-r--r-- | dix/gc.c | 10 | ||||
-rw-r--r-- | dix/getevents.c | 2 | ||||
-rw-r--r-- | dix/tables.c | 955 | ||||
-rw-r--r-- | dix/touch.c | 4 |
6 files changed, 584 insertions, 416 deletions
diff --git a/dix/devices.c b/dix/devices.c index 012550443..fbc9fec57 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2630,6 +2630,8 @@ AllocDevicePair(ClientPtr client, const char *name, *ptr = *keybd = NULL; + XkbInitPrivates(); + pointer = AddInputDevice(client, ptr_proc, TRUE); if (!pointer) diff --git a/dix/events.c b/dix/events.c index 86336fef6..822b6e931 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4314,7 +4314,6 @@ OtherClientGone(pointer value, XID id) prev = other; } FatalError("client not on event list"); - /*NOTREACHED*/ return -1; /* make compiler happy */ } int @@ -4337,12 +4336,10 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) return rc; } check = (mask & AtMostOneClient); - if (check & (pWin->eventMask | wOtherEventMasks(pWin))) { /* It is illegal for two different - clients to select on any of the - events for AtMostOneClient. However, - it is OK, for some client to - continue selecting on one of those - events. */ + if (check & (pWin->eventMask | wOtherEventMasks(pWin))) { + /* It is illegal for two different clients to select on any of the + events for AtMostOneClient. However, it is OK, for some client to + continue selecting on one of those events. */ if ((wClient(pWin) != client) && (check & pWin->eventMask)) return BadAccess; for (others = wOtherClients(pWin); others; others = others->next) { @@ -5622,8 +5619,8 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) if (IsKeyboardDevice(keybd)) { focus = keybd->focus; - /* If the focus window is a root window (ie. has no parent) then don't - delete the focus from it. */ + /* If the focus window is a root window (ie. has no parent) + then don't delete the focus from it. */ if ((pWin == focus->win) && (pWin->parent != NullWindow)) { int focusEventMode = NotifyNormal; @@ -5645,12 +5642,12 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) parent = parent->parent; focus->traceGood--; } while (!parent->realized - /* This would be a good protocol change -- windows being reparented - during SaveSet processing would cause the focus to revert to the - nearest enclosing window which will survive the death of the exiting - client, instead of ending up reverting to a dying window and thence - to None - */ + /* This would be a good protocol change -- windows being + reparented during SaveSet processing would cause the + focus to revert to the nearest enclosing window which + will survive the death of the exiting client, instead + of ending up reverting to a dying window and thence + to None */ #ifdef NOTDEF || wClient(parent)->clientGone #endif @@ -419,11 +419,11 @@ static const struct { RESTYPE type; Mask access_mode; } xidfields[] = { - { - GCTile, RT_PIXMAP, DixReadAccess}, { - GCStipple, RT_PIXMAP, DixReadAccess}, { - GCFont, RT_FONT, DixUseAccess}, { -GCClipMask, RT_PIXMAP, DixReadAccess},}; + {GCTile, RT_PIXMAP, DixReadAccess}, + {GCStipple, RT_PIXMAP, DixReadAccess}, + {GCFont, RT_FONT, DixUseAccess}, + {GCClipMask, RT_PIXMAP, DixReadAccess}, +}; int ChangeGCXIDs(ClientPtr client, GC * pGC, BITS32 mask, CARD32 *pC32) diff --git a/dix/getevents.c b/dix/getevents.c index b78d5cec0..fade40c0f 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1601,6 +1601,8 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, if (adj != 0.0 && axis != -1) { adj *= pDev->valuator->axes[axis].scroll.increment; + if (!valuator_mask_isset(&mask, axis)) + valuator_mask_set(&mask, axis, 0); add_to_scroll_valuator(pDev, &mask, axis, adj); type = MotionNotify; buttons = 0; diff --git a/dix/tables.c b/dix/tables.c index 705ef0d4d..686cddd7d 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -58,364 +58,529 @@ SOFTWARE. #include "swaprep.h" #include "swapreq.h" -int (*InitialVector[3]) (ClientPtr /* client */ - ) = { -0, ProcInitialConnection, ProcEstablishConnection}; +int (*InitialVector[3]) (ClientPtr /* client */) = { + 0, + ProcInitialConnection, + ProcEstablishConnection +}; -int (*ProcVector[256]) (ClientPtr /* client */ - ) = { - ProcBadRequest, ProcCreateWindow, ProcChangeWindowAttributes, ProcGetWindowAttributes, ProcDestroyWindow, ProcDestroySubwindows, /* 5 */ - ProcChangeSaveSet, ProcReparentWindow, ProcMapWindow, ProcMapSubwindows, ProcUnmapWindow, /* 10 */ - ProcUnmapSubwindows, ProcConfigureWindow, ProcCirculateWindow, ProcGetGeometry, ProcQueryTree, /* 15 */ - ProcInternAtom, ProcGetAtomName, ProcChangeProperty, ProcDeleteProperty, ProcGetProperty, /* 20 */ - ProcListProperties, ProcSetSelectionOwner, ProcGetSelectionOwner, ProcConvertSelection, ProcSendEvent, /* 25 */ - ProcGrabPointer, ProcUngrabPointer, ProcGrabButton, ProcUngrabButton, ProcChangeActivePointerGrab, /* 30 */ - ProcGrabKeyboard, ProcUngrabKeyboard, ProcGrabKey, ProcUngrabKey, ProcAllowEvents, /* 35 */ - ProcGrabServer, ProcUngrabServer, ProcQueryPointer, ProcGetMotionEvents, ProcTranslateCoords, /* 40 */ - ProcWarpPointer, ProcSetInputFocus, ProcGetInputFocus, ProcQueryKeymap, ProcOpenFont, /* 45 */ - ProcCloseFont, ProcQueryFont, ProcQueryTextExtents, ProcListFonts, ProcListFontsWithInfo, /* 50 */ - ProcSetFontPath, ProcGetFontPath, ProcCreatePixmap, ProcFreePixmap, ProcCreateGC, /* 55 */ - ProcChangeGC, ProcCopyGC, ProcSetDashes, ProcSetClipRectangles, ProcFreeGC, /* 60 */ - ProcClearToBackground, ProcCopyArea, ProcCopyPlane, ProcPolyPoint, ProcPolyLine, /* 65 */ - ProcPolySegment, ProcPolyRectangle, ProcPolyArc, ProcFillPoly, ProcPolyFillRectangle, /* 70 */ - ProcPolyFillArc, ProcPutImage, ProcGetImage, ProcPolyText, ProcPolyText, /* 75 */ - ProcImageText8, ProcImageText16, ProcCreateColormap, ProcFreeColormap, ProcCopyColormapAndFree, /* 80 */ - ProcInstallColormap, ProcUninstallColormap, ProcListInstalledColormaps, ProcAllocColor, ProcAllocNamedColor, /* 85 */ - ProcAllocColorCells, ProcAllocColorPlanes, ProcFreeColors, ProcStoreColors, ProcStoreNamedColor, /* 90 */ - ProcQueryColors, ProcLookupColor, ProcCreateCursor, ProcCreateGlyphCursor, ProcFreeCursor, /* 95 */ - ProcRecolorCursor, ProcQueryBestSize, ProcQueryExtension, ProcListExtensions, ProcChangeKeyboardMapping, /* 100 */ - ProcGetKeyboardMapping, ProcChangeKeyboardControl, ProcGetKeyboardControl, ProcBell, ProcChangePointerControl, /* 105 */ - ProcGetPointerControl, ProcSetScreenSaver, ProcGetScreenSaver, ProcChangeHosts, ProcListHosts, /* 110 */ - ProcChangeAccessControl, ProcChangeCloseDownMode, ProcKillClient, ProcRotateProperties, ProcForceScreenSaver, /* 115 */ - ProcSetPointerMapping, ProcGetPointerMapping, ProcSetModifierMapping, ProcGetModifierMapping, ProcBadRequest, /* 120 */ - ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, /* 125 */ -ProcBadRequest, - ProcNoOperation, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest}; +int (*ProcVector[256]) (ClientPtr /* client */) = { + ProcBadRequest, + ProcCreateWindow, + ProcChangeWindowAttributes, + ProcGetWindowAttributes, + ProcDestroyWindow, + ProcDestroySubwindows, /* 5 */ + ProcChangeSaveSet, + ProcReparentWindow, + ProcMapWindow, + ProcMapSubwindows, + ProcUnmapWindow, /* 10 */ + ProcUnmapSubwindows, + ProcConfigureWindow, + ProcCirculateWindow, + ProcGetGeometry, + ProcQueryTree, /* 15 */ + ProcInternAtom, + ProcGetAtomName, + ProcChangeProperty, + ProcDeleteProperty, + ProcGetProperty, /* 20 */ + ProcListProperties, + ProcSetSelectionOwner, + ProcGetSelectionOwner, + ProcConvertSelection, + ProcSendEvent, /* 25 */ + ProcGrabPointer, + ProcUngrabPointer, + ProcGrabButton, + ProcUngrabButton, + ProcChangeActivePointerGrab, /* 30 */ + ProcGrabKeyboard, + ProcUngrabKeyboard, + ProcGrabKey, + ProcUngrabKey, + ProcAllowEvents, /* 35 */ + ProcGrabServer, + ProcUngrabServer, + ProcQueryPointer, + ProcGetMotionEvents, + ProcTranslateCoords, /* 40 */ + ProcWarpPointer, + ProcSetInputFocus, + ProcGetInputFocus, + ProcQueryKeymap, + ProcOpenFont, /* 45 */ + ProcCloseFont, + ProcQueryFont, + ProcQueryTextExtents, + ProcListFonts, + ProcListFontsWithInfo, /* 50 */ + ProcSetFontPath, + ProcGetFontPath, + ProcCreatePixmap, + ProcFreePixmap, + ProcCreateGC, /* 55 */ + ProcChangeGC, + ProcCopyGC, + ProcSetDashes, + ProcSetClipRectangles, + ProcFreeGC, /* 60 */ + ProcClearToBackground, + ProcCopyArea, + ProcCopyPlane, + ProcPolyPoint, + ProcPolyLine, /* 65 */ + ProcPolySegment, + ProcPolyRectangle, + ProcPolyArc, + ProcFillPoly, + ProcPolyFillRectangle, /* 70 */ + ProcPolyFillArc, + ProcPutImage, + ProcGetImage, + ProcPolyText, + ProcPolyText, /* 75 */ + ProcImageText8, + ProcImageText16, + ProcCreateColormap, + ProcFreeColormap, + ProcCopyColormapAndFree, /* 80 */ + ProcInstallColormap, + ProcUninstallColormap, + ProcListInstalledColormaps, + ProcAllocColor, + ProcAllocNamedColor, /* 85 */ + ProcAllocColorCells, + ProcAllocColorPlanes, + ProcFreeColors, + ProcStoreColors, + ProcStoreNamedColor, /* 90 */ + ProcQueryColors, + ProcLookupColor, + ProcCreateCursor, + ProcCreateGlyphCursor, + ProcFreeCursor, /* 95 */ + ProcRecolorCursor, + ProcQueryBestSize, + ProcQueryExtension, + ProcListExtensions, + ProcChangeKeyboardMapping, /* 100 */ + ProcGetKeyboardMapping, + ProcChangeKeyboardControl, + ProcGetKeyboardControl, + ProcBell, + ProcChangePointerControl, /* 105 */ + ProcGetPointerControl, + ProcSetScreenSaver, + ProcGetScreenSaver, + ProcChangeHosts, + ProcListHosts, /* 110 */ + ProcChangeAccessControl, + ProcChangeCloseDownMode, + ProcKillClient, + ProcRotateProperties, + ProcForceScreenSaver, /* 115 */ + ProcSetPointerMapping, + ProcGetPointerMapping, + ProcSetModifierMapping, + ProcGetModifierMapping, + ProcBadRequest, /* 120 */ + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, /* 125 */ + ProcBadRequest, + ProcNoOperation, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest +}; -int (*SwappedProcVector[256]) (ClientPtr /* client */ - ) = { - ProcBadRequest, SProcCreateWindow, SProcChangeWindowAttributes, SProcResourceReq, /* GetWindowAttributes */ - SProcResourceReq, /* DestroyWindow */ - SProcResourceReq, /* 5 DestroySubwindows */ - SProcResourceReq, /* SProcChangeSaveSet, */ - SProcReparentWindow, SProcResourceReq, /* MapWindow */ - SProcResourceReq, /* MapSubwindows */ - SProcResourceReq, /* 10 UnmapWindow */ - SProcResourceReq, /* UnmapSubwindows */ - SProcConfigureWindow, SProcResourceReq, /* SProcCirculateWindow, */ - SProcResourceReq, /* GetGeometry */ - SProcResourceReq, /* 15 QueryTree */ - SProcInternAtom, SProcResourceReq, /* SProcGetAtomName, */ - SProcChangeProperty, SProcDeleteProperty, SProcGetProperty, /* 20 */ - SProcResourceReq, /* SProcListProperties, */ - SProcSetSelectionOwner, SProcResourceReq, /* SProcGetSelectionOwner, */ - SProcConvertSelection, SProcSendEvent, /* 25 */ - SProcGrabPointer, SProcResourceReq, /* SProcUngrabPointer, */ - SProcGrabButton, SProcUngrabButton, SProcChangeActivePointerGrab, /* 30 */ - SProcGrabKeyboard, SProcResourceReq, /* SProcUngrabKeyboard, */ - SProcGrabKey, SProcUngrabKey, SProcResourceReq, /* 35 SProcAllowEvents, */ - SProcSimpleReq, /* SProcGrabServer, */ - SProcSimpleReq, /* SProcUngrabServer, */ - SProcResourceReq, /* SProcQueryPointer, */ - SProcGetMotionEvents, SProcTranslateCoords, /*40 */ - SProcWarpPointer, SProcSetInputFocus, SProcSimpleReq, /* SProcGetInputFocus, */ - SProcSimpleReq, /* QueryKeymap, */ - SProcOpenFont, /* 45 */ - SProcResourceReq, /* SProcCloseFont, */ - SProcResourceReq, /* SProcQueryFont, */ - SProcResourceReq, /* SProcQueryTextExtents, */ - SProcListFonts, SProcListFontsWithInfo, /* 50 */ - SProcSetFontPath, SProcSimpleReq, /* GetFontPath, */ - SProcCreatePixmap, SProcResourceReq, /* SProcFreePixmap, */ - SProcCreateGC, /* 55 */ - SProcChangeGC, SProcCopyGC, SProcSetDashes, SProcSetClipRectangles, SProcResourceReq, /* 60 SProcFreeGC, */ - SProcClearToBackground, SProcCopyArea, SProcCopyPlane, SProcPoly, /* PolyPoint, */ - SProcPoly, /* 65 PolyLine */ - SProcPoly, /* PolySegment, */ - SProcPoly, /* PolyRectangle, */ - SProcPoly, /* PolyArc, */ - SProcFillPoly, SProcPoly, /* 70 PolyFillRectangle */ - SProcPoly, /* PolyFillArc, */ - SProcPutImage, SProcGetImage, SProcPolyText, SProcPolyText, /* 75 */ - SProcImageText, SProcImageText, SProcCreateColormap, SProcResourceReq, /* SProcFreeColormap, */ - SProcCopyColormapAndFree, /* 80 */ - SProcResourceReq, /* SProcInstallColormap, */ - SProcResourceReq, /* SProcUninstallColormap, */ - SProcResourceReq, /* SProcListInstalledColormaps, */ - SProcAllocColor, SProcAllocNamedColor, /* 85 */ - SProcAllocColorCells, SProcAllocColorPlanes, SProcFreeColors, SProcStoreColors, SProcStoreNamedColor, /* 90 */ - SProcQueryColors, SProcLookupColor, SProcCreateCursor, SProcCreateGlyphCursor, SProcResourceReq, /* 95 SProcFreeCursor, */ - SProcRecolorCursor, SProcQueryBestSize, SProcQueryExtension, SProcSimpleReq, /* ListExtensions, */ - SProcChangeKeyboardMapping, /* 100 */ - SProcSimpleReq, /* GetKeyboardMapping, */ - SProcChangeKeyboardControl, SProcSimpleReq, /* GetKeyboardControl, */ - SProcSimpleReq, /* Bell, */ - SProcChangePointerControl, /* 105 */ - SProcSimpleReq, /* GetPointerControl, */ - SProcSetScreenSaver, SProcSimpleReq, /* GetScreenSaver, */ - SProcChangeHosts, SProcSimpleReq, /* 110 ListHosts, */ - SProcSimpleReq, /* SProcChangeAccessControl, */ - SProcSimpleReq, /* SProcChangeCloseDownMode, */ - SProcResourceReq, /* SProcKillClient, */ - SProcRotateProperties, SProcSimpleReq, /* 115 ForceScreenSaver */ - SProcSimpleReq, /* SetPointerMapping, */ - SProcSimpleReq, /* GetPointerMapping, */ - SProcSimpleReq, /* SetModifierMapping, */ - SProcSimpleReq, /* GetModifierMapping, */ - ProcBadRequest, /* 120 */ - ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, /* 125 */ -ProcBadRequest, - SProcNoOperation, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, - ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest}; +int (*SwappedProcVector[256]) (ClientPtr /* client */) = { + ProcBadRequest, + SProcCreateWindow, + SProcChangeWindowAttributes, + SProcResourceReq, /* GetWindowAttributes */ + SProcResourceReq, /* DestroyWindow */ + SProcResourceReq, /* 5 DestroySubwindows */ + SProcResourceReq, /* SProcChangeSaveSet, */ + SProcReparentWindow, + SProcResourceReq, /* MapWindow */ + SProcResourceReq, /* MapSubwindows */ + SProcResourceReq, /* 10 UnmapWindow */ + SProcResourceReq, /* UnmapSubwindows */ + SProcConfigureWindow, + SProcResourceReq, /* SProcCirculateWindow, */ + SProcResourceReq, /* GetGeometry */ + SProcResourceReq, /* 15 QueryTree */ + SProcInternAtom, + SProcResourceReq, /* SProcGetAtomName, */ + SProcChangeProperty, + SProcDeleteProperty, + SProcGetProperty, /* 20 */ + SProcResourceReq, /* SProcListProperties, */ + SProcSetSelectionOwner, + SProcResourceReq, /* SProcGetSelectionOwner, */ + SProcConvertSelection, + SProcSendEvent, /* 25 */ + SProcGrabPointer, + SProcResourceReq, /* SProcUngrabPointer, */ + SProcGrabButton, + SProcUngrabButton, + SProcChangeActivePointerGrab, /* 30 */ + SProcGrabKeyboard, + SProcResourceReq, /* SProcUngrabKeyboard, */ + SProcGrabKey, + SProcUngrabKey, + SProcResourceReq, /* 35 SProcAllowEvents, */ + SProcSimpleReq, /* SProcGrabServer, */ + SProcSimpleReq, /* SProcUngrabServer, */ + SProcResourceReq, /* SProcQueryPointer, */ + SProcGetMotionEvents, + SProcTranslateCoords, /*40 */ + SProcWarpPointer, + SProcSetInputFocus, + SProcSimpleReq, /* SProcGetInputFocus, */ + SProcSimpleReq, /* QueryKeymap, */ + SProcOpenFont, /* 45 */ + SProcResourceReq, /* SProcCloseFont, */ + SProcResourceReq, /* SProcQueryFont, */ + SProcResourceReq, /* SProcQueryTextExtents, */ + SProcListFonts, + SProcListFontsWithInfo, /* 50 */ + SProcSetFontPath, + SProcSimpleReq, /* GetFontPath, */ + SProcCreatePixmap, + SProcResourceReq, /* SProcFreePixmap, */ + SProcCreateGC, /* 55 */ + SProcChangeGC, + SProcCopyGC, + SProcSetDashes, + SProcSetClipRectangles, + SProcResourceReq, /* 60 SProcFreeGC, */ + SProcClearToBackground, + SProcCopyArea, + SProcCopyPlane, + SProcPoly, /* PolyPoint, */ + SProcPoly, /* 65 PolyLine */ + SProcPoly, /* PolySegment, */ + SProcPoly, /* PolyRectangle, */ + SProcPoly, /* PolyArc, */ + SProcFillPoly, + SProcPoly, /* 70 PolyFillRectangle */ + SProcPoly, /* PolyFillArc, */ + SProcPutImage, + SProcGetImage, + SProcPolyText, + SProcPolyText, /* 75 */ + SProcImageText, + SProcImageText, + SProcCreateColormap, + SProcResourceReq, /* SProcFreeColormap, */ + SProcCopyColormapAndFree, /* 80 */ + SProcResourceReq, /* SProcInstallColormap, */ + SProcResourceReq, /* SProcUninstallColormap, */ + SProcResourceReq, /* SProcListInstalledColormaps, */ + SProcAllocColor, + SProcAllocNamedColor, /* 85 */ + SProcAllocColorCells, + SProcAllocColorPlanes, + SProcFreeColors, + SProcStoreColors, + SProcStoreNamedColor, /* 90 */ + SProcQueryColors, + SProcLookupColor, + SProcCreateCursor, + SProcCreateGlyphCursor, + SProcResourceReq, /* 95 SProcFreeCursor, */ + SProcRecolorCursor, + SProcQueryBestSize, + SProcQueryExtension, + SProcSimpleReq, /* ListExtensions, */ + SProcChangeKeyboardMapping, /* 100 */ + SProcSimpleReq, /* GetKeyboardMapping, */ + SProcChangeKeyboardControl, + SProcSimpleReq, /* GetKeyboardControl, */ + SProcSimpleReq, /* Bell, */ + SProcChangePointerControl, /* 105 */ + SProcSimpleReq, /* GetPointerControl, */ + SProcSetScreenSaver, + SProcSimpleReq, /* GetScreenSaver, */ + SProcChangeHosts, + SProcSimpleReq, /* 110 ListHosts, */ + SProcSimpleReq, /* SProcChangeAccessControl, */ + SProcSimpleReq, /* SProcChangeCloseDownMode, */ + SProcResourceReq, /* SProcKillClient, */ + SProcRotateProperties, + SProcSimpleReq, /* 115 ForceScreenSaver */ + SProcSimpleReq, /* SetPointerMapping, */ + SProcSimpleReq, /* GetPointerMapping, */ + SProcSimpleReq, /* SetModifierMapping, */ + SProcSimpleReq, /* GetModifierMapping, */ + ProcBadRequest, /* 120 */ + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, /* 125 */ + ProcBadRequest, + SProcNoOperation, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest, + ProcBadRequest +}; EventSwapPtr EventSwapVector[MAXEVENTS] = { (EventSwapPtr) SErrorEvent, @@ -423,32 +588,32 @@ EventSwapPtr EventSwapVector[MAXEVENTS] = { SKeyButtonPtrEvent, SKeyButtonPtrEvent, SKeyButtonPtrEvent, - SKeyButtonPtrEvent, /* 5 */ + SKeyButtonPtrEvent, /* 5 */ SKeyButtonPtrEvent, SEnterLeaveEvent, SEnterLeaveEvent, SFocusEvent, - SFocusEvent, /* 10 */ + SFocusEvent, /* 10 */ SKeymapNotifyEvent, SExposeEvent, SGraphicsExposureEvent, SNoExposureEvent, - SVisibilityEvent, /* 15 */ + SVisibilityEvent, /* 15 */ SCreateNotifyEvent, SDestroyNotifyEvent, SUnmapNotifyEvent, SMapNotifyEvent, - SMapRequestEvent, /* 20 */ + SMapRequestEvent, /* 20 */ SReparentEvent, SConfigureNotifyEvent, SConfigureRequestEvent, SGravityEvent, - SResizeRequestEvent, /* 25 */ + SResizeRequestEvent, /* 25 */ SCirculateEvent, SCirculateEvent, SPropertyEvent, SSelectionClearEvent, - SSelectionRequestEvent, /* 30 */ + SSelectionRequestEvent, /* 30 */ SSelectionNotifyEvent, SColormapEvent, SClientMessageEvent, @@ -554,37 +719,37 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, (ReplySwapPtr) SGetWindowAttributesReply, ReplyNotSwappd, - ReplyNotSwappd, /* 5 */ + ReplyNotSwappd, /* 5 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 10 */ + ReplyNotSwappd, /* 10 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SGetGeometryReply, - (ReplySwapPtr) SQueryTreeReply, /* 15 */ + (ReplySwapPtr) SQueryTreeReply, /* 15 */ (ReplySwapPtr) SInternAtomReply, (ReplySwapPtr) SGetAtomNameReply, ReplyNotSwappd, ReplyNotSwappd, - (ReplySwapPtr) SGetPropertyReply, /* 20 */ + (ReplySwapPtr) SGetPropertyReply, /* 20 */ (ReplySwapPtr) SListPropertiesReply, ReplyNotSwappd, (ReplySwapPtr) SGetSelectionOwnerReply, ReplyNotSwappd, - ReplyNotSwappd, /* 25 */ - (ReplySwapPtr) SGenericReply, /* SGrabPointerReply, */ + ReplyNotSwappd, /* 25 */ + (ReplySwapPtr) SGenericReply, /* SGrabPointerReply, */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 30 */ - (ReplySwapPtr) SGenericReply, /* SGrabKeyboardReply, */ + ReplyNotSwappd, /* 30 */ + (ReplySwapPtr) SGenericReply, /* SGrabKeyboardReply, */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 35 */ + ReplyNotSwappd, /* 35 */ ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SQueryPointerReply, @@ -594,7 +759,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, (ReplySwapPtr) SGetInputFocusReply, (ReplySwapPtr) SQueryKeymapReply, - ReplyNotSwappd, /* 45 */ + ReplyNotSwappd, /* 45 */ ReplyNotSwappd, (ReplySwapPtr) SQueryFontReply, (ReplySwapPtr) SQueryTextExtentsReply, @@ -604,32 +769,32 @@ ReplySwapPtr ReplySwapVector[256] = { (ReplySwapPtr) SGetFontPathReply, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 55 */ + ReplyNotSwappd, /* 55 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 60 */ + ReplyNotSwappd, /* 60 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 65 */ + ReplyNotSwappd, /* 65 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 70 */ + ReplyNotSwappd, /* 70 */ ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SGetImageReply, ReplyNotSwappd, - ReplyNotSwappd, /* 75 */ + ReplyNotSwappd, /* 75 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 80 */ + ReplyNotSwappd, /* 80 */ ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SListInstalledColormapsReply, @@ -639,44 +804,44 @@ ReplySwapPtr ReplySwapVector[256] = { (ReplySwapPtr) SAllocColorPlanesReply, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 90 */ + ReplyNotSwappd, /* 90 */ (ReplySwapPtr) SQueryColorsReply, (ReplySwapPtr) SLookupColorReply, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 95 */ + ReplyNotSwappd, /* 95 */ ReplyNotSwappd, (ReplySwapPtr) SQueryBestSizeReply, - (ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */ + (ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */ (ReplySwapPtr) SListExtensionsReply, - ReplyNotSwappd, /* 100 */ + ReplyNotSwappd, /* 100 */ (ReplySwapPtr) SGetKeyboardMappingReply, ReplyNotSwappd, (ReplySwapPtr) SGetKeyboardControlReply, ReplyNotSwappd, - ReplyNotSwappd, /* 105 */ + ReplyNotSwappd, /* 105 */ (ReplySwapPtr) SGetPointerControlReply, ReplyNotSwappd, (ReplySwapPtr) SGetScreenSaverReply, ReplyNotSwappd, - (ReplySwapPtr) SListHostsReply, /* 110 */ + (ReplySwapPtr) SListHostsReply, /* 110 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, - ReplyNotSwappd, /* 115 */ - (ReplySwapPtr) SGenericReply, /* SetPointerMapping */ + ReplyNotSwappd, /* 115 */ + (ReplySwapPtr) SGenericReply, /* SetPointerMapping */ (ReplySwapPtr) SGetPointerMappingReply, - (ReplySwapPtr) SGenericReply, /* SetModifierMapping */ + (ReplySwapPtr) SGenericReply, /* SetModifierMapping */ (ReplySwapPtr) SGetModifierMappingReply, /* 119 */ - ReplyNotSwappd, /* 120 */ - ReplyNotSwappd, /* 121 */ - ReplyNotSwappd, /* 122 */ - ReplyNotSwappd, /* 123 */ - ReplyNotSwappd, /* 124 */ - ReplyNotSwappd, /* 125 */ - ReplyNotSwappd, /* 126 */ - ReplyNotSwappd, /* NoOperation */ + ReplyNotSwappd, /* 120 */ + ReplyNotSwappd, /* 121 */ + ReplyNotSwappd, /* 122 */ + ReplyNotSwappd, /* 123 */ + ReplyNotSwappd, /* 124 */ + ReplyNotSwappd, /* 125 */ + ReplyNotSwappd, /* 126 */ + ReplyNotSwappd, /* NoOperation */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, diff --git a/dix/touch.c b/dix/touch.c index 04733ab35..ad48d8a66 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -160,11 +160,13 @@ TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id) int i; TouchClassPtr t = dev->touch; DDXTouchPointInfoPtr ti = NULL; - Bool emulate_pointer = (t->mode == XIDirectTouch); + Bool emulate_pointer; if (!t) return NULL; + emulate_pointer = (t->mode == XIDirectTouch); + /* Look for another active touchpoint with the same DDX ID. DDX * touchpoints must be unique. */ if (TouchFindByDDXID(dev, ddx_id, FALSE)) |