grunwald%kazoo.cs.uiuc.edu@A.CS.UIUC.EDU (Dirk Grunwald) (12/24/88)
Gcc 1.32/vax no patches, runing no Vaxstation 3200, Ultrix 2.3. Program is X11R3/server/dix/events.c, expanded version appended at end. The killing option is -finline-functions. GDB backtrace follows. (gdb) run -finline-functions -O -version FOO.c The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/local/Gnu/lib/gcc-cc1 -finline-functions -O -version FOO.c GNU C version 1.32 (vax) compiled by GNU C version 1.32. GetNextEventMask SetMaskForEvent SyntheticMotion CheckPhysLimits Program received signal 11, SIGSEGV 0x452b3 in output_operand (x=(rtx) 0xc55e4, code=0) (final.c line 1270) (gdb) where #0 0x452b3 in output_operand (x=(rtx) 0xc55e4, code=0) (final.c line 1270) #1 0x45190 in output_asm_insn (template=(char *) 0x4c5c9 "movw %1,%0", operands=(rtx *) 0x57be4) (final.c line 1221) #2 0x44b3c in final (first=(rtx) 0xc3dcc, file=(struct _iobuf *) 0x5b444, write_symbols=NO_DEBUG, optimize=1, prescan=0) (final.c line 785) #3 0x11666 in rest_of_compilation (decl=(tree) 0xc34a0) (toplev.c line 1436) #4 0xad01 in finish_function () (c-decl.c line 3430) #5 0x37a3 in yyparse () (c-parse.y line 244) #6 0x10ac2 in compile_file (name=(caddr_t) 0x7fffe27a "FOO.c") (toplev.c line 963) #7 0x11d3d in main (argc=5, argv=(caddr_t *) 0x7fffe1f8, envp=(caddr_t *) 0x7fffe210) (toplev.c line 1691) ---FOO.c--- # 1 "events.c" # 1 "../.././X11/X.h" typedef unsigned long XID; typedef XID Window; typedef XID Drawable; typedef XID Font; typedef XID Pixmap; typedef XID Cursor; typedef XID Colormap; typedef XID GContext; typedef XID KeySym; typedef unsigned long Mask; typedef unsigned long Atom; typedef unsigned long VisualID; typedef unsigned long Time; typedef unsigned char KeyCode; # 311 "../.././X11/X.h" # 28 "events.c" # 1 "../include/misc.h" extern unsigned long globalSerialNumber; typedef unsigned char *pointer; typedef int Bool; typedef unsigned long PIXEL; typedef unsigned long ATOM; # 1 "../include/os.h" # 1 "../include/misc.h" # 117 "../include/misc.h" # 29 "../include/os.h" typedef pointer FID; typedef struct _FontPathRec *FontPathPtr; typedef struct _NewClientRec *NewClientPtr; # 69 "../include/os.h" char *alloca(); # 92 "../include/os.h" char *ReadRequestFromClient(); char *strcat(); char *strncat(); char *strcpy(); char *strncpy(); Bool CloseDownConnection(); FontPathPtr GetFontPath(); FontPathPtr ExpandFontNamePattern(); FID FiOpenForRead(); void CreateWellKnownSockets(); void SetDefaultFontPath(); void FreeFontRecord(); void SetFontPath(); void ErrorF(); void Error(); void FatalError(); void ProcessCommandLine(); void Xfree(); void FlushAllOutput(); void FlushIfCriticalOutputPending(); unsigned long *Xalloc(); unsigned long *Xrealloc(); long GetTimeInMillis(); # 58 "../include/misc.h" typedef struct _DDXPoint *DDXPointPtr; typedef struct _Box *BoxPtr; # 29 "events.c" # 1 "../include/resource.h" # 1 "../include/misc.h" # 117 "../include/misc.h" # 27 "../include/resource.h" unsigned short CreateNewResourceType(); short CreateNewResourceClass(); unsigned long FakeClientID(); void AddResource(); void FreeResource(); void FreeClientResources(); pointer LookupID(); # 30 "events.c" # 1 "../.././X11/Xproto.h" # 1 "../.././X11/Xmd.h" typedef long INT32; typedef short INT16; typedef char INT8; typedef unsigned long CARD32; typedef unsigned short CARD16; typedef unsigned char CARD8; typedef unsigned long BITS32; typedef unsigned short BITS16; typedef unsigned char BYTE; typedef unsigned char BOOL; # 53 "../.././X11/Xproto.h" # 1 "../.././X11/Xprotostr.h" # 1 "../.././X11/Xmd.h" # 139 "../.././X11/Xmd.h" # 28 "../.././X11/Xprotostr.h" typedef struct _xSegment { INT16 x1 , y1 , x2 , y2 ; } xSegment; typedef struct _xPoint { INT16 x , y ; } xPoint; typedef struct _xRectangle { INT16 x , y ; CARD16 width , height ; } xRectangle; typedef struct _xArc { INT16 x , y ; CARD16 width , height ; INT16 angle1 , angle2 ; } xArc; # 54 "../.././X11/Xproto.h" typedef CARD16 KeyButMask; typedef struct { CARD8 byteOrder; BYTE pad; CARD16 majorVersion , minorVersion ; CARD16 nbytesAuthProto ; CARD16 nbytesAuthString ; CARD16 pad2; } xConnClientPrefix; typedef struct { BOOL success; BYTE lengthReason; CARD16 majorVersion , minorVersion ; CARD16 length ; } xConnSetupPrefix; typedef struct { CARD32 release ; CARD32 ridBase , ridMask ; CARD32 motionBufferSize ; CARD16 nbytesVendor ; CARD16 maxRequestSize ; CARD8 numRoots; CARD8 numFormats; CARD8 imageByteOrder; CARD8 bitmapBitOrder; CARD8 bitmapScanlineUnit, bitmapScanlinePad; CARD8 minKeyCode, maxKeyCode; CARD32 pad2 ; } xConnSetup; typedef struct { CARD8 depth; CARD8 bitsPerPixel; CARD8 scanLinePad; CARD8 pad1; CARD32 pad2 ; } xPixmapFormat; typedef struct { CARD8 depth; CARD8 pad1; CARD16 nVisuals ; CARD32 pad2 ; } xDepth; typedef struct { CARD32 visualID ; CARD8 class; CARD8 bitsPerRGB; CARD16 colormapEntries ; CARD32 redMask , greenMask , blueMask ; CARD32 pad ; } xVisualType; typedef struct { CARD32 windowId ; CARD32 defaultColormap ; CARD32 whitePixel , blackPixel ; CARD32 currentInputMask ; CARD16 pixWidth , pixHeight ; CARD16 mmWidth , mmHeight ; CARD16 minInstalledMaps , maxInstalledMaps ; CARD32 rootVisualID ; CARD8 backingStore; BOOL saveUnders; CARD8 rootDepth; CARD8 nDepths; } xWindowRoot; typedef struct { CARD32 time ; INT16 x , y ; } xTimecoord; typedef struct { CARD8 family; BYTE pad; CARD16 length ; } xHostEntry; typedef struct { INT16 leftSideBearing , rightSideBearing , characterWidth , ascent , descent ; CARD16 attributes ; } xCharInfo; typedef struct { CARD32 name ; CARD32 value ; } xFontProp; typedef struct { CARD8 len; INT8 delta; } xTextElt; typedef struct { CARD32 pixel ; CARD16 red , green , blue ; CARD8 flags; CARD8 pad; } xColorItem; typedef struct { CARD16 red , green , blue , pad ; } xrgb; typedef CARD8 KEYCODE; typedef struct { BYTE type; BYTE data1; CARD16 sequenceNumber ; CARD32 length ; CARD32 data00 ; CARD32 data01 ; CARD32 data02 ; CARD32 data03 ; CARD32 data04 ; CARD32 data05 ; } xGenericReply; typedef struct { BYTE type; CARD8 backingStore; CARD16 sequenceNumber ; CARD32 length ; CARD32 visualID ; CARD16 class ; CARD8 bitGravity; CARD8 winGravity; CARD32 backingBitPlanes ; CARD32 backingPixel ; BOOL saveUnder; BOOL mapInstalled; CARD8 mapState; BOOL override; CARD32 colormap ; CARD32 allEventMasks ; CARD32 yourEventMask ; CARD16 doNotPropagateMask ; CARD16 pad ; } xGetWindowAttributesReply; typedef struct { BYTE type; CARD8 depth; CARD16 sequenceNumber ; CARD32 length ; CARD32 root ; INT16 x , y ; CARD16 width , height ; CARD16 borderWidth ; CARD16 pad1 ; CARD32 pad2 ; CARD32 pad3 ; } xGetGeometryReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 root , parent ; CARD16 nChildren ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xQueryTreeReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 atom ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xInternAtomReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nameLength ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetAtomNameReply; typedef struct { BYTE type; CARD8 format; CARD16 sequenceNumber ; CARD32 length ; CARD32 propertyType ; CARD32 bytesAfter ; CARD32 nItems ; CARD32 pad1 ; CARD32 pad2 ; CARD32 pad3 ; } xGetPropertyReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nProperties ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListPropertiesReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 owner ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetSelectionOwnerReply; typedef struct { BYTE type; BYTE status; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad1 ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGrabPointerReply; typedef xGrabPointerReply xGrabKeyboardReply; typedef struct { BYTE type; BOOL sameScreen; CARD16 sequenceNumber ; CARD32 length ; CARD32 root , child ; INT16 rootX , rootY , winX , winY ; CARD16 mask ; CARD16 pad1 ; CARD32 pad ; } xQueryPointerReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 nEvents ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetMotionEventsReply; typedef struct { BYTE type; BOOL sameScreen; CARD16 sequenceNumber ; CARD32 length ; CARD32 child ; INT16 dstX , dstY ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xTranslateCoordsReply; typedef struct { BYTE type; CARD8 revertTo; CARD16 sequenceNumber ; CARD32 length ; CARD32 focus ; CARD32 pad1 ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xGetInputFocusReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; BYTE map[32]; } xQueryKeymapReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; xCharInfo minBounds; CARD32 walign1 ; xCharInfo maxBounds; CARD32 walign2 ; CARD16 minCharOrByte2 , maxCharOrByte2 ; CARD16 defaultChar ; CARD16 nFontProps ; CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent , fontDescent ; CARD32 nCharInfos ; } xQueryFontReply; typedef struct { BYTE type; CARD8 drawDirection; CARD16 sequenceNumber ; CARD32 length ; INT16 fontAscent , fontDescent ; INT16 overallAscent , overallDescent ; INT32 overallWidth , overallLeft , overallRight ; CARD32 pad ; } xQueryTextExtentsReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nFonts ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListFontsReply; typedef struct { BYTE type; CARD8 nameLength; CARD16 sequenceNumber ; CARD32 length ; xCharInfo minBounds; CARD32 walign1 ; xCharInfo maxBounds; CARD32 walign2 ; CARD16 minCharOrByte2 , maxCharOrByte2 ; CARD16 defaultChar ; CARD16 nFontProps ; CARD8 drawDirection; CARD8 minByte1, maxByte1; BOOL allCharsExist; INT16 fontAscent , fontDescent ; CARD32 nReplies ; } xListFontsWithInfoReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nPaths ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetFontPathReply; typedef struct { BYTE type; CARD8 depth; CARD16 sequenceNumber ; CARD32 length ; CARD32 visual ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetImageReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nColormaps ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListInstalledColormapsReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 red , green , blue ; CARD16 pad2 ; CARD32 pixel ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xAllocColorReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD32 pixel ; CARD16 exactRed , exactGreen , exactBlue ; CARD16 screenRed , screenGreen , screenBlue ; CARD32 pad2 ; CARD32 pad3 ; } xAllocNamedColorReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nPixels , nMasks ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xAllocColorCellsReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nPixels ; CARD16 pad2 ; CARD32 redMask , greenMask , blueMask ; CARD32 pad3 ; CARD32 pad4 ; } xAllocColorPlanesReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 nColors ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xQueryColorsReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 exactRed , exactGreen , exactBlue ; CARD16 screenRed , screenGreen , screenBlue ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; } xLookupColorReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 width , height ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xQueryBestSizeReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; BOOL present; CARD8 major_opcode; CARD8 first_event; CARD8 first_error; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xQueryExtensionReply; typedef struct { BYTE type; CARD8 nExtensions; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListExtensionsReply; typedef struct { BYTE type; CARD8 success; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xSetMappingReply; typedef xSetMappingReply xSetPointerMappingReply; typedef xSetMappingReply xSetModifierMappingReply; typedef struct { BYTE type; CARD8 nElts; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetPointerMappingReply; typedef struct { BYTE type; CARD8 keySymsPerKeyCode; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xGetKeyboardMappingReply; typedef struct { BYTE type; CARD8 numKeyPerModifier; CARD16 sequenceNumber ; CARD32 length ; CARD32 pad1 ; CARD32 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetModifierMappingReply; typedef struct { BYTE type; BOOL globalAutoRepeat; CARD16 sequenceNumber ; CARD32 length ; CARD32 ledMask ; CARD8 keyClickPercent, bellPercent; CARD16 bellPitch , bellDuration ; CARD16 pad ; BYTE map[32]; } xGetKeyboardControlReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 accelNumerator , accelDenominator ; CARD16 threshold ; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetPointerControlReply; typedef struct { BYTE type; BYTE pad1; CARD16 sequenceNumber ; CARD32 length ; CARD16 timeout , interval ; BOOL preferBlanking; BOOL allowExposures; CARD16 pad2 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; } xGetScreenSaverReply; typedef struct { BYTE type; BOOL enabled; CARD16 sequenceNumber ; CARD32 length ; CARD16 nHosts ; CARD16 pad1 ; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xListHostsReply; typedef struct { BYTE type; BYTE errorCode; CARD16 sequenceNumber ; CARD32 resourceID ; CARD16 minorCode ; CARD8 majorCode; BYTE pad1; CARD32 pad3 ; CARD32 pad4 ; CARD32 pad5 ; CARD32 pad6 ; CARD32 pad7 ; } xError; typedef struct { union { struct { BYTE type; BYTE detail; CARD16 sequenceNumber ; } u; struct { CARD32 pad00 ; CARD32 time ; CARD32 root , event , child ; INT16 rootX , rootY , eventX , eventY ; KeyButMask state ; BOOL sameScreen; BYTE pad1; } keyButtonPointer; struct { CARD32 pad00 ; CARD32 time ; CARD32 root , event , child ; INT16 rootX , rootY , eventX , eventY ; KeyButMask state ; BYTE mode; BYTE flags; } enterLeave; struct { CARD32 pad00 ; CARD32 window ; BYTE mode; BYTE pad1, pad2, pad3; } focus; struct { CARD32 pad00 ; CARD32 window ; CARD16 x , y , width , height ; CARD16 count ; CARD16 pad2 ; } expose; struct { CARD32 pad00 ; CARD32 drawable ; CARD16 x , y , width , height ; CARD16 minorEvent ; CARD16 count ; BYTE majorEvent; BYTE pad1, pad2, pad3; } graphicsExposure; struct { CARD32 pad00 ; CARD32 drawable ; CARD16 minorEvent ; BYTE majorEvent; BYTE bpad; } noExposure; struct { CARD32 pad00 ; CARD32 window ; CARD8 state; BYTE pad1, pad2, pad3; } visibility; struct { CARD32 pad00 ; CARD32 parent , window ; INT16 x , y ; CARD16 width , height , borderWidth ; BOOL override; BYTE bpad; } createNotify; struct { CARD32 pad00 ; CARD32 event , window ; } destroyNotify; struct { CARD32 pad00 ; CARD32 event , window ; BOOL fromConfigure; BYTE pad1, pad2, pad3; } unmapNotify; struct { CARD32 pad00 ; CARD32 event , window ; BOOL override; BYTE pad1, pad2, pad3; } mapNotify; struct { CARD32 pad00 ; CARD32 parent , window ; } mapRequest; struct { CARD32 pad00 ; CARD32 event , window , parent ; INT16 x , y ; BOOL override; BYTE pad1, pad2, pad3; } reparent; struct { CARD32 pad00 ; CARD32 event , window , aboveSibling ; INT16 x , y ; CARD16 width , height , borderWidth ; BOOL override; BYTE bpad; } configureNotify; struct { CARD32 pad00 ; CARD32 parent , window , sibling ; INT16 x , y ; CARD16 width , height , borderWidth ; CARD16 valueMask ; CARD32 pad1 ; } configureRequest; struct { CARD32 pad00 ; CARD32 event , window ; INT16 x , y ; CARD32 pad1, pad2, pad3, pad4; } gravity; struct { CARD32 pad00 ; CARD32 window ; CARD16 width , height ; } resizeRequest; struct { CARD32 pad00 ; CARD32 event , window , parent ; BYTE place; BYTE pad1, pad2, pad3; } circulate; struct { CARD32 pad00 ; CARD32 window ; CARD32 atom ; CARD32 time ; BYTE state; BYTE pad1; CARD16 pad2 ; } property; struct { CARD32 pad00 ; CARD32 time ; CARD32 window ; CARD32 atom ; } selectionClear; struct { CARD32 pad00 ; CARD32 time ; CARD32 owner , requestor ; CARD32 selection , target , property ; } selectionRequest; struct { CARD32 pad00 ; CARD32 time ; CARD32 requestor ; CARD32 selection , target , property ; } selectionNotify; struct { CARD32 pad00 ; CARD32 window ; CARD32 colormap ; BOOL new; BYTE state; BYTE pad1, pad2; } colormap; struct { CARD32 pad00 ; CARD8 request; CARD8 firstKeyCode; CARD8 count; BYTE pad1; } mappingNotify; struct { CARD32 pad00 ; CARD32 window ; union { struct { CARD32 type ; INT32 longs0 ; INT32 longs1 ; INT32 longs2 ; INT32 longs3 ; INT32 longs4 ; } l; struct { CARD32 type ; INT16 shorts0 ; INT16 shorts1 ; INT16 shorts2 ; INT16 shorts3 ; INT16 shorts4 ; INT16 shorts5 ; INT16 shorts6 ; INT16 shorts7 ; INT16 shorts8 ; INT16 shorts9 ; } s; struct { CARD32 type ; INT8 bytes[20]; } b; } u; } clientMessage; } u; } xEvent; typedef struct { BYTE type; BYTE map[31]; } xKeymapEvent; typedef union { xGenericReply generic; xGetGeometryReply geom; xQueryTreeReply tree; xInternAtomReply atom; xGetAtomNameReply atomName; xGetPropertyReply property; xListPropertiesReply listProperties; xGetSelectionOwnerReply selection; xGrabPointerReply grabPointer; xGrabKeyboardReply grabKeyboard; xQueryPointerReply pointer; xGetMotionEventsReply motionEvents; xTranslateCoordsReply coords; xGetInputFocusReply inputFocus; xQueryTextExtentsReply textExtents; xListFontsReply fonts; xGetFontPathReply fontPath; xGetImageReply image; xListInstalledColormapsReply colormaps; xAllocColorReply allocColor; xAllocNamedColorReply allocNamedColor; xAllocColorCellsReply colorCells; xAllocColorPlanesReply colorPlanes; xQueryColorsReply colors; xLookupColorReply lookupColor; xQueryBestSizeReply bestSize; xQueryExtensionReply extension; xListExtensionsReply extensions; xSetModifierMappingReply setModifierMapping; xGetModifierMappingReply getModifierMapping; xSetPointerMappingReply setPointerMapping; xGetKeyboardMappingReply getKeyboardMapping; xGetPointerMappingReply getPointerMapping; xGetPointerControlReply pointerControl; xGetScreenSaverReply screenSaver; xListHostsReply hosts; xError error; xEvent event; } xReply; typedef struct { CARD8 reqType; CARD8 data; CARD16 length ; } xReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 id ; } xResourceReq; typedef struct { CARD8 reqType; CARD8 depth; CARD16 length ; CARD32 wid , parent ; INT16 x , y ; CARD16 width , height , borderWidth ; CARD16 class ; CARD32 visual ; CARD32 mask ; } xCreateWindowReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD32 valueMask ; } xChangeWindowAttributesReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length ; CARD32 window ; } xChangeSaveSetReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window , parent ; INT16 x , y ; } xReparentWindowReq; typedef struct { CARD8 reqType; CARD8 pad; CARD16 length ; CARD32 window ; CARD16 mask ; CARD16 pad2 ; } xConfigureWindowReq; typedef struct { CARD8 reqType; CARD8 direction; CARD16 length ; CARD32 window ; } xCirculateWindowReq; typedef struct { CARD8 reqType; BOOL onlyIfExists; CARD16 length ; CARD16 nbytes ; CARD16 pad ; } xInternAtomReq; typedef struct { CARD8 reqType; CARD8 mode; CARD16 length ; CARD32 window ; CARD32 property , type ; CARD8 format; BYTE pad[3]; CARD32 nUnits ; } xChangePropertyReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD32 property ; } xDeletePropertyReq; typedef struct { CARD8 reqType; BOOL delete; CARD16 length ; CARD32 window ; CARD32 property , type ; CARD32 longOffset ; CARD32 longLength ; } xGetPropertyReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD32 selection ; CARD32 time ; } xSetSelectionOwnerReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 requestor ; CARD32 selection , target , property ; CARD32 time ; } xConvertSelectionReq; typedef struct { CARD8 reqType; BOOL propagate; CARD16 length ; CARD32 destination ; CARD32 eventMask ; xEvent event; } xSendEventReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length ; CARD32 grabWindow ; CARD16 eventMask ; BYTE pointerMode, keyboardMode; CARD32 confineTo ; CARD32 cursor ; CARD32 time ; } xGrabPointerReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length ; CARD32 grabWindow ; CARD16 eventMask ; BYTE pointerMode, keyboardMode; CARD32 confineTo ; CARD32 cursor ; CARD8 button; BYTE pad; CARD16 modifiers ; } xGrabButtonReq; typedef struct { CARD8 reqType; CARD8 button; CARD16 length ; CARD32 grabWindow ; CARD16 modifiers ; CARD16 pad ; } xUngrabButtonReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cursor ; CARD32 time ; CARD16 eventMask ; CARD16 pad2 ; } xChangeActivePointerGrabReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length ; CARD32 grabWindow ; CARD32 time ; BYTE pointerMode, keyboardMode; CARD16 pad ; } xGrabKeyboardReq; typedef struct { CARD8 reqType; BOOL ownerEvents; CARD16 length ; CARD32 grabWindow ; CARD16 modifiers ; CARD8 key; BYTE pointerMode, keyboardMode; BYTE pad1, pad2, pad3; } xGrabKeyReq; typedef struct { CARD8 reqType; CARD8 key; CARD16 length ; CARD32 grabWindow ; CARD16 modifiers ; CARD16 pad ; } xUngrabKeyReq; typedef struct { CARD8 reqType; CARD8 mode; CARD16 length ; CARD32 time ; } xAllowEventsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD32 start , stop ; } xGetMotionEventsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcWid , dstWid ; INT16 srcX , srcY ; } xTranslateCoordsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcWid , dstWid ; INT16 srcX , srcY ; CARD16 srcWidth , srcHeight ; INT16 dstX , dstY ; } xWarpPointerReq; typedef struct { CARD8 reqType; CARD8 revertTo; CARD16 length ; CARD32 focus ; CARD32 time ; } xSetInputFocusReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 fid ; CARD16 nbytes ; BYTE pad1, pad2; } xOpenFontReq; typedef struct { CARD8 reqType; BOOL oddLength; CARD16 length ; CARD32 fid ; } xQueryTextExtentsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD16 maxNames ; CARD16 nbytes ; } xListFontsReq; typedef xListFontsReq xListFontsWithInfoReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD16 nFonts ; BYTE pad1, pad2; } xSetFontPathReq; typedef struct { CARD8 reqType; CARD8 depth; CARD16 length ; CARD32 pid ; CARD32 drawable ; CARD16 width , height ; } xCreatePixmapReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 gc ; CARD32 drawable ; CARD32 mask ; } xCreateGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 gc ; CARD32 mask ; } xChangeGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcGC , dstGC ; CARD32 mask ; } xCopyGCReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 gc ; CARD16 dashOffset ; CARD16 nDashes ; } xSetDashesReq; typedef struct { CARD8 reqType; BYTE ordering; CARD16 length ; CARD32 gc ; INT16 xOrigin , yOrigin ; } xSetClipRectanglesReq; typedef struct { CARD8 reqType; BOOL exposures; CARD16 length ; CARD32 window ; INT16 x , y ; CARD16 width , height ; } xClearAreaReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcDrawable , dstDrawable ; CARD32 gc ; INT16 srcX , srcY , dstX , dstY ; CARD16 width , height ; } xCopyAreaReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 srcDrawable , dstDrawable ; CARD32 gc ; INT16 srcX , srcY , dstX , dstY ; CARD16 width , height ; CARD32 bitPlane ; } xCopyPlaneReq; typedef struct { CARD8 reqType; BYTE coordMode; CARD16 length ; CARD32 drawable ; CARD32 gc ; } xPolyPointReq; typedef xPolyPointReq xPolyLineReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 drawable ; CARD32 gc ; } xPolySegmentReq; typedef xPolySegmentReq xPolyArcReq; typedef xPolySegmentReq xPolyRectangleReq; typedef xPolySegmentReq xPolyFillRectangleReq; typedef xPolySegmentReq xPolyFillArcReq; typedef struct _FillPolyReq { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 drawable ; CARD32 gc ; BYTE shape; BYTE coordMode; CARD16 pad1 ; } xFillPolyReq; typedef struct _PutImageReq { CARD8 reqType; CARD8 format; CARD16 length ; CARD32 drawable ; CARD32 gc ; CARD16 width , height ; INT16 dstX , dstY ; CARD8 leftPad; CARD8 depth; CARD16 pad ; } xPutImageReq; typedef struct { CARD8 reqType; CARD8 format; CARD16 length ; CARD32 drawable ; INT16 x , y ; CARD16 width , height ; CARD32 planeMask ; } xGetImageReq; typedef struct { CARD8 reqType; CARD8 pad; CARD16 length ; CARD32 drawable ; CARD32 gc ; INT16 x , y ; } xPolyTextReq; typedef xPolyTextReq xPolyText8Req; typedef xPolyTextReq xPolyText16Req; typedef struct { CARD8 reqType; BYTE nChars; CARD16 length ; CARD32 drawable ; CARD32 gc ; INT16 x , y ; } xImageTextReq; typedef xImageTextReq xImageText8Req; typedef xImageTextReq xImageText16Req; typedef struct { CARD8 reqType; BYTE alloc; CARD16 length ; CARD32 mid ; CARD32 window ; CARD32 visual ; } xCreateColormapReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 mid ; CARD32 srcCmap ; } xCopyColormapAndFreeReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; CARD16 red , green , blue ; CARD16 pad2 ; } xAllocColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; CARD16 nbytes ; BYTE pad1, pad2; } xAllocNamedColorReq; typedef struct { CARD8 reqType; BOOL contiguous; CARD16 length ; CARD32 cmap ; CARD16 colors , planes ; } xAllocColorCellsReq; typedef struct { CARD8 reqType; BOOL contiguous; CARD16 length ; CARD32 cmap ; CARD16 colors , red , green , blue ; } xAllocColorPlanesReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; CARD32 planeMask ; } xFreeColorsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; } xStoreColorsReq; typedef struct { CARD8 reqType; CARD8 flags; CARD16 length ; CARD32 cmap ; CARD32 pixel ; CARD16 nbytes ; BYTE pad1, pad2; } xStoreNamedColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; } xQueryColorsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cmap ; CARD16 nbytes ; BYTE pad1, pad2; } xLookupColorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cid ; CARD32 source , mask ; CARD16 foreRed , foreGreen , foreBlue ; CARD16 backRed , backGreen , backBlue ; CARD16 x , y ; } xCreateCursorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cid ; CARD32 source , mask ; CARD16 sourceChar , maskChar ; CARD16 foreRed , foreGreen , foreBlue ; CARD16 backRed , backGreen , backBlue ; } xCreateGlyphCursorReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 cursor ; CARD16 foreRed , foreGreen , foreBlue ; CARD16 backRed , backGreen , backBlue ; } xRecolorCursorReq; typedef struct { CARD8 reqType; CARD8 class; CARD16 length ; CARD32 drawable ; CARD16 width , height ; } xQueryBestSizeReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD16 nbytes ; BYTE pad1, pad2; } xQueryExtensionReq; typedef struct { CARD8 reqType; CARD8 numKeyPerModifier; CARD16 length ; } xSetModifierMappingReq; typedef struct { CARD8 reqType; CARD8 nElts; CARD16 length ; } xSetPointerMappingReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD8 firstKeyCode; CARD8 count; CARD16 pad1 ; } xGetKeyboardMappingReq; typedef struct { CARD8 reqType; CARD8 keyCodes; CARD16 length ; CARD8 firstKeyCode; CARD8 keySymsPerKeyCode; CARD16 pad1 ; } xChangeKeyboardMappingReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 mask ; } xChangeKeyboardControlReq; typedef struct { CARD8 reqType; INT8 percent; CARD16 length ; } xBellReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; INT16 accelNum , accelDenum ; INT16 threshold ; BOOL doAccel, doThresh; } xChangePointerControlReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; INT16 timeout , interval ; BYTE preferBlank, allowExpose; CARD16 pad2 ; } xSetScreenSaverReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length ; CARD8 hostFamily; BYTE pad; CARD16 hostLength ; } xChangeHostsReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; } xListHostsReq; typedef struct { CARD8 reqType; BYTE mode; CARD16 length ; } xChangeModeReq; typedef xChangeModeReq xSetAccessControlReq; typedef xChangeModeReq xSetCloseDownModeReq; typedef xChangeModeReq xForceScreenSaverReq; typedef struct { CARD8 reqType; BYTE pad; CARD16 length ; CARD32 window ; CARD16 nAtoms ; INT16 nPositions ; } xRotatePropertiesReq; # 33 "events.c" # 1 "../include/windowstr.h" # 1 "../include/window.h" typedef struct _BackingStore *BackingStorePtr; typedef struct _Window *WindowPtr; # 29 "../include/windowstr.h" # 1 "../include/pixmapstr.h" # 1 "../include/pixmap.h" typedef struct _DrawInfo *DrawablePtr; typedef struct _Pixmap *PixmapPtr; # 28 "../include/pixmapstr.h" # 1 "../include/screenint.h" typedef struct _PixmapFormat *PixmapFormatPtr; typedef struct _Visual *VisualPtr; typedef struct _Depth *DepthPtr; typedef struct _Screen *ScreenPtr; # 29 "../include/pixmapstr.h" # 1 "../include/misc.h" # 117 "../include/misc.h" # 30 "../include/pixmapstr.h" typedef struct _DrawInfo { short type; ScreenPtr pScreen; int depth; unsigned long serialNumber; } DrawableRec; typedef struct _Pixmap { DrawableRec drawable; int width, height; int refcnt; int devKind; pointer devPrivate; } PixmapRec; # 30 "../include/windowstr.h" # 1 "../include/region.h" typedef struct _Region *RegionPtr; extern int SingleRectRegionEqual(); # 31 "../include/windowstr.h" # 1 "../include/cursor.h" typedef struct _Cursor *CursorPtr; typedef struct _CursorMetric *CursorMetricPtr; extern CursorPtr rootCursor; # 32 "../include/windowstr.h" # 1 "../include/property.h" typedef struct _Property *PropertyPtr; # 33 "../include/windowstr.h" # 1 "../include/resource.h" # 74 "../include/resource.h" # 34 "../include/windowstr.h" # 1 "../include/dix.h" # 1 "../include/gc.h" typedef struct _GCInterest *GCInterestPtr; typedef struct _GC *GCPtr; extern void ValidateGC(); extern int ChangeGC(); extern GCPtr CreateGC(); extern int CopyGC(); extern int FreeGC(); extern void SetGCMask(); extern GCPtr GetScratchGC(); extern void FreeScratchGC(); # 29 "../include/dix.h" # 1 "../include/window.h" # 53 "../include/window.h" # 30 "../include/dix.h" typedef struct _TimeStamp *TimeStampPtr; typedef struct _Client *ClientPtr; extern ClientPtr requestingClient; extern ClientPtr *clients; extern ClientPtr serverClient; extern int currentMaxClients; extern int ProcAllowEvents(); extern int ProcBell(); extern int ProcChangeActivePointerGrab(); extern int ProcChangeKeyboardControl(); extern int ProcChangePointerControl(); extern int ProcGetKeyboardMapping(); extern int ProcGetPointerMapping(); extern int ProcGetInputFocus(); extern int ProcGetKeyboardControl(); extern int ProcGetMotionEvents(); extern int ProcGetPointerControl(); extern int ProcGrabButton(); extern int ProcGrabKey(); extern int ProcGrabKeyboard(); extern int ProcGrabPointer(); extern int ProcQueryKeymap(); extern int ProcQueryPointer(); extern int ProcSetInputFocus(); extern int ProcSetKeyboardMapping(); extern int ProcSetPointerMapping(); extern int ProcSendEvent(); extern int ProcUngrabButton(); extern int ProcUngrabKey(); extern int ProcUngrabKeyboard(); extern int ProcUngrabPointer(); extern int ProcWarpPointer(); extern int ProcRecolorCursor(); extern WindowPtr LookupWindow(); extern pointer LookupDrawable(); extern void NoopDDA(); # 35 "../include/windowstr.h" # 1 "../include/miscstruct.h" # 1 "../include/misc.h" # 117 "../include/misc.h" # 28 "../include/miscstruct.h" extern unsigned long globalSerialNumber; typedef struct _DDXPoint { short x, y; } DDXPointRec; typedef struct _Box { short x1, y1, x2, y2; } BoxRec; # 36 "../include/windowstr.h" # 1 "../.././X11/Xprotostr.h" # 55 "../.././X11/Xprotostr.h" # 37 "../include/windowstr.h" typedef struct _BackingStore { RegionPtr obscured; DDXPointRec oldAbsCorner; void (* SaveDoomedAreas)(); RegionPtr (* RestoreAreas)(); void (* ExposeCopy)(); void (* TranslateBackingStore)(); void (* ClearToBackground)(); void (* DrawGuarantee)(); } BackingStoreRec; typedef struct _Window { DrawableRec drawable; VisualID visual; struct _Window *parent; struct _Window *nextSib; struct _Window *prevSib; struct _Window *firstChild; struct _Window *lastChild; CursorPtr cursor; ClientPtr client; Window wid; RegionPtr clipList; RegionPtr winSize; RegionPtr borderClip; RegionPtr borderSize; RegionPtr exposed; RegionPtr borderExposed; xRectangle clientWinSize; DDXPointRec absCorner; DDXPointRec oldAbsCorner; int class; Mask eventMask; Mask dontPropagateMask; Mask allEventMasks; Mask deliverableEvents; pointer otherClients; pointer passiveGrabs; PropertyPtr userProps; XID nolongerused; PixmapPtr backgroundTile; unsigned long backgroundPixel; PixmapPtr borderTile; unsigned long borderPixel; int borderWidth; void (* PaintWindowBackground)(); void (* PaintWindowBorder)(); void (* CopyWindow)(); void (* ClearToBackground)(); unsigned long backingBitPlanes; unsigned long backingPixel; int backingStore; BackingStorePtr backStorage; char bitGravity; char winGravity; Colormap colormap; Bool saveUnder:1; unsigned visibility:2; unsigned mapped:1; unsigned realized:1; unsigned viewable:1; unsigned overrideRedirect:1; unsigned marked:1; pointer devBackingStore; pointer devPrivate; } WindowRec; extern int DeleteWindow(); extern int ChangeWindowAttributes(); extern int WalkTree(); extern CreateRootWindow(); extern WindowPtr CreateWindow(); extern int DeleteWindow(); extern int DestroySubwindows(); extern int ChangeWindowAttributes(); extern int GetWindowAttributes(); extern int ConfigureWindow(); extern int ReparentWindow(); extern int MapWindow(); extern int MapSubwindow(); extern int UnmapWindow(); extern int UnmapSubwindow(); extern RegionPtr NotClippedByChildren(); # 34 "events.c" # 1 "../include/inputstr.h" # 1 "../include/input.h" # 1 "../include/misc.h" # 117 "../include/misc.h" # 27 "../include/input.h" typedef unsigned long Leds; typedef struct _OtherClients *OtherClientsPtr; typedef struct _GrabRec *GrabPtr; typedef int (*DeviceProc)(); typedef void (*ProcessInputProc)(); typedef struct _DeviceRec { pointer devicePrivate; ProcessInputProc processInputProc; Bool on; } DeviceRec, *DevicePtr; typedef struct { int count; DevicePtr *devices; } DevicesDescriptor; typedef struct { int click, bell, bell_pitch, bell_duration; Bool autoRepeat; unsigned char autoRepeats[32]; Leds leds; } KeybdCtrl; typedef struct { KeySym *map; KeyCode minKeyCode, maxKeyCode; int mapWidth; } KeySymsRec, *KeySymsPtr; typedef struct { int num, den, threshold; } PtrCtrl; extern KeybdCtrl defaultKeyboardControl; extern PtrCtrl defaultPointerControl; extern int DeliverEvents(); extern int MaybeDeliverEventsToClient( ); extern DevicePtr AddInputDevice(); extern void RegisterPointerDevice(); extern void RegisterKeyboardDevice(); extern void ProcessPointerEvent(); extern void ProcessKeyboardEvent(); extern void ProcessOtherEvent(); extern void InitPointerDeviceStruct(); extern void InitKeyboardDeviceStruct(); extern void InitOtherDeviceStruct(); extern GrabPtr SetDeviceGrab(); extern DevicesDescriptor GetInputDevices(); extern DevicePtr LookupInputDevice(); extern DevicePtr LookupKeyboardDevice(); extern DevicePtr LookupPointerDevice(); extern void CloseDownDevices(); extern int InitAndStartDevices(); extern int NumMotionEvents(); extern void WriteEventsToClient(); extern int EventSelectForWindow(); extern int EventSuppressForWindow(); # 30 "../include/inputstr.h" # 1 "../include/window.h" # 53 "../include/window.h" # 31 "../include/inputstr.h" # 1 "../include/dixstruct.h" # 1 "../include/dix.h" # 100 "../include/dix.h" # 29 "../include/dixstruct.h" # 1 "../include/resource.h" # 74 "../include/resource.h" # 30 "../include/dixstruct.h" # 1 "../include/cursor.h" # 33 "../include/cursor.h" # 31 "../include/dixstruct.h" # 1 "../include/gc.h" # 65 "../include/gc.h" # 32 "../include/dixstruct.h" # 1 "../include/pixmap.h" # 45 "../include/pixmap.h" # 33 "../include/dixstruct.h" typedef struct _TimeStamp { unsigned long months; unsigned long milliseconds; } TimeStamp; typedef struct _Client { int index; Mask clientAsMask; pointer requestBuffer; pointer osPrivate; Bool swapped; void (* pSwapReplyFunc)(); XID errorValue; int sequence; int closeDownMode; int clientGone; int noClientException; DrawablePtr lastDrawable; Drawable lastDrawableID; GCPtr lastGC; GContext lastGCID; pointer *saveSet; int numSaved; int requestLog[100]; int requestLogIndex; pointer screenPrivate[3]; } ClientRec; extern TimeStamp currentTime; extern void CloseDownClient(); extern TimeStamp ClientTimeToServerTime(); # 32 "../include/inputstr.h" typedef struct _OtherClients { OtherClientsPtr next; ClientPtr client; XID resource; Mask mask; } OtherClients; typedef struct _DeviceIntRec *DeviceIntPtr; typedef struct _DetailRec { unsigned short exact; Mask *pMask; } DetailRec; typedef struct _GrabRec { GrabPtr next; XID resource; ClientPtr client; DeviceIntPtr device; WindowPtr window; Bool ownerEvents; Bool keyboardMode, pointerMode; DetailRec modifiersDetail; Mask eventMask; DetailRec detail; WindowPtr confineTo; CursorPtr cursor; } GrabRec; typedef struct { WindowPtr win; int revert; TimeStamp time; } FocusRec, *FocusPtr; typedef struct _DeviceIntRec { DeviceRec public; TimeStamp grabTime; Bool startup; DeviceProc deviceProc; Bool inited; GrabPtr grab; struct { Bool frozen; int state; GrabPtr other; xEvent event; } sync; BYTE down[32 ]; union { struct { CARD8 modifierMap[256]; KeybdCtrl ctrl; void (*BellProc) (); void (*CtrlProc) (); FocusRec focus; Bool passiveGrab; } keybd; struct { PtrCtrl ctrl; void (*CtrlProc) (); int (*GetMotionProc) (); Bool autoReleaseGrab; BYTE map[256]; int mapLength; } ptr; struct { FocusRec focus; BYTE map[256]; int mapLength; } other; } u; } DeviceIntRec; typedef struct { int numMotionEvents; int numDevices; int arraySize; DeviceIntPtr *devices; DeviceIntPtr keyboard; DeviceIntPtr pointer; } InputInfo; typedef struct _QdEvent *QdEventPtr; typedef struct _QdEvent { QdEventPtr forw; QdEventPtr back; DeviceIntPtr device; xEvent event; } QdEventRec; # 35 "events.c" # 1 "../include/scrnintstr.h" # 1 "../include/screenint.h" # 33 "../include/screenint.h" # 28 "../include/scrnintstr.h" # 1 "../include/misc.h" # 117 "../include/misc.h" # 29 "../include/scrnintstr.h" # 1 "../include/region.h" # 41 "../include/region.h" # 30 "../include/scrnintstr.h" # 1 "../include/pixmap.h" # 45 "../include/pixmap.h" # 31 "../include/scrnintstr.h" # 1 "../include/gc.h" # 65 "../include/gc.h" # 32 "../include/scrnintstr.h" # 1 "../include/colormap.h" # 55 "../include/colormap.h" typedef unsigned long Pixel; typedef struct _CMEntry *EntryPtr; typedef struct _ColormapRec *ColormapPtr; extern int CreateColormap(); extern Pixel FindColor(); extern int FreeColormap(); extern int TellNoMap(); extern int TellLostMap(); extern int TellGainedMap(); extern int IsMapInstalled(); extern void UninstallColormap(); # 33 "../include/scrnintstr.h" typedef struct _PixmapFormat { unsigned char depth; unsigned char bitsPerPixel; unsigned char scanlinePad; } PixmapFormatRec; typedef struct _Visual { unsigned long vid; short screen; short class; unsigned long redMask, greenMask, blueMask; int offsetRed, offsetGreen, offsetBlue; short bitsPerRGBValue; short ColormapEntries; short nplanes; } VisualRec; typedef struct _Depth { int depth; int numVids; unsigned long *vids; } DepthRec; typedef struct _Screen { int myNum; ATOM id; short width, height; short mmWidth, mmHeight; short numDepths; DepthPtr allowedDepths; short rootDepth; unsigned long rootVisual; unsigned long defColormap; short minInstalledCmaps, maxInstalledCmaps; char backingStoreSupport, saveUnderSupport; unsigned long whitePixel, blackPixel; unsigned long rgf; GCPtr GCperDepth[8+1]; PixmapPtr PixmapPerDepth[1]; pointer devPrivate; short numVisuals; VisualPtr visuals; Bool (* CloseScreen)(); void (* QueryBestSize)(); Bool (* SaveScreen)(); void (* GetImage)(); unsigned int *(* GetSpans)(); void (* PointerNonInterestBox)(); Bool (* CreateWindow)(); Bool (* DestroyWindow)(); Bool (* PositionWindow)(); Bool (* ChangeWindowAttributes)(); Bool (* RealizeWindow)(); Bool (* UnrealizeWindow)(); int (* ValidateTree)(); void (* WindowExposures)(); PixmapPtr (* CreatePixmap)(); Bool (* DestroyPixmap)(); Bool (* RealizeFont)(); Bool (* UnrealizeFont)(); void (* ConstrainCursor)(); void (* CursorLimits)(); Bool (* DisplayCursor)(); Bool (* RealizeCursor)(); Bool (* UnrealizeCursor)(); void (* RecolorCursor)(); Bool (* SetCursorPosition)(); Bool (* CreateGC)(); void (* CreateColormap)(); void (* DestroyColormap)(); void (* InstallColormap)(); void (* UninstallColormap)(); int (* ListInstalledColormaps) (); void (* StoreColors)(); void (* ResolveColor)(); RegionPtr (* RegionCreate)(); void (* RegionCopy)(); void (* RegionDestroy)(); int (* Intersect)(); int (* Union)(); int (* Subtract)(); int (* Inverse)(); void (* RegionReset)(); void (* TranslateRegion)(); int (* RectIn)(); Bool (* PointInRegion)(); Bool (* RegionNotEmpty)(); void (* RegionEmpty)(); BoxPtr (*RegionExtents)(); void (* SendGraphicsExpose)(); void (* BlockHandler)(); void (* WakeupHandler)(); pointer blockData; pointer wakeupData; } ScreenRec; typedef struct _ScreenInfo { int imageByteOrder; int bitmapScanlineUnit; int bitmapScanlinePad; int bitmapBitOrder; int numPixmapFormats; PixmapFormatRec formats[8]; int arraySize; int numScreens; ScreenPtr screen; } ScreenInfo; extern ScreenInfo screenInfo; # 36 "events.c" # 1 "../include/cursorstr.h" # 1 "../include/cursor.h" # 33 "../include/cursor.h" # 28 "../include/cursorstr.h" # 1 "../include/pixmap.h" # 45 "../include/pixmap.h" # 29 "../include/cursorstr.h" # 1 "../include/misc.h" # 117 "../include/misc.h" # 30 "../include/cursorstr.h" typedef struct _Cursor { unsigned char *source; unsigned char *mask; long width; long height; long xhot; long yhot; unsigned foreRed, foreGreen, foreBlue; unsigned backRed, backGreen, backBlue; int refcnt; pointer devPriv[3]; } CursorRec; typedef struct _CursorMetric { long width, height, xhot, yhot; } CursorMetricRec; extern int FreeCursor(); extern CursorPtr AllocCursor(); extern CursorPtr CreateRootCursor(); # 37 "events.c" # 1 "../include/dixstruct.h" # 75 "../include/dixstruct.h" # 39 "events.c" extern WindowRec WindowTable[]; extern void (* EventSwapVector[128]) (); extern void (* ReplySwapVector[256]) (); extern void CopySwap32Write(), SwapTimeCoordWrite(); static debug_events = 0; static debug_modifiers = 0; static InputInfo inputInfo; static int keyThatActivatedPassiveGrab; static KeySymsRec curKeySyms; static GrabRec keybdGrab; static GrabRec ptrGrab; static struct { unsigned int num; QdEventRec pending, free; DeviceIntPtr replayDev; WindowPtr replayWin; Bool playingEvents; } syncEvents; static WindowPtr *spriteTrace = (WindowPtr *) 0; static int spriteTraceSize = 0; static int spriteTraceGood; static WindowPtr *focusTrace = (WindowPtr *) 0; static int focusTraceSize = 0; static int focusTraceGood; static CARD16 keyButtonState = 0; static int modifierKeyCount[8]; static int buttonsDown = 0; static Mask buttonMotionMask = 0; typedef struct { int x, y; } HotSpot; static struct { CursorPtr current; BoxRec hotLimits; BoxRec physLimits; WindowPtr win; HotSpot hot; } sprite; static WindowPtr motionHintWindow; extern void DoEnterLeaveEvents(); static WindowPtr XYToWindow(); extern Bool CheckKeyboardGrabs(); static void NormalKeyboardEvent(); extern int DeliverDeviceEvents(); static void DoFocusEvents(); extern Mask EventMaskForClient(); static WindowPtr CheckMotion(); extern void WriteEventsToClient(); static Bool CheckDeviceGrabs(); extern GrabPtr CreateGrab(); extern void DeleteGrab(); extern Bool GrabMatchesSecond(); extern void DeletePassiveGrabFromList(); extern void AddPassiveGrabToWindowList(); static ScreenPtr currentScreen; CARD16 keyModifiersList[256]; static CARD8 maxKeysPerModifier; static KeyCode *modifierKeyMap; static Mask lastEventMask; static Mask filters[128] = { 0x80000000 , 0x80000000 , (1L<<0) , (1L<<1) , (1L<<2) , (1L<<3) , ( (1L<<6) | (1L<<8) | (1L<<9) | (1L<<10) | (1L<<11) | (1L<<12) | (1L<<13) ), (1L<<4) , (1L<<5) , (1L<<21) , (1L<<21) , (1L<<14), (1L<<15) , 0L, 0L, (1L<<16) , (1L<<19) , ( (1L<<17) | (1L<<19) ), ( (1L<<17) | (1L<<19) ), ( (1L<<17) | (1L<<19) ), (1L<<20) , ( (1L<<17) | (1L<<19) ), ( (1L<<17) | (1L<<19) ), (1L<<20) , ( (1L<<17) | (1L<<19) ), (1L<<18) , ( (1L<<17) | (1L<<19) ), (1L<<20) , (1L<<22) , 0L, 0L, 0L, (1L<<23) , 0L }; Mask GetNextEventMask() { lastEventMask <<= 1; return lastEventMask; } void SetMaskForEvent(mask, event) Mask mask; int event; { if ((event < 35 ) || (event >= 128)) FatalError("MaskForEvent: bogus event number"); filters[event] = mask; } static void SyntheticMotion(x, y) int x, y; { xEvent xE; xE.u.keyButtonPointer.rootX = x; xE.u.keyButtonPointer.rootY = y; xE.u.keyButtonPointer.time = currentTime.milliseconds; xE.u.u.type = 6; ProcessPointerEvent(&xE, inputInfo.pointer); } static void CheckPhysLimits(cursor, generateEvents) CursorPtr cursor; Bool generateEvents; { HotSpot new; if (!cursor) return; new = sprite.hot; (*currentScreen->CursorLimits) ( currentScreen, cursor, &sprite.hotLimits, &sprite.physLimits); if (new.x < sprite.physLimits.x1) new.x = sprite.physLimits.x1; else if (new.x >= sprite.physLimits.x2) new.x = sprite.physLimits.x2 - 1; if (new.y < sprite.physLimits.y1) new.y = sprite.physLimits.y1; else if (new.y >= sprite.physLimits.y2) new.y = sprite.physLimits.y2 - 1; if ((new.x != sprite.hot.x) || (new.y != sprite.hot.y)) { (*currentScreen->SetCursorPosition) ( currentScreen, new.x, new.y, generateEvents); if (!generateEvents) SyntheticMotion(new.x, new.y); } } static void ConfineCursorToWindow(pWin, x, y, generateEvents) WindowPtr pWin; int x, y; Bool generateEvents; { ScreenPtr pScreen = pWin->drawable.pScreen; sprite.hotLimits = *(* pScreen->RegionExtents)(pWin->borderSize); if (currentScreen != pScreen) { currentScreen = pScreen; spriteTrace[0] = &WindowTable[pScreen->myNum]; if (x < sprite.hotLimits.x1) x = sprite.hotLimits.x1; else if (x >= sprite.hotLimits.x2) x = sprite.hotLimits.x2 - 1; if (y < sprite.hotLimits.y1) y = sprite.hotLimits.y1; else if (y >= sprite.hotLimits.y2) y = sprite.hotLimits.y2 - 1; sprite.hot.x = -1; sprite.hot.y = -1; (* pScreen->SetCursorPosition)(pScreen, x, y, generateEvents); if (!generateEvents) SyntheticMotion(x, y); } CheckPhysLimits(sprite.current, generateEvents); (* pScreen->ConstrainCursor)(pScreen, &sprite.physLimits); }