diff options
author | Ian Romanick <idr@us.ibm.com> | 2007-03-30 13:39:15 -0700 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2007-03-30 13:39:15 -0700 |
commit | e9130b8bac73a0843d5ff6b2216eccfb3e094a48 (patch) | |
tree | 77435f80b7dfd5d5d11a5342100f6c884950b15e | |
parent | 2c6d47108880584f1221ff86c6c8947627f9f607 (diff) | |
parent | 92e8cdbd32b0d86cabd4ad88e3240bf90c018b9a (diff) |
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
61 files changed, 563 insertions, 333 deletions
diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 8184f605f..cd1130d61 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -14,7 +14,6 @@ AM_CFLAGS = \ -I@MESA_SOURCE@/src/mesa/glapi \ -I@MESA_SOURCE@/src/mesa/main \ -DXFree86Server \ - -DNO_LIBCWRAPPER \ @GLX_DEFINES@ # none yet diff --git a/GL/mesa/X/Makefile.am b/GL/mesa/X/Makefile.am index 45345a7e3..056d31ab5 100644 --- a/GL/mesa/X/Makefile.am +++ b/GL/mesa/X/Makefile.am @@ -20,13 +20,11 @@ INCLUDES = -I@MESA_SOURCE@/include \ AM_CFLAGS = \ $(DIX_CFLAGS) \ -DXFree86Server \ - @GLX_DEFINES@ \ - -DXFree86Server + @GLX_DEFINES@ libX_la_SOURCES = xf86glx.c \ xf86glx_util.c \ - xf86glx_util.h \ - xf86glxint.h + xf86glx_util.h nodist_libX_la_SOURCES = \ xm_api.c \ diff --git a/GL/mesa/X/xf86glx.c b/GL/mesa/X/xf86glx.c index 47c87f6d9..6fffdeb1f 100644 --- a/GL/mesa/X/xf86glx.c +++ b/GL/mesa/X/xf86glx.c @@ -37,40 +37,19 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include <string.h> -#include <regionstr.h> -#include <resource.h> -#include <GL/gl.h> -#include <GL/glxint.h> -#include <GL/glxtokens.h> -#include <scrnintstr.h> -#include <windowstr.h> -#include <config.h> + +#include <GL/xmesa.h> +#include <GL/internal/glcore.h> #include <glxserver.h> #include <glxscreens.h> #include <glxdrawable.h> #include <glxcontext.h> -#include <glxext.h> #include <glxutil.h> -#include "context.h" #include "xmesaP.h" -#include "context.h" #include "glcontextmodes.h" #include "os.h" -/* - * This define is for the glcore.h header file. - * If you add it here, then make sure you also add it in - * ../../../glx/Imakefile. - */ -#if 0 -#define DEBUG -#include <GL/internal/glcore.h> -#undef DEBUG -#else -#include <GL/internal/glcore.h> -#endif - typedef struct __GLXMESAscreen __GLXMESAscreen; typedef struct __GLXMESAcontext __GLXMESAcontext; typedef struct __GLXMESAdrawable __GLXMESAdrawable; @@ -218,8 +197,7 @@ __glXMesaContextCopy(__GLXcontext *baseDst, __GLXMESAcontext *dst = (__GLXMESAcontext *) baseDst; __GLXMESAcontext *src = (__GLXMESAcontext *) baseSrc; - _mesa_copy_context(&src->xmesa->mesa, &dst->xmesa->mesa, mask); - return GL_TRUE; + return XMesaCopyContext(src->xmesa, dst->xmesa, mask); } static int @@ -227,7 +205,7 @@ __glXMesaContextForceCurrent(__GLXcontext *baseContext) { __GLXMESAcontext *context = (__GLXMESAcontext *) baseContext; - GlxSetRenderTables (context->xmesa->mesa.CurrentDispatch); + /* GlxSetRenderTables() call for XGL moved in XMesaForceCurrent() */ return XMesaForceCurrent(context->xmesa); } diff --git a/GL/mesa/X/xf86glx_util.c b/GL/mesa/X/xf86glx_util.c index ffb528003..6af773f53 100644 --- a/GL/mesa/X/xf86glx_util.c +++ b/GL/mesa/X/xf86glx_util.c @@ -37,8 +37,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <stdlib.h> -#include <gcstruct.h> -#include "pixmapstr.h" #include "xf86glx_util.h" #include <X11/Xmd.h> diff --git a/GL/mesa/X/xf86glxint.h b/GL/mesa/X/xf86glxint.h deleted file mode 100644 index 8c7e91327..000000000 --- a/GL/mesa/X/xf86glxint.h +++ /dev/null @@ -1,45 +0,0 @@ -/************************************************************************** - -Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sub license, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice (including the -next paragraph) shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**************************************************************************/ - -/* - * Authors: - * Kevin E. Martin <kevin@precisioninsight.com> - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#ifndef _XF86GLXINT_H_ -#define _XF86GLXINT_H_ - -#include <miscstruct.h> -#include <GL/gl.h> -#include <GL/xmesa.h> - -#endif /* _XF86GLXINT_H_ */ diff --git a/Xi/allowev.c b/Xi/allowev.c index ea9c5de08..85b6eaf6b 100644 --- a/Xi/allowev.c +++ b/Xi/allowev.c @@ -76,9 +76,9 @@ SOFTWARE. */ int -SProcXAllowDeviceEvents(register ClientPtr client) +SProcXAllowDeviceEvents(ClientPtr client) { - register char n; + char n; REQUEST(xAllowDeviceEventsReq); swaps(&stuff->length, n); @@ -94,7 +94,7 @@ SProcXAllowDeviceEvents(register ClientPtr client) */ int -ProcXAllowDeviceEvents(register ClientPtr client) +ProcXAllowDeviceEvents(ClientPtr client) { TimeStamp time; DeviceIntPtr thisdev; diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index badd93822..9676fb747 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -78,9 +78,9 @@ SOFTWARE. */ int -SProcXChangeDeviceControl(register ClientPtr client) +SProcXChangeDeviceControl(ClientPtr client) { - register char n; + char n; REQUEST(xChangeDeviceControlReq); swaps(&stuff->length, n); @@ -287,7 +287,7 @@ void SRepXChangeDeviceControl(ClientPtr client, int size, xChangeDeviceControlReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c index 82616c694..2e0e13cad 100644 --- a/Xi/chgfctl.c +++ b/Xi/chgfctl.c @@ -78,9 +78,9 @@ SOFTWARE. */ int -SProcXChangeFeedbackControl(register ClientPtr client) +SProcXChangeFeedbackControl(ClientPtr client) { - register char n; + char n; REQUEST(xChangeFeedbackControlReq); swaps(&stuff->length, n); @@ -99,7 +99,7 @@ static int ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, KbdFeedbackPtr k, xKbdFeedbackCtl * f) { - register char n; + char n; KeybdCtrl kctrl; int t; int key = DO_ALL; @@ -231,7 +231,7 @@ static int ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, PtrFeedbackPtr p, xPtrFeedbackCtl * f) { - register char n; + char n; PtrCtrl pctrl; /* might get BadValue part way through */ if (client->swapped) { @@ -303,7 +303,7 @@ ChangeIntegerFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, IntegerFeedbackPtr i, xIntegerFeedbackCtl * f) { - register char n; + char n; if (client->swapped) { swaps(&f->length, n); @@ -326,8 +326,8 @@ ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, StringFeedbackPtr s, xStringFeedbackCtl * f) { - register char n; - register long *p; + char n; + long *p; int i, j; KeySym *syms, *sup_syms; @@ -376,7 +376,7 @@ ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, BellFeedbackPtr b, xBellFeedbackCtl * f) { - register char n; + char n; int t; BellCtrl bctrl; /* might get BadValue part way through */ @@ -440,7 +440,7 @@ static int ChangeLedFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, LedFeedbackPtr l, xLedFeedbackCtl * f) { - register char n; + char n; LedCtrl lctrl; /* might get BadValue part way through */ if (client->swapped) { @@ -520,7 +520,7 @@ ProcXChangeFeedbackControl(ClientPtr client) break; case StringFeedbackClass: { - register char n; + char n; xStringFeedbackCtl *f = ((xStringFeedbackCtl *) & stuff[1]); if (client->swapped) { diff --git a/Xi/chgkbd.c b/Xi/chgkbd.c index 8134b4060..2cf8225b3 100644 --- a/Xi/chgkbd.c +++ b/Xi/chgkbd.c @@ -78,9 +78,9 @@ SOFTWARE. */ int -SProcXChangeKeyboardDevice(register ClientPtr client) +SProcXChangeKeyboardDevice(ClientPtr client) { - register char n; + char n; REQUEST(xChangeKeyboardDeviceReq); swaps(&stuff->length, n); @@ -96,7 +96,7 @@ SProcXChangeKeyboardDevice(register ClientPtr client) */ int -ProcXChangeKeyboardDevice(register ClientPtr client) +ProcXChangeKeyboardDevice(ClientPtr client) { REQUEST(xChangeKeyboardDeviceReq); REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c index 047b899ed..eac520fd4 100644 --- a/Xi/chgkmap.c +++ b/Xi/chgkmap.c @@ -76,11 +76,11 @@ SOFTWARE. */ int -SProcXChangeDeviceKeyMapping(register ClientPtr client) +SProcXChangeDeviceKeyMapping(ClientPtr client) { - register char n; - register long *p; - register int i, count; + char n; + long *p; + int i, count; REQUEST(xChangeDeviceKeyMappingReq); swaps(&stuff->length, n); @@ -101,7 +101,7 @@ SProcXChangeDeviceKeyMapping(register ClientPtr client) */ int -ProcXChangeDeviceKeyMapping(register ClientPtr client) +ProcXChangeDeviceKeyMapping(ClientPtr client) { int ret; unsigned len; diff --git a/Xi/chgprop.c b/Xi/chgprop.c index bab4597b8..59a93c60b 100644 --- a/Xi/chgprop.c +++ b/Xi/chgprop.c @@ -78,11 +78,11 @@ SOFTWARE. */ int -SProcXChangeDeviceDontPropagateList(register ClientPtr client) +SProcXChangeDeviceDontPropagateList(ClientPtr client) { - register char n; - register long *p; - register int i; + char n; + long *p; + int i; REQUEST(xChangeDeviceDontPropagateListReq); swaps(&stuff->length, n); @@ -104,7 +104,7 @@ SProcXChangeDeviceDontPropagateList(register ClientPtr client) */ int -ProcXChangeDeviceDontPropagateList(register ClientPtr client) +ProcXChangeDeviceDontPropagateList(ClientPtr client) { int i, rc; WindowPtr pWin; diff --git a/Xi/chgptr.c b/Xi/chgptr.c index 22c8a5f5e..a94906866 100644 --- a/Xi/chgptr.c +++ b/Xi/chgptr.c @@ -82,9 +82,9 @@ SOFTWARE. */ int -SProcXChangePointerDevice(register ClientPtr client) +SProcXChangePointerDevice(ClientPtr client) { - register char n; + char n; REQUEST(xChangePointerDeviceReq); swaps(&stuff->length, n); @@ -99,7 +99,7 @@ SProcXChangePointerDevice(register ClientPtr client) */ int -ProcXChangePointerDevice(register ClientPtr client) +ProcXChangePointerDevice(ClientPtr client) { REQUEST(xChangePointerDeviceReq); REQUEST_SIZE_MATCH(xChangePointerDeviceReq); diff --git a/Xi/closedev.c b/Xi/closedev.c index 3d47b5fca..8d38ec8fd 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -77,9 +77,9 @@ SOFTWARE. */ int -SProcXCloseDevice(register ClientPtr client) +SProcXCloseDevice(ClientPtr client) { - register char n; + char n; REQUEST(xCloseDeviceReq); swaps(&stuff->length, n); @@ -141,7 +141,7 @@ DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client) */ int -ProcXCloseDevice(register ClientPtr client) +ProcXCloseDevice(ClientPtr client) { int i; WindowPtr pWin, p1; diff --git a/Xi/devbell.c b/Xi/devbell.c index b11238620..ba873c7c7 100644 --- a/Xi/devbell.c +++ b/Xi/devbell.c @@ -75,9 +75,9 @@ SOFTWARE. */ int -SProcXDeviceBell(register ClientPtr client) +SProcXDeviceBell(ClientPtr client) { - register char n; + char n; REQUEST(xDeviceBellReq); swaps(&stuff->length, n); @@ -91,7 +91,7 @@ SProcXDeviceBell(register ClientPtr client) */ int -ProcXDeviceBell(register ClientPtr client) +ProcXDeviceBell(ClientPtr client) { DeviceIntPtr dev; KbdFeedbackPtr k; diff --git a/Xi/exevents.c b/Xi/exevents.c index 164fce31e..9e71a9e4e 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -104,12 +104,12 @@ RegisterOtherDevice(DeviceIntPtr device) } /*ARGSUSED*/ void -ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) +ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) { - register BYTE *kptr; - register int i; - register CARD16 modifiers; - register CARD16 mask; + BYTE *kptr; + int i; + CARD16 modifiers; + CARD16 mask; GrabPtr grab = other->grab; Bool deactivateDeviceGrab = FALSE; int key = 0, bit = 0, rootX, rootY; @@ -288,7 +288,7 @@ ProcessOtherEvent(xEventPtr xE, register DeviceIntPtr other, int count) _X_EXPORT int InitProximityClassDeviceStruct(DeviceIntPtr dev) { - register ProximityClassPtr proxc; + ProximityClassPtr proxc; proxc = (ProximityClassPtr) xalloc(sizeof(ProximityClassRec)); if (!proxc) @@ -301,7 +301,7 @@ _X_EXPORT void InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, int resolution, int min_res, int max_res) { - register AxisInfoPtr ax; + AxisInfoPtr ax; if (!dev || !dev->valuator) return; @@ -378,7 +378,7 @@ FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v, void DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, - register WindowPtr pWin) + WindowPtr pWin) { deviceFocus event; @@ -703,9 +703,9 @@ MakeInputMasks(WindowPtr pWin) void RecalculateDeviceDeliverableEvents(WindowPtr pWin) { - register InputClientsPtr others; + InputClientsPtr others; struct _OtherInputMasks *inputMasks; /* default: NULL */ - register WindowPtr pChild, tmp; + WindowPtr pChild, tmp; int i; pChild = pWin; @@ -739,9 +739,9 @@ RecalculateDeviceDeliverableEvents(WindowPtr pWin) } int -InputClientGone(register WindowPtr pWin, XID id) +InputClientGone(WindowPtr pWin, XID id) { - register InputClientsPtr other, prev; + InputClientsPtr other, prev; if (!wOtherInputMasks(pWin)) return (Success); @@ -839,7 +839,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, int SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map) { - register int i; + int i; ButtonClassPtr b = dev->button; if (b == NULL) @@ -865,7 +865,7 @@ SetModifierMapping(ClientPtr client, DeviceIntPtr dev, int len, int rlen, { KeyCode *map = NULL; int inputMapLen; - register int i; + int i; *k = dev->key; if (*k == NULL) @@ -1141,7 +1141,7 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, static Mask DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) { - register InputClientsPtr other; + InputClientsPtr other; if (!wOtherInputMasks(pWin)) return 0; @@ -1154,7 +1154,7 @@ DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) } void -MaybeStopDeviceHint(register DeviceIntPtr dev, ClientPtr client) +MaybeStopDeviceHint(DeviceIntPtr dev, ClientPtr client) { WindowPtr pWin; GrabPtr grab = dev->grab; diff --git a/Xi/extinit.c b/Xi/extinit.c index fed54ab37..b1ec321c9 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -216,7 +216,7 @@ static XExtensionVersion thisversion = { XI_Present, */ static int -ProcIDispatch(register ClientPtr client) +ProcIDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data == X_GetExtensionVersion) @@ -305,7 +305,7 @@ ProcIDispatch(register ClientPtr client) */ static int -SProcIDispatch(register ClientPtr client) +SProcIDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data == X_GetExtensionVersion) @@ -464,8 +464,8 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) static void SEventDeviceValuator(deviceValuator * from, deviceValuator * to) { - register char n; - register int i; + char n; + int i; INT32 *ip B32; *to = *from; @@ -480,7 +480,7 @@ SEventDeviceValuator(deviceValuator * from, deviceValuator * to) static void SEventFocus(deviceFocus * from, deviceFocus * to) { - register char n; + char n; *to = *from; swaps(&to->sequenceNumber, n); @@ -491,8 +491,8 @@ SEventFocus(deviceFocus * from, deviceFocus * to) static void SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to) { - register int i; - register char n; + int i; + char n; INT32 *ip B32; *to = *from; @@ -508,7 +508,7 @@ static void SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from, deviceKeyStateNotify * to) { - register char n; + char n; *to = *from; swaps(&to->sequenceNumber, n); @@ -518,7 +518,7 @@ static void SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from, deviceButtonStateNotify * to) { - register char n; + char n; *to = *from; swaps(&to->sequenceNumber, n); @@ -527,7 +527,7 @@ SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from, static void SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to) { - register char n; + char n; *to = *from; swaps(&to->sequenceNumber, n); @@ -537,7 +537,7 @@ SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to) static void SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to) { - register char n; + char n; *to = *from; swaps(&to->sequenceNumber, n); @@ -547,7 +547,7 @@ SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to) static void SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to) { - register char n; + char n; *to = *from; swaps(&to->sequenceNumber,n); diff --git a/Xi/getbmap.c b/Xi/getbmap.c index 32874764b..5e8cf07fb 100644 --- a/Xi/getbmap.c +++ b/Xi/getbmap.c @@ -74,9 +74,9 @@ SOFTWARE. */ int -SProcXGetDeviceButtonMapping(register ClientPtr client) +SProcXGetDeviceButtonMapping(ClientPtr client) { - register char n; + char n; REQUEST(xGetDeviceButtonMappingReq); swaps(&stuff->length, n); @@ -90,7 +90,7 @@ SProcXGetDeviceButtonMapping(register ClientPtr client) */ int -ProcXGetDeviceButtonMapping(register ClientPtr client) +ProcXGetDeviceButtonMapping(ClientPtr client) { DeviceIntPtr dev; xGetDeviceButtonMappingReply rep; @@ -136,7 +136,7 @@ void SRepXGetDeviceButtonMapping(ClientPtr client, int size, xGetDeviceButtonMappingReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/getdctl.c b/Xi/getdctl.c index c264d4f8c..88f061ee0 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -75,9 +75,9 @@ SOFTWARE. */ int -SProcXGetDeviceControl(register ClientPtr client) +SProcXGetDeviceControl(ClientPtr client) { - register char n; + char n; REQUEST(xGetDeviceControlReq); swaps(&stuff->length, n); @@ -96,7 +96,7 @@ static void CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf, int length) { - register char n; + char n; AxisInfoPtr a; xDeviceResolutionState *r; int i, *iptr; @@ -127,7 +127,7 @@ CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf, static void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts, char *buf) { - register char n; + char n; xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf; calib->control = DEVICE_ABS_CALIB; @@ -158,7 +158,7 @@ static void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts, static void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts, char *buf) { - register char n; + char n; xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf; area->control = DEVICE_ABS_AREA; @@ -184,7 +184,7 @@ static void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts, static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf) { - register char n; + char n; xDeviceCoreState *c = (xDeviceCoreState *) buf; c->control = DEVICE_CORE; @@ -201,7 +201,7 @@ static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf) static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf) { - register char n; + char n; xDeviceEnableState *e = (xDeviceEnableState *) buf; e->control = DEVICE_ENABLE; @@ -225,7 +225,7 @@ static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf) void SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -243,7 +243,7 @@ ProcXGetDeviceControl(ClientPtr client) { int total_length = 0; char *buf, *savbuf; - register DeviceIntPtr dev; + DeviceIntPtr dev; xGetDeviceControlReply rep; REQUEST(xGetDeviceControlReq); diff --git a/Xi/getfctl.c b/Xi/getfctl.c index 28360ee54..5ca90dbf0 100644 --- a/Xi/getfctl.c +++ b/Xi/getfctl.c @@ -75,9 +75,9 @@ SOFTWARE. */ int -SProcXGetFeedbackControl(register ClientPtr client) +SProcXGetFeedbackControl(ClientPtr client) { - register char n; + char n; REQUEST(xGetFeedbackControlReq); swaps(&stuff->length, n); @@ -94,7 +94,7 @@ static void CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf) { int i; - register char n; + char n; xKbdFeedbackState *k2; k2 = (xKbdFeedbackState *) * buf; @@ -128,7 +128,7 @@ CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf) static void CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf) { - register char n; + char n; xPtrFeedbackState *p2; p2 = (xPtrFeedbackState *) * buf; @@ -156,7 +156,7 @@ CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf) static void CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf) { - register char n; + char n; xIntegerFeedbackState *i2; i2 = (xIntegerFeedbackState *) * buf; @@ -185,7 +185,7 @@ static void CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf) { int i; - register char n; + char n; xStringFeedbackState *s2; KeySym *kptr; @@ -221,7 +221,7 @@ CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf) static void CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf) { - register char n; + char n; xLedFeedbackState *l2; l2 = (xLedFeedbackState *) * buf; @@ -247,7 +247,7 @@ CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf) static void CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf) { - register char n; + char n; xBellFeedbackState *b2; b2 = (xBellFeedbackState *) * buf; @@ -276,7 +276,7 @@ void SRepXGetFeedbackControl(ClientPtr client, int size, xGetFeedbackControlReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); @@ -295,7 +295,7 @@ ProcXGetFeedbackControl(ClientPtr client) { int total_length = 0; char *buf, *savbuf; - register DeviceIntPtr dev; + DeviceIntPtr dev; KbdFeedbackPtr k; PtrFeedbackPtr p; IntegerFeedbackPtr i; diff --git a/Xi/getfocus.c b/Xi/getfocus.c index 1bcb67321..245b5f1b4 100644 --- a/Xi/getfocus.c +++ b/Xi/getfocus.c @@ -75,9 +75,9 @@ SOFTWARE. */ int -SProcXGetDeviceFocus(register ClientPtr client) +SProcXGetDeviceFocus(ClientPtr client) { - register char n; + char n; REQUEST(xGetDeviceFocusReq); swaps(&stuff->length, n); @@ -138,7 +138,7 @@ ProcXGetDeviceFocus(ClientPtr client) void SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/getkmap.c b/Xi/getkmap.c index 041e2c69f..989f3d57d 100644 --- a/Xi/getkmap.c +++ b/Xi/getkmap.c @@ -76,9 +76,9 @@ SOFTWARE. */ int -SProcXGetDeviceKeyMapping(register ClientPtr client) +SProcXGetDeviceKeyMapping(ClientPtr client) { - register char n; + char n; REQUEST(xGetDeviceKeyMappingReq); swaps(&stuff->length, n); @@ -92,7 +92,7 @@ SProcXGetDeviceKeyMapping(register ClientPtr client) */ int -ProcXGetDeviceKeyMapping(register ClientPtr client) +ProcXGetDeviceKeyMapping(ClientPtr client) { xGetDeviceKeyMappingReply rep; DeviceIntPtr dev; @@ -154,7 +154,7 @@ void SRepXGetDeviceKeyMapping(ClientPtr client, int size, xGetDeviceKeyMappingReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/getmmap.c b/Xi/getmmap.c index e664dc910..038937ef7 100644 --- a/Xi/getmmap.c +++ b/Xi/getmmap.c @@ -75,9 +75,9 @@ SOFTWARE. */ int -SProcXGetDeviceModifierMapping(register ClientPtr client) +SProcXGetDeviceModifierMapping(ClientPtr client) { - register char n; + char n; REQUEST(xGetDeviceModifierMappingReq); swaps(&stuff->length, n); @@ -141,7 +141,7 @@ void SRepXGetDeviceModifierMapping(ClientPtr client, int size, xGetDeviceModifierMappingReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/getprop.c b/Xi/getprop.c index 058c59514..6fa1986f4 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -79,9 +79,9 @@ extern int ExtEventIndex; */ int -SProcXGetDeviceDontPropagateList(register ClientPtr client) +SProcXGetDeviceDontPropagateList(ClientPtr client) { - register char n; + char n; REQUEST(xGetDeviceDontPropagateListReq); swaps(&stuff->length, n); @@ -97,7 +97,7 @@ SProcXGetDeviceDontPropagateList(register ClientPtr client) */ int -ProcXGetDeviceDontPropagateList(register ClientPtr client) +ProcXGetDeviceDontPropagateList(ClientPtr client) { CARD16 count = 0; int i, rc; @@ -187,7 +187,7 @@ void SRepXGetDeviceDontPropagateList(ClientPtr client, int size, xGetDeviceDontPropagateListReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/getselev.c b/Xi/getselev.c index 533c66cd7..9c5f2191c 100644 --- a/Xi/getselev.c +++ b/Xi/getselev.c @@ -77,9 +77,9 @@ SOFTWARE. */ int -SProcXGetSelectedExtensionEvents(register ClientPtr client) +SProcXGetSelectedExtensionEvents(ClientPtr client) { - register char n; + char n; REQUEST(xGetSelectedExtensionEventsReq); swaps(&stuff->length, n); @@ -96,7 +96,7 @@ SProcXGetSelectedExtensionEvents(register ClientPtr client) */ int -ProcXGetSelectedExtensionEvents(register ClientPtr client) +ProcXGetSelectedExtensionEvents(ClientPtr client) { int i, rc, total_length = 0; xGetSelectedExtensionEventsReply rep; @@ -177,7 +177,7 @@ void SRepXGetSelectedExtensionEvents(ClientPtr client, int size, xGetSelectedExtensionEventsReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/getvers.c b/Xi/getvers.c index c5f1750be..b3f4c1c67 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -76,9 +76,9 @@ XExtensionVersion AllExtensionVersions[128]; */ int -SProcXGetExtensionVersion(register ClientPtr client) +SProcXGetExtensionVersion(ClientPtr client) { - register char n; + char n; REQUEST(xGetExtensionVersionReq); swaps(&stuff->length, n); @@ -94,7 +94,7 @@ SProcXGetExtensionVersion(register ClientPtr client) */ int -ProcXGetExtensionVersion(register ClientPtr client) +ProcXGetExtensionVersion(ClientPtr client) { xGetExtensionVersionReply rep; @@ -136,7 +136,7 @@ void SRepXGetExtensionVersion(ClientPtr client, int size, xGetExtensionVersionReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 3af2346e3..e2809efb1 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -79,11 +79,11 @@ extern int ExtEventIndex; */ int -SProcXGrabDevice(register ClientPtr client) +SProcXGrabDevice(ClientPtr client) { - register char n; - register long *p; - register int i; + char n; + long *p; + int i; REQUEST(xGrabDeviceReq); swaps(&stuff->length, n); @@ -202,7 +202,7 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count, void SRepXGrabDevice(ClientPtr client, int size, xGrabDeviceReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c index 4333550f1..df62d0c69 100644 --- a/Xi/grabdevb.c +++ b/Xi/grabdevb.c @@ -77,11 +77,11 @@ SOFTWARE. */ int -SProcXGrabDeviceButton(register ClientPtr client) +SProcXGrabDeviceButton(ClientPtr client) { - register char n; - register long *p; - register int i; + char n; + long *p; + int i; REQUEST(xGrabDeviceButtonReq); swaps(&stuff->length, n); diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c index 71e72d56f..b74592f19 100644 --- a/Xi/grabdevk.c +++ b/Xi/grabdevk.c @@ -77,11 +77,11 @@ SOFTWARE. */ int -SProcXGrabDeviceKey(register ClientPtr client) +SProcXGrabDeviceKey(ClientPtr client) { - register char n; - register long *p; - register int i; + char n; + long *p; + int i; REQUEST(xGrabDeviceKeyReq); swaps(&stuff->length, n); diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index 435ab0bfd..cfc7f89f3 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -75,9 +75,9 @@ SOFTWARE. */ int -SProcXGetDeviceMotionEvents(register ClientPtr client) +SProcXGetDeviceMotionEvents(ClientPtr client) { - register char n; + char n; REQUEST(xGetDeviceMotionEventsReq); swaps(&stuff->length, n); @@ -162,7 +162,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); if (nEvents) { if (client->swapped) { - register char n; + char n; bufptr = coords; for (i = 0; i < nEvents * (axes + 1); i++) { @@ -188,7 +188,7 @@ void SRepXGetDeviceMotionEvents(ClientPtr client, int size, xGetDeviceMotionEventsReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/listdev.c b/Xi/listdev.c index 257ee59bc..160ad02fb 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -77,9 +77,9 @@ SOFTWARE. */ int -SProcXListInputDevices(register ClientPtr client) +SProcXListInputDevices(ClientPtr client) { - register char n; + char n; REQUEST(xListInputDevicesReq); swaps(&stuff->length, n); @@ -144,9 +144,9 @@ CopyDeviceName(char **namebuf, char *name) */ static void -CopySwapButtonClass(register ClientPtr client, ButtonClassPtr b, char **buf) +CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf) { - register char n; + char n; xButtonInfoPtr b2; b2 = (xButtonInfoPtr) * buf; @@ -166,10 +166,10 @@ CopySwapButtonClass(register ClientPtr client, ButtonClassPtr b, char **buf) */ static void -CopySwapDevice(register ClientPtr client, DeviceIntPtr d, int num_classes, +CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, char **buf) { - register char n; + char n; xDeviceInfoPtr dev; dev = (xDeviceInfoPtr) * buf; @@ -200,9 +200,9 @@ CopySwapDevice(register ClientPtr client, DeviceIntPtr d, int num_classes, */ static void -CopySwapKeyClass(register ClientPtr client, KeyClassPtr k, char **buf) +CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) { - register char n; + char n; xKeyInfoPtr k2; k2 = (xKeyInfoPtr) * buf; @@ -230,10 +230,10 @@ CopySwapKeyClass(register ClientPtr client, KeyClassPtr k, char **buf) */ static int -CopySwapValuatorClass(register ClientPtr client, ValuatorClassPtr v, char **buf) +CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf) { int i, j, axes, t_axes; - register char n; + char n; xValuatorInfoPtr v2; AxisInfo *a; xAxisInfoPtr a2; @@ -305,7 +305,7 @@ ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev, */ int -ProcXListInputDevices(register ClientPtr client) +ProcXListInputDevices(ClientPtr client) { xListInputDevicesReply rep; int numdevs = 0; @@ -367,7 +367,7 @@ ProcXListInputDevices(register ClientPtr client) void SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/opendev.c b/Xi/opendev.c index 636106815..4b7b6a64f 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -79,9 +79,9 @@ extern CARD8 event_base[]; */ int -SProcXOpenDevice(register ClientPtr client) +SProcXOpenDevice(ClientPtr client) { - register char n; + char n; REQUEST(xOpenDeviceReq); swaps(&stuff->length, n); @@ -95,7 +95,7 @@ SProcXOpenDevice(register ClientPtr client) */ int -ProcXOpenDevice(register ClientPtr client) +ProcXOpenDevice(ClientPtr client) { xInputClassInfo evbase[numInputClasses]; Bool enableit = FALSE; @@ -179,7 +179,7 @@ ProcXOpenDevice(register ClientPtr client) void SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/queryst.c b/Xi/queryst.c index c4cc5a2e6..972cd2c80 100644 --- a/Xi/queryst.c +++ b/Xi/queryst.c @@ -58,9 +58,9 @@ from The Open Group. */ int -SProcXQueryDeviceState(register ClientPtr client) +SProcXQueryDeviceState(ClientPtr client) { - register char n; + char n; REQUEST(xQueryDeviceStateReq); swaps(&stuff->length, n); @@ -74,9 +74,9 @@ SProcXQueryDeviceState(register ClientPtr client) */ int -ProcXQueryDeviceState(register ClientPtr client) +ProcXQueryDeviceState(ClientPtr client) { - register char n; + char n; int i; int num_classes = 0; int total_length = 0; @@ -187,7 +187,7 @@ ProcXQueryDeviceState(register ClientPtr client) void SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/selectev.c b/Xi/selectev.c index 8c893ca1e..d52db1b81 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -128,11 +128,11 @@ HandleDevicePresenceMask(ClientPtr client, WindowPtr win, */ int -SProcXSelectExtensionEvent(register ClientPtr client) +SProcXSelectExtensionEvent(ClientPtr client) { - register char n; - register long *p; - register int i; + char n; + long *p; + int i; REQUEST(xSelectExtensionEventReq); swaps(&stuff->length, n); @@ -154,7 +154,7 @@ SProcXSelectExtensionEvent(register ClientPtr client) */ int -ProcXSelectExtensionEvent(register ClientPtr client) +ProcXSelectExtensionEvent(ClientPtr client) { int ret; int i; diff --git a/Xi/sendexev.c b/Xi/sendexev.c index c2763bb22..eac9abe14 100644 --- a/Xi/sendexev.c +++ b/Xi/sendexev.c @@ -80,11 +80,11 @@ extern int lastEvent; /* Defined in extension.c */ */ int -SProcXSendExtensionEvent(register ClientPtr client) +SProcXSendExtensionEvent(ClientPtr client) { - register char n; - register long *p; - register int i; + char n; + long *p; + int i; xEvent eventT; xEvent *eventP; EventSwapPtr proc; @@ -119,7 +119,7 @@ SProcXSendExtensionEvent(register ClientPtr client) */ int -ProcXSendExtensionEvent(register ClientPtr client) +ProcXSendExtensionEvent(ClientPtr client) { int ret; DeviceIntPtr dev; diff --git a/Xi/setbmap.c b/Xi/setbmap.c index 14b1689f5..bdfa513dd 100644 --- a/Xi/setbmap.c +++ b/Xi/setbmap.c @@ -78,9 +78,9 @@ SOFTWARE. */ int -SProcXSetDeviceButtonMapping(register ClientPtr client) +SProcXSetDeviceButtonMapping(ClientPtr client) { - register char n; + char n; REQUEST(xSetDeviceButtonMappingReq); swaps(&stuff->length, n); @@ -94,7 +94,7 @@ SProcXSetDeviceButtonMapping(register ClientPtr client) */ int -ProcXSetDeviceButtonMapping(register ClientPtr client) +ProcXSetDeviceButtonMapping(ClientPtr client) { int ret; xSetDeviceButtonMappingReply rep; @@ -149,7 +149,7 @@ void SRepXSetDeviceButtonMapping(ClientPtr client, int size, xSetDeviceButtonMappingReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/setdval.c b/Xi/setdval.c index 958b2ac21..e947a749a 100644 --- a/Xi/setdval.c +++ b/Xi/setdval.c @@ -75,9 +75,9 @@ SOFTWARE. */ int -SProcXSetDeviceValuators(register ClientPtr client) +SProcXSetDeviceValuators(ClientPtr client) { - register char n; + char n; REQUEST(xSetDeviceValuatorsReq); swaps(&stuff->length, n); @@ -91,7 +91,7 @@ SProcXSetDeviceValuators(register ClientPtr client) */ int -ProcXSetDeviceValuators(register ClientPtr client) +ProcXSetDeviceValuators(ClientPtr client) { DeviceIntPtr dev; xSetDeviceValuatorsReply rep; @@ -152,7 +152,7 @@ void SRepXSetDeviceValuators(ClientPtr client, int size, xSetDeviceValuatorsReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/setfocus.c b/Xi/setfocus.c index 59fe0768c..aaf88ce6f 100644 --- a/Xi/setfocus.c +++ b/Xi/setfocus.c @@ -78,9 +78,9 @@ SOFTWARE. */ int -SProcXSetDeviceFocus(register ClientPtr client) +SProcXSetDeviceFocus(ClientPtr client) { - register char n; + char n; REQUEST(xSetDeviceFocusReq); swaps(&stuff->length, n); @@ -97,10 +97,10 @@ SProcXSetDeviceFocus(register ClientPtr client) */ int -ProcXSetDeviceFocus(register ClientPtr client) +ProcXSetDeviceFocus(ClientPtr client) { int ret; - register DeviceIntPtr dev; + DeviceIntPtr dev; REQUEST(xSetDeviceFocusReq); REQUEST_SIZE_MATCH(xSetDeviceFocusReq); diff --git a/Xi/setmmap.c b/Xi/setmmap.c index 645f246bd..00784995a 100644 --- a/Xi/setmmap.c +++ b/Xi/setmmap.c @@ -76,9 +76,9 @@ SOFTWARE. */ int -SProcXSetDeviceModifierMapping(register ClientPtr client) +SProcXSetDeviceModifierMapping(ClientPtr client) { - register char n; + char n; REQUEST(xSetDeviceModifierMappingReq); swaps(&stuff->length, n); @@ -145,7 +145,7 @@ void SRepXSetDeviceModifierMapping(ClientPtr client, int size, xSetDeviceModifierMappingReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/setmode.c b/Xi/setmode.c index 11feb6d32..688f2a226 100644 --- a/Xi/setmode.c +++ b/Xi/setmode.c @@ -75,9 +75,9 @@ SOFTWARE. */ int -SProcXSetDeviceMode(register ClientPtr client) +SProcXSetDeviceMode(ClientPtr client) { - register char n; + char n; REQUEST(xSetDeviceModeReq); swaps(&stuff->length, n); @@ -91,7 +91,7 @@ SProcXSetDeviceMode(register ClientPtr client) */ int -ProcXSetDeviceMode(register ClientPtr client) +ProcXSetDeviceMode(ClientPtr client) { DeviceIntPtr dev; xSetDeviceModeReply rep; @@ -139,7 +139,7 @@ ProcXSetDeviceMode(register ClientPtr client) void SRepXSetDeviceMode(ClientPtr client, int size, xSetDeviceModeReply * rep) { - register char n; + char n; swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); diff --git a/Xi/stubs.c b/Xi/stubs.c index e2ed1ceff..ed041b815 100644 --- a/Xi/stubs.c +++ b/Xi/stubs.c @@ -168,7 +168,7 @@ OpenInputDevice(DeviceIntPtr dev, ClientPtr client, int *status) */ int -SetDeviceMode(register ClientPtr client, DeviceIntPtr dev, int mode) +SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode) { return BadMatch; } @@ -186,7 +186,7 @@ SetDeviceMode(register ClientPtr client, DeviceIntPtr dev, int mode) */ int -SetDeviceValuators(register ClientPtr client, DeviceIntPtr dev, +SetDeviceValuators(ClientPtr client, DeviceIntPtr dev, int *valuators, int first_valuator, int num_valuators) { return BadMatch; @@ -201,7 +201,7 @@ SetDeviceValuators(register ClientPtr client, DeviceIntPtr dev, */ int -ChangeDeviceControl(register ClientPtr client, DeviceIntPtr dev, +ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, xDeviceCtl * control) { switch (control->control) { diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c index 980fa9339..0abbd2e80 100644 --- a/Xi/ungrdev.c +++ b/Xi/ungrdev.c @@ -74,9 +74,9 @@ SOFTWARE. */ int -SProcXUngrabDevice(register ClientPtr client) +SProcXUngrabDevice(ClientPtr client) { - register char n; + char n; REQUEST(xUngrabDeviceReq); swaps(&stuff->length, n); @@ -92,7 +92,7 @@ SProcXUngrabDevice(register ClientPtr client) */ int -ProcXUngrabDevice(register ClientPtr client) +ProcXUngrabDevice(ClientPtr client) { DeviceIntPtr dev; GrabPtr grab; diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c index 8db9307ce..b9f236b76 100644 --- a/Xi/ungrdevb.c +++ b/Xi/ungrdevb.c @@ -80,9 +80,9 @@ SOFTWARE. */ int -SProcXUngrabDeviceButton(register ClientPtr client) +SProcXUngrabDeviceButton(ClientPtr client) { - register char n; + char n; REQUEST(xUngrabDeviceButtonReq); swaps(&stuff->length, n); diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c index ebb83bce7..d316990b2 100644 --- a/Xi/ungrdevk.c +++ b/Xi/ungrdevk.c @@ -80,9 +80,9 @@ SOFTWARE. */ int -SProcXUngrabDeviceKey(register ClientPtr client) +SProcXUngrabDeviceKey(ClientPtr client) { - register char n; + char n; REQUEST(xUngrabDeviceKeyReq); swaps(&stuff->length, n); diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am index 17d27ed39..41dc5d210 100644 --- a/hw/dmx/Makefile.am +++ b/hw/dmx/Makefile.am @@ -2,7 +2,6 @@ DIST_SUBDIRS = input config glxProxy examples doc SUBDIRS = input config examples bin_PROGRAMS = Xdmx -noinst_LIBRARIES = libfbcmap.a if XINERAMA PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c @@ -17,6 +16,9 @@ GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod \ GLX_DEFS = @GL_CFLAGS@ endif +# It's essential that fbcmap.c be compiled with this flag for DMX to work!! +DMX_CFLAGS = -DXFree86Server=1 + if BUILDDOCS SUBDIRS += doc endif @@ -26,11 +28,9 @@ AM_CFLAGS = \ $(DIX_CFLAGS) \ $(GLX_INCS) \ $(GLX_DEFS) \ + $(DMX_CFLAGS) \ @DMXMODULES_CFLAGS@ -libfbcmap_a_SOURCES = libfbcmap.a -libfbcmap_a_CFLAGS = $(AM_CFLAGS) -DXFree86Server - Xdmx_SOURCES = dmx.c \ dmxcb.c \ dmxcb.h \ @@ -76,6 +76,7 @@ Xdmx_SOURCES = dmx.c \ dmxwindow.c \ dmxwindow.h \ $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/fb/fbcmap.c \ $(GLX_SRCS) @@ -89,7 +90,6 @@ Xdmx_LDADD = $(XORG_CORE_LIBS) \ $(GLX_LIBS) \ input/libdmxinput.a \ config/libdmxconfig.a \ - libfbcmap.a \ @DMXMODULES_LIBS@ # Man page diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c index e74a05215..11c89d822 100644 --- a/hw/dmx/dmxcursor.c +++ b/hw/dmx/dmxcursor.c @@ -130,14 +130,16 @@ static Bool dmxCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) int globalX; int globalY; - if (screenInfo.numScreens == 1) return FALSE; + if (screenInfo.numScreens == 1) + return FALSE; /* On current screen? */ dmxScreen = &dmxScreens[(*ppScreen)->myNum]; if (localX >= 0 && localX < dmxScreen->rootWidth && localY >= 0 - && localY < dmxScreen->rootHeight) return FALSE; + && localY < dmxScreen->rootHeight) + return FALSE; /* Convert to global coordinate space */ globalX = dmxScreen->rootXOrigin + localX; @@ -162,7 +164,8 @@ static Bool dmxCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) && globalX < dmxScreen->rootXOrigin + dmxScreen->rootWidth && globalY >= dmxScreen->rootYOrigin && globalY < dmxScreen->rootYOrigin + dmxScreen->rootHeight) { - if (dmxScreen->index == (*ppScreen)->myNum) return FALSE; + if (dmxScreen->index == (*ppScreen)->myNum) + return FALSE; *ppScreen = screenInfo.screens[dmxScreen->index]; *x = globalX - dmxScreen->rootXOrigin; *y = globalY - dmxScreen->rootYOrigin; @@ -179,7 +182,12 @@ static void dmxCrossScreen(ScreenPtr pScreen, Bool entering) static void dmxWarpCursor(ScreenPtr pScreen, int x, int y) { DMXDBG3("dmxWarpCursor(%d,%d,%d)\n", pScreen->myNum, x, y); +#if 11 /*BP*/ + /* This call is depracated. Replace with???? */ miPointerWarpCursor(pScreen, x, y); +#else + pScreen->SetCursorPosition(pScreen, x, y, FALSE); +#endif } miPointerScreenFuncRec dmxPointerCursorFuncs = @@ -187,7 +195,7 @@ miPointerScreenFuncRec dmxPointerCursorFuncs = dmxCursorOffScreen, dmxCrossScreen, dmxWarpCursor, - dmxeqEnqueue, + dmxeqEnqueue, /*XXX incompatible type/function! */ dmxeqSwitchScreen }; @@ -198,7 +206,8 @@ static int *dmxSLCreate(void) int *list = malloc(dmxNumScreens * sizeof(*list)); int i; - for (i = 0; i < dmxNumScreens; i++) list[i] = 1; + for (i = 0; i < dmxNumScreens; i++) + list[i] = 1; return list; } @@ -212,7 +221,9 @@ static void dmxSLFree(int *list) static int dmxSLFindNext(int *list) { int i; - for (i = 0; i < dmxNumScreens; i++) if (list[i]) return i; + for (i = 0; i < dmxNumScreens; i++) + if (list[i]) + return i; return -1; } @@ -225,7 +236,8 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) int changed = 0; for (i = 0; i < dmxNumScreens; i++) { - if (!screensLeft[i]) continue; + if (!screensLeft[i]) + continue; screen = &dmxScreens[i]; switch (screen->where) { case PosAbsolute: @@ -235,14 +247,16 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) break; case PosRelative: ref = screen->whereRefScreen; - if (screensLeft[ref]) break; + if (screensLeft[ref]) + break; dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->whereX; dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->whereY; ++changed, screensLeft[i] = 0; break; case PosRightOf: ref = screen->whereRefScreen; - if (screensLeft[ref]) break; + if (screensLeft[ref]) + break; pScreen = screenInfo.screens[ref]; dixScreenOrigins[i].x = dixScreenOrigins[ref].x + pScreen->width; dixScreenOrigins[i].y = dixScreenOrigins[ref].y; @@ -250,7 +264,8 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) break; case PosLeftOf: ref = screen->whereRefScreen; - if (screensLeft[ref]) break; + if (screensLeft[ref]) + break; pScreen = screenInfo.screens[i]; dixScreenOrigins[i].x = dixScreenOrigins[ref].x - pScreen->width; dixScreenOrigins[i].y = dixScreenOrigins[ref].y; @@ -258,7 +273,8 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) break; case PosBelow: ref = screen->whereRefScreen; - if (screensLeft[ref]) break; + if (screensLeft[ref]) + break; pScreen = screenInfo.screens[ref]; dixScreenOrigins[i].x = dixScreenOrigins[ref].x; dixScreenOrigins[i].y = dixScreenOrigins[ref].y + pScreen->height; @@ -266,7 +282,8 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) break; case PosAbove: ref = screen->whereRefScreen; - if (screensLeft[ref]) break; + if (screensLeft[ref]) + break; pScreen = screenInfo.screens[i]; dixScreenOrigins[i].x = dixScreenOrigins[ref].x; dixScreenOrigins[i].y = dixScreenOrigins[ref].y - pScreen->height; @@ -308,8 +325,10 @@ static void dmxComputeScreenOrigins(void) minX = dixScreenOrigins[0].x; minY = dixScreenOrigins[0].y; for (i = 1; i < dmxNumScreens; i++) { /* Compute minX, minY */ - if (dixScreenOrigins[i].x < minX) minX = dixScreenOrigins[i].x; - if (dixScreenOrigins[i].y < minY) minY = dixScreenOrigins[i].y; + if (dixScreenOrigins[i].x < minX) + minX = dixScreenOrigins[i].x; + if (dixScreenOrigins[i].y < minY) + minY = dixScreenOrigins[i].y; } if (minX || minY) { for (i = 0; i < dmxNumScreens; i++) { @@ -411,28 +430,36 @@ int dmxOnScreen(int x, int y, DMXScreenInfo *dmxScreen) static int dmxDoesOverlap(DMXScreenInfo *a, DMXScreenInfo *b) { if (dmxOnScreen(a->rootXOrigin, - a->rootYOrigin, b)) return 1; + a->rootYOrigin, b)) + return 1; if (dmxOnScreen(a->rootXOrigin, - a->rootYOrigin + a->scrnWidth, b)) return 1; + a->rootYOrigin + a->scrnWidth, b)) + return 1; if (dmxOnScreen(a->rootXOrigin + a->scrnHeight, - a->rootYOrigin, b)) return 1; + a->rootYOrigin, b)) + return 1; if (dmxOnScreen(a->rootXOrigin + a->scrnHeight, - a->rootYOrigin + a->scrnWidth, b)) return 1; + a->rootYOrigin + a->scrnWidth, b)) + return 1; if (dmxOnScreen(b->rootXOrigin, - b->rootYOrigin, a)) return 1; + b->rootYOrigin, a)) + return 1; if (dmxOnScreen(b->rootXOrigin, - b->rootYOrigin + b->scrnWidth, a)) return 1; + b->rootYOrigin + b->scrnWidth, a)) + return 1; if (dmxOnScreen(b->rootXOrigin + b->scrnHeight, - b->rootYOrigin, a)) return 1; + b->rootYOrigin, a)) + return 1; if (dmxOnScreen(b->rootXOrigin + b->scrnHeight, - b->rootYOrigin + b->scrnWidth, a)) return 1; + b->rootYOrigin + b->scrnWidth, a)) + return 1; return 0; } @@ -476,7 +503,8 @@ static void *dmxTestSameDisplay(DMXScreenInfo *a, void *closure) { DMXScreenInfo *b = closure; - if (a == b) return a; + if (a == b) + return a; return NULL; } @@ -489,14 +517,16 @@ void dmxInitOverlap(void) int i, j; DMXScreenInfo *a, *b, *pt; - for (i = 0; i < dmxNumScreens; i++) dmxScreens[i].over = NULL; + for (i = 0; i < dmxNumScreens; i++) + dmxScreens[i].over = NULL; for (i = 0; i < dmxNumScreens; i++) { a = &dmxScreens[i]; for (j = i+1; j < dmxNumScreens; j++) { b = &dmxScreens[j]; - if (b->over) continue; + if (b->over) + continue; if (dmxDoesOverlap(a, b)) { DMXDBG6("%d overlaps %d: a=%p %p b=%p %p\n", @@ -510,7 +540,8 @@ void dmxInitOverlap(void) for (i = 0; i < dmxNumScreens; i++) { a = &dmxScreens[i]; - if (!a->over) continue; + if (!a->over) + continue; /* Flag all pairs that are on same display */ for (pt = a->over; pt != a; pt = pt->over) { @@ -521,7 +552,8 @@ void dmxInitOverlap(void) * screens that mutually overlap on the backend display, * so we call dmxDoesOverlap, which is stricter than the * ->over set. */ - if (!dmxDoesOverlap(a, pt)) continue; + if (!dmxDoesOverlap(a, pt)) + continue; a->cursorNotShared = 1; pt->cursorNotShared = 1; dmxLog(dmxInfo, @@ -731,9 +763,11 @@ static Bool dmxRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) return _dmxRealizeCursor(pScreen, pCursor); for (pt = start->over; /* condition at end of loop */; pt = pt->over) { - if (pt->cursorNotShared) continue; + if (pt->cursorNotShared) + continue; _dmxRealizeCursor(screenInfo.screens[pt->index], pCursor); - if (pt == start) break; + if (pt == start) + break; } return TRUE; } @@ -747,9 +781,11 @@ static Bool dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) return _dmxUnrealizeCursor(pScreen, pCursor); for (pt = start->over; /* condition at end of loop */; pt = pt->over) { - if (pt->cursorNotShared) continue; + if (pt->cursorNotShared) + continue; _dmxUnrealizeCursor(screenInfo.screens[pt->index], pCursor); - if (pt == start) break; + if (pt == start) + break; } return TRUE; } @@ -758,10 +794,13 @@ static CursorPtr dmxFindCursor(DMXScreenInfo *start) { DMXScreenInfo *pt; - if (!start || !start->over) return GetSpriteCursor(); + if (!start || !start->over) + return GetSpriteCursor(); for (pt = start->over; /* condition at end of loop */; pt = pt->over) { - if (pt->cursor) return pt->cursor; - if (pt == start) break; + if (pt->cursor) + return pt->cursor; + if (pt == start) + break; } return GetSpriteCursor(); } @@ -769,7 +808,12 @@ static CursorPtr dmxFindCursor(DMXScreenInfo *start) /** Move the cursor to coordinates (\a x, \a y)on \a pScreen. This * function is usually called via #dmxPointerSpriteFuncs, except during * reconfiguration when the cursor is repositioned to force an update on - * newley overlapping screens and on screens that no longer overlap. */ + * newley overlapping screens and on screens that no longer overlap. + * + * The coords (x,y) are in global coord space. We'll loop over the + * back-end screens and see if they contain the global coord. If so, call + * _dmxMoveCursor() (XWarpPointer) to position the pointer on that screen. + */ void dmxMoveCursor(ScreenPtr pScreen, int x, int y) { DMXScreenInfo *start = &dmxScreens[pScreen->myNum]; @@ -783,7 +827,8 @@ void dmxMoveCursor(ScreenPtr pScreen, int x, int y) } for (pt = start->over; /* condition at end of loop */; pt = pt->over) { - if (pt->cursorNotShared) continue; + if (pt->cursorNotShared) + continue; if (dmxOnScreen(x + start->rootXOrigin, y + start->rootYOrigin, pt)) { if (/* pt != start && */ !pt->cursorVisible) { if (!pt->cursor) { @@ -811,7 +856,8 @@ void dmxMoveCursor(ScreenPtr pScreen, int x, int y) x + start->rootXOrigin - pt->rootXOrigin, y + start->rootYOrigin - pt->rootYOrigin); } - if (pt == start) break; + if (pt == start) + break; } } @@ -851,7 +897,8 @@ static void dmxSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) } for (pt = start->over; /* condition at end of loop */; pt = pt->over) { - if (pt->cursorNotShared) continue; + if (pt->cursorNotShared) + continue; if (dmxOnScreen(x + start->rootXOrigin, y + start->rootYOrigin, pt)) { _dmxSetCursor(screenInfo.screens[pt->index], pCursor, x + start->rootXOrigin - pt->rootXOrigin, @@ -861,7 +908,8 @@ static void dmxSetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y) x + start->rootXOrigin - pt->rootXOrigin, y + start->rootYOrigin - pt->rootYOrigin); } - if (pt == start) break; + if (pt == start) + break; } } @@ -896,8 +944,13 @@ void dmxCheckCursor(void) pScreen = screenInfo.screens[dmxScreen->index]; if (!dmxOnScreen(x, y, dmxScreen)) { +#if 00 if (firstScreen && i == miPointerCurrentScreen()->myNum) miPointerSetNewScreen(firstScreen->index, x, y); +#else + if (firstScreen && i == miPointerGetScreen(inputInfo.pointer)->myNum) + miPointerSetScreen(inputInfo.pointer, firstScreen->index, x, y); +#endif _dmxSetCursor(pScreen, NULL, x - dmxScreen->rootXOrigin, y - dmxScreen->rootYOrigin); diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c index 37f458356..f47899c2f 100644 --- a/hw/dmx/dmxinput.c +++ b/hw/dmx/dmxinput.c @@ -49,6 +49,7 @@ #include "inputstr.h" #include "input.h" +#include "mi.h" /** Returns TRUE if the key is a valid modifier. For PC-class * keyboards, all keys can be used as modifiers, so return TRUE @@ -75,6 +76,8 @@ void InitInput(int argc, char **argv) dmxLog(dmxWarning, "Use keyboard/mouse pair with the first -input\n"); dmxLog(dmxFatal, "At least one core keyboard/mouse pair required\n"); } + + mieqInit(); } /** Called from dix/dispatch.c in Dispatch() whenever input events diff --git a/hw/dmx/input/dmxbackend.c b/hw/dmx/input/dmxbackend.c index 8985a1b1d..48de4c9a8 100644 --- a/hw/dmx/input/dmxbackend.c +++ b/hw/dmx/input/dmxbackend.c @@ -242,7 +242,11 @@ static int dmxBackendOffscreen(int screen, int x, int y) void dmxBackendUpdatePosition(pointer private, int x, int y) { GETPRIVFROMPRIVATE; +#if 00 /*BP*/ int screen = miPointerCurrentScreen()->myNum; +#else + int screen = miPointerGetScreen(inputInfo.pointer)->myNum; +#endif DMXScreenInfo *dmxScreen = &dmxScreens[priv->myScreen]; int oldRelative = priv->relative; int topscreen = dmxBackendFindOverlapping(priv, screen, x, y); @@ -391,6 +395,7 @@ void dmxBackendCollectEvents(DevicePtr pDev, } break; case MotionNotify: +#if 00 /*BP*/ DMXDBG9("dmxBackendCollectEvents: MotionNotify %d/%d (mi %d)" " newscreen=%d: %d %d (e=%d; last=%d,%d)\n", dmxScreen->index, priv->myScreen, @@ -443,12 +448,26 @@ void dmxBackendCollectEvents(DevicePtr pDev, (dmxScreen->rootYOrigin + X.xmotion.y - dmxScreen->rootY)); } +#else + /* + ErrorF("motion %d, %d, %d\n", + X.xmotion.x, X.xmotion.y, X.xmotion.state); + */ + enqueue(priv->mou, X.type, 0/*X.xbutton.button*/, 0, &X, block); +#endif break; case KeyPress: case KeyRelease: enqueue(priv->kbd, X.type, X.xkey.keycode, 0, NULL, block); break; +#if 11/*BP*/ + case ButtonPress: + case ButtonRelease: + /* + ErrorF("press/release at %d, %d\n", X.xbutton.x, X.xbutton.y); + */ +#endif default: /* Pass the whole event here, because * this may be an extension event. */ diff --git a/hw/dmx/input/dmxevents.c b/hw/dmx/input/dmxevents.c index 5316f0fdc..90b45a9b9 100644 --- a/hw/dmx/input/dmxevents.c +++ b/hw/dmx/input/dmxevents.c @@ -56,6 +56,7 @@ #include "opaque.h" #include "inputstr.h" #include "mipointer.h" +#include "mi.h" #ifdef XINPUT #include "XIstubs.h" @@ -216,11 +217,20 @@ void dmxCoreMotion(int x, int y, int delta, DMXBlockType block) if ((dmxScreen = dmxFindFirstScreen(dmxGlobalX, dmxGlobalY))) { localX = dmxGlobalX - dmxScreen->rootXOrigin; localY = dmxGlobalY - dmxScreen->rootYOrigin; +#if 00 /*BP*/ if ((pScreen = miPointerCurrentScreen()) +#else + if ((pScreen = miPointerGetScreen(inputInfo.pointer)) +#endif && pScreen->myNum == dmxScreen->index) { /* Screen is old screen */ if (block) dmxSigioBlock(); +#if 00 /*BP*/ miPointerAbsoluteCursor(localX, localY, GetTimeInMillis()); +#else + miPointerSetPosition(inputInfo.pointer, &localX, &localY, + GetTimeInMillis()); +#endif if (block) dmxSigioUnblock(); } else { /* Screen is new */ @@ -228,13 +238,28 @@ void dmxCoreMotion(int x, int y, int delta, DMXBlockType block) pScreen->myNum, dmxScreen->index, localX, localY); if (block) dmxSigioBlock(); dmxeqProcessInputEvents(); +#if 00 /*BP*/ miPointerSetNewScreen(dmxScreen->index, localX, localY); miPointerAbsoluteCursor(localX, localY, GetTimeInMillis()); +#else + miPointerSetScreen(inputInfo.pointer, dmxScreen->index, + localX, localY); + miPointerSetPosition(inputInfo.pointer, &localX, &localY, + GetTimeInMillis()); +#endif if (block) dmxSigioUnblock(); } +#if 00 /*BP*/ miPointerPosition(&localX, &localY); +#else + miPointerGetPosition(inputInfo.pointer, &localX, &localY); +#endif +#if 00 /*BP*/ if ((pScreen = miPointerCurrentScreen())) { +#else + if ((pScreen = miPointerGetScreen(inputInfo.pointer))) { +#endif dmxGlobalX = localX + dmxScreens[pScreen->myNum].rootXOrigin; dmxGlobalY = localY + dmxScreens[pScreen->myNum].rootYOrigin; DMXDBG6(" Moved to dmxGlobalX=%d dmxGlobalY=%d" @@ -604,16 +629,87 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, return; if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard) xE.u.u.detail = dmxFixup(pDev, detail, keySym); +#if 11/*BP*/ + { + DeviceIntPtr p = dmxLocal->pDevice; + int i, nevents; + xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + nevents = GetKeyboardEvents(events, + /*pDev*/p, + /*KeyPress*/type, + /*n*/detail); + /* + ErrorF("NEW KEY EVENT %d n=%d\n", detail, nevents); + */ + for (i = 0; i < nevents; i++) + mieqEnqueue(p, events + i); + xfree(events); + return; + } +#endif break; case ButtonPress: case ButtonRelease: +#if 00 /*BP*/ detail = dmxGetButtonMapping(dmxLocal, detail); +#else + { + DeviceIntPtr p = dmxLocal->pDevice; + int i, nevents, valuators[3]; + xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + valuators[0] = e->xbutton.x; + valuators[1] = e->xbutton.y; + valuators[2] = e->xbutton.button; + nevents = GetPointerEvents(events, + /*pDev*/p, + /*KeyPress*/type, + detail, + POINTER_ABSOLUTE, + 0, 0, valuators); + /* + ErrorF("NEW PTR EVENT %d (%d,%d,%d) n=%d\n", + detail, valuators[0], valuators[1], valuators[2], + nevents); + */ + for (i = 0; i < nevents; i++) + mieqEnqueue(p, events + i); + xfree(events); + return; + } +#endif break; case MotionNotify: /* All MotionNotify events should be sent via dmxCoreMotion and * dmxExtMotion -- no input driver should build motion events by * hand. */ +#if 00 /*BP*/ dmxLog(dmxError, "dmxEnqueueXEvent: MotionNotify not allowed here\n"); +#else + { + DeviceIntPtr p = dmxLocal->pDevice; + int i, nevents, valuators[3]; + xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + valuators[0] = e->xmotion.x; + valuators[1] = e->xmotion.y; + valuators[2] = e->xmotion.state; + nevents = GetPointerEvents(events, + /*pDev*/p, + /*KeyPress*/type, + detail, + POINTER_ABSOLUTE, + 0, 0, valuators); + /* + ErrorF("NEW MOTION %d st %d (%d,%d,%d) n=%d\n", + detail, e->xmotion.state, + valuators[0], valuators[1], valuators[2], + nevents); + */ + for (i = 0; i < nevents; i++) + mieqEnqueue(p, events + i); + xfree(events); + return; + } +#endif break; /* Always ignore these events */ case EnterNotify: @@ -623,6 +719,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, * modifier map on the backend/console * input device so that we have complete * control of the input device LEDs. */ + ErrorF("Enter/Leave/Keymap/Mapping\n"); return; default: #ifdef XINPUT @@ -652,7 +749,16 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, if (!dmxLocal->sendsCore) dmxEnqueueExtEvent(dmxLocal, &xE, block); else #endif +#if 00 /*BP*/ dmxeqEnqueue(&xE); +#else + /* never get here! */ + if (0) { + DeviceIntPtr p = dmxLocal->pDevice; + ErrorF("enque %d\n", type); + mieqEnqueue(p, &xE); + } +#endif } /** A pointer to this routine is passed to low-level input drivers so diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c index 0519d2b72..7c0ae58a7 100644 --- a/hw/dmx/input/dmxinputinit.c +++ b/hw/dmx/input/dmxinputinit.c @@ -72,6 +72,7 @@ #include "input.h" #include "mipointer.h" #include "windowstr.h" +#include "mi.h" #ifdef XINPUT #include <X11/extensions/XI.h> @@ -222,6 +223,57 @@ static DMXLocalInputInfoRec DMXLocalDevices[] = { { NULL } /* Must be last */ }; + +#if 11 /*BP*/ +void +DDXRingBell(int volume, int pitch, int duration) +{ + /* NO-OP */ +} + +/* taken from kdrive/src/kinput.c: */ +static void +dmxKbdCtrl (DeviceIntPtr pDevice, KeybdCtrl *ctrl) +{ +#if 0 + KdKeyboardInfo *ki; + + for (ki = kdKeyboards; ki; ki = ki->next) { + if (ki->dixdev && ki->dixdev->id == pDevice->id) + break; + } + + if (!ki || !ki->dixdev || ki->dixdev->id != pDevice->id || !ki->driver) + return; + + KdSetLeds(ki, ctrl->leds); + ki->bellPitch = ctrl->bell_pitch; + ki->bellDuration = ctrl->bell_duration; +#endif +} + +/* taken from kdrive/src/kinput.c: */ +static void +dmxBell(int volume, DeviceIntPtr pDev, pointer arg, int something) +{ +#if 0 + KeybdCtrl *ctrl = arg; + KdKeyboardInfo *ki = NULL; + + for (ki = kdKeyboards; ki; ki = ki->next) { + if (ki->dixdev && ki->dixdev->id == pDev->id) + break; + } + + if (!ki || !ki->dixdev || ki->dixdev->id != pDev->id || !ki->driver) + return; + + KdRingBell(ki, volume, ctrl->bell_pitch, ctrl->bell_duration); +#endif +} + +#endif /*BP*/ + static void _dmxChangePointerControl(DMXLocalInputInfoPtr dmxLocal, PtrCtrl *ctrl) { @@ -427,7 +479,15 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) break; } if (info.keyClass) { +#if 00 /*BP*/ InitKeyClassDeviceStruct(pDevice, &info.keySyms, info.modMap); +#else + DevicePtr pDev = (DevicePtr) pDevice; + InitKeyboardDeviceStruct(pDev, + &info.keySyms, + info.modMap, + dmxBell, dmxKbdCtrl); +#endif } if (info.buttonClass) { InitButtonClassDeviceStruct(pDevice, info.numButtons, info.map); @@ -435,8 +495,13 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what) if (info.valuatorClass) { if (info.numRelAxes && dmxLocal->sendsCore) { InitValuatorClassDeviceStruct(pDevice, info.numRelAxes, +#if 00 /*BP*/ miPointerGetMotionEvents, miPointerGetMotionBufferSize(), +#else + GetMotionHistory, + GetMaximumEventsNum(), +#endif Relative); #ifdef XINPUT for (i = 0; i < info.numRelAxes; i++) @@ -520,12 +585,26 @@ static void dmxProcessInputEvents(DMXInputInfo *dmxInput) { int i; + /* + ErrorF("%s\n", __FUNCTION__); + */ + dmxeqProcessInputEvents(); +#if 00 /*BP*/ miPointerUpdate(); +#endif if (dmxInput->detached) return; for (i = 0; i < dmxInput->numDevs; i += dmxInput->devs[i]->binding) - if (dmxInput->devs[i]->process_input) + if (dmxInput->devs[i]->process_input) { +#if 11 /*BP*/ + miPointerUpdateSprite(dmxInput->devs[i]->pDevice); +#endif dmxInput->devs[i]->process_input(dmxInput->devs[i]->private); + } + +#if 11 /*BP*/ + mieqProcessInputEvents(); +#endif } static void dmxUpdateWindowInformation(DMXInputInfo *dmxInput, @@ -710,8 +789,13 @@ static DeviceIntPtr dmxAddDevice(DMXLocalInputInfoPtr dmxLocal) registerProcPtr(pDevice); - if (dmxLocal->isCore && dmxLocal->type == DMX_LOCAL_MOUSE) + if (dmxLocal->isCore && dmxLocal->type == DMX_LOCAL_MOUSE) { +#if 00 /*BP*/ miRegisterPointerDevice(screenInfo.screens[0], pDevice); +#else + /* Nothing? dmxDeviceOnOff() should get called to init, right? */ +#endif + } if (dmxLocal->create_private) dmxLocal->private = dmxLocal->create_private(pDevice); diff --git a/hw/dmx/input/dmxxinput.c b/hw/dmx/input/dmxxinput.c index 81d1cfbe6..ad2a77c9c 100644 --- a/hw/dmx/input/dmxxinput.c +++ b/hw/dmx/input/dmxxinput.c @@ -99,9 +99,13 @@ int ChangePointerDevice(DeviceIntPtr old_dev, } dmxLocalNew->savedMotionProc = new_dev->valuator->GetMotionProc; dmxLocalNew->savedMotionEvents = new_dev->valuator->numMotionEvents; +#if 00 /*BP*/ new_dev->valuator->GetMotionProc = miPointerGetMotionEvents; new_dev->valuator->numMotionEvents = miPointerGetMotionBufferSize(); - +#else + new_dev->valuator->GetMotionProc = GetMotionHistory; + new_dev->valuator->numMotionEvents = GetMaximumEventsNum(); +#endif /* Switch our notion of core pointer */ dmxLocalOld->isCore = 0; dmxLocalOld->sendsCore = dmxLocalOld->savedSendsCore; diff --git a/hw/dmx/input/lnx-keyboard.c b/hw/dmx/input/lnx-keyboard.c index 97cc3077e..b09492b89 100644 --- a/hw/dmx/input/lnx-keyboard.c +++ b/hw/dmx/input/lnx-keyboard.c @@ -164,7 +164,9 @@ #include <sys/kd.h> #include <termios.h> #include "atKeynames.h" +#if 00 #include "xf86Keymap.h" +#endif #include <linux/keyboard.h> #define NUM_AT2LNX (sizeof(at2lnx) / sizeof(at2lnx[0])) @@ -800,7 +802,12 @@ static void kbdLinuxReadKernelMapping(int fd, KeySymsPtr pKeySyms) tbl[2] = 8; /* alt */ tbl[3] = tbl[2] | 1; +#if 00/*BP*/ k = map+GLYPHS_PER_KEY; +#else + ErrorF("kbdLinuxReadKernelMapping() is broken/no-op'd\n"); + return; +#endif maxkey = NUM_AT2LNX; for (i = 0; i < maxkey; ++i) { @@ -927,8 +934,13 @@ static void kbdLinuxGetMap(DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap) char type; int i; +#if 00/*BP*/ mapCopy = xalloc(sizeof(map)); memcpy(mapCopy, map, sizeof(map)); +#else + ErrorF("kbdLinuxGetMap() is broken/no-op'd\n"); + return; +#endif kbdLinuxReadKernelMapping(priv->fd, pKeySyms); diff --git a/hw/xfree86/ddc/edid_modes.c b/hw/xfree86/ddc/edid_modes.c index cfc8ddc13..926bc8921 100644 --- a/hw/xfree86/ddc/edid_modes.c +++ b/hw/xfree86/ddc/edid_modes.c @@ -107,6 +107,19 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, { DisplayModePtr Mode; + /* + * Refuse to create modes that are insufficiently large. 64 is a random + * number, maybe the spec says something about what the minimum is. In + * particular I see this frequently with _old_ EDID, 1.0 or so, so maybe + * our parser is just being too aggresive there. + */ + if (timing->h_active < 64 || timing->v_active < 64) { + xf86DrvMsg(scrnIndex, X_INFO, + "%s: Ignoring tiny %dx%d mode\n", __func__, + timing->h_active, timing->v_active); + return NULL; + } + /* We don't do stereo */ if (timing->stereo) { xf86DrvMsg(scrnIndex, X_INFO, diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index c4cf6870b..7a8ec1935 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -197,6 +197,19 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, { DisplayModePtr Mode; + /* + * Refuse to create modes that are insufficiently large. 64 is a random + * number, maybe the spec says something about what the minimum is. In + * particular I see this frequently with _old_ EDID, 1.0 or so, so maybe + * our parser is just being too aggresive there. + */ + if (timing->h_active < 64 || timing->v_active < 64) { + xf86DrvMsg(scrnIndex, X_INFO, + "%s: Ignoring tiny %dx%d mode\n", __func__, + timing->h_active, timing->v_active); + return NULL; + } + /* We don't do stereo */ if (timing->stereo) { xf86DrvMsg(scrnIndex, X_INFO, diff --git a/hw/xfree86/xaa/xaaDashLine.c b/hw/xfree86/xaa/xaaDashLine.c index 2a94a9e6c..1a4732baa 100644 --- a/hw/xfree86/xaa/xaaDashLine.c +++ b/hw/xfree86/xaa/xaaDashLine.c @@ -35,7 +35,7 @@ XAAPolyLinesDashed( #endif ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGCIndex].ptr; + XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr; BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip); int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip); unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c index e22081103..f3434c9f4 100644 --- a/hw/xfree86/xaa/xaaGC.c +++ b/hw/xfree86/xaa/xaaGC.c @@ -38,7 +38,7 @@ Bool XAACreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; - XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGCIndex].ptr); + XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr); Bool ret; XAA_SCREEN_PROLOGUE(pScreen,CreateGC); diff --git a/hw/xfree86/xaa/xaaGCmisc.c b/hw/xfree86/xaa/xaaGCmisc.c index f7bd576f1..a7a3f4081 100644 --- a/hw/xfree86/xaa/xaaGCmisc.c +++ b/hw/xfree86/xaa/xaaGCmisc.c @@ -305,7 +305,7 @@ XAAValidatePolylines( DrawablePtr pDraw ) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGCIndex].ptr; + XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr; if(pGC->lineStyle == LineSolid) changes &= ~GCDashList; if(!changes) return; diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c index 79a0e4ceb..529dbd151 100644 --- a/hw/xfree86/xaa/xaaInit.c +++ b/hw/xfree86/xaa/xaaInit.c @@ -42,14 +42,9 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet); static void XAAEnableDisableFBAccess (int index, Bool enable); static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask); -/* - * XXX These three should be static, but that breaks ABI compat with XF4.4 - * and Xorg 6.7.0 modules. DO NOT use them in new code, you should never - * be setting them, and you've got Get functions below. - */ -int XAAScreenIndex = -1; -int XAAGCIndex = -1; -int XAAPixmapIndex = -1; +static int XAAScreenIndex = -1; +static int XAAGCIndex = -1; +static int XAAPixmapIndex = -1; static unsigned long XAAGeneration = 0; diff --git a/hw/xfree86/xaa/xaaLineMisc.c b/hw/xfree86/xaa/xaaLineMisc.c index d786737af..537b08b97 100644 --- a/hw/xfree86/xaa/xaaLineMisc.c +++ b/hw/xfree86/xaa/xaaLineMisc.c @@ -64,7 +64,7 @@ void XAAComputeDash(GCPtr pGC) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGCIndex].ptr; + XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr; Bool EvenDash = (pGC->numInDashList & 0x01) ? FALSE : TRUE; int PatternLength = 0; unsigned char* DashPtr = (unsigned char*)pGC->dash; diff --git a/hw/xfree86/xaa/xaaWrapper.c b/hw/xfree86/xaa/xaaWrapper.c index 5b525684a..6d8107b61 100644 --- a/hw/xfree86/xaa/xaaWrapper.c +++ b/hw/xfree86/xaa/xaaWrapper.c @@ -522,7 +522,7 @@ void XAASync(ScreenPtr pScreen) { XAAScreenPtr pScreenPriv = - (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr; + (XAAScreenPtr) pScreen->devPrivates[XAAGetScreenIndex()].ptr; XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec; if(infoRec->NeedToSync) { diff --git a/hw/xfree86/xaa/xaalocal.h b/hw/xfree86/xaa/xaalocal.h index 7210d8492..c365a7de3 100644 --- a/hw/xfree86/xaa/xaalocal.h +++ b/hw/xfree86/xaa/xaalocal.h @@ -1640,9 +1640,6 @@ XAAGetPixelFromRGBA ( extern GCOps XAAFallbackOps; extern GCOps *XAAGetFallbackOps(void); extern GCFuncs XAAGCFuncs; -extern int XAAScreenIndex; /* XXX DONTUSE */ -extern int XAAGCIndex; /* XXX DONTUSE */ -extern int XAAPixmapIndex; /* XXX DONTUSE */ extern int XAAGetScreenIndex(void); extern int XAAGetGCIndex(void); extern int XAAGetPixmapIndex(void); diff --git a/os/WaitFor.c b/os/WaitFor.c index d39964f30..4a606ac7d 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -125,7 +125,7 @@ struct _OsTimerRec { }; static void DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev); -static void CheckAllTimers(CARD32 now); +static void CheckAllTimers(void); static OsTimerPtr timers = NULL; /***************** @@ -204,7 +204,7 @@ WaitForSomething(int *pClientsReady) timeout = timers->expires - now; if (timeout > 0 && timeout > timers->delta + 250) { /* time has rewound. reset the timers. */ - CheckAllTimers(now); + CheckAllTimers(); } if (timers) { @@ -436,11 +436,14 @@ ANYSET(FdMask *src) /* If time has rewound, re-run every affected timer. * Timers might drop out of the list, so we have to restart every time. */ static void -CheckAllTimers(CARD32 now) +CheckAllTimers(void) { OsTimerPtr timer; + CARD32 now; start: + now = GetTimeInMillis(); + for (timer = timers; timer; timer = timer->next) { if (timer->expires - now > timer->delta + 250) { TimerForce(timer); |