From 150eabc4c8a08c81c48493583f922a1240b7e91c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:11:04 -0400 Subject: [PATCH 001/552] Add SELinux extension source files. --- Xext/XSELinuxConfig | 83 ++ Xext/xselinux.c | 1884 +++++++++++++++++++++++++++++++++++++++++++ Xext/xselinux.h | 29 + 3 files changed, 1996 insertions(+) create mode 100644 Xext/XSELinuxConfig create mode 100644 Xext/xselinux.c create mode 100644 Xext/xselinux.h diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig new file mode 100644 index 000000000..faf815e27 --- /dev/null +++ b/Xext/XSELinuxConfig @@ -0,0 +1,83 @@ +# +# Config file for XSELinux extension +# + +# +# The nonlocal_context rule defines a context to be used for all clients +# connecting to the server from a remote host. The nonlocal context must +# be defined, and it must be a valid context according to the SELinux +# security policy. Only one nonlocal_context rule may be defined. +# +nonlocal_context system_u:object_r:remote_xclient_t:s1 + +# +# Property rules map a property name to a SELinux type. The type must +# be valid according to the SELinux security policy. There can be any +# number of property rules. Additionally, a default property type can be +# defined for all properties not explicitly listed. The default +# property type may not be omitted. The default rule may appear in +# any position (it need not be the last property rule listed). +# +property WM_NAME wm_property_t +property WM_CLASS wm_property_t +property WM_ICON_NAME wm_property_t +property WM_HINTS wm_property_t +property WM_NORMAL_HINTS wm_property_t +property WM_COMMAND wm_property_t + +property CUT_BUFFER0 cut_buffer_property_t +property CUT_BUFFER1 cut_buffer_property_t +property CUT_BUFFER2 cut_buffer_property_t +property CUT_BUFFER3 cut_buffer_property_t +property CUT_BUFFER4 cut_buffer_property_t +property CUT_BUFFER5 cut_buffer_property_t +property CUT_BUFFER6 cut_buffer_property_t +property CUT_BUFFER7 cut_buffer_property_t + +property default unknown_property_t + +# +# Extension rules map an extension name to a SELinux type. The type must +# be valid according to the SELinux security policy. There can be any +# number of extension rules. Additionally, a default extension type can +# be defined for all extensions not explicitly listed. The default +# extension type may not be omitted. The default rule may appear in +# any position (it need not be the last extension rule listed). +# +extension BIG-REQUESTS std_ext_t +extension DOUBLE-BUFFER std_ext_t +extension DPMS screensaver_ext_t +extension Extended-Visual-Information std_ext_t +extension FontCache font_ext_t +extension GLX std_ext_t +extension LBX std_ext_t +extension MIT-SCREEN-SAVER screensaver_ext_t +extension MIT-SHM shmem_ext_t +extension MIT-SUNDRY-NONSTANDARD std_ext_t +extension NV-CONTROL accelgraphics_ext_t +extension NV-GLX accelgraphics_ext_t +extension NVIDIA-GLX accelgraphics_ext_t +extension RANDR std_ext_t +extension RECORD debug_ext_t +extension RENDER std_ext_t +extension SECURITY security_ext_t +extension SELinux security_ext_t +extension SHAPE std_ext_t +extension SYNC sync_ext_t +extension TOG-CUP windowmgr_ext_t +extension X-Resource debug_ext_t +extension XAccessControlExtension security_ext_t +extension XACEUSR security_ext_t +extension XC-APPGROUP security_ext_t +extension XC-MISC std_ext_t +extension XFree86-Bigfont font_ext_t +extension XFree86-DGA accelgraphics_ext_t +extension XFree86-Misc std_ext_t +extension XFree86-VidModeExtension video_ext_t +extension XInputExtension input_ext_t +extension XKEYBOARD input_ext_t +extension XpExtension std_ext_t +extension XTEST debug_ext_t +extension XVideo video_ext_t +extension XVideo-MotionCompensation video_ext_t +extension default unknown_ext_t diff --git a/Xext/xselinux.c b/Xext/xselinux.c new file mode 100644 index 000000000..5a6d2ef00 --- /dev/null +++ b/Xext/xselinux.c @@ -0,0 +1,1884 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice 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 NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR 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. + +********************************************************/ + +/* + * Portions of this code copyright (c) 2005 by Trusted Computer Solutions, Inc. + * All rights reserved. + */ + +#include +#include +#include +#include +#include + +#include + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "dixstruct.h" +#include "extnsionst.h" +#include "resource.h" +#include "selection.h" +#include "xacestr.h" +#include "xselinux.h" +#define XSERV_t +#define TRANS_SERVER +#include +#include "../os/osdep.h" +#include +#include +#include "modinit.h" + +#ifndef XSELINUXCONFIGFILE +#warning "XSELinux Policy file is not defined" +#define XSELINUXCONFIGFILE NULL +#endif + + +/* Make sure a locally connecting client has a valid context. The context + * for this client is retrieved again later on in AssignClientState(), but + * by that point it's too late to reject the client. + */ +static char * +XSELinuxValidContext (ClientPtr client) +{ + security_context_t ctx = NULL; + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + char reason[256]; + char *ret = (char *)NULL; + + if (_XSERVTransIsLocal(ci)) + { + int fd = _XSERVTransGetConnectionNumber(ci); + if (getpeercon(fd, &ctx) < 0) + { + snprintf(reason, sizeof(reason), "Failed to retrieve SELinux context from socket"); + ret = reason; + goto out; + } + if (security_check_context(ctx)) + { + snprintf(reason, sizeof(reason), "Client's SELinux context is invalid: %s", ctx); + ret = reason; + } + + freecon(ctx); + } + +out: + return ret; +} + + +/* devPrivates in client and extension */ +static int clientPrivateIndex; +static int extnsnPrivateIndex; + +/* audit file descriptor */ +static int audit_fd; + +/* structure passed to auditing callback */ +typedef struct { + ClientPtr client; /* client */ + char *property; /* property name, if any */ + char *extension; /* extension name, if any */ +} XSELinuxAuditRec; + +/* + * Table of SELinux types for property names. + */ +static char **propertyTypes = NULL; +static int propertyTypesCount = 0; +char *XSELinuxPropertyTypeDefault = NULL; + +/* + * Table of SELinux types for each extension. + */ +static char **extensionTypes = NULL; +static int extensionTypesCount = 0; +static char *XSELinuxExtensionTypeDefault = NULL; + +/* security context for non-local clients */ +static char *XSELinuxNonlocalContextDefault = NULL; + +/* security context for the root window */ +static char *XSELinuxRootWindowContext = NULL; + +/* Selection stuff from dix */ +extern Selection *CurrentSelections; +extern int NumCurrentSelections; + +/* + * list of classes corresponding to SIDs in the + * rsid array of the security state structure (below). + * + * XXX SIDs should be stored in their native objects, not all + * bunched together in the client structure. However, this will + * require modification to the resource manager. + */ +static security_class_t sClasses[] = { + SECCLASS_WINDOW, + SECCLASS_DRAWABLE, + SECCLASS_GC, + SECCLASS_CURSOR, + SECCLASS_FONT, + SECCLASS_COLORMAP, + SECCLASS_PROPERTY, + SECCLASS_XCLIENT, + SECCLASS_XINPUT +}; +#define NRES (sizeof(sClasses)/sizeof(sClasses[0])) + +/* This is what we store for client security state */ +typedef struct { + int haveState; + security_id_t sid; + security_id_t rsid[NRES]; + struct avc_entry_ref aeref; +} XSELinuxClientStateRec; + +/* Convenience macros for accessing security state fields */ +#define STATEPTR(client) \ + ((client)->devPrivates[clientPrivateIndex].ptr) +#define HAVESTATE(client) \ + (((XSELinuxClientStateRec*)STATEPTR(client))->haveState) +#define SID(client) \ + (((XSELinuxClientStateRec*)STATEPTR(client))->sid) +#define RSID(client,n) \ + (((XSELinuxClientStateRec*)STATEPTR(client))->rsid[n]) +#define AEREF(client) \ + (((XSELinuxClientStateRec*)STATEPTR(client))->aeref) +#define EXTENSIONSID(ext) \ + ((ext)->devPrivates[extnsnPrivateIndex].ptr) + +/* + * Returns the index into the rsid array where the SID for the + * given class is stored. + */ +static int +IndexByClass(security_class_t class) +{ + int i; + for (i=0; i 10) + ErrorF("Warning: possibly mangled ID %x\n", id); + + c = id & RESOURCE_ID_MASK; + if (c > 100) + ErrorF("Warning: possibly mangled ID %x\n", id); + */ +} + +/* + * Byte-swap a CARD32 id if necessary. + */ +static XID +SwapXID(ClientPtr client, XID id) +{ + register char n; + if (client->swapped) + swapl(&id, n); + return id; +} + +/* + * ServerPerm - check access permissions on a server-owned object. + * + * Arguments: + * client: Client doing the request. + * class: Security class of the server object being accessed. + * perm: Permissions required on the object. + * + * Returns: boolean TRUE=allowed, FALSE=denied. + */ +static int +ServerPerm(ClientPtr client, + security_class_t class, + access_vector_t perm) +{ + int idx = IndexByClass(class); + if (HAVESTATE(client)) + { + XSELinuxAuditRec auditdata; + auditdata.client = client; + auditdata.property = NULL; + auditdata.extension = NULL; + errno = 0; + if (avc_has_perm(SID(client), RSID(serverClient,idx), class, + perm, &AEREF(client), &auditdata) < 0) + { + if (errno != EACCES) + ErrorF("ServerPerm: unexpected error %d\n", errno); + return FALSE; + } + } + else + { + ErrorF("No client state in server-perm check!\n"); + return TRUE; + } + + return TRUE; +} + +/* + * IDPerm - check access permissions on a resource. + * + * Arguments: + * client: Client doing the request. + * id: resource id of the resource being accessed. + * class: Security class of the resource being accessed. + * perm: Permissions required on the resource. + * + * Returns: boolean TRUE=allowed, FALSE=denied. + */ +static int +IDPerm(ClientPtr sclient, + XID id, + security_class_t class, + access_vector_t perm) +{ + ClientPtr tclient; + int idx = IndexByClass(class); + XSELinuxAuditRec auditdata; + + if (id == None) + return TRUE; + + CheckXID(id); + tclient = clients[CLIENT_ID(id)]; + + /* + * This happens in the case where a client has + * disconnected. XXX might want to make the server + * own orphaned resources... + */ + if (!tclient || !HAVESTATE(tclient) || !HAVESTATE(sclient)) + { + return TRUE; + } + + auditdata.client = sclient; + auditdata.property = NULL; + auditdata.extension = NULL; + errno = 0; + if (avc_has_perm(SID(sclient), RSID(tclient,idx), class, + perm, &AEREF(sclient), &auditdata) < 0) + { + if (errno != EACCES) + ErrorF("IDPerm: unexpected error %d\n", errno); + return FALSE; + } + + return TRUE; +} + +/* + * ObjectSIDByLabel - get SID for an extension or property. + * + * Arguments: + * class: should be SECCLASS_XEXTENSION or SECCLASS_PROPERTY. + * name: name of the extension or property. + * + * Returns: proper SID for the object or NULL on error. + */ +static security_id_t +ObjectSIDByLabel(security_context_t basecontext, security_class_t class, + const char *name) +{ + security_context_t base, new; + context_t con; + security_id_t sid = NULL; + char **ptr, *type = NULL; + + if (basecontext != NULL) + { + /* use the supplied context */ + base = strdup(basecontext); + if (base == NULL) + goto out; + } + else + { + /* get server context */ + if (getcon(&base) < 0) + goto out; + } + + /* make a new context-manipulation object */ + con = context_new(base); + if (!con) + goto out2; + + /* look in the mappings of names to types */ + ptr = (class == SECCLASS_PROPERTY) ? propertyTypes : extensionTypes; + for (; *ptr; ptr+=2) + if (!strcmp(*ptr, name)) + break; + type = ptr[1]; + + /* set the role and type in the context (user unchanged) */ + if (context_type_set(con, type) || + context_role_set(con, "object_r")) + goto out3; + + /* get a context string from the context-manipulation object */ + new = context_str(con); + if (!new) + goto out3; + + /* get a SID for the context */ + if (avc_context_to_sid(new, &sid) < 0) + goto out3; + + out3: + context_free(con); + out2: + freecon(base); + out: + return sid; +} + +/* + * AssignClientState - set up client security state. + * + * Arguments: + * client: client to set up (can be serverClient). + */ +static void +AssignClientState(ClientPtr client) +{ + int i, needToFree = 0; + security_context_t basectx, objctx; + XSELinuxClientStateRec *state = (XSELinuxClientStateRec*)STATEPTR(client); + Bool isServerClient = FALSE; + + avc_entry_ref_init(&state->aeref); + + if (client->index > 0) + { + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + if (_XSERVTransIsLocal(ci)) { + /* for local clients, can get context from the socket */ + int fd = _XSERVTransGetConnectionNumber(ci); + if (getpeercon(fd, &basectx) < 0) + { + FatalError("Client %d: couldn't get context from socket\n", + client->index); + } + needToFree = 1; + } + else + { + /* for remote clients, need to use a default context */ + basectx = XSELinuxNonlocalContextDefault; + } + } + else + { + isServerClient = TRUE; + + /* use the context of the X server process for the serverClient */ + if (getcon(&basectx) < 0) + { + FatalError("Couldn't get context of X server process\n"); + } + needToFree = 1; + } + + /* get a SID from the context */ + if (avc_context_to_sid(basectx, &state->sid) < 0) + { + FatalError("Client %d: couldn't get security ID for client\n", + client->index); + } + + /* get contexts and then SIDs for each resource type */ + for (i=0; iindex, sClasses[i]); + } + else if (avc_context_to_sid(objctx, &state->rsid[i]) < 0) + { + FatalError("Client %d: couldn't get SID for class %x\n", + client->index, sClasses[i]); + } + freecon(objctx); + } + + /* special handling for serverClient windows (that is, root windows) */ + if (isServerClient == TRUE) + { + i = IndexByClass(SECCLASS_WINDOW); + sidput(state->rsid[i]); + if (avc_context_to_sid(XSELinuxRootWindowContext, &state->rsid[i])) + { + FatalError("Failed to set SID for root window\n"); + } + } + + /* mark as set up, free base context if necessary, and return */ + state->haveState = TRUE; + if (needToFree) + freecon(basectx); +} + +/* + * FreeClientState - tear down client security state. + * + * Arguments: + * client: client to release (can be serverClient). + */ +static void +FreeClientState(ClientPtr client) +{ + int i; + XSELinuxClientStateRec *state = (XSELinuxClientStateRec*)STATEPTR(client); + + /* client state may not be set up if its auth was rejected */ + if (state->haveState) { + state = (XSELinuxClientStateRec*)STATEPTR(client); + sidput(state->sid); + for (i=0; irsid[i]); + state->haveState = FALSE; + } +} + +#define REQUEST_SIZE_CHECK(client, req) \ + (client->req_len >= (sizeof(req) >> 2)) +#define IDPERM(client, req, field, class, perm) \ + (REQUEST_SIZE_CHECK(client,req) && \ + IDPerm(client, SwapXID(client,((req*)stuff)->field), class, perm)) +#define CALLBACK(name) static void \ +name(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) + +static int +CheckSendEventPerms(ClientPtr client) +{ + register char n; + access_vector_t perm = 0; + REQUEST(xSendEventReq); + + /* might need type bounds checking here */ + if (!REQUEST_SIZE_CHECK(client, xSendEventReq)) + return FALSE; + + switch (stuff->event.u.u.type) { + case SelectionClear: + case SelectionNotify: + case SelectionRequest: + case ClientMessage: + case PropertyNotify: + perm = WINDOW__CLIENTCOMEVENT; + break; + case ButtonPress: + case ButtonRelease: + case KeyPress: + case KeyRelease: + case KeymapNotify: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + case FocusIn: + case FocusOut: + perm = WINDOW__INPUTEVENT; + break; + case Expose: + case GraphicsExpose: + case NoExpose: + case VisibilityNotify: + perm = WINDOW__DRAWEVENT; + break; + case CirculateNotify: + case ConfigureNotify: + case CreateNotify: + case DestroyNotify: + case MapNotify: + case UnmapNotify: + case GravityNotify: + case ReparentNotify: + perm = WINDOW__WINDOWCHANGEEVENT; + break; + case CirculateRequest: + case ConfigureRequest: + case MapRequest: + case ResizeRequest: + perm = WINDOW__WINDOWCHANGEREQUEST; + break; + case ColormapNotify: + case MappingNotify: + perm = WINDOW__SERVERCHANGEEVENT; + break; + default: + perm = WINDOW__EXTENSIONEVENT; + break; + } + if (client->swapped) + swapl(&stuff->destination, n); + return IDPerm(client, stuff->destination, SECCLASS_WINDOW, perm); +} + +static int +CheckConvertSelectionPerms(ClientPtr client) +{ + register char n; + int rval = TRUE; + REQUEST(xConvertSelectionReq); + + if (!REQUEST_SIZE_CHECK(client, xConvertSelectionReq)) + return FALSE; + + if (client->swapped) + { + swapl(&stuff->selection, n); + swapl(&stuff->requestor, n); + } + + if (ValidAtom(stuff->selection)) + { + int i = 0; + while ((i < NumCurrentSelections) && + CurrentSelections[i].selection != stuff->selection) i++; + if (i < NumCurrentSelections) + rval = rval && IDPerm(client, CurrentSelections[i].window, + SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); + } + rval = rval && IDPerm(client, stuff->requestor, + SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); + return rval; +} + +static int +CheckSetSelectionOwnerPerms(ClientPtr client) +{ + register char n; + int rval = TRUE; + REQUEST(xSetSelectionOwnerReq); + + if (!REQUEST_SIZE_CHECK(client, xSetSelectionOwnerReq)) + return FALSE; + + if (client->swapped) + { + swapl(&stuff->selection, n); + swapl(&stuff->window, n); + } + + if (ValidAtom(stuff->selection)) + { + int i = 0; + while ((i < NumCurrentSelections) && + CurrentSelections[i].selection != stuff->selection) i++; + if (i < NumCurrentSelections) + rval = rval && IDPerm(client, CurrentSelections[i].window, + SECCLASS_WINDOW, WINDOW__CHSELECTION); + } + rval = rval && IDPerm(client, stuff->window, + SECCLASS_WINDOW, WINDOW__CHSELECTION); + return rval; +} + +CALLBACK(XSELinuxCoreDispatch) +{ + XaceCoreDispatchRec *rec = (XaceCoreDispatchRec*)calldata; + ClientPtr client = rec->client; + REQUEST(xReq); + Bool rval; + + switch(stuff->reqType) { + /* Drawable class control requirements */ + case X_ClearArea: + rval = IDPERM(client, xClearAreaReq, window, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_PolySegment: + case X_PolyRectangle: + case X_PolyArc: + case X_PolyFillRectangle: + case X_PolyFillArc: + rval = IDPERM(client, xPolySegmentReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_PolyPoint: + case X_PolyLine: + rval = IDPERM(client, xPolyPointReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_FillPoly: + rval = IDPERM(client, xFillPolyReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_PutImage: + rval = IDPERM(client, xPutImageReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_CopyArea: + case X_CopyPlane: + rval = IDPERM(client, xCopyAreaReq, srcDrawable, + SECCLASS_DRAWABLE, DRAWABLE__COPY) + && IDPERM(client, xCopyAreaReq, dstDrawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_GetImage: + rval = IDPERM(client, xGetImageReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__COPY); + break; + case X_GetGeometry: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_DRAWABLE, DRAWABLE__GETATTR); + break; + + /* Window class control requirements */ + case X_ChangeProperty: + rval = IDPERM(client, xChangePropertyReq, window, + SECCLASS_WINDOW, + WINDOW__CHPROPLIST | WINDOW__CHPROP | + WINDOW__LISTPROP); + break; + case X_ChangeSaveSet: + rval = IDPERM(client, xChangeSaveSetReq, window, + SECCLASS_WINDOW, + WINDOW__CTRLLIFE | WINDOW__CHPARENT); + break; + case X_ChangeWindowAttributes: + rval = IDPERM(client, xChangeWindowAttributesReq, window, + SECCLASS_WINDOW, WINDOW__SETATTR); + break; + case X_CirculateWindow: + rval = IDPERM(client, xCirculateWindowReq, window, + SECCLASS_WINDOW, WINDOW__CHSTACK); + break; + case X_ConfigureWindow: + rval = IDPERM(client, xConfigureWindowReq, window, + SECCLASS_WINDOW, + WINDOW__SETATTR | WINDOW__MOVE | WINDOW__CHSTACK); + break; + case X_ConvertSelection: + rval = CheckConvertSelectionPerms(client); + break; + case X_CreateWindow: + rval = IDPERM(client, xCreateWindowReq, wid, + SECCLASS_WINDOW, + WINDOW__CREATE | WINDOW__SETATTR | WINDOW__MOVE) + && IDPERM(client, xCreateWindowReq, parent, + SECCLASS_WINDOW, + WINDOW__CHSTACK | WINDOW__ADDCHILD) + && IDPERM(client, xCreateWindowReq, wid, + SECCLASS_DRAWABLE, DRAWABLE__CREATE); + break; + case X_DeleteProperty: + rval = IDPERM(client, xDeletePropertyReq, window, + SECCLASS_WINDOW, + WINDOW__CHPROP | WINDOW__CHPROPLIST); + break; + case X_DestroyWindow: + case X_DestroySubwindows: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, + WINDOW__ENUMERATE | WINDOW__UNMAP | WINDOW__DESTROY) + && IDPERM(client, xResourceReq, id, + SECCLASS_DRAWABLE, DRAWABLE__DESTROY); + break; + case X_GetMotionEvents: + rval = IDPERM(client, xGetMotionEventsReq, window, + SECCLASS_WINDOW, WINDOW__MOUSEMOTION); + break; + case X_GetProperty: + rval = IDPERM(client, xGetPropertyReq, window, + SECCLASS_WINDOW, WINDOW__LISTPROP); + break; + case X_GetWindowAttributes: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, WINDOW__GETATTR); + break; + case X_KillClient: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_XCLIENT, XCLIENT__KILL); + break; + case X_ListProperties: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, WINDOW__LISTPROP); + break; + case X_MapWindow: + case X_MapSubwindows: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, + WINDOW__ENUMERATE | WINDOW__GETATTR | WINDOW__MAP); + break; + case X_QueryTree: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, WINDOW__ENUMERATE | WINDOW__GETATTR); + break; + case X_RotateProperties: + rval = IDPERM(client, xRotatePropertiesReq, window, + SECCLASS_WINDOW, WINDOW__CHPROP | WINDOW__CHPROPLIST); + break; + case X_ReparentWindow: + rval = IDPERM(client, xReparentWindowReq, window, + SECCLASS_WINDOW, WINDOW__CHPARENT | WINDOW__MOVE) + && IDPERM(client, xReparentWindowReq, parent, + SECCLASS_WINDOW, WINDOW__CHSTACK | WINDOW__ADDCHILD); + break; + case X_SendEvent: + rval = CheckSendEventPerms(client); + break; + case X_SetInputFocus: + rval = IDPERM(client, xSetInputFocusReq, focus, + SECCLASS_WINDOW, WINDOW__SETFOCUS) + && ServerPerm(client, SECCLASS_XINPUT, XINPUT__SETFOCUS); + break; + case X_SetSelectionOwner: + rval = CheckSetSelectionOwnerPerms(client); + break; + case X_TranslateCoords: + rval = IDPERM(client, xTranslateCoordsReq, srcWid, + SECCLASS_WINDOW, WINDOW__GETATTR) + && IDPERM(client, xTranslateCoordsReq, dstWid, + SECCLASS_WINDOW, WINDOW__GETATTR); + break; + case X_UnmapWindow: + case X_UnmapSubwindows: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, + WINDOW__ENUMERATE | WINDOW__GETATTR | + WINDOW__UNMAP); + break; + case X_WarpPointer: + rval = IDPERM(client, xWarpPointerReq, srcWid, + SECCLASS_WINDOW, WINDOW__GETATTR) + && IDPERM(client, xWarpPointerReq, dstWid, + SECCLASS_WINDOW, WINDOW__GETATTR) + && ServerPerm(client, SECCLASS_XINPUT, XINPUT__WARPPOINTER); + break; + + /* Input class control requirements */ + case X_GrabButton: + case X_GrabKey: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__PASSIVEGRAB); + break; + case X_GrabKeyboard: + case X_GrabPointer: + case X_ChangeActivePointerGrab: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__ACTIVEGRAB); + break; + case X_AllowEvents: + case X_UngrabButton: + case X_UngrabKey: + case X_UngrabKeyboard: + case X_UngrabPointer: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__UNGRAB); + break; + case X_GetKeyboardControl: + case X_GetKeyboardMapping: + case X_GetPointerControl: + case X_GetPointerMapping: + case X_GetModifierMapping: + case X_QueryKeymap: + case X_QueryPointer: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__GETATTR); + break; + case X_ChangeKeyboardControl: + case X_ChangePointerControl: + case X_ChangeKeyboardMapping: + case X_SetModifierMapping: + case X_SetPointerMapping: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__SETATTR); + break; + case X_Bell: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__BELL); + break; + + /* Colormap class control requirements */ + case X_AllocColor: + case X_AllocColorCells: + case X_AllocColorPlanes: + case X_AllocNamedColor: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, + COLORMAP__READ | COLORMAP__STORE); + break; + case X_CopyColormapAndFree: + rval = IDPERM(client, xCopyColormapAndFreeReq, mid, + SECCLASS_COLORMAP, COLORMAP__CREATE) + && IDPERM(client, xCopyColormapAndFreeReq, srcCmap, + SECCLASS_COLORMAP, + COLORMAP__READ | COLORMAP__FREE); + break; + case X_CreateColormap: + rval = IDPERM(client, xCreateColormapReq, mid, + SECCLASS_COLORMAP, COLORMAP__CREATE) + && IDPERM(client, xCreateColormapReq, window, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_FreeColormap: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__FREE); + break; + case X_FreeColors: + rval = IDPERM(client, xFreeColorsReq, cmap, + SECCLASS_COLORMAP, COLORMAP__STORE); + break; + case X_InstallColormap: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__INSTALL) + && ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__INSTALL); + break; + case X_ListInstalledColormaps: + rval = ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__LIST); + break; + case X_LookupColor: + case X_QueryColors: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__READ); + break; + case X_StoreColors: + case X_StoreNamedColor: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__STORE); + break; + case X_UninstallColormap: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__UNINSTALL) + && ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__UNINSTALL); + break; + + /* Font class control requirements */ + case X_CloseFont: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_FONT, FONT__FREE); + break; + case X_ImageText8: + case X_ImageText16: + /* Font accesses checked through the resource manager */ + rval = IDPERM(client, xImageTextReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_OpenFont: + rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD) + && IDPERM(client, xOpenFontReq, fid, + SECCLASS_FONT, FONT__USE); + break; + case X_PolyText8: + case X_PolyText16: + /* Font accesses checked through the resource manager */ + rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD) + && IDPERM(client, xPolyTextReq, gc, + SECCLASS_GC, GC__SETATTR) + && IDPERM(client, xPolyTextReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + + /* Pixmap class control requirements */ + case X_CreatePixmap: + rval = IDPERM(client, xCreatePixmapReq, pid, + SECCLASS_DRAWABLE, DRAWABLE__CREATE); + break; + case X_FreePixmap: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_DRAWABLE, DRAWABLE__DESTROY); + break; + + /* Cursor class control requirements */ + case X_CreateCursor: + rval = IDPERM(client, xCreateCursorReq, cid, + SECCLASS_CURSOR, CURSOR__CREATE) + && IDPERM(client, xCreateCursorReq, source, + SECCLASS_DRAWABLE, DRAWABLE__DRAW) + && IDPERM(client, xCreateCursorReq, mask, + SECCLASS_DRAWABLE, DRAWABLE__COPY); + break; + case X_CreateGlyphCursor: + rval = IDPERM(client, xCreateGlyphCursorReq, cid, + SECCLASS_CURSOR, CURSOR__CREATEGLYPH) + && IDPERM(client, xCreateGlyphCursorReq, source, + SECCLASS_FONT, FONT__USE) + && IDPERM(client, xCreateGlyphCursorReq, mask, + SECCLASS_FONT, FONT__USE); + break; + case X_RecolorCursor: + rval = IDPERM(client, xRecolorCursorReq, cursor, + SECCLASS_CURSOR, CURSOR__SETATTR); + break; + case X_FreeCursor: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_CURSOR, CURSOR__FREE); + break; + + /* GC class control requirements */ + case X_CreateGC: + rval = IDPERM(client, xCreateGCReq, gc, + SECCLASS_GC, GC__CREATE | GC__SETATTR); + break; + case X_ChangeGC: + case X_SetDashes: + case X_SetClipRectangles: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_GC, GC__SETATTR); + break; + case X_CopyGC: + rval = IDPERM(client, xCopyGCReq, srcGC, + SECCLASS_GC, GC__GETATTR) + && IDPERM(client, xCopyGCReq, dstGC, + SECCLASS_GC, GC__SETATTR); + break; + case X_FreeGC: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_GC, GC__FREE); + break; + + /* Server class control requirements */ + case X_GrabServer: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GRAB); + break; + case X_UngrabServer: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__UNGRAB); + break; + case X_ForceScreenSaver: + case X_GetScreenSaver: + case X_SetScreenSaver: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SCREENSAVER); + break; + case X_ListHosts: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETHOSTLIST); + break; + case X_ChangeHosts: + case X_SetAccessControl: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SETHOSTLIST); + break; + case X_GetFontPath: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETFONTPATH); + break; + case X_SetFontPath: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SETFONTPATH); + break; + case X_QueryBestSize: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETATTR); + break; + + default: + rval = TRUE; + break; + } + if (!rval) + rec->rval = FALSE; +} + +CALLBACK(XSELinuxExtDispatch) +{ + XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; + ClientPtr client = rec->client; + ExtensionEntry *ext = rec->ext; + security_id_t extsid; + access_vector_t perm; + REQUEST(xReq); + + /* XXX there should be a separate callback for this */ + if (!EXTENSIONSID(ext)) + { + extsid = ObjectSIDByLabel(NULL, SECCLASS_XEXTENSION, ext->name); + if (!extsid) + return; + EXTENSIONSID(ext) = extsid; + } + + extsid = (security_id_t)EXTENSIONSID(ext); + perm = ((stuff->reqType == X_QueryExtension) || + (stuff->reqType == X_ListExtensions)) ? + XEXTENSION__QUERY : XEXTENSION__USE; + + if (HAVESTATE(client)) + { + XSELinuxAuditRec auditdata; + auditdata.client = client; + auditdata.property = NULL; + auditdata.extension = ext->name; + errno = 0; + if (avc_has_perm(SID(client), extsid, SECCLASS_XEXTENSION, + perm, &AEREF(client), &auditdata) < 0) + { + if (errno != EACCES) + ErrorF("ExtDispatch: unexpected error %d\n", errno); + rec->rval = FALSE; + } + } else + ErrorF("No client state in extension dispatcher!\n"); +} /* XSELinuxExtDispatch */ + +CALLBACK(XSELinuxProperty) +{ + XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata; + WindowPtr pWin = rec->pWin; + ClientPtr client = rec->client; + ClientPtr tclient; + access_vector_t perm = 0; + security_id_t propsid; + char *propname = NameForAtom(rec->propertyName); + + tclient = wClient(pWin); + if (!tclient || !HAVESTATE(tclient)) + return; + + propsid = ObjectSIDByLabel(SID(tclient)->ctx, SECCLASS_PROPERTY, propname); + if (!propsid) + return; + + if (rec->access_mode & SecurityReadAccess) + perm |= PROPERTY__READ; + if (rec->access_mode & SecurityWriteAccess) + perm |= PROPERTY__WRITE; + if (rec->access_mode & SecurityDestroyAccess) + perm |= PROPERTY__FREE; + if (!rec->access_mode) + perm = PROPERTY__READ | PROPERTY__WRITE | PROPERTY__FREE; + + if (HAVESTATE(client)) + { + XSELinuxAuditRec auditdata; + auditdata.client = client; + auditdata.property = propname; + auditdata.extension = NULL; + errno = 0; + if (avc_has_perm(SID(client), propsid, SECCLASS_PROPERTY, + perm, &AEREF(client), &auditdata) < 0) + { + if (errno != EACCES) + ErrorF("Property: unexpected error %d\n", errno); + rec->rval = SecurityIgnoreOperation; + } + } else + ErrorF("No client state in property callback!\n"); + + /* XXX this should be saved in the property structure */ + sidput(propsid); +} /* XSELinuxProperty */ + +CALLBACK(XSELinuxResLookup) +{ + XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata; + ClientPtr client = rec->client; + REQUEST(xReq); + access_vector_t perm = 0; + Bool rval = TRUE; + + /* serverClient requests OK */ + if (client->index == 0) + return; + + switch(rec->rtype) { + case RT_FONT: { + switch(stuff->reqType) { + case X_ImageText8: + case X_ImageText16: + case X_PolyText8: + case X_PolyText16: + perm = FONT__USE; + break; + case X_ListFonts: + case X_ListFontsWithInfo: + case X_QueryFont: + case X_QueryTextExtents: + perm = FONT__GETATTR; + break; + default: + break; + } + if (perm) + rval = IDPerm(client, rec->id, SECCLASS_FONT, perm); + break; + } + default: + break; + } + if (!rval) + rec->rval = FALSE; +} /* XSELinuxResLookup */ + +CALLBACK(XSELinuxMap) +{ + XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; + if (!IDPerm(rec->client, rec->pWin->drawable.id, + SECCLASS_WINDOW, WINDOW__MAP)) + rec->rval = FALSE; +} /* XSELinuxMap */ + +CALLBACK(XSELinuxBackgrnd) +{ + XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; + if (!IDPerm(rec->client, rec->pWin->drawable.id, + SECCLASS_WINDOW, WINDOW__TRANSPARENT)) + rec->rval = FALSE; +} /* XSELinuxBackgrnd */ + +CALLBACK(XSELinuxDrawable) +{ + XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; + if (!IDPerm(rec->client, rec->pDraw->id, + SECCLASS_DRAWABLE, DRAWABLE__COPY)) + rec->rval = FALSE; +} /* XSELinuxDrawable */ + +CALLBACK(XSELinuxHostlist) +{ + XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata; + access_vector_t perm = (rec->access_mode == SecurityReadAccess) ? + XSERVER__GETHOSTLIST : XSERVER__SETHOSTLIST; + + if (!ServerPerm(rec->client, SECCLASS_XSERVER, perm)) + rec->rval = FALSE; +} /* XSELinuxHostlist */ + +/* Extension callbacks */ +CALLBACK(XSELinuxClientState) +{ + NewClientInfoRec *pci = (NewClientInfoRec *)calldata; + ClientPtr client = pci->client; + + switch(client->clientState) + { + case ClientStateInitial: + AssignClientState(serverClient); + break; + + case ClientStateRunning: + { + AssignClientState(client); + break; + } + case ClientStateGone: + case ClientStateRetained: + { + FreeClientState(client); + break; + } + default: break; + } +} /* XSELinuxClientState */ + +static char *XSELinuxKeywords[] = { +#define XSELinuxKeywordComment 0 + "#", +#define XSELinuxKeywordProperty 1 + "property", +#define XSELinuxKeywordExtension 2 + "extension", +#define XSELinuxKeywordNonlocalContext 3 + "nonlocal_context", +#define XSELinuxKeywordRootWindowContext 4 + "root_window_context", +#define XSELinuxKeywordDefault 5 + "default" +}; + +#define NUMKEYWORDS (sizeof(XSELinuxKeywords) / sizeof(char *)) + +#ifndef __UNIXOS2__ +#define XSELinuxIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') ) +#else +#define XSELinuxIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') ) +#endif + +static char * +XSELinuxSkipWhitespace( + char *p) +{ + while (XSELinuxIsWhitespace(*p)) + p++; + return p; +} /* XSELinuxSkipWhitespace */ + +static char * +XSELinuxParseString( + char **rest) +{ + char *startOfString; + char *s = *rest; + char endChar = 0; + + s = XSELinuxSkipWhitespace(s); + + if (*s == '"' || *s == '\'') + { + endChar = *s++; + startOfString = s; + while (*s && (*s != endChar)) + s++; + } + else + { + startOfString = s; + while (*s && !XSELinuxIsWhitespace(*s)) + s++; + } + if (*s) + { + *s = '\0'; + *rest = s + 1; + return startOfString; + } + else + { + *rest = s; + return (endChar) ? NULL : startOfString; + } +} /* XSELinuxParseString */ + +static int +XSELinuxParseKeyword( + char **p) +{ + int i; + char *s = *p; + s = XSELinuxSkipWhitespace(s); + for (i = 0; i < NUMKEYWORDS; i++) + { + int len = strlen(XSELinuxKeywords[i]); + if (strncmp(s, XSELinuxKeywords[i], len) == 0) + { + *p = s + len; + return (i); + } + } + *p = s; + return -1; +} /* XSELinuxParseKeyword */ + +static Bool +XSELinuxTypeIsValid(char *typename) +{ + security_context_t base, new; + context_t con; + Bool ret = FALSE; + + /* get the server's context */ + if (getcon(&base) < 0) + goto out; + + /* make a new context-manipulation object */ + con = context_new(base); + if (!con) + goto out_free; + + /* set the role */ + if (context_role_set(con, "object_r")) + goto out_free2; + + /* set the type */ + if (context_type_set(con, typename)) + goto out_free2; + + /* get a context string - note: context_str() returns a pointer + * to the string inside the context; the returned pointer should + * not be freed + */ + new = context_str(con); + if (!new) + goto out_free2; + + /* finally, check to see if it's valid */ + if (security_check_context(new) == 0) + ret = TRUE; + +out_free2: + context_free(con); +out_free: + freecon(base); +out: + return ret; +} + +static Bool +XSELinuxParsePropertyTypeRule(char *p) +{ + int keyword; + char *propname = NULL, *propcopy = NULL; + char *typename = NULL, *typecopy = NULL; + char **newTypes; + Bool defaultPropertyType = FALSE; + + /* get property name */ + keyword = XSELinuxParseKeyword(&p); + if (keyword == XSELinuxKeywordDefault) + { + defaultPropertyType = TRUE; + } + else + { + propname = XSELinuxParseString(&p); + if (!propname || (strlen(propname) == 0)) + { + return FALSE; + } + } + + /* get the SELinux type corresponding to the property */ + typename = XSELinuxParseString(&p); + if (!typename || (strlen(typename) == 0)) + return FALSE; + + /* validate the type */ + if (XSELinuxTypeIsValid(typename) != TRUE) + return FALSE; + + /* if it's the default property, save it to append to the end of the + * property types list + */ + if (defaultPropertyType == TRUE) + { + if (XSELinuxPropertyTypeDefault != NULL) + { + return FALSE; + } + else + { + XSELinuxPropertyTypeDefault = (char *)xalloc(strlen(typename)+1); + if (!XSELinuxPropertyTypeDefault) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(XSELinuxPropertyTypeDefault, typename); + return TRUE; + } + } + + /* insert the property and type into the propertyTypes array */ + propcopy = (char *)xalloc(strlen(propname)+1); + if (!propcopy) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(propcopy, propname); + + typecopy = (char *)xalloc(strlen(typename)+1); + if (!typecopy) + { + ErrorF("XSELinux: out of memory\n"); + xfree(propcopy); + return FALSE; + } + strcpy(typecopy, typename); + + newTypes = (char **)xrealloc(propertyTypes, sizeof (char *) * ((propertyTypesCount+1) * 2)); + if (!newTypes) + { + ErrorF("XSELinux: out of memory\n"); + xfree(propcopy); + xfree(typecopy); + return FALSE; + } + + propertyTypesCount++; + + newTypes[propertyTypesCount*2 - 2] = propcopy; + newTypes[propertyTypesCount*2 - 1] = typecopy; + + propertyTypes = newTypes; + + return TRUE; +} /* XSELinuxParsePropertyTypeRule */ + +static Bool +XSELinuxParseExtensionTypeRule(char *p) +{ + int keyword; + char *extname = NULL, *extcopy = NULL; + char *typename = NULL, *typecopy = NULL; + char **newTypes; + Bool defaultExtensionType = FALSE; + + /* get extension name */ + keyword = XSELinuxParseKeyword(&p); + if (keyword == XSELinuxKeywordDefault) + { + defaultExtensionType = TRUE; + } + else + { + extname = XSELinuxParseString(&p); + if (!extname || (strlen(extname) == 0)) + { + return FALSE; + } + } + + /* get the SELinux type corresponding to the extension */ + typename = XSELinuxParseString(&p); + if (!typename || (strlen(typename) == 0)) + return FALSE; + + /* validate the type */ + if (XSELinuxTypeIsValid(typename) != TRUE) + return FALSE; + + /* if it's the default extension, save it to append to the end of the + * extension types list + */ + if (defaultExtensionType == TRUE) + { + if (XSELinuxExtensionTypeDefault != NULL) + { + return FALSE; + } + else + { + XSELinuxExtensionTypeDefault = (char *)xalloc(strlen(typename)+1); + if (!XSELinuxExtensionTypeDefault) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(XSELinuxExtensionTypeDefault, typename); + return TRUE; + } + } + + /* insert the extension and type into the extensionTypes array */ + extcopy = (char *)xalloc(strlen(extname)+1); + if (!extcopy) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(extcopy, extname); + + typecopy = (char *)xalloc(strlen(typename)+1); + if (!typecopy) + { + ErrorF("XSELinux: out of memory\n"); + xfree(extcopy); + return FALSE; + } + strcpy(typecopy, typename); + + newTypes = (char **)xrealloc(extensionTypes, sizeof(char *) *( (extensionTypesCount+1) * 2)); + if (!newTypes) + { + ErrorF("XSELinux: out of memory\n"); + xfree(extcopy); + xfree(typecopy); + return FALSE; + } + + extensionTypesCount++; + + newTypes[extensionTypesCount*2 - 2] = extcopy; + newTypes[extensionTypesCount*2 - 1] = typecopy; + + extensionTypes = newTypes; + + return TRUE; +} /* XSELinuxParseExtensionTypeRule */ + +static Bool +XSELinuxParseNonlocalContext(char *p) +{ + char *context; + + context = XSELinuxParseString(&p); + if (!context || (strlen(context) == 0)) + { + return FALSE; + } + + if (XSELinuxNonlocalContextDefault != NULL) + { + return FALSE; + } + + /* validate the context */ + if (security_check_context(context)) + { + return FALSE; + } + + XSELinuxNonlocalContextDefault = (char *)xalloc(strlen(context)+1); + if (!XSELinuxNonlocalContextDefault) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(XSELinuxNonlocalContextDefault, context); + + return TRUE; +} /* XSELinuxParseNonlocalContext */ + +static Bool +XSELinuxParseRootWindowContext(char *p) +{ + char *context; + + context = XSELinuxParseString(&p); + if (!context || (strlen(context) == 0)) + { + return FALSE; + } + + if (XSELinuxRootWindowContext != NULL) + { + return FALSE; + } + + /* validate the context */ + if (security_check_context(context)) + { + return FALSE; + } + + XSELinuxRootWindowContext = (char *)xalloc(strlen(context)+1); + if (!XSELinuxRootWindowContext) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(XSELinuxRootWindowContext, context); + + return TRUE; +} /* XSELinuxParseRootWindowContext */ + +static Bool +XSELinuxLoadConfigFile(void) +{ + FILE *f; + int lineNumber = 0; + char **newTypes; + Bool ret = FALSE; + + if (!XSELINUXCONFIGFILE) + return FALSE; + + /* some initial bookkeeping */ + propertyTypesCount = extensionTypesCount = 0; + propertyTypes = extensionTypes = NULL; + XSELinuxPropertyTypeDefault = XSELinuxExtensionTypeDefault = NULL; + XSELinuxNonlocalContextDefault = NULL; + XSELinuxRootWindowContext = NULL; + +#ifndef __UNIXOS2__ + f = fopen(XSELINUXCONFIGFILE, "r"); +#else + f = fopen((char*)__XOS2RedirRoot(XSELINUXCONFIGFILE), "r"); +#endif + if (!f) + { + ErrorF("Error opening XSELinux policy file %s\n", XSELINUXCONFIGFILE); + return FALSE; + } + + while (!feof(f)) + { + char buf[200]; + Bool validLine; + char *p; + + if (!(p = fgets(buf, sizeof(buf), f))) + break; + lineNumber++; + + switch (XSELinuxParseKeyword(&p)) + { + case XSELinuxKeywordComment: + validLine = TRUE; + break; + + case XSELinuxKeywordProperty: + validLine = XSELinuxParsePropertyTypeRule(p); + break; + + case XSELinuxKeywordExtension: + validLine = XSELinuxParseExtensionTypeRule(p); + break; + + case XSELinuxKeywordNonlocalContext: + validLine = XSELinuxParseNonlocalContext(p); + break; + + case XSELinuxKeywordRootWindowContext: + validLine = XSELinuxParseRootWindowContext(p); + break; + + default: + validLine = (*p == '\0'); + break; + } + + if (!validLine) + { + ErrorF("XSELinux: Line %d of %s is invalid\n", + lineNumber, XSELINUXCONFIGFILE); + goto out; + } + } + + /* check to make sure the default types and the nonlocal context + * were specified + */ + if (XSELinuxPropertyTypeDefault == NULL) + { + ErrorF("XSELinux: No default property type specified\n"); + goto out; + } + else if (XSELinuxExtensionTypeDefault == NULL) + { + ErrorF("XSELinux: No default extension type specified\n"); + goto out; + } + else if (XSELinuxNonlocalContextDefault == NULL) + { + ErrorF("XSELinux: No default context for non-local clients specified\n"); + goto out; + } + else if (XSELinuxRootWindowContext == NULL) + { + ErrorF("XSELinux: No context specified for the root window\n"); + goto out; + } + + /* Finally, append the default property and extension types to the + * bottoms of the propertyTypes and extensionTypes arrays, respectively. + * The 'name' of the property / extension is NULL. + */ + newTypes = (char **)xrealloc(propertyTypes, sizeof(char *) *((propertyTypesCount+1) * 2)); + if (!newTypes) + { + ErrorF("XSELinux: out of memory\n"); + goto out; + } + propertyTypesCount++; + newTypes[propertyTypesCount*2 - 2] = NULL; + newTypes[propertyTypesCount*2 - 1] = XSELinuxPropertyTypeDefault; + propertyTypes = newTypes; + + newTypes = (char **)xrealloc(extensionTypes, sizeof(char *) *((extensionTypesCount+1) * 2)); + if (!newTypes) + { + ErrorF("XSELinux: out of memory\n"); + goto out; + } + extensionTypesCount++; + newTypes[extensionTypesCount*2 - 2] = NULL; + newTypes[extensionTypesCount*2 - 1] = XSELinuxExtensionTypeDefault; + extensionTypes = newTypes; + + ret = TRUE; + +out: + fclose(f); + return ret; +} /* XSELinuxLoadConfigFile */ + +static void +XSELinuxFreeConfigData(void) +{ + char **ptr; + + /* Free all the memory in the table until we reach the NULL, then + * skip one past the NULL and free the default type. Then take care + * of some bookkeeping. + */ + for (ptr = propertyTypes; *ptr; ptr++) + xfree(*ptr); + ptr++; + xfree(*ptr); + + XSELinuxPropertyTypeDefault = NULL; + propertyTypesCount = 0; + + xfree(propertyTypes); + propertyTypes = NULL; + + /* ... and the same for the extension type table */ + for (ptr = extensionTypes; *ptr; ptr++) + xfree(*ptr); + ptr++; + xfree(*ptr); + + XSELinuxExtensionTypeDefault = NULL; + extensionTypesCount = 0; + + xfree(extensionTypes); + extensionTypes = NULL; + + /* finally, take care of the context for non-local connections */ + xfree(XSELinuxNonlocalContextDefault); + XSELinuxNonlocalContextDefault = NULL; + + /* ... and for the root window */ + xfree(XSELinuxRootWindowContext); + XSELinuxRootWindowContext = NULL; +} /* XSELinuxFreeConfigData */ + +/* Extension dispatch functions */ +static int +ProcXSELinuxDispatch(ClientPtr client) +{ + return BadRequest; +} /* ProcXSELinuxDispatch */ + +static void +XSELinuxResetProc(ExtensionEntry *extEntry) +{ + FreeClientState(serverClient); + + XSELinuxFreeConfigData(); + + audit_close(audit_fd); + + avc_destroy(); +} /* XSELinuxResetProc */ + +static void +XSELinuxAVCAudit(void *auditdata, + security_class_t class, + char *msgbuf, + size_t msgbufsize) +{ + XSELinuxAuditRec *audit = (XSELinuxAuditRec*)auditdata; + ClientPtr client = audit->client; + char requestNum[8]; + REQUEST(xReq); + + if (stuff) + snprintf(requestNum, 8, "%d", stuff->reqType); + + snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s", + stuff ? "request=" : "", + stuff ? requestNum : "", + audit->property ? " property=" : "", + audit->property ? audit->property : "", + audit->extension ? " extension=" : "", + audit->extension ? audit->extension : ""); +} + +static void +XSELinuxAVCLog(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + VErrorF(fmt, ap); + va_end(ap); +} + +/* XSELinuxExtensionSetup + * + * Set up the XSELinux Extension (pre-init) + */ +void +XSELinuxExtensionSetup(INITARGS) +{ + /* Allocate the client private index */ + clientPrivateIndex = AllocateClientPrivateIndex(); + if (!AllocateClientPrivate(clientPrivateIndex, + sizeof (XSELinuxClientStateRec))) + FatalError("XSELinux: Failed to allocate client private.\n"); + + /* Allocate the extension private index */ + extnsnPrivateIndex = AllocateExtensionPrivateIndex(); + if (!AllocateExtensionPrivate(extnsnPrivateIndex, 0)) + FatalError("XSELinux: Failed to allocate extension private.\n"); +} + +/* XSELinuxExtensionInit + * + * Initialize the XSELinux Extension + */ +void +XSELinuxExtensionInit(INITARGS) +{ + ExtensionEntry *extEntry; + struct avc_log_callback alc = {XSELinuxAVCLog, XSELinuxAVCAudit}; + + if (!is_selinux_enabled()) + { + ErrorF("SELinux Extension failed to load: SELinux not enabled\n"); + return; + } + + if (avc_init("xserver", NULL, &alc, NULL, NULL) < 0) + { + FatalError("couldn't initialize SELinux userspace AVC\n"); + } + + if (!AddCallback(&ClientStateCallback, XSELinuxClientState, NULL)) + return; + + /* Load the config file. If this fails, shut down the server, + * since an unknown security status is worse than no security. + * + * Note that this must come before we assign a security state + * for the serverClient, because the serverClient's root windows + * are assigned a context based on data in the config file. + */ + if (XSELinuxLoadConfigFile() != TRUE) + { + FatalError("XSELinux: Failed to load security policy\n"); + } + + /* prepare for auditing */ + audit_fd = audit_open(); + if (audit_fd < 0) + { + FatalError("XSELinux: Failed to open the system audit log\n"); + } + + /* register security callbacks */ + XaceRegisterCallback(XACE_CORE_DISPATCH, XSELinuxCoreDispatch, NULL); + XaceRegisterCallback(XACE_EXT_ACCESS, XSELinuxExtDispatch, NULL); + XaceRegisterCallback(XACE_EXT_DISPATCH, XSELinuxExtDispatch, NULL); + XaceRegisterCallback(XACE_RESOURCE_ACCESS, XSELinuxResLookup, NULL); + XaceRegisterCallback(XACE_MAP_ACCESS, XSELinuxMap, NULL); + XaceRegisterCallback(XACE_HOSTLIST_ACCESS, XSELinuxHostlist, NULL); + XaceRegisterCallback(XACE_BACKGRND_ACCESS, XSELinuxBackgrnd, NULL); + XaceRegisterCallback(XACE_DRAWABLE_ACCESS, XSELinuxDrawable, NULL); + XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); + /* XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, XSELinuxDeclare, NULL); + XaceRegisterCallback(XACE_DEVICE_ACCESS, XSELinuxDevice, NULL); */ + + /* register extension with server */ + extEntry = AddExtension(XSELINUX_EXTENSION_NAME, + XSELinuxNumberEvents, XSELinuxNumberErrors, + ProcXSELinuxDispatch, ProcXSELinuxDispatch, + XSELinuxResetProc, StandardMinorOpcode); +} diff --git a/Xext/xselinux.h b/Xext/xselinux.h new file mode 100644 index 000000000..eff6db5f4 --- /dev/null +++ b/Xext/xselinux.h @@ -0,0 +1,29 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice 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 NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR 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. + +********************************************************/ + +#ifndef _XSELINUX_H +#define _XSELINUX_H + +#define XSELINUX_EXTENSION_NAME "SELinux" +#define XSELINUX_MAJOR_VERSION 1 +#define XSELINUX_MINOR_VERSION 0 +#define XSELinuxNumberEvents 0 +#define XSELinuxNumberErrors 0 + +#endif /* _XSELINUX_H */ From 9aa44e3e4c321f42d8e64f83c7f0932470593c26 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:15:19 -0400 Subject: [PATCH 002/552] Add SELinux extension configure-time support. --- configure.ac | 16 +++++++++++++++- include/dix-config.h.in | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 49dfad2d3..cf838b8d6 100644 --- a/configure.ac +++ b/configure.ac @@ -414,6 +414,7 @@ AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinera AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes]) AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes]) AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) +AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (default: enabled)]), [XSELINUX=$enableval], [XSELINUX=$XACE]) AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE]) AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) @@ -627,6 +628,19 @@ if test "x$XACE" = xyes; then AC_DEFINE(XACE, 1, [Build X-ACE extension]) fi +AM_CONDITIONAL(XSELINUX, [test "x$XSELINUX" = xyes]) +if test "x$XSELINUX" = xyes; then + if test "x$XACE" != xyes; then + AC_MSG_ERROR([cannot build SELinux extension without X-ACE]) + fi + AC_CHECK_HEADERS([selinux/selinux.h selinux/avc.h], [], AC_MSG_ERROR([SELinux include files not found])) + AC_CHECK_LIB(selinux, avc_init, [], AC_MSG_ERROR([SELinux library not found])) + AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers])) + AC_CHECK_LIB(audit, audit_log_avc, [], AC_MSG_ERROR([SELinux extension requires audit system library])) + AC_DEFINE(XSELINUX, 1, [Build SELinux extension]) + SELINUX_LIB="-lselinux -laudit" +fi + AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes]) if test "x$XCSECURITY" = xyes; then if test "x$XACE" != xyes; then @@ -1042,7 +1056,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" - XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB" + XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $SELINUX_LIB $OS_LIB" dnl Check to see if dlopen is in default libraries (like Solaris, which dnl has it in libc), or if libdl is needed to get it. diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 571a86719..f66454812 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -311,6 +311,9 @@ /* Build X-ACE extension */ #undef XACE +/* Build SELinux extension */ +#undef XSELINUX + /* Support XCMisc extension */ #undef XCMISC From 9c503f09ce78d952d0ece77c424e42b6df3fa9ad Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:17:01 -0400 Subject: [PATCH 003/552] Add SELinux extension to the module/extension loader. --- hw/xfree86/dixmods/extmod/modinit.h | 5 +++++ mi/miinitext.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index 41f060b2a..131b9e6e6 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -129,6 +129,11 @@ extern void ShmRegisterFuncs( extern void XaceExtensionInit(INITARGS); #endif +#ifdef XSELINUX +extern void XSELinuxExtensionSetup(INITARGS); +extern void XSELinuxExtensionInit(INITARGS); +#endif + #if 1 extern void SecurityExtensionSetup(INITARGS); extern void SecurityExtensionInit(INITARGS); diff --git a/mi/miinitext.c b/mi/miinitext.c index aafd014ae..bab45cd3a 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -248,6 +248,9 @@ typedef void (*InitExtension)(INITARGS); #include "securitysrv.h" #include #endif +#ifdef XSELINUX +#include "xselinux.h" +#endif #ifdef PANORAMIX #include #endif @@ -321,6 +324,10 @@ extern void XaceExtensionInit(INITARGS); extern void SecurityExtensionSetup(INITARGS); extern void SecurityExtensionInit(INITARGS); #endif +#ifdef XSELINUX +extern void XSELinuxExtensionSetup(INITARGS); +extern void XSELinuxExtensionInit(INITARGS); +#endif #ifdef XPRINT extern void XpExtensionInit(INITARGS); #endif @@ -532,6 +539,9 @@ InitExtensions(argc, argv) #ifdef XCSECURITY SecurityExtensionSetup(); #endif +#ifdef XSELINUX + XSELinuxExtensionSetup(); +#endif #ifdef PANORAMIX # if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX) if (!noPanoramiXExtension) PanoramiXExtensionInit(); @@ -600,6 +610,9 @@ InitExtensions(argc, argv) #ifdef XCSECURITY if (!noSecurityExtension) SecurityExtensionInit(); #endif +#ifdef XSELINUX + XSELinuxExtensionInit(); +#endif #ifdef XPRINT XpExtensionInit(); /* server-specific extension, cannot be disabled */ #endif @@ -705,6 +718,9 @@ static ExtensionModule staticExtensions[] = { #ifdef XCSECURITY { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, SecurityExtensionSetup, NULL }, #endif +#ifdef XSELINUX + { XSELinuxExtensionInit, XSELINUX_EXTENSION_NAME, NULL, XSELinuxExtensionSetup, NULL }, +#endif #ifdef XPRINT { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL }, #endif From 6950267dd690ef8e29b1c32a157dd64c9b79c06d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:31:18 -0400 Subject: [PATCH 004/552] Add SELinux extension configure-time support. --- Xext/Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 6ea3d7445..be04c849a 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -76,6 +76,16 @@ if XACE BUILTIN_SRCS += $(XACE_SRCS) endif +# SELinux extension: provides SELinux policy support for X objects +# requires X-ACE extension +XSELINUX_SRCS = xselinux.c xselinux.h +if XSELINUX +BUILTIN_SRCS += $(XSELINUX_SRCS) + +SERVERCONFIG_DATA += XSELinuxConfig +AM_CFLAGS += -DXSELINUXCONFIGFILE=\"$(SERVERCONFIGdir)/XSELinuxConfig\" +endif + # Security extension: multi-level security to protect clients from each other XCSECURITY_SRCS = security.c securitysrv.h if XCSECURITY From df351f1efbcc95f94c719fcf993c480155c511e9 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 4 Oct 2006 16:23:35 -0400 Subject: [PATCH 005/552] Experimental window property holding security context. --- Xext/xselinux.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 5a6d2ef00..df19e5df0 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -35,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include +#include #include #include #include "dixstruct.h" @@ -120,6 +121,10 @@ static char **extensionTypes = NULL; static int extensionTypesCount = 0; static char *XSELinuxExtensionTypeDefault = NULL; +/* Atoms for SELinux window labeling properties */ +Atom atom_ctx; +Atom atom_client_ctx; + /* security context for non-local clients */ static char *XSELinuxNonlocalContextDefault = NULL; @@ -1196,6 +1201,28 @@ CALLBACK(XSELinuxClientState) } } /* XSELinuxClientState */ +/* Labeling callbacks */ +CALLBACK(XSELinuxWindowInit) +{ + XaceWindowRec *rec = (XaceWindowRec*)calldata; + security_context_t ctx; + int rc; + + if (HAVESTATE(rec->client)) { + rc = avc_sid_to_context(SID(rec->client), &ctx); + if (rc < 0) + FatalError("Failed to get security context!\n"); + rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, + PropModeReplace, strlen(ctx), ctx, FALSE); + freecon(ctx); + } + else + rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, + PropModeReplace, 10, "UNLABELED!", FALSE); + if (rc != Success) + FatalError("Failed to set context property on window!\n"); +} /* XSELinuxWindowInit */ + static char *XSELinuxKeywords[] = { #define XSELinuxKeywordComment 0 "#", @@ -1844,6 +1871,14 @@ XSELinuxExtensionInit(INITARGS) if (!AddCallback(&ClientStateCallback, XSELinuxClientState, NULL)) return; + /* Create atoms for doing window labeling */ + atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, 1); + if (atom_ctx == BAD_RESOURCE) + return; + atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, 1); + if (atom_client_ctx == BAD_RESOURCE) + return; + /* Load the config file. If this fails, shut down the server, * since an unknown security status is worse than no security. * @@ -1873,6 +1908,7 @@ XSELinuxExtensionInit(INITARGS) XaceRegisterCallback(XACE_BACKGRND_ACCESS, XSELinuxBackgrnd, NULL); XaceRegisterCallback(XACE_DRAWABLE_ACCESS, XSELinuxDrawable, NULL); XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); + XaceRegisterCallback(XACE_WINDOW_INIT, XSELinuxWindowInit, NULL); /* XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, XSELinuxDeclare, NULL); XaceRegisterCallback(XACE_DEVICE_ACCESS, XSELinuxDevice, NULL); */ From 23f6f08b7b5c9a4297fd223d232a7e9f45376550 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 5 Oct 2006 16:07:26 -0400 Subject: [PATCH 006/552] Improve error handling, messages during initialization. --- Xext/xselinux.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index df19e5df0..2f960d1a9 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1211,7 +1211,7 @@ CALLBACK(XSELinuxWindowInit) if (HAVESTATE(rec->client)) { rc = avc_sid_to_context(SID(rec->client), &ctx); if (rc < 0) - FatalError("Failed to get security context!\n"); + FatalError("XSELinux: Failed to get security context!\n"); rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); freecon(ctx); @@ -1220,7 +1220,7 @@ CALLBACK(XSELinuxWindowInit) rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, 10, "UNLABELED!", FALSE); if (rc != Success) - FatalError("Failed to set context property on window!\n"); + FatalError("XSELinux: Failed to set context property on window!\n"); } /* XSELinuxWindowInit */ static char *XSELinuxKeywords[] = { @@ -1859,13 +1859,13 @@ XSELinuxExtensionInit(INITARGS) if (!is_selinux_enabled()) { - ErrorF("SELinux Extension failed to load: SELinux not enabled\n"); + ErrorF("XSELinux: Extension failed to load: SELinux not enabled\n"); return; } if (avc_init("xserver", NULL, &alc, NULL, NULL) < 0) { - FatalError("couldn't initialize SELinux userspace AVC\n"); + FatalError("XSELinux: Couldn't initialize SELinux userspace AVC\n"); } if (!AddCallback(&ClientStateCallback, XSELinuxClientState, NULL)) @@ -1874,10 +1874,10 @@ XSELinuxExtensionInit(INITARGS) /* Create atoms for doing window labeling */ atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, 1); if (atom_ctx == BAD_RESOURCE) - return; + FatalError("XSELinux: Failed to create atom\n"); atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, 1); if (atom_client_ctx == BAD_RESOURCE) - return; + FatalError("XSELinux: Failed to create atom\n"); /* Load the config file. If this fails, shut down the server, * since an unknown security status is worse than no security. From 92387e99d085b0b081fcedb2f20304eb0ac536b1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 26 Oct 2006 20:20:57 -0400 Subject: [PATCH 007/552] Change symbol in libaudit library test. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fe48e4ff5..1fd4a1b3f 100644 --- a/configure.ac +++ b/configure.ac @@ -642,7 +642,7 @@ if test "x$XSELINUX" = xyes; then AC_CHECK_HEADERS([selinux/selinux.h selinux/avc.h], [], AC_MSG_ERROR([SELinux include files not found])) AC_CHECK_LIB(selinux, avc_init, [], AC_MSG_ERROR([SELinux library not found])) AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers])) - AC_CHECK_LIB(audit, audit_log_avc, [], AC_MSG_ERROR([SELinux extension requires audit system library])) + AC_CHECK_LIB(audit, audit_open, [], AC_MSG_ERROR([SELinux extension requires audit system library])) AC_DEFINE(XSELINUX, 1, [Build SELinux extension]) SELINUX_LIB="-lselinux -laudit" fi From f3c60900e575e65254cd2576cc6c90b97c8f63ae Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 29 Nov 2006 22:19:57 -0500 Subject: [PATCH 008/552] Add required root window context to config file. --- Xext/XSELinuxConfig | 1 + 1 file changed, 1 insertion(+) diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig index faf815e27..9c953f55f 100644 --- a/Xext/XSELinuxConfig +++ b/Xext/XSELinuxConfig @@ -9,6 +9,7 @@ # security policy. Only one nonlocal_context rule may be defined. # nonlocal_context system_u:object_r:remote_xclient_t:s1 +root_window_context system_u:object_r:root_window_t:s1 # # Property rules map a property name to a SELinux type. The type must From 83aad2be8a80890f349c2f9caf84786333f7cc8c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:11:04 -0400 Subject: [PATCH 009/552] Add SELinux extension source files. --- Xext/XSELinuxConfig | 83 ++ Xext/xselinux.c | 1884 +++++++++++++++++++++++++++++++++++++++++++ Xext/xselinux.h | 29 + 3 files changed, 1996 insertions(+) create mode 100644 Xext/XSELinuxConfig create mode 100644 Xext/xselinux.c create mode 100644 Xext/xselinux.h diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig new file mode 100644 index 000000000..faf815e27 --- /dev/null +++ b/Xext/XSELinuxConfig @@ -0,0 +1,83 @@ +# +# Config file for XSELinux extension +# + +# +# The nonlocal_context rule defines a context to be used for all clients +# connecting to the server from a remote host. The nonlocal context must +# be defined, and it must be a valid context according to the SELinux +# security policy. Only one nonlocal_context rule may be defined. +# +nonlocal_context system_u:object_r:remote_xclient_t:s1 + +# +# Property rules map a property name to a SELinux type. The type must +# be valid according to the SELinux security policy. There can be any +# number of property rules. Additionally, a default property type can be +# defined for all properties not explicitly listed. The default +# property type may not be omitted. The default rule may appear in +# any position (it need not be the last property rule listed). +# +property WM_NAME wm_property_t +property WM_CLASS wm_property_t +property WM_ICON_NAME wm_property_t +property WM_HINTS wm_property_t +property WM_NORMAL_HINTS wm_property_t +property WM_COMMAND wm_property_t + +property CUT_BUFFER0 cut_buffer_property_t +property CUT_BUFFER1 cut_buffer_property_t +property CUT_BUFFER2 cut_buffer_property_t +property CUT_BUFFER3 cut_buffer_property_t +property CUT_BUFFER4 cut_buffer_property_t +property CUT_BUFFER5 cut_buffer_property_t +property CUT_BUFFER6 cut_buffer_property_t +property CUT_BUFFER7 cut_buffer_property_t + +property default unknown_property_t + +# +# Extension rules map an extension name to a SELinux type. The type must +# be valid according to the SELinux security policy. There can be any +# number of extension rules. Additionally, a default extension type can +# be defined for all extensions not explicitly listed. The default +# extension type may not be omitted. The default rule may appear in +# any position (it need not be the last extension rule listed). +# +extension BIG-REQUESTS std_ext_t +extension DOUBLE-BUFFER std_ext_t +extension DPMS screensaver_ext_t +extension Extended-Visual-Information std_ext_t +extension FontCache font_ext_t +extension GLX std_ext_t +extension LBX std_ext_t +extension MIT-SCREEN-SAVER screensaver_ext_t +extension MIT-SHM shmem_ext_t +extension MIT-SUNDRY-NONSTANDARD std_ext_t +extension NV-CONTROL accelgraphics_ext_t +extension NV-GLX accelgraphics_ext_t +extension NVIDIA-GLX accelgraphics_ext_t +extension RANDR std_ext_t +extension RECORD debug_ext_t +extension RENDER std_ext_t +extension SECURITY security_ext_t +extension SELinux security_ext_t +extension SHAPE std_ext_t +extension SYNC sync_ext_t +extension TOG-CUP windowmgr_ext_t +extension X-Resource debug_ext_t +extension XAccessControlExtension security_ext_t +extension XACEUSR security_ext_t +extension XC-APPGROUP security_ext_t +extension XC-MISC std_ext_t +extension XFree86-Bigfont font_ext_t +extension XFree86-DGA accelgraphics_ext_t +extension XFree86-Misc std_ext_t +extension XFree86-VidModeExtension video_ext_t +extension XInputExtension input_ext_t +extension XKEYBOARD input_ext_t +extension XpExtension std_ext_t +extension XTEST debug_ext_t +extension XVideo video_ext_t +extension XVideo-MotionCompensation video_ext_t +extension default unknown_ext_t diff --git a/Xext/xselinux.c b/Xext/xselinux.c new file mode 100644 index 000000000..5a6d2ef00 --- /dev/null +++ b/Xext/xselinux.c @@ -0,0 +1,1884 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice 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 NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR 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. + +********************************************************/ + +/* + * Portions of this code copyright (c) 2005 by Trusted Computer Solutions, Inc. + * All rights reserved. + */ + +#include +#include +#include +#include +#include + +#include + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include "dixstruct.h" +#include "extnsionst.h" +#include "resource.h" +#include "selection.h" +#include "xacestr.h" +#include "xselinux.h" +#define XSERV_t +#define TRANS_SERVER +#include +#include "../os/osdep.h" +#include +#include +#include "modinit.h" + +#ifndef XSELINUXCONFIGFILE +#warning "XSELinux Policy file is not defined" +#define XSELINUXCONFIGFILE NULL +#endif + + +/* Make sure a locally connecting client has a valid context. The context + * for this client is retrieved again later on in AssignClientState(), but + * by that point it's too late to reject the client. + */ +static char * +XSELinuxValidContext (ClientPtr client) +{ + security_context_t ctx = NULL; + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + char reason[256]; + char *ret = (char *)NULL; + + if (_XSERVTransIsLocal(ci)) + { + int fd = _XSERVTransGetConnectionNumber(ci); + if (getpeercon(fd, &ctx) < 0) + { + snprintf(reason, sizeof(reason), "Failed to retrieve SELinux context from socket"); + ret = reason; + goto out; + } + if (security_check_context(ctx)) + { + snprintf(reason, sizeof(reason), "Client's SELinux context is invalid: %s", ctx); + ret = reason; + } + + freecon(ctx); + } + +out: + return ret; +} + + +/* devPrivates in client and extension */ +static int clientPrivateIndex; +static int extnsnPrivateIndex; + +/* audit file descriptor */ +static int audit_fd; + +/* structure passed to auditing callback */ +typedef struct { + ClientPtr client; /* client */ + char *property; /* property name, if any */ + char *extension; /* extension name, if any */ +} XSELinuxAuditRec; + +/* + * Table of SELinux types for property names. + */ +static char **propertyTypes = NULL; +static int propertyTypesCount = 0; +char *XSELinuxPropertyTypeDefault = NULL; + +/* + * Table of SELinux types for each extension. + */ +static char **extensionTypes = NULL; +static int extensionTypesCount = 0; +static char *XSELinuxExtensionTypeDefault = NULL; + +/* security context for non-local clients */ +static char *XSELinuxNonlocalContextDefault = NULL; + +/* security context for the root window */ +static char *XSELinuxRootWindowContext = NULL; + +/* Selection stuff from dix */ +extern Selection *CurrentSelections; +extern int NumCurrentSelections; + +/* + * list of classes corresponding to SIDs in the + * rsid array of the security state structure (below). + * + * XXX SIDs should be stored in their native objects, not all + * bunched together in the client structure. However, this will + * require modification to the resource manager. + */ +static security_class_t sClasses[] = { + SECCLASS_WINDOW, + SECCLASS_DRAWABLE, + SECCLASS_GC, + SECCLASS_CURSOR, + SECCLASS_FONT, + SECCLASS_COLORMAP, + SECCLASS_PROPERTY, + SECCLASS_XCLIENT, + SECCLASS_XINPUT +}; +#define NRES (sizeof(sClasses)/sizeof(sClasses[0])) + +/* This is what we store for client security state */ +typedef struct { + int haveState; + security_id_t sid; + security_id_t rsid[NRES]; + struct avc_entry_ref aeref; +} XSELinuxClientStateRec; + +/* Convenience macros for accessing security state fields */ +#define STATEPTR(client) \ + ((client)->devPrivates[clientPrivateIndex].ptr) +#define HAVESTATE(client) \ + (((XSELinuxClientStateRec*)STATEPTR(client))->haveState) +#define SID(client) \ + (((XSELinuxClientStateRec*)STATEPTR(client))->sid) +#define RSID(client,n) \ + (((XSELinuxClientStateRec*)STATEPTR(client))->rsid[n]) +#define AEREF(client) \ + (((XSELinuxClientStateRec*)STATEPTR(client))->aeref) +#define EXTENSIONSID(ext) \ + ((ext)->devPrivates[extnsnPrivateIndex].ptr) + +/* + * Returns the index into the rsid array where the SID for the + * given class is stored. + */ +static int +IndexByClass(security_class_t class) +{ + int i; + for (i=0; i 10) + ErrorF("Warning: possibly mangled ID %x\n", id); + + c = id & RESOURCE_ID_MASK; + if (c > 100) + ErrorF("Warning: possibly mangled ID %x\n", id); + */ +} + +/* + * Byte-swap a CARD32 id if necessary. + */ +static XID +SwapXID(ClientPtr client, XID id) +{ + register char n; + if (client->swapped) + swapl(&id, n); + return id; +} + +/* + * ServerPerm - check access permissions on a server-owned object. + * + * Arguments: + * client: Client doing the request. + * class: Security class of the server object being accessed. + * perm: Permissions required on the object. + * + * Returns: boolean TRUE=allowed, FALSE=denied. + */ +static int +ServerPerm(ClientPtr client, + security_class_t class, + access_vector_t perm) +{ + int idx = IndexByClass(class); + if (HAVESTATE(client)) + { + XSELinuxAuditRec auditdata; + auditdata.client = client; + auditdata.property = NULL; + auditdata.extension = NULL; + errno = 0; + if (avc_has_perm(SID(client), RSID(serverClient,idx), class, + perm, &AEREF(client), &auditdata) < 0) + { + if (errno != EACCES) + ErrorF("ServerPerm: unexpected error %d\n", errno); + return FALSE; + } + } + else + { + ErrorF("No client state in server-perm check!\n"); + return TRUE; + } + + return TRUE; +} + +/* + * IDPerm - check access permissions on a resource. + * + * Arguments: + * client: Client doing the request. + * id: resource id of the resource being accessed. + * class: Security class of the resource being accessed. + * perm: Permissions required on the resource. + * + * Returns: boolean TRUE=allowed, FALSE=denied. + */ +static int +IDPerm(ClientPtr sclient, + XID id, + security_class_t class, + access_vector_t perm) +{ + ClientPtr tclient; + int idx = IndexByClass(class); + XSELinuxAuditRec auditdata; + + if (id == None) + return TRUE; + + CheckXID(id); + tclient = clients[CLIENT_ID(id)]; + + /* + * This happens in the case where a client has + * disconnected. XXX might want to make the server + * own orphaned resources... + */ + if (!tclient || !HAVESTATE(tclient) || !HAVESTATE(sclient)) + { + return TRUE; + } + + auditdata.client = sclient; + auditdata.property = NULL; + auditdata.extension = NULL; + errno = 0; + if (avc_has_perm(SID(sclient), RSID(tclient,idx), class, + perm, &AEREF(sclient), &auditdata) < 0) + { + if (errno != EACCES) + ErrorF("IDPerm: unexpected error %d\n", errno); + return FALSE; + } + + return TRUE; +} + +/* + * ObjectSIDByLabel - get SID for an extension or property. + * + * Arguments: + * class: should be SECCLASS_XEXTENSION or SECCLASS_PROPERTY. + * name: name of the extension or property. + * + * Returns: proper SID for the object or NULL on error. + */ +static security_id_t +ObjectSIDByLabel(security_context_t basecontext, security_class_t class, + const char *name) +{ + security_context_t base, new; + context_t con; + security_id_t sid = NULL; + char **ptr, *type = NULL; + + if (basecontext != NULL) + { + /* use the supplied context */ + base = strdup(basecontext); + if (base == NULL) + goto out; + } + else + { + /* get server context */ + if (getcon(&base) < 0) + goto out; + } + + /* make a new context-manipulation object */ + con = context_new(base); + if (!con) + goto out2; + + /* look in the mappings of names to types */ + ptr = (class == SECCLASS_PROPERTY) ? propertyTypes : extensionTypes; + for (; *ptr; ptr+=2) + if (!strcmp(*ptr, name)) + break; + type = ptr[1]; + + /* set the role and type in the context (user unchanged) */ + if (context_type_set(con, type) || + context_role_set(con, "object_r")) + goto out3; + + /* get a context string from the context-manipulation object */ + new = context_str(con); + if (!new) + goto out3; + + /* get a SID for the context */ + if (avc_context_to_sid(new, &sid) < 0) + goto out3; + + out3: + context_free(con); + out2: + freecon(base); + out: + return sid; +} + +/* + * AssignClientState - set up client security state. + * + * Arguments: + * client: client to set up (can be serverClient). + */ +static void +AssignClientState(ClientPtr client) +{ + int i, needToFree = 0; + security_context_t basectx, objctx; + XSELinuxClientStateRec *state = (XSELinuxClientStateRec*)STATEPTR(client); + Bool isServerClient = FALSE; + + avc_entry_ref_init(&state->aeref); + + if (client->index > 0) + { + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + if (_XSERVTransIsLocal(ci)) { + /* for local clients, can get context from the socket */ + int fd = _XSERVTransGetConnectionNumber(ci); + if (getpeercon(fd, &basectx) < 0) + { + FatalError("Client %d: couldn't get context from socket\n", + client->index); + } + needToFree = 1; + } + else + { + /* for remote clients, need to use a default context */ + basectx = XSELinuxNonlocalContextDefault; + } + } + else + { + isServerClient = TRUE; + + /* use the context of the X server process for the serverClient */ + if (getcon(&basectx) < 0) + { + FatalError("Couldn't get context of X server process\n"); + } + needToFree = 1; + } + + /* get a SID from the context */ + if (avc_context_to_sid(basectx, &state->sid) < 0) + { + FatalError("Client %d: couldn't get security ID for client\n", + client->index); + } + + /* get contexts and then SIDs for each resource type */ + for (i=0; iindex, sClasses[i]); + } + else if (avc_context_to_sid(objctx, &state->rsid[i]) < 0) + { + FatalError("Client %d: couldn't get SID for class %x\n", + client->index, sClasses[i]); + } + freecon(objctx); + } + + /* special handling for serverClient windows (that is, root windows) */ + if (isServerClient == TRUE) + { + i = IndexByClass(SECCLASS_WINDOW); + sidput(state->rsid[i]); + if (avc_context_to_sid(XSELinuxRootWindowContext, &state->rsid[i])) + { + FatalError("Failed to set SID for root window\n"); + } + } + + /* mark as set up, free base context if necessary, and return */ + state->haveState = TRUE; + if (needToFree) + freecon(basectx); +} + +/* + * FreeClientState - tear down client security state. + * + * Arguments: + * client: client to release (can be serverClient). + */ +static void +FreeClientState(ClientPtr client) +{ + int i; + XSELinuxClientStateRec *state = (XSELinuxClientStateRec*)STATEPTR(client); + + /* client state may not be set up if its auth was rejected */ + if (state->haveState) { + state = (XSELinuxClientStateRec*)STATEPTR(client); + sidput(state->sid); + for (i=0; irsid[i]); + state->haveState = FALSE; + } +} + +#define REQUEST_SIZE_CHECK(client, req) \ + (client->req_len >= (sizeof(req) >> 2)) +#define IDPERM(client, req, field, class, perm) \ + (REQUEST_SIZE_CHECK(client,req) && \ + IDPerm(client, SwapXID(client,((req*)stuff)->field), class, perm)) +#define CALLBACK(name) static void \ +name(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) + +static int +CheckSendEventPerms(ClientPtr client) +{ + register char n; + access_vector_t perm = 0; + REQUEST(xSendEventReq); + + /* might need type bounds checking here */ + if (!REQUEST_SIZE_CHECK(client, xSendEventReq)) + return FALSE; + + switch (stuff->event.u.u.type) { + case SelectionClear: + case SelectionNotify: + case SelectionRequest: + case ClientMessage: + case PropertyNotify: + perm = WINDOW__CLIENTCOMEVENT; + break; + case ButtonPress: + case ButtonRelease: + case KeyPress: + case KeyRelease: + case KeymapNotify: + case MotionNotify: + case EnterNotify: + case LeaveNotify: + case FocusIn: + case FocusOut: + perm = WINDOW__INPUTEVENT; + break; + case Expose: + case GraphicsExpose: + case NoExpose: + case VisibilityNotify: + perm = WINDOW__DRAWEVENT; + break; + case CirculateNotify: + case ConfigureNotify: + case CreateNotify: + case DestroyNotify: + case MapNotify: + case UnmapNotify: + case GravityNotify: + case ReparentNotify: + perm = WINDOW__WINDOWCHANGEEVENT; + break; + case CirculateRequest: + case ConfigureRequest: + case MapRequest: + case ResizeRequest: + perm = WINDOW__WINDOWCHANGEREQUEST; + break; + case ColormapNotify: + case MappingNotify: + perm = WINDOW__SERVERCHANGEEVENT; + break; + default: + perm = WINDOW__EXTENSIONEVENT; + break; + } + if (client->swapped) + swapl(&stuff->destination, n); + return IDPerm(client, stuff->destination, SECCLASS_WINDOW, perm); +} + +static int +CheckConvertSelectionPerms(ClientPtr client) +{ + register char n; + int rval = TRUE; + REQUEST(xConvertSelectionReq); + + if (!REQUEST_SIZE_CHECK(client, xConvertSelectionReq)) + return FALSE; + + if (client->swapped) + { + swapl(&stuff->selection, n); + swapl(&stuff->requestor, n); + } + + if (ValidAtom(stuff->selection)) + { + int i = 0; + while ((i < NumCurrentSelections) && + CurrentSelections[i].selection != stuff->selection) i++; + if (i < NumCurrentSelections) + rval = rval && IDPerm(client, CurrentSelections[i].window, + SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); + } + rval = rval && IDPerm(client, stuff->requestor, + SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); + return rval; +} + +static int +CheckSetSelectionOwnerPerms(ClientPtr client) +{ + register char n; + int rval = TRUE; + REQUEST(xSetSelectionOwnerReq); + + if (!REQUEST_SIZE_CHECK(client, xSetSelectionOwnerReq)) + return FALSE; + + if (client->swapped) + { + swapl(&stuff->selection, n); + swapl(&stuff->window, n); + } + + if (ValidAtom(stuff->selection)) + { + int i = 0; + while ((i < NumCurrentSelections) && + CurrentSelections[i].selection != stuff->selection) i++; + if (i < NumCurrentSelections) + rval = rval && IDPerm(client, CurrentSelections[i].window, + SECCLASS_WINDOW, WINDOW__CHSELECTION); + } + rval = rval && IDPerm(client, stuff->window, + SECCLASS_WINDOW, WINDOW__CHSELECTION); + return rval; +} + +CALLBACK(XSELinuxCoreDispatch) +{ + XaceCoreDispatchRec *rec = (XaceCoreDispatchRec*)calldata; + ClientPtr client = rec->client; + REQUEST(xReq); + Bool rval; + + switch(stuff->reqType) { + /* Drawable class control requirements */ + case X_ClearArea: + rval = IDPERM(client, xClearAreaReq, window, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_PolySegment: + case X_PolyRectangle: + case X_PolyArc: + case X_PolyFillRectangle: + case X_PolyFillArc: + rval = IDPERM(client, xPolySegmentReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_PolyPoint: + case X_PolyLine: + rval = IDPERM(client, xPolyPointReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_FillPoly: + rval = IDPERM(client, xFillPolyReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_PutImage: + rval = IDPERM(client, xPutImageReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_CopyArea: + case X_CopyPlane: + rval = IDPERM(client, xCopyAreaReq, srcDrawable, + SECCLASS_DRAWABLE, DRAWABLE__COPY) + && IDPERM(client, xCopyAreaReq, dstDrawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_GetImage: + rval = IDPERM(client, xGetImageReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__COPY); + break; + case X_GetGeometry: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_DRAWABLE, DRAWABLE__GETATTR); + break; + + /* Window class control requirements */ + case X_ChangeProperty: + rval = IDPERM(client, xChangePropertyReq, window, + SECCLASS_WINDOW, + WINDOW__CHPROPLIST | WINDOW__CHPROP | + WINDOW__LISTPROP); + break; + case X_ChangeSaveSet: + rval = IDPERM(client, xChangeSaveSetReq, window, + SECCLASS_WINDOW, + WINDOW__CTRLLIFE | WINDOW__CHPARENT); + break; + case X_ChangeWindowAttributes: + rval = IDPERM(client, xChangeWindowAttributesReq, window, + SECCLASS_WINDOW, WINDOW__SETATTR); + break; + case X_CirculateWindow: + rval = IDPERM(client, xCirculateWindowReq, window, + SECCLASS_WINDOW, WINDOW__CHSTACK); + break; + case X_ConfigureWindow: + rval = IDPERM(client, xConfigureWindowReq, window, + SECCLASS_WINDOW, + WINDOW__SETATTR | WINDOW__MOVE | WINDOW__CHSTACK); + break; + case X_ConvertSelection: + rval = CheckConvertSelectionPerms(client); + break; + case X_CreateWindow: + rval = IDPERM(client, xCreateWindowReq, wid, + SECCLASS_WINDOW, + WINDOW__CREATE | WINDOW__SETATTR | WINDOW__MOVE) + && IDPERM(client, xCreateWindowReq, parent, + SECCLASS_WINDOW, + WINDOW__CHSTACK | WINDOW__ADDCHILD) + && IDPERM(client, xCreateWindowReq, wid, + SECCLASS_DRAWABLE, DRAWABLE__CREATE); + break; + case X_DeleteProperty: + rval = IDPERM(client, xDeletePropertyReq, window, + SECCLASS_WINDOW, + WINDOW__CHPROP | WINDOW__CHPROPLIST); + break; + case X_DestroyWindow: + case X_DestroySubwindows: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, + WINDOW__ENUMERATE | WINDOW__UNMAP | WINDOW__DESTROY) + && IDPERM(client, xResourceReq, id, + SECCLASS_DRAWABLE, DRAWABLE__DESTROY); + break; + case X_GetMotionEvents: + rval = IDPERM(client, xGetMotionEventsReq, window, + SECCLASS_WINDOW, WINDOW__MOUSEMOTION); + break; + case X_GetProperty: + rval = IDPERM(client, xGetPropertyReq, window, + SECCLASS_WINDOW, WINDOW__LISTPROP); + break; + case X_GetWindowAttributes: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, WINDOW__GETATTR); + break; + case X_KillClient: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_XCLIENT, XCLIENT__KILL); + break; + case X_ListProperties: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, WINDOW__LISTPROP); + break; + case X_MapWindow: + case X_MapSubwindows: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, + WINDOW__ENUMERATE | WINDOW__GETATTR | WINDOW__MAP); + break; + case X_QueryTree: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, WINDOW__ENUMERATE | WINDOW__GETATTR); + break; + case X_RotateProperties: + rval = IDPERM(client, xRotatePropertiesReq, window, + SECCLASS_WINDOW, WINDOW__CHPROP | WINDOW__CHPROPLIST); + break; + case X_ReparentWindow: + rval = IDPERM(client, xReparentWindowReq, window, + SECCLASS_WINDOW, WINDOW__CHPARENT | WINDOW__MOVE) + && IDPERM(client, xReparentWindowReq, parent, + SECCLASS_WINDOW, WINDOW__CHSTACK | WINDOW__ADDCHILD); + break; + case X_SendEvent: + rval = CheckSendEventPerms(client); + break; + case X_SetInputFocus: + rval = IDPERM(client, xSetInputFocusReq, focus, + SECCLASS_WINDOW, WINDOW__SETFOCUS) + && ServerPerm(client, SECCLASS_XINPUT, XINPUT__SETFOCUS); + break; + case X_SetSelectionOwner: + rval = CheckSetSelectionOwnerPerms(client); + break; + case X_TranslateCoords: + rval = IDPERM(client, xTranslateCoordsReq, srcWid, + SECCLASS_WINDOW, WINDOW__GETATTR) + && IDPERM(client, xTranslateCoordsReq, dstWid, + SECCLASS_WINDOW, WINDOW__GETATTR); + break; + case X_UnmapWindow: + case X_UnmapSubwindows: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_WINDOW, + WINDOW__ENUMERATE | WINDOW__GETATTR | + WINDOW__UNMAP); + break; + case X_WarpPointer: + rval = IDPERM(client, xWarpPointerReq, srcWid, + SECCLASS_WINDOW, WINDOW__GETATTR) + && IDPERM(client, xWarpPointerReq, dstWid, + SECCLASS_WINDOW, WINDOW__GETATTR) + && ServerPerm(client, SECCLASS_XINPUT, XINPUT__WARPPOINTER); + break; + + /* Input class control requirements */ + case X_GrabButton: + case X_GrabKey: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__PASSIVEGRAB); + break; + case X_GrabKeyboard: + case X_GrabPointer: + case X_ChangeActivePointerGrab: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__ACTIVEGRAB); + break; + case X_AllowEvents: + case X_UngrabButton: + case X_UngrabKey: + case X_UngrabKeyboard: + case X_UngrabPointer: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__UNGRAB); + break; + case X_GetKeyboardControl: + case X_GetKeyboardMapping: + case X_GetPointerControl: + case X_GetPointerMapping: + case X_GetModifierMapping: + case X_QueryKeymap: + case X_QueryPointer: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__GETATTR); + break; + case X_ChangeKeyboardControl: + case X_ChangePointerControl: + case X_ChangeKeyboardMapping: + case X_SetModifierMapping: + case X_SetPointerMapping: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__SETATTR); + break; + case X_Bell: + rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__BELL); + break; + + /* Colormap class control requirements */ + case X_AllocColor: + case X_AllocColorCells: + case X_AllocColorPlanes: + case X_AllocNamedColor: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, + COLORMAP__READ | COLORMAP__STORE); + break; + case X_CopyColormapAndFree: + rval = IDPERM(client, xCopyColormapAndFreeReq, mid, + SECCLASS_COLORMAP, COLORMAP__CREATE) + && IDPERM(client, xCopyColormapAndFreeReq, srcCmap, + SECCLASS_COLORMAP, + COLORMAP__READ | COLORMAP__FREE); + break; + case X_CreateColormap: + rval = IDPERM(client, xCreateColormapReq, mid, + SECCLASS_COLORMAP, COLORMAP__CREATE) + && IDPERM(client, xCreateColormapReq, window, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_FreeColormap: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__FREE); + break; + case X_FreeColors: + rval = IDPERM(client, xFreeColorsReq, cmap, + SECCLASS_COLORMAP, COLORMAP__STORE); + break; + case X_InstallColormap: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__INSTALL) + && ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__INSTALL); + break; + case X_ListInstalledColormaps: + rval = ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__LIST); + break; + case X_LookupColor: + case X_QueryColors: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__READ); + break; + case X_StoreColors: + case X_StoreNamedColor: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__STORE); + break; + case X_UninstallColormap: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_COLORMAP, COLORMAP__UNINSTALL) + && ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__UNINSTALL); + break; + + /* Font class control requirements */ + case X_CloseFont: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_FONT, FONT__FREE); + break; + case X_ImageText8: + case X_ImageText16: + /* Font accesses checked through the resource manager */ + rval = IDPERM(client, xImageTextReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + case X_OpenFont: + rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD) + && IDPERM(client, xOpenFontReq, fid, + SECCLASS_FONT, FONT__USE); + break; + case X_PolyText8: + case X_PolyText16: + /* Font accesses checked through the resource manager */ + rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD) + && IDPERM(client, xPolyTextReq, gc, + SECCLASS_GC, GC__SETATTR) + && IDPERM(client, xPolyTextReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + break; + + /* Pixmap class control requirements */ + case X_CreatePixmap: + rval = IDPERM(client, xCreatePixmapReq, pid, + SECCLASS_DRAWABLE, DRAWABLE__CREATE); + break; + case X_FreePixmap: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_DRAWABLE, DRAWABLE__DESTROY); + break; + + /* Cursor class control requirements */ + case X_CreateCursor: + rval = IDPERM(client, xCreateCursorReq, cid, + SECCLASS_CURSOR, CURSOR__CREATE) + && IDPERM(client, xCreateCursorReq, source, + SECCLASS_DRAWABLE, DRAWABLE__DRAW) + && IDPERM(client, xCreateCursorReq, mask, + SECCLASS_DRAWABLE, DRAWABLE__COPY); + break; + case X_CreateGlyphCursor: + rval = IDPERM(client, xCreateGlyphCursorReq, cid, + SECCLASS_CURSOR, CURSOR__CREATEGLYPH) + && IDPERM(client, xCreateGlyphCursorReq, source, + SECCLASS_FONT, FONT__USE) + && IDPERM(client, xCreateGlyphCursorReq, mask, + SECCLASS_FONT, FONT__USE); + break; + case X_RecolorCursor: + rval = IDPERM(client, xRecolorCursorReq, cursor, + SECCLASS_CURSOR, CURSOR__SETATTR); + break; + case X_FreeCursor: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_CURSOR, CURSOR__FREE); + break; + + /* GC class control requirements */ + case X_CreateGC: + rval = IDPERM(client, xCreateGCReq, gc, + SECCLASS_GC, GC__CREATE | GC__SETATTR); + break; + case X_ChangeGC: + case X_SetDashes: + case X_SetClipRectangles: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_GC, GC__SETATTR); + break; + case X_CopyGC: + rval = IDPERM(client, xCopyGCReq, srcGC, + SECCLASS_GC, GC__GETATTR) + && IDPERM(client, xCopyGCReq, dstGC, + SECCLASS_GC, GC__SETATTR); + break; + case X_FreeGC: + rval = IDPERM(client, xResourceReq, id, + SECCLASS_GC, GC__FREE); + break; + + /* Server class control requirements */ + case X_GrabServer: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GRAB); + break; + case X_UngrabServer: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__UNGRAB); + break; + case X_ForceScreenSaver: + case X_GetScreenSaver: + case X_SetScreenSaver: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SCREENSAVER); + break; + case X_ListHosts: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETHOSTLIST); + break; + case X_ChangeHosts: + case X_SetAccessControl: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SETHOSTLIST); + break; + case X_GetFontPath: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETFONTPATH); + break; + case X_SetFontPath: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SETFONTPATH); + break; + case X_QueryBestSize: + rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETATTR); + break; + + default: + rval = TRUE; + break; + } + if (!rval) + rec->rval = FALSE; +} + +CALLBACK(XSELinuxExtDispatch) +{ + XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; + ClientPtr client = rec->client; + ExtensionEntry *ext = rec->ext; + security_id_t extsid; + access_vector_t perm; + REQUEST(xReq); + + /* XXX there should be a separate callback for this */ + if (!EXTENSIONSID(ext)) + { + extsid = ObjectSIDByLabel(NULL, SECCLASS_XEXTENSION, ext->name); + if (!extsid) + return; + EXTENSIONSID(ext) = extsid; + } + + extsid = (security_id_t)EXTENSIONSID(ext); + perm = ((stuff->reqType == X_QueryExtension) || + (stuff->reqType == X_ListExtensions)) ? + XEXTENSION__QUERY : XEXTENSION__USE; + + if (HAVESTATE(client)) + { + XSELinuxAuditRec auditdata; + auditdata.client = client; + auditdata.property = NULL; + auditdata.extension = ext->name; + errno = 0; + if (avc_has_perm(SID(client), extsid, SECCLASS_XEXTENSION, + perm, &AEREF(client), &auditdata) < 0) + { + if (errno != EACCES) + ErrorF("ExtDispatch: unexpected error %d\n", errno); + rec->rval = FALSE; + } + } else + ErrorF("No client state in extension dispatcher!\n"); +} /* XSELinuxExtDispatch */ + +CALLBACK(XSELinuxProperty) +{ + XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata; + WindowPtr pWin = rec->pWin; + ClientPtr client = rec->client; + ClientPtr tclient; + access_vector_t perm = 0; + security_id_t propsid; + char *propname = NameForAtom(rec->propertyName); + + tclient = wClient(pWin); + if (!tclient || !HAVESTATE(tclient)) + return; + + propsid = ObjectSIDByLabel(SID(tclient)->ctx, SECCLASS_PROPERTY, propname); + if (!propsid) + return; + + if (rec->access_mode & SecurityReadAccess) + perm |= PROPERTY__READ; + if (rec->access_mode & SecurityWriteAccess) + perm |= PROPERTY__WRITE; + if (rec->access_mode & SecurityDestroyAccess) + perm |= PROPERTY__FREE; + if (!rec->access_mode) + perm = PROPERTY__READ | PROPERTY__WRITE | PROPERTY__FREE; + + if (HAVESTATE(client)) + { + XSELinuxAuditRec auditdata; + auditdata.client = client; + auditdata.property = propname; + auditdata.extension = NULL; + errno = 0; + if (avc_has_perm(SID(client), propsid, SECCLASS_PROPERTY, + perm, &AEREF(client), &auditdata) < 0) + { + if (errno != EACCES) + ErrorF("Property: unexpected error %d\n", errno); + rec->rval = SecurityIgnoreOperation; + } + } else + ErrorF("No client state in property callback!\n"); + + /* XXX this should be saved in the property structure */ + sidput(propsid); +} /* XSELinuxProperty */ + +CALLBACK(XSELinuxResLookup) +{ + XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata; + ClientPtr client = rec->client; + REQUEST(xReq); + access_vector_t perm = 0; + Bool rval = TRUE; + + /* serverClient requests OK */ + if (client->index == 0) + return; + + switch(rec->rtype) { + case RT_FONT: { + switch(stuff->reqType) { + case X_ImageText8: + case X_ImageText16: + case X_PolyText8: + case X_PolyText16: + perm = FONT__USE; + break; + case X_ListFonts: + case X_ListFontsWithInfo: + case X_QueryFont: + case X_QueryTextExtents: + perm = FONT__GETATTR; + break; + default: + break; + } + if (perm) + rval = IDPerm(client, rec->id, SECCLASS_FONT, perm); + break; + } + default: + break; + } + if (!rval) + rec->rval = FALSE; +} /* XSELinuxResLookup */ + +CALLBACK(XSELinuxMap) +{ + XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; + if (!IDPerm(rec->client, rec->pWin->drawable.id, + SECCLASS_WINDOW, WINDOW__MAP)) + rec->rval = FALSE; +} /* XSELinuxMap */ + +CALLBACK(XSELinuxBackgrnd) +{ + XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; + if (!IDPerm(rec->client, rec->pWin->drawable.id, + SECCLASS_WINDOW, WINDOW__TRANSPARENT)) + rec->rval = FALSE; +} /* XSELinuxBackgrnd */ + +CALLBACK(XSELinuxDrawable) +{ + XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; + if (!IDPerm(rec->client, rec->pDraw->id, + SECCLASS_DRAWABLE, DRAWABLE__COPY)) + rec->rval = FALSE; +} /* XSELinuxDrawable */ + +CALLBACK(XSELinuxHostlist) +{ + XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata; + access_vector_t perm = (rec->access_mode == SecurityReadAccess) ? + XSERVER__GETHOSTLIST : XSERVER__SETHOSTLIST; + + if (!ServerPerm(rec->client, SECCLASS_XSERVER, perm)) + rec->rval = FALSE; +} /* XSELinuxHostlist */ + +/* Extension callbacks */ +CALLBACK(XSELinuxClientState) +{ + NewClientInfoRec *pci = (NewClientInfoRec *)calldata; + ClientPtr client = pci->client; + + switch(client->clientState) + { + case ClientStateInitial: + AssignClientState(serverClient); + break; + + case ClientStateRunning: + { + AssignClientState(client); + break; + } + case ClientStateGone: + case ClientStateRetained: + { + FreeClientState(client); + break; + } + default: break; + } +} /* XSELinuxClientState */ + +static char *XSELinuxKeywords[] = { +#define XSELinuxKeywordComment 0 + "#", +#define XSELinuxKeywordProperty 1 + "property", +#define XSELinuxKeywordExtension 2 + "extension", +#define XSELinuxKeywordNonlocalContext 3 + "nonlocal_context", +#define XSELinuxKeywordRootWindowContext 4 + "root_window_context", +#define XSELinuxKeywordDefault 5 + "default" +}; + +#define NUMKEYWORDS (sizeof(XSELinuxKeywords) / sizeof(char *)) + +#ifndef __UNIXOS2__ +#define XSELinuxIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') ) +#else +#define XSELinuxIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') ) +#endif + +static char * +XSELinuxSkipWhitespace( + char *p) +{ + while (XSELinuxIsWhitespace(*p)) + p++; + return p; +} /* XSELinuxSkipWhitespace */ + +static char * +XSELinuxParseString( + char **rest) +{ + char *startOfString; + char *s = *rest; + char endChar = 0; + + s = XSELinuxSkipWhitespace(s); + + if (*s == '"' || *s == '\'') + { + endChar = *s++; + startOfString = s; + while (*s && (*s != endChar)) + s++; + } + else + { + startOfString = s; + while (*s && !XSELinuxIsWhitespace(*s)) + s++; + } + if (*s) + { + *s = '\0'; + *rest = s + 1; + return startOfString; + } + else + { + *rest = s; + return (endChar) ? NULL : startOfString; + } +} /* XSELinuxParseString */ + +static int +XSELinuxParseKeyword( + char **p) +{ + int i; + char *s = *p; + s = XSELinuxSkipWhitespace(s); + for (i = 0; i < NUMKEYWORDS; i++) + { + int len = strlen(XSELinuxKeywords[i]); + if (strncmp(s, XSELinuxKeywords[i], len) == 0) + { + *p = s + len; + return (i); + } + } + *p = s; + return -1; +} /* XSELinuxParseKeyword */ + +static Bool +XSELinuxTypeIsValid(char *typename) +{ + security_context_t base, new; + context_t con; + Bool ret = FALSE; + + /* get the server's context */ + if (getcon(&base) < 0) + goto out; + + /* make a new context-manipulation object */ + con = context_new(base); + if (!con) + goto out_free; + + /* set the role */ + if (context_role_set(con, "object_r")) + goto out_free2; + + /* set the type */ + if (context_type_set(con, typename)) + goto out_free2; + + /* get a context string - note: context_str() returns a pointer + * to the string inside the context; the returned pointer should + * not be freed + */ + new = context_str(con); + if (!new) + goto out_free2; + + /* finally, check to see if it's valid */ + if (security_check_context(new) == 0) + ret = TRUE; + +out_free2: + context_free(con); +out_free: + freecon(base); +out: + return ret; +} + +static Bool +XSELinuxParsePropertyTypeRule(char *p) +{ + int keyword; + char *propname = NULL, *propcopy = NULL; + char *typename = NULL, *typecopy = NULL; + char **newTypes; + Bool defaultPropertyType = FALSE; + + /* get property name */ + keyword = XSELinuxParseKeyword(&p); + if (keyword == XSELinuxKeywordDefault) + { + defaultPropertyType = TRUE; + } + else + { + propname = XSELinuxParseString(&p); + if (!propname || (strlen(propname) == 0)) + { + return FALSE; + } + } + + /* get the SELinux type corresponding to the property */ + typename = XSELinuxParseString(&p); + if (!typename || (strlen(typename) == 0)) + return FALSE; + + /* validate the type */ + if (XSELinuxTypeIsValid(typename) != TRUE) + return FALSE; + + /* if it's the default property, save it to append to the end of the + * property types list + */ + if (defaultPropertyType == TRUE) + { + if (XSELinuxPropertyTypeDefault != NULL) + { + return FALSE; + } + else + { + XSELinuxPropertyTypeDefault = (char *)xalloc(strlen(typename)+1); + if (!XSELinuxPropertyTypeDefault) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(XSELinuxPropertyTypeDefault, typename); + return TRUE; + } + } + + /* insert the property and type into the propertyTypes array */ + propcopy = (char *)xalloc(strlen(propname)+1); + if (!propcopy) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(propcopy, propname); + + typecopy = (char *)xalloc(strlen(typename)+1); + if (!typecopy) + { + ErrorF("XSELinux: out of memory\n"); + xfree(propcopy); + return FALSE; + } + strcpy(typecopy, typename); + + newTypes = (char **)xrealloc(propertyTypes, sizeof (char *) * ((propertyTypesCount+1) * 2)); + if (!newTypes) + { + ErrorF("XSELinux: out of memory\n"); + xfree(propcopy); + xfree(typecopy); + return FALSE; + } + + propertyTypesCount++; + + newTypes[propertyTypesCount*2 - 2] = propcopy; + newTypes[propertyTypesCount*2 - 1] = typecopy; + + propertyTypes = newTypes; + + return TRUE; +} /* XSELinuxParsePropertyTypeRule */ + +static Bool +XSELinuxParseExtensionTypeRule(char *p) +{ + int keyword; + char *extname = NULL, *extcopy = NULL; + char *typename = NULL, *typecopy = NULL; + char **newTypes; + Bool defaultExtensionType = FALSE; + + /* get extension name */ + keyword = XSELinuxParseKeyword(&p); + if (keyword == XSELinuxKeywordDefault) + { + defaultExtensionType = TRUE; + } + else + { + extname = XSELinuxParseString(&p); + if (!extname || (strlen(extname) == 0)) + { + return FALSE; + } + } + + /* get the SELinux type corresponding to the extension */ + typename = XSELinuxParseString(&p); + if (!typename || (strlen(typename) == 0)) + return FALSE; + + /* validate the type */ + if (XSELinuxTypeIsValid(typename) != TRUE) + return FALSE; + + /* if it's the default extension, save it to append to the end of the + * extension types list + */ + if (defaultExtensionType == TRUE) + { + if (XSELinuxExtensionTypeDefault != NULL) + { + return FALSE; + } + else + { + XSELinuxExtensionTypeDefault = (char *)xalloc(strlen(typename)+1); + if (!XSELinuxExtensionTypeDefault) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(XSELinuxExtensionTypeDefault, typename); + return TRUE; + } + } + + /* insert the extension and type into the extensionTypes array */ + extcopy = (char *)xalloc(strlen(extname)+1); + if (!extcopy) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(extcopy, extname); + + typecopy = (char *)xalloc(strlen(typename)+1); + if (!typecopy) + { + ErrorF("XSELinux: out of memory\n"); + xfree(extcopy); + return FALSE; + } + strcpy(typecopy, typename); + + newTypes = (char **)xrealloc(extensionTypes, sizeof(char *) *( (extensionTypesCount+1) * 2)); + if (!newTypes) + { + ErrorF("XSELinux: out of memory\n"); + xfree(extcopy); + xfree(typecopy); + return FALSE; + } + + extensionTypesCount++; + + newTypes[extensionTypesCount*2 - 2] = extcopy; + newTypes[extensionTypesCount*2 - 1] = typecopy; + + extensionTypes = newTypes; + + return TRUE; +} /* XSELinuxParseExtensionTypeRule */ + +static Bool +XSELinuxParseNonlocalContext(char *p) +{ + char *context; + + context = XSELinuxParseString(&p); + if (!context || (strlen(context) == 0)) + { + return FALSE; + } + + if (XSELinuxNonlocalContextDefault != NULL) + { + return FALSE; + } + + /* validate the context */ + if (security_check_context(context)) + { + return FALSE; + } + + XSELinuxNonlocalContextDefault = (char *)xalloc(strlen(context)+1); + if (!XSELinuxNonlocalContextDefault) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(XSELinuxNonlocalContextDefault, context); + + return TRUE; +} /* XSELinuxParseNonlocalContext */ + +static Bool +XSELinuxParseRootWindowContext(char *p) +{ + char *context; + + context = XSELinuxParseString(&p); + if (!context || (strlen(context) == 0)) + { + return FALSE; + } + + if (XSELinuxRootWindowContext != NULL) + { + return FALSE; + } + + /* validate the context */ + if (security_check_context(context)) + { + return FALSE; + } + + XSELinuxRootWindowContext = (char *)xalloc(strlen(context)+1); + if (!XSELinuxRootWindowContext) + { + ErrorF("XSELinux: out of memory\n"); + return FALSE; + } + strcpy(XSELinuxRootWindowContext, context); + + return TRUE; +} /* XSELinuxParseRootWindowContext */ + +static Bool +XSELinuxLoadConfigFile(void) +{ + FILE *f; + int lineNumber = 0; + char **newTypes; + Bool ret = FALSE; + + if (!XSELINUXCONFIGFILE) + return FALSE; + + /* some initial bookkeeping */ + propertyTypesCount = extensionTypesCount = 0; + propertyTypes = extensionTypes = NULL; + XSELinuxPropertyTypeDefault = XSELinuxExtensionTypeDefault = NULL; + XSELinuxNonlocalContextDefault = NULL; + XSELinuxRootWindowContext = NULL; + +#ifndef __UNIXOS2__ + f = fopen(XSELINUXCONFIGFILE, "r"); +#else + f = fopen((char*)__XOS2RedirRoot(XSELINUXCONFIGFILE), "r"); +#endif + if (!f) + { + ErrorF("Error opening XSELinux policy file %s\n", XSELINUXCONFIGFILE); + return FALSE; + } + + while (!feof(f)) + { + char buf[200]; + Bool validLine; + char *p; + + if (!(p = fgets(buf, sizeof(buf), f))) + break; + lineNumber++; + + switch (XSELinuxParseKeyword(&p)) + { + case XSELinuxKeywordComment: + validLine = TRUE; + break; + + case XSELinuxKeywordProperty: + validLine = XSELinuxParsePropertyTypeRule(p); + break; + + case XSELinuxKeywordExtension: + validLine = XSELinuxParseExtensionTypeRule(p); + break; + + case XSELinuxKeywordNonlocalContext: + validLine = XSELinuxParseNonlocalContext(p); + break; + + case XSELinuxKeywordRootWindowContext: + validLine = XSELinuxParseRootWindowContext(p); + break; + + default: + validLine = (*p == '\0'); + break; + } + + if (!validLine) + { + ErrorF("XSELinux: Line %d of %s is invalid\n", + lineNumber, XSELINUXCONFIGFILE); + goto out; + } + } + + /* check to make sure the default types and the nonlocal context + * were specified + */ + if (XSELinuxPropertyTypeDefault == NULL) + { + ErrorF("XSELinux: No default property type specified\n"); + goto out; + } + else if (XSELinuxExtensionTypeDefault == NULL) + { + ErrorF("XSELinux: No default extension type specified\n"); + goto out; + } + else if (XSELinuxNonlocalContextDefault == NULL) + { + ErrorF("XSELinux: No default context for non-local clients specified\n"); + goto out; + } + else if (XSELinuxRootWindowContext == NULL) + { + ErrorF("XSELinux: No context specified for the root window\n"); + goto out; + } + + /* Finally, append the default property and extension types to the + * bottoms of the propertyTypes and extensionTypes arrays, respectively. + * The 'name' of the property / extension is NULL. + */ + newTypes = (char **)xrealloc(propertyTypes, sizeof(char *) *((propertyTypesCount+1) * 2)); + if (!newTypes) + { + ErrorF("XSELinux: out of memory\n"); + goto out; + } + propertyTypesCount++; + newTypes[propertyTypesCount*2 - 2] = NULL; + newTypes[propertyTypesCount*2 - 1] = XSELinuxPropertyTypeDefault; + propertyTypes = newTypes; + + newTypes = (char **)xrealloc(extensionTypes, sizeof(char *) *((extensionTypesCount+1) * 2)); + if (!newTypes) + { + ErrorF("XSELinux: out of memory\n"); + goto out; + } + extensionTypesCount++; + newTypes[extensionTypesCount*2 - 2] = NULL; + newTypes[extensionTypesCount*2 - 1] = XSELinuxExtensionTypeDefault; + extensionTypes = newTypes; + + ret = TRUE; + +out: + fclose(f); + return ret; +} /* XSELinuxLoadConfigFile */ + +static void +XSELinuxFreeConfigData(void) +{ + char **ptr; + + /* Free all the memory in the table until we reach the NULL, then + * skip one past the NULL and free the default type. Then take care + * of some bookkeeping. + */ + for (ptr = propertyTypes; *ptr; ptr++) + xfree(*ptr); + ptr++; + xfree(*ptr); + + XSELinuxPropertyTypeDefault = NULL; + propertyTypesCount = 0; + + xfree(propertyTypes); + propertyTypes = NULL; + + /* ... and the same for the extension type table */ + for (ptr = extensionTypes; *ptr; ptr++) + xfree(*ptr); + ptr++; + xfree(*ptr); + + XSELinuxExtensionTypeDefault = NULL; + extensionTypesCount = 0; + + xfree(extensionTypes); + extensionTypes = NULL; + + /* finally, take care of the context for non-local connections */ + xfree(XSELinuxNonlocalContextDefault); + XSELinuxNonlocalContextDefault = NULL; + + /* ... and for the root window */ + xfree(XSELinuxRootWindowContext); + XSELinuxRootWindowContext = NULL; +} /* XSELinuxFreeConfigData */ + +/* Extension dispatch functions */ +static int +ProcXSELinuxDispatch(ClientPtr client) +{ + return BadRequest; +} /* ProcXSELinuxDispatch */ + +static void +XSELinuxResetProc(ExtensionEntry *extEntry) +{ + FreeClientState(serverClient); + + XSELinuxFreeConfigData(); + + audit_close(audit_fd); + + avc_destroy(); +} /* XSELinuxResetProc */ + +static void +XSELinuxAVCAudit(void *auditdata, + security_class_t class, + char *msgbuf, + size_t msgbufsize) +{ + XSELinuxAuditRec *audit = (XSELinuxAuditRec*)auditdata; + ClientPtr client = audit->client; + char requestNum[8]; + REQUEST(xReq); + + if (stuff) + snprintf(requestNum, 8, "%d", stuff->reqType); + + snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s", + stuff ? "request=" : "", + stuff ? requestNum : "", + audit->property ? " property=" : "", + audit->property ? audit->property : "", + audit->extension ? " extension=" : "", + audit->extension ? audit->extension : ""); +} + +static void +XSELinuxAVCLog(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + VErrorF(fmt, ap); + va_end(ap); +} + +/* XSELinuxExtensionSetup + * + * Set up the XSELinux Extension (pre-init) + */ +void +XSELinuxExtensionSetup(INITARGS) +{ + /* Allocate the client private index */ + clientPrivateIndex = AllocateClientPrivateIndex(); + if (!AllocateClientPrivate(clientPrivateIndex, + sizeof (XSELinuxClientStateRec))) + FatalError("XSELinux: Failed to allocate client private.\n"); + + /* Allocate the extension private index */ + extnsnPrivateIndex = AllocateExtensionPrivateIndex(); + if (!AllocateExtensionPrivate(extnsnPrivateIndex, 0)) + FatalError("XSELinux: Failed to allocate extension private.\n"); +} + +/* XSELinuxExtensionInit + * + * Initialize the XSELinux Extension + */ +void +XSELinuxExtensionInit(INITARGS) +{ + ExtensionEntry *extEntry; + struct avc_log_callback alc = {XSELinuxAVCLog, XSELinuxAVCAudit}; + + if (!is_selinux_enabled()) + { + ErrorF("SELinux Extension failed to load: SELinux not enabled\n"); + return; + } + + if (avc_init("xserver", NULL, &alc, NULL, NULL) < 0) + { + FatalError("couldn't initialize SELinux userspace AVC\n"); + } + + if (!AddCallback(&ClientStateCallback, XSELinuxClientState, NULL)) + return; + + /* Load the config file. If this fails, shut down the server, + * since an unknown security status is worse than no security. + * + * Note that this must come before we assign a security state + * for the serverClient, because the serverClient's root windows + * are assigned a context based on data in the config file. + */ + if (XSELinuxLoadConfigFile() != TRUE) + { + FatalError("XSELinux: Failed to load security policy\n"); + } + + /* prepare for auditing */ + audit_fd = audit_open(); + if (audit_fd < 0) + { + FatalError("XSELinux: Failed to open the system audit log\n"); + } + + /* register security callbacks */ + XaceRegisterCallback(XACE_CORE_DISPATCH, XSELinuxCoreDispatch, NULL); + XaceRegisterCallback(XACE_EXT_ACCESS, XSELinuxExtDispatch, NULL); + XaceRegisterCallback(XACE_EXT_DISPATCH, XSELinuxExtDispatch, NULL); + XaceRegisterCallback(XACE_RESOURCE_ACCESS, XSELinuxResLookup, NULL); + XaceRegisterCallback(XACE_MAP_ACCESS, XSELinuxMap, NULL); + XaceRegisterCallback(XACE_HOSTLIST_ACCESS, XSELinuxHostlist, NULL); + XaceRegisterCallback(XACE_BACKGRND_ACCESS, XSELinuxBackgrnd, NULL); + XaceRegisterCallback(XACE_DRAWABLE_ACCESS, XSELinuxDrawable, NULL); + XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); + /* XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, XSELinuxDeclare, NULL); + XaceRegisterCallback(XACE_DEVICE_ACCESS, XSELinuxDevice, NULL); */ + + /* register extension with server */ + extEntry = AddExtension(XSELINUX_EXTENSION_NAME, + XSELinuxNumberEvents, XSELinuxNumberErrors, + ProcXSELinuxDispatch, ProcXSELinuxDispatch, + XSELinuxResetProc, StandardMinorOpcode); +} diff --git a/Xext/xselinux.h b/Xext/xselinux.h new file mode 100644 index 000000000..eff6db5f4 --- /dev/null +++ b/Xext/xselinux.h @@ -0,0 +1,29 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice 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 NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR 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. + +********************************************************/ + +#ifndef _XSELINUX_H +#define _XSELINUX_H + +#define XSELINUX_EXTENSION_NAME "SELinux" +#define XSELINUX_MAJOR_VERSION 1 +#define XSELINUX_MINOR_VERSION 0 +#define XSELinuxNumberEvents 0 +#define XSELinuxNumberErrors 0 + +#endif /* _XSELINUX_H */ From 28e80cd65b1207b123c02f895851bb6d207aa3c1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:15:19 -0400 Subject: [PATCH 010/552] Add SELinux extension configure-time support. --- configure.ac | 16 +++++++++++++++- include/dix-config.h.in | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 002be624c..7e931ced2 100644 --- a/configure.ac +++ b/configure.ac @@ -442,6 +442,7 @@ AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinera AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) +AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (default: enabled)]), [XSELINUX=$enableval], [XSELINUX=$XACE]) AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE]) AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) @@ -676,6 +677,19 @@ if test "x$XACE" = xyes; then AC_DEFINE(XACE, 1, [Build X-ACE extension]) fi +AM_CONDITIONAL(XSELINUX, [test "x$XSELINUX" = xyes]) +if test "x$XSELINUX" = xyes; then + if test "x$XACE" != xyes; then + AC_MSG_ERROR([cannot build SELinux extension without X-ACE]) + fi + AC_CHECK_HEADERS([selinux/selinux.h selinux/avc.h], [], AC_MSG_ERROR([SELinux include files not found])) + AC_CHECK_LIB(selinux, avc_init, [], AC_MSG_ERROR([SELinux library not found])) + AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers])) + AC_CHECK_LIB(audit, audit_log_avc, [], AC_MSG_ERROR([SELinux extension requires audit system library])) + AC_DEFINE(XSELINUX, 1, [Build SELinux extension]) + SELINUX_LIB="-lselinux -laudit" +fi + AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes]) if test "x$XCSECURITY" = xyes; then if test "x$XACE" != xyes; then @@ -1162,7 +1176,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" - XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB" + XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $SELINUX_LIB $OS_LIB" if test "x$DGA" = xauto; then PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no]) diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 7aabae2ec..4a0b12800 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -317,6 +317,9 @@ /* Build X-ACE extension */ #undef XACE +/* Build SELinux extension */ +#undef XSELINUX + /* Support XCMisc extension */ #undef XCMISC From a7f4bbea87ada1d699bfd9e3b6a98f06191650f6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:17:01 -0400 Subject: [PATCH 011/552] Add SELinux extension to the module/extension loader. --- hw/xfree86/dixmods/extmod/modinit.h | 5 +++++ mi/miinitext.c | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index 41f060b2a..131b9e6e6 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -129,6 +129,11 @@ extern void ShmRegisterFuncs( extern void XaceExtensionInit(INITARGS); #endif +#ifdef XSELINUX +extern void XSELinuxExtensionSetup(INITARGS); +extern void XSELinuxExtensionInit(INITARGS); +#endif + #if 1 extern void SecurityExtensionSetup(INITARGS); extern void SecurityExtensionInit(INITARGS); diff --git a/mi/miinitext.c b/mi/miinitext.c index cb3447372..e270bc60a 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -248,6 +248,9 @@ typedef void (*InitExtension)(INITARGS); #include "securitysrv.h" #include #endif +#ifdef XSELINUX +#include "xselinux.h" +#endif #ifdef PANORAMIX #include #endif @@ -321,6 +324,10 @@ extern void XaceExtensionInit(INITARGS); extern void SecurityExtensionSetup(INITARGS); extern void SecurityExtensionInit(INITARGS); #endif +#ifdef XSELINUX +extern void XSELinuxExtensionSetup(INITARGS); +extern void XSELinuxExtensionInit(INITARGS); +#endif #ifdef XPRINT extern void XpExtensionInit(INITARGS); #endif @@ -532,6 +539,9 @@ InitExtensions(argc, argv) #ifdef XCSECURITY SecurityExtensionSetup(); #endif +#ifdef XSELINUX + XSELinuxExtensionSetup(); +#endif #ifdef PANORAMIX # if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX) if (!noPanoramiXExtension) PanoramiXExtensionInit(); @@ -600,6 +610,9 @@ InitExtensions(argc, argv) #ifdef XCSECURITY if (!noSecurityExtension) SecurityExtensionInit(); #endif +#ifdef XSELINUX + XSELinuxExtensionInit(); +#endif #ifdef XPRINT XpExtensionInit(); /* server-specific extension, cannot be disabled */ #endif @@ -705,6 +718,9 @@ static ExtensionModule staticExtensions[] = { #ifdef XCSECURITY { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, SecurityExtensionSetup, NULL }, #endif +#ifdef XSELINUX + { XSELinuxExtensionInit, XSELINUX_EXTENSION_NAME, NULL, XSELinuxExtensionSetup, NULL }, +#endif #ifdef XPRINT { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL }, #endif From 7f16c38ae2b47b195609d8fedefb7b28f612b2d4 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:31:18 -0400 Subject: [PATCH 012/552] Add SELinux extension configure-time support. --- Xext/Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 6ea3d7445..be04c849a 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -76,6 +76,16 @@ if XACE BUILTIN_SRCS += $(XACE_SRCS) endif +# SELinux extension: provides SELinux policy support for X objects +# requires X-ACE extension +XSELINUX_SRCS = xselinux.c xselinux.h +if XSELINUX +BUILTIN_SRCS += $(XSELINUX_SRCS) + +SERVERCONFIG_DATA += XSELinuxConfig +AM_CFLAGS += -DXSELINUXCONFIGFILE=\"$(SERVERCONFIGdir)/XSELinuxConfig\" +endif + # Security extension: multi-level security to protect clients from each other XCSECURITY_SRCS = security.c securitysrv.h if XCSECURITY From 3714d9149928754afcd6b2466a1371ca32e17985 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 4 Oct 2006 16:23:35 -0400 Subject: [PATCH 013/552] Experimental window property holding security context. --- Xext/xselinux.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 5a6d2ef00..df19e5df0 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -35,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include +#include #include #include #include "dixstruct.h" @@ -120,6 +121,10 @@ static char **extensionTypes = NULL; static int extensionTypesCount = 0; static char *XSELinuxExtensionTypeDefault = NULL; +/* Atoms for SELinux window labeling properties */ +Atom atom_ctx; +Atom atom_client_ctx; + /* security context for non-local clients */ static char *XSELinuxNonlocalContextDefault = NULL; @@ -1196,6 +1201,28 @@ CALLBACK(XSELinuxClientState) } } /* XSELinuxClientState */ +/* Labeling callbacks */ +CALLBACK(XSELinuxWindowInit) +{ + XaceWindowRec *rec = (XaceWindowRec*)calldata; + security_context_t ctx; + int rc; + + if (HAVESTATE(rec->client)) { + rc = avc_sid_to_context(SID(rec->client), &ctx); + if (rc < 0) + FatalError("Failed to get security context!\n"); + rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, + PropModeReplace, strlen(ctx), ctx, FALSE); + freecon(ctx); + } + else + rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, + PropModeReplace, 10, "UNLABELED!", FALSE); + if (rc != Success) + FatalError("Failed to set context property on window!\n"); +} /* XSELinuxWindowInit */ + static char *XSELinuxKeywords[] = { #define XSELinuxKeywordComment 0 "#", @@ -1844,6 +1871,14 @@ XSELinuxExtensionInit(INITARGS) if (!AddCallback(&ClientStateCallback, XSELinuxClientState, NULL)) return; + /* Create atoms for doing window labeling */ + atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, 1); + if (atom_ctx == BAD_RESOURCE) + return; + atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, 1); + if (atom_client_ctx == BAD_RESOURCE) + return; + /* Load the config file. If this fails, shut down the server, * since an unknown security status is worse than no security. * @@ -1873,6 +1908,7 @@ XSELinuxExtensionInit(INITARGS) XaceRegisterCallback(XACE_BACKGRND_ACCESS, XSELinuxBackgrnd, NULL); XaceRegisterCallback(XACE_DRAWABLE_ACCESS, XSELinuxDrawable, NULL); XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); + XaceRegisterCallback(XACE_WINDOW_INIT, XSELinuxWindowInit, NULL); /* XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, XSELinuxDeclare, NULL); XaceRegisterCallback(XACE_DEVICE_ACCESS, XSELinuxDevice, NULL); */ From 354c80da66af141e8ba6d75fed75a0f482987956 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 5 Oct 2006 16:07:26 -0400 Subject: [PATCH 014/552] Improve error handling, messages during initialization. --- Xext/xselinux.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index df19e5df0..2f960d1a9 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1211,7 +1211,7 @@ CALLBACK(XSELinuxWindowInit) if (HAVESTATE(rec->client)) { rc = avc_sid_to_context(SID(rec->client), &ctx); if (rc < 0) - FatalError("Failed to get security context!\n"); + FatalError("XSELinux: Failed to get security context!\n"); rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); freecon(ctx); @@ -1220,7 +1220,7 @@ CALLBACK(XSELinuxWindowInit) rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, 10, "UNLABELED!", FALSE); if (rc != Success) - FatalError("Failed to set context property on window!\n"); + FatalError("XSELinux: Failed to set context property on window!\n"); } /* XSELinuxWindowInit */ static char *XSELinuxKeywords[] = { @@ -1859,13 +1859,13 @@ XSELinuxExtensionInit(INITARGS) if (!is_selinux_enabled()) { - ErrorF("SELinux Extension failed to load: SELinux not enabled\n"); + ErrorF("XSELinux: Extension failed to load: SELinux not enabled\n"); return; } if (avc_init("xserver", NULL, &alc, NULL, NULL) < 0) { - FatalError("couldn't initialize SELinux userspace AVC\n"); + FatalError("XSELinux: Couldn't initialize SELinux userspace AVC\n"); } if (!AddCallback(&ClientStateCallback, XSELinuxClientState, NULL)) @@ -1874,10 +1874,10 @@ XSELinuxExtensionInit(INITARGS) /* Create atoms for doing window labeling */ atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, 1); if (atom_ctx == BAD_RESOURCE) - return; + FatalError("XSELinux: Failed to create atom\n"); atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, 1); if (atom_client_ctx == BAD_RESOURCE) - return; + FatalError("XSELinux: Failed to create atom\n"); /* Load the config file. If this fails, shut down the server, * since an unknown security status is worse than no security. From 5719afe6d3a246985709e6f045617c1e16a7da51 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 26 Oct 2006 20:20:57 -0400 Subject: [PATCH 015/552] Change symbol in libaudit library test. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7e931ced2..730646376 100644 --- a/configure.ac +++ b/configure.ac @@ -685,7 +685,7 @@ if test "x$XSELINUX" = xyes; then AC_CHECK_HEADERS([selinux/selinux.h selinux/avc.h], [], AC_MSG_ERROR([SELinux include files not found])) AC_CHECK_LIB(selinux, avc_init, [], AC_MSG_ERROR([SELinux library not found])) AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers])) - AC_CHECK_LIB(audit, audit_log_avc, [], AC_MSG_ERROR([SELinux extension requires audit system library])) + AC_CHECK_LIB(audit, audit_open, [], AC_MSG_ERROR([SELinux extension requires audit system library])) AC_DEFINE(XSELINUX, 1, [Build SELinux extension]) SELINUX_LIB="-lselinux -laudit" fi From a60da1db7cced28c07960a713eb18deb45beb432 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 29 Nov 2006 22:19:57 -0500 Subject: [PATCH 016/552] Add required root window context to config file. --- Xext/XSELinuxConfig | 1 + 1 file changed, 1 insertion(+) diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig index faf815e27..9c953f55f 100644 --- a/Xext/XSELinuxConfig +++ b/Xext/XSELinuxConfig @@ -9,6 +9,7 @@ # security policy. Only one nonlocal_context rule may be defined. # nonlocal_context system_u:object_r:remote_xclient_t:s1 +root_window_context system_u:object_r:root_window_t:s1 # # Property rules map a property name to a SELinux type. The type must From ca77c121075a9de1f47d42f6aaf91c20185231de Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 12 Dec 2006 13:26:52 -0500 Subject: [PATCH 017/552] Naming change: Security*Operation -> Xace*Operation --- Xext/xselinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 2f960d1a9..8d710f672 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1090,7 +1090,7 @@ CALLBACK(XSELinuxProperty) { if (errno != EACCES) ErrorF("Property: unexpected error %d\n", errno); - rec->rval = SecurityIgnoreOperation; + rec->rval = XaceIgnoreOperation; } } else ErrorF("No client state in property callback!\n"); From e124806994675e16ca8e3937388f2cadeb529fc3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 12 Dec 2006 13:35:22 -0500 Subject: [PATCH 018/552] Remove trailing whitespace (whitespace police). --- Xext/xselinux.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 8d710f672..1c2b508b5 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -135,8 +135,8 @@ static char *XSELinuxRootWindowContext = NULL; extern Selection *CurrentSelections; extern int NumCurrentSelections; -/* - * list of classes corresponding to SIDs in the +/* + * list of classes corresponding to SIDs in the * rsid array of the security state structure (below). * * XXX SIDs should be stored in their native objects, not all @@ -193,7 +193,7 @@ IndexByClass(security_class_t class) } /* - * Does sanity checking on a resource ID. This can be removed after + * Does sanity checking on a resource ID. This can be removed after * testing. */ static void @@ -351,7 +351,7 @@ ObjectSIDByLabel(security_context_t basecontext, security_class_t class, con = context_new(base); if (!con) goto out2; - + /* look in the mappings of names to types */ ptr = (class == SECCLASS_PROPERTY) ? propertyTypes : extensionTypes; for (; *ptr; ptr+=2) @@ -564,14 +564,14 @@ CheckSendEventPerms(ClientPtr client) swapl(&stuff->destination, n); return IDPerm(client, stuff->destination, SECCLASS_WINDOW, perm); } - + static int CheckConvertSelectionPerms(ClientPtr client) { register char n; int rval = TRUE; REQUEST(xConvertSelectionReq); - + if (!REQUEST_SIZE_CHECK(client, xConvertSelectionReq)) return FALSE; @@ -620,11 +620,11 @@ CheckSetSelectionOwnerPerms(ClientPtr client) rval = rval && IDPerm(client, CurrentSelections[i].window, SECCLASS_WINDOW, WINDOW__CHSELECTION); } - rval = rval && IDPerm(client, stuff->window, + rval = rval && IDPerm(client, stuff->window, SECCLASS_WINDOW, WINDOW__CHSELECTION); return rval; } - + CALLBACK(XSELinuxCoreDispatch) { XaceCoreDispatchRec *rec = (XaceCoreDispatchRec*)calldata; @@ -678,7 +678,7 @@ CALLBACK(XSELinuxCoreDispatch) /* Window class control requirements */ case X_ChangeProperty: rval = IDPERM(client, xChangePropertyReq, window, - SECCLASS_WINDOW, + SECCLASS_WINDOW, WINDOW__CHPROPLIST | WINDOW__CHPROP | WINDOW__LISTPROP); break; @@ -914,7 +914,7 @@ CALLBACK(XSELinuxCoreDispatch) && IDPERM(client, xPolyTextReq, drawable, SECCLASS_DRAWABLE, DRAWABLE__DRAW); break; - + /* Pixmap class control requirements */ case X_CreatePixmap: rval = IDPERM(client, xCreatePixmapReq, pid, @@ -950,7 +950,7 @@ CALLBACK(XSELinuxCoreDispatch) rval = IDPERM(client, xResourceReq, id, SECCLASS_CURSOR, CURSOR__FREE); break; - + /* GC class control requirements */ case X_CreateGC: rval = IDPERM(client, xCreateGCReq, gc, @@ -1018,7 +1018,7 @@ CALLBACK(XSELinuxExtDispatch) security_id_t extsid; access_vector_t perm; REQUEST(xReq); - + /* XXX there should be a separate callback for this */ if (!EXTENSIONSID(ext)) { @@ -1215,7 +1215,7 @@ CALLBACK(XSELinuxWindowInit) rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); freecon(ctx); - } + } else rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, 10, "UNLABELED!", FALSE); @@ -1441,7 +1441,7 @@ XSELinuxParsePropertyTypeRule(char *p) newTypes[propertyTypesCount*2 - 2] = propcopy; newTypes[propertyTypesCount*2 - 1] = typecopy; - + propertyTypes = newTypes; return TRUE; @@ -1612,7 +1612,7 @@ XSELinuxLoadConfigFile(void) int lineNumber = 0; char **newTypes; Bool ret = FALSE; - + if (!XSELINUXCONFIGFILE) return FALSE; @@ -1837,7 +1837,7 @@ XSELinuxExtensionSetup(INITARGS) { /* Allocate the client private index */ clientPrivateIndex = AllocateClientPrivateIndex(); - if (!AllocateClientPrivate(clientPrivateIndex, + if (!AllocateClientPrivate(clientPrivateIndex, sizeof (XSELinuxClientStateRec))) FatalError("XSELinux: Failed to allocate client private.\n"); From 568c09481e5d62091d032837171a36f409f39379 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 12 Dec 2006 15:59:08 -0500 Subject: [PATCH 019/552] Split AssignClientState() into two routines, new routine is server-specific. --- Xext/xselinux.c | 110 ++++++++++++++++++++++++++---------------------- 1 file changed, 59 insertions(+), 51 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 1c2b508b5..0de209d3d 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -381,6 +381,48 @@ ObjectSIDByLabel(security_context_t basecontext, security_class_t class, return sid; } +/* + * AssignServerState - set up server security state. + * + * Arguments: + */ +static void +AssignServerState(void) +{ + int i; + security_context_t basectx, objctx; + XSELinuxClientStateRec *state; + + state = (XSELinuxClientStateRec*)STATEPTR(serverClient); + avc_entry_ref_init(&state->aeref); + + /* use the context of the X server process for the serverClient */ + if (getcon(&basectx) < 0) + FatalError("Couldn't get context of X server process\n"); + + /* get a SID from the context */ + if (avc_context_to_sid(basectx, &state->sid) < 0) + FatalError("Client %d: couldn't get security ID for client\n", 0); + + /* get contexts and then SIDs for each resource type */ + for (i=0; irsid[i]) < 0) + FatalError("Client %d: couldn't get SID for class %x\n", 0, + sClasses[i]); + + freecon(objctx); + } + + /* mark as set up, free base context, and return */ + state->haveState = TRUE; + freecon(basectx); +} + /* * AssignClientState - set up client security state. * @@ -392,75 +434,41 @@ AssignClientState(ClientPtr client) { int i, needToFree = 0; security_context_t basectx, objctx; - XSELinuxClientStateRec *state = (XSELinuxClientStateRec*)STATEPTR(client); - Bool isServerClient = FALSE; + XSELinuxClientStateRec *state; + state = (XSELinuxClientStateRec*)STATEPTR(client); avc_entry_ref_init(&state->aeref); - if (client->index > 0) - { - XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; - if (_XSERVTransIsLocal(ci)) { - /* for local clients, can get context from the socket */ - int fd = _XSERVTransGetConnectionNumber(ci); - if (getpeercon(fd, &basectx) < 0) - { - FatalError("Client %d: couldn't get context from socket\n", - client->index); - } - needToFree = 1; - } - else - { - /* for remote clients, need to use a default context */ - basectx = XSELinuxNonlocalContextDefault; - } - } - else - { - isServerClient = TRUE; - - /* use the context of the X server process for the serverClient */ - if (getcon(&basectx) < 0) - { - FatalError("Couldn't get context of X server process\n"); - } + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + if (_XSERVTransIsLocal(ci)) { + /* for local clients, can get context from the socket */ + int fd = _XSERVTransGetConnectionNumber(ci); + if (getpeercon(fd, &basectx) < 0) + FatalError("Client %d: couldn't get context from socket\n", + client->index); needToFree = 1; } + else + /* for remote clients, need to use a default context */ + basectx = XSELinuxNonlocalContextDefault; /* get a SID from the context */ if (avc_context_to_sid(basectx, &state->sid) < 0) - { FatalError("Client %d: couldn't get security ID for client\n", client->index); - } /* get contexts and then SIDs for each resource type */ - for (i=0; iindex, sClasses[i]); - } - else if (avc_context_to_sid(objctx, &state->rsid[i]) < 0) - { + + if (avc_context_to_sid(objctx, &state->rsid[i]) < 0) FatalError("Client %d: couldn't get SID for class %x\n", client->index, sClasses[i]); - } - freecon(objctx); - } - /* special handling for serverClient windows (that is, root windows) */ - if (isServerClient == TRUE) - { - i = IndexByClass(SECCLASS_WINDOW); - sidput(state->rsid[i]); - if (avc_context_to_sid(XSELinuxRootWindowContext, &state->rsid[i])) - { - FatalError("Failed to set SID for root window\n"); - } + freecon(objctx); } /* mark as set up, free base context if necessary, and return */ @@ -1183,7 +1191,7 @@ CALLBACK(XSELinuxClientState) switch(client->clientState) { case ClientStateInitial: - AssignClientState(serverClient); + AssignServerState(); break; case ClientStateRunning: From 7b90944258eba66b61328480759833ad7589bcca Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 12 Dec 2006 15:59:38 -0500 Subject: [PATCH 020/552] Change MLS levels in config file contexts to more sane defaults. --- Xext/XSELinuxConfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig index 9c953f55f..65f401508 100644 --- a/Xext/XSELinuxConfig +++ b/Xext/XSELinuxConfig @@ -8,8 +8,8 @@ # be defined, and it must be a valid context according to the SELinux # security policy. Only one nonlocal_context rule may be defined. # -nonlocal_context system_u:object_r:remote_xclient_t:s1 -root_window_context system_u:object_r:root_window_t:s1 +nonlocal_context system_u:object_r:remote_xclient_t:s0 +root_window_context system_u:object_r:root_window_t:s0 # # Property rules map a property name to a SELinux type. The type must From fb6d676de5aa606d943715437a12a68d9a41f386 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 12 Dec 2006 16:17:51 -0500 Subject: [PATCH 021/552] Add xserver object class to list of object classes. --- Xext/xselinux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 0de209d3d..41d01e4c6 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -152,7 +152,8 @@ static security_class_t sClasses[] = { SECCLASS_COLORMAP, SECCLASS_PROPERTY, SECCLASS_XCLIENT, - SECCLASS_XINPUT + SECCLASS_XINPUT, + SECCLASS_XSERVER }; #define NRES (sizeof(sClasses)/sizeof(sClasses[0])) From cd71e861830081807e5b93ae89c73c17986c6330 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 20 Dec 2006 13:45:24 -0500 Subject: [PATCH 022/552] Naming change: Security*Access -> Dix*Access. Clarify some error message strings. --- Xext/xselinux.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 41d01e4c6..9b5ee1000 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -403,18 +403,18 @@ AssignServerState(void) /* get a SID from the context */ if (avc_context_to_sid(basectx, &state->sid) < 0) - FatalError("Client %d: couldn't get security ID for client\n", 0); + FatalError("Client %d: context_to_sid(%s) failed\n", 0, basectx); /* get contexts and then SIDs for each resource type */ for (i=0; irsid[i]) < 0) - FatalError("Client %d: couldn't get SID for class %x\n", 0, - sClasses[i]); + FatalError("Client %d: context_to_sid(%s) failed\n", + 0, objctx); freecon(objctx); } @@ -455,19 +455,19 @@ AssignClientState(ClientPtr client) /* get a SID from the context */ if (avc_context_to_sid(basectx, &state->sid) < 0) - FatalError("Client %d: couldn't get security ID for client\n", - client->index); + FatalError("Client %d: context_to_sid(%s) failed\n", + client->index, basectx); /* get contexts and then SIDs for each resource type */ for (i=0; iindex, sClasses[i]); + FatalError("Client %d: compute_create(base=%s, cls=%d) failed\n", + client->index, basectx, sClasses[i]); if (avc_context_to_sid(objctx, &state->rsid[i]) < 0) - FatalError("Client %d: couldn't get SID for class %x\n", - client->index, sClasses[i]); + FatalError("Client %d: context_to_sid(%s) failed\n", + client->index, objctx); freecon(objctx); } @@ -1078,11 +1078,11 @@ CALLBACK(XSELinuxProperty) if (!propsid) return; - if (rec->access_mode & SecurityReadAccess) + if (rec->access_mode & DixReadAccess) perm |= PROPERTY__READ; - if (rec->access_mode & SecurityWriteAccess) + if (rec->access_mode & DixWriteAccess) perm |= PROPERTY__WRITE; - if (rec->access_mode & SecurityDestroyAccess) + if (rec->access_mode & DixDestroyAccess) perm |= PROPERTY__FREE; if (!rec->access_mode) perm = PROPERTY__READ | PROPERTY__WRITE | PROPERTY__FREE; @@ -1176,7 +1176,7 @@ CALLBACK(XSELinuxDrawable) CALLBACK(XSELinuxHostlist) { XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata; - access_vector_t perm = (rec->access_mode == SecurityReadAccess) ? + access_vector_t perm = (rec->access_mode == DixReadAccess) ? XSERVER__GETHOSTLIST : XSERVER__SETHOSTLIST; if (!ServerPerm(rec->client, SECCLASS_XSERVER, perm)) From 4b1c9ac3d13767e395b47e76b37f9f3a569e7be1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 22 Dec 2006 13:04:50 -0500 Subject: [PATCH 023/552] Policy updates. --- Xext/XSELinuxConfig | 113 +++++++++++++++++++++++++++++++++----------- 1 file changed, 86 insertions(+), 27 deletions(-) diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig index 65f401508..1c5016e5f 100644 --- a/Xext/XSELinuxConfig +++ b/Xext/XSELinuxConfig @@ -19,13 +19,47 @@ root_window_context system_u:object_r:root_window_t:s0 # property type may not be omitted. The default rule may appear in # any position (it need not be the last property rule listed). # -property WM_NAME wm_property_t -property WM_CLASS wm_property_t -property WM_ICON_NAME wm_property_t -property WM_HINTS wm_property_t -property WM_NORMAL_HINTS wm_property_t -property WM_COMMAND wm_property_t +# Properties set by typical clients: WM, _NET_WM, etc. +property WM_NAME client_property_t +property WM_CLASS client_property_t +property WM_ICON_NAME client_property_t +property WM_HINTS client_property_t +property WM_NORMAL_HINTS client_property_t +property WM_COMMAND client_property_t +property WM_CLIENT_MACHINE client_property_t +property WM_LOCALE_NAME client_property_t +property WM_CLIENT_LEADER client_property_t +property WM_STATE client_property_t +property WM_PROTOCOLS client_property_t +property WM_WINDOW_ROLE client_property_t +property WM_TRANSIENT_FOR client_property_t +property _NET_WM_NAME client_property_t +property _NET_WM_ICON client_property_t +property _NET_WM_ICON_NAME client_property_t +property _NET_WM_PID client_property_t +property _NET_WM_STATE client_property_t +property _NET_WM_DESKTOP client_property_t +property _NET_WM_SYNC_REQUEST_COUNTER client_property_t +property _NET_WM_WINDOW_TYPE client_property_t +property _NET_WM_USER_TIME client_property_t +property _MOTIF_DRAG_RECEIVER_INFO client_property_t +property XdndAware client_property_t +# Properties written by xrdb +property RESOURCE_MANAGER rm_property_t +property SCREEN_RESOURCES rm_property_t + +# Properties written by window managers +property _MIT_PRIORITY_COLORS wm_property_t + +# Properties used for security labeling +property _SELINUX_CLIENT_CONTEXT seclabel_property_t + +# Properties used to communicate screen information +property XFree86_VT info_property_t +property XFree86_DDC_EDID1_RAWDATA info_property_t + +# Cut buffers property CUT_BUFFER0 cut_buffer_property_t property CUT_BUFFER1 cut_buffer_property_t property CUT_BUFFER2 cut_buffer_property_t @@ -35,6 +69,7 @@ property CUT_BUFFER5 cut_buffer_property_t property CUT_BUFFER6 cut_buffer_property_t property CUT_BUFFER7 cut_buffer_property_t +# Default fallback type property default unknown_property_t # @@ -45,40 +80,64 @@ property default unknown_property_t # extension type may not be omitted. The default rule may appear in # any position (it need not be the last extension rule listed). # +# Standard extensions extension BIG-REQUESTS std_ext_t extension DOUBLE-BUFFER std_ext_t -extension DPMS screensaver_ext_t extension Extended-Visual-Information std_ext_t -extension FontCache font_ext_t -extension GLX std_ext_t -extension LBX std_ext_t -extension MIT-SCREEN-SAVER screensaver_ext_t -extension MIT-SHM shmem_ext_t extension MIT-SUNDRY-NONSTANDARD std_ext_t +extension SHAPE std_ext_t +extension SYNC std_ext_t +extension XC-MISC std_ext_t +extension XFIXES std_ext_t +extension XFree86-Misc std_ext_t +extension XpExtension std_ext_t + +# Screen management and multihead extensions +extension RANDR output_ext_t +extension XINERAMA std_ext_t + +# Input extensions +extension XInputExtension input_ext_t +extension XKEYBOARD input_ext_t + +# Screensaver, power management extensions +extension DPMS screensaver_ext_t +extension MIT-SCREEN-SAVER screensaver_ext_t + +# Fonting extensions +extension FontCache font_ext_t +extension XFree86-Bigfont font_ext_t + +# Shared memory extensions +extension MIT-SHM shmem_ext_t + +# Accelerated graphics, OpenGL, direct rendering extensions +extension DAMAGE accelgraphics_ext_t +extension GLX accelgraphics_ext_t extension NV-CONTROL accelgraphics_ext_t extension NV-GLX accelgraphics_ext_t extension NVIDIA-GLX accelgraphics_ext_t -extension RANDR std_ext_t -extension RECORD debug_ext_t extension RENDER std_ext_t +extension XFree86-DGA accelgraphics_ext_t + +# Debugging, testing, and recording extensions +extension RECORD debug_ext_t +extension X-Resource debug_ext_t +extension XTEST debug_ext_t + +# Extensions just for window managers +extension TOG-CUP windowmgr_ext_t + +# Security-related extensions extension SECURITY security_ext_t extension SELinux security_ext_t -extension SHAPE std_ext_t -extension SYNC sync_ext_t -extension TOG-CUP windowmgr_ext_t -extension X-Resource debug_ext_t extension XAccessControlExtension security_ext_t -extension XACEUSR security_ext_t extension XC-APPGROUP security_ext_t -extension XC-MISC std_ext_t -extension XFree86-Bigfont font_ext_t -extension XFree86-DGA accelgraphics_ext_t -extension XFree86-Misc std_ext_t + +# Video extensions extension XFree86-VidModeExtension video_ext_t -extension XInputExtension input_ext_t -extension XKEYBOARD input_ext_t -extension XpExtension std_ext_t -extension XTEST debug_ext_t extension XVideo video_ext_t extension XVideo-MotionCompensation video_ext_t + +# Default fallback type extension default unknown_ext_t From 3a9791b456f35adb252a9059b19265c6c447f1ba Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 19 Jan 2007 14:53:09 -0500 Subject: [PATCH 024/552] Policy updates. --- Xext/XSELinuxConfig | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig index 1c5016e5f..49582647e 100644 --- a/Xext/XSELinuxConfig +++ b/Xext/XSELinuxConfig @@ -59,15 +59,16 @@ property _SELINUX_CLIENT_CONTEXT seclabel_property_t property XFree86_VT info_property_t property XFree86_DDC_EDID1_RAWDATA info_property_t -# Cut buffers -property CUT_BUFFER0 cut_buffer_property_t -property CUT_BUFFER1 cut_buffer_property_t -property CUT_BUFFER2 cut_buffer_property_t -property CUT_BUFFER3 cut_buffer_property_t -property CUT_BUFFER4 cut_buffer_property_t -property CUT_BUFFER5 cut_buffer_property_t -property CUT_BUFFER6 cut_buffer_property_t -property CUT_BUFFER7 cut_buffer_property_t +# Clipboard and selection properties +property CUT_BUFFER0 clipboard_property_t +property CUT_BUFFER1 clipboard_property_t +property CUT_BUFFER2 clipboard_property_t +property CUT_BUFFER3 clipboard_property_t +property CUT_BUFFER4 clipboard_property_t +property CUT_BUFFER5 clipboard_property_t +property CUT_BUFFER6 clipboard_property_t +property CUT_BUFFER7 clipboard_property_t +property _XT_SELECTION_0 clipboard_property_t # Default fallback type property default unknown_property_t From 700fccf863593cbea1691789f1f1cafc08a32fee Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 19 Jan 2007 14:56:38 -0500 Subject: [PATCH 025/552] Remove the root window context line from the configuration file. This context will be derived through a type_transition rule instead. --- Xext/XSELinuxConfig | 1 - Xext/xselinux.c | 58 +-------------------------------------------- 2 files changed, 1 insertion(+), 58 deletions(-) diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig index 49582647e..e45fdcc31 100644 --- a/Xext/XSELinuxConfig +++ b/Xext/XSELinuxConfig @@ -9,7 +9,6 @@ # security policy. Only one nonlocal_context rule may be defined. # nonlocal_context system_u:object_r:remote_xclient_t:s0 -root_window_context system_u:object_r:root_window_t:s0 # # Property rules map a property name to a SELinux type. The type must diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 9b5ee1000..a6e021319 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -128,9 +128,6 @@ Atom atom_client_ctx; /* security context for non-local clients */ static char *XSELinuxNonlocalContextDefault = NULL; -/* security context for the root window */ -static char *XSELinuxRootWindowContext = NULL; - /* Selection stuff from dix */ extern Selection *CurrentSelections; extern int NumCurrentSelections; @@ -1241,9 +1238,7 @@ static char *XSELinuxKeywords[] = { "extension", #define XSELinuxKeywordNonlocalContext 3 "nonlocal_context", -#define XSELinuxKeywordRootWindowContext 4 - "root_window_context", -#define XSELinuxKeywordDefault 5 +#define XSELinuxKeywordDefault 4 "default" }; @@ -1581,39 +1576,6 @@ XSELinuxParseNonlocalContext(char *p) return TRUE; } /* XSELinuxParseNonlocalContext */ -static Bool -XSELinuxParseRootWindowContext(char *p) -{ - char *context; - - context = XSELinuxParseString(&p); - if (!context || (strlen(context) == 0)) - { - return FALSE; - } - - if (XSELinuxRootWindowContext != NULL) - { - return FALSE; - } - - /* validate the context */ - if (security_check_context(context)) - { - return FALSE; - } - - XSELinuxRootWindowContext = (char *)xalloc(strlen(context)+1); - if (!XSELinuxRootWindowContext) - { - ErrorF("XSELinux: out of memory\n"); - return FALSE; - } - strcpy(XSELinuxRootWindowContext, context); - - return TRUE; -} /* XSELinuxParseRootWindowContext */ - static Bool XSELinuxLoadConfigFile(void) { @@ -1630,7 +1592,6 @@ XSELinuxLoadConfigFile(void) propertyTypes = extensionTypes = NULL; XSELinuxPropertyTypeDefault = XSELinuxExtensionTypeDefault = NULL; XSELinuxNonlocalContextDefault = NULL; - XSELinuxRootWindowContext = NULL; #ifndef __UNIXOS2__ f = fopen(XSELINUXCONFIGFILE, "r"); @@ -1671,10 +1632,6 @@ XSELinuxLoadConfigFile(void) validLine = XSELinuxParseNonlocalContext(p); break; - case XSELinuxKeywordRootWindowContext: - validLine = XSELinuxParseRootWindowContext(p); - break; - default: validLine = (*p == '\0'); break; @@ -1706,11 +1663,6 @@ XSELinuxLoadConfigFile(void) ErrorF("XSELinux: No default context for non-local clients specified\n"); goto out; } - else if (XSELinuxRootWindowContext == NULL) - { - ErrorF("XSELinux: No context specified for the root window\n"); - goto out; - } /* Finally, append the default property and extension types to the * bottoms of the propertyTypes and extensionTypes arrays, respectively. @@ -1780,10 +1732,6 @@ XSELinuxFreeConfigData(void) /* finally, take care of the context for non-local connections */ xfree(XSELinuxNonlocalContextDefault); XSELinuxNonlocalContextDefault = NULL; - - /* ... and for the root window */ - xfree(XSELinuxRootWindowContext); - XSELinuxRootWindowContext = NULL; } /* XSELinuxFreeConfigData */ /* Extension dispatch functions */ @@ -1890,10 +1838,6 @@ XSELinuxExtensionInit(INITARGS) /* Load the config file. If this fails, shut down the server, * since an unknown security status is worse than no security. - * - * Note that this must come before we assign a security state - * for the serverClient, because the serverClient's root windows - * are assigned a context based on data in the config file. */ if (XSELinuxLoadConfigFile() != TRUE) { From 2fb8b7f8199c35ae0870cb54b40ee28a4e01d479 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 19 Jan 2007 19:14:51 -0500 Subject: [PATCH 026/552] Split ObjectSIDByLabel into two functions since property labeling now involves an additional compute_create lookup. --- Xext/xselinux.c | 85 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 24 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index a6e021319..5b77269f2 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -314,36 +314,75 @@ IDPerm(ClientPtr sclient, } /* - * ObjectSIDByLabel - get SID for an extension or property. + * GetPropertySID - compute SID for a property object. * * Arguments: - * class: should be SECCLASS_XEXTENSION or SECCLASS_PROPERTY. - * name: name of the extension or property. + * basecontext: context of client owning the property. + * name: name of the property. * * Returns: proper SID for the object or NULL on error. */ static security_id_t -ObjectSIDByLabel(security_context_t basecontext, security_class_t class, - const char *name) +GetPropertySID(security_context_t base, const char *name) +{ + security_context_t new, result; + context_t con; + security_id_t sid = NULL; + char **ptr, *type = NULL; + + /* make a new context-manipulation object */ + con = context_new(base); + if (!con) + goto out; + + /* look in the mappings of names to types */ + for (ptr = propertyTypes; *ptr; ptr+=2) + if (!strcmp(*ptr, name)) + break; + type = ptr[1]; + + /* set the role and type in the context (user unchanged) */ + if (context_type_set(con, type) || + context_role_set(con, "object_r")) + goto out2; + + /* get a context string from the context-manipulation object */ + new = context_str(con); + if (!new) + goto out2; + + /* perform a transition to obtain the final context */ + if (security_compute_create(base, new, SECCLASS_PROPERTY, &result) < 0) + goto out2; + + /* get a SID for the context */ + avc_context_to_sid(result, &sid); + freecon(result); + out2: + context_free(con); + out: + return sid; +} + +/* + * GetExtensionSID - compute SID for an extension object. + * + * Arguments: + * name: name of the extension. + * + * Returns: proper SID for the object or NULL on error. + */ +static security_id_t +GetExtensionSID(const char *name) { security_context_t base, new; context_t con; security_id_t sid = NULL; char **ptr, *type = NULL; - if (basecontext != NULL) - { - /* use the supplied context */ - base = strdup(basecontext); - if (base == NULL) - goto out; - } - else - { - /* get server context */ - if (getcon(&base) < 0) - goto out; - } + /* get server context */ + if (getcon(&base) < 0) + goto out; /* make a new context-manipulation object */ con = context_new(base); @@ -351,8 +390,7 @@ ObjectSIDByLabel(security_context_t basecontext, security_class_t class, goto out2; /* look in the mappings of names to types */ - ptr = (class == SECCLASS_PROPERTY) ? propertyTypes : extensionTypes; - for (; *ptr; ptr+=2) + for (ptr = extensionTypes; *ptr; ptr+=2) if (!strcmp(*ptr, name)) break; type = ptr[1]; @@ -368,8 +406,7 @@ ObjectSIDByLabel(security_context_t basecontext, security_class_t class, goto out3; /* get a SID for the context */ - if (avc_context_to_sid(new, &sid) < 0) - goto out3; + avc_context_to_sid(new, &sid); out3: context_free(con); @@ -1028,7 +1065,7 @@ CALLBACK(XSELinuxExtDispatch) /* XXX there should be a separate callback for this */ if (!EXTENSIONSID(ext)) { - extsid = ObjectSIDByLabel(NULL, SECCLASS_XEXTENSION, ext->name); + extsid = GetExtensionSID(ext->name); if (!extsid) return; EXTENSIONSID(ext) = extsid; @@ -1071,7 +1108,7 @@ CALLBACK(XSELinuxProperty) if (!tclient || !HAVESTATE(tclient)) return; - propsid = ObjectSIDByLabel(SID(tclient)->ctx, SECCLASS_PROPERTY, propname); + propsid = GetPropertySID(SID(tclient)->ctx, propname); if (!propsid) return; From 88f89b9ac1b92a0916c46488350ff68c3ffdd490 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 19 Jan 2007 19:15:49 -0500 Subject: [PATCH 027/552] Policy updates: use x prefix in property and ext types. --- Xext/XSELinuxConfig | 156 ++++++++++++++++++++++---------------------- 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig index e45fdcc31..38b78312a 100644 --- a/Xext/XSELinuxConfig +++ b/Xext/XSELinuxConfig @@ -19,58 +19,58 @@ nonlocal_context system_u:object_r:remote_xclient_t:s0 # any position (it need not be the last property rule listed). # # Properties set by typical clients: WM, _NET_WM, etc. -property WM_NAME client_property_t -property WM_CLASS client_property_t -property WM_ICON_NAME client_property_t -property WM_HINTS client_property_t -property WM_NORMAL_HINTS client_property_t -property WM_COMMAND client_property_t -property WM_CLIENT_MACHINE client_property_t -property WM_LOCALE_NAME client_property_t -property WM_CLIENT_LEADER client_property_t -property WM_STATE client_property_t -property WM_PROTOCOLS client_property_t -property WM_WINDOW_ROLE client_property_t -property WM_TRANSIENT_FOR client_property_t -property _NET_WM_NAME client_property_t -property _NET_WM_ICON client_property_t -property _NET_WM_ICON_NAME client_property_t -property _NET_WM_PID client_property_t -property _NET_WM_STATE client_property_t -property _NET_WM_DESKTOP client_property_t -property _NET_WM_SYNC_REQUEST_COUNTER client_property_t -property _NET_WM_WINDOW_TYPE client_property_t -property _NET_WM_USER_TIME client_property_t -property _MOTIF_DRAG_RECEIVER_INFO client_property_t -property XdndAware client_property_t +property WM_NAME client_xproperty_t +property WM_CLASS client_xproperty_t +property WM_ICON_NAME client_xproperty_t +property WM_HINTS client_xproperty_t +property WM_NORMAL_HINTS client_xproperty_t +property WM_COMMAND client_xproperty_t +property WM_CLIENT_MACHINE client_xproperty_t +property WM_LOCALE_NAME client_xproperty_t +property WM_CLIENT_LEADER client_xproperty_t +property WM_STATE client_xproperty_t +property WM_PROTOCOLS client_xproperty_t +property WM_WINDOW_ROLE client_xproperty_t +property WM_TRANSIENT_FOR client_xproperty_t +property _NET_WM_NAME client_xproperty_t +property _NET_WM_ICON client_xproperty_t +property _NET_WM_ICON_NAME client_xproperty_t +property _NET_WM_PID client_xproperty_t +property _NET_WM_STATE client_xproperty_t +property _NET_WM_DESKTOP client_xproperty_t +property _NET_WM_SYNC_REQUEST_COUNTER client_xproperty_t +property _NET_WM_WINDOW_TYPE client_xproperty_t +property _NET_WM_USER_TIME client_xproperty_t +property _MOTIF_DRAG_RECEIVER_INFO client_xproperty_t +property XdndAware client_xproperty_t # Properties written by xrdb -property RESOURCE_MANAGER rm_property_t -property SCREEN_RESOURCES rm_property_t +property RESOURCE_MANAGER rm_xproperty_t +property SCREEN_RESOURCES rm_xproperty_t # Properties written by window managers -property _MIT_PRIORITY_COLORS wm_property_t +property _MIT_PRIORITY_COLORS wm_xproperty_t # Properties used for security labeling -property _SELINUX_CLIENT_CONTEXT seclabel_property_t +property _SELINUX_CLIENT_CONTEXT seclabel_xproperty_t # Properties used to communicate screen information -property XFree86_VT info_property_t -property XFree86_DDC_EDID1_RAWDATA info_property_t +property XFree86_VT info_xproperty_t +property XFree86_DDC_EDID1_RAWDATA info_xproperty_t # Clipboard and selection properties -property CUT_BUFFER0 clipboard_property_t -property CUT_BUFFER1 clipboard_property_t -property CUT_BUFFER2 clipboard_property_t -property CUT_BUFFER3 clipboard_property_t -property CUT_BUFFER4 clipboard_property_t -property CUT_BUFFER5 clipboard_property_t -property CUT_BUFFER6 clipboard_property_t -property CUT_BUFFER7 clipboard_property_t -property _XT_SELECTION_0 clipboard_property_t +property CUT_BUFFER0 clipboard_xproperty_t +property CUT_BUFFER1 clipboard_xproperty_t +property CUT_BUFFER2 clipboard_xproperty_t +property CUT_BUFFER3 clipboard_xproperty_t +property CUT_BUFFER4 clipboard_xproperty_t +property CUT_BUFFER5 clipboard_xproperty_t +property CUT_BUFFER6 clipboard_xproperty_t +property CUT_BUFFER7 clipboard_xproperty_t +property _XT_SELECTION_0 clipboard_xproperty_t # Default fallback type -property default unknown_property_t +property default unknown_xproperty_t # # Extension rules map an extension name to a SELinux type. The type must @@ -81,63 +81,63 @@ property default unknown_property_t # any position (it need not be the last extension rule listed). # # Standard extensions -extension BIG-REQUESTS std_ext_t -extension DOUBLE-BUFFER std_ext_t -extension Extended-Visual-Information std_ext_t -extension MIT-SUNDRY-NONSTANDARD std_ext_t -extension SHAPE std_ext_t -extension SYNC std_ext_t -extension XC-MISC std_ext_t -extension XFIXES std_ext_t -extension XFree86-Misc std_ext_t -extension XpExtension std_ext_t +extension BIG-REQUESTS std_xext_t +extension DOUBLE-BUFFER std_xext_t +extension Extended-Visual-Information std_xext_t +extension MIT-SUNDRY-NONSTANDARD std_xext_t +extension SHAPE std_xext_t +extension SYNC std_xext_t +extension XC-MISC std_xext_t +extension XFIXES std_xext_t +extension XFree86-Misc std_xext_t +extension XpExtension std_xext_t # Screen management and multihead extensions -extension RANDR output_ext_t -extension XINERAMA std_ext_t +extension RANDR output_xext_t +extension XINERAMA std_xext_t # Input extensions -extension XInputExtension input_ext_t -extension XKEYBOARD input_ext_t +extension XInputExtension input_xext_t +extension XKEYBOARD input_xext_t # Screensaver, power management extensions -extension DPMS screensaver_ext_t -extension MIT-SCREEN-SAVER screensaver_ext_t +extension DPMS screensaver_xext_t +extension MIT-SCREEN-SAVER screensaver_xext_t # Fonting extensions -extension FontCache font_ext_t -extension XFree86-Bigfont font_ext_t +extension FontCache font_xext_t +extension XFree86-Bigfont font_xext_t # Shared memory extensions -extension MIT-SHM shmem_ext_t +extension MIT-SHM shmem_xext_t # Accelerated graphics, OpenGL, direct rendering extensions -extension DAMAGE accelgraphics_ext_t -extension GLX accelgraphics_ext_t -extension NV-CONTROL accelgraphics_ext_t -extension NV-GLX accelgraphics_ext_t -extension NVIDIA-GLX accelgraphics_ext_t -extension RENDER std_ext_t -extension XFree86-DGA accelgraphics_ext_t +extension DAMAGE accelgraphics_xext_t +extension GLX accelgraphics_xext_t +extension NV-CONTROL accelgraphics_xext_t +extension NV-GLX accelgraphics_xext_t +extension NVIDIA-GLX accelgraphics_xext_t +extension RENDER std_xext_t +extension XFree86-DGA accelgraphics_xext_t # Debugging, testing, and recording extensions -extension RECORD debug_ext_t -extension X-Resource debug_ext_t -extension XTEST debug_ext_t +extension RECORD debug_xext_t +extension X-Resource debug_xext_t +extension XTEST debug_xext_t # Extensions just for window managers -extension TOG-CUP windowmgr_ext_t +extension TOG-CUP windowmgr_xext_t # Security-related extensions -extension SECURITY security_ext_t -extension SELinux security_ext_t -extension XAccessControlExtension security_ext_t -extension XC-APPGROUP security_ext_t +extension SECURITY security_xext_t +extension SELinux security_xext_t +extension XAccessControlExtension security_xext_t +extension XC-APPGROUP security_xext_t # Video extensions -extension XFree86-VidModeExtension video_ext_t -extension XVideo video_ext_t -extension XVideo-MotionCompensation video_ext_t +extension XFree86-VidModeExtension video_xext_t +extension XVideo video_xext_t +extension XVideo-MotionCompensation video_xext_t # Default fallback type -extension default unknown_ext_t +extension default unknown_xext_t From 2534f5a9027c196f677923aaa38fa9ed9917f73d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 16 Feb 2007 15:33:48 -0500 Subject: [PATCH 028/552] Remove nasty function pointer type from DevUnion, return to documented type. --- include/miscstruct.h | 13 +------------ mfb/mfbbitblt.c | 28 +++++++++++++++------------- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/include/miscstruct.h b/include/miscstruct.h index c39f03ce8..f78458771 100644 --- a/include/miscstruct.h +++ b/include/miscstruct.h @@ -50,7 +50,6 @@ SOFTWARE. #include "misc.h" #include -#include "gc.h" typedef xPoint DDXPointRec; @@ -62,17 +61,7 @@ typedef union _DevUnion { pointer ptr; long val; unsigned long uval; - RegionPtr (*fptr)( - DrawablePtr /* pSrcDrawable */, - DrawablePtr /* pDstDrawable */, - GCPtr /* pGC */, - int /* srcx */, - int /* srcy */, - int /* width */, - int /* height */, - int /* dstx */, - int /* dsty */, - unsigned long /* bitPlane */); + pointer (*fptr)(void); } DevUnion; #endif /* MISCSTRUCT_H */ diff --git a/mfb/mfbbitblt.c b/mfb/mfbbitblt.c index 0f84df354..270fd96a7 100644 --- a/mfb/mfbbitblt.c +++ b/mfb/mfbbitblt.c @@ -400,20 +400,22 @@ int dstx, dsty; static unsigned long copyPlaneGeneration; static int copyPlaneScreenIndex = -1; +typedef RegionPtr (*CopyPlaneFuncPtr)( + DrawablePtr /* pSrcDrawable */, + DrawablePtr /* pDstDrawable */, + GCPtr /* pGC */, + int /* srcx */, + int /* srcy */, + int /* width */, + int /* height */, + int /* dstx */, + int /* dsty */, + unsigned long /* bitPlane */); + Bool mfbRegisterCopyPlaneProc (pScreen, proc) ScreenPtr pScreen; - RegionPtr (*proc)( - DrawablePtr /* pSrcDrawable */, - DrawablePtr /* pDstDrawable */, - GCPtr /* pGC */, - int /* srcx */, - int /* srcy */, - int /* width */, - int /* height */, - int /* dstx */, - int /* dsty */, - unsigned long /* bitPlane */); + CopyPlaneFuncPtr proc; { if (copyPlaneGeneration != serverGeneration) { @@ -422,7 +424,7 @@ mfbRegisterCopyPlaneProc (pScreen, proc) return FALSE; copyPlaneGeneration = serverGeneration; } - pScreen->devPrivates[copyPlaneScreenIndex].fptr = proc; + pScreen->devPrivates[copyPlaneScreenIndex].fptr = (CopyPlaneFuncPtr)proc; return TRUE; } @@ -468,7 +470,7 @@ unsigned long plane; if (pSrcDrawable->depth != 1) { if (copyPlaneScreenIndex >= 0 && - (copyPlane = + (copyPlane = (CopyPlaneFuncPtr) pSrcDrawable->pScreen->devPrivates[copyPlaneScreenIndex].fptr) ) { From 9a3eb0357e779d5d5f76858f23667956c4c5d721 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 16 Feb 2007 19:30:03 -0500 Subject: [PATCH 029/552] devPrivates rework: add RC_PRIVATES class, make ResourceRec visible in the API, and add extra fields and structure supporting private storage. --- dix/resource.c | 6 ------ include/resource.h | 26 ++++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/dix/resource.c b/dix/resource.c index 4468f4575..584ac94fb 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -169,12 +169,6 @@ static void RebuildTable( #define INITHASHSIZE 6 #define MAXHASHSIZE 11 -typedef struct _Resource { - struct _Resource *next; - XID id; - RESTYPE type; - pointer value; -} ResourceRec, *ResourcePtr; #define NullResource ((ResourcePtr)NULL) typedef struct _ClientResource { diff --git a/include/resource.h b/include/resource.h index 3231e8cd9..902305805 100644 --- a/include/resource.h +++ b/include/resource.h @@ -53,10 +53,27 @@ SOFTWARE. * STUFF FOR RESOURCES *****************************************************************/ -/* classes for Resource routines */ +/* Resource structures */ typedef unsigned long RESTYPE; +typedef struct _Private { + int index; + pointer value; + struct _Private *next; +} PrivateRec, *PrivatePtr; + +typedef struct _Resource { + struct _Resource *next; + struct _Resource *nexttype; + XID id; + RESTYPE type; + pointer value; + PrivatePtr privates; +} ResourceRec, *ResourcePtr; + +/* classes for Resource routines */ + #define RC_VANILLA ((RESTYPE)0) #define RC_CACHED ((RESTYPE)1<<31) #define RC_DRAWABLE ((RESTYPE)1<<30) @@ -66,7 +83,12 @@ typedef unsigned long RESTYPE; * Extensions can use this too! */ #define RC_NEVERRETAIN ((RESTYPE)1<<29) -#define RC_LASTPREDEF RC_NEVERRETAIN +/* Use class RC_PRIVATES for resources that support extra private data. + * Resources having this class must provide a field of type ResourcePtr + * at the top of the resource structure, which must be initalized to NULL. + */ +#define RC_PRIVATES ((RESTYPE)1<<28) +#define RC_LASTPREDEF RC_PRIVATES #define RC_ANY (~(RESTYPE)0) /* types for Resource routines */ From 779faccfb78648a9f7e70b77dcfa9f6e19559772 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 23 Feb 2007 13:19:53 -0500 Subject: [PATCH 030/552] devPrivates rework: add dix header file containing new interface. --- include/Makefile.am | 1 + include/privates.h | 77 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 include/privates.h diff --git a/include/Makefile.am b/include/Makefile.am index 4289b818d..4d8910b66 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -31,6 +31,7 @@ sdk_HEADERS = \ os.h \ pixmap.h \ pixmapstr.h \ + privates.h \ property.h \ propertyst.h \ region.h \ diff --git a/include/privates.h b/include/privates.h new file mode 100644 index 000000000..8d7427074 --- /dev/null +++ b/include/privates.h @@ -0,0 +1,77 @@ +/*********************************************************** + +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 NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR 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. + +******************************************************************/ + +#ifndef PRIVATES_H +#define PRIVATES_H 1 + +#include "dix.h" +#include "resource.h" + +/***************************************************************** + * STUFF FOR PRIVATES + *****************************************************************/ + +/* + * Request private space for your driver/module in all resources of a type. + * A non-null pScreen argument restricts to resources on a given screen. + */ +extern int +dixRequestPrivate(RESTYPE type, unsigned size, pointer pScreen); + +/* + * Request private space in just one individual resource object. + */ +extern int +dixRequestSinglePrivate(RESTYPE type, unsigned size, pointer instance); + +/* + * Look up a private pointer. + */ +extern pointer +dixLookupPrivate(RESTYPE type, int index, pointer instance); + +/* + * Register callbacks to be called on private allocation/freeing. + * The calldata argument to the callbacks is a PrivateCallbackPtr. + */ +typedef struct _PrivateCallback { + pointer value; /* pointer to private */ + int index; /* registration index */ + ResourcePtr resource; /* resource record (do not modify!) */ +} PrivateCallbackRec, *PrivateCallbackPtr; + +extern int +dixRegisterPrivateInitFunc(RESTYPE type, int index, + CallbackProcPtr callback, pointer userdata); + +extern int +dixRegisterPrivateDeleteFunc(RESTYPE type, int index, + CallbackProcPtr callback, pointer userdata); + +/* + * Internal functions + */ +extern void +dixResetPrivates(void); + +extern int +dixUpdatePrivates(void); + +extern ResourcePtr +dixAllocateResourceRec(RESTYPE type, pointer value, pointer parent); + +extern void +dixCallPrivateInitFuncs(ResourcePtr res); + +extern void +dixFreeResourceRec(ResourcePtr res); + +#endif /* PRIVATES_H */ From 16f2b8892d9ebcef6410a675d10549043223f617 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 23 Feb 2007 13:20:43 -0500 Subject: [PATCH 031/552] devPrivates rework: add new interface implementation. --- dix/privates.c | 317 +++++++++++++++++++++++++++++++++++++ hw/xfree86/loader/dixsym.c | 6 + 2 files changed, 323 insertions(+) diff --git a/dix/privates.c b/dix/privates.c index b20a1dbf0..feab86714 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -36,6 +36,7 @@ from The Open Group. #include "os.h" #include "windowstr.h" #include "resource.h" +#include "privates.h" #include "dixstruct.h" #include "gcstruct.h" #include "colormapst.h" @@ -44,6 +45,322 @@ from The Open Group. #include "inputstr.h" #include "extnsionst.h" +typedef struct _PrivateDescItem { + int index; + RESTYPE type; + pointer parent; + unsigned size; + CallbackListPtr initfuncs; + CallbackListPtr deletefuncs; +} PrivateDescItemRec, *PrivateDescItemPtr; + +/* keeps track of whether resource objects have been created */ +static char *instances = NULL; +static RESTYPE instancesSize = 0; +static char anyInstances = 0; + +/* list of all allocated privates */ +static PrivateDescItemPtr items = NULL; +static unsigned itemsSize = 0; +static unsigned nextPrivateIndex = 0; + +/* number of extra slots to add when resizing the tables */ +#define PRIV_TAB_INCREMENT 48 +/* set in index value for privates registered after resources were created */ +#define PRIV_DYN_MASK (1<<30) +/* descriptor item lookup convenience macro */ +#define GET_DESCRIPTOR(index) (items + ((index) & (PRIV_DYN_MASK - 1))) +/* type mask convenience macro */ +#define TYPE_BITS(type) ((type) & TypeMask) + +static _X_INLINE ResourcePtr +findResourceBucket(RESTYPE type, pointer instance) { + ResourcePtr res = *((ResourcePtr *)instance); + + while (res->type != type) + res = res->nexttype; + return res; +} + +/* + * Request functions; the latter calls the former internally. + */ +_X_EXPORT int +dixRequestPrivate(RESTYPE type, unsigned size, pointer parent) +{ + int index = nextPrivateIndex; + + /* check if privates descriptor table needs to be resized */ + if (nextPrivateIndex >= itemsSize) { + unsigned bytes; + unsigned size = itemsSize; + + while (nextPrivateIndex >= size) + size += PRIV_TAB_INCREMENT; + + bytes = size * sizeof(PrivateDescItemRec); + items = (PrivateDescItemPtr)xrealloc(items, bytes); + if (!items) { + itemsSize = nextPrivateIndex = 0; + return -1; + } + memset(items + itemsSize, 0, + (size - itemsSize) * sizeof(PrivateDescItemRec)); + } + + /* figure out if resource instances already exist */ + if ((type != RC_ANY && instances[TYPE_BITS(type)]) || + (type == RC_ANY && anyInstances)) + index |= PRIV_DYN_MASK; + + /* add privates descriptor */ + items[nextPrivateIndex].index = index; + items[nextPrivateIndex].type = type; + items[nextPrivateIndex].parent = parent; + items[nextPrivateIndex].size = size; + nextPrivateIndex++; + return index; +} + +_X_EXPORT int +dixRequestSinglePrivate(RESTYPE type, unsigned size, pointer instance) +{ + PrivatePtr ptr; + ResourcePtr res = findResourceBucket(type, instance); + int index = dixRequestPrivate(type, size, instance); + if (index < 0) + return index; + + ptr = (PrivatePtr)xalloc(sizeof(PrivateRec) + size); + if (!ptr) + return -1; + ptr->index = index; + ptr->value = ptr + 1; + ptr->next = res->privates; + res->privates = ptr; + return index; +} + +/* + * Lookup function (some of this could be static inlined) + */ +_X_EXPORT pointer +dixLookupPrivate(RESTYPE type, int index, pointer instance) +{ + ResourcePtr res = findResourceBucket(type, instance); + PrivatePtr ptr = res->privates; + PrivateDescItemPtr item; + PrivateCallbackRec calldata; + + /* see if private has already been allocated (likely) */ + while (ptr) { + if (ptr->index == index) + return ptr->value; + ptr = ptr->next; + } + + /* past this point, need to create private on the fly */ + /* create the new private */ + item = GET_DESCRIPTOR(index); + ptr = (PrivatePtr)xalloc(sizeof(PrivateRec) + item->size); + if (!ptr) + return NULL; + memset(ptr, 0, sizeof(PrivateRec) + item->size); + ptr->index = index; + ptr->value = ptr + 1; + ptr->next = res->privates; + res->privates = ptr; + + /* call any init funcs and return */ + calldata.value = ptr->value; + calldata.index = index; + calldata.resource = res; + CallCallbacks(&item->initfuncs, &calldata); + return ptr->value; +} + +/* + * Callback registration + */ +_X_EXPORT int +dixRegisterPrivateInitFunc(RESTYPE type, int index, + CallbackProcPtr callback, pointer data) +{ + return AddCallback(&GET_DESCRIPTOR(index)->initfuncs, callback, data); +} + +_X_EXPORT int +dixRegisterPrivateDeleteFunc(RESTYPE type, int index, + CallbackProcPtr callback, pointer data) +{ + return AddCallback(&GET_DESCRIPTOR(index)->deletefuncs, callback, data); +} + +/* + * Internal function called from the main loop to reset the subsystem. + */ +void +dixResetPrivates(void) +{ + if (items) + xfree(items); + items = NULL; + itemsSize = 0; + nextPrivateIndex = 0; + + if (instances) + xfree(instances); + instances = NULL; + instancesSize = 0; + anyInstances = 0; +} + +/* + * Internal function called from CreateNewResourceType. + */ +int +dixUpdatePrivates(void) +{ + RESTYPE next = lastResourceType + 1; + + /* check if instances table needs to be resized */ + if (next >= instancesSize) { + RESTYPE size = instancesSize; + + while (next >= size) + size += PRIV_TAB_INCREMENT; + + instances = (char *)xrealloc(instances, size); + if (!instances) { + instancesSize = 0; + return FALSE; + } + memset(instances + instancesSize, 0, size - instancesSize); + instancesSize = size; + } + return TRUE; +} + +/* + * Internal function called from dixAddResource. + * Allocates a ResourceRec along with any private space all in one chunk. + */ +ResourcePtr +dixAllocateResourceRec(RESTYPE type, pointer instance, pointer parent) +{ + unsigned i, count = 0, size = sizeof(ResourceRec); + ResourcePtr res; + PrivatePtr ptr; + char *value; + + /* first pass figures out total size */ + for (i=0; iprivates = (count > 0) ? ptr : NULL; + + /* second pass sets up privates records */ + count = 0; + for (i=0; i 0) + ptr[count-1].next = NULL; + + /* hook up back-pointer to resource record(s) */ + if (type & RC_PRIVATES) { + res->nexttype = *((ResourcePtr *)instance); + *((ResourcePtr *)instance) = res; + } + + instances[TYPE_BITS(type)] = anyInstances = 1; + return res; +} + +/* + * Internal function called from dixAddResource. + * Calls the init functions on a newly allocated resource. + */ +void +dixCallPrivateInitFuncs(ResourcePtr res) +{ + PrivatePtr ptr = res->privates; + PrivateCallbackRec calldata; + + calldata.resource = res; + while (ptr) { + calldata.value = ptr->value; + calldata.index = ptr->index; + CallCallbacks(&GET_DESCRIPTOR(ptr->index)->initfuncs, &calldata); + ptr = ptr->next; + } +} + +/* + * Internal function called from the various delete resource functions. + * Calls delete callbacks before freeing the ResourceRec and other bits. + */ +void +dixFreeResourceRec(ResourcePtr res) +{ + ResourcePtr *tmp; + PrivatePtr ptr, next, base; + PrivateCallbackRec calldata; + + /* first pass calls the delete callbacks */ + ptr = res->privates; + calldata.resource = res; + while (ptr) { + calldata.value = ptr->value; + calldata.index = ptr->index; + CallCallbacks(&GET_DESCRIPTOR(ptr->index)->deletefuncs, &calldata); + ptr = ptr->next; + } + + /* second pass frees any off-struct private records */ + ptr = res->privates; + base = (PrivatePtr)(res + 1); + while (ptr && ptr != base) { + next = ptr->next; + xfree(ptr); + ptr = next; + } + + /* remove the record from the nexttype linked list and free it*/ + if (res->type & RC_PRIVATES) { + tmp = (ResourcePtr *)res->value; + while (*tmp != res) + tmp = &(*tmp)->nexttype; + *tmp = (*tmp)->nexttype; + } + xfree(res); +} + +/* + * Following is the old devPrivates support. These functions and variables + * are deprecated, and should no longer be used. + */ + /* * See the Wrappers and devPrivates section in "Definition of the * Porting Layer for the X v11 Sample Server" (doc/Server/ddx.tbl.ms) diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 32e0e4f68..9136351a2 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -63,6 +63,7 @@ #include "globals.h" #include "os.h" #include "osdep.h" +#include "privates.h" #include "resource.h" #include "servermd.h" #include "scrnintstr.h" @@ -259,6 +260,11 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(GetScratchPixmapHeader) SYMFUNC(FreeScratchPixmapHeader) /* privates.c */ + SYMFUNC(dixRequestPrivate) + SYMFUNC(dixRequestSinglePrivate) + SYMFUNC(dixLookupPrivate) + SYMFUNC(dixRegisterPrivateInitFunc) + SYMFUNC(dixRegisterPrivateDeleteFunc) SYMFUNC(AllocateExtensionPrivate) SYMFUNC(AllocateExtensionPrivateIndex) SYMFUNC(AllocateClientPrivate) From 81372f9096b952f4be545654b0b44ac37ef4f2c2 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 23 Feb 2007 13:23:12 -0500 Subject: [PATCH 032/552] devPrivates rework: hook up new interface in resource system; add new resource-adding function that takes an additional ScreenPtr argument. --- dix/main.c | 2 ++ dix/resource.c | 22 ++++++++++++++++------ hw/xfree86/loader/dixsym.c | 1 + include/resource.h | 6 ++++++ 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/dix/main.c b/dix/main.c index 3a77533a5..b5954af2b 100644 --- a/dix/main.c +++ b/dix/main.c @@ -89,6 +89,7 @@ Equipment Corporation. #include "os.h" #include "windowstr.h" #include "resource.h" +#include "privates.h" #include "dixstruct.h" #include "gcstruct.h" #include "extension.h" @@ -356,6 +357,7 @@ main(int argc, char *argv[], char *envp[]) InitAtoms(); InitEvents(); InitGlyphCaching(); + dixResetPrivates(); ResetExtensionPrivates(); ResetClientPrivates(); ResetScreenPrivates(); diff --git a/dix/resource.c b/dix/resource.c index 584ac94fb..bddc18cc3 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -135,6 +135,7 @@ Equipment Corporation. #include "misc.h" #include "os.h" #include "resource.h" +#include "privates.h" #include "dixstruct.h" #include "opaque.h" #include "windowstr.h" @@ -206,6 +207,8 @@ CreateNewResourceType(DeleteType deleteFunc) if (next & lastResourceClass) return 0; + if (!dixUpdatePrivates()) + return 0; funcs = (DeleteType *)xrealloc(DeleteFuncs, (next + 1) * sizeof(DeleteType)); if (!funcs) @@ -451,7 +454,7 @@ FakeClientID(register int client) } _X_EXPORT Bool -AddResource(XID id, RESTYPE type, pointer value) +dixAddResource(XID id, RESTYPE type, pointer value, pointer parent) { int client; register ClientResourceRec *rrec; @@ -472,7 +475,7 @@ AddResource(XID id, RESTYPE type, pointer value) (rrec->hashsize < MAXHASHSIZE)) RebuildTable(client); head = &rrec->resources[Hash(client, id)]; - res = (ResourcePtr)xalloc(sizeof(ResourceRec)); + res = dixAllocateResourceRec(type, value, parent); if (!res) { (*DeleteFuncs[type & TypeMask])(value, id); @@ -486,9 +489,16 @@ AddResource(XID id, RESTYPE type, pointer value) rrec->elements++; if (!(id & SERVER_BIT) && (id >= rrec->expectID)) rrec->expectID = id + 1; + dixCallPrivateInitFuncs(res); return TRUE; } +_X_EXPORT Bool +AddResource(XID id, RESTYPE type, pointer value) +{ + return dixAddResource(id, type, value, NULL); +} + static void RebuildTable(int client) { @@ -570,7 +580,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) FlushClientCaches(res->id); if (rtype != skipDeleteFuncType) (*DeleteFuncs[rtype & TypeMask])(res->value, res->id); - xfree(res); + dixFreeResourceRec(res); if (*eltptr != elements) prev = head; /* prev may no longer be valid */ gotOne = TRUE; @@ -614,7 +624,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) FlushClientCaches(res->id); if (!skipFree) (*DeleteFuncs[type & TypeMask])(res->value, res->id); - xfree(res); + dixFreeResourceRec(res); break; } else @@ -779,7 +789,7 @@ FreeClientNeverRetainResources(ClientPtr client) if (rtype & RC_CACHED) FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); - xfree(this); + dixFreeResourceRec(this); } else prev = &this->next; @@ -829,7 +839,7 @@ FreeClientResources(ClientPtr client) if (rtype & RC_CACHED) FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); - xfree(this); + dixFreeResourceRec(this); } } xfree(clientTable[client->index].resources); diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 9136351a2..773576750 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -283,6 +283,7 @@ _X_HIDDEN void *dixLookupTab[] = { #endif /* resource.c */ SYMFUNC(AddResource) + SYMFUNC(dixAddResource) SYMFUNC(ChangeResourceValue) SYMFUNC(CreateNewResourceClass) SYMFUNC(CreateNewResourceType) diff --git a/include/resource.h b/include/resource.h index 902305805..617afbf41 100644 --- a/include/resource.h +++ b/include/resource.h @@ -183,6 +183,12 @@ extern Bool AddResource( RESTYPE /*type*/, pointer /*value*/); +extern Bool dixAddResource( + XID /*id*/, + RESTYPE /*type*/, + pointer /*value*/, + pointer /*parent*/); + extern void FreeResource( XID /*id*/, RESTYPE /*skipDeleteFuncType*/); From 74f1de1de9633119c2cf26086875717181c8a6f7 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 1 Mar 2007 12:07:33 -0500 Subject: [PATCH 033/552] devPrivates rework: unhook resource system; will try a different approach. --- dix/resource.c | 22 ++++++---------------- hw/xfree86/loader/dixsym.c | 1 - include/resource.h | 6 ------ 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/dix/resource.c b/dix/resource.c index bddc18cc3..c568ed0b0 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -135,7 +135,6 @@ Equipment Corporation. #include "misc.h" #include "os.h" #include "resource.h" -#include "privates.h" #include "dixstruct.h" #include "opaque.h" #include "windowstr.h" @@ -207,8 +206,6 @@ CreateNewResourceType(DeleteType deleteFunc) if (next & lastResourceClass) return 0; - if (!dixUpdatePrivates()) - return 0; funcs = (DeleteType *)xrealloc(DeleteFuncs, (next + 1) * sizeof(DeleteType)); if (!funcs) @@ -454,7 +451,7 @@ FakeClientID(register int client) } _X_EXPORT Bool -dixAddResource(XID id, RESTYPE type, pointer value, pointer parent) +AddResource(XID id, RESTYPE type, pointer value) { int client; register ClientResourceRec *rrec; @@ -475,7 +472,7 @@ dixAddResource(XID id, RESTYPE type, pointer value, pointer parent) (rrec->hashsize < MAXHASHSIZE)) RebuildTable(client); head = &rrec->resources[Hash(client, id)]; - res = dixAllocateResourceRec(type, value, parent); + res = (ResourcePtr)xalloc(sizeof(ResourceRec)); if (!res) { (*DeleteFuncs[type & TypeMask])(value, id); @@ -489,16 +486,9 @@ dixAddResource(XID id, RESTYPE type, pointer value, pointer parent) rrec->elements++; if (!(id & SERVER_BIT) && (id >= rrec->expectID)) rrec->expectID = id + 1; - dixCallPrivateInitFuncs(res); return TRUE; } -_X_EXPORT Bool -AddResource(XID id, RESTYPE type, pointer value) -{ - return dixAddResource(id, type, value, NULL); -} - static void RebuildTable(int client) { @@ -580,7 +570,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) FlushClientCaches(res->id); if (rtype != skipDeleteFuncType) (*DeleteFuncs[rtype & TypeMask])(res->value, res->id); - dixFreeResourceRec(res); + xfree(res); if (*eltptr != elements) prev = head; /* prev may no longer be valid */ gotOne = TRUE; @@ -624,7 +614,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) FlushClientCaches(res->id); if (!skipFree) (*DeleteFuncs[type & TypeMask])(res->value, res->id); - dixFreeResourceRec(res); + xfree(res); break; } else @@ -789,7 +779,7 @@ FreeClientNeverRetainResources(ClientPtr client) if (rtype & RC_CACHED) FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); - dixFreeResourceRec(this); + xfree(this); } else prev = &this->next; @@ -839,7 +829,7 @@ FreeClientResources(ClientPtr client) if (rtype & RC_CACHED) FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); - dixFreeResourceRec(this); + xfree(this); } } xfree(clientTable[client->index].resources); diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 773576750..9136351a2 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -283,7 +283,6 @@ _X_HIDDEN void *dixLookupTab[] = { #endif /* resource.c */ SYMFUNC(AddResource) - SYMFUNC(dixAddResource) SYMFUNC(ChangeResourceValue) SYMFUNC(CreateNewResourceClass) SYMFUNC(CreateNewResourceType) diff --git a/include/resource.h b/include/resource.h index 617afbf41..902305805 100644 --- a/include/resource.h +++ b/include/resource.h @@ -183,12 +183,6 @@ extern Bool AddResource( RESTYPE /*type*/, pointer /*value*/); -extern Bool dixAddResource( - XID /*id*/, - RESTYPE /*type*/, - pointer /*value*/, - pointer /*parent*/); - extern void FreeResource( XID /*id*/, RESTYPE /*skipDeleteFuncType*/); From e684824709fa8ffe03dde3c8dfbc58c267515a4f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 1 Mar 2007 15:00:02 -0500 Subject: [PATCH 034/552] devPrivates rework: redo interface and implementation. --- dix/main.c | 3 +- dix/privates.c | 447 +++++++++++++++++-------------------- dix/resource.c | 6 + hw/xfree86/loader/dixsym.c | 7 +- include/privates.h | 134 ++++++++--- include/resource.h | 23 +- 6 files changed, 323 insertions(+), 297 deletions(-) diff --git a/dix/main.c b/dix/main.c index b5954af2b..ed5e358c4 100644 --- a/dix/main.c +++ b/dix/main.c @@ -357,7 +357,8 @@ main(int argc, char *argv[], char *envp[]) InitAtoms(); InitEvents(); InitGlyphCaching(); - dixResetPrivates(); + if (!dixResetPrivates()) + FatalError("couldn't init private data storage"); ResetExtensionPrivates(); ResetClientPrivates(); ResetScreenPrivates(); diff --git a/dix/privates.c b/dix/privates.c index feab86714..c4ecf6ada 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -31,6 +31,7 @@ from The Open Group. #endif #include +#include #include "scrnintstr.h" #include "misc.h" #include "os.h" @@ -45,315 +46,265 @@ from The Open Group. #include "inputstr.h" #include "extnsionst.h" -typedef struct _PrivateDescItem { - int index; +typedef struct _PrivateDesc { + devprivate_key_t *key; RESTYPE type; pointer parent; unsigned size; CallbackListPtr initfuncs; CallbackListPtr deletefuncs; -} PrivateDescItemRec, *PrivateDescItemPtr; - -/* keeps track of whether resource objects have been created */ -static char *instances = NULL; -static RESTYPE instancesSize = 0; -static char anyInstances = 0; + struct _PrivateDesc *next; +} PrivateDescRec; /* list of all allocated privates */ -static PrivateDescItemPtr items = NULL; -static unsigned itemsSize = 0; -static unsigned nextPrivateIndex = 0; +static PrivateDescRec *items = NULL; -/* number of extra slots to add when resizing the tables */ -#define PRIV_TAB_INCREMENT 48 -/* set in index value for privates registered after resources were created */ -#define PRIV_DYN_MASK (1<<30) -/* descriptor item lookup convenience macro */ -#define GET_DESCRIPTOR(index) (items + ((index) & (PRIV_DYN_MASK - 1))) -/* type mask convenience macro */ -#define TYPE_BITS(type) ((type) & TypeMask) - -static _X_INLINE ResourcePtr -findResourceBucket(RESTYPE type, pointer instance) { - ResourcePtr res = *((ResourcePtr *)instance); - - while (res->type != type) - res = res->nexttype; - return res; +static _X_INLINE PrivateDescRec * +findItem(devprivate_key_t *const key) +{ + PrivateDescRec *item = items; + while (item) { + if (item->key == key) + return item; + item = item->next; + } + return NULL; } /* - * Request functions; the latter calls the former internally. + * Request pre-allocated space in resources of a given type. */ _X_EXPORT int -dixRequestPrivate(RESTYPE type, unsigned size, pointer parent) +dixRequestPrivate(RESTYPE type, devprivate_key_t *const key, + unsigned size, pointer parent) { - int index = nextPrivateIndex; + PrivateDescRec *item = findItem(key); + if (item) { + assert(item->type == type); + if (size > item->size) + item->size = size; + } else { + item = (PrivateDescRec *)xalloc(sizeof(PrivateDescRec)); + if (!item) + return FALSE; + memset(item, 0, sizeof(PrivateDescRec)); - /* check if privates descriptor table needs to be resized */ - if (nextPrivateIndex >= itemsSize) { - unsigned bytes; - unsigned size = itemsSize; - - while (nextPrivateIndex >= size) - size += PRIV_TAB_INCREMENT; - - bytes = size * sizeof(PrivateDescItemRec); - items = (PrivateDescItemPtr)xrealloc(items, bytes); - if (!items) { - itemsSize = nextPrivateIndex = 0; - return -1; - } - memset(items + itemsSize, 0, - (size - itemsSize) * sizeof(PrivateDescItemRec)); + /* add privates descriptor */ + item->key = key; + item->type = type; + item->parent = parent; + item->size = size; + item->next = items; + items = item; } - - /* figure out if resource instances already exist */ - if ((type != RC_ANY && instances[TYPE_BITS(type)]) || - (type == RC_ANY && anyInstances)) - index |= PRIV_DYN_MASK; - - /* add privates descriptor */ - items[nextPrivateIndex].index = index; - items[nextPrivateIndex].type = type; - items[nextPrivateIndex].parent = parent; - items[nextPrivateIndex].size = size; - nextPrivateIndex++; - return index; -} - -_X_EXPORT int -dixRequestSinglePrivate(RESTYPE type, unsigned size, pointer instance) -{ - PrivatePtr ptr; - ResourcePtr res = findResourceBucket(type, instance); - int index = dixRequestPrivate(type, size, instance); - if (index < 0) - return index; - - ptr = (PrivatePtr)xalloc(sizeof(PrivateRec) + size); - if (!ptr) - return -1; - ptr->index = index; - ptr->value = ptr + 1; - ptr->next = res->privates; - res->privates = ptr; - return index; + return TRUE; } /* - * Lookup function (some of this could be static inlined) + * Allocate a private and attach it to an existing object. */ -_X_EXPORT pointer -dixLookupPrivate(RESTYPE type, int index, pointer instance) +_X_EXPORT pointer * +dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key) { - ResourcePtr res = findResourceBucket(type, instance); - PrivatePtr ptr = res->privates; - PrivateDescItemPtr item; - PrivateCallbackRec calldata; + PrivateDescRec *item = findItem(key); + PrivateRec *ptr; + unsigned size = sizeof(PrivateRec); + + if (item) + size += item->size; - /* see if private has already been allocated (likely) */ - while (ptr) { - if (ptr->index == index) - return ptr->value; - ptr = ptr->next; - } - - /* past this point, need to create private on the fly */ - /* create the new private */ - item = GET_DESCRIPTOR(index); - ptr = (PrivatePtr)xalloc(sizeof(PrivateRec) + item->size); + ptr = (PrivateRec *)xalloc(size); if (!ptr) return NULL; - memset(ptr, 0, sizeof(PrivateRec) + item->size); - ptr->index = index; - ptr->value = ptr + 1; - ptr->next = res->privates; - res->privates = ptr; + memset(ptr, 0, size); + ptr->key = key; + ptr->value = (size > sizeof(PrivateRec)) ? (ptr + 1) : NULL; + ptr->next = *privates; + *privates = ptr; /* call any init funcs and return */ - calldata.value = ptr->value; - calldata.index = index; - calldata.resource = res; - CallCallbacks(&item->initfuncs, &calldata); - return ptr->value; + if (item) { + PrivateCallbackRec calldata = { key, ptr->value }; + CallCallbacks(&item->initfuncs, &calldata); + } + return &ptr->value; +} + +/* + * Allocates pre-requested privates in a single chunk. + */ +_X_EXPORT PrivateRec * +dixAllocatePrivates(RESTYPE type, pointer parent) +{ + unsigned count = 0, size = 0; + PrivateCallbackRec calldata; + PrivateDescRec *item; + PrivateRec *ptr; + char *value; + + /* first pass figures out total size */ + for (item = items; item; item = item->next) + if ((item->type == type || item->type == RC_ANY) && + (item->parent == NULL || item->parent == parent)) { + + size += sizeof(PrivateRec) + item->size; + count++; + } + + /* allocate one chunk of memory for everything */ + ptr = (PrivateRec *)xalloc(size); + if (!ptr) + return NULL; + memset(ptr, 0, size); + value = (char *)(ptr + count); + + /* second pass sets up records and calls init funcs */ + count = 0; + for (item = items; item; item = item->next) + if ((item->type == type || item->type == RC_ANY) && + (item->parent == NULL || item->parent == parent)) { + + ptr[count].key = calldata.key = item->key; + ptr[count].dontfree = (count > 0); + ptr[count].value = calldata.value = (items->size ? value : NULL); + ptr[count].next = ptr + (count + 1); + + CallCallbacks(&item->initfuncs, &calldata); + + count++; + value += item->size; + } + + if (count > 0) + ptr[count-1].next = NULL; + + return ptr; +} + +/* + * Called to free privates at object deletion time. + */ +_X_EXPORT void +dixFreePrivates(PrivateRec *privates) +{ + PrivateRec *ptr, *next; + PrivateDescRec *item; + PrivateCallbackRec calldata; + + /* first pass calls the delete callbacks */ + for (ptr = privates; ptr; ptr = ptr->next) { + item = findItem(ptr->key); + if (item) { + calldata.key = ptr->key; + calldata.value = ptr->value; + CallCallbacks(&item->deletefuncs, &calldata); + } + } + + /* second pass frees the memory */ + ptr = privates; + while (ptr) { + if (ptr->dontfree) + ptr = ptr->next; + else { + next = ptr->next; + while (next && next->dontfree) + next = next->next; + + xfree(ptr); + ptr = next; + } + } + + /* no more use of privates permitted */ + *privates = NULL; } /* * Callback registration */ _X_EXPORT int -dixRegisterPrivateInitFunc(RESTYPE type, int index, +dixRegisterPrivateInitFunc(devprivate_key_t *const key, CallbackProcPtr callback, pointer data) { - return AddCallback(&GET_DESCRIPTOR(index)->initfuncs, callback, data); + PrivateDescRec *item = findItem(key); + if (!item) + return FALSE; + return AddCallback(&item->initfuncs, callback, data); } _X_EXPORT int -dixRegisterPrivateDeleteFunc(RESTYPE type, int index, +dixRegisterPrivateDeleteFunc(devprivate_key_t *const key, CallbackProcPtr callback, pointer data) { - return AddCallback(&GET_DESCRIPTOR(index)->deletefuncs, callback, data); + PrivateDescRec *item = findItem(key); + if (!item) + return FALSE; + return AddCallback(&item->deletefuncs, callback, data); } -/* - * Internal function called from the main loop to reset the subsystem. - */ -void -dixResetPrivates(void) -{ - if (items) - xfree(items); - items = NULL; - itemsSize = 0; - nextPrivateIndex = 0; - - if (instances) - xfree(instances); - instances = NULL; - instancesSize = 0; - anyInstances = 0; -} +/* Table of devPrivates offsets */ +static unsigned *offsets = NULL; +static unsigned offsetsSize = 0; /* - * Internal function called from CreateNewResourceType. + * Specify where the devPrivates field is located in a structure type */ -int -dixUpdatePrivates(void) +_X_EXPORT int +dixRegisterPrivateOffset(RESTYPE type, unsigned offset) { - RESTYPE next = lastResourceType + 1; + type = type & TypeMask; - /* check if instances table needs to be resized */ - if (next >= instancesSize) { - RESTYPE size = instancesSize; - - while (next >= size) - size += PRIV_TAB_INCREMENT; - - instances = (char *)xrealloc(instances, size); - if (!instances) { - instancesSize = 0; + /* resize offsets table if necessary */ + while (type >= offsetsSize) { + offsets = (unsigned *)xrealloc(offsets, + offsetsSize * 2 * sizeof(unsigned)); + if (!offsets) { + offsetsSize = 0; return FALSE; } - memset(instances + instancesSize, 0, size - instancesSize); - instancesSize = size; + offsetsSize *= 2; } + + offsets[type] = offset; return TRUE; } -/* - * Internal function called from dixAddResource. - * Allocates a ResourceRec along with any private space all in one chunk. - */ -ResourcePtr -dixAllocateResourceRec(RESTYPE type, pointer instance, pointer parent) +_X_EXPORT unsigned +dixLookupPrivateOffset(RESTYPE type) { - unsigned i, count = 0, size = sizeof(ResourceRec); - ResourcePtr res; - PrivatePtr ptr; - char *value; - - /* first pass figures out total size */ - for (i=0; iprivates = (count > 0) ? ptr : NULL; - - /* second pass sets up privates records */ - count = 0; - for (i=0; i 0) - ptr[count-1].next = NULL; - - /* hook up back-pointer to resource record(s) */ - if (type & RC_PRIVATES) { - res->nexttype = *((ResourcePtr *)instance); - *((ResourcePtr *)instance) = res; - } - - instances[TYPE_BITS(type)] = anyInstances = 1; - return res; -} - -/* - * Internal function called from dixAddResource. - * Calls the init functions on a newly allocated resource. - */ -void -dixCallPrivateInitFuncs(ResourcePtr res) -{ - PrivatePtr ptr = res->privates; - PrivateCallbackRec calldata; - - calldata.resource = res; - while (ptr) { - calldata.value = ptr->value; - calldata.index = ptr->index; - CallCallbacks(&GET_DESCRIPTOR(ptr->index)->initfuncs, &calldata); - ptr = ptr->next; - } + assert(type & RC_PRIVATES); + type = type & TypeMask; + assert(type < offsetsSize); + return offsets[type]; } /* - * Internal function called from the various delete resource functions. - * Calls delete callbacks before freeing the ResourceRec and other bits. + * Called from the main loop to reset the subsystem. */ -void -dixFreeResourceRec(ResourcePtr res) +int +dixResetPrivates(void) { - ResourcePtr *tmp; - PrivatePtr ptr, next, base; - PrivateCallbackRec calldata; - - /* first pass calls the delete callbacks */ - ptr = res->privates; - calldata.resource = res; - while (ptr) { - calldata.value = ptr->value; - calldata.index = ptr->index; - CallCallbacks(&GET_DESCRIPTOR(ptr->index)->deletefuncs, &calldata); - ptr = ptr->next; + PrivateDescRec *next; + while (items) { + next = items->next; + xfree(items); + items = next; } - /* second pass frees any off-struct private records */ - ptr = res->privates; - base = (PrivatePtr)(res + 1); - while (ptr && ptr != base) { - next = ptr->next; - xfree(ptr); - ptr = next; - } + if (offsets) + xfree(offsets); - /* remove the record from the nexttype linked list and free it*/ - if (res->type & RC_PRIVATES) { - tmp = (ResourcePtr *)res->value; - while (*tmp != res) - tmp = &(*tmp)->nexttype; - *tmp = (*tmp)->nexttype; - } - xfree(res); + offsetsSize = 16; + offsets = (unsigned *)xalloc(offsetsSize * sizeof(unsigned)); + if (!offsets) + return FALSE; + + /* register basic resource offsets */ + if (!dixRegisterPrivateOffset(RT_WINDOW, offsetof(WindowRec,devPrivates))) + return FALSE; + + return TRUE; } /* diff --git a/dix/resource.c b/dix/resource.c index c568ed0b0..2cad7c01b 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -169,6 +169,12 @@ static void RebuildTable( #define INITHASHSIZE 6 #define MAXHASHSIZE 11 +typedef struct _Resource { + struct _Resource *next; + XID id; + RESTYPE type; + pointer value; +} ResourceRec, *ResourcePtr; #define NullResource ((ResourcePtr)NULL) typedef struct _ClientResource { diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 9136351a2..5479ed0df 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -261,10 +261,13 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(FreeScratchPixmapHeader) /* privates.c */ SYMFUNC(dixRequestPrivate) - SYMFUNC(dixRequestSinglePrivate) - SYMFUNC(dixLookupPrivate) SYMFUNC(dixRegisterPrivateInitFunc) SYMFUNC(dixRegisterPrivateDeleteFunc) + SYMFUNC(dixAllocatePrivate) + SYMFUNC(dixAllocatePrivates) + SYMFUNC(dixFreePrivates) + SYMFUNC(dixRegisterPrivateOffset) + SYMFUNC(dixLookupPrivateOffset) SYMFUNC(AllocateExtensionPrivate) SYMFUNC(AllocateExtensionPrivateIndex) SYMFUNC(AllocateClientPrivate) diff --git a/include/privates.h b/include/privates.h index 8d7427074..898fdd9c9 100644 --- a/include/privates.h +++ b/include/privates.h @@ -19,59 +19,141 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * STUFF FOR PRIVATES *****************************************************************/ -/* - * Request private space for your driver/module in all resources of a type. - * A non-null pScreen argument restricts to resources on a given screen. - */ -extern int -dixRequestPrivate(RESTYPE type, unsigned size, pointer pScreen); +typedef struct _PrivateKey { + int unused; +} devprivate_key_t; + +typedef struct _Private { + devprivate_key_t *key; + int dontfree; + pointer value; + struct _Private *next; +} PrivateRec; /* - * Request private space in just one individual resource object. + * Request pre-allocated private space for your driver/module. + * A non-null pScreen argument restricts to objects on a given screen. */ extern int -dixRequestSinglePrivate(RESTYPE type, unsigned size, pointer instance); +dixRequestPrivate(RESTYPE type, devprivate_key_t *const key, + unsigned size, pointer pScreen); + +/* + * Allocates a new private and attaches it to an existing object. + */ +extern pointer * +dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key); /* * Look up a private pointer. */ -extern pointer -dixLookupPrivate(RESTYPE type, int index, pointer instance); +static _X_INLINE pointer +dixLookupPrivate(PrivateRec **privates, devprivate_key_t *const key) +{ + PrivateRec *rec = *privates; + pointer *ptr; + + while (rec) { + if (rec->key == key) + return rec->value; + rec = rec->next; + } + + ptr = dixAllocatePrivate(privates, key); + return ptr ? *ptr : NULL; +} + +/* + * Look up the address of a private pointer. + */ +static _X_INLINE pointer * +dixLookupPrivateAddr(PrivateRec **privates, devprivate_key_t *const key) +{ + PrivateRec *rec = *privates; + + while (rec) { + if (rec->key == key) + return &rec->value; + rec = rec->next; + } + + return dixAllocatePrivate(privates, key); +} + +/* + * Set a private pointer. + */ +static _X_INLINE int +dixSetPrivate(PrivateRec **privates, devprivate_key_t *const key, pointer val) +{ + PrivateRec *rec; + + top: + rec = *privates; + while (rec) { + if (rec->key == key) { + rec->value = val; + return TRUE; + } + rec = rec->next; + } + + if (!dixAllocatePrivate(privates, key)) + return FALSE; + goto top; +} /* * Register callbacks to be called on private allocation/freeing. * The calldata argument to the callbacks is a PrivateCallbackPtr. */ typedef struct _PrivateCallback { + devprivate_key_t *key; /* private registration key */ pointer value; /* pointer to private */ - int index; /* registration index */ - ResourcePtr resource; /* resource record (do not modify!) */ -} PrivateCallbackRec, *PrivateCallbackPtr; +} PrivateCallbackRec; extern int -dixRegisterPrivateInitFunc(RESTYPE type, int index, +dixRegisterPrivateInitFunc(devprivate_key_t *const key, CallbackProcPtr callback, pointer userdata); extern int -dixRegisterPrivateDeleteFunc(RESTYPE type, int index, +dixRegisterPrivateDeleteFunc(devprivate_key_t *const key, CallbackProcPtr callback, pointer userdata); /* - * Internal functions + * Allocates all pre-requested private space in one chunk. + */ +extern PrivateRec * +dixAllocatePrivates(RESTYPE type, pointer parent); + +/* + * Frees any private space that is not part of an object. */ extern void +dixFreePrivates(PrivateRec *privates); + +/* + * Resets the subsystem, called from the main loop. + */ +extern int dixResetPrivates(void); +/* + * These next two functions are necessary because the position of + * the devPrivates field varies by structure and calling code might + * only know the resource type, not the structure definition. + */ + +/* + * Looks up the offset where the devPrivates field is located by type. + */ +extern unsigned +dixLookupPrivateOffset(RESTYPE type); + +/* + * Specifies the offset where the devPrivates field is located. + */ extern int -dixUpdatePrivates(void); - -extern ResourcePtr -dixAllocateResourceRec(RESTYPE type, pointer value, pointer parent); - -extern void -dixCallPrivateInitFuncs(ResourcePtr res); - -extern void -dixFreeResourceRec(ResourcePtr res); +dixRegisterPrivateOffset(RESTYPE type, unsigned offset); #endif /* PRIVATES_H */ diff --git a/include/resource.h b/include/resource.h index 902305805..40259ac27 100644 --- a/include/resource.h +++ b/include/resource.h @@ -53,27 +53,10 @@ SOFTWARE. * STUFF FOR RESOURCES *****************************************************************/ -/* Resource structures */ +/* classes for Resource routines */ typedef unsigned long RESTYPE; -typedef struct _Private { - int index; - pointer value; - struct _Private *next; -} PrivateRec, *PrivatePtr; - -typedef struct _Resource { - struct _Resource *next; - struct _Resource *nexttype; - XID id; - RESTYPE type; - pointer value; - PrivatePtr privates; -} ResourceRec, *ResourcePtr; - -/* classes for Resource routines */ - #define RC_VANILLA ((RESTYPE)0) #define RC_CACHED ((RESTYPE)1<<31) #define RC_DRAWABLE ((RESTYPE)1<<30) @@ -84,8 +67,8 @@ typedef struct _Resource { */ #define RC_NEVERRETAIN ((RESTYPE)1<<29) /* Use class RC_PRIVATES for resources that support extra private data. - * Resources having this class must provide a field of type ResourcePtr - * at the top of the resource structure, which must be initalized to NULL. + * Resources having this class must provide a field of type PrivateRec *. + * Refer to the X server documentation on devPrivates for the details. */ #define RC_PRIVATES ((RESTYPE)1<<28) #define RC_LASTPREDEF RC_PRIVATES From 74175e0af74c530cb712a6772d3c5d61d1be9748 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 5 Mar 2007 12:34:37 -0500 Subject: [PATCH 035/552] devPrivates rework: remove some debugging code from dixFreePrivates. --- dix/privates.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dix/privates.c b/dix/privates.c index c4ecf6ada..a12c8bfcb 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -215,9 +215,6 @@ dixFreePrivates(PrivateRec *privates) ptr = next; } } - - /* no more use of privates permitted */ - *privates = NULL; } /* From aaef4d6a4121d9341b670a0ce8fabc3b491049cf Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 7 Mar 2007 09:57:02 -0500 Subject: [PATCH 036/552] devPrivates rework: move reset functions into a single call. --- dix/main.c | 8 -------- dix/privates.c | 35 +++++++++++++++++++++++++++-------- include/dix.h | 2 -- include/extension.h | 2 -- include/input.h | 1 - include/screenint.h | 10 ---------- 6 files changed, 27 insertions(+), 31 deletions(-) diff --git a/dix/main.c b/dix/main.c index eb75cf548..c40dfddb2 100644 --- a/dix/main.c +++ b/dix/main.c @@ -359,15 +359,7 @@ main(int argc, char *argv[], char *envp[]) InitGlyphCaching(); if (!dixResetPrivates()) FatalError("couldn't init private data storage"); - ResetExtensionPrivates(); - ResetClientPrivates(); - ResetScreenPrivates(); - ResetWindowPrivates(); - ResetGCPrivates(); - ResetPixmapPrivates(); - ResetColormapPrivates(); ResetFontPrivateIndex(); - ResetDevicePrivateIndex(); InitCallbackManager(); InitVisualWrap(); InitOutput(&screenInfo, argc, argv); diff --git a/dix/privates.c b/dix/privates.c index 0722d9f29..48ba675bf 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -279,6 +279,15 @@ dixLookupPrivateOffset(RESTYPE type) /* * Called from the main loop to reset the subsystem. */ +static void ResetExtensionPrivates(void); +static void ResetClientPrivates(void); +static void ResetScreenPrivates(void); +static void ResetWindowPrivates(void); +static void ResetGCPrivates(void); +static void ResetPixmapPrivates(void); +static void ResetColormapPrivates(void); +static void ResetDevicePrivateIndex(void); + int dixResetPrivates(void) { @@ -297,6 +306,16 @@ dixResetPrivates(void) if (!offsets) return FALSE; + /* reset legacy devPrivates support */ + ResetExtensionPrivates(); + ResetClientPrivates(); + ResetScreenPrivates(); + ResetWindowPrivates(); + ResetGCPrivates(); + ResetPixmapPrivates(); + ResetColormapPrivates(); + ResetDevicePrivateIndex(); + /* register basic resource offsets */ if (!dixRegisterPrivateOffset(RT_WINDOW, offsetof(WindowRec,devPrivates))) return FALSE; @@ -324,7 +343,7 @@ int extensionPrivateLen; unsigned *extensionPrivateSizes; unsigned totalExtensionSize; -void +static void ResetExtensionPrivates() { extensionPrivateCount = 0; @@ -381,7 +400,7 @@ int clientPrivateLen; unsigned *clientPrivateSizes; unsigned totalClientSize; -void +static void ResetClientPrivates() { clientPrivateCount = 0; @@ -435,7 +454,7 @@ AllocateClientPrivate(int index2, unsigned amount) int screenPrivateCount; -void +static void ResetScreenPrivates() { screenPrivateCount = 0; @@ -477,7 +496,7 @@ AllocateScreenPrivateIndex() static int windowPrivateCount; -void +static void ResetWindowPrivates() { windowPrivateCount = 0; @@ -527,7 +546,7 @@ AllocateWindowPrivate(register ScreenPtr pScreen, int index2, unsigned amount) static int gcPrivateCount; -void +static void ResetGCPrivates() { gcPrivateCount = 0; @@ -576,7 +595,7 @@ AllocateGCPrivate(register ScreenPtr pScreen, int index2, unsigned amount) */ static int pixmapPrivateCount; -void +static void ResetPixmapPrivates() { pixmapPrivateCount = 0; @@ -627,7 +646,7 @@ AllocatePixmapPrivate(register ScreenPtr pScreen, int index2, unsigned amount) int colormapPrivateCount; -void +static void ResetColormapPrivates() { colormapPrivateCount = 0; @@ -712,7 +731,7 @@ AllocateDevicePrivate(DeviceIntPtr device, int index) } } -void +static void ResetDevicePrivateIndex(void) { devicePrivateIndex = 0; diff --git a/include/dix.h b/include/dix.h index 5c2c5b862..13f3c05ff 100644 --- a/include/dix.h +++ b/include/dix.h @@ -591,8 +591,6 @@ void ScreenRestructured (ScreenPtr pScreen); #endif -extern void ResetClientPrivates(void); - extern int AllocateClientPrivateIndex(void); extern Bool AllocateClientPrivate( diff --git a/include/extension.h b/include/extension.h index 74975c50b..27decc12c 100644 --- a/include/extension.h +++ b/include/extension.h @@ -58,8 +58,6 @@ extern Bool EnableDisableExtension(char *name, Bool enable); extern void EnableDisableExtensionError(char *name, Bool enable); -extern void ResetExtensionPrivates(void); - extern int AllocateExtensionPrivateIndex(void); extern Bool AllocateExtensionPrivate( diff --git a/include/input.h b/include/input.h index fc607d35b..2350a2456 100644 --- a/include/input.h +++ b/include/input.h @@ -160,7 +160,6 @@ typedef struct { extern int AllocateDevicePrivateIndex(void); extern Bool AllocateDevicePrivate(DeviceIntPtr device, int index); -extern void ResetDevicePrivateIndex(void); extern KeybdCtrl defaultKeyboardControl; extern PtrCtrl defaultPointerControl; diff --git a/include/screenint.h b/include/screenint.h index 1f1434a84..bf8da4432 100644 --- a/include/screenint.h +++ b/include/screenint.h @@ -55,12 +55,8 @@ typedef struct _Visual *VisualPtr; typedef struct _Depth *DepthPtr; typedef struct _Screen *ScreenPtr; -extern void ResetScreenPrivates(void); - extern int AllocateScreenPrivateIndex(void); -extern void ResetWindowPrivates(void); - extern int AllocateWindowPrivateIndex(void); extern Bool AllocateWindowPrivate( @@ -68,8 +64,6 @@ extern Bool AllocateWindowPrivate( int /* index */, unsigned /* amount */); -extern void ResetGCPrivates(void); - extern int AllocateGCPrivateIndex(void); extern Bool AllocateGCPrivate( @@ -86,8 +80,6 @@ extern int AddScreen( int /*argc*/, char** /*argv*/); -extern void ResetPixmapPrivates(void); - extern int AllocatePixmapPrivateIndex(void); extern Bool AllocatePixmapPrivate( @@ -95,8 +87,6 @@ extern Bool AllocatePixmapPrivate( int /* index */, unsigned /* amount */); -extern void ResetColormapPrivates(void); - typedef struct _ColormapRec *ColormapPtr; typedef int (*InitCmapPrivFunc)(ColormapPtr, int); From c45f6762080ef00b41d9f73441a9f0e605253008 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 7 Mar 2007 11:22:42 -0500 Subject: [PATCH 037/552] devPrivates rework: hook up new mechanism in backwards-compatibility mode on existing structures that support devPrivates. --- dix/devices.c | 11 ++++++-- dix/main.c | 32 ++++++++++++++++-------- dix/privates.c | 62 +++++++++++++++++++++++++++------------------- include/privates.h | 10 ++++++++ 4 files changed, 76 insertions(+), 39 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 9f4218414..2e04403c5 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -124,8 +124,15 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) #ifdef XKB dev->xkb_interest = NULL; #endif - dev->nPrivates = 0; - dev->devPrivates = NULL; + /* must pre-allocate one private for the new devPrivates support */ + dev->nPrivates = 1; + dev->devPrivates = (DevUnion *)xalloc(sizeof(DevUnion)); + if (!dev->devPrivates) { + xfree(dev); + return NULL; + } + dev->devPrivates[0].ptr = NULL; + dev->unwrapProc = NULL; dev->coreEvents = TRUE; dev->inited = FALSE; diff --git a/dix/main.c b/dix/main.c index c40dfddb2..852cbcb62 100644 --- a/dix/main.c +++ b/dix/main.c @@ -715,18 +715,28 @@ AddScreen( xfree(pScreen); return -1; } + + /* must pre-allocate one private for the new devPrivates support */ + pScreen->WindowPrivateLen = 1; + pScreen->WindowPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + pScreen->totalWindowSize = PadToLong(sizeof(WindowRec)) + sizeof(DevUnion); + pScreen->GCPrivateLen = 1; + pScreen->GCPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + pScreen->totalGCSize = PadToLong(sizeof(GC)) + sizeof(DevUnion); + pScreen->PixmapPrivateLen = 1; + pScreen->PixmapPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + pScreen->totalPixmapSize = BitmapBytePad(8 * (sizeof(PixmapRec) + + sizeof(DevUnion))); + if (pScreen->WindowPrivateSizes && pScreen->GCPrivateSizes && + pScreen->PixmapPrivateSizes) + *pScreen->WindowPrivateSizes = *pScreen->GCPrivateSizes = + *pScreen->PixmapPrivateSizes = 0; + else { + xfree(pScreen); + return -1; + } + pScreen->myNum = i; - pScreen->WindowPrivateLen = 0; - pScreen->WindowPrivateSizes = (unsigned *)NULL; - pScreen->totalWindowSize = - ((sizeof(WindowRec) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); - pScreen->GCPrivateLen = 0; - pScreen->GCPrivateSizes = (unsigned *)NULL; - pScreen->totalGCSize = - ((sizeof(GC) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); - pScreen->PixmapPrivateLen = 0; - pScreen->PixmapPrivateSizes = (unsigned *)NULL; - pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8); pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ pScreen->CreateScreenResources = 0; diff --git a/dix/privates.c b/dix/privates.c index 48ba675bf..57da0fa91 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -279,8 +279,8 @@ dixLookupPrivateOffset(RESTYPE type) /* * Called from the main loop to reset the subsystem. */ -static void ResetExtensionPrivates(void); -static void ResetClientPrivates(void); +static int ResetExtensionPrivates(void); +static int ResetClientPrivates(void); static void ResetScreenPrivates(void); static void ResetWindowPrivates(void); static void ResetGCPrivates(void); @@ -307,8 +307,8 @@ dixResetPrivates(void) return FALSE; /* reset legacy devPrivates support */ - ResetExtensionPrivates(); - ResetClientPrivates(); + if (!ResetExtensionPrivates() || !ResetClientPrivates()) + return FALSE; ResetScreenPrivates(); ResetWindowPrivates(); ResetGCPrivates(); @@ -317,10 +317,14 @@ dixResetPrivates(void) ResetDevicePrivateIndex(); /* register basic resource offsets */ - if (!dixRegisterPrivateOffset(RT_WINDOW, offsetof(WindowRec,devPrivates))) - return FALSE; - - return TRUE; + return dixRegisterPrivateOffset(RT_WINDOW, + offsetof(WindowRec, devPrivates)) && + dixRegisterPrivateOffset(RT_PIXMAP, + offsetof(PixmapRec, devPrivates)) && + dixRegisterPrivateOffset(RT_GC, + offsetof(GC, devPrivates)) && + dixRegisterPrivateOffset(RT_COLORMAP, + offsetof(ColormapRec, devPrivates)); } /* @@ -343,15 +347,18 @@ int extensionPrivateLen; unsigned *extensionPrivateSizes; unsigned totalExtensionSize; -static void +static int ResetExtensionPrivates() { - extensionPrivateCount = 0; - extensionPrivateLen = 0; + extensionPrivateCount = 1; + extensionPrivateLen = 1; xfree(extensionPrivateSizes); - extensionPrivateSizes = (unsigned *)NULL; - totalExtensionSize = - ((sizeof(ExtensionEntry) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); + extensionPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + if (!extensionPrivateSizes) + return FALSE; + *extensionPrivateSizes = 0; + totalExtensionSize = PadToLong(sizeof(ExtensionEntry)) + sizeof(DevUnion); + return TRUE; } _X_EXPORT int @@ -400,15 +407,18 @@ int clientPrivateLen; unsigned *clientPrivateSizes; unsigned totalClientSize; -static void +static int ResetClientPrivates() { - clientPrivateCount = 0; - clientPrivateLen = 0; + clientPrivateCount = 1; + clientPrivateLen = 1; xfree(clientPrivateSizes); - clientPrivateSizes = (unsigned *)NULL; - totalClientSize = - ((sizeof(ClientRec) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); + clientPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + if (!clientPrivateSizes) + return FALSE; + *clientPrivateSizes = 0; + totalClientSize = PadToLong(sizeof(ClientRec)) + sizeof(DevUnion); + return TRUE; } _X_EXPORT int @@ -457,7 +467,7 @@ int screenPrivateCount; static void ResetScreenPrivates() { - screenPrivateCount = 0; + screenPrivateCount = 1; } /* this can be called after some screens have been created, @@ -499,7 +509,7 @@ static int windowPrivateCount; static void ResetWindowPrivates() { - windowPrivateCount = 0; + windowPrivateCount = 1; } _X_EXPORT int @@ -549,7 +559,7 @@ static int gcPrivateCount; static void ResetGCPrivates() { - gcPrivateCount = 0; + gcPrivateCount = 1; } _X_EXPORT int @@ -598,7 +608,7 @@ static int pixmapPrivateCount; static void ResetPixmapPrivates() { - pixmapPrivateCount = 0; + pixmapPrivateCount = 1; } _X_EXPORT int @@ -649,7 +659,7 @@ int colormapPrivateCount; static void ResetColormapPrivates() { - colormapPrivateCount = 0; + colormapPrivateCount = 1; } @@ -734,5 +744,5 @@ AllocateDevicePrivate(DeviceIntPtr device, int index) static void ResetDevicePrivateIndex(void) { - devicePrivateIndex = 0; + devicePrivateIndex = 1; } diff --git a/include/privates.h b/include/privates.h index 898fdd9c9..9c95350fa 100644 --- a/include/privates.h +++ b/include/privates.h @@ -30,6 +30,13 @@ typedef struct _Private { struct _Private *next; } PrivateRec; +/* + * Backwards compatibility macro. Use to get the proper PrivateRec + * reference from any of the structure types that supported the old + * devPrivates mechanism. + */ +#define DEVPRIV_PTR(foo) ((PrivateRec **)(&(foo)->devPrivates[0].ptr)) + /* * Request pre-allocated private space for your driver/module. * A non-null pScreen argument restricts to objects on a given screen. @@ -156,4 +163,7 @@ dixLookupPrivateOffset(RESTYPE type); extern int dixRegisterPrivateOffset(RESTYPE type, unsigned offset); +/* Used by the legacy support, don't rely on this being here */ +#define PadToLong(w) ((((w) + sizeof(long)-1) / sizeof(long)) * sizeof(long)) + #endif /* PRIVATES_H */ From 947f8d249bac61beb10669d935888c4c280b5062 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Mar 2007 12:13:18 -0500 Subject: [PATCH 038/552] devPrivates rework: redo interface again, dropping parent and type parameters as well as preallocation routine. --- dix/privates.c | 89 +++++++------------------------------- hw/xfree86/loader/dixsym.c | 1 - include/privates.h | 18 ++------ 3 files changed, 19 insertions(+), 89 deletions(-) diff --git a/dix/privates.c b/dix/privates.c index 57da0fa91..01d327b8c 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -48,8 +48,6 @@ from The Open Group. typedef struct _PrivateDesc { devprivate_key_t *key; - RESTYPE type; - pointer parent; unsigned size; CallbackListPtr initfuncs; CallbackListPtr deletefuncs; @@ -72,15 +70,13 @@ findItem(devprivate_key_t *const key) } /* - * Request pre-allocated space in resources of a given type. + * Request pre-allocated space. */ _X_EXPORT int -dixRequestPrivate(RESTYPE type, devprivate_key_t *const key, - unsigned size, pointer parent) +dixRequestPrivate(devprivate_key_t *const key, unsigned size) { PrivateDescRec *item = findItem(key); if (item) { - assert(item->type == type); if (size > item->size) item->size = size; } else { @@ -91,8 +87,6 @@ dixRequestPrivate(RESTYPE type, devprivate_key_t *const key, /* add privates descriptor */ item->key = key; - item->type = type; - item->parent = parent; item->size = size; item->next = items; items = item; @@ -116,7 +110,6 @@ dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key) ptr = (PrivateRec *)xalloc(size); if (!ptr) return NULL; - memset(ptr, 0, size); ptr->key = key; ptr->value = (size > sizeof(PrivateRec)) ? (ptr + 1) : NULL; ptr->next = *privates; @@ -130,57 +123,6 @@ dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key) return &ptr->value; } -/* - * Allocates pre-requested privates in a single chunk. - */ -_X_EXPORT PrivateRec * -dixAllocatePrivates(RESTYPE type, pointer parent) -{ - unsigned count = 0, size = 0; - PrivateCallbackRec calldata; - PrivateDescRec *item; - PrivateRec *ptr; - char *value; - - /* first pass figures out total size */ - for (item = items; item; item = item->next) - if ((item->type == type || item->type == RC_ANY) && - (item->parent == NULL || item->parent == parent)) { - - size += sizeof(PrivateRec) + item->size; - count++; - } - - /* allocate one chunk of memory for everything */ - ptr = (PrivateRec *)xalloc(size); - if (!ptr) - return NULL; - memset(ptr, 0, size); - value = (char *)(ptr + count); - - /* second pass sets up records and calls init funcs */ - count = 0; - for (item = items; item; item = item->next) - if ((item->type == type || item->type == RC_ANY) && - (item->parent == NULL || item->parent == parent)) { - - ptr[count].key = calldata.key = item->key; - ptr[count].dontfree = (count > 0); - ptr[count].value = calldata.value = (items->size ? value : NULL); - ptr[count].next = ptr + (count + 1); - - CallCallbacks(&item->initfuncs, &calldata); - - count++; - value += item->size; - } - - if (count > 0) - ptr[count-1].next = NULL; - - return ptr; -} - /* * Called to free privates at object deletion time. */ @@ -204,16 +146,9 @@ dixFreePrivates(PrivateRec *privates) /* second pass frees the memory */ ptr = privates; while (ptr) { - if (ptr->dontfree) - ptr = ptr->next; - else { - next = ptr->next; - while (next && next->dontfree) - next = next->next; - - xfree(ptr); - ptr = next; - } + next = ptr->next; + xfree(ptr); + ptr = next; } } @@ -225,8 +160,11 @@ dixRegisterPrivateInitFunc(devprivate_key_t *const key, CallbackProcPtr callback, pointer data) { PrivateDescRec *item = findItem(key); - if (!item) - return FALSE; + if (!item) { + if (!dixRequestPrivate(key, 0)) + return FALSE; + item = findItem(key); + } return AddCallback(&item->initfuncs, callback, data); } @@ -235,8 +173,11 @@ dixRegisterPrivateDeleteFunc(devprivate_key_t *const key, CallbackProcPtr callback, pointer data) { PrivateDescRec *item = findItem(key); - if (!item) - return FALSE; + if (!item) { + if (!dixRequestPrivate(key, 0)) + return FALSE; + item = findItem(key); + } return AddCallback(&item->deletefuncs, callback, data); } diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 6b52aea98..e6c2baac3 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -264,7 +264,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(dixRegisterPrivateInitFunc) SYMFUNC(dixRegisterPrivateDeleteFunc) SYMFUNC(dixAllocatePrivate) - SYMFUNC(dixAllocatePrivates) SYMFUNC(dixFreePrivates) SYMFUNC(dixRegisterPrivateOffset) SYMFUNC(dixLookupPrivateOffset) diff --git a/include/privates.h b/include/privates.h index 9c95350fa..d1e269bc3 100644 --- a/include/privates.h +++ b/include/privates.h @@ -19,13 +19,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * STUFF FOR PRIVATES *****************************************************************/ -typedef struct _PrivateKey { - int unused; -} devprivate_key_t; +typedef char devprivate_key_t; typedef struct _Private { devprivate_key_t *key; - int dontfree; pointer value; struct _Private *next; } PrivateRec; @@ -39,11 +36,10 @@ typedef struct _Private { /* * Request pre-allocated private space for your driver/module. - * A non-null pScreen argument restricts to objects on a given screen. + * Calling this is not necessary if only a pointer by itself is needed. */ extern int -dixRequestPrivate(RESTYPE type, devprivate_key_t *const key, - unsigned size, pointer pScreen); +dixRequestPrivate(devprivate_key_t *const key, unsigned size); /* * Allocates a new private and attaches it to an existing object. @@ -128,13 +124,7 @@ dixRegisterPrivateDeleteFunc(devprivate_key_t *const key, CallbackProcPtr callback, pointer userdata); /* - * Allocates all pre-requested private space in one chunk. - */ -extern PrivateRec * -dixAllocatePrivates(RESTYPE type, pointer parent); - -/* - * Frees any private space that is not part of an object. + * Frees private data. */ extern void dixFreePrivates(PrivateRec *privates); From 2fcb45eb5dc1803b372df8b5765f6a43bea83611 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Mar 2007 12:13:36 -0500 Subject: [PATCH 039/552] devPrivates rework: redo field offset registration, drop RC_PRIVATES class. --- dix/privates.c | 16 ++++++++++------ include/privates.h | 5 +++-- include/resource.h | 7 +------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dix/privates.c b/dix/privates.c index 01d327b8c..29e261f6b 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -195,12 +195,14 @@ dixRegisterPrivateOffset(RESTYPE type, unsigned offset) /* resize offsets table if necessary */ while (type >= offsetsSize) { - offsets = (unsigned *)xrealloc(offsets, - offsetsSize * 2 * sizeof(unsigned)); + unsigned i = offsetsSize * 2 * sizeof(int); + offsets = (unsigned *)xrealloc(offsets, i); if (!offsets) { offsetsSize = 0; return FALSE; } + for (i=offsetsSize; i < 2*offsetsSize; i++) + offsets[i] = -1; offsetsSize *= 2; } @@ -208,10 +210,9 @@ dixRegisterPrivateOffset(RESTYPE type, unsigned offset) return TRUE; } -_X_EXPORT unsigned +_X_EXPORT int dixLookupPrivateOffset(RESTYPE type) { - assert(type & RC_PRIVATES); type = type & TypeMask; assert(type < offsetsSize); return offsets[type]; @@ -233,19 +234,22 @@ int dixResetPrivates(void) { PrivateDescRec *next; + unsigned i; + + /* reset internal structures */ while (items) { next = items->next; xfree(items); items = next; } - if (offsets) xfree(offsets); - offsetsSize = 16; offsets = (unsigned *)xalloc(offsetsSize * sizeof(unsigned)); if (!offsets) return FALSE; + for (i=0; i < offsetsSize; i++) + offsets[i] = -1; /* reset legacy devPrivates support */ if (!ResetExtensionPrivates() || !ResetClientPrivates()) diff --git a/include/privates.h b/include/privates.h index d1e269bc3..6071e3958 100644 --- a/include/privates.h +++ b/include/privates.h @@ -142,9 +142,10 @@ dixResetPrivates(void); */ /* - * Looks up the offset where the devPrivates field is located by type. + * Looks up the offset where the devPrivates field is located. + * Returns -1 if no offset has been registered for the resource type. */ -extern unsigned +extern int dixLookupPrivateOffset(RESTYPE type); /* diff --git a/include/resource.h b/include/resource.h index 40259ac27..3231e8cd9 100644 --- a/include/resource.h +++ b/include/resource.h @@ -66,12 +66,7 @@ typedef unsigned long RESTYPE; * Extensions can use this too! */ #define RC_NEVERRETAIN ((RESTYPE)1<<29) -/* Use class RC_PRIVATES for resources that support extra private data. - * Resources having this class must provide a field of type PrivateRec *. - * Refer to the X server documentation on devPrivates for the details. - */ -#define RC_PRIVATES ((RESTYPE)1<<28) -#define RC_LASTPREDEF RC_PRIVATES +#define RC_LASTPREDEF RC_NEVERRETAIN #define RC_ANY (~(RESTYPE)0) /* types for Resource routines */ From b9cff1670f29949a5bc41afc19aca443f434febb Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Mar 2007 12:13:52 -0500 Subject: [PATCH 040/552] Add ResourceStateCallback similar in function to ClientStateCallback. --- dix/resource.c | 24 ++++++++++++++++++++++++ hw/xfree86/loader/dixsym.c | 1 + include/resource.h | 13 +++++++++++++ 3 files changed, 38 insertions(+) diff --git a/dix/resource.c b/dix/resource.c index 2cad7c01b..edf32ff34 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -193,6 +193,17 @@ _X_EXPORT RESTYPE TypeMask; static DeleteType *DeleteFuncs = (DeleteType *)NULL; +_X_EXPORT CallbackListPtr ResourceStateCallback; + +static _X_INLINE void +CallResourceStateCallback(ResourceState state, ResourceRec *res) +{ + if (ResourceStateCallback) { + ResourceStateInfoRec rsi = { state, res->id, res->type, res->value }; + CallCallbacks(&ResourceStateCallback, &rsi); + } +} + #ifdef XResExtension _X_EXPORT Atom * ResourceNames = NULL; @@ -492,6 +503,7 @@ AddResource(XID id, RESTYPE type, pointer value) rrec->elements++; if (!(id & SERVER_BIT) && (id >= rrec->expectID)) rrec->expectID = id + 1; + CallResourceStateCallback(ResourceStateAdding, res); return TRUE; } @@ -572,6 +584,9 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) #endif *prev = res->next; elements = --*eltptr; + + CallResourceStateCallback(ResourceStateFreeing, res); + if (rtype & RC_CACHED) FlushClientCaches(res->id); if (rtype != skipDeleteFuncType) @@ -616,6 +631,9 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) res->value, TypeNameString(res->type)); #endif *prev = res->next; + + CallResourceStateCallback(ResourceStateFreeing, res); + if (type & RC_CACHED) FlushClientCaches(res->id); if (!skipFree) @@ -782,6 +800,9 @@ FreeClientNeverRetainResources(ClientPtr client) this->value, TypeNameString(this->type)); #endif *prev = this->next; + + CallResourceStateCallback(ResourceStateFreeing, this); + if (rtype & RC_CACHED) FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); @@ -832,6 +853,9 @@ FreeClientResources(ClientPtr client) this->value, TypeNameString(this->type)); #endif *head = this->next; + + CallResourceStateCallback(ResourceStateFreeing, this); + if (rtype & RC_CACHED) FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index e6c2baac3..1732d1fe4 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -300,6 +300,7 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(FindAllClientResources) SYMVAR(lastResourceType) SYMVAR(TypeMask) + SYMVAR(ResourceStateCallback) #ifdef RES SYMFUNC(RegisterResourceName) SYMVAR(ResourceNames) diff --git a/include/resource.h b/include/resource.h index 3231e8cd9..9949dd2fc 100644 --- a/include/resource.h +++ b/include/resource.h @@ -120,6 +120,19 @@ typedef unsigned long RESTYPE; #define BAD_RESOURCE 0xe0000000 +/* Resource state callback */ +extern CallbackListPtr ResourceStateCallback; + +typedef enum {ResourceStateAdding, + ResourceStateFreeing} ResourceState; + +typedef struct { + ResourceState state; + XID id; + RESTYPE type; + pointer value; +} ResourceStateInfoRec; + typedef int (*DeleteType)( pointer /*value*/, XID /*id*/); From 18339375cd332f0ab1cbdade3dcd9140212ce1ca Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Mar 2007 12:14:06 -0500 Subject: [PATCH 041/552] xselinux: remove context validation function for now. --- Xext/xselinux.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 5b77269f2..ab4827e09 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -57,42 +57,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XSELINUXCONFIGFILE NULL #endif - -/* Make sure a locally connecting client has a valid context. The context - * for this client is retrieved again later on in AssignClientState(), but - * by that point it's too late to reject the client. - */ -static char * -XSELinuxValidContext (ClientPtr client) -{ - security_context_t ctx = NULL; - XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; - char reason[256]; - char *ret = (char *)NULL; - - if (_XSERVTransIsLocal(ci)) - { - int fd = _XSERVTransGetConnectionNumber(ci); - if (getpeercon(fd, &ctx) < 0) - { - snprintf(reason, sizeof(reason), "Failed to retrieve SELinux context from socket"); - ret = reason; - goto out; - } - if (security_check_context(ctx)) - { - snprintf(reason, sizeof(reason), "Client's SELinux context is invalid: %s", ctx); - ret = reason; - } - - freecon(ctx); - } - -out: - return ret; -} - - /* devPrivates in client and extension */ static int clientPrivateIndex; static int extnsnPrivateIndex; From fe05ba75a10ec080e7ec34bff6936103185586b3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Mar 2007 12:14:30 -0500 Subject: [PATCH 042/552] devPrivates rework: pass address of pointer to private callbacks instead of the pointer itself. --- dix/privates.c | 4 ++-- include/privates.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dix/privates.c b/dix/privates.c index 29e261f6b..8aab32d0e 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -117,7 +117,7 @@ dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key) /* call any init funcs and return */ if (item) { - PrivateCallbackRec calldata = { key, ptr->value }; + PrivateCallbackRec calldata = { key, &ptr->value }; CallCallbacks(&item->initfuncs, &calldata); } return &ptr->value; @@ -138,7 +138,7 @@ dixFreePrivates(PrivateRec *privates) item = findItem(ptr->key); if (item) { calldata.key = ptr->key; - calldata.value = ptr->value; + calldata.value = &ptr->value; CallCallbacks(&item->deletefuncs, &calldata); } } diff --git a/include/privates.h b/include/privates.h index 6071e3958..e57f16712 100644 --- a/include/privates.h +++ b/include/privates.h @@ -112,7 +112,7 @@ dixSetPrivate(PrivateRec **privates, devprivate_key_t *const key, pointer val) */ typedef struct _PrivateCallback { devprivate_key_t *key; /* private registration key */ - pointer value; /* pointer to private */ + pointer *value; /* address of private pointer */ } PrivateCallbackRec; extern int From 6a89106e9c963a495fd40427d242ba0abd44f764 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 19 Mar 2007 16:51:29 -0400 Subject: [PATCH 043/552] xselinux + security: remove confusing CALLBACK macro. --- Xext/security.c | 43 ++++++++++++++++++++++++++++++------------- Xext/xselinux.c | 32 ++++++++++++++++++++------------ 2 files changed, 50 insertions(+), 25 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 7202d3947..98e91ad48 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -83,9 +83,6 @@ RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */ static RESTYPE RTEventClient; -#define CALLBACK(name) static void \ -name(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) - /* SecurityAudit * * Arguments: @@ -779,7 +776,9 @@ SecurityDetermineEventPropogationLimits( * An audit message is generated if access is denied. */ -CALLBACK(SecurityCheckDeviceAccess) +static void +SecurityCheckDeviceAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XaceDeviceAccessRec *rec = (XaceDeviceAccessRec*)calldata; ClientPtr client = rec->client; @@ -955,7 +954,9 @@ SecurityAuditResourceIDAccess( * Disallowed resource accesses are audited. */ -CALLBACK(SecurityCheckResourceIDAccess) +static void +SecurityCheckResourceIDAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata; ClientPtr client = rec->client; @@ -1114,7 +1115,9 @@ CALLBACK(SecurityCheckResourceIDAccess) * if it is now zero, the timer for this authorization is started. */ -CALLBACK(SecurityClientStateCallback) +static void +SecurityClientStateCallback(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { NewClientInfoRec *pci = (NewClientInfoRec *)calldata; ClientPtr client = pci->client; @@ -1171,7 +1174,9 @@ CALLBACK(SecurityClientStateCallback) } } /* SecurityClientStateCallback */ -CALLBACK(SecurityCheckDrawableAccess) +static void +SecurityCheckDrawableAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; @@ -1179,7 +1184,9 @@ CALLBACK(SecurityCheckDrawableAccess) rec->rval = FALSE; } -CALLBACK(SecurityCheckMapAccess) +static void +SecurityCheckMapAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; WindowPtr pWin = rec->pWin; @@ -1193,7 +1200,9 @@ CALLBACK(SecurityCheckMapAccess) rec->rval = FALSE; } -CALLBACK(SecurityCheckBackgrndAccess) +static void +SecurityCheckBackgrndAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; @@ -1201,7 +1210,9 @@ CALLBACK(SecurityCheckBackgrndAccess) rec->rval = FALSE; } -CALLBACK(SecurityCheckExtAccess) +static void +SecurityCheckExtAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; @@ -1211,7 +1222,9 @@ CALLBACK(SecurityCheckExtAccess) rec->rval = FALSE; } -CALLBACK(SecurityCheckHostlistAccess) +static void +SecurityCheckHostlistAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata; @@ -1227,7 +1240,9 @@ CALLBACK(SecurityCheckHostlistAccess) } } -CALLBACK(SecurityDeclareExtSecure) +static void +SecurityDeclareExtSecure(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XaceDeclareExtSecureRec *rec = (XaceDeclareExtSecureRec*)calldata; @@ -1692,7 +1707,9 @@ SecurityMatchString( #endif -CALLBACK(SecurityCheckPropertyAccess) +static void +SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata; ClientPtr client = rec->client; diff --git a/Xext/xselinux.c b/Xext/xselinux.c index ab4827e09..74d4c6067 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -503,8 +503,6 @@ FreeClientState(ClientPtr client) #define IDPERM(client, req, field, class, perm) \ (REQUEST_SIZE_CHECK(client,req) && \ IDPerm(client, SwapXID(client,((req*)stuff)->field), class, perm)) -#define CALLBACK(name) static void \ -name(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) static int CheckSendEventPerms(ClientPtr client) @@ -632,7 +630,8 @@ CheckSetSelectionOwnerPerms(ClientPtr client) return rval; } -CALLBACK(XSELinuxCoreDispatch) +static void +XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceCoreDispatchRec *rec = (XaceCoreDispatchRec*)calldata; ClientPtr client = rec->client; @@ -1017,7 +1016,8 @@ CALLBACK(XSELinuxCoreDispatch) rec->rval = FALSE; } -CALLBACK(XSELinuxExtDispatch) +static void +XSELinuxExtDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; ClientPtr client = rec->client; @@ -1058,7 +1058,8 @@ CALLBACK(XSELinuxExtDispatch) ErrorF("No client state in extension dispatcher!\n"); } /* XSELinuxExtDispatch */ -CALLBACK(XSELinuxProperty) +static void +XSELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata; WindowPtr pWin = rec->pWin; @@ -1106,7 +1107,8 @@ CALLBACK(XSELinuxProperty) sidput(propsid); } /* XSELinuxProperty */ -CALLBACK(XSELinuxResLookup) +static void +XSELinuxResLookup(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata; ClientPtr client = rec->client; @@ -1147,7 +1149,8 @@ CALLBACK(XSELinuxResLookup) rec->rval = FALSE; } /* XSELinuxResLookup */ -CALLBACK(XSELinuxMap) +static void +XSELinuxMap(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; if (!IDPerm(rec->client, rec->pWin->drawable.id, @@ -1155,7 +1158,8 @@ CALLBACK(XSELinuxMap) rec->rval = FALSE; } /* XSELinuxMap */ -CALLBACK(XSELinuxBackgrnd) +static void +XSELinuxBackgrnd(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; if (!IDPerm(rec->client, rec->pWin->drawable.id, @@ -1163,7 +1167,8 @@ CALLBACK(XSELinuxBackgrnd) rec->rval = FALSE; } /* XSELinuxBackgrnd */ -CALLBACK(XSELinuxDrawable) +static void +XSELinuxDrawable(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; if (!IDPerm(rec->client, rec->pDraw->id, @@ -1171,7 +1176,8 @@ CALLBACK(XSELinuxDrawable) rec->rval = FALSE; } /* XSELinuxDrawable */ -CALLBACK(XSELinuxHostlist) +static void +XSELinuxHostlist(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata; access_vector_t perm = (rec->access_mode == DixReadAccess) ? @@ -1182,7 +1188,8 @@ CALLBACK(XSELinuxHostlist) } /* XSELinuxHostlist */ /* Extension callbacks */ -CALLBACK(XSELinuxClientState) +static void +XSELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { NewClientInfoRec *pci = (NewClientInfoRec *)calldata; ClientPtr client = pci->client; @@ -1209,7 +1216,8 @@ CALLBACK(XSELinuxClientState) } /* XSELinuxClientState */ /* Labeling callbacks */ -CALLBACK(XSELinuxWindowInit) +static void +XSELinuxWindowInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceWindowRec *rec = (XaceWindowRec*)calldata; security_context_t ctx; From 78c962da76efe644b8d485265f1ecdda84b45d27 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 19 Mar 2007 17:04:51 -0400 Subject: [PATCH 044/552] xselinux: use the new ResourceStateCallback instead of the XACE_WINDOW_INIT hook. --- Xext/xselinux.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 74d4c6067..4056d9e92 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1217,26 +1217,34 @@ XSELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Labeling callbacks */ static void -XSELinuxWindowInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) +XSELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - XaceWindowRec *rec = (XaceWindowRec*)calldata; + ResourceStateInfoRec *rec = (ResourceStateInfoRec *)calldata; + WindowPtr pWin; + ClientPtr client; security_context_t ctx; int rc; - if (HAVESTATE(rec->client)) { - rc = avc_sid_to_context(SID(rec->client), &ctx); + if (rec->type != RT_WINDOW) + return; + + pWin = (WindowPtr)rec->value; + client = wClient(pWin); + + if (HAVESTATE(client)) { + rc = avc_sid_to_context(SID(client), &ctx); if (rc < 0) FatalError("XSELinux: Failed to get security context!\n"); - rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, + rc = ChangeWindowProperty(pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); freecon(ctx); } else - rc = ChangeWindowProperty(rec->pWin, atom_client_ctx, XA_STRING, 8, + rc = ChangeWindowProperty(pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, 10, "UNLABELED!", FALSE); if (rc != Success) FatalError("XSELinux: Failed to set context property on window!\n"); -} /* XSELinuxWindowInit */ +} /* XSELinuxResourceState */ static char *XSELinuxKeywords[] = { #define XSELinuxKeywordComment 0 @@ -1836,6 +1844,8 @@ XSELinuxExtensionInit(INITARGS) if (!AddCallback(&ClientStateCallback, XSELinuxClientState, NULL)) return; + if (!AddCallback(&ResourceStateCallback, XSELinuxResourceState, NULL)) + return; /* Create atoms for doing window labeling */ atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, 1); @@ -1870,7 +1880,6 @@ XSELinuxExtensionInit(INITARGS) XaceRegisterCallback(XACE_BACKGRND_ACCESS, XSELinuxBackgrnd, NULL); XaceRegisterCallback(XACE_DRAWABLE_ACCESS, XSELinuxDrawable, NULL); XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); - XaceRegisterCallback(XACE_WINDOW_INIT, XSELinuxWindowInit, NULL); /* XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, XSELinuxDeclare, NULL); XaceRegisterCallback(XACE_DEVICE_ACCESS, XSELinuxDevice, NULL); */ From 2945deba1d4a7dce4f6dd0c568297a1c537fdfb4 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 19 Mar 2007 17:09:10 -0400 Subject: [PATCH 045/552] xace: drop XACE_WINDOW_INIT hook, it has been superseded by ResourceStateCallback. --- Xext/xace.c | 8 -------- Xext/xace.h | 7 +++---- Xext/xacestr.h | 6 ------ dix/window.c | 4 ---- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 6fc5c12ee..ee0f39c20 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -182,14 +182,6 @@ int XaceHook(int hook, ...) calldata = &rec; break; } - case XACE_WINDOW_INIT: { - XaceWindowRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, WindowPtr) - }; - calldata = &rec; - break; - } case XACE_AUDIT_BEGIN: { XaceAuditRec rec = { va_arg(ap, ClientPtr), diff --git a/Xext/xace.h b/Xext/xace.h index 7231b04bc..7360dae5b 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -54,10 +54,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_DECLARE_EXT_SECURE 11 #define XACE_AUTH_AVAIL 12 #define XACE_KEY_AVAIL 13 -#define XACE_WINDOW_INIT 14 -#define XACE_AUDIT_BEGIN 15 -#define XACE_AUDIT_END 16 -#define XACE_NUM_HOOKS 17 +#define XACE_AUDIT_BEGIN 14 +#define XACE_AUDIT_END 15 +#define XACE_NUM_HOOKS 16 extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 7114d066b..bd3088381 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -119,12 +119,6 @@ typedef struct { int count; } XaceKeyAvailRec; -/* XACE_WINDOW_INIT */ -typedef struct { - ClientPtr client; - WindowPtr pWin; -} XaceWindowRec; - /* XACE_AUDIT_BEGIN */ /* XACE_AUDIT_END */ typedef struct { diff --git a/dix/window.c b/dix/window.c index e33140dd4..02496f53e 100644 --- a/dix/window.c +++ b/dix/window.c @@ -529,8 +529,6 @@ InitRootWindow(WindowPtr pWin) /* We SHOULD check for an error value here XXX */ (*pScreen->ChangeWindowAttributes)(pWin, backFlag); - XaceHook(XACE_WINDOW_INIT, serverClient, pWin); - MapWindow(pWin, serverClient); } @@ -763,8 +761,6 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w, REGION_NULL(pScreen, &pWin->winSize); REGION_NULL(pScreen, &pWin->borderSize); - XaceHook(XACE_WINDOW_INIT, client, pWin); - pHead = RealChildHead(pParent); if (pHead) { From 9c144f8ac5cea25deaa543767dbaf371d029c608 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 21 Mar 2007 14:39:00 -0400 Subject: [PATCH 046/552] xace: add XACE_SELECTION_ACCESS hook for selection redirection/access. --- Xext/xace.c | 10 ++++++++++ Xext/xace.h | 15 ++++++++------- Xext/xacestr.h | 8 ++++++++ dix/dispatch.c | 7 +++---- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index ee0f39c20..2b873cbf0 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -147,6 +147,16 @@ int XaceHook(int hook, ...) prv = &rec.rval; break; } + case XACE_SELECTION_ACCESS: { + XaceSelectionAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, Selection*), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } case XACE_SITE_POLICY: { XaceSitePolicyRec rec = { va_arg(ap, char*), diff --git a/Xext/xace.h b/Xext/xace.h index 7360dae5b..020a047d0 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -50,13 +50,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_BACKGRND_ACCESS 7 #define XACE_EXT_ACCESS 8 #define XACE_HOSTLIST_ACCESS 9 -#define XACE_SITE_POLICY 10 -#define XACE_DECLARE_EXT_SECURE 11 -#define XACE_AUTH_AVAIL 12 -#define XACE_KEY_AVAIL 13 -#define XACE_AUDIT_BEGIN 14 -#define XACE_AUDIT_END 15 -#define XACE_NUM_HOOKS 16 +#define XACE_SELECTION_ACCESS 10 +#define XACE_SITE_POLICY 11 +#define XACE_DECLARE_EXT_SECURE 12 +#define XACE_AUTH_AVAIL 13 +#define XACE_KEY_AVAIL 14 +#define XACE_AUDIT_BEGIN 15 +#define XACE_AUDIT_END 16 +#define XACE_NUM_HOOKS 17 extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index bd3088381..4c480a4ea 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -27,6 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "gcstruct.h" #include "windowstr.h" #include "inputstr.h" +#include "selection.h" #include "xace.h" /* XACE_CORE_DISPATCH */ @@ -93,6 +94,13 @@ typedef struct { int rval; } XaceHostlistAccessRec; +/* XACE_SELECTION_ACCESS */ +typedef struct { + ClientPtr client; + Selection *selection; + int rval; +} XaceSelectionAccessRec; + /* XACE_SITE_POLICY */ typedef struct { char *policyString; diff --git a/dix/dispatch.c b/dix/dispatch.c index d44687ec3..498f18a9c 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1113,7 +1113,8 @@ ProcGetSelectionOwner(register ClientPtr client) reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; - if (i < NumCurrentSelections) + if (i < NumCurrentSelections && + XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i])) reply.owner = CurrentSelections[i].window; else reply.owner = None; @@ -1153,9 +1154,7 @@ ProcConvertSelection(register ClientPtr client) CurrentSelections[i].selection != stuff->selection) i++; if ((i < NumCurrentSelections) && (CurrentSelections[i].window != None) && - XaceHook(XACE_RESOURCE_ACCESS, client, - CurrentSelections[i].window, RT_WINDOW, - DixReadAccess, CurrentSelections[i].pWin)) + XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i])) { event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; From 4fa482b4be1150bcffeabb64d018c00ac5951e41 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 21 Mar 2007 14:49:56 -0400 Subject: [PATCH 047/552] xace: bump major version since the hooks have changed. --- Xext/xace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xace.h b/Xext/xace.h index 020a047d0..d3d5a84be 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef XACE #define XACE_EXTENSION_NAME "XAccessControlExtension" -#define XACE_MAJOR_VERSION 1 +#define XACE_MAJOR_VERSION 2 #define XACE_MINOR_VERSION 0 #include "pixmap.h" /* for DrawablePtr */ From 4c1fb8069d5dd30a73277698503e9dcc2e9d64c6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 21 Mar 2007 16:17:14 -0400 Subject: [PATCH 048/552] dix: add new selection fields supporting redirection. This is a minor ABI break. --- dix/dispatch.c | 16 ++++++++++++---- include/selection.h | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 498f18a9c..b5ed13d0c 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1074,11 +1074,16 @@ ProcSetSelectionOwner(register ClientPtr client) NumCurrentSelections++; CurrentSelections = newsels; CurrentSelections[i].selection = stuff->selection; + CurrentSelections[i].devPrivates = NULL; } + dixFreePrivates(CurrentSelections[i].devPrivates); CurrentSelections[i].lastTimeChanged = time; CurrentSelections[i].window = stuff->window; + CurrentSelections[i].destwindow = stuff->window; CurrentSelections[i].pWin = pWin; CurrentSelections[i].client = (pWin ? client : NullClient); + CurrentSelections[i].destclient = (pWin ? client : NullClient); + CurrentSelections[i].devPrivates = NULL; if (SelectionCallback) { SelectionInfoRec info; @@ -1115,7 +1120,7 @@ ProcGetSelectionOwner(register ClientPtr client) reply.sequenceNumber = client->sequence; if (i < NumCurrentSelections && XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i])) - reply.owner = CurrentSelections[i].window; + reply.owner = CurrentSelections[i].destwindow; else reply.owner = None; WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply); @@ -1158,14 +1163,13 @@ ProcConvertSelection(register ClientPtr client) { event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; - event.u.selectionRequest.owner = - CurrentSelections[i].window; + event.u.selectionRequest.owner = CurrentSelections[i].window; event.u.selectionRequest.requestor = stuff->requestor; event.u.selectionRequest.selection = stuff->selection; event.u.selectionRequest.target = stuff->target; event.u.selectionRequest.property = stuff->property; if (TryClientEvents( - CurrentSelections[i].client, &event, 1, NoEventMask, + CurrentSelections[i].destclient, &event, 1, NoEventMask, NoEventMask /* CantBeFiltered */, NullGrab)) return (client->noClientException); } @@ -4020,9 +4024,11 @@ DeleteWindowFromAnySelections(WindowPtr pWin) info.kind = SelectionWindowDestroy; CallCallbacks(&SelectionCallback, &info); } + dixFreePrivates(CurrentSelections[i].devPrivates); CurrentSelections[i].pWin = (WindowPtr)NULL; CurrentSelections[i].window = None; CurrentSelections[i].client = NullClient; + CurrentSelections[i].devPrivates = NULL; } } @@ -4042,9 +4048,11 @@ DeleteClientFromAnySelections(ClientPtr client) info.kind = SelectionWindowDestroy; CallCallbacks(&SelectionCallback, &info); } + dixFreePrivates(CurrentSelections[i].devPrivates); CurrentSelections[i].pWin = (WindowPtr)NULL; CurrentSelections[i].window = None; CurrentSelections[i].client = NullClient; + CurrentSelections[i].devPrivates = NULL; } } diff --git a/include/selection.h b/include/selection.h index fbe7cfca6..93473767a 100644 --- a/include/selection.h +++ b/include/selection.h @@ -50,6 +50,7 @@ SOFTWARE. ******************************************************************/ #include "dixstruct.h" +#include "privates.h" /* * * Selection data structures @@ -61,6 +62,9 @@ typedef struct _Selection { Window window; WindowPtr pWin; ClientPtr client; + ClientPtr destclient; /* support for redirection */ + Window destwindow; /* support for redirection */ + PrivateRec *devPrivates; } Selection; #endif /* SELECTION_H */ From a3296d111dc4d76aa3afa7e338cbab93eb390ec4 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 21 Mar 2007 17:01:26 -0400 Subject: [PATCH 049/552] xace: add access_mode argument to selection hook. --- Xext/xace.c | 1 + Xext/xacestr.h | 1 + dix/dispatch.c | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 2b873cbf0..9502b5da9 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -151,6 +151,7 @@ int XaceHook(int hook, ...) XaceSelectionAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, Selection*), + va_arg(ap, Mask), TRUE /* default allow */ }; calldata = &rec; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 4c480a4ea..edf7b66fb 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -98,6 +98,7 @@ typedef struct { typedef struct { ClientPtr client; Selection *selection; + Mask access_mode; int rval; } XaceSelectionAccessRec; diff --git a/dix/dispatch.c b/dix/dispatch.c index b5ed13d0c..e4bc93728 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1119,7 +1119,8 @@ ProcGetSelectionOwner(register ClientPtr client) reply.length = 0; reply.sequenceNumber = client->sequence; if (i < NumCurrentSelections && - XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i])) + XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i], + DixReadAccess)) reply.owner = CurrentSelections[i].destwindow; else reply.owner = None; @@ -1159,7 +1160,8 @@ ProcConvertSelection(register ClientPtr client) CurrentSelections[i].selection != stuff->selection) i++; if ((i < NumCurrentSelections) && (CurrentSelections[i].window != None) && - XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i])) + XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i], + DixReadAccess)) { event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; From 5486be4898766205149fadce71529724eb78fbf3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 22 Mar 2007 10:59:21 -0400 Subject: [PATCH 050/552] dix: devPrivates support for PropertyRec. --- dix/property.c | 4 ++++ include/propertyst.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/dix/property.c b/dix/property.c index d40284901..3aa8e77e8 100644 --- a/dix/property.c +++ b/dix/property.c @@ -281,6 +281,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, memmove((char *)data, (char *)value, totalSize); pProp->size = len; pProp->next = pWin->optional->userProps; + pProp->devPrivates = NULL; pWin->optional->userProps = pProp; } else @@ -383,6 +384,7 @@ DeleteProperty(WindowPtr pWin, Atom propName) event.u.property.atom = pProp->propertyName; event.u.property.time = currentTime.milliseconds; DeliverEvents(pWin, &event, 1, (WindowPtr)NULL); + dixFreePrivates(pProp->devPrivates); xfree(pProp->data); xfree(pProp); } @@ -405,6 +407,7 @@ DeleteAllWindowProperties(WindowPtr pWin) event.u.property.time = currentTime.milliseconds; DeliverEvents(pWin, &event, 1, (WindowPtr)NULL); pNextProp = pProp->next; + dixFreePrivates(pProp->devPrivates); xfree(pProp->data); xfree(pProp); pProp = pNextProp; @@ -569,6 +572,7 @@ ProcGetProperty(ClientPtr client) } else prevProp->next = pProp->next; + dixFreePrivates(pProp->devPrivates); xfree(pProp->data); xfree(pProp); } diff --git a/include/propertyst.h b/include/propertyst.h index 6add81d9a..fd1148eb7 100644 --- a/include/propertyst.h +++ b/include/propertyst.h @@ -49,6 +49,7 @@ SOFTWARE. #define PROPERTYSTRUCT_H #include "misc.h" #include "property.h" +#include "privates.h" /* * PROPERTY -- property element */ @@ -60,6 +61,7 @@ typedef struct _Property { short format; /* format of data for swapping - 8,16,32 */ long size; /* size of data in (format/8) bytes */ pointer data; /* private to client */ + PrivateRec *devPrivates; } PropertyRec; #endif /* PROPERTYSTRUCT_H */ From 1b58304ac837735920747ed0f0d10ba331bdaeb7 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 22 Mar 2007 13:06:50 -0400 Subject: [PATCH 051/552] xace: add new argument to property hook for property structure itself. --- Xext/security.c | 6 ----- Xext/xace.c | 3 +-- Xext/xacestr.h | 2 ++ dix/property.c | 67 +++++++++++++++++++++++++++---------------------- 4 files changed, 40 insertions(+), 38 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 98e91ad48..b7a0925c7 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -28,14 +28,8 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include "dixstruct.h" -#include "extnsionst.h" -#include "windowstr.h" -#include "inputstr.h" #include "scrnintstr.h" -#include "gcstruct.h" #include "colormapst.h" -#include "propertyst.h" #include "xacestr.h" #include "securitysrv.h" #include diff --git a/Xext/xace.c b/Xext/xace.c index 9502b5da9..8e277ac81 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -22,9 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include -#include "windowstr.h" #include "scrnintstr.h" -#include "gcstruct.h" #include "xacestr.h" #include "modinit.h" @@ -97,6 +95,7 @@ int XaceHook(int hook, ...) XacePropertyAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, WindowPtr), + va_arg(ap, PropertyPtr), va_arg(ap, Atom), va_arg(ap, Mask), XaceAllowOperation /* default allow */ diff --git a/Xext/xacestr.h b/Xext/xacestr.h index edf7b66fb..19d154021 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -27,6 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "gcstruct.h" #include "windowstr.h" #include "inputstr.h" +#include "propertyst.h" #include "selection.h" #include "xace.h" @@ -59,6 +60,7 @@ typedef struct { typedef struct { ClientPtr client; WindowPtr pWin; + PropertyPtr pProp; Atom propertyName; Mask access_mode; int rval; diff --git a/dix/property.c b/dix/property.c index 3aa8e77e8..5e11b5f6c 100644 --- a/dix/property.c +++ b/dix/property.c @@ -91,6 +91,19 @@ PrintPropertys(WindowPtr pWin) } #endif +static _X_INLINE PropertyPtr +FindProperty(WindowPtr pWin, Atom propertyName) +{ + PropertyPtr pProp = wUserProps(pWin); + while (pProp) + { + if (pProp->propertyName == propertyName) + break; + pProp = pProp->next; + } + return pProp; +} + int ProcRotateProperties(ClientPtr client) { @@ -115,35 +128,33 @@ ProcRotateProperties(ClientPtr client) return(BadAlloc); for (i = 0; i < stuff->nAtoms; i++) { - char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i], - DixReadAccess|DixWriteAccess); - - if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) { + if (!ValidAtom(atoms[i])) { DEALLOCATE_LOCAL(props); client->errorValue = atoms[i]; return BadAtom; } - if (XaceIgnoreOperation == action) { - DEALLOCATE_LOCAL(props); - return Success; - } - for (j = i + 1; j < stuff->nAtoms; j++) if (atoms[j] == atoms[i]) { DEALLOCATE_LOCAL(props); return BadMatch; } - pProp = wUserProps (pWin); - while (pProp) - { - if (pProp->propertyName == atoms[i]) - goto found; - pProp = pProp->next; - } - DEALLOCATE_LOCAL(props); - return BadMatch; -found: + pProp = FindProperty(pWin, atoms[i]); + if (!pProp) { + DEALLOCATE_LOCAL(props); + return BadMatch; + } + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, atoms[i], + DixReadAccess|DixWriteAccess)) + { + case XaceErrorOperation: + DEALLOCATE_LOCAL(props); + client->errorValue = atoms[i]; + return BadAtom; + case XaceIgnoreOperation: + DEALLOCATE_LOCAL(props); + return Success; + } props[i] = pProp; } delta = stuff->nPositions; @@ -219,7 +230,8 @@ ProcChangeProperty(ClientPtr client) return(BadAtom); } - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, + FindProperty(pWin, stuff->property), stuff->property, DixWriteAccess)) { case XaceErrorOperation: @@ -252,14 +264,8 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, totalSize = len * sizeInBytes; /* first see if property already exists */ + pProp = FindProperty(pWin, property); - pProp = wUserProps (pWin); - while (pProp) - { - if (pProp->propertyName == property) - break; - pProp = pProp->next; - } if (!pProp) /* just add to list */ { if (!pWin->optional && !MakeWindowOptional (pWin)) @@ -490,8 +496,8 @@ ProcGetProperty(ClientPtr client) if (stuff->delete) access_mode |= DixDestroyAccess; - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, - access_mode)) + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, + stuff->property, access_mode)) { case XaceErrorOperation: client->errorValue = stuff->property; @@ -643,7 +649,8 @@ ProcDeleteProperty(register ClientPtr client) return (BadAtom); } - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, + FindProperty(pWin, stuff->property), stuff->property, DixDestroyAccess)) { case XaceErrorOperation: From 1b766ffc0647d5e9a9bf6938d33548d977b5535e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 22 Mar 2007 15:55:35 -0400 Subject: [PATCH 052/552] dix: reorganize property code to better support xace hook; requires new API for changing a property, dixChangeWindowProperty, taking an additional client argument. --- Xext/security.c | 2 +- Xext/xselinux.c | 2 +- dix/property.c | 55 ++++++++++++++++++++++++++------------ hw/xfree86/loader/dixsym.c | 1 + include/property.h | 11 ++++++++ 5 files changed, 52 insertions(+), 19 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index b7a0925c7..00180b99e 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1715,7 +1715,7 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, /* if client trusted or window untrusted, allow operation */ - if ( (TRUSTLEVEL(client) == XSecurityClientTrusted) || + if (!client || (TRUSTLEVEL(client) == XSecurityClientTrusted) || (TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) ) return; diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 4056d9e92..eb721a7c1 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1070,7 +1070,7 @@ XSELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) char *propname = NameForAtom(rec->propertyName); tclient = wClient(pWin); - if (!tclient || !HAVESTATE(tclient)) + if (!client || !tclient || !HAVESTATE(tclient)) return; propsid = GetPropertySID(SID(tclient)->ctx, propname); diff --git a/dix/property.c b/dix/property.c index 5e11b5f6c..c760ef188 100644 --- a/dix/property.c +++ b/dix/property.c @@ -230,19 +230,9 @@ ProcChangeProperty(ClientPtr client) return(BadAtom); } - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, - FindProperty(pWin, stuff->property), stuff->property, - DixWriteAccess)) - { - case XaceErrorOperation: - client->errorValue = stuff->property; - return BadAtom; - case XaceIgnoreOperation: - return Success; - } - - err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format, - (int)mode, len, (pointer)&stuff[1], TRUE); + err = dixChangeWindowProperty(client, pWin, stuff->property, stuff->type, + (int)format, (int)mode, len, &stuff[1], + TRUE); if (err != Success) return err; else @@ -250,9 +240,9 @@ ProcChangeProperty(ClientPtr client) } _X_EXPORT int -ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, - int mode, unsigned long len, pointer value, - Bool sendevent) +dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, + Atom type, int format, int mode, unsigned long len, + pointer value, Bool sendevent) { PropertyPtr pProp; xEvent event; @@ -286,12 +276,34 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, if (len) memmove((char *)data, (char *)value, totalSize); pProp->size = len; - pProp->next = pWin->optional->userProps; pProp->devPrivates = NULL; + switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, property, + DixWriteAccess)) + { + case XaceErrorOperation: + xfree(data); + xfree(pProp); + pClient->errorValue = property; + return BadAtom; + case XaceIgnoreOperation: + xfree(data); + xfree(pProp); + return Success; + } + pProp->next = pWin->optional->userProps; pWin->optional->userProps = pProp; } else { + switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, property, + DixWriteAccess)) + { + case XaceErrorOperation: + pClient->errorValue = property; + return BadAtom; + case XaceIgnoreOperation: + return Success; + } /* To append or prepend to a property the request format and type must match those of the already defined property. The existing format and type are irrelevant when using the mode @@ -357,6 +369,15 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, return(Success); } +_X_EXPORT int +ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, + int mode, unsigned long len, pointer value, + Bool sendevent) +{ + return dixChangeWindowProperty(NullClient, pWin, property, type, format, + mode, len, value, sendevent); +} + int DeleteProperty(WindowPtr pWin, Atom propName) { diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 1732d1fe4..6957f063e 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -192,6 +192,7 @@ _X_HIDDEN void *dixLookupTab[] = { #endif /* property.c */ SYMFUNC(ChangeWindowProperty) + SYMFUNC(dixChangeWindowProperty) /* extension.c */ SYMFUNC(AddExtension) SYMFUNC(AddExtensionAlias) diff --git a/include/property.h b/include/property.h index 8b6dc0912..77536aa4d 100644 --- a/include/property.h +++ b/include/property.h @@ -52,6 +52,17 @@ SOFTWARE. typedef struct _Property *PropertyPtr; +extern int dixChangeWindowProperty( + ClientPtr /*pClient*/, + WindowPtr /*pWin*/, + Atom /*property*/, + Atom /*type*/, + int /*format*/, + int /*mode*/, + unsigned long /*len*/, + pointer /*value*/, + Bool /*sendevent*/); + extern int ChangeWindowProperty( WindowPtr /*pWin*/, Atom /*property*/, From c9fb8a35332d101897607d8f06ed5a6512eac7cf Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 22 Mar 2007 17:23:26 -0400 Subject: [PATCH 053/552] dix: move access codes to separate header file, add DixCreateAccess. --- include/Makefile.am | 1 + include/dixaccess.h | 29 +++++++++++++++++++++++++++++ include/resource.h | 15 +-------------- 3 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 include/dixaccess.h diff --git a/include/Makefile.am b/include/Makefile.am index 4d8910b66..82e71905e 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -11,6 +11,7 @@ sdk_HEADERS = \ cursor.h \ cursorstr.h \ dix.h \ + dixaccess.h \ dixevents.h \ dixfont.h \ dixfontstr.h \ diff --git a/include/dixaccess.h b/include/dixaccess.h new file mode 100644 index 000000000..205b76cb1 --- /dev/null +++ b/include/dixaccess.h @@ -0,0 +1,29 @@ +/*********************************************************** + +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 NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP 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. + +******************************************************************/ + +#ifndef DIX_ACCESS_H +#define DIX_ACCESS_H + +/* These are the access modes that can be passed in the last parameter + * to several of the dix lookup functions. They were originally part + * of the Security extension, now used by XACE. + * + * You can or these values together to indicate multiple modes + * simultaneously. + */ + +#define DixUnknownAccess 0 /* don't know intentions */ +#define DixReadAccess (1<<0) /* inspecting the object */ +#define DixWriteAccess (1<<1) /* changing the object */ +#define DixDestroyAccess (1<<2) /* destroying the object */ +#define DixCreateAccess (1<<3) /* creating the object */ + +#endif /* DIX_ACCESS_H */ diff --git a/include/resource.h b/include/resource.h index 9949dd2fc..f7fa5f188 100644 --- a/include/resource.h +++ b/include/resource.h @@ -48,6 +48,7 @@ SOFTWARE. #ifndef RESOURCE_H #define RESOURCE_H 1 #include "misc.h" +#include "dixaccess.h" /***************************************************************** * STUFF FOR RESOURCES @@ -225,20 +226,6 @@ extern pointer LookupClientResourceComplex( FindComplexResType func, pointer cdata); -/* These are the access modes that can be passed in the last parameter - * to SecurityLookupIDByType/Class. The Security extension doesn't - * currently make much use of these; they're mainly provided as an - * example of what you might need for discretionary access control. - * You can or these values together to indicate multiple modes - * simultaneously. - */ - -#define DixUnknownAccess 0 /* don't know intentions */ -#define DixReadAccess (1<<0) /* inspecting the object */ -#define DixWriteAccess (1<<1) /* changing the object */ -#define DixReadWriteAccess (DixReadAccess|DixWriteAccess) -#define DixDestroyAccess (1<<2) /* destroying the object */ - extern pointer SecurityLookupIDByType( ClientPtr /*client*/, XID /*id*/, From e1cc68add0bcdd5e0e4e15cf6ee8a3da136d3534 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 22 Mar 2007 17:33:16 -0400 Subject: [PATCH 054/552] xace: drop the name argument from the property callback. --- Xext/security.c | 2 +- Xext/xace.c | 1 - Xext/xacestr.h | 2 -- Xext/xselinux.c | 2 +- dix/property.c | 14 ++++++-------- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 00180b99e..7ea032f54 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1708,7 +1708,7 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata; ClientPtr client = rec->client; WindowPtr pWin = rec->pWin; - ATOM propertyName = rec->propertyName; + ATOM propertyName = rec->pProp->propertyName; Mask access_mode = rec->access_mode; PropertyAccessPtr pacl; char action = SecurityDefaultAction; diff --git a/Xext/xace.c b/Xext/xace.c index 8e277ac81..a3c4d426e 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -96,7 +96,6 @@ int XaceHook(int hook, ...) va_arg(ap, ClientPtr), va_arg(ap, WindowPtr), va_arg(ap, PropertyPtr), - va_arg(ap, Atom), va_arg(ap, Mask), XaceAllowOperation /* default allow */ }; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 19d154021..dc1bdfcc9 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -20,7 +20,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _XACESTR_H #define _XACESTR_H -#include #include "dixstruct.h" #include "resource.h" #include "extnsionst.h" @@ -61,7 +60,6 @@ typedef struct { ClientPtr client; WindowPtr pWin; PropertyPtr pProp; - Atom propertyName; Mask access_mode; int rval; } XacePropertyAccessRec; diff --git a/Xext/xselinux.c b/Xext/xselinux.c index eb721a7c1..4ed2784e6 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1067,7 +1067,7 @@ XSELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) ClientPtr tclient; access_vector_t perm = 0; security_id_t propsid; - char *propname = NameForAtom(rec->propertyName); + char *propname = NameForAtom(rec->pProp->propertyName); tclient = wClient(pWin); if (!client || !tclient || !HAVESTATE(tclient)) diff --git a/dix/property.c b/dix/property.c index c760ef188..9ff6993e6 100644 --- a/dix/property.c +++ b/dix/property.c @@ -144,7 +144,7 @@ ProcRotateProperties(ClientPtr client) DEALLOCATE_LOCAL(props); return BadMatch; } - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, atoms[i], + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, DixReadAccess|DixWriteAccess)) { case XaceErrorOperation: @@ -277,8 +277,8 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, memmove((char *)data, (char *)value, totalSize); pProp->size = len; pProp->devPrivates = NULL; - switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, property, - DixWriteAccess)) + switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, + DixCreateAccess)) { case XaceErrorOperation: xfree(data); @@ -295,7 +295,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, } else { - switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, property, + switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, DixWriteAccess)) { case XaceErrorOperation: @@ -517,8 +517,7 @@ ProcGetProperty(ClientPtr client) if (stuff->delete) access_mode |= DixDestroyAccess; - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, - stuff->property, access_mode)) + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, access_mode)) { case XaceErrorOperation: client->errorValue = stuff->property; @@ -671,8 +670,7 @@ ProcDeleteProperty(register ClientPtr client) } switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, - FindProperty(pWin, stuff->property), stuff->property, - DixDestroyAccess)) + FindProperty(pWin, stuff->property), DixDestroyAccess)) { case XaceErrorOperation: client->errorValue = stuff->property; From 84a066cc88fe4326ddacd04ab5e1158a80571c33 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 23 Mar 2007 10:33:53 -0400 Subject: [PATCH 055/552] xace: pass serverClient as default argument to dixChangeWindowProperty instead of NullClient. --- Xext/security.c | 2 +- Xext/xselinux.c | 12 +++++++----- dix/property.c | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 7ea032f54..74ba8d42c 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1715,7 +1715,7 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, /* if client trusted or window untrusted, allow operation */ - if (!client || (TRUSTLEVEL(client) == XSecurityClientTrusted) || + if ((TRUSTLEVEL(client) == XSecurityClientTrusted) || (TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) ) return; diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 4ed2784e6..648bb6efd 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1070,7 +1070,7 @@ XSELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) char *propname = NameForAtom(rec->pProp->propertyName); tclient = wClient(pWin); - if (!client || !tclient || !HAVESTATE(tclient)) + if (!tclient || !HAVESTATE(tclient)) return; propsid = GetPropertySID(SID(tclient)->ctx, propname); @@ -1235,13 +1235,15 @@ XSELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) rc = avc_sid_to_context(SID(client), &ctx); if (rc < 0) FatalError("XSELinux: Failed to get security context!\n"); - rc = ChangeWindowProperty(pWin, atom_client_ctx, XA_STRING, 8, - PropModeReplace, strlen(ctx), ctx, FALSE); + rc = dixChangeWindowProperty(serverClient, + pWin, atom_client_ctx, XA_STRING, 8, + PropModeReplace, strlen(ctx), ctx, FALSE); freecon(ctx); } else - rc = ChangeWindowProperty(pWin, atom_client_ctx, XA_STRING, 8, - PropModeReplace, 10, "UNLABELED!", FALSE); + rc = dixChangeWindowProperty(serverClient, + pWin, atom_client_ctx, XA_STRING, 8, + PropModeReplace, 10, "UNLABELED!", FALSE); if (rc != Success) FatalError("XSELinux: Failed to set context property on window!\n"); } /* XSELinuxResourceState */ diff --git a/dix/property.c b/dix/property.c index 9ff6993e6..74d548d8e 100644 --- a/dix/property.c +++ b/dix/property.c @@ -374,7 +374,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, int mode, unsigned long len, pointer value, Bool sendevent) { - return dixChangeWindowProperty(NullClient, pWin, property, type, format, + return dixChangeWindowProperty(serverClient, pWin, property, type, format, mode, len, value, sendevent); } From 299ff4c82998d2a32204bfbecde4993dfbd3d4a5 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 28 Mar 2007 12:57:11 -0400 Subject: [PATCH 056/552] xace: provide creation-time resource hook call in CreateWindow(). --- dix/window.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dix/window.c b/dix/window.c index e4f1ae1eb..2e852099a 100644 --- a/dix/window.c +++ b/dix/window.c @@ -729,6 +729,14 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, pWin->borderWidth = bw; + /* security creation/labeling check + */ + if (!XaceHook(XACE_RESOURCE_ACCESS, wid, RT_WINDOW, DixCreateAccess, pWin)) + { + xfree(pWin); + *error = BadAccess; + return NullWindow; + } /* can't let untrusted clients have background None windows; * they make it too easy to steal window contents */ From 327bc332a61294209d39286228199f54bdde73d1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 28 Mar 2007 13:00:03 -0400 Subject: [PATCH 057/552] xace: minor comment fixes. --- Xext/xacestr.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Xext/xacestr.h b/Xext/xacestr.h index dc1bdfcc9..184fb9b0b 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -37,7 +37,6 @@ typedef struct { } XaceCoreDispatchRec; /* XACE_RESOURCE_ACCESS */ -/* XACE_RESOURCE_CREATE */ typedef struct { ClientPtr client; XID id; @@ -79,7 +78,7 @@ typedef struct { int rval; } XaceMapAccessRec; -/* XACE_EXT_DISPATCH_ACCESS */ +/* XACE_EXT_DISPATCH */ /* XACE_EXT_ACCESS */ typedef struct { ClientPtr client; From 353e19fd5e18ad55a0dd12a7b63f6af9df7bfe6b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 3 Apr 2007 14:06:02 -0400 Subject: [PATCH 058/552] devPrivates rework: zero out newly allocated private space. --- dix/privates.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/privates.c b/dix/privates.c index cc4b01601..8a39437cb 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -107,7 +107,7 @@ dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key) if (item) size += item->size; - ptr = (PrivateRec *)xalloc(size); + ptr = (PrivateRec *)xcalloc(size, 1); if (!ptr) return NULL; ptr->key = key; From 14aea12cadef647369e44639ff5024dd7034570a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 3 Apr 2007 15:23:56 -0400 Subject: [PATCH 059/552] xace: forgot one of the hook call arguments. Add it. --- dix/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/window.c b/dix/window.c index 2e852099a..9967053e0 100644 --- a/dix/window.c +++ b/dix/window.c @@ -731,7 +731,8 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, /* security creation/labeling check */ - if (!XaceHook(XACE_RESOURCE_ACCESS, wid, RT_WINDOW, DixCreateAccess, pWin)) + if (!XaceHook(XACE_RESOURCE_ACCESS, client, + wid, RT_WINDOW, DixCreateAccess, pWin)) { xfree(pWin); *error = BadAccess; From 1cb84768f376b477a08a558854609b0743f2bd29 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 3 Apr 2007 15:31:16 -0400 Subject: [PATCH 060/552] security: rewrite to use new devPrivates support. --- Xext/security.c | 75 +++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index bc92594c4..ad04045ae 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -30,6 +30,7 @@ in this Software without prior written authorization from The Open Group. #include "scrnintstr.h" #include "colormapst.h" +#include "privates.h" #include "xacestr.h" #include "securitysrv.h" #include @@ -53,23 +54,23 @@ in this Software without prior written authorization from The Open Group. static int SecurityErrorBase; /* first Security error number */ static int SecurityEventBase; /* first Security event number */ -static int securityClientPrivateIndex; -static int securityExtnsnPrivateIndex; +static devprivate_key_t stateKey; /* this is what we store as client security state */ typedef struct { + int haveState; unsigned int trustLevel; XID authId; } SecurityClientStateRec; -#define STATEVAL(extnsn) \ - ((extnsn)->devPrivates[securityExtnsnPrivateIndex].val) -#define STATEPTR(client) \ - ((client)->devPrivates[securityClientPrivateIndex].ptr) -#define TRUSTLEVEL(client) \ - (((SecurityClientStateRec*)STATEPTR(client))->trustLevel) -#define AUTHID(client) \ - (((SecurityClientStateRec*)STATEPTR(client))->authId) +#define EXTLEVEL(extnsn) ((Bool) \ + dixLookupPrivate(DEVPRIV_PTR(extnsn), &stateKey)) +#define HAVESTATE(client) (((SecurityClientStateRec *) \ + dixLookupPrivate(DEVPRIV_PTR(client), &stateKey))->haveState) +#define TRUSTLEVEL(client) (((SecurityClientStateRec *) \ + dixLookupPrivate(DEVPRIV_PTR(client), &stateKey))->trustLevel) +#define AUTHID(client)(((SecurityClientStateRec *) \ + dixLookupPrivate(DEVPRIV_PTR(client), &stateKey))->authId) static CallbackListPtr SecurityValidateGroupCallback = NULL; @@ -1149,7 +1150,7 @@ SecurityClientStateCallback(CallbackListPtr *pcbl, pointer unused, SecurityAuthorizationPtr pAuth; /* client may not have any state (bad authorization) */ - if (!STATEPTR(client)) + if (!HAVESTATE(client)) break; pAuth = (SecurityAuthorizationPtr)LookupIDByType(AUTHID(client), @@ -1185,7 +1186,7 @@ SecurityCheckMapAccess(CallbackListPtr *pcbl, pointer unused, XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; WindowPtr pWin = rec->pWin; - if (STATEPTR(rec->client) && + if (HAVESTATE(rec->client) && (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && (pWin->drawable.class == InputOnly) && pWin->parent && pWin->parent->parent && @@ -1211,7 +1212,7 @@ SecurityCheckExtAccess(CallbackListPtr *pcbl, pointer unused, XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && - !STATEVAL(rec->ext)) + !EXTLEVEL(rec->ext)) rec->rval = FALSE; } @@ -1241,7 +1242,7 @@ SecurityDeclareExtSecure(CallbackListPtr *pcbl, pointer unused, XaceDeclareExtSecureRec *rec = (XaceDeclareExtSecureRec*)calldata; /* security state for extensions is simply a boolean trust value */ - STATEVAL(rec->ext) = rec->secure; + dixSetPrivate(DEVPRIV_PTR(rec->ext), &stateKey, (pointer)rec->secure); } /**********************************************************************/ @@ -1887,29 +1888,14 @@ XSecurityOptions(argc, argv, i) void SecurityExtensionSetup(INITARGS) { - /* Allocate the client private index */ - securityClientPrivateIndex = AllocateClientPrivateIndex(); - if (!AllocateClientPrivate(securityClientPrivateIndex, - sizeof (SecurityClientStateRec))) - FatalError("SecurityExtensionSetup: Can't allocate client private.\n"); - - /* Allocate the extension private index */ - securityExtnsnPrivateIndex = AllocateExtensionPrivateIndex(); - if (!AllocateExtensionPrivate(securityExtnsnPrivateIndex, 0)) - FatalError("SecurityExtensionSetup: Can't allocate extnsn private.\n"); - - /* register callbacks */ -#define XaceRC XaceRegisterCallback - XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL); - XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL); - XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL); - XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL); - XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL); - XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL); - XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL); - XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL); - XaceRC(XACE_HOSTLIST_ACCESS, SecurityCheckHostlistAccess, NULL); - XaceRC(XACE_DECLARE_EXT_SECURE, SecurityDeclareExtSecure, NULL); + /* FIXME: this is here so it is registered before other extensions + * init themselves. This also required commit 5e946dd853a4ebc... to + * call the setup functions on each server reset. + * + * The extension security bit should be delivered in some other way, + * either in a symbol or in the module data. + */ + XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, SecurityDeclareExtSecure, 0); } /* SecurityExtensionSetup */ @@ -1939,6 +1925,10 @@ SecurityExtensionInit(INITARGS) RTEventClient |= RC_NEVERRETAIN; + /* Allocate the private storage */ + if (!dixRequestPrivate(&stateKey, sizeof(SecurityClientStateRec))) + FatalError("SecurityExtensionSetup: Can't allocate client private.\n"); + if (!AddCallback(&ClientStateCallback, SecurityClientStateCallback, NULL)) return; @@ -1955,4 +1945,15 @@ SecurityExtensionInit(INITARGS) SecurityLoadPropertyAccessList(); + /* register callbacks */ +#define XaceRC XaceRegisterCallback + XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL); + XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL); + XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL); + XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL); + XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL); + XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL); + XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL); + XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL); + XaceRC(XACE_HOSTLIST_ACCESS, SecurityCheckHostlistAccess, NULL); } /* SecurityExtensionInit */ From 63e46e4fc3e98751f2edbed9c79ef3d5dc2dadc6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 4 Apr 2007 15:59:51 -0400 Subject: [PATCH 061/552] devPrivates rework: properly free devPrivates on compatibility structures, excluding pixmap. --- dix/colormap.c | 2 ++ dix/devices.c | 2 ++ dix/dispatch.c | 2 ++ dix/extension.c | 2 ++ dix/gc.c | 2 ++ dix/main.c | 3 +++ dix/window.c | 2 ++ 7 files changed, 15 insertions(+) diff --git a/dix/colormap.c b/dix/colormap.c index 73b666971..515557030 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -63,6 +63,7 @@ SOFTWARE. #include "scrnintstr.h" #include "resource.h" #include "windowstr.h" +#include "privates.h" extern XID clientErrorValue; extern int colormapPrivateCount; @@ -474,6 +475,7 @@ FreeColormap (pointer value, XID mid) } } + dixFreePrivates(*DEVPRIV_PTR(pmap)); if (pmap->devPrivates) xfree(pmap->devPrivates); diff --git a/dix/devices.c b/dix/devices.c index e51d1b339..4a7ec4d92 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -69,6 +69,7 @@ SOFTWARE. #ifdef XKB #include #endif +#include "privates.h" #include "xace.h" #include "dispatch.h" @@ -502,6 +503,7 @@ CloseDevice(DeviceIntPtr dev) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); #endif + dixFreePrivates(*DEVPRIV_PTR(dev)); if (dev->devPrivates) xfree(dev->devPrivates); diff --git a/dix/dispatch.c b/dix/dispatch.c index 68499f1ec..4fb680fb4 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -134,6 +134,7 @@ int ProcInitialConnection(); #include "panoramiX.h" #include "panoramiXsrv.h" #endif +#include "privates.h" #include "xace.h" #ifdef XAPPGROUP #include "appgroup.h" @@ -3651,6 +3652,7 @@ CloseDownClient(ClientPtr client) #ifdef SMART_SCHEDULE SmartLastClient = NullClient; #endif + dixFreePrivates(*DEVPRIV_PTR(client)); xfree(client); while (!clients[currentMaxClients-1]) diff --git a/dix/extension.c b/dix/extension.c index 88dff15e2..b338c810d 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -59,6 +59,7 @@ SOFTWARE. #include "gcstruct.h" #include "scrnintstr.h" #include "dispatch.h" +#include "privates.h" #include "xace.h" #define EXTENSION_BASE 128 @@ -290,6 +291,7 @@ CloseDownExtensions() for (j = extensions[i]->num_aliases; --j >= 0;) xfree(extensions[i]->aliases[j]); xfree(extensions[i]->aliases); + dixFreePrivates(*DEVPRIV_PTR(extensions[i])); xfree(extensions[i]); } xfree(extensions); diff --git a/dix/gc.c b/dix/gc.c index 7a76dd99d..e7c48492f 100644 --- a/dix/gc.c +++ b/dix/gc.c @@ -61,6 +61,7 @@ SOFTWARE. #include "scrnintstr.h" #include "region.h" +#include "privates.h" #include "dix.h" #include @@ -903,6 +904,7 @@ FreeGC(pointer value, XID gid) (*pGC->funcs->DestroyGC) (pGC); if (pGC->dash != DefaultDash) xfree(pGC->dash); + dixFreePrivates(*DEVPRIV_PTR(pGC)); xfree(pGC); return(Success); } diff --git a/dix/main.c b/dix/main.c index 852cbcb62..b5db193ba 100644 --- a/dix/main.c +++ b/dix/main.c @@ -103,6 +103,7 @@ Equipment Corporation. #include "site.h" #include "dixfont.h" #include "extnsionst.h" +#include "privates.h" #ifdef XPRINT #include "DiPrint.h" #endif @@ -496,6 +497,7 @@ main(int argc, char *argv[], char *envp[]) FreeAuditTimer(); + dixFreePrivates(*DEVPRIV_PTR(serverClient)); xfree(serverClient->devPrivates); serverClient->devPrivates = NULL; @@ -801,6 +803,7 @@ FreeScreen(ScreenPtr pScreen) xfree(pScreen->WindowPrivateSizes); xfree(pScreen->GCPrivateSizes); xfree(pScreen->PixmapPrivateSizes); + dixFreePrivates(*DEVPRIV_PTR(pScreen)); xfree(pScreen->devPrivates); xfree(pScreen); } diff --git a/dix/window.c b/dix/window.c index 9967053e0..b50594797 100644 --- a/dix/window.c +++ b/dix/window.c @@ -126,6 +126,7 @@ Equipment Corporation. #ifdef XAPPGROUP #include "appgroup.h" #endif +#include "privates.h" #include "xace.h" /****** @@ -975,6 +976,7 @@ DeleteWindow(pointer value, XID wid) if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; } + dixFreePrivates(*DEVPRIV_PTR(pWin)); xfree(pWin); return Success; } From ed75b056511ccb429c48c6c55d14dc7ae79e75a3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 4 Apr 2007 12:00:15 -0400 Subject: [PATCH 062/552] dix: add new, combined resource lookup function. Move all dix lookup API deprecated so far to a new file dix/deprecated.c. Remove the deprecation warnings for the time being. --- dix/Makefile.am | 1 + dix/deprecated.c | 162 +++++++++++++++++++++++++++++++++++++ dix/dixutils.c | 65 ++------------- dix/resource.c | 88 +++++--------------- hw/xfree86/loader/dixsym.c | 22 ++--- include/dix.h | 43 +++++++--- include/resource.h | 55 ++++++++----- 7 files changed, 265 insertions(+), 171 deletions(-) create mode 100644 dix/deprecated.c diff --git a/dix/Makefile.am b/dix/Makefile.am index a1f02c1b6..ff0d5d68c 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -8,6 +8,7 @@ libdix_la_SOURCES = \ atom.c \ colormap.c \ cursor.c \ + deprecated.c \ devices.c \ dispatch.c \ dispatch.h \ diff --git a/dix/deprecated.c b/dix/deprecated.c new file mode 100644 index 000000000..2bb81190c --- /dev/null +++ b/dix/deprecated.c @@ -0,0 +1,162 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice 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 NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP 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. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "dix.h" +#include "misc.h" +#include "dixstruct.h" + +/* + * These are deprecated compatibility functions and will be marked as such + * and removed soon! + * + * Please use the noted replacements instead. + */ + +/* replaced by dixLookupWindow */ +_X_EXPORT WindowPtr +SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode) +{ + WindowPtr pWin; + int i = dixLookupWindow(&pWin, id, client, access_mode); + static int warn = 1; + if (warn > 0 && --warn) + ErrorF("Warning: LookupWindow()/SecurityLookupWindow() " + "are deprecated. Please convert your driver/module " + "to use dixLookupWindow().\n"); + return (i == Success) ? pWin : NULL; +} + +/* replaced by dixLookupWindow */ +_X_EXPORT WindowPtr +LookupWindow(XID id, ClientPtr client) +{ + return SecurityLookupWindow(id, client, DixUnknownAccess); +} + +/* replaced by dixLookupDrawable */ +_X_EXPORT pointer +SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode) +{ + DrawablePtr pDraw; + int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode); + static int warn = 1; + if (warn > 0 && --warn) + ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() " + "are deprecated. Please convert your driver/module " + "to use dixLookupDrawable().\n"); + return (i == Success) ? pDraw : NULL; +} + +/* replaced by dixLookupDrawable */ +_X_EXPORT pointer +LookupDrawable(XID id, ClientPtr client) +{ + return SecurityLookupDrawable(id, client, DixUnknownAccess); +} + +/* replaced by dixLookupClient */ +_X_EXPORT ClientPtr +LookupClient(XID id, ClientPtr client) +{ + ClientPtr pClient; + int i = dixLookupClient(&pClient, id, client, DixUnknownAccess); + static int warn = 1; + if (warn > 0 && --warn) + ErrorF("Warning: LookupClient() is deprecated. Please convert your " + "driver/module to use dixLookupClient().\n"); + return (i == Success) ? pClient : NULL; +} + +/* replaced by dixLookupResource */ +_X_EXPORT pointer +SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, + Mask access_mode) +{ + pointer retval; + int i = dixLookupResource(&retval, id, rtype, client, access_mode); + static int warn = 1; + if (warn > 0 && --warn) + ErrorF("Warning: LookupIDByType()/SecurityLookupIDByType() " + "are deprecated. Please convert your driver/module " + "to use dixLookupResource().\n"); + return (i == Success) ? retval : NULL; +} + +/* replaced by dixLookupResource */ +_X_EXPORT pointer +SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, + Mask access_mode) +{ + pointer retval; + int i = dixLookupResource(&retval, id, classes, client, access_mode); + static int warn = 1; + if (warn > 0 && --warn) + ErrorF("Warning: LookupIDByClass()/SecurityLookupIDByClass() " + "are deprecated. Please convert your driver/module " + "to use dixLookupResource().\n"); + return (i == Success) ? retval : NULL; +} + +/* replaced by dixLookupResource */ +_X_EXPORT pointer +LookupIDByType(XID id, RESTYPE rtype) +{ + return SecurityLookupIDByType(NullClient, id, rtype, DixUnknownAccess); +} + +/* replaced by dixLookupResource */ +_X_EXPORT pointer +LookupIDByClass(XID id, RESTYPE classes) +{ + return SecurityLookupIDByClass(NullClient, id, classes, DixUnknownAccess); +} + +/* end deprecated functions */ diff --git a/dix/dixutils.c b/dix/dixutils.c index 44d82c944..94e0f2cc1 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -223,8 +223,8 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, if (!XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp)) return BadDrawable; } else - pTmp = (DrawablePtr)SecurityLookupIDByClass(client, id, RC_DRAWABLE, - access); + dixLookupResource((void **)&pTmp, id, RC_DRAWABLE, client, access); + if (!pTmp) return BadDrawable; if (!((1 << pTmp->type) & (type ? type : M_DRAWABLE))) @@ -264,11 +264,12 @@ dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access) _X_EXPORT int dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) { - pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY, - DixReadAccess); + pointer pRes; int clientIndex = CLIENT_ID(rid); client->errorValue = rid; + dixLookupResource(&pRes, rid, RC_ANY, client, DixReadAccess); + if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) { *pClient = clients[clientIndex]; return Success; @@ -277,62 +278,6 @@ dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) return BadValue; } -/* - * These are deprecated compatibility functions and will be removed soon! - * Please use the new dixLookup*() functions above. - */ -_X_EXPORT _X_DEPRECATED WindowPtr -SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode) -{ - WindowPtr pWin; - int i = dixLookupWindow(&pWin, id, client, access_mode); - static int warn = 1; - if (warn-- > 0) - ErrorF("Warning: LookupWindow()/SecurityLookupWindow() " - "are deprecated. Please convert your driver/module " - "to use dixLookupWindow().\n"); - return (i == Success) ? pWin : NULL; -} - -_X_EXPORT _X_DEPRECATED WindowPtr -LookupWindow(XID id, ClientPtr client) -{ - return SecurityLookupWindow(id, client, DixUnknownAccess); -} - -_X_EXPORT _X_DEPRECATED pointer -SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode) -{ - DrawablePtr pDraw; - int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode); - static int warn = 1; - if (warn-- > 0) - ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() " - "are deprecated. Please convert your driver/module " - "to use dixLookupDrawable().\n"); - return (i == Success) ? pDraw : NULL; -} - -_X_EXPORT _X_DEPRECATED pointer -LookupDrawable(XID id, ClientPtr client) -{ - return SecurityLookupDrawable(id, client, DixUnknownAccess); -} - -_X_EXPORT _X_DEPRECATED ClientPtr -LookupClient(XID id, ClientPtr client) -{ - ClientPtr pClient; - int i = dixLookupClient(&pClient, id, client, DixUnknownAccess); - static int warn = 1; - if (warn-- > 0) - ErrorF("Warning: LookupClient() is deprecated. Please convert your " - "driver/module to use dixLookupClient().\n"); - return (i == Success) ? pClient : NULL; -} - -/* end deprecated functions */ - int AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, Bool toRoot, Bool remap) diff --git a/dix/resource.c b/dix/resource.c index 81269c3b2..7530e8665 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -899,81 +899,31 @@ LegalNewID(XID id, ClientPtr client) !LookupIDByClass(id, RC_ANY))); } -/* SecurityLookupIDByType and SecurityLookupIDByClass: - * These are the heart of the resource ID security system. They take - * two additional arguments compared to the old LookupID functions: - * the client doing the lookup, and the access mode (see resource.h). - * The resource is returned if it exists and the client is allowed access, - * else NULL is returned. - */ - -_X_EXPORT pointer -SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode) +_X_EXPORT int +dixLookupResource(pointer *result, XID id, RESTYPE rtype, + ClientPtr client, Mask mode) { - int cid; - ResourcePtr res; - pointer retval = NULL; - - if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && - clientTable[cid].buckets) - { - res = clientTable[cid].resources[Hash(cid, id)]; - - for (; res; res = res->next) - if ((res->id == id) && (res->type == rtype)) - { - retval = res->value; - break; - } - } - if (retval && client && - !XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, mode, retval)) - retval = NULL; - - return retval; -} - - -_X_EXPORT pointer -SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode) -{ - int cid; + int cid = CLIENT_ID(id); + int istype = (rtype & TypeMask) && (rtype != RC_ANY); ResourcePtr res = NULL; - pointer retval = NULL; - if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && - clientTable[cid].buckets) - { + *result = NULL; + client->errorValue = id; + + if ((cid < MAXCLIENTS) && clientTable[cid].buckets) { res = clientTable[cid].resources[Hash(cid, id)]; for (; res; res = res->next) - if ((res->id == id) && (res->type & classes)) - { - retval = res->value; + if ((res->id == id) && ((istype && res->type == rtype) || + (!istype && res->type & rtype))) break; - } } - if (retval && client && - !XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, mode, retval)) - retval = NULL; - - return retval; -} - -/* We can't replace the LookupIDByType and LookupIDByClass functions with - * macros because of compatibility with loadable servers. - */ - -_X_EXPORT pointer -LookupIDByType(XID id, RESTYPE rtype) -{ - return SecurityLookupIDByType(NullClient, id, rtype, - DixUnknownAccess); -} - -_X_EXPORT pointer -LookupIDByClass(XID id, RESTYPE classes) -{ - return SecurityLookupIDByClass(NullClient, id, classes, - DixUnknownAccess); + if (res) { + if (client && !XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, + mode, res->value)) + return BadAccess; + *result = res->value; + return Success; + } + return BadValue; } diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 2991c18fa..043f2db90 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -114,6 +114,16 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(QueryColors) /* cursor.c */ SYMFUNC(FreeCursor) + /* deprecated.c */ + SYMFUNC(LookupClient) + SYMFUNC(LookupDrawable) + SYMFUNC(LookupWindow) + SYMFUNC(SecurityLookupDrawable) + SYMFUNC(SecurityLookupWindow) + SYMFUNC(LookupIDByType) + SYMFUNC(LookupIDByClass) + SYMFUNC(SecurityLookupIDByClass) + SYMFUNC(SecurityLookupIDByType) /* devices.c */ SYMFUNC(Ones) SYMFUNC(InitButtonClassDeviceStruct) @@ -160,13 +170,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(dixLookupWindow) SYMFUNC(dixLookupClient) SYMFUNC(dixLookupGC) - /* following are deprecated */ - SYMFUNC(LookupClient) - SYMFUNC(LookupDrawable) - SYMFUNC(LookupWindow) - SYMFUNC(SecurityLookupDrawable) - SYMFUNC(SecurityLookupWindow) - /* end deprecated */ SYMFUNC(NoopDDA) SYMFUNC(QueueWorkProc) SYMFUNC(RegisterBlockAndWakeupHandlers) @@ -287,16 +290,13 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(ChangeResourceValue) SYMFUNC(CreateNewResourceClass) SYMFUNC(CreateNewResourceType) + SYMFUNC(dixLookupResource) SYMFUNC(FakeClientID) SYMFUNC(FreeResource) SYMFUNC(FreeResourceByType) SYMFUNC(GetXIDList) SYMFUNC(GetXIDRange) - SYMFUNC(LookupIDByType) - SYMFUNC(LookupIDByClass) SYMFUNC(LegalNewID) - SYMFUNC(SecurityLookupIDByClass) - SYMFUNC(SecurityLookupIDByType) SYMFUNC(FindClientResourcesByType) SYMFUNC(FindAllClientResources) SYMVAR(lastResourceType) diff --git a/include/dix.h b/include/dix.h index 798d617a9..41240b119 100644 --- a/include/dix.h +++ b/include/dix.h @@ -233,17 +233,6 @@ extern int dixLookupClient( ClientPtr client, Mask access_mode); -/* - * These are deprecated compatibility functions and will be removed soon! - * Please use the new dixLookup*() functions above. - */ -extern WindowPtr SecurityLookupWindow(XID, ClientPtr, Mask); -extern WindowPtr LookupWindow(XID, ClientPtr); -extern pointer SecurityLookupDrawable(XID, ClientPtr, Mask); -extern pointer LookupDrawable(XID, ClientPtr); -extern ClientPtr LookupClient(XID, ClientPtr); -/* end deprecated functions */ - extern void NoopDDA(void); extern int AlterSaveSetForClient( @@ -641,4 +630,36 @@ extern int xstrcasecmp(char *s1, char *s2); /* ffs.c */ extern int ffs(int i); +/* + * These are deprecated compatibility functions and will be removed soon! + * Please use the noted replacements instead. + */ + +/* replaced by dixLookupWindow */ +extern WindowPtr SecurityLookupWindow( + XID id, + ClientPtr client, + Mask access_mode); + +/* replaced by dixLookupWindow */ +extern WindowPtr LookupWindow( + XID id, + ClientPtr client); + +/* replaced by dixLookupDrawable */ +extern pointer SecurityLookupDrawable( + XID id, + ClientPtr client, + Mask access_mode); + +/* replaced by dixLookupDrawable */ +extern pointer LookupDrawable( + XID id, + ClientPtr client); + +/* replaced by dixLookupClient */ +extern ClientPtr LookupClient( + XID id, + ClientPtr client); + #endif /* DIX_H */ diff --git a/include/resource.h b/include/resource.h index f7fa5f188..d2ecfdea7 100644 --- a/include/resource.h +++ b/include/resource.h @@ -212,32 +212,18 @@ extern Bool LegalNewID( XID /*id*/, ClientPtr /*client*/); -extern pointer LookupIDByType( - XID /*id*/, - RESTYPE /*rtype*/); - -extern pointer LookupIDByClass( - XID /*id*/, - RESTYPE /*classes*/); - extern pointer LookupClientResourceComplex( ClientPtr client, RESTYPE type, FindComplexResType func, pointer cdata); -extern pointer SecurityLookupIDByType( - ClientPtr /*client*/, - XID /*id*/, - RESTYPE /*rtype*/, - Mask /*access_mode*/); - -extern pointer SecurityLookupIDByClass( - ClientPtr /*client*/, - XID /*id*/, - RESTYPE /*classes*/, - Mask /*access_mode*/); - +extern int dixLookupResource( + pointer *result, + XID id, + RESTYPE rtype, + ClientPtr client, + Mask access_mode); extern void GetXIDRange( int /*client*/, @@ -258,5 +244,34 @@ extern Atom *ResourceNames; void RegisterResourceName(RESTYPE type, char* name); #endif +/* + * These are deprecated compatibility functions and will be removed soon! + * Please use the noted replacements instead. + */ + +/* replaced by dixLookupResource */ +extern pointer SecurityLookupIDByType( + ClientPtr client, + XID id, + RESTYPE rtype, + Mask access_mode); + +/* replaced by dixLookupResource */ +extern pointer SecurityLookupIDByClass( + ClientPtr client, + XID id, + RESTYPE classes, + Mask access_mode); + +/* replaced by dixLookupResource */ +extern pointer LookupIDByType( + XID id, + RESTYPE rtype); + +/* replaced by dixLookupResource */ +extern pointer LookupIDByClass( + XID id, + RESTYPE classes); + #endif /* RESOURCE_H */ From 1d550bb2c5cb5b3e588f0e0b68a421dc1cb8bd7c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 5 Apr 2007 12:12:58 -0400 Subject: [PATCH 063/552] devPrivates rework: minor fix; use calloc and avoid initialization. --- dix/devices.c | 3 +-- dix/main.c | 13 +++++-------- dix/privates.c | 6 ++---- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 4a7ec4d92..ab64fcb04 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -128,12 +128,11 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) #endif /* must pre-allocate one private for the new devPrivates support */ dev->nPrivates = 1; - dev->devPrivates = (DevUnion *)xalloc(sizeof(DevUnion)); + dev->devPrivates = (DevUnion *)xcalloc(1, sizeof(DevUnion)); if (!dev->devPrivates) { xfree(dev); return NULL; } - dev->devPrivates[0].ptr = NULL; dev->unwrapProc = NULL; dev->coreEvents = TRUE; diff --git a/dix/main.c b/dix/main.c index b5db193ba..cae50c85d 100644 --- a/dix/main.c +++ b/dix/main.c @@ -720,20 +720,17 @@ AddScreen( /* must pre-allocate one private for the new devPrivates support */ pScreen->WindowPrivateLen = 1; - pScreen->WindowPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + pScreen->WindowPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); pScreen->totalWindowSize = PadToLong(sizeof(WindowRec)) + sizeof(DevUnion); pScreen->GCPrivateLen = 1; - pScreen->GCPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + pScreen->GCPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); pScreen->totalGCSize = PadToLong(sizeof(GC)) + sizeof(DevUnion); pScreen->PixmapPrivateLen = 1; - pScreen->PixmapPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + pScreen->PixmapPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); pScreen->totalPixmapSize = BitmapBytePad(8 * (sizeof(PixmapRec) + sizeof(DevUnion))); - if (pScreen->WindowPrivateSizes && pScreen->GCPrivateSizes && - pScreen->PixmapPrivateSizes) - *pScreen->WindowPrivateSizes = *pScreen->GCPrivateSizes = - *pScreen->PixmapPrivateSizes = 0; - else { + if (!pScreen->WindowPrivateSizes || !pScreen->GCPrivateSizes || + !pScreen->PixmapPrivateSizes) { xfree(pScreen); return -1; } diff --git a/dix/privates.c b/dix/privates.c index 8a39437cb..4cb2e358d 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -298,10 +298,9 @@ ResetExtensionPrivates() extensionPrivateCount = 1; extensionPrivateLen = 1; xfree(extensionPrivateSizes); - extensionPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + extensionPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); if (!extensionPrivateSizes) return FALSE; - *extensionPrivateSizes = 0; totalExtensionSize = PadToLong(sizeof(ExtensionEntry)) + sizeof(DevUnion); return TRUE; } @@ -358,10 +357,9 @@ ResetClientPrivates() clientPrivateCount = 1; clientPrivateLen = 1; xfree(clientPrivateSizes); - clientPrivateSizes = (unsigned *)xalloc(sizeof(unsigned)); + clientPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); if (!clientPrivateSizes) return FALSE; - *clientPrivateSizes = 0; totalClientSize = PadToLong(sizeof(ClientRec)) + sizeof(DevUnion); return TRUE; } From 5ad562565ac8ef9257da3afb0de1ae4f90f80fe9 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 5 Apr 2007 14:18:05 -0400 Subject: [PATCH 064/552] devPrivates rework: properly free devPrivates on compatibility structures, type pixmap. Requires ddx'es to call the free function from DestroyPixmap. --- afb/afb.h | 1 + afb/afbpixmap.c | 1 + cfb/cfb.h | 1 + cfb/cfbpixmap.c | 1 + fb/fb.h | 1 + fb/fbpixmap.c | 1 + hw/dmx/dmxpixmap.c | 2 ++ hw/xgl/xglpixmap.c | 1 + hw/xnest/Pixmap.c | 2 ++ hw/xprint/ps/PsPixmap.c | 8 +++++++- mfb/mfb.h | 1 + mfb/mfbpixmap.c | 1 + 12 files changed, 20 insertions(+), 1 deletion(-) diff --git a/afb/afb.h b/afb/afb.h index 5aa2b0c92..b3ed1ee3f 100644 --- a/afb/afb.h +++ b/afb/afb.h @@ -55,6 +55,7 @@ SOFTWARE. #include "gc.h" #include "colormap.h" #include "regionstr.h" +#include "privates.h" #include "mibstore.h" #include "mfb.h" diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c index 77ba53513..5a81679e8 100644 --- a/afb/afbpixmap.c +++ b/afb/afbpixmap.c @@ -113,6 +113,7 @@ afbDestroyPixmap(pPixmap) { if(--pPixmap->refcnt) return(TRUE); + dixFreePrivates(*DEVPRIV_PTR(pPixmap)); xfree(pPixmap); return(TRUE); } diff --git a/cfb/cfb.h b/cfb/cfb.h index 8c682ae8d..15332ff97 100644 --- a/cfb/cfb.h +++ b/cfb/cfb.h @@ -37,6 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "colormap.h" #include "miscstruct.h" #include "servermd.h" +#include "privates.h" #include "windowstr.h" #include "mfb.h" #undef PixelType diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index 6fdf3eae6..ed01316ed 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -107,6 +107,7 @@ cfbDestroyPixmap(pPixmap) { if(--pPixmap->refcnt) return TRUE; + dixFreePrivates(*DEVPRIV_PTR(pPixmap)); xfree(pPixmap); return TRUE; } diff --git a/fb/fb.h b/fb/fb.h index e60507874..9e88667c8 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -38,6 +38,7 @@ #include "mi.h" #include "migc.h" #include "mibstore.h" +#include "privates.h" #ifdef RENDER #include "picturestr.h" #else diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c index 18c120440..8c3216a6c 100644 --- a/fb/fbpixmap.c +++ b/fb/fbpixmap.c @@ -98,6 +98,7 @@ fbDestroyPixmap (PixmapPtr pPixmap) { if(--pPixmap->refcnt) return TRUE; + dixFreePrivates(*DEVPRIV_PTR(pPixmap)); xfree(pPixmap); return TRUE; } diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c index 934060675..e617134f1 100644 --- a/hw/dmx/dmxpixmap.c +++ b/hw/dmx/dmxpixmap.c @@ -45,6 +45,7 @@ #include "pixmapstr.h" #include "servermd.h" +#include "privates.h" /** Initialize a private area in \a pScreen for pixmap information. */ Bool dmxInitPixmap(ScreenPtr pScreen) @@ -173,6 +174,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap) dmxSync(dmxScreen, FALSE); } } + dixFreePrivates(*DEVPRIV_PTR(pPixmap)); xfree(pPixmap); #if 0 diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c index 368c3eaeb..166c33eb9 100644 --- a/hw/xgl/xglpixmap.c +++ b/hw/xgl/xglpixmap.c @@ -310,6 +310,7 @@ xglDestroyPixmap (PixmapPtr pPixmap) xglFiniPixmap (pPixmap); + dixFreePrivates(*DEVPRIV_PTR(pPixmap)); xfree (pPixmap); return TRUE; diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index 612df8dac..c4b8aa65e 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -24,6 +24,7 @@ is" without express or implied warranty. #include "regionstr.h" #include "gc.h" #include "servermd.h" +#include "privates.h" #include "mi.h" #include "Xnest.h" @@ -74,6 +75,7 @@ xnestDestroyPixmap(PixmapPtr pPixmap) if(--pPixmap->refcnt) return TRUE; XFreePixmap(xnestDisplay, xnestPixmap(pPixmap)); + dixFreePrivates(*DEVPRIV_PTR(pPixmap)); xfree(pPixmap); return TRUE; } diff --git a/hw/xprint/ps/PsPixmap.c b/hw/xprint/ps/PsPixmap.c index c3259c98c..220feab2b 100644 --- a/hw/xprint/ps/PsPixmap.c +++ b/hw/xprint/ps/PsPixmap.c @@ -79,6 +79,7 @@ in this Software without prior written authorization from The Open Group. #include "windowstr.h" #include "gcstruct.h" +#include "privates.h" #include "Ps.h" @@ -111,9 +112,13 @@ PsCreatePixmap( pPixmap->devKind = 0; pPixmap->refcnt = 1; + pPixmap->devPrivates = (DevUnion *)xcalloc(1, sizeof(DevUnion)); + if( !pPixmap->devPrivates ) + { xfree(pPixmap); return NullPixmap; } + pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec)); if( !pPixmap->devPrivate.ptr ) - { xfree(pPixmap); return NullPixmap; } + { xfree(pPixmap->devPrivates); xfree(pPixmap); return NullPixmap; } return pPixmap; } @@ -196,6 +201,7 @@ PsDestroyPixmap(PixmapPtr pPixmap) PsScrubPixmap(pPixmap); xfree(priv); + dixFreePrivates(*DEVPRIV_PTR(pPixmap)); xfree(pPixmap); return TRUE; } diff --git a/mfb/mfb.h b/mfb/mfb.h index f597b16a5..3cded7b71 100644 --- a/mfb/mfb.h +++ b/mfb/mfb.h @@ -58,6 +58,7 @@ SOFTWARE. #include "region.h" #include "gc.h" #include "colormap.h" +#include "privates.h" #include "miscstruct.h" #include "mibstore.h" diff --git a/mfb/mfbpixmap.c b/mfb/mfbpixmap.c index e34972451..b13e3af0f 100644 --- a/mfb/mfbpixmap.c +++ b/mfb/mfbpixmap.c @@ -113,6 +113,7 @@ mfbDestroyPixmap(pPixmap) { if(--pPixmap->refcnt) return TRUE; + dixFreePrivates(*DEVPRIV_PTR(pPixmap)); xfree(pPixmap); return TRUE; } From 47bd311e3dcc501cbb202ce79a55ac32e9db50f2 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 17 Apr 2007 13:46:55 -0400 Subject: [PATCH 065/552] security: remove debugging code. --- Xext/security.c | 53 ------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index ad04045ae..12e79f9a4 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1281,9 +1281,6 @@ static char *SecurityKeywords[] = { #define NUMKEYWORDS (sizeof(SecurityKeywords) / sizeof(char *)) -#undef PROPDEBUG -/*#define PROPDEBUG 1*/ - static void SecurityFreePropertyAccessList(void) { @@ -1638,32 +1635,6 @@ SecurityLoadPropertyAccessList(void) lineNumber, SecurityPolicyFile); } /* end while more input */ -#ifdef PROPDEBUG - { - PropertyAccessPtr pacl; - char *op = "aie"; - for (pacl = PropertyAccessList; pacl; pacl = pacl->next) - { - ErrorF("property %s ", NameForAtom(pacl->name)); - switch (pacl->windowRestriction) - { - case SecurityAnyWindow: ErrorF("any "); break; - case SecurityRootWindow: ErrorF("root "); break; - case SecurityWindowWithProperty: - { - ErrorF("%s ", NameForAtom(pacl->mustHaveProperty)); - if (pacl->mustHaveValue) - ErrorF(" = \"%s\" ", pacl->mustHaveValue); - - } - break; - } - ErrorF("%cr %cw %cd\n", op[pacl->readAction], - op[pacl->writeAction], op[pacl->destroyAction]); - } - } -#endif /* PROPDEBUG */ - fclose(f); } /* SecurityLoadPropertyAccessList */ @@ -1696,11 +1667,6 @@ SecurityMatchString( && (*cs == '\0') ); } /* SecurityMatchString */ -#ifdef PROPDEBUG -#include -#include -#endif - static void SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, @@ -1720,25 +1686,6 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, (TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) ) return; -#ifdef PROPDEBUG - /* For testing, it's more convenient if the property rules file gets - * reloaded whenever it changes, so we can rapidly try things without - * having to reset the server. - */ - { - struct stat buf; - static time_t lastmod = 0; - int ret = stat(SecurityPolicyFile , &buf); - if ( (ret == 0) && (buf.st_mtime > lastmod) ) - { - ErrorF("reloading property rules\n"); - SecurityFreePropertyAccessList(); - SecurityLoadPropertyAccessList(); - lastmod = buf.st_mtime; - } - } -#endif - /* If the property atom is bigger than any atoms on the list, * we know we won't find it, so don't even bother looking. */ From 9cee4ec5e6e06d23aafb302494b082c77ade4623 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 17 Apr 2007 16:01:56 -0400 Subject: [PATCH 066/552] xace: change the semantics of the return value of XACE hooks to allow arbitrary X status codes instead of just TRUE/FALSE. The dix layer in most cases still does not propagate the return value of XACE hooks back to the client, however. There is more error propagation work to do. --- Xext/security.c | 47 +++++----- Xext/xace.c | 49 +++++----- Xext/xace.h | 12 +-- Xext/xacestr.h | 20 ++--- Xext/xselinux.c | 234 +++++++++++++++++++++++++----------------------- dix/devices.c | 10 +-- dix/dispatch.c | 11 +-- dix/dixutils.c | 7 +- dix/events.c | 19 ++-- dix/extension.c | 6 +- dix/property.c | 64 +++++-------- dix/resource.c | 18 ++-- dix/window.c | 13 ++- os/access.c | 2 +- 14 files changed, 257 insertions(+), 255 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 12e79f9a4..0d46359ec 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -806,7 +806,7 @@ SecurityCheckDeviceAccess(CallbackListPtr *pcbl, pointer unused, case X_SetModifierMapping: SecurityAudit("client %d attempted request %d\n", client->index, reqtype); - rec->rval = FALSE; + rec->status = BadAccess; return; default: break; @@ -875,7 +875,7 @@ SecurityCheckDeviceAccess(CallbackListPtr *pcbl, pointer unused, else SecurityAudit("client %d attempted to access device %d (%s)\n", client->index, dev->id, devname); - rec->rval = FALSE; + rec->status = BadAccess; } return; } /* SecurityCheckDeviceAccess */ @@ -1084,7 +1084,7 @@ SecurityCheckResourceIDAccess(CallbackListPtr *pcbl, pointer unused, return; deny: SecurityAuditResourceIDAccess(client, id); - rec->rval = FALSE; /* deny access */ + rec->status = BadAccess; /* deny access */ } /* SecurityCheckResourceIDAccess */ @@ -1176,7 +1176,7 @@ SecurityCheckDrawableAccess(CallbackListPtr *pcbl, pointer unused, XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) - rec->rval = FALSE; + rec->status = BadAccess; } static void @@ -1192,7 +1192,7 @@ SecurityCheckMapAccess(CallbackListPtr *pcbl, pointer unused, pWin->parent && pWin->parent->parent && (TRUSTLEVEL(wClient(pWin->parent)) == XSecurityClientTrusted)) - rec->rval = FALSE; + rec->status = BadAccess; } static void @@ -1202,7 +1202,7 @@ SecurityCheckBackgrndAccess(CallbackListPtr *pcbl, pointer unused, XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) - rec->rval = FALSE; + rec->status = BadAccess; } static void @@ -1214,7 +1214,7 @@ SecurityCheckExtAccess(CallbackListPtr *pcbl, pointer unused, if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && !EXTLEVEL(rec->ext)) - rec->rval = FALSE; + rec->status = BadAccess; } static void @@ -1225,7 +1225,7 @@ SecurityCheckHostlistAccess(CallbackListPtr *pcbl, pointer unused, if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) { - rec->rval = FALSE; + rec->status = BadAccess; if (rec->access_mode == DixWriteAccess) SecurityAudit("client %d attempted to change host access\n", rec->client->index); @@ -1255,14 +1255,14 @@ typedef struct _PropertyAccessRec { #define SecurityAnyWindow 0 #define SecurityRootWindow 1 #define SecurityWindowWithProperty 2 - char readAction; - char writeAction; - char destroyAction; + int readAction; + int writeAction; + int destroyAction; struct _PropertyAccessRec *next; } PropertyAccessRec, *PropertyAccessPtr; static PropertyAccessPtr PropertyAccessList = NULL; -static char SecurityDefaultAction = XaceErrorOperation; +static int SecurityDefaultAction = BadAtom; static char *SecurityPolicyFile = DEFAULTPOLICYFILE; static ATOM SecurityMaxPropertyName = 0; @@ -1372,8 +1372,8 @@ SecurityParsePropertyAccessRule( { char *propname; char c; - char action = SecurityDefaultAction; - char readAction, writeAction, destroyAction; + int action = SecurityDefaultAction; + int readAction, writeAction, destroyAction; PropertyAccessPtr pacl, prev, cur; char *mustHaveProperty = NULL; char *mustHaveValue = NULL; @@ -1418,9 +1418,9 @@ SecurityParsePropertyAccessRule( { switch (c) { - case 'i': action = XaceIgnoreOperation; break; - case 'a': action = XaceAllowOperation; break; - case 'e': action = XaceErrorOperation; break; + case 'i': action = XaceIgnoreError; break; + case 'a': action = Success; break; + case 'e': action = BadAtom; break; case 'r': readAction = action; break; case 'w': writeAction = action; break; @@ -1678,7 +1678,7 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, ATOM propertyName = rec->pProp->propertyName; Mask access_mode = rec->access_mode; PropertyAccessPtr pacl; - char action = SecurityDefaultAction; + int action = SecurityDefaultAction; /* if client trusted or window untrusted, allow operation */ @@ -1757,7 +1757,7 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, * If pacl doesn't apply, something above should have * executed a continue, which will skip the follwing code. */ - action = XaceAllowOperation; + action = Success; if (access_mode & DixReadAccess) action = max(action, pacl->readAction); if (access_mode & DixWriteAccess) @@ -1768,19 +1768,18 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, } /* end for each pacl */ } /* end if propertyName <= SecurityMaxPropertyName */ - if (XaceAllowOperation != action) + if (action != Success) { /* audit the access violation */ int cid = CLIENT_ID(pWin->drawable.id); int reqtype = ((xReq *)client->requestBuffer)->reqType; - char *actionstr = (XaceIgnoreOperation == action) ? - "ignored" : "error"; + char *actionstr = (XaceIgnoreError == action) ? "ignored" : "error"; SecurityAudit("client %d attempted request %d with window 0x%x property %s (atom 0x%x) of client %d, %s\n", client->index, reqtype, pWin->drawable.id, NameForAtom(propertyName), propertyName, cid, actionstr); } /* return codes increase with strictness */ - if (action > rec->rval) - rec->rval = action; + if (action != Success) + rec->status = action; } /* SecurityCheckPropertyAccess */ diff --git a/Xext/xace.c b/Xext/xace.c index aff45d90a..46fe7bc66 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -61,10 +61,10 @@ int XaceHook(int hook, ...) case XACE_CORE_DISPATCH: { XaceCoreDispatchRec rec = { va_arg(ap, ClientPtr), - TRUE /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_RESOURCE_ACCESS: { @@ -74,10 +74,10 @@ int XaceHook(int hook, ...) va_arg(ap, RESTYPE), va_arg(ap, Mask), va_arg(ap, pointer), - TRUE /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_DEVICE_ACCESS: { @@ -85,10 +85,10 @@ int XaceHook(int hook, ...) va_arg(ap, ClientPtr), va_arg(ap, DeviceIntPtr), va_arg(ap, Bool), - TRUE /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_PROPERTY_ACCESS: { @@ -97,20 +97,20 @@ int XaceHook(int hook, ...) va_arg(ap, WindowPtr), va_arg(ap, PropertyPtr), va_arg(ap, Mask), - XaceAllowOperation /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_DRAWABLE_ACCESS: { XaceDrawableAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, DrawablePtr), - TRUE /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_MAP_ACCESS: @@ -118,10 +118,10 @@ int XaceHook(int hook, ...) XaceMapAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, WindowPtr), - TRUE /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_EXT_DISPATCH: @@ -129,20 +129,20 @@ int XaceHook(int hook, ...) XaceExtAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, ExtensionEntry*), - TRUE /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_HOSTLIST_ACCESS: { XaceHostlistAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, Mask), - TRUE /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_SELECTION_ACCESS: { @@ -150,20 +150,20 @@ int XaceHook(int hook, ...) va_arg(ap, ClientPtr), va_arg(ap, Selection*), va_arg(ap, Mask), - TRUE /* default allow */ + Success /* default allow */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_SITE_POLICY: { XaceSitePolicyRec rec = { va_arg(ap, char*), va_arg(ap, int), - FALSE /* default unrecognized */ + BadValue /* default unrecognized */ }; calldata = &rec; - prv = &rec.rval; + prv = &rec.status; break; } case XACE_DECLARE_EXT_SECURE: { @@ -271,13 +271,14 @@ static int XaceCatchDispatchProc(ClientPtr client) { REQUEST(xReq); - int major = stuff->reqType; + int rc, major = stuff->reqType; if (!ProcVector[major]) return (BadRequest); - if (!XaceHook(XACE_CORE_DISPATCH, client)) - return (BadAccess); + rc = XaceHook(XACE_CORE_DISPATCH, client); + if (rc != Success) + return rc; return client->swapped ? (* SwappedProcVector[major])(client) : @@ -294,7 +295,7 @@ XaceCatchExtProc(ClientPtr client) if (!ext || !ProcVector[major]) return (BadRequest); - if (!XaceHook(XACE_EXT_DISPATCH, client, ext)) + if (XaceHook(XACE_EXT_DISPATCH, client, ext) != Success) return (BadRequest); /* pretend extension doesn't exist */ return client->swapped ? diff --git a/Xext/xace.h b/Xext/xace.h index ec138426d..083261273 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -20,10 +20,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _XACE_H #define _XACE_H -/* Hook return codes */ -#define XaceErrorOperation 0 -#define XaceAllowOperation 1 -#define XaceIgnoreOperation 2 +/* Special value used for ignore operation. This is a deprecated feature + * only for Security extension support. Do not use in new code. + */ +#define XaceIgnoreError BadRequest #ifdef XACE @@ -97,10 +97,10 @@ extern void XaceCensorImage( /* Define calls away when XACE is not being built. */ #ifdef __GNUC__ -#define XaceHook(args...) XaceAllowOperation +#define XaceHook(args...) Success #define XaceCensorImage(args...) { ; } #else -#define XaceHook(...) XaceAllowOperation +#define XaceHook(...) Success #define XaceCensorImage(...) { ; } #endif diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 184fb9b0b..8eb74d50f 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* XACE_CORE_DISPATCH */ typedef struct { ClientPtr client; - int rval; + int status; } XaceCoreDispatchRec; /* XACE_RESOURCE_ACCESS */ @@ -43,7 +43,7 @@ typedef struct { RESTYPE rtype; Mask access_mode; pointer res; - int rval; + int status; } XaceResourceAccessRec; /* XACE_DEVICE_ACCESS */ @@ -51,7 +51,7 @@ typedef struct { ClientPtr client; DeviceIntPtr dev; Bool fromRequest; - int rval; + int status; } XaceDeviceAccessRec; /* XACE_PROPERTY_ACCESS */ @@ -60,14 +60,14 @@ typedef struct { WindowPtr pWin; PropertyPtr pProp; Mask access_mode; - int rval; + int status; } XacePropertyAccessRec; /* XACE_DRAWABLE_ACCESS */ typedef struct { ClientPtr client; DrawablePtr pDraw; - int rval; + int status; } XaceDrawableAccessRec; /* XACE_MAP_ACCESS */ @@ -75,7 +75,7 @@ typedef struct { typedef struct { ClientPtr client; WindowPtr pWin; - int rval; + int status; } XaceMapAccessRec; /* XACE_EXT_DISPATCH */ @@ -83,14 +83,14 @@ typedef struct { typedef struct { ClientPtr client; ExtensionEntry *ext; - int rval; + int status; } XaceExtAccessRec; /* XACE_HOSTLIST_ACCESS */ typedef struct { ClientPtr client; Mask access_mode; - int rval; + int status; } XaceHostlistAccessRec; /* XACE_SELECTION_ACCESS */ @@ -98,14 +98,14 @@ typedef struct { ClientPtr client; Selection *selection; Mask access_mode; - int rval; + int status; } XaceSelectionAccessRec; /* XACE_SITE_POLICY */ typedef struct { char *policyString; int len; - int rval; + int status; } XaceSitePolicyRec; /* XACE_DECLARE_EXT_SECURE */ diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 648bb6efd..3cec21bb1 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -193,7 +193,7 @@ SwapXID(ClientPtr client, XID id) * class: Security class of the server object being accessed. * perm: Permissions required on the object. * - * Returns: boolean TRUE=allowed, FALSE=denied. + * Returns: X status code. */ static int ServerPerm(ClientPtr client, @@ -211,18 +211,19 @@ ServerPerm(ClientPtr client, if (avc_has_perm(SID(client), RSID(serverClient,idx), class, perm, &AEREF(client), &auditdata) < 0) { - if (errno != EACCES) - ErrorF("ServerPerm: unexpected error %d\n", errno); - return FALSE; + if (errno == EACCES) + return BadAccess; + ErrorF("ServerPerm: unexpected error %d\n", errno); + return BadValue; } } else { ErrorF("No client state in server-perm check!\n"); - return TRUE; + return Success; } - return TRUE; + return Success; } /* @@ -234,7 +235,7 @@ ServerPerm(ClientPtr client, * class: Security class of the resource being accessed. * perm: Permissions required on the resource. * - * Returns: boolean TRUE=allowed, FALSE=denied. + * Returns: X status code. */ static int IDPerm(ClientPtr sclient, @@ -247,7 +248,7 @@ IDPerm(ClientPtr sclient, XSELinuxAuditRec auditdata; if (id == None) - return TRUE; + return Success; CheckXID(id); tclient = clients[CLIENT_ID(id)]; @@ -259,7 +260,7 @@ IDPerm(ClientPtr sclient, */ if (!tclient || !HAVESTATE(tclient) || !HAVESTATE(sclient)) { - return TRUE; + return Success; } auditdata.client = sclient; @@ -269,12 +270,13 @@ IDPerm(ClientPtr sclient, if (avc_has_perm(SID(sclient), RSID(tclient,idx), class, perm, &AEREF(sclient), &auditdata) < 0) { - if (errno != EACCES) - ErrorF("IDPerm: unexpected error %d\n", errno); - return FALSE; + if (errno == EACCES) + return BadAccess; + ErrorF("IDPerm: unexpected error %d\n", errno); + return BadValue; } - return TRUE; + return Success; } /* @@ -501,8 +503,9 @@ FreeClientState(ClientPtr client) #define REQUEST_SIZE_CHECK(client, req) \ (client->req_len >= (sizeof(req) >> 2)) #define IDPERM(client, req, field, class, perm) \ - (REQUEST_SIZE_CHECK(client,req) && \ - IDPerm(client, SwapXID(client,((req*)stuff)->field), class, perm)) + (REQUEST_SIZE_CHECK(client,req) ? \ + IDPerm(client, SwapXID(client,((req*)stuff)->field), class, perm) : \ + BadLength) static int CheckSendEventPerms(ClientPtr client) @@ -513,7 +516,7 @@ CheckSendEventPerms(ClientPtr client) /* might need type bounds checking here */ if (!REQUEST_SIZE_CHECK(client, xSendEventReq)) - return FALSE; + return BadLength; switch (stuff->event.u.u.type) { case SelectionClear: @@ -574,11 +577,11 @@ static int CheckConvertSelectionPerms(ClientPtr client) { register char n; - int rval = TRUE; + int rval = Success; REQUEST(xConvertSelectionReq); if (!REQUEST_SIZE_CHECK(client, xConvertSelectionReq)) - return FALSE; + return BadLength; if (client->swapped) { @@ -591,24 +594,26 @@ CheckConvertSelectionPerms(ClientPtr client) int i = 0; while ((i < NumCurrentSelections) && CurrentSelections[i].selection != stuff->selection) i++; - if (i < NumCurrentSelections) - rval = rval && IDPerm(client, CurrentSelections[i].window, - SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); - } - rval = rval && IDPerm(client, stuff->requestor, + if (i < NumCurrentSelections) { + rval = IDPerm(client, CurrentSelections[i].window, SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); - return rval; + if (rval != Success) + return rval; + } + } + return IDPerm(client, stuff->requestor, + SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); } static int CheckSetSelectionOwnerPerms(ClientPtr client) { register char n; - int rval = TRUE; + int rval = Success; REQUEST(xSetSelectionOwnerReq); if (!REQUEST_SIZE_CHECK(client, xSetSelectionOwnerReq)) - return FALSE; + return BadLength; if (client->swapped) { @@ -621,13 +626,15 @@ CheckSetSelectionOwnerPerms(ClientPtr client) int i = 0; while ((i < NumCurrentSelections) && CurrentSelections[i].selection != stuff->selection) i++; - if (i < NumCurrentSelections) - rval = rval && IDPerm(client, CurrentSelections[i].window, - SECCLASS_WINDOW, WINDOW__CHSELECTION); - } - rval = rval && IDPerm(client, stuff->window, + if (i < NumCurrentSelections) { + rval = IDPerm(client, CurrentSelections[i].window, + SECCLASS_WINDOW, WINDOW__CHSELECTION); + if (rval != Success) + return rval; + } + } + return IDPerm(client, stuff->window, SECCLASS_WINDOW, WINDOW__CHSELECTION); - return rval; } static void @@ -636,7 +643,7 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceCoreDispatchRec *rec = (XaceCoreDispatchRec*)calldata; ClientPtr client = rec->client; REQUEST(xReq); - Bool rval; + int rval = Success, rval2 = Success, rval3 = Success; switch(stuff->reqType) { /* Drawable class control requirements */ @@ -668,9 +675,9 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) case X_CopyArea: case X_CopyPlane: rval = IDPERM(client, xCopyAreaReq, srcDrawable, - SECCLASS_DRAWABLE, DRAWABLE__COPY) - && IDPERM(client, xCopyAreaReq, dstDrawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); + SECCLASS_DRAWABLE, DRAWABLE__COPY); + rval2 = IDPERM(client, xCopyAreaReq, dstDrawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); break; case X_GetImage: rval = IDPERM(client, xGetImageReq, drawable, @@ -712,12 +719,12 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) case X_CreateWindow: rval = IDPERM(client, xCreateWindowReq, wid, SECCLASS_WINDOW, - WINDOW__CREATE | WINDOW__SETATTR | WINDOW__MOVE) - && IDPERM(client, xCreateWindowReq, parent, - SECCLASS_WINDOW, - WINDOW__CHSTACK | WINDOW__ADDCHILD) - && IDPERM(client, xCreateWindowReq, wid, - SECCLASS_DRAWABLE, DRAWABLE__CREATE); + WINDOW__CREATE | WINDOW__SETATTR | WINDOW__MOVE); + rval2 = IDPERM(client, xCreateWindowReq, parent, + SECCLASS_WINDOW, + WINDOW__CHSTACK | WINDOW__ADDCHILD); + rval3 = IDPERM(client, xCreateWindowReq, wid, + SECCLASS_DRAWABLE, DRAWABLE__CREATE); break; case X_DeleteProperty: rval = IDPERM(client, xDeletePropertyReq, window, @@ -728,9 +735,9 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) case X_DestroySubwindows: rval = IDPERM(client, xResourceReq, id, SECCLASS_WINDOW, - WINDOW__ENUMERATE | WINDOW__UNMAP | WINDOW__DESTROY) - && IDPERM(client, xResourceReq, id, - SECCLASS_DRAWABLE, DRAWABLE__DESTROY); + WINDOW__ENUMERATE | WINDOW__UNMAP | WINDOW__DESTROY); + rval2 = IDPERM(client, xResourceReq, id, + SECCLASS_DRAWABLE, DRAWABLE__DESTROY); break; case X_GetMotionEvents: rval = IDPERM(client, xGetMotionEventsReq, window, @@ -768,26 +775,26 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) break; case X_ReparentWindow: rval = IDPERM(client, xReparentWindowReq, window, - SECCLASS_WINDOW, WINDOW__CHPARENT | WINDOW__MOVE) - && IDPERM(client, xReparentWindowReq, parent, - SECCLASS_WINDOW, WINDOW__CHSTACK | WINDOW__ADDCHILD); + SECCLASS_WINDOW, WINDOW__CHPARENT | WINDOW__MOVE); + rval2 = IDPERM(client, xReparentWindowReq, parent, + SECCLASS_WINDOW, WINDOW__CHSTACK | WINDOW__ADDCHILD); break; case X_SendEvent: rval = CheckSendEventPerms(client); break; case X_SetInputFocus: rval = IDPERM(client, xSetInputFocusReq, focus, - SECCLASS_WINDOW, WINDOW__SETFOCUS) - && ServerPerm(client, SECCLASS_XINPUT, XINPUT__SETFOCUS); + SECCLASS_WINDOW, WINDOW__SETFOCUS); + rval2 = ServerPerm(client, SECCLASS_XINPUT, XINPUT__SETFOCUS); break; case X_SetSelectionOwner: rval = CheckSetSelectionOwnerPerms(client); break; case X_TranslateCoords: rval = IDPERM(client, xTranslateCoordsReq, srcWid, - SECCLASS_WINDOW, WINDOW__GETATTR) - && IDPERM(client, xTranslateCoordsReq, dstWid, SECCLASS_WINDOW, WINDOW__GETATTR); + rval2 = IDPERM(client, xTranslateCoordsReq, dstWid, + SECCLASS_WINDOW, WINDOW__GETATTR); break; case X_UnmapWindow: case X_UnmapSubwindows: @@ -798,10 +805,10 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) break; case X_WarpPointer: rval = IDPERM(client, xWarpPointerReq, srcWid, - SECCLASS_WINDOW, WINDOW__GETATTR) - && IDPERM(client, xWarpPointerReq, dstWid, - SECCLASS_WINDOW, WINDOW__GETATTR) - && ServerPerm(client, SECCLASS_XINPUT, XINPUT__WARPPOINTER); + SECCLASS_WINDOW, WINDOW__GETATTR); + rval2 = IDPERM(client, xWarpPointerReq, dstWid, + SECCLASS_WINDOW, WINDOW__GETATTR); + rval3 = ServerPerm(client, SECCLASS_XINPUT, XINPUT__WARPPOINTER); break; /* Input class control requirements */ @@ -852,16 +859,16 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) break; case X_CopyColormapAndFree: rval = IDPERM(client, xCopyColormapAndFreeReq, mid, - SECCLASS_COLORMAP, COLORMAP__CREATE) - && IDPERM(client, xCopyColormapAndFreeReq, srcCmap, - SECCLASS_COLORMAP, - COLORMAP__READ | COLORMAP__FREE); + SECCLASS_COLORMAP, COLORMAP__CREATE); + rval2 = IDPERM(client, xCopyColormapAndFreeReq, srcCmap, + SECCLASS_COLORMAP, + COLORMAP__READ | COLORMAP__FREE); break; case X_CreateColormap: rval = IDPERM(client, xCreateColormapReq, mid, - SECCLASS_COLORMAP, COLORMAP__CREATE) - && IDPERM(client, xCreateColormapReq, window, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); + SECCLASS_COLORMAP, COLORMAP__CREATE); + rval2 = IDPERM(client, xCreateColormapReq, window, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); break; case X_FreeColormap: rval = IDPERM(client, xResourceReq, id, @@ -873,8 +880,8 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) break; case X_InstallColormap: rval = IDPERM(client, xResourceReq, id, - SECCLASS_COLORMAP, COLORMAP__INSTALL) - && ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__INSTALL); + SECCLASS_COLORMAP, COLORMAP__INSTALL); + rval2 = ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__INSTALL); break; case X_ListInstalledColormaps: rval = ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__LIST); @@ -891,8 +898,8 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) break; case X_UninstallColormap: rval = IDPERM(client, xResourceReq, id, - SECCLASS_COLORMAP, COLORMAP__UNINSTALL) - && ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__UNINSTALL); + SECCLASS_COLORMAP, COLORMAP__UNINSTALL); + rval2 = ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__UNINSTALL); break; /* Font class control requirements */ @@ -907,18 +914,18 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) SECCLASS_DRAWABLE, DRAWABLE__DRAW); break; case X_OpenFont: - rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD) - && IDPERM(client, xOpenFontReq, fid, - SECCLASS_FONT, FONT__USE); + rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD); + rval2 = IDPERM(client, xOpenFontReq, fid, + SECCLASS_FONT, FONT__USE); break; case X_PolyText8: case X_PolyText16: /* Font accesses checked through the resource manager */ - rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD) - && IDPERM(client, xPolyTextReq, gc, - SECCLASS_GC, GC__SETATTR) - && IDPERM(client, xPolyTextReq, drawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); + rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD); + rval2 = IDPERM(client, xPolyTextReq, gc, + SECCLASS_GC, GC__SETATTR); + rval3 = IDPERM(client, xPolyTextReq, drawable, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); break; /* Pixmap class control requirements */ @@ -934,19 +941,19 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Cursor class control requirements */ case X_CreateCursor: rval = IDPERM(client, xCreateCursorReq, cid, - SECCLASS_CURSOR, CURSOR__CREATE) - && IDPERM(client, xCreateCursorReq, source, - SECCLASS_DRAWABLE, DRAWABLE__DRAW) - && IDPERM(client, xCreateCursorReq, mask, - SECCLASS_DRAWABLE, DRAWABLE__COPY); + SECCLASS_CURSOR, CURSOR__CREATE); + rval2 = IDPERM(client, xCreateCursorReq, source, + SECCLASS_DRAWABLE, DRAWABLE__DRAW); + rval3 = IDPERM(client, xCreateCursorReq, mask, + SECCLASS_DRAWABLE, DRAWABLE__COPY); break; case X_CreateGlyphCursor: rval = IDPERM(client, xCreateGlyphCursorReq, cid, - SECCLASS_CURSOR, CURSOR__CREATEGLYPH) - && IDPERM(client, xCreateGlyphCursorReq, source, - SECCLASS_FONT, FONT__USE) - && IDPERM(client, xCreateGlyphCursorReq, mask, - SECCLASS_FONT, FONT__USE); + SECCLASS_CURSOR, CURSOR__CREATEGLYPH); + rval2 = IDPERM(client, xCreateGlyphCursorReq, source, + SECCLASS_FONT, FONT__USE); + rval3 = IDPERM(client, xCreateGlyphCursorReq, mask, + SECCLASS_FONT, FONT__USE); break; case X_RecolorCursor: rval = IDPERM(client, xRecolorCursorReq, cursor, @@ -970,9 +977,9 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) break; case X_CopyGC: rval = IDPERM(client, xCopyGCReq, srcGC, - SECCLASS_GC, GC__GETATTR) - && IDPERM(client, xCopyGCReq, dstGC, - SECCLASS_GC, GC__SETATTR); + SECCLASS_GC, GC__GETATTR); + rval2 = IDPERM(client, xCopyGCReq, dstGC, + SECCLASS_GC, GC__SETATTR); break; case X_FreeGC: rval = IDPERM(client, xResourceReq, id, @@ -1009,11 +1016,14 @@ XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) break; default: - rval = TRUE; break; } - if (!rval) - rec->rval = FALSE; + if (rval != Success) + rec->status = rval; + if (rval2 != Success) + rec->status = rval2; + if (rval != Success) + rec->status = rval3; } static void @@ -1050,9 +1060,10 @@ XSELinuxExtDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (avc_has_perm(SID(client), extsid, SECCLASS_XEXTENSION, perm, &AEREF(client), &auditdata) < 0) { - if (errno != EACCES) - ErrorF("ExtDispatch: unexpected error %d\n", errno); - rec->rval = FALSE; + if (errno == EACCES) + rec->status = BadAccess; + ErrorF("ExtDispatch: unexpected error %d\n", errno); + rec->status = BadValue; } } else ErrorF("No client state in extension dispatcher!\n"); @@ -1096,9 +1107,10 @@ XSELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (avc_has_perm(SID(client), propsid, SECCLASS_PROPERTY, perm, &AEREF(client), &auditdata) < 0) { - if (errno != EACCES) - ErrorF("Property: unexpected error %d\n", errno); - rec->rval = XaceIgnoreOperation; + if (errno == EACCES) + rec->status = BadAccess; + ErrorF("Property: unexpected error %d\n", errno); + rec->status = BadValue; } } else ErrorF("No client state in property callback!\n"); @@ -1114,7 +1126,7 @@ XSELinuxResLookup(CallbackListPtr *pcbl, pointer unused, pointer calldata) ClientPtr client = rec->client; REQUEST(xReq); access_vector_t perm = 0; - Bool rval = TRUE; + int rval = Success; /* serverClient requests OK */ if (client->index == 0) @@ -1145,35 +1157,35 @@ XSELinuxResLookup(CallbackListPtr *pcbl, pointer unused, pointer calldata) default: break; } - if (!rval) - rec->rval = FALSE; + if (rval != Success) + rec->status = rval; } /* XSELinuxResLookup */ static void XSELinuxMap(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; - if (!IDPerm(rec->client, rec->pWin->drawable.id, - SECCLASS_WINDOW, WINDOW__MAP)) - rec->rval = FALSE; + if (IDPerm(rec->client, rec->pWin->drawable.id, + SECCLASS_WINDOW, WINDOW__MAP) != Success) + rec->status = BadAccess; } /* XSELinuxMap */ static void XSELinuxBackgrnd(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; - if (!IDPerm(rec->client, rec->pWin->drawable.id, - SECCLASS_WINDOW, WINDOW__TRANSPARENT)) - rec->rval = FALSE; + if (IDPerm(rec->client, rec->pWin->drawable.id, + SECCLASS_WINDOW, WINDOW__TRANSPARENT) != Success) + rec->status = BadAccess; } /* XSELinuxBackgrnd */ static void XSELinuxDrawable(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; - if (!IDPerm(rec->client, rec->pDraw->id, - SECCLASS_DRAWABLE, DRAWABLE__COPY)) - rec->rval = FALSE; + if (IDPerm(rec->client, rec->pDraw->id, + SECCLASS_DRAWABLE, DRAWABLE__COPY) != Success) + rec->status = BadAccess; } /* XSELinuxDrawable */ static void @@ -1183,8 +1195,8 @@ XSELinuxHostlist(CallbackListPtr *pcbl, pointer unused, pointer calldata) access_vector_t perm = (rec->access_mode == DixReadAccess) ? XSERVER__GETHOSTLIST : XSERVER__SETHOSTLIST; - if (!ServerPerm(rec->client, SECCLASS_XSERVER, perm)) - rec->rval = FALSE; + if (ServerPerm(rec->client, SECCLASS_XSERVER, perm) != Success) + rec->status = BadAccess; } /* XSELinuxHostlist */ /* Extension callbacks */ diff --git a/dix/devices.c b/dix/devices.c index 1ce6be666..5ffa81daf 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1206,7 +1206,7 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, } } - if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + if (XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE) != Success) return BadAccess; /* None of the modifiers (old or new) may be down while we change @@ -1330,7 +1330,7 @@ ProcChangeKeyboardMapping(ClientPtr client) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { - if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + if (XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE) != Success) return BadAccess; } } @@ -1682,7 +1682,7 @@ ProcChangeKeyboardControl (ClientPtr client) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { - if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + if (XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE) != Success) return BadAccess; } } @@ -1944,10 +1944,10 @@ ProcQueryKeymap(ClientPtr client) rep.length = 2; if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) + bzero((char *)&rep.map[0], 32); + else for (i = 0; i<32; i++) rep.map[i] = down[i]; - else - bzero((char *)&rep.map[0], 32); WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); return Success; diff --git a/dix/dispatch.c b/dix/dispatch.c index 0a86dc5fe..4519d8582 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1120,7 +1120,7 @@ ProcGetSelectionOwner(ClientPtr client) reply.sequenceNumber = client->sequence; if (i < NumCurrentSelections && XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i], - DixReadAccess)) + DixReadAccess) == Success) reply.owner = CurrentSelections[i].destwindow; else reply.owner = None; @@ -1161,7 +1161,7 @@ ProcConvertSelection(ClientPtr client) if ((i < NumCurrentSelections) && (CurrentSelections[i].window != None) && XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i], - DixReadAccess)) + DixReadAccess) == Success) { event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; @@ -2276,7 +2276,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, } if (pDraw->type == DRAWABLE_WINDOW && - !XaceHook(XACE_DRAWABLE_ACCESS, client, pDraw)) + XaceHook(XACE_DRAWABLE_ACCESS, client, pDraw) != Success) { pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw); if (pVisibleRegion) @@ -3343,8 +3343,9 @@ ProcListHosts(ClientPtr client) REQUEST_SIZE_MATCH(xListHostsReq); /* untrusted clients can't list hosts */ - if (!XaceHook(XACE_HOSTLIST_ACCESS, client, DixReadAccess)) - return BadAccess; + result = XaceHook(XACE_HOSTLIST_ACCESS, client, DixReadAccess); + if (result != Success) + return result; result = GetHosts(&pdata, &nHosts, &len, &reply.enabled); if (result != Success) diff --git a/dix/dixutils.c b/dix/dixutils.c index e97a791a8..4d082cd58 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -209,6 +209,8 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, { DrawablePtr pTmp; RESTYPE rtype; + int rc; + *pDraw = NULL; client->errorValue = id; @@ -220,8 +222,9 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, /* an access check is required for cached drawables */ rtype = (type & M_WINDOW) ? RT_WINDOW : RT_PIXMAP; - if (!XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp)) - return BadDrawable; + rc = XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp); + if (rc != Success) + return rc; } else dixLookupResource((void **)&pTmp, id, RC_DRAWABLE, client, access); diff --git a/dix/events.c b/dix/events.c index bc6b6ae97..88895b5f2 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2682,7 +2682,7 @@ CheckPassiveGrabsOnWindow( (grab->confineTo->realized && BorderSizeNotEmpty(grab->confineTo)))) { - if (!XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE)) + if (XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE)) return FALSE; #ifdef XKB if (!noXkbExtension) { @@ -3529,7 +3529,7 @@ EnterLeaveEvent( xKeymapEvent ke; ClientPtr client = grab ? rClient(grab) : clients[CLIENT_ID(pWin->drawable.id)]; - if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, FALSE)) + if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, FALSE) == Success) memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31); else bzero((char *)&ke.map[0], 31); @@ -3636,7 +3636,7 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { xKeymapEvent ke; ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)]; - if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE)) + if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE) == Success) memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); else bzero((char *)&ke.map[0], 31); @@ -3924,7 +3924,7 @@ ProcSetInputFocus(client) REQUEST_SIZE_MATCH(xSetInputFocusReq); - if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) + if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) return Success; return SetInputFocus(client, inputInfo.keyboard, stuff->focus, @@ -4239,15 +4239,14 @@ ProcGrabKeyboard(ClientPtr client) REQUEST_SIZE_MATCH(xGrabKeyboardReq); - if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) - result = GrabDevice(client, inputInfo.keyboard, stuff->keyboardMode, + if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) { + result = Success; + rep.status = AlreadyGrabbed; + } else + result = GrabDevice(client, inputInfo.keyboard, stuff->keyboardMode, stuff->pointerMode, stuff->grabWindow, stuff->ownerEvents, stuff->time, KeyPressMask | KeyReleaseMask, &rep.status); - else { - result = Success; - rep.status = AlreadyGrabbed; - } if (result != Success) return result; diff --git a/dix/extension.c b/dix/extension.c index d409c3f75..ad4e697b1 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -319,7 +319,7 @@ ProcQueryExtension(ClientPtr client) else { i = FindExtension((char *)&stuff[1], stuff->nbytes); - if (i < 0 || !XaceHook(XACE_EXT_ACCESS, client, extensions[i])) + if (i < 0 || XaceHook(XACE_EXT_ACCESS, client, extensions[i])) reply.present = xFalse; else { @@ -355,7 +355,7 @@ ProcListExtensions(ClientPtr client) for (i=0; iname) + 1; @@ -370,7 +370,7 @@ ProcListExtensions(ClientPtr client) for (i=0; iname); diff --git a/dix/property.c b/dix/property.c index 8deb62180..09f9e3152 100644 --- a/dix/property.c +++ b/dix/property.c @@ -144,16 +144,12 @@ ProcRotateProperties(ClientPtr client) DEALLOCATE_LOCAL(props); return BadMatch; } - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, - DixReadAccess|DixWriteAccess)) - { - case XaceErrorOperation: + rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, + DixReadAccess|DixWriteAccess); + if (rc != Success) { DEALLOCATE_LOCAL(props); client->errorValue = atoms[i]; - return BadAtom; - case XaceIgnoreOperation: - DEALLOCATE_LOCAL(props); - return Success; + return (rc == XaceIgnoreError) ? Success : rc; } props[i] = pProp; } @@ -246,8 +242,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, { PropertyPtr pProp; xEvent event; - int sizeInBytes; - int totalSize; + int sizeInBytes, totalSize, rc; pointer data; sizeInBytes = format>>3; @@ -277,32 +272,24 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, memmove((char *)data, (char *)value, totalSize); pProp->size = len; pProp->devPrivates = NULL; - switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, - DixCreateAccess)) - { - case XaceErrorOperation: + rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, + DixCreateAccess); + if (rc != Success) { xfree(data); xfree(pProp); pClient->errorValue = property; - return BadAtom; - case XaceIgnoreOperation: - xfree(data); - xfree(pProp); - return Success; + return (rc == XaceIgnoreError) ? Success : rc; } pProp->next = pWin->optional->userProps; pWin->optional->userProps = pProp; } else { - switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, - DixWriteAccess)) - { - case XaceErrorOperation: + rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, + DixWriteAccess); + if (rc != Success) { pClient->errorValue = property; - return BadAtom; - case XaceIgnoreOperation: - return Success; + return (rc == XaceIgnoreError) ? Success : rc; } /* To append or prepend to a property the request format and type must match those of the already defined property. The @@ -471,7 +458,8 @@ int ProcGetProperty(ClientPtr client) { PropertyPtr pProp, prevProp; - unsigned long n, len, ind, rc; + unsigned long n, len, ind; + int rc; WindowPtr pWin; xGetPropertyReply reply; Mask access_mode = DixReadAccess; @@ -517,13 +505,12 @@ ProcGetProperty(ClientPtr client) if (stuff->delete) access_mode |= DixDestroyAccess; - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, access_mode)) - { - case XaceErrorOperation: + + rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, access_mode); + if (rc != Success) { client->errorValue = stuff->property; - return BadAtom;; - case XaceIgnoreOperation: - return NullPropertyReply(client, pProp->type, pProp->format, &reply); + return (rc == XaceIgnoreError) ? + NullPropertyReply(client, pProp->type, pProp->format, &reply) : rc; } /* If the request type and actual type don't match. Return the @@ -669,14 +656,11 @@ ProcDeleteProperty(ClientPtr client) return (BadAtom); } - switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, - FindProperty(pWin, stuff->property), DixDestroyAccess)) - { - case XaceErrorOperation: + result = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, + FindProperty(pWin, stuff->property), DixDestroyAccess); + if (result != Success) { client->errorValue = stuff->property; - return BadAtom;; - case XaceIgnoreOperation: - return Success; + return (result == XaceIgnoreError) ? Success : result; } result = DeleteProperty(pWin, stuff->property); diff --git a/dix/resource.c b/dix/resource.c index e1bb74f64..67124c754 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -918,12 +918,16 @@ dixLookupResource(pointer *result, XID id, RESTYPE rtype, (!istype && res->type & rtype))) break; } - if (res) { - if (client && !XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, - mode, res->value)) - return BadAccess; - *result = res->value; - return Success; + if (!res) + return BadValue; + + if (client) { + cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, + mode, res->value); + if (cid != Success) + return cid; } - return BadValue; + + *result = res->value; + return Success; } diff --git a/dix/window.c b/dix/window.c index b50594797..95b7b168c 100644 --- a/dix/window.c +++ b/dix/window.c @@ -732,17 +732,16 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, /* security creation/labeling check */ - if (!XaceHook(XACE_RESOURCE_ACCESS, client, - wid, RT_WINDOW, DixCreateAccess, pWin)) - { + *error = XaceHook(XACE_RESOURCE_ACCESS, client, wid, RT_WINDOW, + DixCreateAccess, pWin); + if (*error != Success) { xfree(pWin); - *error = BadAccess; return NullWindow; } /* can't let untrusted clients have background None windows; * they make it too easy to steal window contents */ - if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin)) + if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin) == Success) pWin->backgroundState = None; else { pWin->backgroundState = BackgroundPixel; @@ -1052,7 +1051,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) if (pixID == None) { /* can't let untrusted clients have background None windows */ - if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin)) { + if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin) == Success) { if (pWin->backgroundState == BackgroundPixmap) (*pScreen->DestroyPixmap)(pWin->background.pixmap); if (!pWin->parent) @@ -2773,7 +2772,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) return(Success); /* general check for permission to map window */ - if (!XaceHook(XACE_MAP_ACCESS, client, pWin)) + if (XaceHook(XACE_MAP_ACCESS, client, pWin) != Success) return Success; pScreen = pWin->drawable.pScreen; diff --git a/os/access.c b/os/access.c index 221b8cbcd..d9fcd4466 100644 --- a/os/access.c +++ b/os/access.c @@ -1528,7 +1528,7 @@ AuthorizedClient(ClientPtr client) return TRUE; /* untrusted clients can't change host access */ - if (!XaceHook(XACE_HOSTLIST_ACCESS, client, DixWriteAccess)) + if (XaceHook(XACE_HOSTLIST_ACCESS, client, DixWriteAccess) != Success) return FALSE; return LocalClient(client); From ddb26bccd275f4fc011f7a2be685d1ce58555a00 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 24 May 2007 12:20:24 -0400 Subject: [PATCH 067/552] dix: Add a bunch of new access codes. These were determined through an analysis of the core protocol and 35 of the most common protocol extensions. There remain four bits for future use. --- include/dixaccess.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/dixaccess.h b/include/dixaccess.h index 205b76cb1..3c62ee354 100644 --- a/include/dixaccess.h +++ b/include/dixaccess.h @@ -25,5 +25,29 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define DixWriteAccess (1<<1) /* changing the object */ #define DixDestroyAccess (1<<2) /* destroying the object */ #define DixCreateAccess (1<<3) /* creating the object */ +#define DixGetAttrAccess (1<<4) /* get object attributes */ +#define DixSetAttrAccess (1<<5) /* set object attributes */ +#define DixListPropAccess (1<<6) /* list properties of object */ +#define DixGetPropAccess (1<<7) /* get properties of object */ +#define DixSetPropAccess (1<<8) /* set properties of object */ +#define DixGetFocusAccess (1<<9) /* get focus of object */ +#define DixSetFocusAccess (1<<10) /* set focus of object */ +#define DixListAccess (1<<11) /* list objects */ +#define DixAddAccess (1<<12) /* add object */ +#define DixRemoveAccess (1<<13) /* remove object */ +#define DixHideAccess (1<<14) /* hide object */ +#define DixShowAccess (1<<15) /* show object */ +#define DixBlendAccess (1<<16) /* mix contents of objects */ +#define DixGrabAccess (1<<17) /* exclusive access to object */ +#define DixFreezeAccess (1<<18) /* freeze status of object */ +#define DixForceAccess (1<<19) /* force status of object */ +#define DixInstallAccess (1<<20) /* install object */ +#define DixUninstallAccess (1<<21) /* uninstall object */ +#define DixSendAccess (1<<22) /* send to object */ +#define DixReceiveAccess (1<<23) /* receive from object */ +#define DixUseAccess (1<<24) /* use object */ +#define DixManageAccess (1<<25) /* manage object */ +#define DixDebugAccess (1<<26) /* debug object */ +#define DixBellAccess (1<<27) /* audible sound */ #endif /* DIX_ACCESS_H */ From 793470a8356976ddd427280a738dfb6e1c0e4e70 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 4 Jun 2007 12:33:49 -0400 Subject: [PATCH 068/552] dix: fix null pointer dereference in new resource lookup function. --- dix/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/resource.c b/dix/resource.c index 67124c754..e89ad1fdd 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -908,7 +908,6 @@ dixLookupResource(pointer *result, XID id, RESTYPE rtype, ResourcePtr res = NULL; *result = NULL; - client->errorValue = id; if ((cid < MAXCLIENTS) && clientTable[cid].buckets) { res = clientTable[cid].resources[Hash(cid, id)]; @@ -922,6 +921,7 @@ dixLookupResource(pointer *result, XID id, RESTYPE rtype, return BadValue; if (client) { + client->errorValue = id; cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, mode, res->value); if (cid != Success) From 878cac71aa0018deee861b297638c0744dba631b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 11 Jun 2007 14:19:37 -0400 Subject: [PATCH 069/552] xselinux: use new libselinux support for private Flask definitions. Removes indirect dependency on kernel headers. --- Xext/xselinux.c | 42 ++++++++++++++++++++-- Xext/xselinux.h | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 2 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 3cec21bb1..cdb3b3367 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -22,8 +22,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * All rights reserved. */ -#include -#include #include #include #include @@ -96,6 +94,42 @@ static char *XSELinuxNonlocalContextDefault = NULL; extern Selection *CurrentSelections; extern int NumCurrentSelections; +/* Dynamically allocated security classes and permissions */ +static struct security_class_mapping map[] = { + { "drawable", + { "create", "destroy", "draw", "copy", "getattr", NULL }}, + { "window", + { "addchild", "create", "destroy", "map", "unmap", "chstack", + "chproplist", "chprop", "listprop", "getattr", "setattr", "setfocus", + "move", "chselection", "chparent", "ctrllife", "enumerate", + "transparent", "mousemotion", "clientcomevent", "inputevent", + "drawevent", "windowchangeevent", "windowchangerequest", + "serverchangeevent", "extensionevent", NULL }}, + { "gc", + { "create", "free", "getattr", "setattr", NULL }}, + { "font", + { "load", "free", "getattr", "use", NULL }}, + { "colormap", + { "create", "free", "install", "uninstall", "list", "read", "store", + "getattr", "setattr", NULL }}, + { "property", + { "create", "free", "read", "write", NULL }}, + { "cursor", + { "create", "createglyph", "free", "assign", "setattr", NULL }}, + { "xclient", + { "kill", NULL }}, + { "xinput", + { "lookup", "getattr", "setattr", "setfocus", "warppointer", + "activegrab", "passivegrab", "ungrab", "bell", "mousemotion", + "relabelinput", NULL }}, + { "xserver", + { "screensaver", "gethostlist", "sethostlist", "getfontpath", + "setfontpath", "getattr", "grab", "ungrab", NULL }}, + { "xextension", + { "query", "use", NULL }}, + { NULL } +}; + /* * list of classes corresponding to SIDs in the * rsid array of the security state structure (below). @@ -1851,6 +1885,10 @@ XSELinuxExtensionInit(INITARGS) return; } + if (selinux_set_mapping(map) < 0) { + FatalError("XSELinux: Failed to set up security class mapping\n"); + } + if (avc_init("xserver", NULL, &alc, NULL, NULL) < 0) { FatalError("XSELinux: Couldn't initialize SELinux userspace AVC\n"); diff --git a/Xext/xselinux.h b/Xext/xselinux.h index eff6db5f4..57fcbb20f 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -20,10 +20,103 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _XSELINUX_H #define _XSELINUX_H +/* Extension info */ #define XSELINUX_EXTENSION_NAME "SELinux" #define XSELINUX_MAJOR_VERSION 1 #define XSELINUX_MINOR_VERSION 0 #define XSELinuxNumberEvents 0 #define XSELinuxNumberErrors 0 +/* Private Flask definitions */ +#define SECCLASS_DRAWABLE 1 +#define DRAWABLE__CREATE 0x00000001UL +#define DRAWABLE__DESTROY 0x00000002UL +#define DRAWABLE__DRAW 0x00000004UL +#define DRAWABLE__COPY 0x00000008UL +#define DRAWABLE__GETATTR 0x00000010UL +#define SECCLASS_WINDOW 2 +#define WINDOW__ADDCHILD 0x00000001UL +#define WINDOW__CREATE 0x00000002UL +#define WINDOW__DESTROY 0x00000004UL +#define WINDOW__MAP 0x00000008UL +#define WINDOW__UNMAP 0x00000010UL +#define WINDOW__CHSTACK 0x00000020UL +#define WINDOW__CHPROPLIST 0x00000040UL +#define WINDOW__CHPROP 0x00000080UL +#define WINDOW__LISTPROP 0x00000100UL +#define WINDOW__GETATTR 0x00000200UL +#define WINDOW__SETATTR 0x00000400UL +#define WINDOW__SETFOCUS 0x00000800UL +#define WINDOW__MOVE 0x00001000UL +#define WINDOW__CHSELECTION 0x00002000UL +#define WINDOW__CHPARENT 0x00004000UL +#define WINDOW__CTRLLIFE 0x00008000UL +#define WINDOW__ENUMERATE 0x00010000UL +#define WINDOW__TRANSPARENT 0x00020000UL +#define WINDOW__MOUSEMOTION 0x00040000UL +#define WINDOW__CLIENTCOMEVENT 0x00080000UL +#define WINDOW__INPUTEVENT 0x00100000UL +#define WINDOW__DRAWEVENT 0x00200000UL +#define WINDOW__WINDOWCHANGEEVENT 0x00400000UL +#define WINDOW__WINDOWCHANGEREQUEST 0x00800000UL +#define WINDOW__SERVERCHANGEEVENT 0x01000000UL +#define WINDOW__EXTENSIONEVENT 0x02000000UL +#define SECCLASS_GC 3 +#define GC__CREATE 0x00000001UL +#define GC__FREE 0x00000002UL +#define GC__GETATTR 0x00000004UL +#define GC__SETATTR 0x00000008UL +#define SECCLASS_FONT 4 +#define FONT__LOAD 0x00000001UL +#define FONT__FREE 0x00000002UL +#define FONT__GETATTR 0x00000004UL +#define FONT__USE 0x00000008UL +#define SECCLASS_COLORMAP 5 +#define COLORMAP__CREATE 0x00000001UL +#define COLORMAP__FREE 0x00000002UL +#define COLORMAP__INSTALL 0x00000004UL +#define COLORMAP__UNINSTALL 0x00000008UL +#define COLORMAP__LIST 0x00000010UL +#define COLORMAP__READ 0x00000020UL +#define COLORMAP__STORE 0x00000040UL +#define COLORMAP__GETATTR 0x00000080UL +#define COLORMAP__SETATTR 0x00000100UL +#define SECCLASS_PROPERTY 6 +#define PROPERTY__CREATE 0x00000001UL +#define PROPERTY__FREE 0x00000002UL +#define PROPERTY__READ 0x00000004UL +#define PROPERTY__WRITE 0x00000008UL +#define SECCLASS_CURSOR 7 +#define CURSOR__CREATE 0x00000001UL +#define CURSOR__CREATEGLYPH 0x00000002UL +#define CURSOR__FREE 0x00000004UL +#define CURSOR__ASSIGN 0x00000008UL +#define CURSOR__SETATTR 0x00000010UL +#define SECCLASS_XCLIENT 8 +#define XCLIENT__KILL 0x00000001UL +#define SECCLASS_XINPUT 9 +#define XINPUT__LOOKUP 0x00000001UL +#define XINPUT__GETATTR 0x00000002UL +#define XINPUT__SETATTR 0x00000004UL +#define XINPUT__SETFOCUS 0x00000008UL +#define XINPUT__WARPPOINTER 0x00000010UL +#define XINPUT__ACTIVEGRAB 0x00000020UL +#define XINPUT__PASSIVEGRAB 0x00000040UL +#define XINPUT__UNGRAB 0x00000080UL +#define XINPUT__BELL 0x00000100UL +#define XINPUT__MOUSEMOTION 0x00000200UL +#define XINPUT__RELABELINPUT 0x00000400UL +#define SECCLASS_XSERVER 10 +#define XSERVER__SCREENSAVER 0x00000001UL +#define XSERVER__GETHOSTLIST 0x00000002UL +#define XSERVER__SETHOSTLIST 0x00000004UL +#define XSERVER__GETFONTPATH 0x00000008UL +#define XSERVER__SETFONTPATH 0x00000010UL +#define XSERVER__GETATTR 0x00000020UL +#define XSERVER__GRAB 0x00000040UL +#define XSERVER__UNGRAB 0x00000080UL +#define SECCLASS_XEXTENSION 11 +#define XEXTENSION__QUERY 0x00000001UL +#define XEXTENSION__USE 0x00000002UL + #endif /* _XSELINUX_H */ From 2030e9e5395be43bd8eab15b65c21ca4c2f1e619 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 21 Jun 2007 15:37:18 -0400 Subject: [PATCH 070/552] xselinux: use new libselinux support for context labeling. Remove all the config file parsing code and use the new lookup interface instead. --- Xext/xselinux.c | 591 +++--------------------------------------------- 1 file changed, 30 insertions(+), 561 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index cdb3b3367..038ec59c4 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include -#include +#include #include #include @@ -69,27 +69,13 @@ typedef struct { char *extension; /* extension name, if any */ } XSELinuxAuditRec; -/* - * Table of SELinux types for property names. - */ -static char **propertyTypes = NULL; -static int propertyTypesCount = 0; -char *XSELinuxPropertyTypeDefault = NULL; - -/* - * Table of SELinux types for each extension. - */ -static char **extensionTypes = NULL; -static int extensionTypesCount = 0; -static char *XSELinuxExtensionTypeDefault = NULL; +/* labeling handle */ +static struct selabel_handle *label_hnd; /* Atoms for SELinux window labeling properties */ Atom atom_ctx; Atom atom_client_ctx; -/* security context for non-local clients */ -static char *XSELinuxNonlocalContextDefault = NULL; - /* Selection stuff from dix */ extern Selection *CurrentSelections; extern int NumCurrentSelections; @@ -325,41 +311,22 @@ IDPerm(ClientPtr sclient, static security_id_t GetPropertySID(security_context_t base, const char *name) { - security_context_t new, result; - context_t con; + security_context_t con, result; security_id_t sid = NULL; - char **ptr, *type = NULL; - - /* make a new context-manipulation object */ - con = context_new(base); - if (!con) - goto out; /* look in the mappings of names to types */ - for (ptr = propertyTypes; *ptr; ptr+=2) - if (!strcmp(*ptr, name)) - break; - type = ptr[1]; - - /* set the role and type in the context (user unchanged) */ - if (context_type_set(con, type) || - context_role_set(con, "object_r")) - goto out2; - - /* get a context string from the context-manipulation object */ - new = context_str(con); - if (!new) - goto out2; + if (selabel_lookup(label_hnd, &con, name, SELABEL_X_PROP) < 0) + goto out; /* perform a transition to obtain the final context */ - if (security_compute_create(base, new, SECCLASS_PROPERTY, &result) < 0) + if (security_compute_create(base, con, SECCLASS_PROPERTY, &result) < 0) goto out2; /* get a SID for the context */ avc_context_to_sid(result, &sid); freecon(result); out2: - context_free(con); + freecon(con); out: return sid; } @@ -375,41 +342,26 @@ GetPropertySID(security_context_t base, const char *name) static security_id_t GetExtensionSID(const char *name) { - security_context_t base, new; - context_t con; + security_context_t base, con, result; security_id_t sid = NULL; - char **ptr, *type = NULL; /* get server context */ if (getcon(&base) < 0) goto out; - /* make a new context-manipulation object */ - con = context_new(base); - if (!con) + /* look in the mappings of names to types */ + if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EXT) < 0) goto out2; - /* look in the mappings of names to types */ - for (ptr = extensionTypes; *ptr; ptr+=2) - if (!strcmp(*ptr, name)) - break; - type = ptr[1]; - - /* set the role and type in the context (user unchanged) */ - if (context_type_set(con, type) || - context_role_set(con, "object_r")) - goto out3; - - /* get a context string from the context-manipulation object */ - new = context_str(con); - if (!new) + /* perform a transition to obtain the final context */ + if (security_compute_create(base, con, SECCLASS_XEXTENSION, &result) < 0) goto out3; /* get a SID for the context */ - avc_context_to_sid(new, &sid); - + avc_context_to_sid(result, &sid); + freecon(result); out3: - context_free(con); + freecon(con); out2: freecon(base); out: @@ -467,7 +419,7 @@ AssignServerState(void) static void AssignClientState(ClientPtr client) { - int i, needToFree = 0; + int i; security_context_t basectx, objctx; XSELinuxClientStateRec *state; @@ -481,11 +433,12 @@ AssignClientState(ClientPtr client) if (getpeercon(fd, &basectx) < 0) FatalError("Client %d: couldn't get context from socket\n", client->index); - needToFree = 1; } else /* for remote clients, need to use a default context */ - basectx = XSELinuxNonlocalContextDefault; + if (selabel_lookup(label_hnd, &basectx, NULL, SELABEL_X_CLIENT) < 0) + FatalError("Client %d: couldn't get default remote connection context\n", + client->index); /* get a SID from the context */ if (avc_context_to_sid(basectx, &state->sid) < 0) @@ -506,10 +459,9 @@ AssignClientState(ClientPtr client) freecon(objctx); } - /* mark as set up, free base context if necessary, and return */ + /* mark as set up, free base context, and return */ state->haveState = TRUE; - if (needToFree) - freecon(basectx); + freecon(basectx); } /* @@ -1294,509 +1246,26 @@ XSELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) FatalError("XSELinux: Failed to set context property on window!\n"); } /* XSELinuxResourceState */ -static char *XSELinuxKeywords[] = { -#define XSELinuxKeywordComment 0 - "#", -#define XSELinuxKeywordProperty 1 - "property", -#define XSELinuxKeywordExtension 2 - "extension", -#define XSELinuxKeywordNonlocalContext 3 - "nonlocal_context", -#define XSELinuxKeywordDefault 4 - "default" -}; - -#define NUMKEYWORDS (sizeof(XSELinuxKeywords) / sizeof(char *)) - -#ifndef __UNIXOS2__ -#define XSELinuxIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') ) -#else -#define XSELinuxIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') ) -#endif - -static char * -XSELinuxSkipWhitespace( - char *p) -{ - while (XSELinuxIsWhitespace(*p)) - p++; - return p; -} /* XSELinuxSkipWhitespace */ - -static char * -XSELinuxParseString( - char **rest) -{ - char *startOfString; - char *s = *rest; - char endChar = 0; - - s = XSELinuxSkipWhitespace(s); - - if (*s == '"' || *s == '\'') - { - endChar = *s++; - startOfString = s; - while (*s && (*s != endChar)) - s++; - } - else - { - startOfString = s; - while (*s && !XSELinuxIsWhitespace(*s)) - s++; - } - if (*s) - { - *s = '\0'; - *rest = s + 1; - return startOfString; - } - else - { - *rest = s; - return (endChar) ? NULL : startOfString; - } -} /* XSELinuxParseString */ - -static int -XSELinuxParseKeyword( - char **p) -{ - int i; - char *s = *p; - s = XSELinuxSkipWhitespace(s); - for (i = 0; i < NUMKEYWORDS; i++) - { - int len = strlen(XSELinuxKeywords[i]); - if (strncmp(s, XSELinuxKeywords[i], len) == 0) - { - *p = s + len; - return (i); - } - } - *p = s; - return -1; -} /* XSELinuxParseKeyword */ - -static Bool -XSELinuxTypeIsValid(char *typename) -{ - security_context_t base, new; - context_t con; - Bool ret = FALSE; - - /* get the server's context */ - if (getcon(&base) < 0) - goto out; - - /* make a new context-manipulation object */ - con = context_new(base); - if (!con) - goto out_free; - - /* set the role */ - if (context_role_set(con, "object_r")) - goto out_free2; - - /* set the type */ - if (context_type_set(con, typename)) - goto out_free2; - - /* get a context string - note: context_str() returns a pointer - * to the string inside the context; the returned pointer should - * not be freed - */ - new = context_str(con); - if (!new) - goto out_free2; - - /* finally, check to see if it's valid */ - if (security_check_context(new) == 0) - ret = TRUE; - -out_free2: - context_free(con); -out_free: - freecon(base); -out: - return ret; -} - -static Bool -XSELinuxParsePropertyTypeRule(char *p) -{ - int keyword; - char *propname = NULL, *propcopy = NULL; - char *typename = NULL, *typecopy = NULL; - char **newTypes; - Bool defaultPropertyType = FALSE; - - /* get property name */ - keyword = XSELinuxParseKeyword(&p); - if (keyword == XSELinuxKeywordDefault) - { - defaultPropertyType = TRUE; - } - else - { - propname = XSELinuxParseString(&p); - if (!propname || (strlen(propname) == 0)) - { - return FALSE; - } - } - - /* get the SELinux type corresponding to the property */ - typename = XSELinuxParseString(&p); - if (!typename || (strlen(typename) == 0)) - return FALSE; - - /* validate the type */ - if (XSELinuxTypeIsValid(typename) != TRUE) - return FALSE; - - /* if it's the default property, save it to append to the end of the - * property types list - */ - if (defaultPropertyType == TRUE) - { - if (XSELinuxPropertyTypeDefault != NULL) - { - return FALSE; - } - else - { - XSELinuxPropertyTypeDefault = (char *)xalloc(strlen(typename)+1); - if (!XSELinuxPropertyTypeDefault) - { - ErrorF("XSELinux: out of memory\n"); - return FALSE; - } - strcpy(XSELinuxPropertyTypeDefault, typename); - return TRUE; - } - } - - /* insert the property and type into the propertyTypes array */ - propcopy = (char *)xalloc(strlen(propname)+1); - if (!propcopy) - { - ErrorF("XSELinux: out of memory\n"); - return FALSE; - } - strcpy(propcopy, propname); - - typecopy = (char *)xalloc(strlen(typename)+1); - if (!typecopy) - { - ErrorF("XSELinux: out of memory\n"); - xfree(propcopy); - return FALSE; - } - strcpy(typecopy, typename); - - newTypes = (char **)xrealloc(propertyTypes, sizeof (char *) * ((propertyTypesCount+1) * 2)); - if (!newTypes) - { - ErrorF("XSELinux: out of memory\n"); - xfree(propcopy); - xfree(typecopy); - return FALSE; - } - - propertyTypesCount++; - - newTypes[propertyTypesCount*2 - 2] = propcopy; - newTypes[propertyTypesCount*2 - 1] = typecopy; - - propertyTypes = newTypes; - - return TRUE; -} /* XSELinuxParsePropertyTypeRule */ - -static Bool -XSELinuxParseExtensionTypeRule(char *p) -{ - int keyword; - char *extname = NULL, *extcopy = NULL; - char *typename = NULL, *typecopy = NULL; - char **newTypes; - Bool defaultExtensionType = FALSE; - - /* get extension name */ - keyword = XSELinuxParseKeyword(&p); - if (keyword == XSELinuxKeywordDefault) - { - defaultExtensionType = TRUE; - } - else - { - extname = XSELinuxParseString(&p); - if (!extname || (strlen(extname) == 0)) - { - return FALSE; - } - } - - /* get the SELinux type corresponding to the extension */ - typename = XSELinuxParseString(&p); - if (!typename || (strlen(typename) == 0)) - return FALSE; - - /* validate the type */ - if (XSELinuxTypeIsValid(typename) != TRUE) - return FALSE; - - /* if it's the default extension, save it to append to the end of the - * extension types list - */ - if (defaultExtensionType == TRUE) - { - if (XSELinuxExtensionTypeDefault != NULL) - { - return FALSE; - } - else - { - XSELinuxExtensionTypeDefault = (char *)xalloc(strlen(typename)+1); - if (!XSELinuxExtensionTypeDefault) - { - ErrorF("XSELinux: out of memory\n"); - return FALSE; - } - strcpy(XSELinuxExtensionTypeDefault, typename); - return TRUE; - } - } - - /* insert the extension and type into the extensionTypes array */ - extcopy = (char *)xalloc(strlen(extname)+1); - if (!extcopy) - { - ErrorF("XSELinux: out of memory\n"); - return FALSE; - } - strcpy(extcopy, extname); - - typecopy = (char *)xalloc(strlen(typename)+1); - if (!typecopy) - { - ErrorF("XSELinux: out of memory\n"); - xfree(extcopy); - return FALSE; - } - strcpy(typecopy, typename); - - newTypes = (char **)xrealloc(extensionTypes, sizeof(char *) *( (extensionTypesCount+1) * 2)); - if (!newTypes) - { - ErrorF("XSELinux: out of memory\n"); - xfree(extcopy); - xfree(typecopy); - return FALSE; - } - - extensionTypesCount++; - - newTypes[extensionTypesCount*2 - 2] = extcopy; - newTypes[extensionTypesCount*2 - 1] = typecopy; - - extensionTypes = newTypes; - - return TRUE; -} /* XSELinuxParseExtensionTypeRule */ - -static Bool -XSELinuxParseNonlocalContext(char *p) -{ - char *context; - - context = XSELinuxParseString(&p); - if (!context || (strlen(context) == 0)) - { - return FALSE; - } - - if (XSELinuxNonlocalContextDefault != NULL) - { - return FALSE; - } - - /* validate the context */ - if (security_check_context(context)) - { - return FALSE; - } - - XSELinuxNonlocalContextDefault = (char *)xalloc(strlen(context)+1); - if (!XSELinuxNonlocalContextDefault) - { - ErrorF("XSELinux: out of memory\n"); - return FALSE; - } - strcpy(XSELinuxNonlocalContextDefault, context); - - return TRUE; -} /* XSELinuxParseNonlocalContext */ - static Bool XSELinuxLoadConfigFile(void) { - FILE *f; - int lineNumber = 0; - char **newTypes; - Bool ret = FALSE; + struct selinux_opt options[] = { + { SELABEL_OPT_PATH, XSELINUXCONFIGFILE }, + { SELABEL_OPT_VALIDATE, (char *)1 }, + }; if (!XSELINUXCONFIGFILE) return FALSE; - /* some initial bookkeeping */ - propertyTypesCount = extensionTypesCount = 0; - propertyTypes = extensionTypes = NULL; - XSELinuxPropertyTypeDefault = XSELinuxExtensionTypeDefault = NULL; - XSELinuxNonlocalContextDefault = NULL; - -#ifndef __UNIXOS2__ - f = fopen(XSELINUXCONFIGFILE, "r"); -#else - f = fopen((char*)__XOS2RedirRoot(XSELINUXCONFIGFILE), "r"); -#endif - if (!f) - { - ErrorF("Error opening XSELinux policy file %s\n", XSELINUXCONFIGFILE); - return FALSE; - } - - while (!feof(f)) - { - char buf[200]; - Bool validLine; - char *p; - - if (!(p = fgets(buf, sizeof(buf), f))) - break; - lineNumber++; - - switch (XSELinuxParseKeyword(&p)) - { - case XSELinuxKeywordComment: - validLine = TRUE; - break; - - case XSELinuxKeywordProperty: - validLine = XSELinuxParsePropertyTypeRule(p); - break; - - case XSELinuxKeywordExtension: - validLine = XSELinuxParseExtensionTypeRule(p); - break; - - case XSELinuxKeywordNonlocalContext: - validLine = XSELinuxParseNonlocalContext(p); - break; - - default: - validLine = (*p == '\0'); - break; - } - - if (!validLine) - { - ErrorF("XSELinux: Line %d of %s is invalid\n", - lineNumber, XSELINUXCONFIGFILE); - goto out; - } - } - - /* check to make sure the default types and the nonlocal context - * were specified - */ - if (XSELinuxPropertyTypeDefault == NULL) - { - ErrorF("XSELinux: No default property type specified\n"); - goto out; - } - else if (XSELinuxExtensionTypeDefault == NULL) - { - ErrorF("XSELinux: No default extension type specified\n"); - goto out; - } - else if (XSELinuxNonlocalContextDefault == NULL) - { - ErrorF("XSELinux: No default context for non-local clients specified\n"); - goto out; - } - - /* Finally, append the default property and extension types to the - * bottoms of the propertyTypes and extensionTypes arrays, respectively. - * The 'name' of the property / extension is NULL. - */ - newTypes = (char **)xrealloc(propertyTypes, sizeof(char *) *((propertyTypesCount+1) * 2)); - if (!newTypes) - { - ErrorF("XSELinux: out of memory\n"); - goto out; - } - propertyTypesCount++; - newTypes[propertyTypesCount*2 - 2] = NULL; - newTypes[propertyTypesCount*2 - 1] = XSELinuxPropertyTypeDefault; - propertyTypes = newTypes; - - newTypes = (char **)xrealloc(extensionTypes, sizeof(char *) *((extensionTypesCount+1) * 2)); - if (!newTypes) - { - ErrorF("XSELinux: out of memory\n"); - goto out; - } - extensionTypesCount++; - newTypes[extensionTypesCount*2 - 2] = NULL; - newTypes[extensionTypesCount*2 - 1] = XSELinuxExtensionTypeDefault; - extensionTypes = newTypes; - - ret = TRUE; - -out: - fclose(f); - return ret; + label_hnd = selabel_open(SELABEL_CTX_X, options, 2); + return !!label_hnd; } /* XSELinuxLoadConfigFile */ static void XSELinuxFreeConfigData(void) { - char **ptr; - - /* Free all the memory in the table until we reach the NULL, then - * skip one past the NULL and free the default type. Then take care - * of some bookkeeping. - */ - for (ptr = propertyTypes; *ptr; ptr++) - xfree(*ptr); - ptr++; - xfree(*ptr); - - XSELinuxPropertyTypeDefault = NULL; - propertyTypesCount = 0; - - xfree(propertyTypes); - propertyTypes = NULL; - - /* ... and the same for the extension type table */ - for (ptr = extensionTypes; *ptr; ptr++) - xfree(*ptr); - ptr++; - xfree(*ptr); - - XSELinuxExtensionTypeDefault = NULL; - extensionTypesCount = 0; - - xfree(extensionTypes); - extensionTypes = NULL; - - /* finally, take care of the context for non-local connections */ - xfree(XSELinuxNonlocalContextDefault); - XSELinuxNonlocalContextDefault = NULL; + selabel_close(label_hnd); + label_hnd = NULL; } /* XSELinuxFreeConfigData */ /* Extension dispatch functions */ From 32c0dcc8c0d1edba5d7e418fd2dc916847a4f069 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 21 Jun 2007 15:39:19 -0400 Subject: [PATCH 071/552] xselinux: adjust the config file format to that expected by libselinux. This file will eventually be moved out of the X source tree. --- Xext/XSELinuxConfig | 180 +++++++++++++++++++++----------------------- 1 file changed, 85 insertions(+), 95 deletions(-) diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig index 38b78312a..66f93c56d 100644 --- a/Xext/XSELinuxConfig +++ b/Xext/XSELinuxConfig @@ -3,141 +3,131 @@ # # -# The nonlocal_context rule defines a context to be used for all clients -# connecting to the server from a remote host. The nonlocal context must -# be defined, and it must be a valid context according to the SELinux -# security policy. Only one nonlocal_context rule may be defined. +# The default client rule defines a context to be used for all clients +# connecting to the server from a remote host. # -nonlocal_context system_u:object_r:remote_xclient_t:s0 +client * system_u:object_r:remote_xclient_t:s0 # -# Property rules map a property name to a SELinux type. The type must -# be valid according to the SELinux security policy. There can be any -# number of property rules. Additionally, a default property type can be -# defined for all properties not explicitly listed. The default -# property type may not be omitted. The default rule may appear in -# any position (it need not be the last property rule listed). +# Property rules map a property name to a context. A default property +# rule indicated by an asterisk should follow all other property rules. # # Properties set by typical clients: WM, _NET_WM, etc. -property WM_NAME client_xproperty_t -property WM_CLASS client_xproperty_t -property WM_ICON_NAME client_xproperty_t -property WM_HINTS client_xproperty_t -property WM_NORMAL_HINTS client_xproperty_t -property WM_COMMAND client_xproperty_t -property WM_CLIENT_MACHINE client_xproperty_t -property WM_LOCALE_NAME client_xproperty_t -property WM_CLIENT_LEADER client_xproperty_t -property WM_STATE client_xproperty_t -property WM_PROTOCOLS client_xproperty_t -property WM_WINDOW_ROLE client_xproperty_t -property WM_TRANSIENT_FOR client_xproperty_t -property _NET_WM_NAME client_xproperty_t -property _NET_WM_ICON client_xproperty_t -property _NET_WM_ICON_NAME client_xproperty_t -property _NET_WM_PID client_xproperty_t -property _NET_WM_STATE client_xproperty_t -property _NET_WM_DESKTOP client_xproperty_t -property _NET_WM_SYNC_REQUEST_COUNTER client_xproperty_t -property _NET_WM_WINDOW_TYPE client_xproperty_t -property _NET_WM_USER_TIME client_xproperty_t -property _MOTIF_DRAG_RECEIVER_INFO client_xproperty_t -property XdndAware client_xproperty_t +property WM_NAME system_u:object_r:client_xproperty_t:s0 +property WM_CLASS system_u:object_r:client_xproperty_t:s0 +property WM_ICON_NAME system_u:object_r:client_xproperty_t:s0 +property WM_HINTS system_u:object_r:client_xproperty_t:s0 +property WM_NORMAL_HINTS system_u:object_r:client_xproperty_t:s0 +property WM_COMMAND system_u:object_r:client_xproperty_t:s0 +property WM_CLIENT_MACHINE system_u:object_r:client_xproperty_t:s0 +property WM_LOCALE_NAME system_u:object_r:client_xproperty_t:s0 +property WM_CLIENT_LEADER system_u:object_r:client_xproperty_t:s0 +property WM_STATE system_u:object_r:client_xproperty_t:s0 +property WM_PROTOCOLS system_u:object_r:client_xproperty_t:s0 +property WM_WINDOW_ROLE system_u:object_r:client_xproperty_t:s0 +property WM_TRANSIENT_FOR system_u:object_r:client_xproperty_t:s0 +property _NET_WM_NAME system_u:object_r:client_xproperty_t:s0 +property _NET_WM_ICON system_u:object_r:client_xproperty_t:s0 +property _NET_WM_ICON_NAME system_u:object_r:client_xproperty_t:s0 +property _NET_WM_PID system_u:object_r:client_xproperty_t:s0 +property _NET_WM_STATE system_u:object_r:client_xproperty_t:s0 +property _NET_WM_DESKTOP system_u:object_r:client_xproperty_t:s0 +property _NET_WM_SYNC_REQUEST_COUNTER system_u:object_r:client_xproperty_t:s0 +property _NET_WM_WINDOW_TYPE system_u:object_r:client_xproperty_t:s0 +property _NET_WM_USER_TIME system_u:object_r:client_xproperty_t:s0 +property _MOTIF_DRAG_RECEIVER_INFO system_u:object_r:client_xproperty_t:s0 +property XdndAware system_u:object_r:client_xproperty_t:s0 # Properties written by xrdb -property RESOURCE_MANAGER rm_xproperty_t -property SCREEN_RESOURCES rm_xproperty_t +property RESOURCE_MANAGER system_u:object_r:rm_xproperty_t:s0 +property SCREEN_RESOURCES system_u:object_r:rm_xproperty_t:s0 # Properties written by window managers -property _MIT_PRIORITY_COLORS wm_xproperty_t +property _MIT_PRIORITY_COLORS system_u:object_r:wm_xproperty_t:s0 # Properties used for security labeling -property _SELINUX_CLIENT_CONTEXT seclabel_xproperty_t +property _SELINUX_CLIENT_CONTEXT system_u:object_r:seclabel_xproperty_t:s0 # Properties used to communicate screen information -property XFree86_VT info_xproperty_t -property XFree86_DDC_EDID1_RAWDATA info_xproperty_t +property XFree86_VT system_u:object_r:info_xproperty_t:s0 +property XFree86_DDC_EDID1_RAWDATA system_u:object_r:info_xproperty_t:s0 # Clipboard and selection properties -property CUT_BUFFER0 clipboard_xproperty_t -property CUT_BUFFER1 clipboard_xproperty_t -property CUT_BUFFER2 clipboard_xproperty_t -property CUT_BUFFER3 clipboard_xproperty_t -property CUT_BUFFER4 clipboard_xproperty_t -property CUT_BUFFER5 clipboard_xproperty_t -property CUT_BUFFER6 clipboard_xproperty_t -property CUT_BUFFER7 clipboard_xproperty_t -property _XT_SELECTION_0 clipboard_xproperty_t +property CUT_BUFFER0 system_u:object_r:clipboard_xproperty_t:s0 +property CUT_BUFFER1 system_u:object_r:clipboard_xproperty_t:s0 +property CUT_BUFFER2 system_u:object_r:clipboard_xproperty_t:s0 +property CUT_BUFFER3 system_u:object_r:clipboard_xproperty_t:s0 +property CUT_BUFFER4 system_u:object_r:clipboard_xproperty_t:s0 +property CUT_BUFFER5 system_u:object_r:clipboard_xproperty_t:s0 +property CUT_BUFFER6 system_u:object_r:clipboard_xproperty_t:s0 +property CUT_BUFFER7 system_u:object_r:clipboard_xproperty_t:s0 +property _XT_SELECTION_0 system_u:object_r:clipboard_xproperty_t:s0 # Default fallback type -property default unknown_xproperty_t +property * system_u:object_r:unknown_xproperty_t:s0 # -# Extension rules map an extension name to a SELinux type. The type must -# be valid according to the SELinux security policy. There can be any -# number of extension rules. Additionally, a default extension type can -# be defined for all extensions not explicitly listed. The default -# extension type may not be omitted. The default rule may appear in -# any position (it need not be the last extension rule listed). +# Extension rules map an extension name to a context. A default extension +# rule indicated by an asterisk should follow all other extension rules. # # Standard extensions -extension BIG-REQUESTS std_xext_t -extension DOUBLE-BUFFER std_xext_t -extension Extended-Visual-Information std_xext_t -extension MIT-SUNDRY-NONSTANDARD std_xext_t -extension SHAPE std_xext_t -extension SYNC std_xext_t -extension XC-MISC std_xext_t -extension XFIXES std_xext_t -extension XFree86-Misc std_xext_t -extension XpExtension std_xext_t +extension BIG-REQUESTS system_u:object_r:std_xext_t:s0 +extension DOUBLE-BUFFER system_u:object_r:std_xext_t:s0 +extension Extended-Visual-Information system_u:object_r:std_xext_t:s0 +extension MIT-SUNDRY-NONSTANDARD system_u:object_r:std_xext_t:s0 +extension SHAPE system_u:object_r:std_xext_t:s0 +extension SYNC system_u:object_r:std_xext_t:s0 +extension XC-MISC system_u:object_r:std_xext_t:s0 +extension XFIXES system_u:object_r:std_xext_t:s0 +extension XFree86-Misc system_u:object_r:std_xext_t:s0 +extension XpExtension system_u:object_r:std_xext_t:s0 # Screen management and multihead extensions -extension RANDR output_xext_t -extension XINERAMA std_xext_t +extension RANDR system_u:object_r:output_xext_t:s0 +extension XINERAMA system_u:object_r:std_xext_t:s0 # Input extensions -extension XInputExtension input_xext_t -extension XKEYBOARD input_xext_t +extension XInputExtension system_u:object_r:input_xext_t:s0 +extension XKEYBOARD system_u:object_r:input_xext_t:s0 # Screensaver, power management extensions -extension DPMS screensaver_xext_t -extension MIT-SCREEN-SAVER screensaver_xext_t +extension DPMS system_u:object_r:screensaver_xext_t:s0 +extension MIT-SCREEN-SAVER system_u:object_r:screensaver_xext_t:s0 # Fonting extensions -extension FontCache font_xext_t -extension XFree86-Bigfont font_xext_t +extension FontCache system_u:object_r:font_xext_t:s0 +extension XFree86-Bigfont system_u:object_r:font_xext_t:s0 # Shared memory extensions -extension MIT-SHM shmem_xext_t +extension MIT-SHM system_u:object_r:shmem_xext_t:s0 # Accelerated graphics, OpenGL, direct rendering extensions -extension DAMAGE accelgraphics_xext_t -extension GLX accelgraphics_xext_t -extension NV-CONTROL accelgraphics_xext_t -extension NV-GLX accelgraphics_xext_t -extension NVIDIA-GLX accelgraphics_xext_t -extension RENDER std_xext_t -extension XFree86-DGA accelgraphics_xext_t +extension DAMAGE system_u:object_r:accelgraphics_xext_t:s0 +extension GLX system_u:object_r:accelgraphics_xext_t:s0 +extension NV-CONTROL system_u:object_r:accelgraphics_xext_t:s0 +extension NV-GLX system_u:object_r:accelgraphics_xext_t:s0 +extension NVIDIA-GLX system_u:object_r:accelgraphics_xext_t:s0 +extension RENDER system_u:object_r:std_xext_t:s0 +extension XFree86-DGA system_u:object_r:accelgraphics_xext_t:s0 # Debugging, testing, and recording extensions -extension RECORD debug_xext_t -extension X-Resource debug_xext_t -extension XTEST debug_xext_t +extension RECORD system_u:object_r:debug_xext_t:s0 +extension X-Resource system_u:object_r:debug_xext_t:s0 +extension XTEST system_u:object_r:debug_xext_t:s0 # Extensions just for window managers -extension TOG-CUP windowmgr_xext_t +extension TOG-CUP system_u:object_r:windowmgr_xext_t:s0 # Security-related extensions -extension SECURITY security_xext_t -extension SELinux security_xext_t -extension XAccessControlExtension security_xext_t -extension XC-APPGROUP security_xext_t +extension SECURITY system_u:object_r:security_xext_t:s0 +extension SELinux system_u:object_r:security_xext_t:s0 +extension XAccessControlExtension system_u:object_r:security_xext_t:s0 +extension XC-APPGROUP system_u:object_r:security_xext_t:s0 # Video extensions -extension XFree86-VidModeExtension video_xext_t -extension XVideo video_xext_t -extension XVideo-MotionCompensation video_xext_t +extension XFree86-VidModeExtension system_u:object_r:video_xext_t:s0 +extension XVideo system_u:object_r:video_xext_t:s0 +extension XVideo-MotionCompensation system_u:object_r:video_xext_t:s0 # Default fallback type -extension default unknown_xext_t +extension * system_u:object_r:unknown_xext_t:s0 From d445d2f22b5c97fa010370f4ba9cb0555df4a853 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 3 Aug 2007 10:56:18 -0400 Subject: [PATCH 072/552] security: drop the "declare extension security" dix call. Use the SecurityPolicy configuration file instead. --- Xext/SecurityPolicy | 5 ++ Xext/bigreq.c | 2 - Xext/security.c | 102 +++++++++++++++++----------- Xext/xcmisc.c | 2 - Xext/xprint.c | 1 - dix/extension.c | 8 --- hw/xfree86/dixmods/extmod/modinit.h | 1 - hw/xfree86/loader/dixsym.c | 1 - include/extnsionst.h | 4 -- mi/miinitext.c | 6 +- 10 files changed, 67 insertions(+), 65 deletions(-) diff --git a/Xext/SecurityPolicy b/Xext/SecurityPolicy index cc521c263..0000c5a8f 100644 --- a/Xext/SecurityPolicy +++ b/Xext/SecurityPolicy @@ -86,3 +86,8 @@ property XDCCC_GRAY_CORRECTION root ar # To let untrusted clients use the overlay visuals that many vendors # support, include this line. property SERVER_OVERLAY_VISUALS root ar + +# Only trusted extensions can be used by untrusted clients +trust extension XC-MISC +trust extension BIG-REQUESTS +trust extension XpExtension diff --git a/Xext/bigreq.c b/Xext/bigreq.c index fcd848aec..d38879079 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -66,8 +66,6 @@ BigReqExtensionInit(INITARGS) ProcBigReqDispatch, ProcBigReqDispatch, BigReqResetProc, StandardMinorOpcode); #endif - - DeclareExtensionSecurity(XBigReqExtensionName, TRUE); } /*ARGSUSED*/ diff --git a/Xext/security.c b/Xext/security.c index b6df61a61..b1c0ce008 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -63,8 +63,6 @@ typedef struct { XID authId; } SecurityClientStateRec; -#define EXTLEVEL(extnsn) ((Bool) \ - dixLookupPrivate(DEVPRIV_PTR(extnsn), &stateKey)) #define HAVESTATE(client) (((SecurityClientStateRec *) \ dixLookupPrivate(DEVPRIV_PTR(client), &stateKey))->haveState) #define TRUSTLEVEL(client) (((SecurityClientStateRec *) \ @@ -74,6 +72,9 @@ typedef struct { static CallbackListPtr SecurityValidateGroupCallback = NULL; +static char **SecurityTrustedExtensions = NULL; +static int nSecurityTrustedExtensions = 0; + RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */ static RESTYPE RTEventClient; @@ -1210,10 +1211,13 @@ SecurityCheckExtAccess(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; + int i, trusted = 0; - if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && - !EXTLEVEL(rec->ext)) + for (i = 0; i < nSecurityTrustedExtensions; i++) + if (!strcmp(SecurityTrustedExtensions[i], rec->ext->name)) + trusted = 1; + if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && !trusted) rec->status = BadAccess; } @@ -1235,16 +1239,6 @@ SecurityCheckHostlistAccess(CallbackListPtr *pcbl, pointer unused, } } -static void -SecurityDeclareExtSecure(CallbackListPtr *pcbl, pointer unused, - pointer calldata) -{ - XaceDeclareExtSecureRec *rec = (XaceDeclareExtSecureRec*)calldata; - - /* security state for extensions is simply a boolean trust value */ - dixSetPrivate(DEVPRIV_PTR(rec->ext), &stateKey, (pointer)rec->secure); -} - /**********************************************************************/ typedef struct _PropertyAccessRec { @@ -1276,7 +1270,9 @@ static char *SecurityKeywords[] = { #define SecurityKeywordRoot 3 "root", #define SecurityKeywordAny 4 - "any" + "any", +#define SecurityKeywordExtension 5 + "trust extension", }; #define NUMKEYWORDS (sizeof(SecurityKeywords) / sizeof(char *)) @@ -1500,6 +1496,36 @@ SecurityParsePropertyAccessRule( return TRUE; } /* SecurityParsePropertyAccessRule */ +static Bool +SecurityParseExtensionRule( + char *p) +{ + char *extName = SecurityParseString(&p); + char *copyExtName; + char **newStrings; + + if (!extName) + return FALSE; + + copyExtName = (char *)Xalloc(strlen(extName) + 1); + if (!copyExtName) + return TRUE; + strcpy(copyExtName, extName); + newStrings = (char **)Xrealloc(SecurityTrustedExtensions, + sizeof (char *) * (nSecurityTrustedExtensions + 1)); + if (!newStrings) + { + Xfree(copyExtName); + return TRUE; + } + + SecurityTrustedExtensions = newStrings; + SecurityTrustedExtensions[nSecurityTrustedExtensions++] = copyExtName; + + return TRUE; + +} /* SecurityParseExtensionRule */ + static char **SecurityPolicyStrings = NULL; static int nSecurityPolicyStrings = 0; @@ -1558,6 +1584,21 @@ SecurityFreeSitePolicyStrings(void) } } /* SecurityFreeSitePolicyStrings */ +static void +SecurityFreeTrustedExtensionStrings(void) +{ + if (SecurityTrustedExtensions) + { + assert(nSecurityTrustedExtensions); + while (nSecurityTrustedExtensions--) + { + Xfree(SecurityTrustedExtensions[nSecurityTrustedExtensions]); + } + Xfree(SecurityTrustedExtensions); + SecurityTrustedExtensions = NULL; + nSecurityTrustedExtensions = 0; + } +} /* SecurityFreeSiteTrustedExtensions */ static void SecurityLoadPropertyAccessList(void) @@ -1616,6 +1657,10 @@ SecurityLoadPropertyAccessList(void) validLine = SecurityParseSitePolicy(p); break; + case SecurityKeywordExtension: + validLine = SecurityParseExtensionRule(p); + break; + default: validLine = (*p == '\0'); /* blank lines OK, others not */ break; @@ -1791,6 +1836,7 @@ SecurityResetProc( ExtensionEntry *extEntry) { SecurityFreePropertyAccessList(); + SecurityFreeTrustedExtensionStrings(); SecurityFreeSitePolicyStrings(); } /* SecurityResetProc */ @@ -1811,32 +1857,6 @@ XSecurityOptions(argc, argv, i) } /* XSecurityOptions */ -/* SecurityExtensionSetup - * - * Arguments: none. - * - * Returns: nothing. - * - * Side Effects: - * Sets up the Security extension if possible. - * This function contains things that need to be done - * before any other extension init functions get called. - */ - -void -SecurityExtensionSetup(INITARGS) -{ - /* FIXME: this is here so it is registered before other extensions - * init themselves. This also required commit 5e946dd853a4ebc... to - * call the setup functions on each server reset. - * - * The extension security bit should be delivered in some other way, - * either in a symbol or in the module data. - */ - XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, SecurityDeclareExtSecure, 0); -} /* SecurityExtensionSetup */ - - /* SecurityExtensionInit * * Arguments: none. diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 8c7a86e6a..d9a7f100d 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -80,8 +80,6 @@ XCMiscExtensionInit(INITARGS) ProcXCMiscDispatch, SProcXCMiscDispatch, XCMiscResetProc, StandardMinorOpcode); #endif - - DeclareExtensionSecurity(XCMiscExtensionName, TRUE); } /*ARGSUSED*/ diff --git a/Xext/xprint.c b/Xext/xprint.c index 4ac13e6d1..ff739c0e7 100644 --- a/Xext/xprint.c +++ b/Xext/xprint.c @@ -335,7 +335,6 @@ XpExtensionInit(INITARGS) screenInfo.screens[i]->CloseScreen = XpCloseScreen; } } - DeclareExtensionSecurity(XP_PRINTNAME, TRUE); } static void diff --git a/dix/extension.c b/dix/extension.c index ad4e697b1..ec47ef19c 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -250,14 +250,6 @@ GetExtensionEntry(int major) return extensions[major]; } -_X_EXPORT void -DeclareExtensionSecurity(char *extname, Bool secure) -{ - int i = FindExtension(extname, strlen(extname)); - if (i >= 0) - XaceHook(XACE_DECLARE_EXT_SECURE, extensions[i], secure); -} - _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr client) { diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index 131b9e6e6..fb75092c7 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -135,7 +135,6 @@ extern void XSELinuxExtensionInit(INITARGS); #endif #if 1 -extern void SecurityExtensionSetup(INITARGS); extern void SecurityExtensionInit(INITARGS); #endif diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 043f2db90..1af076b88 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -200,7 +200,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(AddExtension) SYMFUNC(AddExtensionAlias) SYMFUNC(CheckExtension) - SYMFUNC(DeclareExtensionSecurity) SYMFUNC(MinorOpcodeOfRequest) SYMFUNC(StandardMinorOpcode) #ifdef XEVIE diff --git a/include/extnsionst.h b/include/extnsionst.h index 28ae1d539..58bf0a206 100644 --- a/include/extnsionst.h +++ b/include/extnsionst.h @@ -107,9 +107,5 @@ extern Bool AddExtensionAlias( extern ExtensionEntry *CheckExtension(const char *extname); extern ExtensionEntry *GetExtensionEntry(int major); -extern void DeclareExtensionSecurity( - char * /*extname*/, - Bool /*secure*/); - #endif /* EXTENSIONSTRUCT_H */ diff --git a/mi/miinitext.c b/mi/miinitext.c index f14254051..964ef3e0e 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -321,7 +321,6 @@ extern void XagExtensionInit(INITARGS); extern void XaceExtensionInit(INITARGS); #endif #ifdef XCSECURITY -extern void SecurityExtensionSetup(INITARGS); extern void SecurityExtensionInit(INITARGS); #endif #ifdef XSELINUX @@ -538,9 +537,6 @@ InitExtensions(argc, argv) int argc; char *argv[]; { -#ifdef XCSECURITY - SecurityExtensionSetup(); -#endif #ifdef XSELINUX XSELinuxExtensionSetup(); #endif @@ -719,7 +715,7 @@ static ExtensionModule staticExtensions[] = { { XaceExtensionInit, XACE_EXTENSION_NAME, NULL, NULL, NULL }, #endif #ifdef XCSECURITY - { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, SecurityExtensionSetup, NULL }, + { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, #endif #ifdef XSELINUX { XSELinuxExtensionInit, XSELINUX_EXTENSION_NAME, NULL, XSELinuxExtensionSetup, NULL }, From 375864cb74cced40ae688078b1f7750998972535 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 3 Aug 2007 13:23:34 -0400 Subject: [PATCH 073/552] security: drop support for XC-QUERY-SECURITY authorization method. --- Xext/SecurityPolicy | 7 -- Xext/security.c | 64 +------------- Xext/securitysrv.h | 2 - os/Makefile.am | 7 +- os/auth.c | 11 --- os/connection.c | 11 +-- os/osdep.h | 3 - os/secauth.c | 202 -------------------------------------------- 8 files changed, 3 insertions(+), 304 deletions(-) delete mode 100644 os/secauth.c diff --git a/Xext/SecurityPolicy b/Xext/SecurityPolicy index 0000c5a8f..04dfb0e6b 100644 --- a/Xext/SecurityPolicy +++ b/Xext/SecurityPolicy @@ -2,13 +2,6 @@ version-1 # $Xorg: SecurityPolicy,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ -# The site policy fields are interpreted by the XC-QUERY-SECURITY-1 -# authorization protocol. The values are arbitrary and site-specific. -# Refer to the Security Extension Specification for the usage of the policies. -#sitepolicy A -#sitepolicy B -#sitepolicy C - # Property access rules: # property # ::= any | root | diff --git a/Xext/security.c b/Xext/security.c index b1c0ce008..9e3b2dd9d 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1526,64 +1526,6 @@ SecurityParseExtensionRule( } /* SecurityParseExtensionRule */ -static char **SecurityPolicyStrings = NULL; -static int nSecurityPolicyStrings = 0; - -static Bool -SecurityParseSitePolicy( - char *p) -{ - char *policyStr = SecurityParseString(&p); - char *copyPolicyStr; - char **newStrings; - - if (!policyStr) - return FALSE; - - copyPolicyStr = (char *)Xalloc(strlen(policyStr) + 1); - if (!copyPolicyStr) - return TRUE; - strcpy(copyPolicyStr, policyStr); - newStrings = (char **)Xrealloc(SecurityPolicyStrings, - sizeof (char *) * (nSecurityPolicyStrings + 1)); - if (!newStrings) - { - Xfree(copyPolicyStr); - return TRUE; - } - - SecurityPolicyStrings = newStrings; - SecurityPolicyStrings[nSecurityPolicyStrings++] = copyPolicyStr; - - return TRUE; - -} /* SecurityParseSitePolicy */ - - -char ** -SecurityGetSitePolicyStrings(n) - int *n; -{ - *n = nSecurityPolicyStrings; - return SecurityPolicyStrings; -} /* SecurityGetSitePolicyStrings */ - -static void -SecurityFreeSitePolicyStrings(void) -{ - if (SecurityPolicyStrings) - { - assert(nSecurityPolicyStrings); - while (nSecurityPolicyStrings--) - { - Xfree(SecurityPolicyStrings[nSecurityPolicyStrings]); - } - Xfree(SecurityPolicyStrings); - SecurityPolicyStrings = NULL; - nSecurityPolicyStrings = 0; - } -} /* SecurityFreeSitePolicyStrings */ - static void SecurityFreeTrustedExtensionStrings(void) { @@ -1646,6 +1588,7 @@ SecurityLoadPropertyAccessList(void) switch (SecurityParseKeyword(&p)) { case SecurityKeywordComment: + case SecurityKeywordSitePolicy: validLine = TRUE; break; @@ -1653,10 +1596,6 @@ SecurityLoadPropertyAccessList(void) validLine = SecurityParsePropertyAccessRule(p); break; - case SecurityKeywordSitePolicy: - validLine = SecurityParseSitePolicy(p); - break; - case SecurityKeywordExtension: validLine = SecurityParseExtensionRule(p); break; @@ -1837,7 +1776,6 @@ SecurityResetProc( { SecurityFreePropertyAccessList(); SecurityFreeTrustedExtensionStrings(); - SecurityFreeSitePolicyStrings(); } /* SecurityResetProc */ diff --git a/Xext/securitysrv.h b/Xext/securitysrv.h index 67d864e2e..7320ab7da 100644 --- a/Xext/securitysrv.h +++ b/Xext/securitysrv.h @@ -84,6 +84,4 @@ extern int XSecurityOptions(int argc, char **argv, int i); #define SECURITY_POLICY_FILE_VERSION "version-1" -extern char **SecurityGetSitePolicyStrings(int *n); - #endif /* _SECURITY_SRV_H */ diff --git a/os/Makefile.am b/os/Makefile.am index 53b2d7f0c..9dd1b5432 100644 --- a/os/Makefile.am +++ b/os/Makefile.am @@ -6,7 +6,6 @@ AM_CFLAGS = $(DIX_CFLAGS) SECURERPC_SRCS = rpcauth.c INTERNALMALLOC_SRCS = xalloc.c -XCSECURITY_SRCS = secauth.c XDMCP_SRCS = xdmcp.c STRLCAT_SRCS = strlcat.c strlcpy.c XORG_SRCS = log.c @@ -28,10 +27,6 @@ libos_la_SOURCES = \ xprintf.c \ $(XORG_SRCS) -if XCSECURITY -libos_la_SOURCES += $(XCSECURITY_SRCS) -endif - if XDMCP libos_la_SOURCES += $(XDMCP_SRCS) endif @@ -48,7 +43,7 @@ libcwrapper_la_CFLAGS = \ $(AM_CFLAGS) EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \ - $(XCSECURITY_SRCS) $(XDMCP_SRCS) $(STRLCAT_SRCS) + $(XDMCP_SRCS) $(STRLCAT_SRCS) if XSERVER_DTRACE # Generate dtrace object code for probes in libos & libdix diff --git a/os/auth.c b/os/auth.c index b2a145f89..d2aa980a8 100644 --- a/os/auth.c +++ b/os/auth.c @@ -42,9 +42,6 @@ from The Open Group. # include "dixstruct.h" # include # include -#ifdef XCSECURITY -# include "securitysrv.h" -#endif #ifdef WIN32 #include #endif @@ -89,14 +86,6 @@ static struct protocol protocols[] = { #endif }, #endif -#ifdef XCSECURITY -{ (unsigned short) XSecurityAuthorizationNameLen, - XSecurityAuthorizationName, - NULL, AuthSecurityCheck, NULL, - NULL, NULL, NULL, - NULL -}, -#endif }; # define NUM_AUTHORIZATION (sizeof (protocols) /\ diff --git a/os/connection.c b/os/connection.c index d975f87d2..c1152aad7 100644 --- a/os/connection.c +++ b/os/connection.c @@ -140,9 +140,6 @@ SOFTWARE. #include "appgroup.h" #endif #include "xace.h" -#ifdef XCSECURITY -#include "securitysrv.h" -#endif #ifdef X_NOT_POSIX #define Pid_t int @@ -669,13 +666,7 @@ ClientAuthorized(ClientPtr client, if (auth_id == (XID) ~0L) { - if ( -#ifdef XCSECURITY - (proto_n == 0 || - strncmp (auth_proto, XSecurityAuthorizationName, proto_n) != 0) && -#endif - _XSERVTransGetPeerAddr (trans_conn, - &family, &fromlen, &from) != -1) + if (_XSERVTransGetPeerAddr(trans_conn, &family, &fromlen, &from) != -1) { if (InvalidHost ((struct sockaddr *) from, fromlen, client)) AuthAudit(client, FALSE, (struct sockaddr *) from, diff --git a/os/osdep.h b/os/osdep.h index 965436df5..0c07a9004 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -260,9 +260,6 @@ extern int SecureRPCRemove (AuthRemCArgs); extern int SecureRPCReset (AuthRstCArgs); #endif -/* in secauth.c */ -extern XID AuthSecurityCheck (AuthCheckArgs); - /* in xdmcp.c */ extern void XdmcpUseMsg (void); extern int XdmcpOptions(int argc, char **argv, int i); diff --git a/os/secauth.c b/os/secauth.c deleted file mode 100644 index d01879bfd..000000000 --- a/os/secauth.c +++ /dev/null @@ -1,202 +0,0 @@ -/* -Copyright 1996, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice 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 NONINFRINGEMENT. -IN NO EVENT SHALL THE OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include "os.h" -#include "osdep.h" -#include "dixstruct.h" -#include "swaprep.h" - -#ifdef XCSECURITY -#include "securitysrv.h" -#endif - -static char InvalidPolicyReason[] = "invalid policy specification"; -static char PolicyViolationReason[] = "policy violation"; - -static Bool -AuthCheckSitePolicy( - unsigned short *data_lengthP, - char **dataP, - ClientPtr client, - char **reason) -{ - CARD8 *policy = *(CARD8 **)dataP; - int length; - Bool permit; - int nPolicies; - char **sitePolicies; - int nSitePolicies; - Bool found = FALSE; - - if ((length = *data_lengthP) < 2) { - *reason = InvalidPolicyReason; - return FALSE; - } - - permit = (*policy++ == 0); - nPolicies = (CARD8) *policy++; - - length -= 2; - - sitePolicies = SecurityGetSitePolicyStrings(&nSitePolicies); - - while (nPolicies) { - int strLen, sitePolicy; - - if (length == 0) { - *reason = InvalidPolicyReason; - return FALSE; - } - - strLen = (CARD8) *policy++; - if (--length < strLen) { - *reason = InvalidPolicyReason; - return FALSE; - } - - if (!found) - { - for (sitePolicy = 0; sitePolicy < nSitePolicies; sitePolicy++) - { - char *testPolicy = sitePolicies[sitePolicy]; - if ((strLen == strlen(testPolicy)) && - (strncmp((char *)policy, testPolicy, strLen) == 0)) - { - found = TRUE; /* need to continue parsing the policy... */ - break; - } - } - } - - policy += strLen; - length -= strLen; - nPolicies--; - } - - if (found != permit) - { - *reason = PolicyViolationReason; - return FALSE; - } - - *data_lengthP = length; - *dataP = (char *)policy; - return TRUE; -} - -XID -AuthSecurityCheck ( - unsigned short data_length, - char *data, - ClientPtr client, - char **reason) -{ -#ifdef XCSECURITY - xConnSetupPrefix csp; - xReq freq; - - if (client->clientState == ClientStateCheckedSecurity) - { - *reason = "repeated security check not permitted"; - return (XID) -1; - } - else if (data_length > 0) - { - char policy_mask = *data++; - - if (--data_length == 1) { - *reason = InvalidPolicyReason; - return (XID) -1; - } - - if (policy_mask & 0x01) /* Extensions policy */ - { - /* AuthCheckExtensionPolicy(&data_length, &data, client, reason) */ - *reason = "security policy not implemented"; - return (XID) -1; - } - - if (policy_mask & 0x02) /* Site policy */ - { - if (!AuthCheckSitePolicy(&data_length, &data, client, reason)) - return (XID) -1; - } - - if (data_length > 0) { /* did we consume the whole policy? */ - *reason = InvalidPolicyReason; - return (XID) -1; - } - - } - else if (!GetAccessControl()) - { - /* - * The client - possibly the X FireWall Proxy - gave - * no auth data and host-based authorization is turned - * off. In this case, the client should be denied - * access to the X server. - */ - *reason = "server host access control is disabled"; - return (XID) -1; - } - - client->clientState = ClientStateCheckingSecurity; - - csp.success = 2 /* Authenticate */; - csp.lengthReason = 0; - csp.length = 0; - csp.majorVersion = X_PROTOCOL; - csp.minorVersion = X_PROTOCOL_REVISION; - if (client->swapped) - WriteSConnSetupPrefix(client, &csp); - else - (void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp); - - /* - * Next time the client sends the real auth data, we want - * ProcEstablishConnection to be called. - */ - - freq.reqType = 1; - freq.length = (sz_xReq + sz_xConnClientPrefix) >> 2; - client->swapped = FALSE; - if (!InsertFakeRequest(client, (char *)&freq, sz_xReq)) - { - *reason = "internal error"; - return (XID) -1; - } - - return (XID) 0; -#else - *reason = "method not supported"; - return (XID) -1; -#endif -} From 102df4f9bac59d95963572d1a7f31d1a064ca4ca Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 6 Aug 2007 09:16:30 -0400 Subject: [PATCH 074/552] xace: drop site-policy and declare-extension-security hooks, add 2 new hooks for controlling access to screens and screen savers. --- Xext/xace.c | 20 +++++++------------- Xext/xace.h | 4 ++-- Xext/xacestr.h | 14 ++++---------- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 46fe7bc66..50361d06b 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -156,24 +156,18 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_SITE_POLICY: { - XaceSitePolicyRec rec = { - va_arg(ap, char*), - va_arg(ap, int), - BadValue /* default unrecognized */ + case XACE_SCREEN_ACCESS: + case XACE_SCREENSAVER_ACCESS: { + XaceScreenAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, ScreenPtr), + va_arg(ap, Mask), + Success /* default allow */ }; calldata = &rec; prv = &rec.status; break; } - case XACE_DECLARE_EXT_SECURE: { - XaceDeclareExtSecureRec rec = { - va_arg(ap, ExtensionEntry*), - va_arg(ap, Bool) - }; - calldata = &rec; - break; - } case XACE_AUTH_AVAIL: { XaceAuthAvailRec rec = { va_arg(ap, ClientPtr), diff --git a/Xext/xace.h b/Xext/xace.h index 083261273..e2982cfe2 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -51,8 +51,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_EXT_ACCESS 8 #define XACE_HOSTLIST_ACCESS 9 #define XACE_SELECTION_ACCESS 10 -#define XACE_SITE_POLICY 11 -#define XACE_DECLARE_EXT_SECURE 12 +#define XACE_SCREEN_ACCESS 11 +#define XACE_SCREENSAVER_ACCESS 12 #define XACE_AUTH_AVAIL 13 #define XACE_KEY_AVAIL 14 #define XACE_AUDIT_BEGIN 15 diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 8eb74d50f..8d092514d 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -101,18 +101,12 @@ typedef struct { int status; } XaceSelectionAccessRec; -/* XACE_SITE_POLICY */ typedef struct { - char *policyString; - int len; + ClientPtr client; + ScreenPtr screen; + Mask access_mode; int status; -} XaceSitePolicyRec; - -/* XACE_DECLARE_EXT_SECURE */ -typedef struct { - ExtensionEntry *ext; - Bool secure; -} XaceDeclareExtSecureRec; +} XaceScreenAccessRec; /* XACE_AUTH_AVAIL */ typedef struct { From acc9a42c926a3f84159780de12ecc1dc6186068a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 6 Aug 2007 12:16:59 -0400 Subject: [PATCH 075/552] Temporarily disable Security and SELinux extensions while changes to XACE are being made. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2af3114b6..a0fc31f3a 100644 --- a/configure.ac +++ b/configure.ac @@ -510,8 +510,8 @@ AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinera AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) -AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (default: enabled)]), [XSELINUX=$enableval], [XSELINUX=$XACE]) -AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE]) +AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (TEMPORARILY DISABLED)]), [XSELINUX=no], [XSELINUX=no]) +AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (TEMPORARILY DISABLED)]), [XCSECURITY=no], [XCSECURITY=no]) AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) From d744df32a15103aa14237175f506350d25b2fec0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 6 Aug 2007 12:23:21 -0400 Subject: [PATCH 076/552] xace: add hooks + new access codes: core protocol colormap requests --- dix/colormap.c | 11 +++ dix/dispatch.c | 226 +++++++++++++++++++++++++++---------------------- 2 files changed, 134 insertions(+), 103 deletions(-) diff --git a/dix/colormap.c b/dix/colormap.c index 515557030..7d6e7da4f 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -64,6 +64,7 @@ SOFTWARE. #include "resource.h" #include "windowstr.h" #include "privates.h" +#include "xace.h" extern XID clientErrorValue; extern int colormapPrivateCount; @@ -412,6 +413,16 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, } } + /* + * Security creation/labeling check + */ + i = XaceHook(XACE_RESOURCE_ACCESS, clients[client], mid, RT_COLORMAP, + DixCreateAccess, pmap); + if (i != Success) { + FreeResource(mid, RT_NONE); + return i; + } + if (!(*pScreen->CreateColormap)(pmap)) { FreeResource (mid, RT_NONE); diff --git a/dix/dispatch.c b/dix/dispatch.c index ffaad877d..83d761ba1 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -2495,7 +2495,7 @@ ProcCreateColormap(ClientPtr client) } mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); - result = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + result = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (result != Success) return result; @@ -2521,12 +2521,13 @@ int ProcFreeColormap(ClientPtr client) { ColormapPtr pmap; + int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - pmap = (ColormapPtr )SecurityLookupIDByType(client, stuff->id, RT_COLORMAP, - DixDestroyAccess); - if (pmap) + rc = dixLookupResource((pointer *)&pmap, stuff->id, RT_COLORMAP, client, + DixDestroyAccess); + if (rc == Success) { /* Freeing a default colormap is a no-op */ if (!(pmap->flags & IsDefault)) @@ -2536,7 +2537,7 @@ ProcFreeColormap(ClientPtr client) else { client->errorValue = stuff->id; - return (BadColor); + return rc; } } @@ -2547,24 +2548,25 @@ ProcCopyColormapAndFree(ClientPtr client) Colormap mid; ColormapPtr pSrcMap; REQUEST(xCopyColormapAndFreeReq); - int result; + int rc; REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); - if( (pSrcMap = (ColormapPtr )SecurityLookupIDByType(client, stuff->srcCmap, - RT_COLORMAP, DixReadAccess|DixWriteAccess)) ) + rc = dixLookupResource((pointer *)&pSrcMap, stuff->srcCmap, RT_COLORMAP, + client, DixReadAccess|DixRemoveAccess); + if (rc == Success) { - result = CopyColormapAndFree(mid, pSrcMap, client->index); + rc = CopyColormapAndFree(mid, pSrcMap, client->index); if (client->noClientException != Success) return(client->noClientException); else - return(result); + return rc; } else { client->errorValue = stuff->srcCmap; - return(BadColor); + return rc; } } @@ -2572,43 +2574,51 @@ int ProcInstallColormap(ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xResourceReq); - REQUEST_SIZE_MATCH(xResourceReq); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id, - RT_COLORMAP, DixReadAccess); - if (pcmp) - { - (*(pcmp->pScreen->InstallColormap)) (pcmp); - return (client->noClientException); - } - else - { - client->errorValue = stuff->id; - return (BadColor); - } + + rc = dixLookupResource((pointer *)&pcmp, stuff->id, RT_COLORMAP, client, + DixInstallAccess); + if (rc != Success) + goto out; + + rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess); + if (rc != Success) + goto out; + + (*(pcmp->pScreen->InstallColormap)) (pcmp); + + rc = client->noClientException; +out: + client->errorValue = stuff->id; + return (rc == BadValue) ? BadColor : rc; } int ProcUninstallColormap(ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xResourceReq); - REQUEST_SIZE_MATCH(xResourceReq); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id, - RT_COLORMAP, DixReadAccess); - if (pcmp) - { - if(pcmp->mid != pcmp->pScreen->defColormap) - (*(pcmp->pScreen->UninstallColormap)) (pcmp); - return (client->noClientException); - } - else - { - client->errorValue = stuff->id; - return (BadColor); - } + + rc = dixLookupResource((pointer *)&pcmp, stuff->id, RT_COLORMAP, client, + DixUninstallAccess); + if (rc != Success) + goto out; + + rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess); + if (rc != Success) + goto out; + + if(pcmp->mid != pcmp->pScreen->defColormap) + (*(pcmp->pScreen->UninstallColormap)) (pcmp); + + rc = client->noClientException; +out: + client->errorValue = stuff->id; + return (rc == BadValue) ? BadColor : rc; } int @@ -2618,11 +2628,16 @@ ProcListInstalledColormaps(ClientPtr client) int nummaps, rc; WindowPtr pWin; REQUEST(xResourceReq); - REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + + rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); if (rc != Success) - return rc; + goto out; + + rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen, + DixGetAttrAccess); + if (rc != Success) + goto out; preply = (xListInstalledColormapsReply *) ALLOCATE_LOCAL(sizeof(xListInstalledColormapsReply) + @@ -2641,21 +2656,23 @@ ProcListInstalledColormaps(ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]); DEALLOCATE_LOCAL(preply); - return(client->noClientException); + rc = client->noClientException; +out: + return (rc == BadValue) ? BadColor : rc; } int ProcAllocColor (ClientPtr client) { ColormapPtr pmap; - int retval; + int rc; xAllocColorReply acr; REQUEST(xAllocColorReq); REQUEST_SIZE_MATCH(xAllocColorReq); - pmap = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixWriteAccess); - if (pmap) + rc = dixLookupResource((pointer *)&pmap, stuff->cmap, RT_COLORMAP, client, + DixAddAccess); + if (rc == Success) { acr.type = X_Reply; acr.length = 0; @@ -2664,13 +2681,13 @@ ProcAllocColor (ClientPtr client) acr.green = stuff->green; acr.blue = stuff->blue; acr.pixel = 0; - if( (retval = AllocColor(pmap, &acr.red, &acr.green, &acr.blue, + if( (rc = AllocColor(pmap, &acr.red, &acr.green, &acr.blue, &acr.pixel, client->index)) ) { if (client->noClientException != Success) return(client->noClientException); else - return (retval); + return rc; } #ifdef PANORAMIX if (noPanoramiXExtension || !pmap->pScreen->myNum) @@ -2682,7 +2699,7 @@ ProcAllocColor (ClientPtr client) else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } @@ -2690,15 +2707,14 @@ int ProcAllocNamedColor (ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xAllocNamedColorReq); REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixWriteAccess); - if (pcmp) + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client, + DixAddAccess); + if (rc == Success) { - int retval; - xAllocNamedColorReply ancr; ancr.type = X_Reply; @@ -2712,14 +2728,14 @@ ProcAllocNamedColor (ClientPtr client) ancr.screenGreen = ancr.exactGreen; ancr.screenBlue = ancr.exactBlue; ancr.pixel = 0; - if( (retval = AllocColor(pcmp, + if( (rc = AllocColor(pcmp, &ancr.screenRed, &ancr.screenGreen, &ancr.screenBlue, &ancr.pixel, client->index)) ) { if (client->noClientException != Success) return(client->noClientException); else - return(retval); + return rc; } #ifdef PANORAMIX if (noPanoramiXExtension || !pcmp->pScreen->myNum) @@ -2734,7 +2750,7 @@ ProcAllocNamedColor (ClientPtr client) else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } @@ -2742,15 +2758,16 @@ int ProcAllocColorCells (ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xAllocColorCellsReq); REQUEST_SIZE_MATCH(xAllocColorCellsReq); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixWriteAccess); - if (pcmp) + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client, + DixAddAccess); + if (rc == Success) { xAllocColorCellsReply accr; - int npixels, nmasks, retval; + int npixels, nmasks; long length; Pixel *ppixels, *pmasks; @@ -2772,14 +2789,14 @@ ProcAllocColorCells (ClientPtr client) return(BadAlloc); pmasks = ppixels + npixels; - if( (retval = AllocColorCells(client->index, pcmp, npixels, nmasks, + if( (rc = AllocColorCells(client->index, pcmp, npixels, nmasks, (Bool)stuff->contiguous, ppixels, pmasks)) ) { DEALLOCATE_LOCAL(ppixels); if (client->noClientException != Success) return(client->noClientException); else - return(retval); + return rc; } #ifdef PANORAMIX if (noPanoramiXExtension || !pcmp->pScreen->myNum) @@ -2800,7 +2817,7 @@ ProcAllocColorCells (ClientPtr client) else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } @@ -2808,15 +2825,16 @@ int ProcAllocColorPlanes(ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xAllocColorPlanesReq); REQUEST_SIZE_MATCH(xAllocColorPlanesReq); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixWriteAccess); - if (pcmp) + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client, + DixAddAccess); + if (rc == Success) { xAllocColorPlanesReply acpr; - int npixels, retval; + int npixels; long length; Pixel *ppixels; @@ -2838,7 +2856,7 @@ ProcAllocColorPlanes(ClientPtr client) ppixels = (Pixel *)ALLOCATE_LOCAL(length); if(!ppixels) return(BadAlloc); - if( (retval = AllocColorPlanes(client->index, pcmp, npixels, + if( (rc = AllocColorPlanes(client->index, pcmp, npixels, (int)stuff->red, (int)stuff->green, (int)stuff->blue, (Bool)stuff->contiguous, ppixels, &acpr.redMask, &acpr.greenMask, &acpr.blueMask)) ) @@ -2847,7 +2865,7 @@ ProcAllocColorPlanes(ClientPtr client) if (client->noClientException != Success) return(client->noClientException); else - return(retval); + return rc; } acpr.length = length >> 2; #ifdef PANORAMIX @@ -2864,7 +2882,7 @@ ProcAllocColorPlanes(ClientPtr client) else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } @@ -2872,34 +2890,34 @@ int ProcFreeColors(ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xFreeColorsReq); REQUEST_AT_LEAST_SIZE(xFreeColorsReq); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixWriteAccess); - if (pcmp) + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client, + DixRemoveAccess); + if (rc == Success) { int count; - int retval; if(pcmp->flags & AllAllocated) return(BadAccess); count = ((client->req_len << 2)- sizeof(xFreeColorsReq)) >> 2; - retval = FreeColors(pcmp, client->index, count, + rc = FreeColors(pcmp, client->index, count, (Pixel *)&stuff[1], (Pixel)stuff->planeMask); if (client->noClientException != Success) return(client->noClientException); else { client->errorValue = clientErrorValue; - return(retval); + return rc; } } else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } @@ -2907,33 +2925,33 @@ int ProcStoreColors (ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xStoreColorsReq); REQUEST_AT_LEAST_SIZE(xStoreColorsReq); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixWriteAccess); - if (pcmp) + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client, + DixWriteAccess); + if (rc == Success) { int count; - int retval; count = (client->req_len << 2) - sizeof(xStoreColorsReq); if (count % sizeof(xColorItem)) return(BadLength); count /= sizeof(xColorItem); - retval = StoreColors(pcmp, count, (xColorItem *)&stuff[1]); + rc = StoreColors(pcmp, count, (xColorItem *)&stuff[1]); if (client->noClientException != Success) return(client->noClientException); else { client->errorValue = clientErrorValue; - return(retval); + return rc; } } else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } @@ -2941,33 +2959,33 @@ int ProcStoreNamedColor (ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xStoreNamedColorReq); REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixWriteAccess); - if (pcmp) + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client, + DixWriteAccess); + if (rc == Success) { xColorItem def; - int retval; if(OsLookupColor(pcmp->pScreen->myNum, (char *)&stuff[1], stuff->nbytes, &def.red, &def.green, &def.blue)) { def.flags = stuff->flags; def.pixel = stuff->pixel; - retval = StoreColors(pcmp, 1, &def); + rc = StoreColors(pcmp, 1, &def); if (client->noClientException != Success) return(client->noClientException); else - return(retval); + return rc; } return (BadName); } else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } @@ -2975,14 +2993,15 @@ int ProcQueryColors(ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xQueryColorsReq); REQUEST_AT_LEAST_SIZE(xQueryColorsReq); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixReadAccess); - if (pcmp) + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client, + DixReadAccess); + if (rc == Success) { - int count, retval; + int count; xrgb *prgbs; xQueryColorsReply qcr; @@ -2990,7 +3009,7 @@ ProcQueryColors(ClientPtr client) prgbs = (xrgb *)ALLOCATE_LOCAL(count * sizeof(xrgb)); if(!prgbs && count) return(BadAlloc); - if( (retval = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs)) ) + if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs)) ) { if (prgbs) DEALLOCATE_LOCAL(prgbs); if (client->noClientException != Success) @@ -2998,7 +3017,7 @@ ProcQueryColors(ClientPtr client) else { client->errorValue = clientErrorValue; - return (retval); + return rc; } } qcr.type = X_Reply; @@ -3018,7 +3037,7 @@ ProcQueryColors(ClientPtr client) else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } @@ -3026,12 +3045,13 @@ int ProcLookupColor(ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xLookupColorReq); REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes); - pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, DixReadAccess); - if (pcmp) + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client, + DixReadAccess); + if (rc == Success) { xLookupColorReply lcr; @@ -3056,7 +3076,7 @@ ProcLookupColor(ClientPtr client) else { client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } From 2763056ab5ae31bed422a0948198d98c6ace6d55 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 13 Aug 2007 13:40:47 -0400 Subject: [PATCH 077/552] xace: add hooks + new access codes: core protocol window requests --- dix/dispatch.c | 53 ++++++++------- dix/window.c | 166 +++++++++++++++++++++++------------------------ include/window.h | 2 +- 3 files changed, 114 insertions(+), 107 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 83d761ba1..1c40e2fcb 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -556,12 +556,12 @@ ProcCreateWindow(ClientPtr client) { WindowPtr pParent, pWin; REQUEST(xCreateWindowReq); - int result, len, rc; + int len, rc; REQUEST_AT_LEAST_SIZE(xCreateWindowReq); LEGAL_NEW_RESOURCE(stuff->wid, client); - rc = dixLookupWindow(&pParent, stuff->parent, client, DixWriteAccess); + rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess); if (rc != Success) return rc; len = client->req_len - (sizeof(xCreateWindowReq) >> 2); @@ -577,7 +577,7 @@ ProcCreateWindow(ClientPtr client) stuff->borderWidth, stuff->class, stuff->mask, (XID *) &stuff[1], (int)stuff->depth, - client, stuff->visual, &result); + client, stuff->visual, &rc); if (pWin) { Mask mask = pWin->eventMask; @@ -590,7 +590,7 @@ ProcCreateWindow(ClientPtr client) if (client->noClientException != Success) return(client->noClientException); else - return(result); + return rc; } int @@ -602,7 +602,7 @@ ProcChangeWindowAttributes(ClientPtr client) int len, rc; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); if (rc != Success) return rc; len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2); @@ -627,7 +627,7 @@ ProcGetWindowAttributes(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; GetWindowAttributes(pWin, client, &wa); @@ -646,8 +646,13 @@ ProcDestroyWindow(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess); if (rc != Success) return rc; - if (pWin->parent) + if (pWin->parent) { + rc = dixLookupWindow(&pWin, pWin->parent->drawable.id, client, + DixRemoveAccess); + if (rc != Success) + return rc; FreeResource(stuff->id, RT_NONE); + } return(client->noClientException); } @@ -659,7 +664,7 @@ ProcDestroySubwindows(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess); + rc = dixLookupWindow(&pWin, stuff->id, client, DixRemoveAccess); if (rc != Success) return rc; DestroySubwindows(pWin, client); @@ -674,7 +679,7 @@ ProcChangeSaveSet(ClientPtr client) int result, rc; REQUEST_SIZE_MATCH(xChangeSaveSetReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (rc != Success) return rc; if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) @@ -702,10 +707,10 @@ ProcReparentWindow(ClientPtr client) int result, rc; REQUEST_SIZE_MATCH(xReparentWindowReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (rc != Success) return rc; - rc = dixLookupWindow(&pParent, stuff->parent, client, DixWriteAccess); + rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess); if (rc != Success) return rc; if (SAME_SCREENS(pWin->drawable, pParent->drawable)) @@ -735,7 +740,7 @@ ProcMapWindow(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->id, client, DixShowAccess); if (rc != Success) return rc; MapWindow(pWin, client); @@ -751,7 +756,7 @@ ProcMapSubwindows(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); if (rc != Success) return rc; MapSubwindows(pWin, client); @@ -767,7 +772,7 @@ ProcUnmapWindow(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->id, client, DixHideAccess); if (rc != Success) return rc; UnmapWindow(pWin, FALSE); @@ -783,7 +788,7 @@ ProcUnmapSubwindows(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); if (rc != Success) return rc; UnmapSubwindows(pWin); @@ -799,7 +804,8 @@ ProcConfigureWindow(ClientPtr client) int len, rc; REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, + DixManageAccess|DixSetAttrAccess); if (rc != Success) return rc; len = client->req_len - (sizeof(xConfigureWindowReq) >> 2); @@ -827,7 +833,7 @@ ProcCirculateWindow(ClientPtr client) client->errorValue = stuff->direction; return BadValue; } - rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (rc != Success) return rc; CirculateWindow(pWin, (int)stuff->direction, client); @@ -842,7 +848,7 @@ GetGeometry(ClientPtr client, xGetGeometryReply *rep) REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixReadAccess); + rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixGetAttrAccess); if (rc != Success) return rc; @@ -903,7 +909,7 @@ ProcQueryTree(ClientPtr client) REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); if (rc != Success) return rc; reply.type = X_Reply; @@ -1260,10 +1266,10 @@ ProcTranslateCoords(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xTranslateCoordsReq); - rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixGetAttrAccess); if (rc != Success) return rc; - rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixReadAccess); + rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixGetAttrAccess); if (rc != Success) return rc; rep.type = X_Reply; @@ -3233,12 +3239,15 @@ ProcQueryBestSize (ClientPtr client) } rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, - DixReadAccess); + DixGetAttrAccess); if (rc != Success) return rc; if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW) return (BadMatch); pScreen = pDraw->pScreen; + rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess); + if (rc != Success) + return rc; (* pScreen->QueryBestSize)(stuff->class, &stuff->width, &stuff->height, pScreen); reply.type = X_Reply; diff --git a/dix/window.c b/dix/window.c index 2f151b09c..3addc73cd 100644 --- a/dix/window.c +++ b/dix/window.c @@ -733,20 +733,14 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, /* security creation/labeling check */ *error = XaceHook(XACE_RESOURCE_ACCESS, client, wid, RT_WINDOW, - DixCreateAccess, pWin); + DixCreateAccess|DixSetAttrAccess, pWin); if (*error != Success) { xfree(pWin); return NullWindow; } - /* can't let untrusted clients have background None windows; - * they make it too easy to steal window contents - */ - if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin) == Success) - pWin->backgroundState = None; - else { - pWin->backgroundState = BackgroundPixel; - pWin->background.pixel = 0; - } + + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = 0; pWin->borderIsPixel = pParent->borderIsPixel; pWin->border = pParent->border; @@ -980,7 +974,7 @@ DeleteWindow(pointer value, XID wid) return Success; } -void +int DestroySubwindows(WindowPtr pWin, ClientPtr client) { /* XXX @@ -992,8 +986,15 @@ DestroySubwindows(WindowPtr pWin, ClientPtr client) * If you care, simply delete the call to UnmapSubwindows. */ UnmapSubwindows(pWin); - while (pWin->lastChild) + while (pWin->lastChild) { + int rc = XaceHook(XACE_RESOURCE_ACCESS, client, + pWin->lastChild->drawable.id, RT_WINDOW, + DixDestroyAccess, pWin->lastChild); + if (rc != Success) + return rc; FreeResource(pWin->lastChild->drawable.id, RT_NONE); + } + return Success; } #define DeviceEventMasks (KeyPressMask | KeyReleaseMask | ButtonPressMask | \ @@ -1010,25 +1011,20 @@ DestroySubwindows(WindowPtr pWin, ClientPtr client) _X_EXPORT int ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) { - Mask index2; XID *pVlist; PixmapPtr pPixmap; Pixmap pixID; CursorPtr pCursor, pOldCursor; Cursor cursorID; - WindowPtr pChild; + WindowPtr pChild, pLayerWin; Colormap cmap; ColormapPtr pCmap; xEvent xE; - int result; + int error, rc; ScreenPtr pScreen; - Mask vmaskCopy = 0; - Mask tmask; + Mask index2, tmask, vmaskCopy = 0; unsigned int val; - int error; - Bool checkOptional = FALSE; - Bool borderRelative = FALSE; - WindowPtr pLayerWin; + Bool checkOptional = FALSE, borderRelative = FALSE; if ((pWin->drawable.class == InputOnly) && (vmask & (~INPUTONLY_LEGAL_MASK))) return BadMatch; @@ -1050,17 +1046,13 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) borderRelative = TRUE; if (pixID == None) { - /* can't let untrusted clients have background None windows */ - if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin) == Success) { - if (pWin->backgroundState == BackgroundPixmap) - (*pScreen->DestroyPixmap)(pWin->background.pixmap); - if (!pWin->parent) - MakeRootTile(pWin); - else - pWin->backgroundState = None; - } else { - /* didn't change the backgrnd to None, so don't tell ddx */ - index2 = 0; + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap)(pWin->background.pixmap); + if (!pWin->parent) + MakeRootTile(pWin); + else { + pWin->backgroundState = BackgroundPixel; + pWin->background.pixel = 0; } } else if (pixID == ParentRelative) @@ -1083,9 +1075,9 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) } else { - pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, - RT_PIXMAP, DixReadAccess); - if (pPixmap != (PixmapPtr) NULL) + rc = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP, + client, DixReadAccess); + if (rc == Success) { if ((pPixmap->drawable.depth != pWin->drawable.depth) || (pPixmap->drawable.pScreen != pScreen)) @@ -1101,7 +1093,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) } else { - error = BadPixmap; + error = (rc == BadValue) ? BadPixmap : rc; client->errorValue = pixID; goto PatchUp; } @@ -1130,42 +1122,40 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) error = BadMatch; goto PatchUp; } - if (pWin->borderIsPixel == FALSE) - (*pScreen->DestroyPixmap)(pWin->border.pixmap); - pWin->border = pWin->parent->border; - if ((pWin->borderIsPixel = pWin->parent->borderIsPixel) == TRUE) - { - index2 = CWBorderPixel; - } - else - { - pWin->parent->border.pixmap->refcnt++; - } - } - else - { - pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, - RT_PIXMAP, DixReadAccess); - if (pPixmap) - { - if ((pPixmap->drawable.depth != pWin->drawable.depth) || - (pPixmap->drawable.pScreen != pScreen)) - { - error = BadMatch; - goto PatchUp; - } + if (pWin->parent->borderIsPixel == TRUE) { if (pWin->borderIsPixel == FALSE) (*pScreen->DestroyPixmap)(pWin->border.pixmap); - pWin->borderIsPixel = FALSE; - pWin->border.pixmap = pPixmap; - pPixmap->refcnt++; + pWin->border = pWin->parent->border; + pWin->borderIsPixel = TRUE; + index2 = CWBorderPixel; + break; } else { - error = BadPixmap; - client->errorValue = pixID; + pixID = pWin->parent->border.pixmap->drawable.id; + } + } + rc = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP, + client, DixReadAccess); + if (rc == Success) + { + if ((pPixmap->drawable.depth != pWin->drawable.depth) || + (pPixmap->drawable.pScreen != pScreen)) + { + error = BadMatch; goto PatchUp; } + if (pWin->borderIsPixel == FALSE) + (*pScreen->DestroyPixmap)(pWin->border.pixmap); + pWin->borderIsPixel = FALSE; + pWin->border.pixmap = pPixmap; + pPixmap->refcnt++; + } + else + { + error = (rc == BadValue) ? BadPixmap : rc; + client->errorValue = pixID; + goto PatchUp; } break; case CWBorderPixel: @@ -1290,20 +1280,20 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) #endif /* DO_SAVE_UNDERS */ break; case CWEventMask: - result = EventSelectForWindow(pWin, client, (Mask )*pVlist); - if (result) + rc = EventSelectForWindow(pWin, client, (Mask )*pVlist); + if (rc) { - error = result; + error = rc; goto PatchUp; } pVlist++; break; case CWDontPropagate: - result = EventSuppressForWindow(pWin, client, (Mask )*pVlist, + rc = EventSuppressForWindow(pWin, client, (Mask )*pVlist, &checkOptional); - if (result) + if (rc) { - error = result; + error = rc; goto PatchUp; } pVlist++; @@ -1317,6 +1307,15 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) client->errorValue = val; goto PatchUp; } + if (val == xTrue) { + rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, + RT_WINDOW, DixGrabAccess, pWin); + if (rc != Success) { + error = rc; + client->errorValue = pWin->drawable.id; + goto PatchUp; + } + } pWin->overrideRedirect = val; break; case CWColormap: @@ -1354,11 +1353,11 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) error = BadMatch; goto PatchUp; } - pCmap = (ColormapPtr)SecurityLookupIDByType(client, cmap, - RT_COLORMAP, DixReadAccess); - if (!pCmap) + rc = dixLookupResource((pointer *)&pCmap, cmap, RT_COLORMAP, + client, DixUseAccess); + if (rc != Success) { - error = BadColor; + error = (rc == BadValue) ? BadColor : rc; client->errorValue = cmap; goto PatchUp; } @@ -1430,11 +1429,11 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) } else { - pCursor = (CursorPtr)SecurityLookupIDByType(client, cursorID, - RT_CURSOR, DixReadAccess); - if (!pCursor) + rc = dixLookupResource((pointer *)&pCursor, cursorID, + RT_CURSOR, client, DixReadAccess); + if (rc != Success) { - error = BadCursor; + error = (rc == BadValue) ? BadCursor : rc; client->errorValue = cursorID; goto PatchUp; } @@ -2267,7 +2266,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) unsigned short w = pWin->drawable.width, h = pWin->drawable.height, bw = pWin->borderWidth; - int action, smode = Above; + int rc, action, smode = Above; #ifdef XAPPGROUP ClientPtr win_owner; ClientPtr ag_leader = NULL; @@ -2328,12 +2327,11 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) case CWSibling: sibwid = (Window ) *pVlist; pVlist++; - pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid, - RT_WINDOW, DixReadAccess); - if (!pSib) + rc = dixLookupWindow(&pSib, sibwid, client, DixGetAttrAccess); + if (rc != Success) { client->errorValue = sibwid; - return(BadWindow); + return rc; } if (pSib->parent != pParent) return(BadMatch); diff --git a/include/window.h b/include/window.h index 312b75e88..472f37973 100644 --- a/include/window.h +++ b/include/window.h @@ -119,7 +119,7 @@ extern int DeleteWindow( pointer /*pWin*/, XID /*wid*/); -extern void DestroySubwindows( +extern int DestroySubwindows( WindowPtr /*pWin*/, ClientPtr /*client*/); From 9a183d7ba50e31afa133cc03aee7991517a283ea Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 14 Aug 2007 11:39:26 -0400 Subject: [PATCH 078/552] dix: remove caching of drawables and graphics contexts. The security checks simply bypass the cached values so they are unused. --- Xext/mbuf.c | 2 +- dbe/dbe.c | 2 +- dix/dispatch.c | 43 +--------------------------------- dix/dixutils.c | 22 ++++------------- dix/resource.c | 20 ---------------- hw/xwin/winclipboardwrappers.c | 1 - include/dix.h | 13 ---------- include/dixstruct.h | 4 ---- include/resource.h | 6 ++--- 9 files changed, 10 insertions(+), 103 deletions(-) diff --git a/Xext/mbuf.c b/Xext/mbuf.c index ed352e21b..ee2ef6405 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -235,7 +235,7 @@ MultibufferExtensionInit() * create the resource types */ MultibufferDrawableResType = - CreateNewResourceType(MultibufferDrawableDelete)|RC_CACHED|RC_DRAWABLE; + CreateNewResourceType(MultibufferDrawableDelete)|RC_DRAWABLE; MultibufferResType = CreateNewResourceType(MultibufferDelete); MultibuffersResType = CreateNewResourceType(MultibuffersDelete); OtherClientResType = CreateNewResourceType(OtherClientDelete); diff --git a/dbe/dbe.c b/dbe/dbe.c index d63620d4f..aec626b79 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -1783,7 +1783,7 @@ DbeExtensionInit(void) /* Create the resource types. */ dbeDrawableResType = - CreateNewResourceType(DbeDrawableDelete) | RC_CACHED | RC_DRAWABLE; + CreateNewResourceType(DbeDrawableDelete) | RC_DRAWABLE; dbeWindowPrivResType = CreateNewResourceType(DbeWindowPrivDelete); diff --git a/dix/dispatch.c b/dix/dispatch.c index 1c40e2fcb..69b1922d3 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -258,34 +258,6 @@ InitSelections(void) CurrentSelections = (Selection *)NULL; NumCurrentSelections = 0; } - -void -FlushClientCaches(XID id) -{ - int i; - ClientPtr client; - - client = clients[CLIENT_ID(id)]; - if (client == NullClient) - return ; - for (i=0; ilastDrawableID == id) - { - client->lastDrawableID = WindowTable[0]->drawable.id; - client->lastDrawable = (DrawablePtr)WindowTable[0]; - } - else if (client->lastGCID == id) - { - client->lastGCID = INVALID; - client->lastGC = (GCPtr)NULL; - } - } - } -} #ifdef SMART_SCHEDULE #undef SMART_DEBUG @@ -3702,20 +3674,7 @@ void InitClient(ClientPtr client, int i, pointer ospriv) client->sequence = 0; client->clientAsMask = ((Mask)i) << CLIENTOFFSET; client->clientGone = FALSE; - if (i) - { - client->closeDownMode = DestroyAll; - client->lastDrawable = (DrawablePtr)WindowTable[0]; - client->lastDrawableID = WindowTable[0]->drawable.id; - } - else - { - client->closeDownMode = RetainPermanent; - client->lastDrawable = (DrawablePtr)NULL; - client->lastDrawableID = INVALID; - } - client->lastGC = (GCPtr) NULL; - client->lastGCID = INVALID; + client->closeDownMode = i ? DestroyAll : RetainPermanent; client->numSaved = 0; client->saveSet = (SaveSetElt *)NULL; client->noClientException = Success; diff --git a/dix/dixutils.c b/dix/dixutils.c index 14ef7e674..e8d7daf06 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -208,7 +208,6 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, Mask type, Mask access) { DrawablePtr pTmp; - RESTYPE rtype; int rc; *pDraw = NULL; @@ -217,28 +216,15 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, if (id == INVALID) return BadDrawable; - if (id == client->lastDrawableID) { - pTmp = client->lastDrawable; + rc = dixLookupResource((pointer *)&pTmp, id, RC_DRAWABLE, client, access); - /* an access check is required for cached drawables */ - rtype = (type & M_WINDOW) ? RT_WINDOW : RT_PIXMAP; - rc = XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp); - if (rc != Success) - return rc; - } else - dixLookupResource((void **)&pTmp, id, RC_DRAWABLE, client, access); - - if (!pTmp) + if (rc == BadValue) return BadDrawable; + if (rc != Success) + return rc; if (!((1 << pTmp->type) & (type ? type : M_DRAWABLE))) return BadMatch; - if (type & M_DRAWABLE) { - client->lastDrawable = pTmp; - client->lastDrawableID = id; - client->lastGCID = INVALID; - client->lastGC = (GCPtr)NULL; - } *pDraw = pTmp; return Success; } diff --git a/dix/resource.c b/dix/resource.c index ea0a3105c..844d12ec0 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -585,8 +585,6 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) CallResourceStateCallback(ResourceStateFreeing, res); - if (rtype & RC_CACHED) - FlushClientCaches(res->id); if (rtype != skipDeleteFuncType) (*DeleteFuncs[rtype & TypeMask])(res->value, res->id); xfree(res); @@ -597,11 +595,6 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) else prev = &res->next; } - if(clients[cid] && (id == clients[cid]->lastDrawableID)) - { - clients[cid]->lastDrawable = (DrawablePtr)WindowTable[0]; - clients[cid]->lastDrawableID = WindowTable[0]->drawable.id; - } } if (!gotOne) ErrorF("Freeing resource id=%lX which isn't there.\n", @@ -632,8 +625,6 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) CallResourceStateCallback(ResourceStateFreeing, res); - if (type & RC_CACHED) - FlushClientCaches(res->id); if (!skipFree) (*DeleteFuncs[type & TypeMask])(res->value, res->id); xfree(res); @@ -642,11 +633,6 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) else prev = &res->next; } - if(clients[cid] && (id == clients[cid]->lastDrawableID)) - { - clients[cid]->lastDrawable = (DrawablePtr)WindowTable[0]; - clients[cid]->lastDrawableID = WindowTable[0]->drawable.id; - } } } @@ -669,8 +655,6 @@ ChangeResourceValue (XID id, RESTYPE rtype, pointer value) for (; res; res = res->next) if ((res->id == id) && (res->type == rtype)) { - if (rtype & RC_CACHED) - FlushClientCaches(res->id); res->value = value; return TRUE; } @@ -801,8 +785,6 @@ FreeClientNeverRetainResources(ClientPtr client) CallResourceStateCallback(ResourceStateFreeing, this); - if (rtype & RC_CACHED) - FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); xfree(this); } @@ -854,8 +836,6 @@ FreeClientResources(ClientPtr client) CallResourceStateCallback(ResourceStateFreeing, this); - if (rtype & RC_CACHED) - FlushClientCaches(this->id); (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); xfree(this); } diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c index 825d3dc70..2cfe0ffce 100755 --- a/hw/xwin/winclipboardwrappers.c +++ b/hw/xwin/winclipboardwrappers.c @@ -431,7 +431,6 @@ winProcSetSelectionOwner (ClientPtr client) * and we currently own the Win32 clipboard. */ if (None == stuff->window - && g_iClipboardWindow != client->lastDrawableID && (None == s_iOwners[CLIP_OWN_PRIMARY] || g_iClipboardWindow == s_iOwners[CLIP_OWN_PRIMARY]) && (None == s_iOwners[CLIP_OWN_CLIPBOARD] diff --git a/include/dix.h b/include/dix.h index 71f4c23fd..daf16cbdc 100644 --- a/include/dix.h +++ b/include/dix.h @@ -82,8 +82,6 @@ SOFTWARE. } #define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, pGC, client)\ - if ((stuff->gc == INVALID) || (client->lastGCID != stuff->gc) ||\ - (client->lastDrawableID != drawID))\ {\ int rc;\ rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY,\ @@ -95,15 +93,6 @@ SOFTWARE. return rc;\ if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\ return (BadMatch);\ - client->lastDrawable = pDraw;\ - client->lastDrawableID = drawID;\ - client->lastGC = pGC;\ - client->lastGCID = stuff->gc;\ - }\ - else\ - {\ - pGC = client->lastGC;\ - pDraw = client->lastDrawable;\ }\ if (pGC->serialNumber != pDraw->serialNumber)\ ValidateGC(pDraw, pGC); @@ -160,8 +149,6 @@ extern void UpdateCurrentTimeIf(void); extern void InitSelections(void); -extern void FlushClientCaches(XID /*id*/); - extern int dixDestroyPixmap( pointer /*value*/, XID /*pid*/); diff --git a/include/dixstruct.h b/include/dixstruct.h index dd6347f18..2a3e696fd 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -101,10 +101,6 @@ typedef struct _Client { int clientGone; int noClientException; /* this client died or needs to be * killed */ - DrawablePtr lastDrawable; - Drawable lastDrawableID; - GCPtr lastGC; - GContext lastGCID; SaveSetElt *saveSet; int numSaved; pointer screenPrivate[MAXSCREENS]; diff --git a/include/resource.h b/include/resource.h index d2ecfdea7..087d62c09 100644 --- a/include/resource.h +++ b/include/resource.h @@ -72,9 +72,9 @@ typedef unsigned long RESTYPE; /* types for Resource routines */ -#define RT_WINDOW ((RESTYPE)1|RC_CACHED|RC_DRAWABLE) -#define RT_PIXMAP ((RESTYPE)2|RC_CACHED|RC_DRAWABLE) -#define RT_GC ((RESTYPE)3|RC_CACHED) +#define RT_WINDOW ((RESTYPE)1|RC_DRAWABLE) +#define RT_PIXMAP ((RESTYPE)2|RC_DRAWABLE) +#define RT_GC ((RESTYPE)3) #undef RT_FONT #undef RT_CURSOR #define RT_FONT ((RESTYPE)4) From 42d6112ec21949a336ee8b34469f2695273ee2d6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 14 Aug 2007 13:09:38 -0400 Subject: [PATCH 079/552] xace: add hooks + new access codes: core protocol GC requests --- dix/dispatch.c | 17 +++++------ dix/gc.c | 58 +++++++++++++++++++++++--------------- hw/xfree86/common/xf86xv.c | 3 +- include/dix.h | 2 +- include/gc.h | 4 ++- mi/mibstore.c | 3 +- mi/midispcur.c | 9 +++--- mi/miexpose.c | 2 +- miext/cw/cw.c | 2 +- 9 files changed, 60 insertions(+), 40 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 69b1922d3..4260799bd 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1583,15 +1583,16 @@ ProcCreateGC(ClientPtr client) REQUEST_AT_LEAST_SIZE(xCreateGCReq); client->errorValue = stuff->gc; LEGAL_NEW_RESOURCE(stuff->gc, client); - rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixGetAttrAccess); if (rc != Success) return rc; len = client->req_len - (sizeof(xCreateGCReq) >> 2); if (len != Ones(stuff->mask)) return BadLength; - pGC = (GC *)CreateGC(pDraw, stuff->mask, - (XID *) &stuff[1], &error); + pGC = (GC *)CreateGC(pDraw, stuff->mask, (XID *) &stuff[1], &error, + stuff->gc, client); if (error != Success) return error; if (!AddResource(stuff->gc, RT_GC, (pointer)pGC)) @@ -1608,7 +1609,7 @@ ProcChangeGC(ClientPtr client) REQUEST(xChangeGCReq); REQUEST_AT_LEAST_SIZE(xChangeGCReq); - result = dixLookupGC(&pGC, stuff->gc, client, DixWriteAccess); + result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); if (result != Success) return result; @@ -1635,10 +1636,10 @@ ProcCopyGC(ClientPtr client) REQUEST(xCopyGCReq); REQUEST_SIZE_MATCH(xCopyGCReq); - result = dixLookupGC(&pGC, stuff->srcGC, client, DixReadAccess); + result = dixLookupGC(&pGC, stuff->srcGC, client, DixGetAttrAccess); if (result != Success) return result; - result = dixLookupGC(&dstGC, stuff->dstGC, client, DixWriteAccess); + result = dixLookupGC(&dstGC, stuff->dstGC, client, DixSetAttrAccess); if (result != Success) return result; if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth)) @@ -1667,7 +1668,7 @@ ProcSetDashes(ClientPtr client) return BadValue; } - result = dixLookupGC(&pGC,stuff->gc, client, DixWriteAccess); + result = dixLookupGC(&pGC,stuff->gc, client, DixSetAttrAccess); if (result != Success) return result; @@ -1696,7 +1697,7 @@ ProcSetClipRectangles(ClientPtr client) client->errorValue = stuff->ordering; return BadValue; } - result = dixLookupGC(&pGC,stuff->gc, client, DixWriteAccess); + result = dixLookupGC(&pGC,stuff->gc, client, DixSetAttrAccess); if (result != Success) return result; diff --git a/dix/gc.c b/dix/gc.c index e7c48492f..ccd586bdd 100644 --- a/dix/gc.c +++ b/dix/gc.c @@ -63,6 +63,7 @@ SOFTWARE. #include "privates.h" #include "dix.h" +#include "xace.h" #include extern XID clientErrorValue; @@ -148,7 +149,7 @@ _X_EXPORT int dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion) { BITS32 index2; - int error = 0; + int rc, error = 0; PixmapPtr pPixmap; BITS32 maskQ; @@ -267,14 +268,15 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr if (pUnion) { NEXT_PTR(PixmapPtr, pPixmap); + rc = Success; } else { NEXTVAL(XID, newpix); - pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - newpix, RT_PIXMAP, DixReadAccess); + rc = dixLookupResource((pointer *)&pPixmap, newpix, + RT_PIXMAP, client, DixReadAccess); } - if (pPixmap) + if (rc == Success) { if ((pPixmap->drawable.depth != pGC->depth) || (pPixmap->drawable.pScreen != pGC->pScreen)) @@ -293,7 +295,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr else { clientErrorValue = newpix; - error = BadPixmap; + error = (rc == BadValue) ? BadPixmap : rc; } break; } @@ -303,14 +305,15 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr if (pUnion) { NEXT_PTR(PixmapPtr, pPixmap); + rc = Success; } else { NEXTVAL(XID, newstipple) - pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - newstipple, RT_PIXMAP, DixReadAccess); + rc = dixLookupResource((pointer *)&pPixmap, newstipple, + RT_PIXMAP, client, DixReadAccess); } - if (pPixmap) + if (rc == Success) { if ((pPixmap->drawable.depth != 1) || (pPixmap->drawable.pScreen != pGC->pScreen)) @@ -328,7 +331,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr else { clientErrorValue = newstipple; - error = BadPixmap; + error = (rc == BadValue) ? BadPixmap : rc; } break; } @@ -345,14 +348,15 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr if (pUnion) { NEXT_PTR(FontPtr, pFont); + rc = Success; } else { NEXTVAL(XID, newfont) - pFont = (FontPtr)SecurityLookupIDByType(client, newfont, - RT_FONT, DixReadAccess); + rc = dixLookupResource((pointer *)&pFont, newfont, + RT_FONT, client, DixUseAccess); } - if (pFont) + if (rc == Success) { pFont->refcnt++; if (pGC->font) @@ -362,7 +366,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr else { clientErrorValue = newfont; - error = BadFont; + error = (rc == BadValue) ? BadFont : rc; } break; } @@ -415,9 +419,15 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr clipType = CT_NONE; pPixmap = NullPixmap; } - else - pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - pid, RT_PIXMAP, DixReadAccess); + else { + rc = dixLookupResource((pointer *)&pPixmap, pid, + RT_PIXMAP, client, + DixReadAccess); + if (rc != Success) { + clientErrorValue = pid; + error = (rc == BadValue) ? BadPixmap : rc; + } + } } if (pPixmap) @@ -433,11 +443,6 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pPixmap->refcnt++; } } - else if (!pUnion && (pid != None)) - { - clientErrorValue = pid; - error = BadPixmap; - } if(error == Success) { (*pGC->funcs->ChangeClip)(pGC, clipType, @@ -601,7 +606,8 @@ AllocateGC(ScreenPtr pScreen) } _X_EXPORT GCPtr -CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus) +CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, + XID gcid, ClientPtr client) { GCPtr pGC; @@ -663,6 +669,12 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus) pGC->stipple = pGC->pScreen->PixmapPerDepth[0]; pGC->stipple->refcnt++; + /* security creation/labeling check */ + *pStatus = XaceHook(XACE_RESOURCE_ACCESS, client, gcid, RT_GC, + DixCreateAccess|DixSetAttrAccess, pGC); + if (*pStatus != Success) + goto out; + pGC->stateChanges = (1 << (GCLastBit+1)) - 1; if (!(*pGC->pScreen->CreateGC)(pGC)) *pStatus = BadAlloc; @@ -670,6 +682,8 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus) *pStatus = ChangeGC(pGC, mask, pval); else *pStatus = Success; + +out: if (*pStatus != Success) { if (!pGC->tileIsPixel && !pGC->tile.pixmap) diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index 6abe31c2f..70a946922 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -1844,7 +1844,8 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) int status; pval[0] = key; pval[1] = IncludeInferiors; - pGC = CreateGC(pDraw, GCForeground | GCSubwindowMode, pval, &status); + pGC = CreateGC(pDraw, GCForeground | GCSubwindowMode, pval, &status, + (XID)0, serverClient); if(!pGC) return; ValidateGC(pDraw, pGC); if (pPriv) pPriv->pGC = pGC; diff --git a/include/dix.h b/include/dix.h index daf16cbdc..05366ecd0 100644 --- a/include/dix.h +++ b/include/dix.h @@ -88,7 +88,7 @@ SOFTWARE. DixWriteAccess);\ if (rc != Success)\ return rc;\ - rc = dixLookupGC(&(pGC), stuff->gc, client, DixReadAccess);\ + rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\ if (rc != Success)\ return rc;\ if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\ diff --git a/include/gc.h b/include/gc.h index 3b7e38e02..bf4c268a8 100644 --- a/include/gc.h +++ b/include/gc.h @@ -115,7 +115,9 @@ extern GCPtr CreateGC( DrawablePtr /*pDrawable*/, BITS32 /*mask*/, XID* /*pval*/, - int* /*pStatus*/); + int* /*pStatus*/, + XID /*gcid*/, + ClientPtr /*client*/); extern int CopyGC( GCPtr/*pgcSrc*/, diff --git a/mi/mibstore.c b/mi/mibstore.c index 70839ce31..e27c681e8 100644 --- a/mi/mibstore.c +++ b/mi/mibstore.c @@ -3468,7 +3468,8 @@ miBSValidateGC (pGC, stateChanges, pDrawable) /* We never want ops with the backingGC to generate GraphicsExpose */ pBackingGC = CreateGC ((DrawablePtr)pWindowPriv->pBackingPixmap, - GCGraphicsExposures, &noexpose, &status); + GCGraphicsExposures, &noexpose, &status, + (XID)0, serverClient); if (status != Success) lift_functions = TRUE; else diff --git a/mi/midispcur.c b/mi/midispcur.c index de009cbaf..ab1083789 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -450,7 +450,8 @@ miDCMakeGC( gcvals[0] = IncludeInferiors; gcvals[1] = FALSE; pGC = CreateGC((DrawablePtr)pWin, - GCSubwindowMode|GCGraphicsExposures, gcvals, &status); + GCSubwindowMode|GCGraphicsExposures, gcvals, &status, + (XID)0, serverClient); if (pGC && pWin->drawable.pScreen->DrawGuarantee) (*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeVisBack); *ppGC = pGC; @@ -746,7 +747,7 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) if (!pScreenPriv->pMoveGC) { pScreenPriv->pMoveGC = CreateGC ((DrawablePtr)pTemp, - GCGraphicsExposures, &gcval, &status); + GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); if (!pScreenPriv->pMoveGC) return FALSE; } @@ -782,14 +783,14 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) if (!pScreenPriv->pPixSourceGC) { pScreenPriv->pPixSourceGC = CreateGC ((DrawablePtr)pTemp, - GCGraphicsExposures, &gcval, &status); + GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); if (!pScreenPriv->pPixSourceGC) return FALSE; } if (!pScreenPriv->pPixMaskGC) { pScreenPriv->pPixMaskGC = CreateGC ((DrawablePtr)pTemp, - GCGraphicsExposures, &gcval, &status); + GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); if (!pScreenPriv->pPixMaskGC) return FALSE; } diff --git a/mi/miexpose.c b/mi/miexpose.c index df04bd291..332b21636 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -763,7 +763,7 @@ int what; if (!ResType && !(ResType = CreateNewResourceType(tossGC))) return; screenContext[i] = CreateGC((DrawablePtr)pWin, (BITS32) 0, - (XID *)NULL, &status); + (XID *)NULL, &status, 0, serverClient); if (!screenContext[i]) return; numGCs++; diff --git a/miext/cw/cw.c b/miext/cw/cw.c index 7ee013be1..b03f5e3a8 100644 --- a/miext/cw/cw.c +++ b/miext/cw/cw.c @@ -123,7 +123,7 @@ cwCreateBackingGC(GCPtr pGC, DrawablePtr pDrawable) pBackingDrawable = cwGetBackingDrawable(pDrawable, &x_off, &y_off); pPriv->pBackingGC = CreateGC(pBackingDrawable, GCGraphicsExposures, - &noexpose, &status); + &noexpose, &status, (XID)0, serverClient); if (status != Success) return FALSE; From b424e01ec59d9600a02823f1522949325797268c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 14 Aug 2007 13:20:42 -0400 Subject: [PATCH 080/552] xace: add hooks + new access codes: core protocol property requests --- dix/property.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dix/property.c b/dix/property.c index c0de5b3f4..5f12dec3c 100644 --- a/dix/property.c +++ b/dix/property.c @@ -129,7 +129,7 @@ ProcRotateProperties(ClientPtr client) REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2); UpdateCurrentTime(); - rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); if (rc != Success) return rc; if (!stuff->nAtoms) @@ -217,7 +217,7 @@ ProcChangeProperty(ClientPtr client) totalSize = len * sizeInBytes; REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize); - err = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + err = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); if (err != Success) return err; if (!ValidAtom(stuff->property)) @@ -277,7 +277,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, pProp->size = len; pProp->devPrivates = NULL; rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, - DixCreateAccess); + DixCreateAccess|DixWriteAccess); if (rc != Success) { xfree(data); xfree(pProp); @@ -449,13 +449,15 @@ ProcGetProperty(ClientPtr client) int rc; WindowPtr pWin; xGetPropertyReply reply; - Mask access_mode = DixReadAccess; + Mask access_mode = DixGetPropAccess; REQUEST(xGetPropertyReq); REQUEST_SIZE_MATCH(xGetPropertyReq); - if (stuff->delete) + if (stuff->delete) { UpdateCurrentTime(); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + access_mode |= DixSetPropAccess; + } + rc = dixLookupWindow(&pWin, stuff->window, client, access_mode); if (rc != Success) return rc; @@ -490,6 +492,7 @@ ProcGetProperty(ClientPtr client) if (!pProp) return NullPropertyReply(client, None, 0, &reply); + access_mode = DixReadAccess; if (stuff->delete) access_mode |= DixDestroyAccess; @@ -581,7 +584,7 @@ ProcListProperties(ClientPtr client) REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->id, client, DixListPropAccess); if (rc != Success) return rc; @@ -625,7 +628,7 @@ ProcDeleteProperty(ClientPtr client) REQUEST_SIZE_MATCH(xDeletePropertyReq); UpdateCurrentTime(); - result = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + result = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); if (result != Success) return result; if (!ValidAtom(stuff->property)) From dc84bb3418933297a8c005070902d9a91ed3d18f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 15 Aug 2007 14:13:53 -0400 Subject: [PATCH 081/552] xace: add hooks + new access codes: core protocol cursor requests --- dix/cursor.c | 92 ++++++++++++++++++++++++++---------------------- dix/dispatch.c | 47 ++++++++++++++----------- dix/events.c | 18 +++++----- dix/window.c | 3 +- include/cursor.h | 26 ++++---------- render/render.c | 26 ++++++++------ xfixes/cursor.c | 8 +++-- 7 files changed, 113 insertions(+), 107 deletions(-) diff --git a/dix/cursor.c b/dix/cursor.c index d903124c4..b188e3f98 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -59,6 +59,7 @@ SOFTWARE. #include "cursorstr.h" #include "dixfontstr.h" #include "opaque.h" +#include "xace.h" typedef struct _GlyphShare { FontPtr font; @@ -161,23 +162,25 @@ CheckForEmptyMask(CursorBitsPtr bits) * \param pmaskbits server-defined padding * \param argb no padding */ -CursorPtr -AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, - CursorMetricPtr cm, - unsigned foreRed, unsigned foreGreen, unsigned foreBlue, - unsigned backRed, unsigned backGreen, unsigned backBlue) +int +AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, + CARD32 *argb, CursorMetricPtr cm, + unsigned foreRed, unsigned foreGreen, unsigned foreBlue, + unsigned backRed, unsigned backGreen, unsigned backBlue, + CursorPtr *ppCurs, ClientPtr client, XID cid) { CursorBitsPtr bits; CursorPtr pCurs; - int nscr; + int rc, nscr; ScreenPtr pscr; + *ppCurs = NULL; pCurs = (CursorPtr)xalloc(sizeof(CursorRec) + sizeof(CursorBits)); if (!pCurs) { xfree(psrcbits); xfree(pmaskbits); - return (CursorPtr)NULL; + return BadAlloc; } bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec)); bits->source = psrcbits; @@ -207,6 +210,15 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, + DixCreateAccess, pCurs); + if (rc != Success) { + FreeCursorBits(bits); + xfree(pCurs); + return rc; + } + /* * realize the cursor for every screen */ @@ -222,59 +234,43 @@ AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, } FreeCursorBits(bits); xfree(pCurs); - return (CursorPtr)NULL; + return BadAlloc; } } - return pCurs; -} - -/** - * - * \param psrcbits server-defined padding - * \param pmaskbits server-defined padding - */ -CursorPtr -AllocCursor(unsigned char *psrcbits, unsigned char *pmaskbits, - CursorMetricPtr cm, - unsigned foreRed, unsigned foreGreen, unsigned foreBlue, - unsigned backRed, unsigned backGreen, unsigned backBlue) -{ - return AllocCursorARGB (psrcbits, pmaskbits, (CARD32 *) 0, cm, - foreRed, foreGreen, foreBlue, - backRed, backGreen, backBlue); + *ppCurs = pCurs; + return rc; } int AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, unsigned foreRed, unsigned foreGreen, unsigned foreBlue, unsigned backRed, unsigned backGreen, unsigned backBlue, - CursorPtr *ppCurs, ClientPtr client) + CursorPtr *ppCurs, ClientPtr client, XID cid) { FontPtr sourcefont, maskfont; unsigned char *srcbits; unsigned char *mskbits; CursorMetricRec cm; - int res; + int rc; CursorBitsPtr bits; CursorPtr pCurs; int nscr; ScreenPtr pscr; GlyphSharePtr pShare; - sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT, - DixReadAccess); - maskfont = (FontPtr) SecurityLookupIDByType(client, mask, RT_FONT, - DixReadAccess); - - if (!sourcefont) + rc = dixLookupResource((pointer *)&sourcefont, source, RT_FONT, client, + DixUseAccess); + if (rc != Success) { client->errorValue = source; - return(BadFont); + return (rc == BadValue) ? BadFont : rc; } - if (!maskfont && (mask != None)) + rc = dixLookupResource((pointer *)&maskfont, mask, RT_FONT, client, + DixUseAccess); + if (rc != Success && mask != None) { client->errorValue = mask; - return(BadFont); + return (rc == BadValue) ? BadFont : rc; } if (sourcefont != maskfont) pShare = (GlyphSharePtr)NULL; @@ -322,13 +318,13 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, client->errorValue = maskChar; return BadValue; } - if ((res = ServerBitsFromGlyph(maskfont, maskChar, &cm, &mskbits)) != 0) - return res; + if ((rc = ServerBitsFromGlyph(maskfont, maskChar, &cm, &mskbits))) + return rc; } - if ((res = ServerBitsFromGlyph(sourcefont, sourceChar, &cm, &srcbits)) != 0) + if ((rc = ServerBitsFromGlyph(sourcefont, sourceChar, &cm, &srcbits))) { xfree(mskbits); - return res; + return rc; } if (sourcefont != maskfont) { @@ -398,6 +394,15 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, + DixCreateAccess, pCurs); + if (rc != Success) { + FreeCursorBits(bits); + xfree(pCurs); + return rc; + } + /* * realize the cursor for every screen */ @@ -447,7 +452,8 @@ CreateRootCursor(char *unused1, unsigned int unused2) cm.xhot = 0; cm.yhot = 0; - curs = AllocCursor(NULL, NULL, &cm, 0, 0, 0, 0, 0, 0); + AllocARGBCursor(NULL, NULL, NULL, &cm, 0, 0, 0, 0, 0, 0, + &curs, serverClient, (XID)0); if (curs == NullCursor) return NullCursor; @@ -461,8 +467,8 @@ CreateRootCursor(char *unused1, unsigned int unused2) cursorfont = (FontPtr)LookupIDByType(fontID, RT_FONT); if (!cursorfont) return NullCursor; - if (AllocGlyphCursor(fontID, 0, fontID, 1, - 0, 0, 0, ~0, ~0, ~0, &curs, serverClient) != Success) + if (AllocGlyphCursor(fontID, 0, fontID, 1, 0, 0, 0, ~0, ~0, ~0, + &curs, serverClient, (XID)0) != Success) return NullCursor; #endif diff --git a/dix/dispatch.c b/dix/dispatch.c index 4260799bd..4a9064db7 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3070,28 +3070,28 @@ ProcCreateCursor (ClientPtr client) unsigned short width, height; long n; CursorMetricRec cm; - + int rc; REQUEST(xCreateCursorReq); REQUEST_SIZE_MATCH(xCreateCursorReq); LEGAL_NEW_RESOURCE(stuff->cid, client); - src = (PixmapPtr)SecurityLookupIDByType(client, stuff->source, - RT_PIXMAP, DixReadAccess); - msk = (PixmapPtr)SecurityLookupIDByType(client, stuff->mask, - RT_PIXMAP, DixReadAccess); - if ( src == (PixmapPtr)NULL) - { + rc = dixLookupResource((pointer *)&src, stuff->source, RT_PIXMAP, client, + DixReadAccess); + if (rc != Success) { client->errorValue = stuff->source; - return (BadPixmap); + return (rc == BadValue) ? BadPixmap : rc; } - if ( msk == (PixmapPtr)NULL) + + rc = dixLookupResource((pointer *)&msk, stuff->mask, RT_PIXMAP, client, + DixReadAccess); + if (rc != Success) { if (stuff->mask != None) { client->errorValue = stuff->mask; - return (BadPixmap); + return (rc == BadValue) ? BadPixmap : rc; } } else if ( src->drawable.width != msk->drawable.width @@ -3139,13 +3139,17 @@ ProcCreateCursor (ClientPtr client) cm.height = height; cm.xhot = stuff->x; cm.yhot = stuff->y; - pCursor = AllocCursor( srcbits, mskbits, &cm, - stuff->foreRed, stuff->foreGreen, stuff->foreBlue, - stuff->backRed, stuff->backGreen, stuff->backBlue); + rc = AllocARGBCursor(srcbits, mskbits, NULL, &cm, + stuff->foreRed, stuff->foreGreen, stuff->foreBlue, + stuff->backRed, stuff->backGreen, stuff->backBlue, + &pCursor, client, stuff->cid); - if (pCursor && AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) - return (client->noClientException); - return BadAlloc; + if (rc != Success) + return rc; + if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) + return BadAlloc; + + return client->noClientException; } int @@ -3163,7 +3167,7 @@ ProcCreateGlyphCursor (ClientPtr client) stuff->mask, stuff->maskChar, stuff->foreRed, stuff->foreGreen, stuff->foreBlue, stuff->backRed, stuff->backGreen, stuff->backBlue, - &pCursor, client); + &pCursor, client, stuff->cid); if (res != Success) return res; if (AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) @@ -3176,12 +3180,13 @@ int ProcFreeCursor (ClientPtr client) { CursorPtr pCursor; + int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->id, - RT_CURSOR, DixDestroyAccess); - if (pCursor) + rc = dixLookupResource((pointer *)&pCursor, stuff->id, RT_CURSOR, client, + DixDestroyAccess); + if (rc == Success) { FreeResource(stuff->id, RT_NONE); return (client->noClientException); @@ -3189,7 +3194,7 @@ ProcFreeCursor (ClientPtr client) else { client->errorValue = stuff->id; - return (BadCursor); + return (rc == BadValue) ? BadCursor : rc; } } diff --git a/dix/events.c b/dix/events.c index 3fbe9b829..f109dad4d 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4115,12 +4115,12 @@ ProcChangeActivePointerGrab(ClientPtr client) newCursor = NullCursor; else { - newCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, DixReadAccess); - if (!newCursor) + int rc = dixLookupResource((pointer *)&newCursor, stuff->cursor, + RT_CURSOR, client, DixUseAccess); + if (rc != Success) { client->errorValue = stuff->cursor; - return BadCursor; + return (rc == BadValue) ? BadCursor : rc; } } if (!grab) @@ -4889,18 +4889,18 @@ int ProcRecolorCursor(ClientPtr client) { CursorPtr pCursor; - int nscr; + int rc, nscr; ScreenPtr pscr; Bool displayed; REQUEST(xRecolorCursorReq); REQUEST_SIZE_MATCH(xRecolorCursorReq); - pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, DixWriteAccess); - if ( !pCursor) + rc = dixLookupResource((pointer *)&pCursor, stuff->cursor, RT_CURSOR, + client, DixWriteAccess); + if (rc != Success) { client->errorValue = stuff->cursor; - return (BadCursor); + return (rc == BadValue) ? BadCursor : rc; } pCursor->foreRed = stuff->foreRed; diff --git a/dix/window.c b/dix/window.c index 3addc73cd..9d1947a53 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3541,7 +3541,8 @@ TileScreenSaver(int i, int kind) { for (j=0; jcid, client); @@ -1659,16 +1659,20 @@ ProcRenderCreateCursor (ClientPtr client) cm.height = height; cm.xhot = stuff->x; cm.yhot = stuff->y; - pCursor = AllocCursorARGB (srcbits, mskbits, argbbits, &cm, - GetColor(twocolor[0], 16), - GetColor(twocolor[0], 8), - GetColor(twocolor[0], 0), - GetColor(twocolor[1], 16), - GetColor(twocolor[1], 8), - GetColor(twocolor[1], 0)); - if (pCursor && AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) - return (client->noClientException); - return BadAlloc; + rc = AllocARGBCursor(srcbits, mskbits, argbbits, &cm, + GetColor(twocolor[0], 16), + GetColor(twocolor[0], 8), + GetColor(twocolor[0], 0), + GetColor(twocolor[1], 16), + GetColor(twocolor[1], 8), + GetColor(twocolor[1], 0), + &pCursor, client, stuff->cid); + if (rc != Success) + return rc; + if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) + return BadAlloc; + + return client->noClientException; } static int diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 401c403c8..450f366f2 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -980,6 +980,7 @@ createInvisibleCursor (void) CursorPtr pCursor; static unsigned int *psrcbits, *pmaskbits; CursorMetricRec cm; + int rc; psrcbits = (unsigned int *) xalloc(4); pmaskbits = (unsigned int *) xalloc(4); @@ -994,12 +995,13 @@ createInvisibleCursor (void) cm.xhot = 0; cm.yhot = 0; - pCursor = AllocCursor( + rc = AllocARGBCursor( (unsigned char *)psrcbits, (unsigned char *)pmaskbits, - &cm, + NULL, &cm, 0, 0, 0, - 0, 0, 0); + 0, 0, 0, + &pCursor, serverClient, (XID)0); return pCursor; } From 3c9553ac2cac7f3a41966def44a50d722d7e645b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 15 Aug 2007 14:14:25 -0400 Subject: [PATCH 082/552] xace: rename hostlist security hook to "server" as this hook will be used for other types of server access besides just the host list. --- Xext/security.c | 8 ++++---- Xext/xace.c | 4 ++-- Xext/xace.h | 2 +- Xext/xacestr.h | 6 ++++-- Xext/xselinux.c | 8 ++++---- dix/dispatch.c | 2 +- os/access.c | 2 +- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 9e3b2dd9d..0059245c1 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1222,10 +1222,10 @@ SecurityCheckExtAccess(CallbackListPtr *pcbl, pointer unused, } static void -SecurityCheckHostlistAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) +SecurityCheckServerAccess(CallbackListPtr *pcbl, pointer unused, + pointer calldata) { - XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata; + XaceServerAccessRec *rec = (XaceServerAccessRec*)calldata; if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) { @@ -1851,5 +1851,5 @@ SecurityExtensionInit(INITARGS) XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL); XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL); XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL); - XaceRC(XACE_HOSTLIST_ACCESS, SecurityCheckHostlistAccess, NULL); + XaceRC(XACE_SERVER_ACCESS, SecurityCheckServerAccess, NULL); } /* SecurityExtensionInit */ diff --git a/Xext/xace.c b/Xext/xace.c index 50361d06b..de1887f31 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -135,8 +135,8 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_HOSTLIST_ACCESS: { - XaceHostlistAccessRec rec = { + case XACE_SERVER_ACCESS: { + XaceServerAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, Mask), Success /* default allow */ diff --git a/Xext/xace.h b/Xext/xace.h index e2982cfe2..f7ff205cc 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -49,7 +49,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_MAP_ACCESS 6 #define XACE_BACKGRND_ACCESS 7 #define XACE_EXT_ACCESS 8 -#define XACE_HOSTLIST_ACCESS 9 +#define XACE_SERVER_ACCESS 9 #define XACE_SELECTION_ACCESS 10 #define XACE_SCREEN_ACCESS 11 #define XACE_SCREENSAVER_ACCESS 12 diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 8d092514d..e4db3a12c 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -86,12 +86,12 @@ typedef struct { int status; } XaceExtAccessRec; -/* XACE_HOSTLIST_ACCESS */ +/* XACE_SERVER_ACCESS */ typedef struct { ClientPtr client; Mask access_mode; int status; -} XaceHostlistAccessRec; +} XaceServerAccessRec; /* XACE_SELECTION_ACCESS */ typedef struct { @@ -101,6 +101,8 @@ typedef struct { int status; } XaceSelectionAccessRec; +/* XACE_SCREEN_ACCESS */ +/* XACE_SCREENSAVER_ACCESS */ typedef struct { ClientPtr client; ScreenPtr screen; diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 038ec59c4..9cb2f326b 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1175,15 +1175,15 @@ XSELinuxDrawable(CallbackListPtr *pcbl, pointer unused, pointer calldata) } /* XSELinuxDrawable */ static void -XSELinuxHostlist(CallbackListPtr *pcbl, pointer unused, pointer calldata) +XSELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata; + XaceServerAccessRec *rec = (XaceServerAccessRec*)calldata; access_vector_t perm = (rec->access_mode == DixReadAccess) ? XSERVER__GETHOSTLIST : XSERVER__SETHOSTLIST; if (ServerPerm(rec->client, SECCLASS_XSERVER, perm) != Success) rec->status = BadAccess; -} /* XSELinuxHostlist */ +} /* XSELinuxServer */ /* Extension callbacks */ static void @@ -1397,7 +1397,7 @@ XSELinuxExtensionInit(INITARGS) XaceRegisterCallback(XACE_EXT_DISPATCH, XSELinuxExtDispatch, NULL); XaceRegisterCallback(XACE_RESOURCE_ACCESS, XSELinuxResLookup, NULL); XaceRegisterCallback(XACE_MAP_ACCESS, XSELinuxMap, NULL); - XaceRegisterCallback(XACE_HOSTLIST_ACCESS, XSELinuxHostlist, NULL); + XaceRegisterCallback(XACE_SERVER_ACCESS, XSELinuxServer, NULL); XaceRegisterCallback(XACE_BACKGRND_ACCESS, XSELinuxBackgrnd, NULL); XaceRegisterCallback(XACE_DRAWABLE_ACCESS, XSELinuxDrawable, NULL); XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); diff --git a/dix/dispatch.c b/dix/dispatch.c index 4a9064db7..8cca44bfc 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3346,7 +3346,7 @@ ProcListHosts(ClientPtr client) REQUEST_SIZE_MATCH(xListHostsReq); /* untrusted clients can't list hosts */ - result = XaceHook(XACE_HOSTLIST_ACCESS, client, DixReadAccess); + result = XaceHook(XACE_SERVER_ACCESS, client, DixReadAccess); if (result != Success) return result; diff --git a/os/access.c b/os/access.c index 8d96e0420..b049acc04 100644 --- a/os/access.c +++ b/os/access.c @@ -1500,7 +1500,7 @@ AuthorizedClient(ClientPtr client) return TRUE; /* untrusted clients can't change host access */ - if (XaceHook(XACE_HOSTLIST_ACCESS, client, DixWriteAccess) != Success) + if (XaceHook(XACE_SERVER_ACCESS, client, DixWriteAccess) != Success) return FALSE; return LocalClient(client); From 568ae737d1d5d476a0bf85659d88910c4e0ef5e0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 15 Aug 2007 14:14:45 -0400 Subject: [PATCH 083/552] xace: add hooks + new access codes: core protocol server requests --- dix/dispatch.c | 11 ++++++++--- dix/dixfonts.c | 26 +++++++++++++++++++++----- hw/dmx/dmxfont.c | 4 ++-- include/dixfont.h | 6 ++++-- include/os.h | 2 +- os/access.c | 32 +++++++++++++++++++------------- os/connection.c | 9 +++++++-- 7 files changed, 62 insertions(+), 28 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 8cca44bfc..0bf92de3c 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1169,6 +1169,7 @@ ProcConvertSelection(ClientPtr client) int ProcGrabServer(ClientPtr client) { + int rc; REQUEST_SIZE_MATCH(xReq); if (grabState != GrabNone && client != grabClient) { @@ -1178,7 +1179,9 @@ ProcGrabServer(ClientPtr client) IgnoreClient(client); return(client->noClientException); } - OnlyListenToOneClient(client); + rc = OnlyListenToOneClient(client); + if (rc != Success) + return rc; grabState = GrabKickout; grabClient = client; @@ -3478,12 +3481,14 @@ int ProcGetFontPath(ClientPtr client) { xGetFontPathReply reply; - int stringLens, numpaths; + int rc, stringLens, numpaths; unsigned char *bufferStart; /* REQUEST (xReq); */ REQUEST_SIZE_MATCH(xReq); - bufferStart = GetFontPath(&numpaths, &stringLens); + rc = GetFontPath(client, &numpaths, &stringLens, &bufferStart); + if (rc != Success) + return rc; reply.type = X_Reply; reply.sequenceNumber = client->sequence; diff --git a/dix/dixfonts.c b/dix/dixfonts.c index c21b3ecb3..4ea630210 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -65,6 +65,7 @@ Equipment Corporation. #include "dixfontstr.h" #include "closestr.h" #include "dixfont.h" +#include "xace.h" #ifdef DEBUG #include @@ -833,6 +834,10 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, if (length > XLFDMAXFONTNAMELEN) return BadAlloc; + i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); + if (i != Success) + return i; + if (!(c = (LFclosurePtr) xalloc(sizeof *c))) return BadAlloc; c->fpe_list = (FontPathElementPtr *) @@ -1105,6 +1110,10 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, if (length > XLFDMAXFONTNAMELEN) return BadAlloc; + i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); + if (i != Success) + return i; + if (!(c = (LFWIclosurePtr) xalloc(sizeof *c))) goto badAlloc; c->fpe_list = (FontPathElementPtr *) @@ -1771,7 +1780,9 @@ bail: int SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) { - int err = Success; + int err = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess); + if (err != Success) + return err; if (npaths == 0) { if (SetDefaultFontPath(defaultFontPath) != Success) @@ -1823,14 +1834,18 @@ SetDefaultFontPath(char *path) return err; } -unsigned char * -GetFontPath(int *count, int *length) +int +GetFontPath(ClientPtr client, int *count, int *length, unsigned char **result) { int i; unsigned char *c; int len; FontPathElementPtr fpe; + i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); + if (i != Success) + return i; + len = 0; for (i = 0; i < num_fpes; i++) { fpe = font_path_elements[i]; @@ -1838,7 +1853,7 @@ GetFontPath(int *count, int *length) } font_path_string = (unsigned char *) xrealloc(font_path_string, len); if (!font_path_string) - return NULL; + return BadAlloc; c = font_path_string; *length = 0; @@ -1850,7 +1865,8 @@ GetFontPath(int *count, int *length) c += fpe->name_length; } *count = num_fpes; - return font_path_string; + *result = font_path_string; + return Success; } _X_EXPORT int diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c index 500b5682a..e5f86350a 100644 --- a/hw/dmx/dmxfont.c +++ b/hw/dmx/dmxfont.c @@ -66,7 +66,7 @@ static char **dmxGetFontPath(int *npaths) char *newfp; int len, l, i; - paths = GetFontPath(npaths, &len); + GetFontPath(serverClient, npaths, &len, &paths); newfp = xalloc(*npaths + len); c = (unsigned char *)newfp; @@ -194,7 +194,7 @@ static int dmxProcSetFontPath(ClientPtr client) if (total >= 4) return BadLength; - tmpFontPath = GetFontPath(&nOldPaths, &lenOldPaths); + GetFontPath(serverClient, &nOldPaths, &lenOldPaths, &tmpFontPath); oldFontPath = xalloc(nOldPaths + lenOldPaths); memmove(oldFontPath, tmpFontPath, nOldPaths + lenOldPaths); diff --git a/include/dixfont.h b/include/dixfont.h index 709da6272..54017ce2d 100644 --- a/include/dixfont.h +++ b/include/dixfont.h @@ -105,8 +105,10 @@ extern int SetFontPath(ClientPtr /*client*/, extern int SetDefaultFontPath(char * /*path*/); -extern unsigned char *GetFontPath(int * /*count*/, - int * /*length*/); +extern int GetFontPath(ClientPtr client, + int *count, + int *length, + unsigned char **result); extern int LoadGlyphs(ClientPtr /*client*/, FontPtr /*pfont*/, diff --git a/include/os.h b/include/os.h index 3d689478e..891f331c9 100644 --- a/include/os.h +++ b/include/os.h @@ -155,7 +155,7 @@ extern void AddEnabledDevice(int /*fd*/); extern void RemoveEnabledDevice(int /*fd*/); -extern void OnlyListenToOneClient(ClientPtr /*client*/); +extern int OnlyListenToOneClient(ClientPtr /*client*/); extern void ListenToAllClients(void); diff --git a/os/access.c b/os/access.c index b049acc04..33b2eb6a7 100644 --- a/os/access.c +++ b/os/access.c @@ -1493,17 +1493,20 @@ LocalClientCredAndGroups(ClientPtr client, int *pUid, int *pGid, #endif } -static Bool +static int AuthorizedClient(ClientPtr client) { + int rc; + if (!client || defeatAccessControl) - return TRUE; + return Success; /* untrusted clients can't change host access */ - if (XaceHook(XACE_SERVER_ACCESS, client, DixWriteAccess) != Success) - return FALSE; + rc = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess); + if (rc != Success) + return rc; - return LocalClient(client); + return LocalClient(client) ? Success : BadAccess; } /* Add a host to the access control list. This is the external interface @@ -1515,10 +1518,11 @@ AddHost (ClientPtr client, unsigned length, /* of bytes in pAddr */ pointer pAddr) { - int len; + int rc, len; - if (!AuthorizedClient(client)) - return(BadAccess); + rc = AuthorizedClient(client); + if (rc != Success) + return rc; switch (family) { case FamilyLocalHost: len = length; @@ -1612,11 +1616,12 @@ RemoveHost ( unsigned length, /* of bytes in pAddr */ pointer pAddr) { - int len; + int rc, len; register HOST *host, **prev; - if (!AuthorizedClient(client)) - return(BadAccess); + rc = AuthorizedClient(client); + if (rc != Success) + return rc; switch (family) { case FamilyLocalHost: len = length; @@ -1873,8 +1878,9 @@ ChangeAccessControl( ClientPtr client, int fEnabled) { - if (!AuthorizedClient(client)) - return BadAccess; + int rc = AuthorizedClient(client); + if (rc != Success) + return rc; AccessEnabled = fEnabled; return Success; } diff --git a/os/connection.c b/os/connection.c index c1152aad7..afe392c66 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1081,11 +1081,15 @@ RemoveEnabledDevice(int fd) * This routine is "undone" by ListenToAllClients() *****************/ -void +int OnlyListenToOneClient(ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; - int connection = oc->fd; + int rc, connection = oc->fd; + + rc = XaceHook(XACE_SERVER_ACCESS, client, DixGrabAccess); + if (rc != Success) + return rc; if (! GrabInProgress) { @@ -1106,6 +1110,7 @@ OnlyListenToOneClient(ClientPtr client) XFD_ORSET(&AllSockets, &AllSockets, &AllClients); GrabInProgress = client->index; } + return rc; } /**************** From b82557c9fb60f11fd2696c8fb2ae17b9dfd915ed Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 10:36:05 -0400 Subject: [PATCH 084/552] xace: add hooks + new access codes: core protocol screensaver requests --- Xext/dpms.c | 4 ++-- Xext/dpmsproc.h | 4 +++- Xext/dpmsstubs.c | 2 +- Xext/saver.c | 4 ++-- Xext/xtest.c | 2 +- dix/dispatch.c | 26 ++++++++++++++++++++++---- dix/main.c | 4 ++-- dix/window.c | 16 +++++++++++----- hw/darwin/darwinEvents.c | 2 +- hw/dmx/dmxdpms.c | 2 +- hw/xfree86/common/xf86DPMS.c | 16 ++++++++++------ hw/xfree86/common/xf86Events.c | 6 +++--- hw/xfree86/common/xf86Init.c | 2 +- hw/xfree86/common/xf86PM.c | 2 +- include/window.h | 7 ++++--- mi/mieq.c | 4 ++-- os/WaitFor.c | 4 ++-- 17 files changed, 69 insertions(+), 38 deletions(-) diff --git a/Xext/dpms.c b/Xext/dpms.c index aced40639..97622cb96 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -218,7 +218,7 @@ ProcDPMSDisable(client) REQUEST_SIZE_MATCH(xDPMSDisableReq); - DPMSSet(DPMSModeOn); + DPMSSet(client, DPMSModeOn); DPMSEnabled = FALSE; @@ -253,7 +253,7 @@ ProcDPMSForceLevel(client) return BadValue; } - DPMSSet(stuff->level); + DPMSSet(client, stuff->level); return(client->noClientException); } diff --git a/Xext/dpmsproc.h b/Xext/dpmsproc.h index f5485ea79..d57f57318 100644 --- a/Xext/dpmsproc.h +++ b/Xext/dpmsproc.h @@ -8,7 +8,9 @@ #ifndef _DPMSPROC_H_ #define _DPMSPROC_H_ -void DPMSSet(int level); +#include "dixstruct.h" + +int DPMSSet(ClientPtr client, int level); int DPMSGet(int *plevel); Bool DPMSSupported(void); diff --git a/Xext/dpmsstubs.c b/Xext/dpmsstubs.c index 9f99a2d22..8d58935da 100644 --- a/Xext/dpmsstubs.c +++ b/Xext/dpmsstubs.c @@ -46,7 +46,7 @@ int DPMSGet(int *plevel) return -1; } -void DPMSSet(int level) +int DPMSSet(ClientPtr client, int level) { } diff --git a/Xext/saver.c b/Xext/saver.c index a9f1dd36c..dabfbea1b 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -454,8 +454,8 @@ ScreenSaverFreeAttr (value, id) pPriv->attr = NULL; if (pPriv->hasWindow) { - SaveScreens (SCREEN_SAVER_FORCER, ScreenSaverReset); - SaveScreens (SCREEN_SAVER_FORCER, ScreenSaverActive); + SaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + SaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverActive); } CheckScreenPrivate (pScreen); return TRUE; diff --git a/Xext/xtest.c b/Xext/xtest.c index 94d8974b6..8d879c7df 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -458,7 +458,7 @@ ProcXTestFakeInput(client) break; } if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset); + SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); ev->u.keyButtonPointer.time = currentTime.milliseconds; (*dev->public.processInputProc)(ev, dev, nev); return client->noClientException; diff --git a/dix/dispatch.c b/dix/dispatch.c index 0bf92de3c..2dc32a525 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3244,10 +3244,17 @@ ProcQueryBestSize (ClientPtr client) int ProcSetScreenSaver (ClientPtr client) { - int blankingOption, exposureOption; + int rc, i, blankingOption, exposureOption; REQUEST(xSetScreenSaverReq); - REQUEST_SIZE_MATCH(xSetScreenSaverReq); + + for (i = 0; i < screenInfo.numScreens; i++) { + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], + DixSetAttrAccess); + if (rc != Success) + return rc; + } + blankingOption = stuff->preferBlank; if ((blankingOption != DontPreferBlanking) && (blankingOption != PreferBlanking) && @@ -3301,8 +3308,16 @@ int ProcGetScreenSaver(ClientPtr client) { xGetScreenSaverReply rep; - + int rc, i; REQUEST_SIZE_MATCH(xReq); + + for (i = 0; i < screenInfo.numScreens; i++) { + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], + DixGetAttrAccess); + if (rc != Success) + return rc; + } + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -3523,6 +3538,7 @@ ProcChangeCloseDownMode(ClientPtr client) int ProcForceScreenSaver(ClientPtr client) { + int rc; REQUEST(xForceScreenSaverReq); REQUEST_SIZE_MATCH(xForceScreenSaverReq); @@ -3533,7 +3549,9 @@ int ProcForceScreenSaver(ClientPtr client) client->errorValue = stuff->mode; return BadValue; } - SaveScreens(SCREEN_SAVER_FORCER, (int)stuff->mode); + rc = SaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode); + if (rc != Success) + return rc; return client->noClientException; } diff --git a/dix/main.c b/dix/main.c index 4ae09dc4e..3e5d0e438 100644 --- a/dix/main.c +++ b/dix/main.c @@ -430,7 +430,7 @@ main(int argc, char *argv[], char *envp[]) for (i = 0; i < screenInfo.numScreens; i++) InitRootWindow(WindowTable[i]); DefineInitialRootWindow(WindowTable[0]); - SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset); + SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); #ifdef PANORAMIX if (!noPanoramiXExtension) { @@ -449,7 +449,7 @@ main(int argc, char *argv[], char *envp[]) /* Now free up whatever must be freed */ if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset); + SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); FreeScreenSaverTimer(); CloseDownExtensions(); diff --git a/dix/window.c b/dix/window.c index 9d1947a53..597c55dbb 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3369,12 +3369,10 @@ static void DrawLogo( ); #endif -_X_EXPORT void -SaveScreens(int on, int mode) +_X_EXPORT int +SaveScreens(ClientPtr client, int on, int mode) { - int i; - int what; - int type; + int rc, i, what, type; if (on == SCREEN_SAVER_FORCER) { @@ -3393,6 +3391,13 @@ SaveScreens(int on, int mode) if (what == screenIsSaved) type = SCREEN_SAVER_CYCLE; } + + for (i = 0; i < screenInfo.numScreens; i++) { + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], + DixShowAccess | DixHideAccess); + if (rc != Success) + return rc; + } for (i = 0; i < screenInfo.numScreens; i++) { if (on == SCREEN_SAVER_FORCER) @@ -3480,6 +3485,7 @@ SaveScreens(int on, int mode) screenIsSaved = what; if (mode == ScreenSaverReset) SetScreenSaverTimer(); + return Success; } static Bool diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 3d7f268ca..97ad8577e 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -276,7 +276,7 @@ void ProcessInputEvents(void) { while (darwinEventQueue.head != darwinEventQueue.tail) { if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset); + SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); e = &darwinEventQueue.events[darwinEventQueue.head]; xe = e->event; diff --git a/hw/dmx/dmxdpms.c b/hw/dmx/dmxdpms.c index 5c176dfc3..ea0d66c3c 100644 --- a/hw/dmx/dmxdpms.c +++ b/hw/dmx/dmxdpms.c @@ -175,7 +175,7 @@ void dmxDPMSTerm(DMXScreenInfo *dmxScreen) void dmxDPMSWakeup(void) { if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens(SCREEN_SAVER_OFF, ScreenSaverReset); + SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); #ifdef DPMSExtension if (DPMSPowerLevel) DPMSSet(0); #endif diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index 3aa83e882..a4ae67e46 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -144,20 +144,23 @@ DPMSClose(int i, ScreenPtr pScreen) * Device dependent DPMS mode setting hook. This is called whenever * the DPMS mode is to be changed. */ -_X_EXPORT void -DPMSSet(int level) +_X_EXPORT int +DPMSSet(ClientPtr client, int level) { - int i; + int rc, i; DPMSPtr pDPMS; ScrnInfoPtr pScrn; DPMSPowerLevel = level; if (DPMSIndex < 0) - return; + return Success; - if (level != DPMSModeOn) - SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverActive); + if (level != DPMSModeOn) { + rc = SaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive); + if (rc != Success) + return rc; + } /* For each screen, set the DPMS level */ for (i = 0; i < xf86NumScreens; i++) { @@ -168,6 +171,7 @@ DPMSSet(int level) pScrn->DPMSSet(pScrn, level, 0); } } + return Success; } diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index dd9c34e5c..7c2c2503f 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -853,7 +853,7 @@ xf86VTSwitch() #endif #ifdef DPMSExtension if (DPMSPowerLevel != DPMSModeOn) - DPMSSet(DPMSModeOn); + DPMSSet(serverClient, DPMSModeOn); #endif for (i = 0; i < xf86NumScreens; i++) { if (!(dispatchException & DE_TERMINATE)) @@ -902,7 +902,7 @@ xf86VTSwitch() (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE); } } - SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset); + SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { @@ -966,7 +966,7 @@ xf86VTSwitch() } /* Turn screen saver off when switching back */ - SaveScreens(SCREEN_SAVER_FORCER,ScreenSaverReset); + SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index bf7dac6da..27bc9ad0f 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1086,7 +1086,7 @@ AbortDDX() #endif #ifdef DPMSExtension /* Turn screens back on */ if (DPMSPowerLevel != DPMSModeOn) - DPMSSet(DPMSModeOn); + DPMSSet(serverClient, DPMSModeOn); #endif if (xf86Screens) { if (xf86Screens[0]->vtSema) diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c index a6bcc3421..278a51474 100644 --- a/hw/xfree86/common/xf86PM.c +++ b/hw/xfree86/common/xf86PM.c @@ -116,7 +116,7 @@ resume(pmEvent event, Bool undo) if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE); } - SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset); + SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { EnableDevice(pInfo->dev); diff --git a/include/window.h b/include/window.h index 472f37973..d5437a759 100644 --- a/include/window.h +++ b/include/window.h @@ -207,9 +207,10 @@ extern RegionPtr NotClippedByChildren( extern void SendVisibilityNotify( WindowPtr /*pWin*/); -extern void SaveScreens( - int /*on*/, - int /*mode*/); +extern int SaveScreens( + ClientPtr client, + int on, + int mode); extern WindowPtr FindWindowWithOptional( WindowPtr /*w*/); diff --git a/mi/mieq.c b/mi/mieq.c index 20c4b6201..5093023c7 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -200,13 +200,13 @@ mieqProcessInputEvents(void) while (miEventQueue.head != miEventQueue.tail) { if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens (SCREEN_SAVER_OFF, ScreenSaverReset); + SaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); #ifdef DPMSExtension else if (DPMSPowerLevel != DPMSModeOn) SetScreenSaverTimer(); if (DPMSPowerLevel != DPMSModeOn) - DPMSSet(DPMSModeOn); + DPMSSet(serverClient, DPMSModeOn); #endif e = &miEventQueue.events[miEventQueue.head]; diff --git a/os/WaitFor.c b/os/WaitFor.c index ec1592c01..1ef79bc34 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -583,7 +583,7 @@ TimerInit(void) #define DPMS_CHECK_MODE(mode,time)\ if (time > 0 && DPMSPowerLevel < mode && timeout >= time)\ - DPMSSet(mode); + DPMSSet(serverClient, mode); #define DPMS_CHECK_TIMEOUT(time)\ if (time > 0 && (time - timeout) > 0)\ @@ -652,7 +652,7 @@ ScreenSaverTimeoutExpire(OsTimerPtr timer,CARD32 now,pointer arg) } ResetOsBuffers(); /* not ideal, but better than nothing */ - SaveScreens(SCREEN_SAVER_ON, ScreenSaverActive); + SaveScreens(serverClient, SCREEN_SAVER_ON, ScreenSaverActive); if (ScreenSaverInterval > 0) { From 5bee8db003a5d552ee1d85bb6c40a3cb93bd6b2b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 10:44:51 -0400 Subject: [PATCH 085/552] xace: drop background-none checking hook, add new hook for controlling access to other clients. --- Xext/security.c | 11 ----------- Xext/xace.c | 14 ++++++++++++-- Xext/xace.h | 2 +- Xext/xacestr.h | 9 ++++++++- Xext/xselinux.c | 10 ---------- 5 files changed, 21 insertions(+), 25 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 0059245c1..bf414a50f 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1196,16 +1196,6 @@ SecurityCheckMapAccess(CallbackListPtr *pcbl, pointer unused, rec->status = BadAccess; } -static void -SecurityCheckBackgrndAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) -{ - XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; - - if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) - rec->status = BadAccess; -} - static void SecurityCheckExtAccess(CallbackListPtr *pcbl, pointer unused, pointer calldata) @@ -1848,7 +1838,6 @@ SecurityExtensionInit(INITARGS) XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL); XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL); XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL); - XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL); XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL); XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL); XaceRC(XACE_SERVER_ACCESS, SecurityCheckServerAccess, NULL); diff --git a/Xext/xace.c b/Xext/xace.c index de1887f31..54e910f82 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -113,8 +113,7 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_MAP_ACCESS: - case XACE_BACKGRND_ACCESS: { + case XACE_MAP_ACCESS: { XaceMapAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, WindowPtr), @@ -124,6 +123,17 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } + case XACE_CLIENT_ACCESS: { + XaceClientAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, ClientPtr), + va_arg(ap, Mask), + Success /* default allow */ + }; + calldata = &rec; + prv = &rec.status; + break; + } case XACE_EXT_DISPATCH: case XACE_EXT_ACCESS: { XaceExtAccessRec rec = { diff --git a/Xext/xace.h b/Xext/xace.h index f7ff205cc..f1a6e9d8c 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -47,7 +47,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_PROPERTY_ACCESS 4 #define XACE_DRAWABLE_ACCESS 5 #define XACE_MAP_ACCESS 6 -#define XACE_BACKGRND_ACCESS 7 +#define XACE_CLIENT_ACCESS 7 #define XACE_EXT_ACCESS 8 #define XACE_SERVER_ACCESS 9 #define XACE_SELECTION_ACCESS 10 diff --git a/Xext/xacestr.h b/Xext/xacestr.h index e4db3a12c..10c625b18 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -71,13 +71,20 @@ typedef struct { } XaceDrawableAccessRec; /* XACE_MAP_ACCESS */ -/* XACE_BACKGRND_ACCESS */ typedef struct { ClientPtr client; WindowPtr pWin; int status; } XaceMapAccessRec; +/* XACE_CLIENT_ACCESS */ +typedef struct { + ClientPtr client; + ClientPtr target; + Mask access_mode; + int status; +} XaceClientAccessRec; + /* XACE_EXT_DISPATCH */ /* XACE_EXT_ACCESS */ typedef struct { diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 9cb2f326b..1ffd79d79 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1156,15 +1156,6 @@ XSELinuxMap(CallbackListPtr *pcbl, pointer unused, pointer calldata) rec->status = BadAccess; } /* XSELinuxMap */ -static void -XSELinuxBackgrnd(CallbackListPtr *pcbl, pointer unused, pointer calldata) -{ - XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; - if (IDPerm(rec->client, rec->pWin->drawable.id, - SECCLASS_WINDOW, WINDOW__TRANSPARENT) != Success) - rec->status = BadAccess; -} /* XSELinuxBackgrnd */ - static void XSELinuxDrawable(CallbackListPtr *pcbl, pointer unused, pointer calldata) { @@ -1398,7 +1389,6 @@ XSELinuxExtensionInit(INITARGS) XaceRegisterCallback(XACE_RESOURCE_ACCESS, XSELinuxResLookup, NULL); XaceRegisterCallback(XACE_MAP_ACCESS, XSELinuxMap, NULL); XaceRegisterCallback(XACE_SERVER_ACCESS, XSELinuxServer, NULL); - XaceRegisterCallback(XACE_BACKGRND_ACCESS, XSELinuxBackgrnd, NULL); XaceRegisterCallback(XACE_DRAWABLE_ACCESS, XSELinuxDrawable, NULL); XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); /* XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, XSELinuxDeclare, NULL); From e89301c8790df9fc49de13dd7c7f36e5340c0c31 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 10:57:49 -0400 Subject: [PATCH 086/552] xace: add hooks + new access codes: core protocol client requests --- dix/dispatch.c | 7 ++++++- dix/dixutils.c | 26 +++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 2dc32a525..30f44fb1f 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3519,9 +3519,14 @@ ProcGetFontPath(ClientPtr client) int ProcChangeCloseDownMode(ClientPtr client) { + int rc; REQUEST(xSetCloseDownModeReq); - REQUEST_SIZE_MATCH(xSetCloseDownModeReq); + + rc = XaceHook(XACE_CLIENT_ACCESS, client, client, DixManageAccess); + if (rc != Success) + return rc; + if ((stuff->mode == AllTemporary) || (stuff->mode == RetainPermanent) || (stuff->mode == RetainTemporary)) diff --git a/dix/dixutils.c b/dix/dixutils.c index e8d7daf06..786f4e335 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -254,17 +254,25 @@ _X_EXPORT int dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) { pointer pRes; - int clientIndex = CLIENT_ID(rid); + int rc = BadValue, clientIndex = CLIENT_ID(rid); + + if (!clientIndex || !clients[clientIndex] || (rid & SERVER_BIT)) + goto bad; + + rc = dixLookupResource(&pRes, rid, RC_ANY, client, DixGetAttrAccess); + if (rc != Success) + goto bad; + + rc = XaceHook(XACE_CLIENT_ACCESS, client, clients[clientIndex], access); + if (rc != Success) + goto bad; + + *pClient = clients[clientIndex]; + return Success; +bad: client->errorValue = rid; - - dixLookupResource(&pRes, rid, RC_ANY, client, access); - - if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) { - *pClient = clients[clientIndex]; - return Success; - } *pClient = NULL; - return BadValue; + return rc; } int From fe9bc481efb0821134e10760c23993c6a7386450 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 12:02:59 -0400 Subject: [PATCH 087/552] xace: add hooks + new access codes: core protocol font requests --- dix/dispatch.c | 51 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 30f44fb1f..f6a85bb6d 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1354,23 +1354,21 @@ ProcQueryFont(ClientPtr client) xQueryFontReply *reply; FontPtr pFont; GC *pGC; + int rc; REQUEST(xResourceReq); - REQUEST_SIZE_MATCH(xResourceReq); + client->errorValue = stuff->id; /* EITHER font or gc */ - pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - DixReadAccess); - if (!pFont) - { - pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, - DixReadAccess); - if (!pGC) - { - client->errorValue = stuff->id; - return(BadFont); /* procotol spec says only error is BadFont */ - } - pFont = pGC->font; + rc = dixLookupResource((pointer *)&pFont, stuff->id, RT_FONT, client, + DixGetAttrAccess); + if (rc == BadValue) { + rc = dixLookupResource((pointer *)&pGC, stuff->id, RT_GC, client, + DixGetAttrAccess); + if (rc == Success) + pFont = pGC->font; } + if (rc != Success) + return (rc == BadValue) ? BadFont: rc; { xCharInfo *pmax = FONTINKMAX(pFont); @@ -1409,28 +1407,27 @@ ProcQueryFont(ClientPtr client) int ProcQueryTextExtents(ClientPtr client) { - REQUEST(xQueryTextExtentsReq); xQueryTextExtentsReply reply; FontPtr pFont; GC *pGC; ExtentInfoRec info; unsigned long length; - + int rc; + REQUEST(xQueryTextExtentsReq); REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq); - pFont = (FontPtr)SecurityLookupIDByType(client, stuff->fid, RT_FONT, - DixReadAccess); - if (!pFont) - { - pGC = (GC *)SecurityLookupIDByType(client, stuff->fid, RT_GC, - DixReadAccess); - if (!pGC) - { - client->errorValue = stuff->fid; - return(BadFont); - } - pFont = pGC->font; + client->errorValue = stuff->fid; /* EITHER font or gc */ + rc = dixLookupResource((pointer *)&pFont, stuff->fid, RT_FONT, client, + DixGetAttrAccess); + if (rc == BadValue) { + rc = dixLookupResource((pointer *)&pGC, stuff->fid, RT_GC, client, + DixGetAttrAccess); + if (rc == Success) + pFont = pGC->font; } + if (rc != Success) + return (rc == BadValue) ? BadFont: rc; + length = client->req_len - (sizeof(xQueryTextExtentsReq) >> 2); length = length << 1; if (stuff->oddLength) From 3ef2e9e623819c625a92f464fb14f1e5c181df42 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 12:27:48 -0400 Subject: [PATCH 088/552] xace: add hooks + new access codes: core protocol pixmap requests --- dix/dispatch.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index f6a85bb6d..ece240c69 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1500,7 +1500,7 @@ ProcCreatePixmap(ClientPtr client) LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, - DixReadAccess); + DixGetAttrAccess); if (rc != Success) return rc; @@ -1543,9 +1543,17 @@ CreatePmap: { pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = stuff->pid; + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP, + DixCreateAccess, pMap); + if (rc != Success) { + (*pDraw->pScreen->DestroyPixmap)(pMap); + return rc; + } if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap)) return(client->noClientException); } + (*pDraw->pScreen->DestroyPixmap)(pMap); return (BadAlloc); } @@ -1553,13 +1561,13 @@ int ProcFreePixmap(ClientPtr client) { PixmapPtr pMap; - + int rc; REQUEST(xResourceReq); - REQUEST_SIZE_MATCH(xResourceReq); - pMap = (PixmapPtr)SecurityLookupIDByType(client, stuff->id, RT_PIXMAP, - DixDestroyAccess); - if (pMap) + + rc = dixLookupResource((pointer *)&pMap, stuff->id, RT_PIXMAP, client, + DixDestroyAccess); + if (rc == Success) { FreeResource(stuff->id, RT_NONE); return(client->noClientException); @@ -1567,7 +1575,7 @@ ProcFreePixmap(ClientPtr client) else { client->errorValue = stuff->id; - return (BadPixmap); + return (rc == BadValue) ? BadPixmap : rc; } } From 0a994d4f859a4e48d41a90ed9d2a282bb528c555 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 12:54:35 -0400 Subject: [PATCH 089/552] xace: add hooks + new access codes: core protocol selection requests --- dix/dispatch.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index ece240c69..bb30619a2 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -980,9 +980,10 @@ ProcSetSelectionOwner(ClientPtr client) { WindowPtr pWin; TimeStamp time; + int rc; REQUEST(xSetSelectionOwnerReq); - REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); + UpdateCurrentTime(); time = ClientTimeToServerTime(stuff->time); @@ -992,7 +993,7 @@ ProcSetSelectionOwner(ClientPtr client) return Success; if (stuff->window != None) { - int rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); if (rc != Success) return rc; } @@ -1012,6 +1013,10 @@ ProcSetSelectionOwner(ClientPtr client) { xEvent event; + rc = XaceHook(XACE_SELECTION_ACCESS, client, CurrentSelections[i], + DixSetAttrAccess); + if (rc != Success) + return rc; /* If the timestamp in client's request is in the past relative to the time stamp indicating the last time the owner of the selection was set, do not set the selection, just return @@ -1049,6 +1054,10 @@ ProcSetSelectionOwner(ClientPtr client) CurrentSelections = newsels; CurrentSelections[i].selection = stuff->selection; CurrentSelections[i].devPrivates = NULL; + rc = XaceHook(XACE_SELECTION_ACCESS, CurrentSelections[i], + DixSetAttrAccess); + if (rc != Success) + return rc; } dixFreePrivates(CurrentSelections[i].devPrivates); CurrentSelections[i].lastTimeChanged = time; @@ -1094,7 +1103,7 @@ ProcGetSelectionOwner(ClientPtr client) reply.sequenceNumber = client->sequence; if (i < NumCurrentSelections && XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i], - DixReadAccess) == Success) + DixGetAttrAccess) == Success) reply.owner = CurrentSelections[i].destwindow; else reply.owner = None; @@ -1118,7 +1127,7 @@ ProcConvertSelection(ClientPtr client) int rc; REQUEST_SIZE_MATCH(xConvertSelectionReq); - rc = dixLookupWindow(&pWin, stuff->requestor, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess); if (rc != Success) return rc; From b2b7817497dd5da73d23ec9cc637c563041fc490 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 15:30:25 -0400 Subject: [PATCH 090/552] devPrivates rework: use camelcase standard for name of key type. --- Xext/security.c | 10 +++++----- dix/privates.c | 12 ++++++------ include/privates.h | 22 +++++++++++----------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index bf414a50f..fe1e48a14 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -54,7 +54,7 @@ in this Software without prior written authorization from The Open Group. static int SecurityErrorBase; /* first Security error number */ static int SecurityEventBase; /* first Security event number */ -static devprivate_key_t stateKey; +static const DevPrivateKey stateKey = &stateKey; /* this is what we store as client security state */ typedef struct { @@ -64,11 +64,11 @@ typedef struct { } SecurityClientStateRec; #define HAVESTATE(client) (((SecurityClientStateRec *) \ - dixLookupPrivate(DEVPRIV_PTR(client), &stateKey))->haveState) + dixLookupPrivate(DEVPRIV_PTR(client), stateKey))->haveState) #define TRUSTLEVEL(client) (((SecurityClientStateRec *) \ - dixLookupPrivate(DEVPRIV_PTR(client), &stateKey))->trustLevel) + dixLookupPrivate(DEVPRIV_PTR(client), stateKey))->trustLevel) #define AUTHID(client)(((SecurityClientStateRec *) \ - dixLookupPrivate(DEVPRIV_PTR(client), &stateKey))->authId) + dixLookupPrivate(DEVPRIV_PTR(client), stateKey))->authId) static CallbackListPtr SecurityValidateGroupCallback = NULL; @@ -1812,7 +1812,7 @@ SecurityExtensionInit(INITARGS) RTEventClient |= RC_NEVERRETAIN; /* Allocate the private storage */ - if (!dixRequestPrivate(&stateKey, sizeof(SecurityClientStateRec))) + if (!dixRequestPrivate(stateKey, sizeof(SecurityClientStateRec))) FatalError("SecurityExtensionSetup: Can't allocate client private.\n"); if (!AddCallback(&ClientStateCallback, SecurityClientStateCallback, NULL)) diff --git a/dix/privates.c b/dix/privates.c index f2f1c49ee..4dbba437c 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -47,7 +47,7 @@ from The Open Group. #include "extnsionst.h" typedef struct _PrivateDesc { - devprivate_key_t *key; + DevPrivateKey key; unsigned size; CallbackListPtr initfuncs; CallbackListPtr deletefuncs; @@ -58,7 +58,7 @@ typedef struct _PrivateDesc { static PrivateDescRec *items = NULL; static _X_INLINE PrivateDescRec * -findItem(devprivate_key_t *const key) +findItem(const DevPrivateKey key) { PrivateDescRec *item = items; while (item) { @@ -73,7 +73,7 @@ findItem(devprivate_key_t *const key) * Request pre-allocated space. */ _X_EXPORT int -dixRequestPrivate(devprivate_key_t *const key, unsigned size) +dixRequestPrivate(const DevPrivateKey key, unsigned size) { PrivateDescRec *item = findItem(key); if (item) { @@ -98,7 +98,7 @@ dixRequestPrivate(devprivate_key_t *const key, unsigned size) * Allocate a private and attach it to an existing object. */ _X_EXPORT pointer * -dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key) +dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) { PrivateDescRec *item = findItem(key); PrivateRec *ptr; @@ -156,7 +156,7 @@ dixFreePrivates(PrivateRec *privates) * Callback registration */ _X_EXPORT int -dixRegisterPrivateInitFunc(devprivate_key_t *const key, +dixRegisterPrivateInitFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer data) { PrivateDescRec *item = findItem(key); @@ -169,7 +169,7 @@ dixRegisterPrivateInitFunc(devprivate_key_t *const key, } _X_EXPORT int -dixRegisterPrivateDeleteFunc(devprivate_key_t *const key, +dixRegisterPrivateDeleteFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer data) { PrivateDescRec *item = findItem(key); diff --git a/include/privates.h b/include/privates.h index e57f16712..e377b3068 100644 --- a/include/privates.h +++ b/include/privates.h @@ -19,10 +19,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * STUFF FOR PRIVATES *****************************************************************/ -typedef char devprivate_key_t; +typedef void *DevPrivateKey; typedef struct _Private { - devprivate_key_t *key; + DevPrivateKey key; pointer value; struct _Private *next; } PrivateRec; @@ -39,19 +39,19 @@ typedef struct _Private { * Calling this is not necessary if only a pointer by itself is needed. */ extern int -dixRequestPrivate(devprivate_key_t *const key, unsigned size); +dixRequestPrivate(const DevPrivateKey key, unsigned size); /* * Allocates a new private and attaches it to an existing object. */ extern pointer * -dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key); +dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key); /* * Look up a private pointer. */ static _X_INLINE pointer -dixLookupPrivate(PrivateRec **privates, devprivate_key_t *const key) +dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) { PrivateRec *rec = *privates; pointer *ptr; @@ -70,7 +70,7 @@ dixLookupPrivate(PrivateRec **privates, devprivate_key_t *const key) * Look up the address of a private pointer. */ static _X_INLINE pointer * -dixLookupPrivateAddr(PrivateRec **privates, devprivate_key_t *const key) +dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) { PrivateRec *rec = *privates; @@ -87,7 +87,7 @@ dixLookupPrivateAddr(PrivateRec **privates, devprivate_key_t *const key) * Set a private pointer. */ static _X_INLINE int -dixSetPrivate(PrivateRec **privates, devprivate_key_t *const key, pointer val) +dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) { PrivateRec *rec; @@ -111,16 +111,16 @@ dixSetPrivate(PrivateRec **privates, devprivate_key_t *const key, pointer val) * The calldata argument to the callbacks is a PrivateCallbackPtr. */ typedef struct _PrivateCallback { - devprivate_key_t *key; /* private registration key */ - pointer *value; /* address of private pointer */ + DevPrivateKey key; /* private registration key */ + pointer *value; /* address of private pointer */ } PrivateCallbackRec; extern int -dixRegisterPrivateInitFunc(devprivate_key_t *const key, +dixRegisterPrivateInitFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer userdata); extern int -dixRegisterPrivateDeleteFunc(devprivate_key_t *const key, +dixRegisterPrivateDeleteFunc(const DevPrivateKey key, CallbackProcPtr callback, pointer userdata); /* From 6fd0a0b08de912421718aca17fe34a55ae285ae7 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 16:01:42 -0400 Subject: [PATCH 091/552] devPrivates rework: add const qualifier to key type. --- dix/privates.c | 2 +- include/privates.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dix/privates.c b/dix/privates.c index 4dbba437c..1ca361c3d 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -47,7 +47,7 @@ from The Open Group. #include "extnsionst.h" typedef struct _PrivateDesc { - DevPrivateKey key; + pointer key; unsigned size; CallbackListPtr initfuncs; CallbackListPtr deletefuncs; diff --git a/include/privates.h b/include/privates.h index e377b3068..e81e40a93 100644 --- a/include/privates.h +++ b/include/privates.h @@ -19,10 +19,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * STUFF FOR PRIVATES *****************************************************************/ -typedef void *DevPrivateKey; +typedef void *const DevPrivateKey; typedef struct _Private { - DevPrivateKey key; + pointer key; pointer value; struct _Private *next; } PrivateRec; @@ -111,7 +111,7 @@ dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) * The calldata argument to the callbacks is a PrivateCallbackPtr. */ typedef struct _PrivateCallback { - DevPrivateKey key; /* private registration key */ + pointer key; /* key used to set the private */ pointer *value; /* address of private pointer */ } PrivateCallbackRec; From 860a09cfb8afc0a293c7eb5e01762724eb86847a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 16 Aug 2007 16:10:44 -0400 Subject: [PATCH 092/552] devPrivates rework: Nevermind, can't const due to return value warnings. This reverts commit 6fd0a0b08de912421718aca17fe34a55ae285ae7. --- dix/privates.c | 2 +- include/privates.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dix/privates.c b/dix/privates.c index 1ca361c3d..4dbba437c 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -47,7 +47,7 @@ from The Open Group. #include "extnsionst.h" typedef struct _PrivateDesc { - pointer key; + DevPrivateKey key; unsigned size; CallbackListPtr initfuncs; CallbackListPtr deletefuncs; diff --git a/include/privates.h b/include/privates.h index e81e40a93..e377b3068 100644 --- a/include/privates.h +++ b/include/privates.h @@ -19,10 +19,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * STUFF FOR PRIVATES *****************************************************************/ -typedef void *const DevPrivateKey; +typedef void *DevPrivateKey; typedef struct _Private { - pointer key; + DevPrivateKey key; pointer value; struct _Private *next; } PrivateRec; @@ -111,7 +111,7 @@ dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) * The calldata argument to the callbacks is a PrivateCallbackPtr. */ typedef struct _PrivateCallback { - pointer key; /* key used to set the private */ + DevPrivateKey key; /* private registration key */ pointer *value; /* address of private pointer */ } PrivateCallbackRec; From 4017d3190234e189a0bbd33193a148d4d3c7556b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 28 Aug 2007 09:28:25 -0400 Subject: [PATCH 093/552] devPrivates rework: since API is already broken, switch everything over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates. --- Xext/dpmsstubs.c | 2 +- Xext/panoramiX.c | 41 +- Xext/saver.c | 11 +- Xext/shm.c | 18 +- Xext/xevie.c | 19 +- Xext/xprint.c | 171 ++------ Xext/xvdisp.c | 11 +- Xext/xvdix.h | 9 +- Xext/xvmain.c | 32 +- Xext/xvmc.c | 23 +- afb/afb.h | 18 +- afb/afbfillarc.c | 3 +- afb/afbfillrct.c | 3 +- afb/afbfillsp.c | 15 +- afb/afbgc.c | 7 +- afb/afbimggblt.c | 4 +- afb/afbline.c | 6 +- afb/afbpixmap.c | 2 +- afb/afbply1rct.c | 4 +- afb/afbplygblt.c | 4 +- afb/afbpntwin.c | 4 +- afb/afbpolypnt.c | 4 +- afb/afbscrinit.c | 52 ++- afb/afbtegblt.c | 4 +- afb/afbwindow.c | 19 +- afb/afbzerarc.c | 4 +- cfb/cfb.h | 14 +- cfb/cfballpriv.c | 41 +- cfb/cfbpixmap.c | 2 +- cfb/cfbrrop.h | 3 +- cfb/cfbscrinit.c | 20 +- cfb/cfbwindow.c | 6 +- composite/compalloc.c | 10 +- composite/compext.c | 10 +- composite/compinit.c | 30 +- composite/compint.h | 16 +- configure.ac | 1 - damageext/damageext.c | 6 +- damageext/damageextint.h | 2 +- dbe/dbe.c | 226 +---------- dbe/dbestruct.h | 37 +- dbe/midbe.c | 37 +- dbe/midbestr.h | 12 +- dix/colormap.c | 34 +- dix/devices.c | 32 +- dix/dispatch.c | 58 +-- dix/extension.c | 40 +- dix/gc.c | 42 +- dix/getevents.c | 12 +- dix/main.c | 54 +-- dix/pixmap.c | 27 +- dix/privates.c | 448 --------------------- dix/window.c | 43 +- exa/exa.c | 20 +- exa/exa_priv.h | 10 +- fb/fb.h | 20 +- fb/fballpriv.c | 48 +-- fb/fboverlay.c | 19 +- fb/fboverlay.h | 9 +- fb/fbpixmap.c | 2 +- fb/fbpseudocolor.c | 50 +-- fb/fbscreen.c | 6 +- fb/fbwindow.c | 4 +- fb/wfbrename.h | 22 +- hw/darwin/darwin.h | 6 +- hw/darwin/iokit/xfIOKit.h | 6 +- hw/darwin/iokit/xfIOKitCursor.c | 18 +- hw/darwin/quartz/fullscreen/fullscreen.c | 28 +- hw/darwin/quartz/fullscreen/quartzCursor.c | 16 +- hw/darwin/quartz/quartz.c | 10 +- hw/darwin/quartz/quartzCommon.h | 4 +- hw/darwin/quartz/quartzCursor.c | 16 +- hw/darwin/quartz/xpr/dri.c | 47 +-- hw/darwin/quartz/xpr/dristruct.h | 21 +- hw/darwin/quartz/xpr/xprCursor.c | 19 +- hw/dmx/dmxcmap.c | 14 - hw/dmx/dmxcmap.h | 9 +- hw/dmx/dmxdpms.c | 7 +- hw/dmx/dmxgc.c | 6 +- hw/dmx/dmxgc.h | 4 +- hw/dmx/dmxpict.c | 3 +- hw/dmx/dmxpict.h | 10 +- hw/dmx/dmxpixmap.c | 5 +- hw/dmx/dmxpixmap.h | 4 +- hw/dmx/dmxscrinit.c | 46 +-- hw/dmx/dmxscrinit.h | 2 +- hw/dmx/dmxwindow.c | 3 +- hw/dmx/dmxwindow.h | 6 +- hw/dmx/input/dmxconsole.c | 13 +- hw/kdrive/savage/s3draw.c | 17 +- hw/kdrive/savage/s3draw.h | 18 +- hw/kdrive/src/kaa.c | 22 +- hw/kdrive/src/kaa.h | 13 +- hw/kdrive/src/kdrive.h | 8 +- hw/kdrive/src/kxv.c | 44 +- hw/xfree86/common/xf86.h | 10 +- hw/xfree86/common/xf86DGA.c | 44 +- hw/xfree86/common/xf86DPMS.c | 32 +- hw/xfree86/common/xf86Globals.c | 8 +- hw/xfree86/common/xf86Init.c | 24 +- hw/xfree86/common/xf86RandR.c | 20 +- hw/xfree86/common/xf86VidMode.c | 27 +- hw/xfree86/common/xf86cmap.c | 122 +++--- hw/xfree86/common/xf86fbman.c | 148 ++++--- hw/xfree86/common/xf86sbusBus.c | 13 +- hw/xfree86/common/xf86xv.c | 42 +- hw/xfree86/common/xf86xvmc.c | 20 +- hw/xfree86/common/xf86xvpriv.h | 3 +- hw/xfree86/dixmods/extmod/xf86dga2.c | 30 +- hw/xfree86/dixmods/extmod/xf86misc.c | 40 +- hw/xfree86/dixmods/extmod/xf86vmode.c | 43 +- hw/xfree86/dixmods/extmod/xvmod.c | 2 +- hw/xfree86/dixmods/extmod/xvmodproc.h | 2 +- hw/xfree86/dri/dri.c | 52 +-- hw/xfree86/dri/dristruct.h | 22 +- hw/xfree86/exa/examodule.c | 18 +- hw/xfree86/loader/dixsym.c | 18 +- hw/xfree86/loader/misym.c | 4 +- hw/xfree86/loader/xf86sym.c | 4 +- hw/xfree86/modes/xf86RandR12.c | 13 +- hw/xfree86/os-support/solaris/sun_mouse.c | 14 +- hw/xfree86/rac/xf86RAC.c | 68 ++-- hw/xfree86/ramdac/xf86Cursor.c | 69 ++-- hw/xfree86/ramdac/xf86CursorPriv.h | 2 +- hw/xfree86/ramdac/xf86HWCurs.c | 16 +- hw/xfree86/shadowfb/shadow.c | 20 +- hw/xfree86/xaa/xaaDashLine.c | 3 +- hw/xfree86/xaa/xaaGC.c | 3 +- hw/xfree86/xaa/xaaGCmisc.c | 3 +- hw/xfree86/xaa/xaaInit.c | 45 +-- hw/xfree86/xaa/xaaLineMisc.c | 3 +- hw/xfree86/xaa/xaaOverlayDF.c | 15 +- hw/xfree86/xaa/xaaStateChange.c | 15 +- hw/xfree86/xaa/xaaWrapper.c | 31 +- hw/xfree86/xaa/xaalocal.h | 22 +- hw/xfree86/xaa/xaawrap.h | 14 +- hw/xfree86/xf4bpp/mfbfillarc.c | 3 +- hw/xfree86/xf4bpp/mfbimggblt.c | 3 +- hw/xfree86/xf4bpp/mfbzerarc.c | 3 +- hw/xfree86/xf4bpp/ppcArea.c | 2 +- hw/xfree86/xf4bpp/ppcGC.c | 10 +- hw/xfree86/xf4bpp/ppcIO.c | 2 +- hw/xfree86/xf4bpp/ppcPixFS.c | 24 +- hw/xfree86/xf4bpp/ppcPixmap.c | 1 + hw/xfree86/xf4bpp/ppcPntWin.c | 2 +- hw/xfree86/xf4bpp/ppcPolyPnt.c | 2 +- hw/xfree86/xf4bpp/ppcWinFS.c | 24 +- hw/xfree86/xf4bpp/ppcWindow.c | 2 +- hw/xfree86/xf4bpp/vgaGC.c | 2 +- hw/xfree86/xf8_32bpp/cfb8_32.h | 14 +- hw/xfree86/xf8_32bpp/cfbscrinit.c | 35 +- hw/xfree86/xf8_32bpp/xf86overlay.c | 35 +- hw/xgl/egl/xegl.c | 20 +- hw/xgl/egl/xegl.h | 6 +- hw/xgl/glx/xglx.c | 20 +- hw/xgl/xgl.h | 33 +- hw/xgl/xglpixmap.c | 2 +- hw/xgl/xglxv.c | 8 +- hw/xnest/GC.c | 2 +- hw/xnest/Init.c | 2 - hw/xnest/Pixmap.c | 8 +- hw/xnest/Screen.c | 22 +- hw/xnest/Window.c | 2 +- hw/xnest/XNGC.h | 6 +- hw/xnest/XNPixmap.h | 6 +- hw/xnest/XNWindow.h | 6 +- hw/xprint/attributes.c | 27 +- hw/xprint/pcl/Pcl.h | 8 +- hw/xprint/pcl/PclArc.c | 2 +- hw/xprint/pcl/PclColor.c | 28 +- hw/xprint/pcl/PclGC.c | 15 +- hw/xprint/pcl/PclInit.c | 62 +-- hw/xprint/pcl/PclLine.c | 4 +- hw/xprint/pcl/PclPixel.c | 8 +- hw/xprint/pcl/PclPolygon.c | 6 +- hw/xprint/pcl/PclPrint.c | 20 +- hw/xprint/pcl/PclText.c | 4 +- hw/xprint/pcl/PclWindow.c | 7 +- hw/xprint/pcl/Pclmap.h | 10 +- hw/xprint/ps/Ps.h | 8 +- hw/xprint/ps/PsGC.c | 14 +- hw/xprint/ps/PsInit.c | 48 +-- hw/xprint/ps/PsPixmap.c | 9 +- hw/xprint/ps/PsPrint.c | 33 +- hw/xprint/ps/PsWindow.c | 7 +- hw/xprint/raster/Raster.c | 44 +- hw/xwin/win.h | 40 +- hw/xwin/winallpriv.c | 18 +- hw/xwin/wincursor.c | 3 +- hw/xwin/winfillsp.c | 9 - hw/xwin/winglobals.c | 10 +- hw/xwin/winmultiwindowwndproc.c | 2 +- hw/xwin/winpixmap.c | 7 - hw/xwin/winscrinit.c | 3 - hw/xwin/winsetsp.c | 9 - include/colormapst.h | 3 +- include/dix-config.h.in | 3 - include/dix.h | 6 - include/dixstruct.h | 3 +- include/extension.h | 6 - include/extnsionst.h | 3 +- include/gcstruct.h | 3 +- include/input.h | 3 - include/inputstr.h | 5 +- include/pixmapstr.h | 14 +- include/privates.h | 10 - include/screenint.h | 28 -- include/scrnintstr.h | 11 +- include/window.h | 3 - include/windowstr.h | 3 +- include/xkbsrv.h | 2 +- include/xorg-config.h.in | 3 - include/xorg-server.h.in | 3 - mfb/mfb.h | 14 +- mfb/mfbbitblt.c | 18 +- mfb/mfbfillarc.c | 3 +- mfb/mfbfillrct.c | 3 +- mfb/mfbfillsp.c | 9 +- mfb/mfbgc.c | 10 +- mfb/mfbimggblt.c | 3 +- mfb/mfbline.c | 6 +- mfb/mfbpixmap.c | 2 +- mfb/mfbpntwin.c | 5 +- mfb/mfbpolypnt.c | 3 +- mfb/mfbscrinit.c | 38 +- mfb/mfbwindow.c | 14 +- mfb/mfbzerarc.c | 3 +- mi/mi.h | 3 +- mi/mibank.c | 18 +- mi/midispcur.c | 30 +- mi/miline.h | 7 +- mi/mioverlay.c | 27 +- mi/mipointer.c | 15 +- mi/mipointer.h | 3 +- mi/miscrinit.c | 25 +- mi/misprite.c | 78 ++-- miext/cw/cw.c | 51 +-- miext/cw/cw.h | 29 +- miext/damage/damage.c | 41 +- miext/damage/damagestr.h | 15 +- miext/rootless/accel/rlAccel.c | 13 +- miext/rootless/rootlessCommon.h | 19 +- miext/rootless/rootlessGC.c | 10 +- miext/rootless/rootlessScreen.c | 30 +- miext/rootless/rootlessWindow.c | 12 +- miext/shadow/shadow.c | 15 +- miext/shadow/shadow.h | 5 +- randr/randr.c | 16 +- randr/randrstr.h | 10 +- record/record.c | 15 +- render/animcur.c | 13 +- render/glyph.c | 321 +-------------- render/glyphstr.h | 43 +- render/picture.c | 115 +----- render/picturestr.h | 42 +- render/render.c | 10 +- xfixes/cursor.c | 18 +- xfixes/xfixes.c | 6 +- xfixes/xfixesint.h | 2 +- xkb/ddxFakeMtn.c | 2 +- xkb/xkbActions.c | 13 +- 261 files changed, 1642 insertions(+), 3957 deletions(-) diff --git a/Xext/dpmsstubs.c b/Xext/dpmsstubs.c index 8d58935da..fad07bde6 100644 --- a/Xext/dpmsstubs.c +++ b/Xext/dpmsstubs.c @@ -48,5 +48,5 @@ int DPMSGet(int *plevel) int DPMSSet(ClientPtr client, int level) { - + return Success; } diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 95df04320..26c280990 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -110,8 +110,8 @@ static void PanoramiXResetProc(ExtensionEntry*); int (* SavedProcVector[256]) (ClientPtr client) = { NULL, }; -static int PanoramiXGCIndex = -1; -static int PanoramiXScreenIndex = -1; +static DevPrivateKey PanoramiXGCKey = &PanoramiXGCKey; +static DevPrivateKey PanoramiXScreenKey = &PanoramiXScreenKey; typedef struct { DDXPointRec clipOrg; @@ -140,8 +140,8 @@ static GCFuncs XineramaGCFuncs = { }; #define Xinerama_GC_FUNC_PROLOGUE(pGC)\ - PanoramiXGCPtr pGCPriv = \ - (PanoramiXGCPtr) (pGC)->devPrivates[PanoramiXGCIndex].ptr;\ + PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr) \ + dixLookupPrivate(&(pGC)->devPrivates, PanoramiXGCKey); \ (pGC)->funcs = pGCPriv->wrapFuncs; #define Xinerama_GC_FUNC_EPILOGUE(pGC)\ @@ -152,8 +152,8 @@ static GCFuncs XineramaGCFuncs = { static Bool XineramaCloseScreen (int i, ScreenPtr pScreen) { - PanoramiXScreenPtr pScreenPriv = - (PanoramiXScreenPtr) pScreen->devPrivates[PanoramiXScreenIndex].ptr; + PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr) + dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->CreateGC = pScreenPriv->CreateGC; @@ -171,14 +171,14 @@ static Bool XineramaCreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; - PanoramiXScreenPtr pScreenPriv = - (PanoramiXScreenPtr) pScreen->devPrivates[PanoramiXScreenIndex].ptr; + PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr) + dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey); Bool ret; pScreen->CreateGC = pScreenPriv->CreateGC; if((ret = (*pScreen->CreateGC)(pGC))) { - PanoramiXGCPtr pGCPriv = - (PanoramiXGCPtr) pGC->devPrivates[PanoramiXGCIndex].ptr; + PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr) + dixLookupPrivate(&pGC->devPrivates, PanoramiXGCKey); pGCPriv->wrapFuncs = pGC->funcs; pGC->funcs = &XineramaGCFuncs; @@ -284,8 +284,8 @@ XineramaCopyGC ( unsigned long mask, GCPtr pGCDst ){ - PanoramiXGCPtr pSrcPriv = - (PanoramiXGCPtr) pGCSrc->devPrivates[PanoramiXGCIndex].ptr; + PanoramiXGCPtr pSrcPriv = (PanoramiXGCPtr) + dixLookupPrivate(&pGCSrc->devPrivates, PanoramiXGCKey); Xinerama_GC_FUNC_PROLOGUE (pGCDst); if(mask & GCTileStipXOrigin) @@ -484,20 +484,17 @@ void PanoramiXExtensionInit(int argc, char *argv[]) xcalloc(PanoramiXNumScreens, sizeof(PanoramiXData)); BREAK_IF(!panoramiXdataPtr); - BREAK_IF((PanoramiXGCIndex = AllocateGCPrivateIndex()) < 0); - BREAK_IF((PanoramiXScreenIndex = AllocateScreenPrivateIndex()) < 0); + + if (!dixRequestPrivate(PanoramiXGCKey, sizeof(PanoramiXGCRec))) { + noPanoramiXExtension = TRUE; + return; + } for (i = 0; i < PanoramiXNumScreens; i++) { pScreen = screenInfo.screens[i]; - if(!AllocateGCPrivate(pScreen, PanoramiXGCIndex, - sizeof(PanoramiXGCRec))) { - noPanoramiXExtension = TRUE; - return; - } - pScreenPriv = xalloc(sizeof(PanoramiXScreenRec)); - pScreen->devPrivates[PanoramiXScreenIndex].ptr = - (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey, + pScreenPriv); if(!pScreenPriv) { noPanoramiXExtension = TRUE; return; diff --git a/Xext/saver.c b/Xext/saver.c index dabfbea1b..004258382 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -234,10 +234,12 @@ MakeScreenPrivate ( ScreenPtr /* pScreen */ ); -static int ScreenPrivateIndex; +static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKey; -#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr)(s)->devPrivates[ScreenPrivateIndex].ptr) -#define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (pointer) v); +#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ + dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) +#define SetScreenPrivate(s,v) \ + dixSetPrivate(&(s)->devPrivates, ScreenPrivateKey, v); #define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL) #define New(t) ((t *) xalloc (sizeof (t))) @@ -260,14 +262,13 @@ ScreenSaverExtensionInit(INITARGS) AttrType = CreateNewResourceType(ScreenSaverFreeAttr); EventType = CreateNewResourceType(ScreenSaverFreeEvents); SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend); - ScreenPrivateIndex = AllocateScreenPrivateIndex (); for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; SetScreenPrivate (pScreen, NULL); } - if (AttrType && EventType && SuspendType && ScreenPrivateIndex != -1 && + if (AttrType && EventType && SuspendType && (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0, ProcScreenSaverDispatch, SProcScreenSaverDispatch, ScreenSaverResetProc, StandardMinorOpcode))) diff --git a/Xext/shm.c b/Xext/shm.c index 7fa834952..8fa584275 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -119,7 +119,7 @@ static int pixmapFormat; static int shmPixFormat[MAXSCREENS]; static ShmFuncsPtr shmFuncs[MAXSCREENS]; static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS]; -static int shmPixmapPrivate; +static DevPrivateKey shmPixmapPrivate = &shmPixmapPrivate; static ShmFuncs miFuncs = {NULL, miShmPutImage}; static ShmFuncs fbFuncs = {fbShmCreatePixmap, fbShmPutImage}; @@ -229,20 +229,11 @@ ShmExtensionInit(INITARGS) if (!pixmapFormat) pixmapFormat = ZPixmap; if (sharedPixmaps) - { for (i = 0; i < screenInfo.numScreens; i++) { destroyPixmap[i] = screenInfo.screens[i]->DestroyPixmap; screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap; } - shmPixmapPrivate = AllocatePixmapPrivateIndex(); - for (i = 0; i < screenInfo.numScreens; i++) - { - if (!AllocatePixmapPrivate(screenInfo.screens[i], - shmPixmapPrivate, 0)) - return; - } - } } ShmSegType = CreateNewResourceType(ShmDetachSegment); if (ShmSegType && @@ -295,7 +286,8 @@ ShmDestroyPixmap (PixmapPtr pPixmap) if (pPixmap->refcnt == 1) { ShmDescPtr shmdesc; - shmdesc = (ShmDescPtr) pPixmap->devPrivates[shmPixmapPrivate].ptr; + shmdesc = (ShmDescPtr)dixLookupPrivate(&pPixmap->devPrivates, + shmPixmapPrivate); if (shmdesc) ShmDetachSegment ((pointer) shmdesc, pPixmap->drawable.id); } @@ -762,7 +754,7 @@ CreatePmap: shmdesc->addr + stuff->offset); if (pMap) { - pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc; + dixSetPrivate(&pMap->devPrivates, shmPixmapPrivate, shmdesc); shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = newPix->info[j].id; @@ -1076,7 +1068,7 @@ CreatePmap: shmdesc->addr + stuff->offset); if (pMap) { - pMap->devPrivates[shmPixmapPrivate].ptr = (pointer) shmdesc; + dixSetPrivate(&pMap->devPrivates, shmPixmapPrivate, shmdesc); shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = stuff->pid; diff --git a/Xext/xevie.c b/Xext/xevie.c index 7922913ba..7dd67bbf6 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -76,11 +76,11 @@ DeviceIntPtr xeviemouse = NULL; Mask xevieMask = 0; int xevieEventSent = 0; int xevieKBEventSent = 0; -static unsigned int xevieServerGeneration; -static int xevieDevicePrivateIndex; +static DevPrivateKey xevieDevicePrivateKey = &xevieDevicePrivateKey; static Bool xevieModifiersOn = FALSE; -#define XEVIEINFO(dev) ((xevieDeviceInfoPtr)dev->devPrivates[xevieDevicePrivateIndex].ptr) +#define XEVIEINFO(dev) ((xevieDeviceInfoPtr) \ + dixLookupPrivate(&(dev)->devPrivates, xevieDevicePrivateKey)) Mask xevieFilters[128] = { @@ -134,12 +134,6 @@ XevieExtensionInit (void) { ExtensionEntry* extEntry; - if (serverGeneration != xevieServerGeneration) { - if ((xevieDevicePrivateIndex = AllocateDevicePrivateIndex()) == -1) - return; - xevieServerGeneration = serverGeneration; - } - if (!AddCallback(&ServerGrabCallback,XevieServerGrabStateCallback,NULL)) return; @@ -618,14 +612,11 @@ XevieAdd(DeviceIntPtr device, void* data) { xevieDeviceInfoPtr xeviep; - if (!AllocateDevicePrivate(device, xevieDevicePrivateIndex)) - return FALSE; - xeviep = xalloc (sizeof (xevieDeviceInfoRec)); if (!xeviep) return FALSE; - device->devPrivates[xevieDevicePrivateIndex].ptr = xeviep; + dixSetPrivate(&device->devPrivates, xevieDevicePrivateKey, xeviep); XevieUnwrapAdd(device, data); return TRUE; @@ -642,7 +633,7 @@ XevieRemove(DeviceIntPtr device,pointer data) UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc); xfree(xeviep); - device->devPrivates[xevieDevicePrivateIndex].ptr = NULL; + dixSetPrivate(&device->devPrivates, xevieDevicePrivateKey, NULL); return TRUE; } diff --git a/Xext/xprint.c b/Xext/xprint.c index ff739c0e7..ef5111837 100644 --- a/Xext/xprint.c +++ b/Xext/xprint.c @@ -153,8 +153,6 @@ static int XpFreePage(pointer, XID); static Bool XpCloseScreen(int, ScreenPtr); static CARD32 GetAllEventMasks(XpContextPtr); static struct _XpClient *CreateXpClient(ClientPtr); -static void InitContextPrivates(XpContextPtr); -static void ResetContextPrivates(void); static struct _XpClient *FindClient(XpContextPtr, ClientPtr); static struct _XpClient *AcquireClient(XpContextPtr, ClientPtr); @@ -233,21 +231,12 @@ static XpScreenPtr XpScreens[MAXSCREENS]; static unsigned char XpReqCode; static int XpEventBase; static int XpErrorBase; -static unsigned long XpGeneration = 0; -static int XpClientPrivateIndex; +static DevPrivateKey XpClientPrivateKey = &XpClientPrivateKey; -/* Variables for the context private machinery. - * These must be initialized at compile time because - * main() calls InitOutput before InitExtensions, and the - * output drivers are likely to call AllocateContextPrivate. - * These variables are reset at CloseScreen time. CloseScreen - * is used because it occurs after FreeAllResources, and before - * the next InitOutput cycle. - */ -static int contextPrivateCount = 0; -static int contextPrivateLen = 0; -static unsigned *contextPrivateSizes = (unsigned *)NULL; -static unsigned totalContextSize = sizeof(XpContextRec); +#define XP_GETPRIV(pClient) ((XpContextPtr) \ + dixLookupPrivate(&(pClient)->devPrivates, XpClientPrivateKey)) +#define XP_SETPRIV(pClient, p) \ + dixSetPrivate(&(pClient)->devPrivates, XpClientPrivateKey, p) /* * There are three types of resources involved. One is the resource associated @@ -305,20 +294,6 @@ XpExtensionInit(INITARGS) EventSwapVector[XpEventBase+1] = (EventSwapPtr) SwapXpAttributeEvent; } - if(XpGeneration != serverGeneration) - { - XpClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * We allocate 0 length & simply stuff a pointer to the - * ContextRec in the DevUnion. - */ - if(AllocateClientPrivate(XpClientPrivateIndex, 0) != TRUE) - { - /* we can't alloc a client private, should we bail??? XXX */ - } - XpGeneration = serverGeneration; - } - for(i = 0; i < MAXSCREENS; i++) { /* @@ -377,14 +352,6 @@ XpCloseScreen(int index, ScreenPtr pScreen) } XpScreens[index] = (XpScreenPtr)NULL; - /* - * It's wasteful to call ResetContextPrivates() at every CloseScreen, - * but it's the best we know how to do for now. We do this because we - * have to wait until after all resources have been freed (so we know - * how to free the ContextRecs), and before the next InitOutput cycle. - * See dix/main.c for the order of initialization and reset. - */ - ResetContextPrivates(); return (*CloseScreen)(index, pScreen); } @@ -956,12 +923,10 @@ ProcXpCreateContext(ClientPtr client) /* * Allocate and add the context resource. */ - if((pContext = (XpContextPtr) xalloc(totalContextSize)) == + if((pContext = (XpContextPtr) xalloc(sizeof(XpContextRec))) == (XpContextPtr) NULL) return BadAlloc; - InitContextPrivates(pContext); - if(AddResource(stuff->contextID, RTcontext, (pointer) pContext) != TRUE) { @@ -975,6 +940,7 @@ ProcXpCreateContext(ClientPtr client) pContext->state = 0; pContext->clientSlept = (ClientPtr)NULL; pContext->imageRes = 0; + pContext->devPrivates = NULL; pContext->funcs.DestroyContext = 0; pContext->funcs.StartJob = 0; @@ -1041,8 +1007,7 @@ ProcXpSetContext(ClientPtr client) REQUEST_AT_LEAST_SIZE(xPrintSetContextReq); - if((pContext = client->devPrivates[XpClientPrivateIndex].ptr) != - (pointer)NULL) + if((pContext = XP_GETPRIV(client)) != (pointer)NULL) { /* * Erase this client's knowledge of its old context, if any. @@ -1055,7 +1020,7 @@ ProcXpSetContext(ClientPtr client) FreeXpClient(pPrintClient, TRUE); } - client->devPrivates[XpClientPrivateIndex].ptr = (pointer)NULL; + XP_SETPRIV(client, NULL); } if(stuff->printContext == None) return Success; @@ -1077,7 +1042,7 @@ ProcXpSetContext(ClientPtr client) if((pPrintClient = AcquireClient(pContext, client)) == (XpClientPtr)NULL) return BadAlloc; - client->devPrivates[XpClientPrivateIndex].ptr = pContext; + XP_SETPRIV(client, pContext); XpSetFontResFunc(client); @@ -1090,7 +1055,7 @@ ProcXpSetContext(ClientPtr client) XpContextPtr XpGetPrintContext(ClientPtr client) { - return (client->devPrivates[XpClientPrivateIndex].ptr); + return XP_GETPRIV(client); } static int @@ -1105,8 +1070,7 @@ ProcXpGetContext(ClientPtr client) REQUEST_SIZE_MATCH(xPrintGetContextReq); - if((pContext = client->devPrivates[XpClientPrivateIndex].ptr) == - (pointer)NULL) + if((pContext = XP_GETPRIV(client)) == (pointer)NULL) rep.printContext = None; else rep.printContext = pContext->contextID; @@ -1249,6 +1213,7 @@ XpFreeContext(pointer data, XID id) } xfree(pContext->printerName); + dixFreePrivates(pContext->devPrivates); xfree(pContext); return Success; /* ??? */ } @@ -1284,11 +1249,9 @@ FreeXpClient(XpClientPtr pXpClient, Bool freeResource) * If we're freeing the clientRec associated with the context tied * to the client's devPrivates, then we need to clear the devPrivates. */ - if(pXpClient->client->devPrivates[XpClientPrivateIndex].ptr == - pXpClient->context) + if(XP_GETPRIV(pXpClient->client) == pXpClient->context) { - pXpClient->client->devPrivates[XpClientPrivateIndex].ptr = - (pointer)NULL; + XP_SETPRIV(pXpClient->client, NULL); } for(pPrev = (XpClientPtr)NULL, pCurrent = pContext->clientHead; @@ -1372,87 +1335,6 @@ XpFreePage(pointer data, XID id) return result; } -/* - * ContextPrivate machinery. - * Context privates are intended for use by the drivers, allowing the - * drivers to maintain context-specific data. The driver should free - * the associated data at DestroyContext time. - */ - -static void -InitContextPrivates(XpContextPtr context) -{ - register char *ptr; - DevUnion *ppriv; - register unsigned *sizes; - register unsigned size; - register int i; - - if (totalContextSize == sizeof(XpContextRec)) - ppriv = (DevUnion *)NULL; - else - ppriv = (DevUnion *)(context + 1); - - context->devPrivates = ppriv; - sizes = contextPrivateSizes; - ptr = (char *)(ppriv + contextPrivateLen); - for (i = contextPrivateLen; --i >= 0; ppriv++, sizes++) - { - if ( (size = *sizes) ) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } -} - -static void -ResetContextPrivates(void) -{ - contextPrivateCount = 0; - contextPrivateLen = 0; - xfree(contextPrivateSizes); - contextPrivateSizes = (unsigned *)NULL; - totalContextSize = sizeof(XpContextRec); - -} - -int -XpAllocateContextPrivateIndex(void) -{ - return contextPrivateCount++; -} - -Bool -XpAllocateContextPrivate(int index, unsigned amount) -{ - unsigned oldamount; - - if (index >= contextPrivateLen) - { - unsigned *nsizes; - nsizes = (unsigned *)xrealloc(contextPrivateSizes, - (index + 1) * sizeof(unsigned)); - if (!nsizes) - return FALSE; - while (contextPrivateLen <= index) - { - nsizes[contextPrivateLen++] = 0; - totalContextSize += sizeof(DevUnion); - } - contextPrivateSizes = nsizes; - } - oldamount = contextPrivateSizes[index]; - if (amount > oldamount) - { - contextPrivateSizes[index] = amount; - totalContextSize += (amount - oldamount); - } - return TRUE; -} - static XpClientPtr AcquireClient(XpContextPtr pContext, ClientPtr client) { @@ -1501,8 +1383,7 @@ ProcXpStartJob(ClientPtr client) REQUEST_SIZE_MATCH(xPrintStartJobReq); /* Check to see that a context has been established by this client. */ - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) + if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) return XpErrorBase+XPBadContext; if(pContext->state != 0) @@ -1542,8 +1423,7 @@ ProcXpEndJob(ClientPtr client) REQUEST_SIZE_MATCH(xPrintEndJobReq); - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) + if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) return XpErrorBase+XPBadSequence; if(!(pContext->state & JOB_STARTED)) @@ -1648,8 +1528,7 @@ ProcXpStartDoc(ClientPtr client) REQUEST_SIZE_MATCH(xPrintStartDocReq); - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) + if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) return XpErrorBase+XPBadSequence; if(!(pContext->state & JOB_STARTED) || @@ -1684,8 +1563,7 @@ ProcXpEndDoc(ClientPtr client) REQUEST_SIZE_MATCH(xPrintEndDocReq); - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) + if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) return XpErrorBase+XPBadSequence; if(!(pContext->state & DOC_RAW_STARTED) && @@ -1837,8 +1715,7 @@ ProcXpStartPage(ClientPtr client) REQUEST_SIZE_MATCH(xPrintStartPageReq); - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) + if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) return XpErrorBase+XPBadSequence; if(!(pContext->state & JOB_STARTED)) @@ -1882,8 +1759,7 @@ ProcXpEndPage(ClientPtr client) REQUEST_SIZE_MATCH(xPrintEndPageReq); - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) + if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) return XpErrorBase+XPBadSequence; if(!(pContext->state & PAGE_STARTED)) @@ -1932,8 +1808,7 @@ ProcXpPutDocumentData(ClientPtr client) REQUEST_AT_LEAST_SIZE(xPrintPutDocumentDataReq); - if((pContext = (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr) - == (XpContextPtr)NULL) + if((pContext = XP_GETPRIV(client)) == (XpContextPtr)NULL) return XpErrorBase+XPBadSequence; if(!(pContext->state & DOC_RAW_STARTED) && @@ -2443,7 +2318,7 @@ GetAllEventMasks(XpContextPtr pContext) XpContextPtr XpContextOfClient(ClientPtr client) { - return (XpContextPtr)client->devPrivates[XpClientPrivateIndex].ptr; + return XP_GETPRIV(client); } diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 21d00aa7f..af2e09b82 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -388,8 +388,8 @@ ProcXvQueryAdaptors(ClientPtr client) return rc; pScreen = pWin->drawable.pScreen; - pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; - + pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + XvGetScreenKey()); if (!pxvs) { rep.type = X_Reply; @@ -2099,7 +2099,8 @@ XineramaXvPutStill(ClientPtr client) void XineramifyXv(void) { ScreenPtr pScreen, screen0 = screenInfo.screens[0]; - XvScreenPtr xvsp0 = (XvScreenPtr)screen0->devPrivates[XvScreenIndex].ptr; + XvScreenPtr xvsp0 = (XvScreenPtr)dixLookupPrivate(&screen0->devPrivates, + XvGetScreenKey()); XvAdaptorPtr refAdapt, pAdapt; XvAttributePtr pAttr; XvScreenPtr xvsp; @@ -2132,8 +2133,8 @@ void XineramifyXv(void) for(j = 1; j < PanoramiXNumScreens; j++) { pScreen = screenInfo.screens[j]; - xvsp = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; - + xvsp = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + XvGetScreenKey()); /* Do not try to go on if xv is not supported on this screen */ if (xvsp==NULL) continue ; diff --git a/Xext/xvdix.h b/Xext/xvdix.h index 9e94e05d5..a516cf113 100644 --- a/Xext/xvdix.h +++ b/Xext/xvdix.h @@ -55,7 +55,6 @@ SOFTWARE. #include "scrnintstr.h" #include -extern int XvScreenIndex; extern unsigned long XvExtensionGeneration; extern unsigned long XvScreenGeneration; extern unsigned long XvResourceGeneration; @@ -224,10 +223,8 @@ typedef struct { DevUnion devPriv; } XvScreenRec, *XvScreenPtr; -#define SCREEN_PROLOGUE(pScreen, field)\ - ((pScreen)->field = \ - ((XvScreenPtr) \ - (pScreen)->devPrivates[XvScreenIndex].ptr)->field) +#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey))->field) #define SCREEN_EPILOGUE(pScreen, field, wrapper)\ ((pScreen)->field = wrapper) @@ -242,7 +239,7 @@ extern int SProcXvDispatch(ClientPtr); extern void XvExtensionInit(void); extern int XvScreenInit(ScreenPtr); -extern int XvGetScreenIndex(void); +extern DevPrivateKey XvGetScreenKey(void); extern unsigned long XvGetRTPort(void); extern int XvdiSendPortNotify(XvPortPtr, Atom, INT32); extern int XvdiVideoStopped(XvPortPtr, int); diff --git a/Xext/xvmain.c b/Xext/xvmain.c index ddf3d1d6b..a2fc10802 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -105,7 +105,7 @@ SOFTWARE. #include "xvdisp.h" #endif -int XvScreenIndex = -1; +static DevPrivateKey XvScreenKey = &XvScreenKey; unsigned long XvExtensionGeneration = 0; unsigned long XvScreenGeneration = 0; unsigned long XvResourceGeneration = 0; @@ -166,12 +166,6 @@ XvExtensionInit(void) ErrorF("XvExtensionInit: Unable to allocate resource types\n"); return; } - XvScreenIndex = AllocateScreenPrivateIndex (); - if (XvScreenIndex < 0) - { - ErrorF("XvExtensionInit: Unable to allocate screen private index\n"); - return; - } #ifdef PANORAMIX XineramaRegisterConnectionBlockCallback(XineramifyXv); #endif @@ -265,19 +259,13 @@ XvScreenInit(ScreenPtr pScreen) ErrorF("XvScreenInit: Unable to allocate resource types\n"); return BadAlloc; } - XvScreenIndex = AllocateScreenPrivateIndex (); - if (XvScreenIndex < 0) - { - ErrorF("XvScreenInit: Unable to allocate screen private index\n"); - return BadAlloc; - } #ifdef PANORAMIX XineramaRegisterConnectionBlockCallback(XineramifyXv); #endif XvScreenGeneration = serverGeneration; } - if (pScreen->devPrivates[XvScreenIndex].ptr) + if (dixLookupPrivate(&pScreen->devPrivates, XvScreenKey)) { ErrorF("XvScreenInit: screen devPrivates ptr non-NULL before init\n"); } @@ -291,7 +279,7 @@ XvScreenInit(ScreenPtr pScreen) return BadAlloc; } - pScreen->devPrivates[XvScreenIndex].ptr = (pointer)pxvs; + dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs); pxvs->DestroyPixmap = pScreen->DestroyPixmap; @@ -313,7 +301,7 @@ XvCloseScreen( XvScreenPtr pxvs; - pxvs = (XvScreenPtr) pScreen->devPrivates[XvScreenIndex].ptr; + pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); pScreen->DestroyPixmap = pxvs->DestroyPixmap; pScreen->DestroyWindow = pxvs->DestroyWindow; @@ -323,7 +311,7 @@ XvCloseScreen( xfree(pxvs); - pScreen->devPrivates[XvScreenIndex].ptr = (pointer)NULL; + dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL); return (*pScreen->CloseScreen)(ii, pScreen); @@ -334,10 +322,10 @@ XvResetProc(ExtensionEntry* extEntry) { } -_X_EXPORT int -XvGetScreenIndex(void) +_X_EXPORT DevPrivateKey +XvGetScreenKey(void) { - return XvScreenIndex; + return XvScreenKey; } _X_EXPORT unsigned long @@ -361,7 +349,7 @@ XvDestroyPixmap(PixmapPtr pPix) SCREEN_PROLOGUE(pScreen, DestroyPixmap); - pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; + pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); /* CHECK TO SEE IF THIS PORT IS IN USE */ @@ -413,7 +401,7 @@ XvDestroyWindow(WindowPtr pWin) SCREEN_PROLOGUE(pScreen, DestroyWindow); - pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; + pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); /* CHECK TO SEE IF THIS PORT IS IN USE */ diff --git a/Xext/xvmc.c b/Xext/xvmc.c index ae358936e..7ae8cc0da 100644 --- a/Xext/xvmc.c +++ b/Xext/xvmc.c @@ -39,7 +39,7 @@ #define DR_CLIENT_DRIVER_NAME_SIZE 48 #define DR_BUSID_SIZE 48 -int XvMCScreenIndex = -1; +static DevPrivateKey XvMCScreenKey = NULL; unsigned long XvMCGeneration = 0; @@ -63,7 +63,7 @@ typedef struct { } XvMCScreenRec, *XvMCScreenPtr; #define XVMC_GET_PRIVATE(pScreen) \ - (XvMCScreenPtr)((pScreen)->devPrivates[XvMCScreenIndex].ptr) + (XvMCScreenPtr)(dixLookupPrivate(&(pScreen)->devPrivates, XvMCScreenKey)) static int @@ -153,7 +153,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client) return _XvBadPort; } - if(XvMCScreenIndex >= 0) { /* any adaptors at all */ + if(XvMCScreenKey) { /* any adaptors at all */ ScreenPtr pScreen = pPort->pAdaptor->pScreen; if((pScreenPriv = XVMC_GET_PRIVATE(pScreen))) { /* any this screen */ for(i = 0; i < pScreenPriv->num_adaptors; i++) { @@ -211,7 +211,7 @@ ProcXvMCCreateContext(ClientPtr client) pScreen = pPort->pAdaptor->pScreen; - if(XvMCScreenIndex < 0) /* no XvMC adaptors */ + if(XvMCScreenKey == NULL) /* no XvMC adaptors */ return BadMatch; if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) /* none this screen */ @@ -494,7 +494,7 @@ ProcXvMCListSubpictureTypes(ClientPtr client) pScreen = pPort->pAdaptor->pScreen; - if(XvMCScreenIndex < 0) /* No XvMC adaptors */ + if(XvMCScreenKey == NULL) /* No XvMC adaptors */ return BadMatch; if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) @@ -679,7 +679,7 @@ XvMCExtensionInit(void) { ExtensionEntry *extEntry; - if(XvMCScreenIndex < 0) /* nobody supports it */ + if(XvMCScreenKey == NULL) /* nobody supports it */ return; if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes))) @@ -720,17 +720,12 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) { XvMCScreenPtr pScreenPriv; - if(XvMCGeneration != serverGeneration) { - if((XvMCScreenIndex = AllocateScreenPrivateIndex()) < 0) - return BadAlloc; - - XvMCGeneration = serverGeneration; - } + XvMCScreenKey = &XvMCScreenKey; if(!(pScreenPriv = (XvMCScreenPtr)xalloc(sizeof(XvMCScreenRec)))) return BadAlloc; - pScreen->devPrivates[XvMCScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = XvMCCloseScreen; @@ -754,7 +749,7 @@ XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id) XvMCAdaptorPtr adaptor = NULL; int i; - if(XvMCScreenIndex < 0) return NULL; + if(XvMCScreenKey == NULL) return NULL; if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) return NULL; diff --git a/afb/afb.h b/afb/afb.h index 31ccff9ee..5cfbddfb1 100644 --- a/afb/afb.h +++ b/afb/afb.h @@ -60,7 +60,6 @@ SOFTWARE. #include "mfb.h" extern int afbInverseAlu[]; -extern int afbScreenPrivateIndex; /* warning: PixelType definition duplicated in maskbits.h */ #ifndef PixelType #define PixelType CARD32 @@ -736,14 +735,15 @@ typedef struct { } afbPrivGC; typedef afbPrivGC *afbPrivGCPtr; -extern int afbGCPrivateIndex; /* index into GC private array */ -extern int afbWindowPrivateIndex; /* index into Window private array */ +extern DevPrivateKey afbScreenPrivateKey; +extern DevPrivateKey afbGCPrivateKey; +extern DevPrivateKey afbWindowPrivateKey; #ifdef PIXMAP_PER_WINDOW -extern int frameWindowPrivateIndex; /* index into Window private array */ +extern DevPrivateKey frameWindowPrivateKey; #endif #define afbGetGCPrivate(pGC) \ - ((afbPrivGC *)((pGC)->devPrivates[afbGCPrivateIndex].ptr)) + ((afbPrivGC *)dixLookupPrivate(&(pGC)->devPrivates, afbGCPrivateKey)) /* private field of window */ typedef struct { @@ -759,7 +759,7 @@ typedef struct { #define afbGetTypedWidth(pDrawable,wtype)( \ (((pDrawable)->type == DRAWABLE_WINDOW) ? \ - (int)(((PixmapPtr)((pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr))->devKind) : \ + (int)(((PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey)->devKind) : \ (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype)) #define afbGetByteWidth(pDrawable) afbGetTypedWidth(pDrawable, unsigned char) @@ -769,7 +769,7 @@ typedef struct { #define afbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\ PixmapPtr _pPix; \ if ((pDrawable)->type == DRAWABLE_WINDOW) \ - _pPix = (PixmapPtr)(pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr; \ + _pPix = (PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey); \ else \ _pPix = (PixmapPtr)(pDrawable); \ (pointer) = (ptype *) _pPix->devPrivate.ptr; \ @@ -779,7 +779,7 @@ typedef struct { #define afbGetPixelWidthSizeDepthAndPointer(pDrawable, width, size, dep, pointer) {\ PixmapPtr _pPix; \ if ((pDrawable)->type == DRAWABLE_WINDOW) \ - _pPix = (PixmapPtr)(pDrawable)->pScreen->devPrivates[afbScreenPrivateIndex].ptr; \ + _pPix = (PixmapPtr)dixLookupPrivate(&(pDrawable)->pScreen->devPrivates, afbScreenPrivateKey); \ else \ _pPix = (PixmapPtr)(pDrawable); \ (pointer) = (PixelType *)_pPix->devPrivate.ptr; \ @@ -795,7 +795,7 @@ typedef struct { afbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType) #define afbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\ - PixmapPtr _pPix = (PixmapPtr)(pWin)->drawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr; \ + PixmapPtr _pPix = (PixmapPtr)dixLookupPrivate(&(pWin)->drawable.pScreen->devPrivates, afbScreenPrivateKey); \ (pointer) = (ptype *) _pPix->devPrivate.ptr; \ (width) = ((int) _pPix->devKind) / sizeof (wtype); \ } diff --git a/afb/afbfillarc.c b/afb/afbfillarc.c index fa685ba9a..cfc3133ee 100644 --- a/afb/afbfillarc.c +++ b/afb/afbfillarc.c @@ -321,7 +321,8 @@ afbPolyFillArcSolid(register DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parc RegionPtr cclip; unsigned char *rrops; - priv = (afbPrivGC *) pGC->devPrivates[afbGCPrivateIndex].ptr; + priv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey); rrops = priv->rrops; cclip = pGC->pCompositeClip; for (arc = parcs, i = narcs; --i >= 0; arc++) { diff --git a/afb/afbfillrct.c b/afb/afbfillrct.c index 06fb37365..b4936f097 100644 --- a/afb/afbfillrct.c +++ b/afb/afbfillrct.c @@ -93,7 +93,8 @@ afbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, xRectangle *pre unsigned char *rrops; unsigned char *rropsOS; - priv = (afbPrivGC *)pGC->devPrivates[afbGCPrivateIndex].ptr; + priv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey); prgnClip = pGC->pCompositeClip; rrops = priv->rrops; rropsOS = priv->rropOS; diff --git a/afb/afbfillsp.c b/afb/afbfillsp.c index 539c3457c..0118b475a 100644 --- a/afb/afbfillsp.c +++ b/afb/afbfillsp.c @@ -123,7 +123,8 @@ afbSolidFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, pBase); - rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rrops; while (n--) { addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); @@ -238,8 +239,8 @@ afbStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) tileHeight = pStipple->drawable.height; psrc = (PixelType *)(pStipple->devPrivate.ptr); - rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; - + rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rrops; while (n--) { src = psrc[ppt->y % tileHeight]; addrlBase = afbScanline(pBase, ppt->x, ppt->y, nlwidth); @@ -484,8 +485,8 @@ afbOpaqueStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) tileHeight = pTile->drawable.height; psrc = (PixelType *)(pTile->devPrivate.ptr); rop = pGC->alu; - rropsOS = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rropOS; - + rropsOS = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rropOS; switch(rop) { case GXcopy: while (n--) { @@ -793,8 +794,8 @@ afbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; - rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; - + rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rrops; /* this replaces rotating the stipple. Instead, we just adjust the offset * at which we start grabbing bits from the stipple. * Ensure that ppt->x - xSrc >= 0 and ppt->y - ySrc >= 0, diff --git a/afb/afbgc.c b/afb/afbgc.c index 59c09e097..1d1fdc58b 100644 --- a/afb/afbgc.c +++ b/afb/afbgc.c @@ -154,7 +154,8 @@ afbCreateGC(pGC) /* afb wants to translate before scan convesion */ pGC->miTranslate = 1; - pPriv = (afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr); + pPriv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey); afbReduceRop(pGC->alu, pGC->fgPixel, pGC->planemask, pGC->depth, pPriv->rrops); afbReduceOpaqueStipple(pGC->fgPixel, pGC->bgPixel, pGC->planemask, @@ -295,8 +296,8 @@ afbValidateGC(pGC, changes, pDrawable) (oldOrg.y != pGC->lastWinOrg.y); - devPriv = ((afbPrivGCPtr)(pGC->devPrivates[afbGCPrivateIndex].ptr)); - + devPriv = (afbPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey); /* if the client clip is different or moved OR diff --git a/afb/afbimggblt.c b/afb/afbimggblt.c index de02aa46a..824f918bc 100644 --- a/afb/afbimggblt.c +++ b/afb/afbimggblt.c @@ -145,8 +145,8 @@ afbImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) register int nFirst;/* bits of glyph in current longword */ PixelType *pdstSave; int oldFill; - afbPrivGC *pPriv = (afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr); - + afbPrivGC *pPriv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey); xorg = pDrawable->x; yorg = pDrawable->y; afbGetPixelWidthSizeDepthAndPointer(pDrawable, widthDst, sizeDst, depthDst, diff --git a/afb/afbline.c b/afb/afbline.c index 9e2e4b9f4..d05675869 100644 --- a/afb/afbline.c +++ b/afb/afbline.c @@ -147,7 +147,8 @@ afbLineSS(pDrawable, pGC, mode, npt, pptInit) RegionPtr cclip; cclip = pGC->pCompositeClip; - rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rrops; pboxInit = REGION_RECTS(cclip); nboxInit = REGION_NUM_RECTS(cclip); @@ -487,7 +488,8 @@ afbLineSD(pDrawable, pGC, mode, npt, pptInit) #endif cclip = pGC->pCompositeClip; - rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; + rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rrops; pboxInit = REGION_RECTS(cclip); nboxInit = REGION_NUM_RECTS(cclip); diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c index 5a81679e8..5ae50fb70 100644 --- a/afb/afbpixmap.c +++ b/afb/afbpixmap.c @@ -113,7 +113,7 @@ afbDestroyPixmap(pPixmap) { if(--pPixmap->refcnt) return(TRUE); - dixFreePrivates(*DEVPRIV_PTR(pPixmap)); + dixFreePrivates(pPixmap->devPrivates); xfree(pPixmap); return(TRUE); } diff --git a/afb/afbply1rct.c b/afb/afbply1rct.c index 86ec174f4..e9d4d5e09 100644 --- a/afb/afbply1rct.c +++ b/afb/afbply1rct.c @@ -100,8 +100,8 @@ afbFillPolygonSolid (pDrawable, pGC, shape, mode, count, ptsIn) int depthDst; register PixelType *pdst; - devPriv = (afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr); - + devPriv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey); if (mode == CoordModePrevious || shape != Convex || REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { miFillPolygon (pDrawable, pGC, shape, mode, count, ptsIn); diff --git a/afb/afbplygblt.c b/afb/afbplygblt.c index 289d50e1b..79b269b85 100644 --- a/afb/afbplygblt.c +++ b/afb/afbplygblt.c @@ -146,8 +146,8 @@ afbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) bbox.y1 = y - info.overallAscent; bbox.y2 = y + info.overallDescent; - rrops = ((afbPrivGCPtr) pGC->devPrivates[afbGCPrivateIndex].ptr)->rrops; - + rrops = ((afbPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rrops; switch (RECT_IN_REGION(pGC->pScreen, pGC->pCompositeClip, &bbox)) { case rgnOUT: break; diff --git a/afb/afbpntwin.c b/afb/afbpntwin.c index 6082f7caa..89c4489c4 100644 --- a/afb/afbpntwin.c +++ b/afb/afbpntwin.c @@ -57,6 +57,7 @@ SOFTWARE. #include "regionstr.h" #include "pixmapstr.h" #include "scrnintstr.h" +#include "privates.h" #include "afb.h" #include "maskbits.h" @@ -71,7 +72,8 @@ afbPaintWindow(pWin, pRegion, what) register afbPrivWin *pPrivWin; unsigned char rrops[AFB_MAX_DEPTH]; - pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + afbWindowPrivateKey); switch (what) { case PW_BACKGROUND: diff --git a/afb/afbpolypnt.c b/afb/afbpolypnt.c index a9d96edfe..b8ea3ed3e 100644 --- a/afb/afbpolypnt.c +++ b/afb/afbpolypnt.c @@ -90,8 +90,8 @@ afbPolyPoint(pDrawable, pGC, mode, npt, pptInit) register unsigned char *rrops; afbPrivGC *pGCPriv; - pGCPriv = (afbPrivGC *) pGC->devPrivates[afbGCPrivateIndex].ptr; - + pGCPriv = (afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey); afbGetPixelWidthSizeDepthAndPointer(pDrawable, nlwidth, sizeDst, depthDst, pBaseSave); diff --git a/afb/afbscrinit.c b/afb/afbscrinit.c index 71e8d4c1e..8615d935b 100644 --- a/afb/afbscrinit.c +++ b/afb/afbscrinit.c @@ -69,13 +69,11 @@ SOFTWARE. #include "servermd.h" #ifdef PIXMAP_PER_WINDOW -int frameWindowPrivateIndex; +DevPrivateKey frameWindowPrivateKey = &frameWindowPrivateKey; #endif -int afbWindowPrivateIndex; -int afbGCPrivateIndex; -int afbScreenPrivateIndex; - -static unsigned long afbGeneration = 0; +DevPrivateKey afbWindowPrivateKey = &afbWindowPrivateKey; +DevPrivateKey afbGCPrivateKey = &afbGCPrivateKey; +DevPrivateKey afbScreenPrivateKey = &afbScreenPrivateKey; static Bool afbCloseScreen(int index, ScreenPtr pScreen) @@ -87,7 +85,7 @@ afbCloseScreen(int index, ScreenPtr pScreen) xfree(depths[d].vids); xfree(depths); xfree(pScreen->visuals); - xfree(pScreen->devPrivates[afbScreenPrivateIndex].ptr); + xfree(dixLookupPrivate(&pScreen->devPrivates, afbScreenPrivateKey)); return(TRUE); } @@ -98,7 +96,8 @@ afbCreateScreenResources(ScreenPtr pScreen) pointer oldDevPrivate = pScreen->devPrivate; - pScreen->devPrivate = pScreen->devPrivates[afbScreenPrivateIndex].ptr; + pScreen->devPrivate = dixLookupPrivate(&pScreen->devPrivates, + afbScreenPrivateKey); retval = miCreateScreenResources(pScreen); /* Modify screen's pixmap devKind value stored off devPrivate to @@ -106,7 +105,8 @@ afbCreateScreenResources(ScreenPtr pScreen) * of a chunky screen in longs as incorrectly setup by the mi routine. */ ((PixmapPtr)pScreen->devPrivate)->devKind = BitmapBytePad(pScreen->width); - pScreen->devPrivates[afbScreenPrivateIndex].ptr = pScreen->devPrivate; + dixSetPrivate(&pScreen->devPrivates, afbScreenPrivateKey, + pScreen->devPrivate); pScreen->devPrivate = oldDevPrivate; return(retval); } @@ -115,7 +115,8 @@ static PixmapPtr afbGetWindowPixmap(WindowPtr pWin) { #ifdef PIXMAP_PER_WINDOW - return (PixmapPtr)(pWin->devPrivates[frameWindowPrivateIndex].ptr); + return (PixmapPtr)dixLookupPrivate(&pWin->devPrivates, + frameWindowPrivateKey); #else ScreenPtr pScreen = pWin->drawable.pScreen; @@ -127,33 +128,25 @@ static void afbSetWindowPixmap(WindowPtr pWin, PixmapPtr pPix) { #ifdef PIXMAP_PER_WINDOW - pWin->devPrivates[frameWindowPrivateIndex].ptr = (pointer)pPix; + dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey, pPix); #else (* pWin->drawable.pScreen->SetScreenPixmap)(pPix); #endif } static Bool -afbAllocatePrivates(ScreenPtr pScreen, int *pWinIndex, int *pGCIndex) +afbAllocatePrivates(ScreenPtr pScreen, + DevPrivateKey *pWinKey, DevPrivateKey *pGCKey) { - if (afbGeneration != serverGeneration) { -#ifdef PIXMAP_PER_WINDOW - frameWindowPrivateIndex = AllocateWindowPrivateIndex(); -#endif - afbWindowPrivateIndex = AllocateWindowPrivateIndex(); - afbGCPrivateIndex = AllocateGCPrivateIndex(); - afbGeneration = serverGeneration; - } - if (pWinIndex) - *pWinIndex = afbWindowPrivateIndex; - if (pGCIndex) - *pGCIndex = afbGCPrivateIndex; + if (pWinKey) + *pWinKey = afbWindowPrivateKey; + if (pGCKey) + *pGCKey = afbGCPrivateKey; - afbScreenPrivateIndex = AllocateScreenPrivateIndex(); pScreen->GetWindowPixmap = afbGetWindowPixmap; pScreen->SetWindowPixmap = afbSetWindowPixmap; - return(AllocateWindowPrivate(pScreen, afbWindowPrivateIndex, sizeof(afbPrivWin)) && - AllocateGCPrivate(pScreen, afbGCPrivateIndex, sizeof(afbPrivGC))); + return(dixRequestPrivate(afbWindowPrivateKey, sizeof(afbPrivWin)) && + dixRequestPrivate(afbGCPrivateKey, sizeof(afbPrivGC))); } /* dts * (inch/dot) * (25.4 mm / inch) = mm */ @@ -179,7 +172,7 @@ afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, i ErrorF("afbInitVisuals: FALSE\n"); return FALSE; } - if (!afbAllocatePrivates(pScreen,(int *)NULL, (int *)NULL)) { + if (!afbAllocatePrivates(pScreen, NULL, NULL)) { ErrorF("afbAllocatePrivates: FALSE\n"); return FALSE; } @@ -224,7 +217,8 @@ afbScreenInit(register ScreenPtr pScreen, pointer pbits, int xsize, int ysize, i pScreen->CloseScreen = afbCloseScreen; pScreen->CreateScreenResources = afbCreateScreenResources; - pScreen->devPrivates[afbScreenPrivateIndex].ptr = pScreen->devPrivate; + dixSetPrivate(&pScreen->devPrivates, afbScreenPrivateKey, + pScreen->devPrivate); pScreen->devPrivate = oldDevPrivate; return TRUE; diff --git a/afb/afbtegblt.c b/afb/afbtegblt.c index ba889cb80..c89b23a5d 100644 --- a/afb/afbtegblt.c +++ b/afb/afbtegblt.c @@ -261,8 +261,8 @@ afbTEGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) xpos += FONTMAXBOUNDS(pfont,leftSideBearing); ypos -= FONTASCENT(pfont); - rrops = ((afbPrivGCPtr) pGC->devPrivates[afbGCPrivateIndex].ptr)->rropOS; - + rrops = ((afbPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rropOS; bbox.x1 = xpos; bbox.x2 = xpos + (widthGlyph * nglyph); bbox.y1 = ypos; diff --git a/afb/afbwindow.c b/afb/afbwindow.c index a4a1602bc..1d99fe14d 100644 --- a/afb/afbwindow.c +++ b/afb/afbwindow.c @@ -56,6 +56,7 @@ SOFTWARE. #include #include "scrnintstr.h" #include "windowstr.h" +#include "privates.h" #include "afb.h" #include "mistruct.h" #include "regionstr.h" @@ -67,14 +68,16 @@ afbCreateWindow(pWin) { register afbPrivWin *pPrivWin; - pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + afbWindowPrivateKey); pPrivWin->pRotatedBorder = NullPixmap; pPrivWin->pRotatedBackground = NullPixmap; pPrivWin->fastBackground = FALSE; pPrivWin->fastBorder = FALSE; #ifdef PIXMAP_PER_WINDOW - pWin->devPrivates[frameWindowPrivateIndex].ptr = - pWin->pDrawable.pScreen->devPrivates[afbScreenPrivateIndex].ptr; + dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey, + dixLookupPrivate(&pWin->pDrawable.pScreen->devPrivates, + afbScreenPrivateKey)); #endif return (TRUE); @@ -88,8 +91,8 @@ afbDestroyWindow(pWin) { register afbPrivWin *pPrivWin; - pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); - + pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + afbWindowPrivateKey); if (pPrivWin->pRotatedBorder) (*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder); if (pPrivWin->pRotatedBackground) @@ -123,7 +126,8 @@ afbPositionWindow(pWin, x, y) register afbPrivWin *pPrivWin; int reset = 0; - pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + afbWindowPrivateKey); if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground) { afbXRotatePixmap(pPrivWin->pRotatedBackground, pWin->drawable.x - pPrivWin->oldRotate.x); @@ -230,7 +234,8 @@ afbChangeWindowAttributes(pWin, mask) register afbPrivWin *pPrivWin; WindowPtr pBgWin; - pPrivWin = (afbPrivWin *)(pWin->devPrivates[afbWindowPrivateIndex].ptr); + pPrivWin = (afbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + afbWindowPrivateKey); /* * When background state changes from ParentRelative and * we had previously rotated the fast border pixmap to match diff --git a/afb/afbzerarc.c b/afb/afbzerarc.c index 2cc30687f..e53488e02 100644 --- a/afb/afbzerarc.c +++ b/afb/afbzerarc.c @@ -96,8 +96,8 @@ afbZeroArcSS(DrawablePtr pDraw, GCPtr pGC, xArc *arc) register PixelType *paddr; register unsigned char *rrops; - rrops = ((afbPrivGC *)(pGC->devPrivates[afbGCPrivateIndex].ptr))->rrops; - + rrops = ((afbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + afbGCPrivateKey))->rrops; afbGetPixelWidthSizeDepthAndPointer(pDraw, nlwidth, sizeDst, depthDst, addrl); do360 = miZeroArcSetup(arc, &info, TRUE); diff --git a/cfb/cfb.h b/cfb/cfb.h index 3c165ff1d..44d4ad0fd 100644 --- a/cfb/cfb.h +++ b/cfb/cfb.h @@ -56,8 +56,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. pixmap.devKind = width_of_pixmap_in_bytes */ -extern int cfbGCPrivateIndex; -extern int cfbWindowPrivateIndex; +extern DevPrivateKey cfbGCPrivateKey; +extern DevPrivateKey cfbWindowPrivateKey; /* private field of GC */ typedef struct { @@ -72,7 +72,7 @@ typedef struct { typedef cfbPrivGC *cfbPrivGCPtr; #define cfbGetGCPrivate(pGC) ((cfbPrivGCPtr)\ - (pGC)->devPrivates[cfbGCPrivateIndex].ptr) + dixLookupPrivate(&(pGC)->devPrivates, cfbGCPrivateKey)) #define cfbGetCompositeClip(pGC) ((pGC)->pCompositeClip) @@ -93,7 +93,7 @@ typedef struct { } cfbPrivWin; #define cfbGetWindowPrivate(_pWin) ((cfbPrivWin *)\ - (_pWin)->devPrivates[cfbWindowPrivateIndex].ptr) + dixLookupPrivate(&(_pWin)->devPrivates, cfbWindowPrivateKey)) /* cfb8bit.c */ @@ -314,8 +314,8 @@ extern int cfb8SegmentSS1RectXor( extern Bool cfbAllocatePrivates( ScreenPtr /*pScreen*/, - int * /*window_index*/, - int * /*gc_index*/ + DevPrivateKey * /*window_key*/, + DevPrivateKey * /*gc_key*/ ); /* cfbbitblt.c */ @@ -1230,7 +1230,7 @@ extern void cfbZeroPolyArcSS8Xor( #define CFB_NEED_SCREEN_PRIVATE -extern int cfbScreenPrivateIndex; +extern DevPrivateKey cfbScreenPrivateKey; #endif #ifndef CFB_PROTOTYPES_ONLY diff --git a/cfb/cfballpriv.c b/cfb/cfballpriv.c index e0ccdf4d0..e6ab93a87 100644 --- a/cfb/cfballpriv.c +++ b/cfb/cfballpriv.c @@ -45,48 +45,37 @@ in this Software without prior written authorization from The Open Group. #include "mibstore.h" #if 1 || PSZ==8 -int cfbWindowPrivateIndex = -1; -int cfbGCPrivateIndex = -1; +DevPrivateKey cfbWindowPrivateKey = &cfbWindowPrivateKey; +DevPrivateKey cfbGCPrivateKey = &cfbGCPrivateKey; #endif #ifdef CFB_NEED_SCREEN_PRIVATE -int cfbScreenPrivateIndex = -1; -static unsigned long cfbGeneration = 0; +DevPrivateKey cfbScreenPrivateKey = &cfbScreenPrivateKey; #endif Bool -cfbAllocatePrivates(pScreen, window_index, gc_index) +cfbAllocatePrivates(pScreen, window_key, gc_key) ScreenPtr pScreen; - int *window_index, *gc_index; + DevPrivateKey *window_key, *gc_key; { - if (!window_index || !gc_index || - (*window_index == -1 && *gc_index == -1)) + if (!window_key || !gc_key || (!*window_key && !*gc_key)) { if (!mfbAllocatePrivates(pScreen, - &cfbWindowPrivateIndex, &cfbGCPrivateIndex)) + &cfbWindowPrivateKey, &cfbGCPrivateKey)) return FALSE; - if (window_index) - *window_index = cfbWindowPrivateIndex; - if (gc_index) - *gc_index = cfbGCPrivateIndex; + if (window_key) + *window_key = cfbWindowPrivateKey; + if (gc_key) + *gc_key = cfbGCPrivateKey; } else { - cfbWindowPrivateIndex = *window_index; - cfbGCPrivateIndex = *gc_index; + cfbWindowPrivateKey = *window_key; + cfbGCPrivateKey = *gc_key; } - if (!AllocateWindowPrivate(pScreen, cfbWindowPrivateIndex, - sizeof(cfbPrivWin)) || - !AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) + if (!dixRequestPrivate(cfbWindowPrivateKey, sizeof(cfbPrivWin))) return FALSE; -#ifdef CFB_NEED_SCREEN_PRIVATE - if (cfbGeneration != serverGeneration) - { - cfbScreenPrivateIndex = AllocateScreenPrivateIndex (); - cfbGeneration = serverGeneration; - } - if (cfbScreenPrivateIndex == -1) + if (!dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC))) return FALSE; -#endif return TRUE; } diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index ed01316ed..247331c6d 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -107,7 +107,7 @@ cfbDestroyPixmap(pPixmap) { if(--pPixmap->refcnt) return TRUE; - dixFreePrivates(*DEVPRIV_PTR(pPixmap)); + dixFreePrivates(pPixmap->devPrivates); xfree(pPixmap); return TRUE; } diff --git a/cfb/cfbrrop.h b/cfb/cfbrrop.h index eeb373a5e..e9ca881be 100644 --- a/cfb/cfbrrop.h +++ b/cfb/cfbrrop.h @@ -35,7 +35,8 @@ in this Software without prior written authorization from The Open Group. #endif #define RROP_FETCH_GC(gc) \ - RROP_FETCH_GCPRIV(((cfbPrivGCPtr)(gc)->devPrivates[cfbGCPrivateIndex].ptr)) + RROP_FETCH_GCPRIV((cfbPrivGCPtr)dixLookupPrivate(&(gc)->devPrivates, \ + cfbGCPrivateKey)) #ifndef RROP #define RROP GXset diff --git a/cfb/cfbscrinit.c b/cfb/cfbscrinit.c index 83f5cf0a2..48e363971 100644 --- a/cfb/cfbscrinit.c +++ b/cfb/cfbscrinit.c @@ -59,7 +59,7 @@ cfbCloseScreen (index, pScreen) xfree (depths); xfree (pScreen->visuals); #ifdef CFB_NEED_SCREEN_PRIVATE - xfree (pScreen->devPrivates[cfbScreenPrivateIndex].ptr); + xfree (dixLookupPrivate(&pScreen->devPrivates, cfbScreenPrivateKey)); #else xfree (pScreen->devPrivate); #endif @@ -88,7 +88,7 @@ cfbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width) int dpix, dpiy; /* dots per inch */ int width; /* pixel width of frame buffer */ { - if (!cfbAllocatePrivates(pScreen, (int *) 0, (int *) 0)) + if (!cfbAllocatePrivates(pScreen, NULL, NULL)) return FALSE; pScreen->defColormap = FakeClientID(0); /* let CreateDefColormap do whatever it wants for pixels */ @@ -132,9 +132,11 @@ cfbCreateScreenResources(pScreen) Bool retval; pointer oldDevPrivate = pScreen->devPrivate; - pScreen->devPrivate = pScreen->devPrivates[cfbScreenPrivateIndex].ptr; + pScreen->devPrivate = dixLookupPrivate(&pScreen->devPrivates, + cfbScreenPrivateKey); retval = miCreateScreenResources(pScreen); - pScreen->devPrivates[cfbScreenPrivateIndex].ptr = pScreen->devPrivate; + dixSetPrivate(&pScreen->devPrivates, cfbScreenPrivateKey, + pScreen->devPrivate); pScreen->devPrivate = oldDevPrivate; return retval; } @@ -173,7 +175,8 @@ cfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width) pScreen->CloseScreen = cfbCloseScreen; #ifdef CFB_NEED_SCREEN_PRIVATE pScreen->CreateScreenResources = cfbCreateScreenResources; - pScreen->devPrivates[cfbScreenPrivateIndex].ptr = pScreen->devPrivate; + dixSetPrivate(&pScreen->devPrivates, cfbScreenPrivateKey, + pScreen->devPrivate); pScreen->devPrivate = oldDevPrivate; #endif pScreen->GetScreenPixmap = cfbGetScreenPixmap; @@ -200,7 +203,8 @@ cfbGetScreenPixmap(pScreen) ScreenPtr pScreen; { #ifdef CFB_NEED_SCREEN_PRIVATE - return (PixmapPtr)pScreen->devPrivates[cfbScreenPrivateIndex].ptr; + return (PixmapPtr)dixLookupPrivate(&pScreen->devPrivates, + cfbScreenPrivateKey); #else return (PixmapPtr)pScreen->devPrivate; #endif @@ -212,8 +216,8 @@ cfbSetScreenPixmap(pPix) { #ifdef CFB_NEED_SCREEN_PRIVATE if (pPix) - pPix->drawable.pScreen->devPrivates[cfbScreenPrivateIndex].ptr = - (pointer)pPix; + dixSetPrivate(&pPix->drawable.pScreen->devPrivates, + cfbScreenPrivateKey, pPix); #else if (pPix) pPix->drawable.pScreen->devPrivate = (pointer)pPix; diff --git a/cfb/cfbwindow.c b/cfb/cfbwindow.c index e04b73df2..49cc6f079 100644 --- a/cfb/cfbwindow.c +++ b/cfb/cfbwindow.c @@ -75,8 +75,8 @@ cfbCreateWindow(pWin) #ifdef PIXMAP_PER_WINDOW /* Setup pointer to Screen pixmap */ - pWin->devPrivates[frameWindowPrivateIndex].ptr = - (pointer) cfbGetScreenPixmap(pWin->drawable.pScreen); + dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey, + cfbGetScreenPixmap(pWin->drawable.pScreen)); #endif return TRUE; @@ -213,7 +213,7 @@ cfbCopyWindow(pWin, ptOldOrg, prgnSrc) /* swap in correct PaintWindow* routine. If we can use a fast output routine (i.e. the pixmap is paddable to 32 bits), also pre-rotate a copy -of it in devPrivates[cfbWindowPrivateIndex].ptr. +of it in devPrivates under cfbWindowPrivateKey. */ Bool cfbChangeWindowAttributes(pWin, mask) diff --git a/composite/compalloc.c b/composite/compalloc.c index f555411bf..dbb7f3a05 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -137,7 +137,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) cw->oldy = COMP_ORIGIN_INVALID; cw->damageRegistered = FALSE; cw->damaged = FALSE; - pWin->devPrivates[CompWindowPrivateIndex].ptr = cw; + dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, cw); } ccw->next = cw->clients; cw->clients = ccw; @@ -212,7 +212,7 @@ compFreeClientWindow (WindowPtr pWin, XID id) REGION_UNINIT (pScreen, &cw->borderClip); - pWin->devPrivates[CompWindowPrivateIndex].ptr = 0; + dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, NULL); xfree (cw); } else if (cw->update == CompositeRedirectAutomatic && @@ -297,7 +297,7 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) } csw->update = CompositeRedirectAutomatic; csw->clients = 0; - pWin->devPrivates[CompSubwindowsPrivateIndex].ptr = csw; + dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, csw); } /* * Redirect all existing windows @@ -312,7 +312,7 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) if (!csw->clients) { xfree (csw); - pWin->devPrivates[CompSubwindowsPrivateIndex].ptr = 0; + dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, 0); } xfree (ccw); return ret; @@ -385,7 +385,7 @@ compFreeClientSubwindows (WindowPtr pWin, XID id) */ if (!csw->clients) { - pWin->devPrivates[CompSubwindowsPrivateIndex].ptr = 0; + dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, NULL); xfree (csw); } } diff --git a/composite/compext.c b/composite/compext.c index 944f8d844..8d2a2d790 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -50,7 +50,7 @@ #define SERVER_COMPOSITE_MINOR 4 static CARD8 CompositeReqCode; -static int CompositeClientPrivateIndex; +static DevPrivateKey CompositeClientPrivateKey = &CompositeClientPrivateKey; RESTYPE CompositeClientWindowType; RESTYPE CompositeClientSubwindowsType; static RESTYPE CompositeClientOverlayType; @@ -63,7 +63,8 @@ typedef struct _CompositeClient { int minor_version; } CompositeClientRec, *CompositeClientPtr; -#define GetCompositeClient(pClient) ((CompositeClientPtr) (pClient)->devPrivates[CompositeClientPrivateIndex].ptr) +#define GetCompositeClient(pClient) ((CompositeClientPtr) \ + dixLookupPrivate(&(pClient)->devPrivates, CompositeClientPrivateKey)) static void CompositeClientCallback (CallbackListPtr *list, @@ -712,9 +713,8 @@ CompositeExtensionInit (void) if (!CompositeClientOverlayType) return; - CompositeClientPrivateIndex = AllocateClientPrivateIndex (); - if (!AllocateClientPrivate (CompositeClientPrivateIndex, - sizeof (CompositeClientRec))) + if (!dixRequestPrivate(CompositeClientPrivateKey, + sizeof(CompositeClientRec))) return; if (!AddCallback (&ClientStateCallback, CompositeClientCallback, 0)) return; diff --git a/composite/compinit.c b/composite/compinit.c index c557eebc4..757d92913 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -46,10 +46,9 @@ #include "compint.h" -int CompScreenPrivateIndex; -int CompWindowPrivateIndex; -int CompSubwindowsPrivateIndex; -static int CompGeneration; +DevPrivateKey CompScreenPrivateKey = &CompScreenPrivateKey; +DevPrivateKey CompWindowPrivateKey = &CompWindowPrivateKey; +DevPrivateKey CompSubwindowsPrivateKey = &CompSubwindowsPrivateKey; static Bool @@ -87,7 +86,7 @@ compCloseScreen (int index, ScreenPtr pScreen) cs->pOverlayWin = NULL; xfree (cs); - pScreen->devPrivates[CompScreenPrivateIndex].ptr = 0; + dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL); ret = (*pScreen->CloseScreen) (index, pScreen); return ret; @@ -375,25 +374,6 @@ compScreenInit (ScreenPtr pScreen) { CompScreenPtr cs; - if (CompGeneration != serverGeneration) - { - CompScreenPrivateIndex = AllocateScreenPrivateIndex (); - if (CompScreenPrivateIndex == -1) - return FALSE; - CompWindowPrivateIndex = AllocateWindowPrivateIndex (); - if (CompWindowPrivateIndex == -1) - return FALSE; - CompSubwindowsPrivateIndex = AllocateWindowPrivateIndex (); - if (CompSubwindowsPrivateIndex == -1) - return FALSE; - CompGeneration = serverGeneration; - } - if (!AllocateWindowPrivate (pScreen, CompWindowPrivateIndex, 0)) - return FALSE; - - if (!AllocateWindowPrivate (pScreen, CompSubwindowsPrivateIndex, 0)) - return FALSE; - if (GetCompScreen (pScreen)) return TRUE; cs = (CompScreenPtr) xalloc (sizeof (CompScreenRec)); @@ -461,7 +441,7 @@ compScreenInit (ScreenPtr pScreen) cs->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = compCloseScreen; - pScreen->devPrivates[CompScreenPrivateIndex].ptr = (pointer) cs; + dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, cs); RegisterRealChildHeadProc(CompositeRealChildHead); diff --git a/composite/compint.h b/composite/compint.h index 38b1777a2..79699e4c1 100644 --- a/composite/compint.h +++ b/composite/compint.h @@ -64,6 +64,7 @@ #include "globals.h" #include "picturestr.h" #include "extnsionst.h" +#include "privates.h" #include "mi.h" #include "damage.h" #include "damageextint.h" @@ -159,13 +160,16 @@ typedef struct _CompScreen { } CompScreenRec, *CompScreenPtr; -extern int CompScreenPrivateIndex; -extern int CompWindowPrivateIndex; -extern int CompSubwindowsPrivateIndex; +extern DevPrivateKey CompScreenPrivateKey; +extern DevPrivateKey CompWindowPrivateKey; +extern DevPrivateKey CompSubwindowsPrivateKey; -#define GetCompScreen(s) ((CompScreenPtr) ((s)->devPrivates[CompScreenPrivateIndex].ptr)) -#define GetCompWindow(w) ((CompWindowPtr) ((w)->devPrivates[CompWindowPrivateIndex].ptr)) -#define GetCompSubwindows(w) ((CompSubwindowsPtr) ((w)->devPrivates[CompSubwindowsPrivateIndex].ptr)) +#define GetCompScreen(s) ((CompScreenPtr) \ + dixLookupPrivate(&(s)->devPrivates, CompScreenPrivateKey)) +#define GetCompWindow(w) ((CompWindowPtr) \ + dixLookupPrivate(&(w)->devPrivates, CompWindowPrivateKey)) +#define GetCompSubwindows(w) ((CompSubwindowsPtr) \ + dixLookupPrivate(&(w)->devPrivates, CompSubwindowsPrivateKey)) extern RESTYPE CompositeClientWindowType; extern RESTYPE CompositeClientSubwindowsType; diff --git a/configure.ac b/configure.ac index 8ed2ef8bf..43bc357e5 100644 --- a/configure.ac +++ b/configure.ac @@ -1027,7 +1027,6 @@ AC_DEFINE(XTEST, 1, [Support XTest extension]) AC_DEFINE(XSYNC, 1, [Support XSync extension]) AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) AC_DEFINE(BIGREQS, 1, [Support BigRequests extension]) -AC_DEFINE(PIXPRIV, 1, [Support pixmap privates]) if test "x$WDTRACE" != "xno" ; then DIX_LIB='$(top_builddir)/dix/dix.O' diff --git a/damageext/damageext.c b/damageext/damageext.c index e1724ecc7..159746536 100755 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -29,7 +29,7 @@ static unsigned char DamageReqCode; static int DamageEventBase; static int DamageErrorBase; -static int DamageClientPrivateIndex; +static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKey; static RESTYPE DamageExtType; static RESTYPE DamageExtWinType; @@ -511,9 +511,7 @@ DamageExtensionInit(void) if (!DamageExtWinType) return; - DamageClientPrivateIndex = AllocateClientPrivateIndex (); - if (!AllocateClientPrivate (DamageClientPrivateIndex, - sizeof (DamageClientRec))) + if (!dixRequestPrivate(DamageClientPrivateKey, sizeof (DamageClientRec))) return; if (!AddCallback (&ClientStateCallback, DamageClientCallback, 0)) return; diff --git a/damageext/damageextint.h b/damageext/damageextint.h index dfafc9319..e06f28c4e 100644 --- a/damageext/damageextint.h +++ b/damageext/damageextint.h @@ -48,7 +48,7 @@ typedef struct _DamageClient { int critical; } DamageClientRec, *DamageClientPtr; -#define GetDamageClient(pClient) ((DamageClientPtr) (pClient)->devPrivates[DamageClientPrivateIndex].ptr) +#define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey)) typedef struct _DamageExt { DamagePtr pDamage; diff --git a/dbe/dbe.c b/dbe/dbe.c index aec626b79..223b0c983 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -58,19 +58,16 @@ /* GLOBALS */ /* Per-screen initialization functions [init'ed by DbeRegisterFunction()] */ -static Bool (* DbeInitFunct[MAXSCREENS])(); /* pScreen, pDbeScreenPriv */ +static Bool (* DbeInitFunct[MAXSCREENS])(); /* pScreen, pDbeScreenPriv */ /* These are static globals copied to DBE's screen private for use by DDX */ -static int dbeScreenPrivIndex; -static int dbeWindowPrivIndex; +static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKey; +static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKey; /* These are static globals copied to DBE's screen private for use by DDX */ static RESTYPE dbeDrawableResType; static RESTYPE dbeWindowPrivResType; -/* This global is used by DbeAllocWinPrivPrivIndex() */ -static int winPrivPrivCount = 0; - /* Used to generate DBE's BadBuffer error. */ static int dbeErrorBase; @@ -112,146 +109,6 @@ DbeRegisterFunction(ScreenPtr pScreen, Bool (*funct) (/* ??? */)) } /* DbeRegisterFunction() */ - -/****************************************************************************** - * - * DBE DIX Procedure: DbeAllocWinPriv - * - * Description: - * - * This function was cloned from AllocateWindow() in window.c. - * This function allocates a window priv structure to be associated - * with a double-buffered window. - * - *****************************************************************************/ -static DbeWindowPrivPtr -DbeAllocWinPriv(ScreenPtr pScreen) -{ - DbeWindowPrivPtr pDbeWindowPriv; - DbeScreenPrivPtr pDbeScreenPriv; - register char *ptr; - register DevUnion *ppriv; - register unsigned int *sizes; - register unsigned int size; - register int i; - - pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); - pDbeWindowPriv = (DbeWindowPrivPtr)xalloc(pDbeScreenPriv->totalWinPrivSize); - - if (pDbeWindowPriv) - { - ppriv = (DevUnion *)(pDbeWindowPriv + 1); - pDbeWindowPriv->devPrivates = ppriv; - sizes = pDbeScreenPriv->winPrivPrivSizes; - ptr = (char *)(ppriv + pDbeScreenPriv->winPrivPrivLen); - for (i = pDbeScreenPriv->winPrivPrivLen; --i >= 0; ppriv++, sizes++) - { - if ((size = *sizes)) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } - } - - return(pDbeWindowPriv); - -} /* DbeAllocWinPriv() */ - - -/****************************************************************************** - * - * DBE DIX Procedure: DbeFallbackAllocWinPriv - * - * Description: - * - * This is a fallback function for AllocWinPriv(). - * - *****************************************************************************/ - -#if 0 /* NOT USED */ -static DbeWindowPrivPtr -DbeFallbackAllocWinPriv(pScreen) - ScreenPtr pScreen; -{ - return (NULL); -} /* DbeFallbackAllocWinPriv() */ -#endif - - -/****************************************************************************** - * - * DBE DIX Procedure: DbeAllocWinPrivPrivIndex - * - * Description: - * - * This function was cloned from AllocateWindowPrivateIndex() in window.c. - * This function allocates a new window priv priv index by simply returning - * an incremented private counter. - * - *****************************************************************************/ - -static int -DbeAllocWinPrivPrivIndex(void) -{ - return winPrivPrivCount++; - -} /* DbeAllocWinPrivPrivIndex() */ - - -/****************************************************************************** - * - * DBE DIX Procedure: DbeAllocWinPrivPriv - * - * Description: - * - * This function was cloned from AllocateWindowPrivate() in privates.c. - * This function allocates a private structure to be hung off - * a window private. - * - *****************************************************************************/ - -static Bool -DbeAllocWinPrivPriv(register ScreenPtr pScreen, int index, unsigned int amount) -{ - DbeScreenPrivPtr pDbeScreenPriv; - unsigned int oldamount; - - - pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); - - if (index >= pDbeScreenPriv->winPrivPrivLen) - { - unsigned *nsizes; - nsizes = (unsigned *)xrealloc(pDbeScreenPriv->winPrivPrivSizes, - (index + 1) * sizeof(unsigned)); - if (!nsizes) - { - return(FALSE); - } - - while (pDbeScreenPriv->winPrivPrivLen <= index) - { - nsizes[pDbeScreenPriv->winPrivPrivLen++] = 0; - pDbeScreenPriv->totalWinPrivSize += sizeof(DevUnion); - } - - pDbeScreenPriv->winPrivPrivSizes = nsizes; - } - - oldamount = pDbeScreenPriv->winPrivPrivSizes[index]; - - if (amount > oldamount) - { - pDbeScreenPriv->winPrivPrivSizes[index] = amount; - pDbeScreenPriv->totalWinPrivSize += (amount - oldamount); - } - return(TRUE); - -} /* DbeAllocWinPrivPriv() */ - /****************************************************************************** * @@ -269,9 +126,6 @@ DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens) { /* Stub DIX. */ pDbeScreenPriv->SetupBackgroundPainter = NULL; - pDbeScreenPriv->AllocWinPriv = NULL; - pDbeScreenPriv->AllocWinPrivPrivIndex = NULL; - pDbeScreenPriv->AllocWinPrivPriv = NULL; /* Do not unwrap PositionWindow nor DestroyWindow. If the DDX * initialization function failed, we assume that it did not wrap @@ -439,11 +293,10 @@ ProcDbeAllocateBackBufferName(ClientPtr client) * Allocate a window priv. */ - if (!(pDbeWindowPriv = - (*pDbeScreenPriv->AllocWinPriv)(pWin->drawable.pScreen))) - { + pDbeWindowPriv = (DbeWindowPrivPtr)xalloc(sizeof(DbeWindowPrivRec)); + if (!pDbeWindowPriv) return(BadAlloc); - } + bzero(pDbeWindowPriv, sizeof(DbeWindowPrivRec)); /* Make the window priv a DBE window priv resource. */ if (!AddResource(stuff->buffer, dbeWindowPrivResType, @@ -474,7 +327,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) /* Actually connect the window priv to the window. */ - pWin->devPrivates[dbeWindowPrivIndex].ptr = (pointer)pDbeWindowPriv; + dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, pDbeWindowPriv); } /* if -- There is no buffer associated with the window. */ @@ -1592,10 +1445,11 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) if (pDbeWindowPriv->nBufferIDs == 0) { /* Reset the DBE window priv pointer. */ - pDbeWindowPriv->pWindow->devPrivates[dbeWindowPrivIndex].ptr = - (pointer)NULL; + dixSetPrivate(&pDbeWindowPriv->pWindow->devPrivates, dbeWindowPrivKey, + NULL); /* We are done with the window priv. */ + dixFreePrivates(pDbeWindowPriv->devPrivates); xfree(pDbeWindowPriv); } @@ -1622,12 +1476,6 @@ DbeResetProc(ExtensionEntry *extEntry) ScreenPtr pScreen; DbeScreenPrivPtr pDbeScreenPriv; - - if (dbeScreenPrivIndex < 0) - { - return; - } - for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; @@ -1641,11 +1489,7 @@ DbeResetProc(ExtensionEntry *extEntry) if (pDbeScreenPriv->ResetProc) (*pDbeScreenPriv->ResetProc)(pScreen); - if (pDbeScreenPriv->winPrivPrivSizes) - { - xfree(pDbeScreenPriv->winPrivPrivSizes); - } - + dixFreePrivates(pDbeScreenPriv->devPrivates); xfree(pDbeScreenPriv); } } @@ -1766,21 +1610,6 @@ DbeExtensionInit(void) if(!noPanoramiXExtension) return; #endif - /* Allocate private pointers in windows and screens. */ - - if ((dbeScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) - { - return; - } - - if ((dbeWindowPrivIndex = AllocateWindowPrivateIndex()) < 0) - { - return; - } - - /* Initialize the priv priv counts between server generations. */ - winPrivPrivCount = 0; - /* Create the resource types. */ dbeDrawableResType = CreateNewResourceType(DbeDrawableDelete) | RC_DRAWABLE; @@ -1795,8 +1624,7 @@ DbeExtensionInit(void) pScreen = screenInfo.screens[i]; - if (!AllocateWindowPrivate(pScreen, dbeWindowPrivIndex, 0) || - !(pDbeScreenPriv = + if (!(pDbeScreenPriv = (DbeScreenPrivPtr)Xcalloc(sizeof(DbeScreenPrivRec)))) { /* If we can not alloc a window or screen private, @@ -1805,28 +1633,23 @@ DbeExtensionInit(void) for (j = 0; j < i; j++) { - xfree(screenInfo.screens[j]->devPrivates[dbeScreenPrivIndex].ptr); - screenInfo.screens[j]->devPrivates[dbeScreenPrivIndex].ptr = NULL; + xfree(dixLookupPrivate(&screenInfo.screens[j]->devPrivates, + dbeScreenPrivKey)); + dixSetPrivate(&screenInfo.screens[j]->devPrivates, + dbeScreenPrivKey, NULL); } return; } - pScreen->devPrivates[dbeScreenPrivIndex].ptr = (pointer)pDbeScreenPriv; - - /* Store the DBE priv priv size info for later use when allocating - * priv privs at the driver level. - */ - pDbeScreenPriv->winPrivPrivLen = 0; - pDbeScreenPriv->winPrivPrivSizes = (unsigned *)NULL; - pDbeScreenPriv->totalWinPrivSize = sizeof(DbeWindowPrivRec); + dixSetPrivate(&pScreen->devPrivates, dbeScreenPrivKey, pDbeScreenPriv); /* Copy the resource types */ pDbeScreenPriv->dbeDrawableResType = dbeDrawableResType; pDbeScreenPriv->dbeWindowPrivResType = dbeWindowPrivResType; /* Copy the private indices */ - pDbeScreenPriv->dbeScreenPrivIndex = dbeScreenPrivIndex; - pDbeScreenPriv->dbeWindowPrivIndex = dbeWindowPrivIndex; + pDbeScreenPriv->dbeScreenPrivKey = dbeScreenPrivKey; + pDbeScreenPriv->dbeWindowPrivKey = dbeWindowPrivKey; if(DbeInitFunct[i]) { @@ -1834,9 +1657,6 @@ DbeExtensionInit(void) /* Setup DIX. */ pDbeScreenPriv->SetupBackgroundPainter = DbeSetupBackgroundPainter; - pDbeScreenPriv->AllocWinPriv = DbeAllocWinPriv; - pDbeScreenPriv->AllocWinPrivPrivIndex = DbeAllocWinPrivPrivIndex; - pDbeScreenPriv->AllocWinPrivPriv = DbeAllocWinPrivPriv; /* Setup DDX. */ ddxInitSuccess = (*DbeInitFunct[i])(pScreen, pDbeScreenPriv); @@ -1868,9 +1688,6 @@ DbeExtensionInit(void) #ifndef DISABLE_MI_DBE_BY_DEFAULT /* Setup DIX. */ pDbeScreenPriv->SetupBackgroundPainter = DbeSetupBackgroundPainter; - pDbeScreenPriv->AllocWinPriv = DbeAllocWinPriv; - pDbeScreenPriv->AllocWinPrivPrivIndex = DbeAllocWinPrivPrivIndex; - pDbeScreenPriv->AllocWinPrivPriv = DbeAllocWinPrivPriv; /* Setup DDX. */ ddxInitSuccess = miDbeInit(pScreen, pDbeScreenPriv); @@ -1909,8 +1726,9 @@ DbeExtensionInit(void) for (i = 0; i < screenInfo.numScreens; i++) { - xfree(screenInfo.screens[i]->devPrivates[dbeScreenPrivIndex].ptr); - pScreen->devPrivates[dbeScreenPrivIndex].ptr = NULL; + xfree(dixLookupPrivate(&screenInfo.screens[i]->devPrivates, + dbeScreenPrivKey)); + dixSetPrivate(&pScreen->devPrivates, dbeScreenPrivKey, NULL); } return; } diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h index 90f13428a..7d5a115ad 100644 --- a/dbe/dbestruct.h +++ b/dbe/dbestruct.h @@ -39,14 +39,13 @@ #define NEED_DBE_PROTOCOL #include #include "windowstr.h" +#include "privates.h" /* DEFINES */ -#define DBE_SCREEN_PRIV(pScreen) \ - ((dbeScreenPrivIndex < 0) ? \ - NULL : \ - ((DbeScreenPrivPtr)((pScreen)->devPrivates[dbeScreenPrivIndex].ptr))) +#define DBE_SCREEN_PRIV(pScreen) ((DbeScreenPrivPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, dbeScreenPrivKey)) #define DBE_SCREEN_PRIV_FROM_DRAWABLE(pDrawable) \ DBE_SCREEN_PRIV((pDrawable)->pScreen) @@ -63,10 +62,8 @@ #define DBE_SCREEN_PRIV_FROM_GC(pGC)\ DBE_SCREEN_PRIV((pGC)->pScreen) -#define DBE_WINDOW_PRIV(pWindow)\ - ((dbeWindowPrivIndex < 0) ? \ - NULL : \ - ((DbeWindowPrivPtr)(pWindow->devPrivates[dbeWindowPrivIndex].ptr))) +#define DBE_WINDOW_PRIV(pWin) ((DbeWindowPrivPtr) \ + dixLookupPrivate(&(pWin)->devPrivates, dbeWindowPrivKey)) /* Initial size of the buffer ID array in the window priv. */ #define DBE_INIT_MAX_IDS 2 @@ -142,7 +139,7 @@ typedef struct _DbeWindowPrivRec /* Device-specific private information. */ - DevUnion *devPrivates; + PrivateRec *devPrivates; } DbeWindowPrivRec, *DbeWindowPrivPtr; @@ -155,18 +152,13 @@ typedef struct _DbeWindowPrivRec typedef struct _DbeScreenPrivRec { - /* Info for creating window privs */ - int winPrivPrivLen; /* Length of privs in DbeWindowPrivRec */ - unsigned int *winPrivPrivSizes; /* Array of private record sizes */ - unsigned int totalWinPrivSize; /* PrivRec + size of all priv priv ptrs */ - /* Resources created by DIX to be used by DDX */ RESTYPE dbeDrawableResType; RESTYPE dbeWindowPrivResType; /* Private indices created by DIX to be used by DDX */ - int dbeScreenPrivIndex; - int dbeWindowPrivIndex; + DevPrivateKey dbeScreenPrivKey; + DevPrivateKey dbeWindowPrivKey; /* Wrapped functions * It is the responsibilty of the DDX layer to wrap PositionWindow(). @@ -180,17 +172,6 @@ typedef struct _DbeScreenPrivRec WindowPtr /*pWin*/, GCPtr /*pGC*/ ); - DbeWindowPrivPtr (*AllocWinPriv)( - ScreenPtr /*pScreen*/ -); - int (*AllocWinPrivPrivIndex)( - void -); - Bool (*AllocWinPrivPriv)( - ScreenPtr /*pScreen*/, - int /*index*/, - unsigned /*amount*/ -); /* Per-screen DDX routines */ Bool (*GetVisualInfo)( @@ -223,7 +204,7 @@ typedef struct _DbeScreenPrivRec /* Device-specific private information. */ - DevUnion *devPrivates; + PrivateRec *devPrivates; } DbeScreenPrivRec, *DbeScreenPrivPtr; diff --git a/dbe/midbe.c b/dbe/midbe.c index 014e365ce..f26a09c6d 100644 --- a/dbe/midbe.c +++ b/dbe/midbe.c @@ -59,12 +59,11 @@ #include -static int miDbePrivPrivGeneration = 0; -static int miDbeWindowPrivPrivIndex = -1; +static DevPrivateKey miDbeWindowPrivPrivKey = &miDbeWindowPrivPrivKey; static RESTYPE dbeDrawableResType; static RESTYPE dbeWindowPrivResType; -static int dbeScreenPrivIndex = -1; -static int dbeWindowPrivIndex = -1; +static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKey; +static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKey; /****************************************************************************** @@ -204,8 +203,8 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) /* Attach the priv priv to the priv. */ - pDbeWindowPriv->devPrivates[miDbeWindowPrivPrivIndex].ptr = - (pointer)pDbeWindowPrivPriv; + dixSetPrivate(&pDbeWindowPriv->devPrivates, miDbeWindowPrivPrivKey, + pDbeWindowPrivPriv); /* Clear the back buffer. */ @@ -778,30 +777,12 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv) dbeWindowPrivResType = pDbeScreenPriv->dbeWindowPrivResType; /* Copy private indices created by DIX */ - dbeScreenPrivIndex = pDbeScreenPriv->dbeScreenPrivIndex; - dbeWindowPrivIndex = pDbeScreenPriv->dbeWindowPrivIndex; + dbeScreenPrivKey = pDbeScreenPriv->dbeScreenPrivKey; + dbeWindowPrivKey = pDbeScreenPriv->dbeWindowPrivKey; - /* Reset the window priv privs if generations do not match. */ - if (miDbePrivPrivGeneration != serverGeneration) - { - /* - ********************************************************************** - ** Allocate the window priv priv. - ********************************************************************** - */ - - miDbeWindowPrivPrivIndex = (*pDbeScreenPriv->AllocWinPrivPrivIndex)(); - - /* Make sure we only do this code once. */ - miDbePrivPrivGeneration = serverGeneration; - - } /* if -- Reset priv privs. */ - - if (!(*pDbeScreenPriv->AllocWinPrivPriv)(pScreen, - miDbeWindowPrivPrivIndex, sizeof(MiDbeWindowPrivPrivRec))) - { + if (!dixRequestPrivate(miDbeWindowPrivPrivKey, + sizeof(MiDbeWindowPrivPrivRec))) return(FALSE); - } /* Wrap functions. */ pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; diff --git a/dbe/midbestr.h b/dbe/midbestr.h index 1ad0104aa..ae9f206fc 100644 --- a/dbe/midbestr.h +++ b/dbe/midbestr.h @@ -42,19 +42,15 @@ /* DEFINES */ #define MI_DBE_WINDOW_PRIV_PRIV(pDbeWindowPriv) \ - (((miDbeWindowPrivPrivIndex < 0) || (!pDbeWindowPriv)) ? \ - NULL : \ - ((MiDbeWindowPrivPrivPtr) \ - ((pDbeWindowPriv)->devPrivates[miDbeWindowPrivPrivIndex].ptr))) + (!(pDbeWindowPriv) ? NULL : (MiDbeWindowPrivPrivPtr) \ + dixLookupPrivate(&(pDbeWindowPriv)->devPrivates, miDbeWindowPrivPrivKey)) #define MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin)\ MI_DBE_WINDOW_PRIV_PRIV(DBE_WINDOW_PRIV(pWin)) #define MI_DBE_SCREEN_PRIV_PRIV(pDbeScreenPriv) \ - (((miDbeScreenPrivPrivIndex < 0) || (!pDbeScreenPriv)) ? \ - NULL : \ - ((MiDbeScreenPrivPrivPtr) \ - ((pDbeScreenPriv)->devPrivates[miDbeScreenPrivPrivIndex].ptr))) + (!(pDbeScreenPriv) ? NULL : (MiDbeScreenPrivPrivPtr) \ + dixLookupPrivate(&(pDbeScreenPriv)->devPrivates, miDbeScreenPrivPrivKey)) /* TYPEDEFS */ diff --git a/dix/colormap.c b/dix/colormap.c index 7d6e7da4f..98f2f1b22 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -67,7 +67,6 @@ SOFTWARE. #include "xace.h" extern XID clientErrorValue; -extern int colormapPrivateCount; static Pixel FindBestPixel( EntryPtr /*pentFirst*/, @@ -388,30 +387,11 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, pmap->numPixelsBlue[client] = size; } } - if (!AddResource(mid, RT_COLORMAP, (pointer)pmap)) - return (BadAlloc); - /* If the device wants a chance to initialize the colormap in any way, - * this is it. In specific, if this is a Static colormap, this is the - * time to fill in the colormap's values */ + pmap->devPrivates = NULL; pmap->flags |= BeingCreated; - - /* - * Allocate the array of devPrivate's for this colormap. - */ - - if (colormapPrivateCount == 0) - pmap->devPrivates = NULL; - else - { - pmap->devPrivates = (DevUnion *) xcalloc ( - sizeof(DevUnion), colormapPrivateCount); - if (!pmap->devPrivates) - { - FreeResource (mid, RT_NONE); - return BadAlloc; - } - } + if (!AddResource(mid, RT_COLORMAP, (pointer)pmap)) + return (BadAlloc); /* * Security creation/labeling check @@ -423,6 +403,9 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, return i; } + /* If the device wants a chance to initialize the colormap in any way, + * this is it. In specific, if this is a Static colormap, this is the + * time to fill in the colormap's values */ if (!(*pScreen->CreateColormap)(pmap)) { FreeResource (mid, RT_NONE); @@ -486,10 +469,7 @@ FreeColormap (pointer value, XID mid) } } - dixFreePrivates(*DEVPRIV_PTR(pmap)); - if (pmap->devPrivates) - xfree(pmap->devPrivates); - + dixFreePrivates(pmap->devPrivates); xfree(pmap); return(Success); } diff --git a/dix/devices.c b/dix/devices.c index 4ddfa63da..a62ab6580 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -85,8 +85,7 @@ SOFTWARE. * This file handles input device-related stuff. */ -int CoreDevicePrivatesIndex = 0; -static int CoreDevicePrivatesGeneration = -1; +DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKey; /** * Create a new input device and init it to sane values. The device is added @@ -151,14 +150,7 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->xkb_interest = NULL; #endif dev->config_info = NULL; - /* must pre-allocate one private for the new devPrivates support */ - dev->nPrivates = 1; - dev->devPrivates = (DevUnion *)xcalloc(1, sizeof(DevUnion)); - if (!dev->devPrivates) { - xfree(dev); - return NULL; - } - + dev->devPrivates = NULL; dev->unwrapProc = NULL; dev->coreEvents = TRUE; dev->inited = FALSE; @@ -358,7 +350,7 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what) break; case DEVICE_CLOSE: - pDev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + dixSetPrivate(&pDev->devPrivates, CoreDevicePrivateKey, NULL); break; default: @@ -390,7 +382,7 @@ CorePointerProc(DeviceIntPtr pDev, int what) break; case DEVICE_CLOSE: - pDev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + dixSetPrivate(&pDev->devPrivates, CoreDevicePrivateKey, NULL); break; default: @@ -411,11 +403,6 @@ InitCoreDevices(void) { DeviceIntPtr dev; - if (CoreDevicePrivatesGeneration != serverGeneration) { - CoreDevicePrivatesIndex = AllocateDevicePrivateIndex(); - CoreDevicePrivatesGeneration = serverGeneration; - } - if (!inputInfo.keyboard) { dev = AddInputDevice(CoreKeyboardProc, TRUE); if (!dev) @@ -433,9 +420,6 @@ InitCoreDevices(void) dev->ActivateGrab = ActivateKeyboardGrab; dev->DeactivateGrab = DeactivateKeyboardGrab; dev->coreEvents = FALSE; - if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) - FatalError("Couldn't allocate keyboard devPrivates\n"); - dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; (void)ActivateDevice(dev); inputInfo.keyboard = dev; } @@ -457,9 +441,6 @@ InitCoreDevices(void) dev->ActivateGrab = ActivatePointerGrab; dev->DeactivateGrab = DeactivatePointerGrab; dev->coreEvents = FALSE; - if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) - FatalError("Couldn't allocate pointer devPrivates\n"); - dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; (void)ActivateDevice(dev); inputInfo.pointer = dev; } @@ -609,11 +590,8 @@ CloseDevice(DeviceIntPtr dev) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); #endif - dixFreePrivates(*DEVPRIV_PTR(dev)); - if (dev->devPrivates) - xfree(dev->devPrivates); - xfree(dev->sync.event); + dixFreePrivates(dev->devPrivates); xfree(dev); } diff --git a/dix/dispatch.c b/dix/dispatch.c index bb30619a2..1ad3c9437 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3692,7 +3692,7 @@ CloseDownClient(ClientPtr client) #ifdef SMART_SCHEDULE SmartLastClient = NullClient; #endif - dixFreePrivates(*DEVPRIV_PTR(client)); + dixFreePrivates(client->devPrivates); xfree(client); while (!clients[currentMaxClients-1]) @@ -3712,10 +3712,6 @@ KillAllClients(void) } } -extern int clientPrivateLen; -extern unsigned *clientPrivateSizes; -extern unsigned totalClientSize; - void InitClient(ClientPtr client, int i, pointer ospriv) { client->index = i; @@ -3735,6 +3731,7 @@ void InitClient(ClientPtr client, int i, pointer ospriv) client->big_requests = FALSE; client->priority = 0; client->clientState = ClientStateInitial; + client->devPrivates = NULL; #ifdef XKB if (!noXkbExtension) { client->xkbClientFlags = 0; @@ -3755,54 +3752,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv) #endif } -int -InitClientPrivates(ClientPtr client) -{ - char *ptr; - DevUnion *ppriv; - unsigned *sizes; - unsigned size; - int i; - - if (totalClientSize == sizeof(ClientRec)) - ppriv = (DevUnion *)NULL; - else if (client->index) - ppriv = (DevUnion *)(client + 1); - else - { - ppriv = (DevUnion *)xalloc(totalClientSize - sizeof(ClientRec)); - if (!ppriv) - return 0; - } - client->devPrivates = ppriv; - sizes = clientPrivateSizes; - ptr = (char *)(ppriv + clientPrivateLen); - if (ppriv) - bzero(ppriv, totalClientSize - sizeof(ClientRec)); - for (i = clientPrivateLen; --i >= 0; ppriv++, sizes++) - { - if ( (size = *sizes) ) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } - - /* Allow registrants to initialize the serverClient devPrivates */ - if (!client->index && ClientStateCallback) - { - NewClientInfoRec clientinfo; - - clientinfo.client = client; - clientinfo.prefix = (xConnSetupPrefix *)NULL; - clientinfo.setup = (xConnSetup *) NULL; - CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); - } - return 1; -} - /************************ * int NextAvailableClient(ospriv) * @@ -3819,11 +3768,10 @@ ClientPtr NextAvailableClient(pointer ospriv) i = nextFreeClientID; if (i == MAXCLIENTS) return (ClientPtr)NULL; - clients[i] = client = (ClientPtr)xalloc(totalClientSize); + clients[i] = client = (ClientPtr)xalloc(sizeof(ClientRec)); if (!client) return (ClientPtr)NULL; InitClient(client, i, ospriv); - InitClientPrivates(client); if (!InitClientResources(client)) { xfree(client); diff --git a/dix/extension.c b/dix/extension.c index ec47ef19c..c81c1a123 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -73,39 +73,6 @@ int lastEvent = EXTENSION_EVENT_BASE; static int lastError = FirstExtensionError; static unsigned int NumExtensions = 0; -extern int extensionPrivateLen; -extern unsigned *extensionPrivateSizes; -extern unsigned totalExtensionSize; - -static void -InitExtensionPrivates(ExtensionEntry *ext) -{ - char *ptr; - DevUnion *ppriv; - unsigned *sizes; - unsigned size; - int i; - - if (totalExtensionSize == sizeof(ExtensionEntry)) - ppriv = (DevUnion *)NULL; - else - ppriv = (DevUnion *)(ext + 1); - - ext->devPrivates = ppriv; - sizes = extensionPrivateSizes; - ptr = (char *)(ppriv + extensionPrivateLen); - for (i = extensionPrivateLen; --i >= 0; ppriv++, sizes++) - { - if ( (size = *sizes) ) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } -} - _X_EXPORT ExtensionEntry * AddExtension(char *name, int NumEvents, int NumErrors, int (*MainProc)(ClientPtr c1), @@ -122,14 +89,13 @@ AddExtension(char *name, int NumEvents, int NumErrors, (unsigned)(lastError + NumErrors > LAST_ERROR)) return((ExtensionEntry *) NULL); - ext = (ExtensionEntry *) xalloc(totalExtensionSize); + ext = (ExtensionEntry *) xalloc(sizeof(ExtensionEntry)); if (!ext) return((ExtensionEntry *) NULL); - bzero(ext, totalExtensionSize); - InitExtensionPrivates(ext); ext->name = (char *)xalloc(strlen(name) + 1); ext->num_aliases = 0; ext->aliases = (char **)NULL; + ext->devPrivates = NULL; if (!ext->name) { xfree(ext); @@ -283,7 +249,7 @@ CloseDownExtensions(void) for (j = extensions[i]->num_aliases; --j >= 0;) xfree(extensions[i]->aliases[j]); xfree(extensions[i]->aliases); - dixFreePrivates(*DEVPRIV_PTR(extensions[i])); + dixFreePrivates(extensions[i]->devPrivates); xfree(extensions[i]); } xfree(extensions); diff --git a/dix/gc.c b/dix/gc.c index ccd586bdd..d77932c9e 100644 --- a/dix/gc.c +++ b/dix/gc.c @@ -573,45 +573,13 @@ BUG: should check for failure to create default tile */ - -static GCPtr -AllocateGC(ScreenPtr pScreen) -{ - GCPtr pGC; - char *ptr; - DevUnion *ppriv; - unsigned *sizes; - unsigned size; - int i; - - pGC = (GCPtr)xalloc(pScreen->totalGCSize); - if (pGC) - { - ppriv = (DevUnion *)(pGC + 1); - pGC->devPrivates = ppriv; - sizes = pScreen->GCPrivateSizes; - ptr = (char *)(ppriv + pScreen->GCPrivateLen); - for (i = pScreen->GCPrivateLen; --i >= 0; ppriv++, sizes++) - { - if ( (size = *sizes) ) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } - } - return pGC; -} - _X_EXPORT GCPtr CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, XID gcid, ClientPtr client) { GCPtr pGC; - pGC = AllocateGC(pDrawable->pScreen); + pGC = (GCPtr)xalloc(sizeof(GC)); if (!pGC) { *pStatus = BadAlloc; @@ -624,7 +592,7 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, pGC->planemask = ~0; pGC->serialNumber = GC_CHANGE_SERIAL_BIT; pGC->funcs = 0; - + pGC->devPrivates = NULL; pGC->fgPixel = 0; pGC->bgPixel = 1; pGC->lineWidth = 0; @@ -918,7 +886,7 @@ FreeGC(pointer value, XID gid) (*pGC->funcs->DestroyGC) (pGC); if (pGC->dash != DefaultDash) xfree(pGC->dash); - dixFreePrivates(*DEVPRIV_PTR(pGC)); + dixFreePrivates(pGC->devPrivates); xfree(pGC); return(Success); } @@ -941,7 +909,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth) { GCPtr pGC; - pGC = AllocateGC(pScreen); + pGC = (GCPtr)xalloc(sizeof(GC)); if (!pGC) return (GCPtr)NULL; @@ -950,7 +918,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth) pGC->alu = GXcopy; /* dst <- src */ pGC->planemask = ~0; pGC->serialNumber = 0; - + pGC->devPrivates = NULL; pGC->fgPixel = 0; pGC->bgPixel = 1; pGC->lineWidth = 0; diff --git a/dix/getevents.c b/dix/getevents.c index 68993030d..a12bcfd78 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -725,7 +725,8 @@ SwitchCoreKeyboard(DeviceIntPtr pDev) KeyClassPtr ckeyc = inputInfo.keyboard->key; int i = 0; - if (inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) { + if (pDev != dixLookupPrivate(&inputInfo.keyboard->devPrivates, + CoreDevicePrivateKey)) { memcpy(ckeyc->modifierMap, pDev->key->modifierMap, MAP_LENGTH); if (ckeyc->modifierKeyMap) xfree(ckeyc->modifierKeyMap); @@ -769,7 +770,8 @@ SwitchCoreKeyboard(DeviceIntPtr pDev) (ckeyc->curKeySyms.maxKeyCode - ckeyc->curKeySyms.minKeyCode), serverClient); - inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; + dixSetPrivate(&inputInfo.keyboard->devPrivates, CoreDevicePrivateKey, + pDev); } } @@ -783,8 +785,10 @@ SwitchCoreKeyboard(DeviceIntPtr pDev) _X_EXPORT void SwitchCorePointer(DeviceIntPtr pDev) { - if (inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) - inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; + if (pDev != dixLookupPrivate(&inputInfo.pointer->devPrivates, + CoreDevicePrivateKey)) + dixSetPrivate(&inputInfo.pointer->devPrivates, + CoreDevicePrivateKey, pDev); } diff --git a/dix/main.c b/dix/main.c index 3e5d0e438..7f7bfa539 100644 --- a/dix/main.c +++ b/dix/main.c @@ -118,15 +118,12 @@ Equipment Corporation. #include "dpmsproc.h" #endif -extern int InitClientPrivates(ClientPtr client); - extern void Dispatch(void); char *ConnectionInfo; xConnSetupPrefix connSetupPrefix; extern FontPtr defaultFont; -extern int screenPrivateCount; extern void InitProcVectors(void); extern Bool CreateGCperDepthArray(void); @@ -136,8 +133,6 @@ static #endif Bool CreateConnectionBlock(void); -static void FreeScreen(ScreenPtr); - _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[33]; int connBlockScreenStart; @@ -372,8 +367,6 @@ main(int argc, char *argv[], char *envp[]) if (screenInfo.numVideoScreens < 0) screenInfo.numVideoScreens = screenInfo.numScreens; InitExtensions(argc, argv); - if (!InitClientPrivates(serverClient)) - FatalError("failed to allocate serverClient devprivates"); for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; @@ -472,7 +465,8 @@ main(int argc, char *argv[], char *envp[]) FreeGCperDepth(i); FreeDefaultStipple(i); (* screenInfo.screens[i]->CloseScreen)(i, screenInfo.screens[i]); - FreeScreen(screenInfo.screens[i]); + dixFreePrivates(screenInfo.screens[i]->devPrivates); + xfree(screenInfo.screens[i]); screenInfo.numScreens = i; } CloseDownEvents(); @@ -482,8 +476,7 @@ main(int argc, char *argv[], char *envp[]) FreeAuditTimer(); - dixFreePrivates(*DEVPRIV_PTR(serverClient)); - xfree(serverClient->devPrivates); + dixFreePrivates(serverClient->devPrivates); serverClient->devPrivates = NULL; if (dispatchException & DE_TERMINATE) @@ -695,32 +688,9 @@ AddScreen( if (!pScreen) return -1; - pScreen->devPrivates = (DevUnion *)xcalloc(sizeof(DevUnion), - screenPrivateCount); - if (!pScreen->devPrivates && screenPrivateCount) - { - xfree(pScreen); - return -1; - } - - /* must pre-allocate one private for the new devPrivates support */ - pScreen->WindowPrivateLen = 1; - pScreen->WindowPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); - pScreen->totalWindowSize = PadToLong(sizeof(WindowRec)) + sizeof(DevUnion); - pScreen->GCPrivateLen = 1; - pScreen->GCPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); - pScreen->totalGCSize = PadToLong(sizeof(GC)) + sizeof(DevUnion); - pScreen->PixmapPrivateLen = 1; - pScreen->PixmapPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); - pScreen->totalPixmapSize = BitmapBytePad(8 * (sizeof(PixmapRec) + - sizeof(DevUnion))); - if (!pScreen->WindowPrivateSizes || !pScreen->GCPrivateSizes || - !pScreen->PixmapPrivateSizes) { - xfree(pScreen); - return -1; - } - + pScreen->devPrivates = NULL; pScreen->myNum = i; + pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8); pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ pScreen->CreateScreenResources = 0; @@ -772,20 +742,10 @@ AddScreen( screenInfo.numScreens++; if (!(*pfnInit)(i, pScreen, argc, argv)) { - FreeScreen(pScreen); + dixFreePrivates(pScreen->devPrivates); + xfree(pScreen); screenInfo.numScreens--; return -1; } return i; } - -static void -FreeScreen(ScreenPtr pScreen) -{ - xfree(pScreen->WindowPrivateSizes); - xfree(pScreen->GCPrivateSizes); - xfree(pScreen->PixmapPrivateSizes); - dixFreePrivates(*DEVPRIV_PTR(pScreen)); - xfree(pScreen->devPrivates); - xfree(pScreen); -} diff --git a/dix/pixmap.c b/dix/pixmap.c index c280a3b94..6096cc6b5 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -109,11 +109,6 @@ _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr pScreen, int pixDataSize) { PixmapPtr pPixmap; - char *ptr; - DevUnion *ppriv; - unsigned *sizes; - unsigned size; - int i; if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize) return NullPixmap; @@ -121,27 +116,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize) pPixmap = (PixmapPtr)xalloc(pScreen->totalPixmapSize + pixDataSize); if (!pPixmap) return NullPixmap; - ppriv = (DevUnion *)(pPixmap + 1); - pPixmap->devPrivates = ppriv; - sizes = pScreen->PixmapPrivateSizes; - ptr = (char *)(ppriv + pScreen->PixmapPrivateLen); - for (i = pScreen->PixmapPrivateLen; --i >= 0; ppriv++, sizes++) - { - if ((size = *sizes) != 0) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } - -#ifdef _XSERVER64 - if (pPixmap) { - pPixmap->drawable.pad0 = 0; - pPixmap->drawable.pad1 = 0; - } -#endif + pPixmap->devPrivates = NULL; return pPixmap; } diff --git a/dix/privates.c b/dix/privates.c index 4dbba437c..38c552360 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -30,21 +30,13 @@ from The Open Group. #include #endif -#include #include -#include "scrnintstr.h" -#include "misc.h" -#include "os.h" #include "windowstr.h" #include "resource.h" #include "privates.h" -#include "dixstruct.h" #include "gcstruct.h" #include "colormapst.h" -#include "servermd.h" -#include "site.h" #include "inputstr.h" -#include "extnsionst.h" typedef struct _PrivateDesc { DevPrivateKey key; @@ -218,18 +210,6 @@ dixLookupPrivateOffset(RESTYPE type) return offsets[type]; } -/* - * Called from the main loop to reset the subsystem. - */ -static int ResetExtensionPrivates(void); -static int ResetClientPrivates(void); -static void ResetScreenPrivates(void); -static void ResetWindowPrivates(void); -static void ResetGCPrivates(void); -static void ResetPixmapPrivates(void); -static void ResetColormapPrivates(void); -static void ResetDevicePrivateIndex(void); - int dixResetPrivates(void) { @@ -251,16 +231,6 @@ dixResetPrivates(void) for (i=0; i < offsetsSize; i++) offsets[i] = -1; - /* reset legacy devPrivates support */ - if (!ResetExtensionPrivates() || !ResetClientPrivates()) - return FALSE; - ResetScreenPrivates(); - ResetWindowPrivates(); - ResetGCPrivates(); - ResetPixmapPrivates(); - ResetColormapPrivates(); - ResetDevicePrivateIndex(); - /* register basic resource offsets */ return dixRegisterPrivateOffset(RT_WINDOW, offsetof(WindowRec, devPrivates)) && @@ -271,421 +241,3 @@ dixResetPrivates(void) dixRegisterPrivateOffset(RT_COLORMAP, offsetof(ColormapRec, devPrivates)); } - -/* - * Following is the old devPrivates support. These functions and variables - * are deprecated, and should no longer be used. - */ - -/* - * See the Wrappers and devPrivates section in "Definition of the - * Porting Layer for the X v11 Sample Server" (doc/Server/ddx.tbl.ms) - * for information on how to use devPrivates. - */ - -/* - * extension private machinery - */ - -static int extensionPrivateCount; -int extensionPrivateLen; -unsigned *extensionPrivateSizes; -unsigned totalExtensionSize; - -static int -ResetExtensionPrivates(void) -{ - extensionPrivateCount = 1; - extensionPrivateLen = 1; - xfree(extensionPrivateSizes); - extensionPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); - if (!extensionPrivateSizes) - return FALSE; - totalExtensionSize = PadToLong(sizeof(ExtensionEntry)) + sizeof(DevUnion); - return TRUE; -} - -_X_EXPORT int -AllocateExtensionPrivateIndex(void) -{ - return extensionPrivateCount++; -} - -_X_EXPORT Bool -AllocateExtensionPrivate(int index2, unsigned amount) -{ - unsigned oldamount; - - /* Round up sizes for proper alignment */ - amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); - - if (index2 >= extensionPrivateLen) - { - unsigned *nsizes; - nsizes = (unsigned *)xrealloc(extensionPrivateSizes, - (index2 + 1) * sizeof(unsigned)); - if (!nsizes) - return FALSE; - while (extensionPrivateLen <= index2) - { - nsizes[extensionPrivateLen++] = 0; - totalExtensionSize += sizeof(DevUnion); - } - extensionPrivateSizes = nsizes; - } - oldamount = extensionPrivateSizes[index2]; - if (amount > oldamount) - { - extensionPrivateSizes[index2] = amount; - totalExtensionSize += (amount - oldamount); - } - return TRUE; -} - -/* - * client private machinery - */ - -static int clientPrivateCount; -int clientPrivateLen; -unsigned *clientPrivateSizes; -unsigned totalClientSize; - -static int -ResetClientPrivates(void) -{ - clientPrivateCount = 1; - clientPrivateLen = 1; - xfree(clientPrivateSizes); - clientPrivateSizes = (unsigned *)xcalloc(1, sizeof(unsigned)); - if (!clientPrivateSizes) - return FALSE; - totalClientSize = PadToLong(sizeof(ClientRec)) + sizeof(DevUnion); - return TRUE; -} - -_X_EXPORT int -AllocateClientPrivateIndex(void) -{ - return clientPrivateCount++; -} - -_X_EXPORT Bool -AllocateClientPrivate(int index2, unsigned amount) -{ - unsigned oldamount; - - /* Round up sizes for proper alignment */ - amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); - - if (index2 >= clientPrivateLen) - { - unsigned *nsizes; - nsizes = (unsigned *)xrealloc(clientPrivateSizes, - (index2 + 1) * sizeof(unsigned)); - if (!nsizes) - return FALSE; - while (clientPrivateLen <= index2) - { - nsizes[clientPrivateLen++] = 0; - totalClientSize += sizeof(DevUnion); - } - clientPrivateSizes = nsizes; - } - oldamount = clientPrivateSizes[index2]; - if (amount > oldamount) - { - clientPrivateSizes[index2] = amount; - totalClientSize += (amount - oldamount); - } - return TRUE; -} - -/* - * screen private machinery - */ - -int screenPrivateCount; - -static void -ResetScreenPrivates(void) -{ - screenPrivateCount = 1; -} - -/* this can be called after some screens have been created, - * so we have to worry about resizing existing devPrivates - */ -_X_EXPORT int -AllocateScreenPrivateIndex(void) -{ - int idx; - int i; - ScreenPtr pScreen; - DevUnion *nprivs; - - idx = screenPrivateCount++; - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - nprivs = (DevUnion *)xrealloc(pScreen->devPrivates, - screenPrivateCount * sizeof(DevUnion)); - if (!nprivs) - { - screenPrivateCount--; - return -1; - } - /* Zero the new private */ - bzero(&nprivs[idx], sizeof(DevUnion)); - pScreen->devPrivates = nprivs; - } - return idx; -} - - -/* - * window private machinery - */ - -static int windowPrivateCount; - -static void -ResetWindowPrivates(void) -{ - windowPrivateCount = 1; -} - -_X_EXPORT int -AllocateWindowPrivateIndex(void) -{ - return windowPrivateCount++; -} - -_X_EXPORT Bool -AllocateWindowPrivate(ScreenPtr pScreen, int index2, unsigned amount) -{ - unsigned oldamount; - - /* Round up sizes for proper alignment */ - amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); - - if (index2 >= pScreen->WindowPrivateLen) - { - unsigned *nsizes; - nsizes = (unsigned *)xrealloc(pScreen->WindowPrivateSizes, - (index2 + 1) * sizeof(unsigned)); - if (!nsizes) - return FALSE; - while (pScreen->WindowPrivateLen <= index2) - { - nsizes[pScreen->WindowPrivateLen++] = 0; - pScreen->totalWindowSize += sizeof(DevUnion); - } - pScreen->WindowPrivateSizes = nsizes; - } - oldamount = pScreen->WindowPrivateSizes[index2]; - if (amount > oldamount) - { - pScreen->WindowPrivateSizes[index2] = amount; - pScreen->totalWindowSize += (amount - oldamount); - } - return TRUE; -} - - -/* - * gc private machinery - */ - -static int gcPrivateCount; - -static void -ResetGCPrivates(void) -{ - gcPrivateCount = 1; -} - -_X_EXPORT int -AllocateGCPrivateIndex(void) -{ - return gcPrivateCount++; -} - -_X_EXPORT Bool -AllocateGCPrivate(ScreenPtr pScreen, int index2, unsigned amount) -{ - unsigned oldamount; - - /* Round up sizes for proper alignment */ - amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); - - if (index2 >= pScreen->GCPrivateLen) - { - unsigned *nsizes; - nsizes = (unsigned *)xrealloc(pScreen->GCPrivateSizes, - (index2 + 1) * sizeof(unsigned)); - if (!nsizes) - return FALSE; - while (pScreen->GCPrivateLen <= index2) - { - nsizes[pScreen->GCPrivateLen++] = 0; - pScreen->totalGCSize += sizeof(DevUnion); - } - pScreen->GCPrivateSizes = nsizes; - } - oldamount = pScreen->GCPrivateSizes[index2]; - if (amount > oldamount) - { - pScreen->GCPrivateSizes[index2] = amount; - pScreen->totalGCSize += (amount - oldamount); - } - return TRUE; -} - - -/* - * pixmap private machinery - */ -static int pixmapPrivateCount; - -static void -ResetPixmapPrivates(void) -{ - pixmapPrivateCount = 1; -} - -_X_EXPORT int -AllocatePixmapPrivateIndex(void) -{ - return pixmapPrivateCount++; -} - -_X_EXPORT Bool -AllocatePixmapPrivate(ScreenPtr pScreen, int index2, unsigned amount) -{ - unsigned oldamount; - - /* Round up sizes for proper alignment */ - amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); - - if (index2 >= pScreen->PixmapPrivateLen) - { - unsigned *nsizes; - nsizes = (unsigned *)xrealloc(pScreen->PixmapPrivateSizes, - (index2 + 1) * sizeof(unsigned)); - if (!nsizes) - return FALSE; - while (pScreen->PixmapPrivateLen <= index2) - { - nsizes[pScreen->PixmapPrivateLen++] = 0; - pScreen->totalPixmapSize += sizeof(DevUnion); - } - pScreen->PixmapPrivateSizes = nsizes; - } - oldamount = pScreen->PixmapPrivateSizes[index2]; - if (amount > oldamount) - { - pScreen->PixmapPrivateSizes[index2] = amount; - pScreen->totalPixmapSize += (amount - oldamount); - } - pScreen->totalPixmapSize = BitmapBytePad(pScreen->totalPixmapSize * 8); - return TRUE; -} - - -/* - * colormap private machinery - */ - -int colormapPrivateCount; - -static void -ResetColormapPrivates(void) -{ - colormapPrivateCount = 1; -} - - -_X_EXPORT int -AllocateColormapPrivateIndex (InitCmapPrivFunc initPrivFunc) -{ - int index; - int i; - ColormapPtr pColormap; - DevUnion *privs; - - index = colormapPrivateCount++; - - for (i = 0; i < screenInfo.numScreens; i++) - { - /* - * AllocateColormapPrivateIndex may be called after the - * default colormap has been created on each screen! - * - * We must resize the devPrivates array for the default - * colormap on each screen, making room for this new private. - * We also call the initialization function 'initPrivFunc' on - * the new private allocated for each default colormap. - */ - - ScreenPtr pScreen = screenInfo.screens[i]; - - pColormap = (ColormapPtr) LookupIDByType ( - pScreen->defColormap, RT_COLORMAP); - - if (pColormap) - { - privs = (DevUnion *) xrealloc (pColormap->devPrivates, - colormapPrivateCount * sizeof(DevUnion)); - if (!privs) { - colormapPrivateCount--; - return -1; - } - bzero(&privs[index], sizeof(DevUnion)); - pColormap->devPrivates = privs; - if (!(*initPrivFunc)(pColormap,index)) - { - colormapPrivateCount--; - return -1; - } - } - } - - return index; -} - -/* - * device private machinery - */ - -static int devicePrivateIndex = 0; - -_X_EXPORT int -AllocateDevicePrivateIndex(void) -{ - return devicePrivateIndex++; -} - -_X_EXPORT Bool -AllocateDevicePrivate(DeviceIntPtr device, int index) -{ - if (device->nPrivates < ++index) { - DevUnion *nprivs = (DevUnion *) xrealloc(device->devPrivates, - index * sizeof(DevUnion)); - if (!nprivs) - return FALSE; - device->devPrivates = nprivs; - bzero(&nprivs[device->nPrivates], sizeof(DevUnion) - * (index - device->nPrivates)); - device->nPrivates = index; - return TRUE; - } else { - return TRUE; - } -} - -static void -ResetDevicePrivateIndex(void) -{ - devicePrivateIndex = 1; -} diff --git a/dix/window.c b/dix/window.c index f04beea79..1a598faca 100644 --- a/dix/window.c +++ b/dix/window.c @@ -345,41 +345,6 @@ MakeRootTile(WindowPtr pWin) } -WindowPtr -AllocateWindow(ScreenPtr pScreen) -{ - WindowPtr pWin; - char *ptr; - DevUnion *ppriv; - unsigned *sizes; - unsigned size; - int i; - - pWin = (WindowPtr)xalloc(pScreen->totalWindowSize); - if (pWin) - { - ppriv = (DevUnion *)(pWin + 1); - pWin->devPrivates = ppriv; - sizes = pScreen->WindowPrivateSizes; - ptr = (char *)(ppriv + pScreen->WindowPrivateLen); - for (i = pScreen->WindowPrivateLen; --i >= 0; ppriv++, sizes++) - { - if ( (size = *sizes) ) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } -#if _XSERVER64 - pWin->drawable.pad0 = 0; - pWin->drawable.pad1 = 0; -#endif - } - return pWin; -} - /***** * CreateRootWindow * Makes a window at initialization time for specified screen @@ -392,7 +357,7 @@ CreateRootWindow(ScreenPtr pScreen) BoxRec box; PixmapFormatRec *format; - pWin = AllocateWindow(pScreen); + pWin = (WindowPtr)xalloc(sizeof(WindowRec)); if (!pWin) return FALSE; @@ -405,6 +370,7 @@ CreateRootWindow(ScreenPtr pScreen) pWin->drawable.pScreen = pScreen; pWin->drawable.type = DRAWABLE_WINDOW; + pWin->devPrivates = NULL; pWin->drawable.depth = pScreen->rootDepth; for (format = screenInfo.formats; @@ -689,13 +655,14 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, return NullWindow; } - pWin = AllocateWindow(pScreen); + pWin = (WindowPtr)xalloc(sizeof(WindowRec)); if (!pWin) { *error = BadAlloc; return NullWindow; } pWin->drawable = pParent->drawable; + pWin->devPrivates = NULL; pWin->drawable.depth = depth; if (depth == pParent->drawable.depth) pWin->drawable.bitsPerPixel = pParent->drawable.bitsPerPixel; @@ -968,7 +935,7 @@ DeleteWindow(pointer value, XID wid) if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; } - dixFreePrivates(*DEVPRIV_PTR(pWin)); + dixFreePrivates(pWin->devPrivates); xfree(pWin); return Success; } diff --git a/exa/exa.c b/exa/exa.c index 99707fa5c..4260cbade 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -40,9 +40,8 @@ #include "exa.h" #include "cw.h" -static int exaGeneration; -int exaScreenPrivateIndex; -int exaPixmapPrivateIndex; +DevPrivateKey exaScreenPrivateKey = &exaScreenPrivateKey; +DevPrivateKey exaPixmapPrivateKey = &exaPixmapPrivateKey; /** * exaGetPixmapOffset() returns the offset (in bytes) within the framebuffer of @@ -619,12 +618,6 @@ exaDriverInit (ScreenPtr pScreen, #ifdef RENDER ps = GetPictureScreenIfSet(pScreen); #endif - if (exaGeneration != serverGeneration) - { - exaScreenPrivateIndex = AllocateScreenPrivateIndex(); - exaPixmapPrivateIndex = AllocatePixmapPrivateIndex(); - exaGeneration = serverGeneration; - } pExaScr = xcalloc (sizeof (ExaScreenPrivRec), 1); @@ -636,7 +629,7 @@ exaDriverInit (ScreenPtr pScreen, pExaScr->info = pScreenInfo; - pScreen->devPrivates[exaScreenPrivateIndex].ptr = (pointer) pExaScr; + dixSetPrivate(&pScreen->devPrivates, exaScreenPrivateKey, pExaScr); pExaScr->migration = ExaMigrationAlways; @@ -698,8 +691,7 @@ exaDriverInit (ScreenPtr pScreen, if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) && pExaScr->info->offScreenBase < pExaScr->info->memorySize) { - if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex, - sizeof (ExaPixmapPrivRec))) { + if (!dixRequestPrivate(exaPixmapPrivateKey, sizeof(ExaPixmapPrivRec))) { LogMessage(X_WARNING, "EXA(%d): Failed to allocate pixmap private\n", pScreen->myNum); @@ -716,11 +708,7 @@ exaDriverInit (ScreenPtr pScreen, pExaScr->info->memorySize - pExaScr->info->offScreenBase); } else - { LogMessage(X_INFO, "EXA(%d): No offscreen pixmaps\n", pScreen->myNum); - if (!AllocatePixmapPrivate(pScreen, exaPixmapPrivateIndex, 0)) - return FALSE; - } DBG_PIXMAP(("============== %ld < %ld\n", pExaScr->info->offScreenBase, pExaScr->info->memorySize)); diff --git a/exa/exa_priv.h b/exa/exa_priv.h index a456da05e..b577094bc 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -132,9 +132,9 @@ typedef struct { (PixmapWidthPaddingInfo[d].padRoundUp+1))) #endif -extern int exaScreenPrivateIndex; -extern int exaPixmapPrivateIndex; -#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)(s)->devPrivates[exaScreenPrivateIndex].ptr) +extern DevPrivateKey exaScreenPrivateKey; +extern DevPrivateKey exaPixmapPrivateKey; +#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixLookupPrivate(&(s)->devPrivates, exaScreenPrivateKey)) #define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s) /** Align an offset to an arbitrary alignment */ @@ -150,8 +150,8 @@ extern int exaPixmapPrivateIndex; #define EXA_PIXMAP_SCORE_PINNED 1000 #define EXA_PIXMAP_SCORE_INIT 1001 -#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)(p)->devPrivates[exaPixmapPrivateIndex].ptr) -#define ExaSetPixmapPriv(p,a) ((p)->devPrivates[exaPixmapPrivateIndex].ptr = (pointer) (a)) +#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixLookupPrivate(&(p)->devPrivates, exaPixmapPrivateKey)) +#define ExaSetPixmapPriv(p,a) dixSetPrivate(&(p)->devPrivates, exaPixmapPrivateKey, a) #define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p) typedef struct { diff --git a/fb/fb.h b/fb/fb.h index aba2bd252..da85ecf3d 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -37,6 +37,7 @@ #include "miscstruct.h" #include "servermd.h" #include "windowstr.h" +#include "privates.h" #include "mi.h" #include "migc.h" #include "mibstore.h" @@ -599,13 +600,9 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data); } \ } -/* XXX fb*PrivateIndex should be static, but it breaks the ABI */ - -extern int fbGCPrivateIndex; -extern int fbGetGCPrivateIndex(void); +extern DevPrivateKey fbGetGCPrivateKey(void); #ifndef FB_NO_WINDOW_PIXMAPS -extern int fbWinPrivateIndex; -extern int fbGetWinPrivateIndex(void); +extern DevPrivateKey fbGetWinPrivateKey(void); #endif extern const GCOps fbGCOps; extern const GCFuncs fbGCFuncs; @@ -641,8 +638,7 @@ typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw); #ifdef FB_SCREEN_PRIVATE -extern int fbScreenPrivateIndex; -extern int fbGetScreenPrivateIndex(void); +extern DevPrivateKey fbGetScreenPrivateKey(void); /* private field of a screen */ typedef struct { @@ -655,7 +651,7 @@ typedef struct { } FbScreenPrivRec, *FbScreenPrivPtr; #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \ - (pScreen)->devPrivates[fbGetScreenPrivateIndex()].ptr) + dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey())) #endif /* private field of GC */ @@ -670,7 +666,7 @@ typedef struct { } FbGCPrivRec, *FbGCPrivPtr; #define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\ - (pGC)->devPrivates[fbGetGCPrivateIndex()].ptr) + dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey())) #define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip) #define fbGetExpose(pGC) ((pGC)->fExpose) @@ -682,7 +678,7 @@ typedef struct { #define fbGetWindowPixmap(d) fbGetScreenPixmap(((DrawablePtr) (d))->pScreen) #else #define fbGetWindowPixmap(pWin) ((PixmapPtr)\ - ((WindowPtr) (pWin))->devPrivates[fbGetWinPrivateIndex()].ptr) + dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey())) #endif #ifdef ROOTLESS @@ -835,7 +831,7 @@ fb24_32ModifyPixmapHeader (PixmapPtr pPixmap, * fballpriv.c */ Bool -fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex); +fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex); /* * fbarc.c diff --git a/fb/fballpriv.c b/fb/fballpriv.c index 8efb8fa99..68cb2e4c0 100644 --- a/fb/fballpriv.c +++ b/fb/fballpriv.c @@ -27,51 +27,33 @@ #include "fb.h" #ifdef FB_SCREEN_PRIVATE -int fbScreenPrivateIndex; -int fbGetScreenPrivateIndex(void) +static DevPrivateKey fbScreenPrivateKey = &fbScreenPrivateKey; +DevPrivateKey fbGetScreenPrivateKey(void) { - return fbScreenPrivateIndex; + return fbScreenPrivateKey; } #endif -int fbGCPrivateIndex; -int fbGetGCPrivateIndex(void) +static DevPrivateKey fbGCPrivateKey = &fbGCPrivateKey; +DevPrivateKey fbGetGCPrivateKey(void) { - return fbGCPrivateIndex; + return fbGCPrivateKey; } #ifndef FB_NO_WINDOW_PIXMAPS -int fbWinPrivateIndex; -int fbGetWinPrivateIndex(void) +static DevPrivateKey fbWinPrivateKey = &fbWinPrivateKey; +DevPrivateKey fbGetWinPrivateKey(void) { - return fbWinPrivateIndex; + return fbWinPrivateKey; } #endif -int fbGeneration; Bool -fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex) +fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey) { - if (fbGeneration != serverGeneration) - { - fbGCPrivateIndex = miAllocateGCPrivateIndex (); -#ifndef FB_NO_WINDOW_PIXMAPS - fbWinPrivateIndex = AllocateWindowPrivateIndex(); -#endif -#ifdef FB_SCREEN_PRIVATE - fbScreenPrivateIndex = AllocateScreenPrivateIndex (); - if (fbScreenPrivateIndex == -1) - return FALSE; -#endif - - fbGeneration = serverGeneration; - } - if (pGCIndex) - *pGCIndex = fbGCPrivateIndex; - if (!AllocateGCPrivate(pScreen, fbGCPrivateIndex, sizeof(FbGCPrivRec))) + if (pGCKey) + *pGCKey = fbGCPrivateKey; + + if (!dixRequestPrivate(fbGCPrivateKey, sizeof(FbGCPrivRec))) return FALSE; -#ifndef FB_NO_WINDOW_PIXMAPS - if (!AllocateWindowPrivate(pScreen, fbWinPrivateIndex, 0)) - return FALSE; -#endif #ifdef FB_SCREEN_PRIVATE { FbScreenPrivPtr pScreenPriv; @@ -79,7 +61,7 @@ fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex) pScreenPriv = (FbScreenPrivPtr) xalloc (sizeof (FbScreenPrivRec)); if (!pScreenPriv) return FALSE; - pScreen->devPrivates[fbScreenPrivateIndex].ptr = (pointer) pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, fbScreenPrivateKey, pScreenPriv); } #endif return TRUE; diff --git a/fb/fboverlay.c b/fb/fboverlay.c index 5d7481eed..0d3c24073 100644 --- a/fb/fboverlay.c +++ b/fb/fboverlay.c @@ -33,12 +33,11 @@ #include "fboverlay.h" #include "shmint.h" -int fbOverlayGeneration; -int fbOverlayScreenPrivateIndex = -1; +static DevPrivateKey fbOverlayScreenPrivateKey = &fbOverlayScreenPrivateKey; -int fbOverlayGetScreenPrivateIndex(void) +DevPrivateKey fbOverlayGetScreenPrivateKey(void) { - return fbOverlayScreenPrivateIndex; + return fbOverlayScreenPrivateKey; } /* @@ -65,7 +64,7 @@ fbOverlayCreateWindow(WindowPtr pWin) pPixmap = pScrPriv->layer[i].u.run.pixmap; if (pWin->drawable.depth == pPixmap->drawable.depth) { - pWin->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap; + dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(), pPixmap); /* * Make sure layer keys are written correctly by * having non-root layers set to full while the @@ -108,7 +107,7 @@ fbOverlayWindowLayer(WindowPtr pWin) int i; for (i = 0; i < pScrPriv->nlayers; i++) - if (pWin->devPrivates[fbWinPrivateIndex].ptr == + if (dixLookupPrivate(&pWin->devPrivates, fbGetWinPrivateKey()) == (pointer) pScrPriv->layer[i].u.run.pixmap) return i; return 0; @@ -358,12 +357,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen, VisualID defaultVisual; FbOverlayScrPrivPtr pScrPriv; - if (fbOverlayGeneration != serverGeneration) - { - fbOverlayScreenPrivateIndex = AllocateScreenPrivateIndex (); - fbOverlayGeneration = serverGeneration; - } - pScrPriv = xalloc (sizeof (FbOverlayScrPrivRec)); if (!pScrPriv) return FALSE; @@ -433,7 +426,7 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen, pScrPriv->layer[1].u.init.width = width2; pScrPriv->layer[1].u.init.depth = depth2; - pScreen->devPrivates[fbOverlayScreenPrivateIndex].ptr = (pointer) pScrPriv; + dixSetPrivate(&pScreen->devPrivates, fbOverlayScreenPrivateKey, pScrPriv); /* overwrite miCloseScreen with our own */ pScreen->CloseScreen = fbOverlayCloseScreen; diff --git a/fb/fboverlay.h b/fb/fboverlay.h index af0acb889..85a28ec2f 100644 --- a/fb/fboverlay.h +++ b/fb/fboverlay.h @@ -25,9 +25,9 @@ #ifndef _FBOVERLAY_H_ #define _FBOVERLAY_H_ -extern int fbOverlayGeneration; -extern int fbOverlayScreenPrivateIndex; /* XXX should be static */ -extern int fbOverlayGetScreenPrivateIndex(void); +#include "privates.h" + +extern DevPrivateKey fbOverlayGetScreenPrivateKey(void); #ifndef FB_OVERLAY_MAX #define FB_OVERLAY_MAX 2 @@ -58,8 +58,7 @@ typedef struct _fbOverlayScrPriv { } FbOverlayScrPrivRec, *FbOverlayScrPrivPtr; #define fbOverlayGetScrPriv(s) \ - ((fbOverlayGetScreenPrivateIndex() != -1) ? \ - (s)->devPrivates[fbOverlayGetScreenPrivateIndex()].ptr : NULL) + dixLookupPrivate(&(s)->devPrivates, fbOverlayGetScreenPrivateKey()) Bool fbOverlayCreateWindow(WindowPtr pWin); diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c index 2b77c4f34..cd8cbcd5d 100644 --- a/fb/fbpixmap.c +++ b/fb/fbpixmap.c @@ -96,7 +96,7 @@ fbDestroyPixmap (PixmapPtr pPixmap) { if(--pPixmap->refcnt) return TRUE; - dixFreePrivates(*DEVPRIV_PTR(pPixmap)); + dixFreePrivates(pPixmap->devPrivates); xfree(pPixmap); return TRUE; } diff --git a/fb/fbpseudocolor.c b/fb/fbpseudocolor.c index 271e98145..1b9b18a7e 100644 --- a/fb/fbpseudocolor.c +++ b/fb/fbpseudocolor.c @@ -125,13 +125,11 @@ typedef struct { } xxScrPrivRec, *xxScrPrivPtr; #define xxGetScrPriv(s) ((xxScrPrivPtr) \ - (xxScrPrivateIndex != -1) \ - ? (s)->devPrivates[xxScrPrivateIndex].ptr\ - : NULL) + dixLookupPrivate(&(s)->devPrivates, xxScrPrivateKey)) #define xxScrPriv(s) xxScrPrivPtr pScrPriv = xxGetScrPriv(s) #define xxGetCmapPriv(s) ((xxCmapPrivPtr) \ - (s)->devPrivates[xxColormapPrivateIndex].ptr) + dixLookupPrivate(&(s)->devPrivates, xxColormapPrivateKey)) #define xxCmapPriv(s) xxCmapPrivPtr pCmapPriv = xxGetCmapPriv(s); typedef struct _xxGCPriv { @@ -140,13 +138,12 @@ typedef struct _xxGCPriv { } xxGCPrivRec, *xxGCPrivPtr; #define xxGetGCPriv(pGC) ((xxGCPrivPtr) \ - (pGC)->devPrivates[xxGCPrivateIndex].ptr) + dixLookupPrivate(&(pGC)->devPrivates, xxGCPrivateKey)) #define xxGCPriv(pGC) xxGCPrivPtr pGCPriv = xxGetGCPriv(pGC) -int xxScrPrivateIndex = -1; -int xxGCPrivateIndex; -int xxColormapPrivateIndex = -1; -int xxGeneration; +static DevPrivateKey xxScrPrivateKey = &xxScrPrivateKey; +static DevPrivateKey xxGCPrivateKey = &xxGCPrivateKey; +static DevPrivateKey xxColormapPrivateKey = &xxColormapPrivateKey; #define wrap(priv,real,mem,func) {\ @@ -355,12 +352,6 @@ xxMyVisual(ScreenPtr pScreen, VisualID vid) return FALSE; } -static Bool -xxInitColormapDummy(ColormapPtr pmap, int index) -{ - return TRUE; -} - static Bool xxInitColormapPrivate(ColormapPtr pmap) { @@ -368,14 +359,14 @@ xxInitColormapPrivate(ColormapPtr pmap) xxCmapPrivPtr pCmapPriv; pointer cmap; - pmap->devPrivates[xxColormapPrivateIndex].ptr = (pointer) -1; + dixSetPrivate(&pmap->devPrivates, xxColormapPrivateKey, (pointer) -1); if (xxMyVisual(pmap->pScreen,pmap->pVisual->vid)) { DBG("CreateColormap\n"); pCmapPriv = (xxCmapPrivPtr) xalloc (sizeof (xxCmapPrivRec)); if (!pCmapPriv) return FALSE; - pmap->devPrivates[xxColormapPrivateIndex].ptr = (pointer) pCmapPriv; + dixSetPrivate(&pmap->devPrivates, xxColormapPrivateKey, pCmapPriv); cmap = xalloc(sizeof (CARD32) * (1 << pScrPriv->myDepth)); if (!cmap) return FALSE; @@ -677,7 +668,7 @@ xxCreateWindow(WindowPtr pWin) DBG("CreateWindow\n"); - pWin->devPrivates[fbWinPrivateIndex].ptr = (pointer) pScrPriv->pPixmap; + dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(), pScrPriv->pPixmap); PRINT_RECTS(pScrPriv->region); if (!pWin->parent) { REGION_EMPTY (pWin->drawable.pScreen, &pScrPriv->region); @@ -746,9 +737,10 @@ xxCopyWindow(WindowPtr pWin, xxPickMyWindows(pWin,&rgn); unwrap (pScrPriv, pScreen, CopyWindow); - pWin->devPrivates[fbWinPrivateIndex].ptr = fbGetScreenPixmap(pScreen); + dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(), + fbGetScreenPixmap(pScreen)); pScreen->CopyWindow(pWin, ptOldOrg, prgnSrc); - pWin->devPrivates[fbWinPrivateIndex].ptr = pPixmap; + dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(), pPixmap); wrap(pScrPriv, pScreen, CopyWindow, xxCopyWindow); REGION_INTERSECT(pScreen,&rgn,&rgn,&rgn_new); @@ -1098,21 +1090,7 @@ xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sy PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif - if (xxGeneration != serverGeneration) { - xxScrPrivateIndex = AllocateScreenPrivateIndex (); - if (xxScrPrivateIndex == -1) - return FALSE; - xxColormapPrivateIndex - = AllocateColormapPrivateIndex (xxInitColormapDummy); - if (xxColormapPrivateIndex == -1) - return FALSE; - xxGCPrivateIndex = AllocateGCPrivateIndex (); - if (xxGCPrivateIndex == -1) - return FALSE; - xxGeneration = serverGeneration; - } - - if (!AllocateGCPrivate (pScreen, xxGCPrivateIndex, sizeof (xxGCPrivRec))) + if (!dixRequestPrivate(xxGCPrivateKey, sizeof (xxGCPrivRec))) return FALSE; pScrPriv = (xxScrPrivPtr) xalloc (sizeof (xxScrPrivRec)); @@ -1190,7 +1168,7 @@ xxSetup(ScreenPtr pScreen, int myDepth, int baseDepth, char* addr, xxSyncFunc sy } #endif pScrPriv->addr = addr; - pScreen->devPrivates[xxScrPrivateIndex].ptr = (pointer) pScrPriv; + dixSetPrivate(&pScreen->devPrivates, xxScrPrivateKey, pScrPriv); pDefMap = (ColormapPtr) LookupIDByType(pScreen->defColormap, RT_COLORMAP); if (!xxInitColormapPrivate(pDefMap)) diff --git a/fb/fbscreen.c b/fb/fbscreen.c index 661268c74..c99ba08e2 100644 --- a/fb/fbscreen.c +++ b/fb/fbscreen.c @@ -38,7 +38,7 @@ fbCloseScreen (int index, ScreenPtr pScreen) xfree (pScreen->visuals); xfree (pScreen->devPrivate); #ifdef FB_SCREEN_PRIVATE - xfree (pScreen->devPrivates[fbScreenPrivateIndex].ptr); + xfree (dixLookupPrivate(&pScreen->devPrivates, fbGetScreenPrivateKey())); #endif return TRUE; } @@ -93,7 +93,7 @@ _fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap) #ifdef FB_NO_WINDOW_PIXMAPS FatalError ("Attempted to set window pixmap without fb support\n"); #else - pWindow->devPrivates[fbWinPrivateIndex].ptr = (pointer) pPixmap; + dixSetPrivate(&pWindow->devPrivates, fbGetWinPrivateKey(), pPixmap); #endif } @@ -107,7 +107,7 @@ fbSetupScreen(ScreenPtr pScreen, int width, /* pixel width of frame buffer */ int bpp) /* bits per pixel for screen */ { - if (!fbAllocatePrivates(pScreen, (int *) 0)) + if (!fbAllocatePrivates(pScreen, NULL)) return FALSE; pScreen->defColormap = FakeClientID(0); /* let CreateDefColormap do whatever it wants for pixels */ diff --git a/fb/fbwindow.c b/fb/fbwindow.c index 144f08362..594cc612f 100644 --- a/fb/fbwindow.c +++ b/fb/fbwindow.c @@ -32,8 +32,8 @@ Bool fbCreateWindow(WindowPtr pWin) { #ifndef FB_NO_WINDOW_PIXMAPS - pWin->devPrivates[fbWinPrivateIndex].ptr = - (pointer) fbGetScreenPixmap(pWin->drawable.pScreen); + dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(), + fbGetScreenPixmap(pWin->drawable.pScreen)); #endif #ifdef FB_SCREEN_PRIVATE if (pWin->drawable.bitsPerPixel == 32) diff --git a/fb/wfbrename.h b/fb/wfbrename.h index 5ea9092f8..a6296fb1d 100644 --- a/fb/wfbrename.h +++ b/fb/wfbrename.h @@ -84,14 +84,14 @@ #define fbFixCoordModePrevious wfbFixCoordModePrevious #define fbGCFuncs wfbGCFuncs #define fbGCOps wfbGCOps -#define fbGCPrivateIndex wfbGCPrivateIndex +#define fbGCPrivateKey wfbGCPrivateKey #define fbGeneration wfbGeneration -#define fbGetGCPrivateIndex wfbGetGCPrivateIndex +#define fbGetGCPrivateKey wfbGetGCPrivateKey #define fbGetImage wfbGetImage -#define fbGetScreenPrivateIndex wfbGetScreenPrivateIndex +#define fbGetScreenPrivateKey wfbGetScreenPrivateKey #define fbGetSpans wfbGetSpans #define _fbGetWindowPixmap _wfbGetWindowPixmap -#define fbGetWinPrivateIndex wfbGetWinPrivateIndex +#define fbGetWinPrivateKey wfbGetWinPrivateKey #define fbGlyph16 wfbGlyph16 #define fbGlyph24 wfbGlyph24 #define fbGlyph32 wfbGlyph32 @@ -117,10 +117,10 @@ #define fbOverlayCreateWindow wfbOverlayCreateWindow #define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit #define fbOverlayGeneration wfbOverlayGeneration -#define fbOverlayGetScreenPrivateIndex wfbOverlayGetScreenPrivateIndex +#define fbOverlayGetScreenPrivateKey wfbOverlayGetScreenPrivateKey #define fbOverlayPaintKey wfbOverlayPaintKey #define fbOverlayPaintWindow wfbOverlayPaintWindow -#define fbOverlayScreenPrivateIndex wfbOverlayScreenPrivateIndex +#define fbOverlayScreenPrivateKey wfbOverlayScreenPrivateKey #define fbOverlaySetupScreen wfbOverlaySetupScreen #define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion #define fbOverlayWindowExposures wfbOverlayWindowExposures @@ -160,7 +160,7 @@ #define fbResolveColor wfbResolveColor #define fbRestoreAreas wfbRestoreAreas #define fbSaveAreas wfbSaveAreas -#define fbScreenPrivateIndex wfbScreenPrivateIndex +#define fbScreenPrivateKey wfbScreenPrivateKey #define fbSegment wfbSegment #define fbSelectBres wfbSelectBres #define fbSetSpans wfbSetSpans @@ -185,14 +185,14 @@ #define fbUnrealizeFont wfbUnrealizeFont #define fbValidateGC wfbValidateGC #define fbWalkCompositeRegion wfbWalkCompositeRegion -#define fbWinPrivateIndex wfbWinPrivateIndex +#define fbWinPrivateKey wfbWinPrivateKey #define fbZeroLine wfbZeroLine #define fbZeroSegment wfbZeroSegment #define free_pixman_pict wfb_free_pixman_pict #define image_from_pict wfb_image_from_pict -#define xxScrPrivateIndex wfbxxScrPrivateIndex -#define xxGCPrivateIndex wfbxxGCPrivateIndex -#define xxColormapPrivateIndex wfbxxColormapPrivateIndex +#define xxScrPrivateKey wfbxxScrPrivateKey +#define xxGCPrivateKey wfbxxGCPrivateKey +#define xxColormapPrivateKey wfbxxColormapPrivateKey #define xxGeneration wfbxxGeneration #define xxPrintVisuals wfbxxPrintVisuals #define xxGCFuncs wfbxxGCFuncs diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index fc4a58a95..70101eca5 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -88,8 +88,8 @@ void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); #define kern_assert(x) { if ((x) != KERN_SUCCESS) \ FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \ __LINE__, __FILE__, x); } -#define SCREEN_PRIV(pScreen) \ - ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr) +#define SCREEN_PRIV(pScreen) ((DarwinFramebufferPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, darwinScreenKey)) #define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... @@ -98,7 +98,7 @@ void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); /* * Global variables from darwin.c */ -extern int darwinScreenIndex; // index into pScreen.devPrivates +extern DevPrivateKey darwinScreenKey; // index into pScreen.devPrivates extern int darwinScreensFound; extern io_connect_t darwinParamConnect; extern int darwinEventReadFD; diff --git a/hw/darwin/iokit/xfIOKit.h b/hw/darwin/iokit/xfIOKit.h index 27d27bc70..7d9a48702 100644 --- a/hw/darwin/iokit/xfIOKit.h +++ b/hw/darwin/iokit/xfIOKit.h @@ -45,10 +45,10 @@ typedef struct { unsigned char *shadowPtr; } XFIOKitScreenRec, *XFIOKitScreenPtr; -#define XFIOKIT_SCREEN_PRIV(pScreen) \ - ((XFIOKitScreenPtr)pScreen->devPrivates[xfIOKitScreenIndex].ptr) +#define XFIOKIT_SCREEN_PRIV(pScreen) ((XFIOKitScreenPtr) \ + dixLookupPrivate(&pScreen->devPrivates, xfIOKitScreenKey)) -extern int xfIOKitScreenIndex; // index into pScreen.devPrivates +extern DevPrivateKey xfIOKitScreenKey; // index into pScreen.devPrivates extern io_connect_t xfIOKitInputConnect; Bool XFIOKitInitCursor(ScreenPtr pScreen); diff --git a/hw/darwin/iokit/xfIOKitCursor.c b/hw/darwin/iokit/xfIOKitCursor.c index 8388513a3..224710114 100644 --- a/hw/darwin/iokit/xfIOKitCursor.c +++ b/hw/darwin/iokit/xfIOKitCursor.c @@ -73,8 +73,8 @@ #include #define DUMP_DARWIN_CURSOR FALSE -#define CURSOR_PRIV(pScreen) \ - ((XFIOKitCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) +#define CURSOR_PRIV(pScreen) ((XFIOKitCursorScreenPtr) \ + dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey)) // The cursors format are documented in IOFramebufferShared.h. #define RGBto34WithGamma(red, green, blue) \ @@ -99,8 +99,7 @@ typedef struct { ColormapPtr pInstalledMap; } XFIOKitCursorScreenRec, *XFIOKitCursorScreenPtr; -static int darwinCursorScreenIndex = -1; -static unsigned long darwinCursorGeneration = 0; +static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey; /* =========================================================================== @@ -679,17 +678,10 @@ XFIOKitInitCursor( return FALSE; } - // allocate private storage for this screen's hardware cursor info - if (darwinCursorGeneration != serverGeneration) { - if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - darwinCursorGeneration = serverGeneration; - } - ScreenPriv = xcalloc( 1, sizeof(XFIOKitCursorScreenRec) ); if (!ScreenPriv) return FALSE; - pScreen->devPrivates[darwinCursorScreenIndex].ptr = (pointer) ScreenPriv; + dixSetPrivate(&pScreen->devPrivates, darwinCursorScreenKey, ScreenPriv); // check if a hardware cursor is supported if (!iokitScreen->cursorShmem->hardwareCursorCapable) { @@ -722,7 +714,7 @@ XFIOKitInitCursor( // initialize hardware cursor handling PointPriv = (miPointerScreenPtr) - pScreen->devPrivates[miPointerScreenIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; PointPriv->spriteFuncs = &darwinSpriteFuncsRec; diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c index 02f6e89a8..ee16e55e5 100644 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ b/hw/darwin/quartz/fullscreen/fullscreen.c @@ -49,18 +49,17 @@ typedef struct { } FSScreenRec, *FSScreenPtr; #define FULLSCREEN_PRIV(pScreen) \ - ((FSScreenPtr)pScreen->devPrivates[fsScreenIndex].ptr) + ((FSScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, fsScreenKey)) -static int fsScreenIndex; +static DevPrivateKey fsScreenKey = &fsScreenKey; static CGDirectDisplayID *quartzDisplayList = NULL; static int quartzNumScreens = 0; static FSScreenPtr quartzScreens[MAXSCREENS]; -static int darwinCmapPrivateIndex = -1; -static unsigned long darwinCmapGeneration = 0; +static DevPrivateKey darwinCmapPrivateKey = &darwinCmapPrivateKey; -#define CMAP_PRIV(pCmap) \ - ((CGDirectPaletteRef) (pCmap)->devPrivates[darwinCmapPrivateIndex].ptr) +#define CMAP_PRIV(pCmap) ((CGDirectPaletteRef) \ + dixLookupPrivate(&(pCmap)->devPrivates, darwinCmapPrivateKey)) /* ============================================================================= @@ -95,16 +94,6 @@ FSCreateColormap( { CGDirectPaletteRef pallete; - // Allocate private storage for the hardware dependent colormap info. - if (darwinCmapGeneration != serverGeneration) { - if ((darwinCmapPrivateIndex = - AllocateColormapPrivateIndex(FSInitCmapPrivates)) < 0) - { - return FALSE; - } - darwinCmapGeneration = serverGeneration; - } - pallete = CGPaletteCreateDefaultColorPalette(); if (!pallete) return FALSE; @@ -283,17 +272,10 @@ static void FSResumeScreen( */ static void FSDisplayInit(void) { - static unsigned long generation = 0; CGDisplayCount quartzDisplayCount = 0; ErrorF("Display mode: Full screen Quartz -- Direct Display\n"); - // Allocate private storage for each screen's mode specific info - if (generation != serverGeneration) { - fsScreenIndex = AllocateScreenPrivateIndex(); - generation = serverGeneration; - } - // Find all the CoreGraphics displays CGGetActiveDisplayList(0, NULL, &quartzDisplayCount); quartzDisplayList = xalloc(quartzDisplayCount * sizeof(CGDirectDisplayID)); diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index 77fa008f2..bee83b875 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -56,8 +56,7 @@ typedef struct { miPointerSpriteFuncPtr spriteFuncs; } QuartzCursorScreenRec, *QuartzCursorScreenPtr; -static int darwinCursorScreenIndex = -1; -static unsigned long darwinCursorGeneration = 0; +static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey; static CursorPtr quartzLatentCursor = NULL; static QD_Cursor gQDArrow; // QuickDraw arrow cursor @@ -66,8 +65,8 @@ static CCrsrHandle currentCursor = NULL; static pthread_mutex_t cursorMutex; static pthread_cond_t cursorCondition; -#define CURSOR_PRIV(pScreen) \ - ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) +#define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, darwinCursorScreenKey)) #define HIDE_QD_CURSOR(pScreen, visible) \ if (visible) { \ @@ -592,13 +591,6 @@ QuartzInitCursor( return FALSE; } - // allocate private storage for this screen's QuickDraw cursor info - if (darwinCursorGeneration != serverGeneration) { - if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - darwinCursorGeneration = serverGeneration; - } - ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) ); if (!ScreenPriv) return FALSE; @@ -611,7 +603,7 @@ QuartzInitCursor( // initialize QuickDraw cursor handling GetQDGlobalsArrow(&gQDArrow); PointPriv = (miPointerScreenPtr) - pScreen->devPrivates[miPointerScreenIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; PointPriv->spriteFuncs = &quartzSpriteFuncsRec; diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 038b21eff..eac765257 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -62,7 +62,7 @@ int quartzUseAGL = 1; int quartzEnableKeyEquivalents = 1; int quartzServerVisible = TRUE; int quartzServerQuitting = FALSE; -int quartzScreenIndex = 0; +DevPrivateKey quartzScreenKey = &quartzScreenKey; int aquaMenuBarHeight = 0; int noPseudoramiXExtension = TRUE; QuartzModeProcsPtr quartzProcs = NULL; @@ -121,14 +121,6 @@ void DarwinModeInitOutput( int argc, char **argv ) { - static unsigned long generation = 0; - - // Allocate private storage for each screen's Quartz specific info - if (generation != serverGeneration) { - quartzScreenIndex = AllocateScreenPrivateIndex(); - generation = serverGeneration; - } - if (serverGeneration == 0) { QuartzAudioInit(); } diff --git a/hw/darwin/quartz/quartzCommon.h b/hw/darwin/quartz/quartzCommon.h index f5dff662c..5e199d362 100644 --- a/hw/darwin/quartz/quartzCommon.h +++ b/hw/darwin/quartz/quartzCommon.h @@ -58,7 +58,7 @@ typedef struct { } QuartzScreenRec, *QuartzScreenPtr; #define QUARTZ_PRIV(pScreen) \ - ((QuartzScreenPtr)pScreen->devPrivates[quartzScreenIndex].ptr) + ((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey)) // Data stored at startup for Cocoa front end extern int quartzEventWriteFD; @@ -73,7 +73,7 @@ extern int quartzEnableKeyEquivalents; // Other shared data extern int quartzServerVisible; extern int quartzServerQuitting; -extern int quartzScreenIndex; +extern DevPrivateKey quartzScreenKey; extern int aquaMenuBarHeight; // Name of GLX bundle for native OpenGL diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c index 6ed6a7677..a121ce17c 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -57,8 +57,7 @@ typedef struct { miPointerSpriteFuncPtr spriteFuncs; } QuartzCursorScreenRec, *QuartzCursorScreenPtr; -static int darwinCursorScreenIndex = -1; -static unsigned long darwinCursorGeneration = 0; +static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey; static CursorPtr quartzLatentCursor = NULL; static QD_Cursor gQDArrow; // QuickDraw arrow cursor @@ -67,8 +66,8 @@ static CCrsrHandle currentCursor = NULL; static pthread_mutex_t cursorMutex; static pthread_cond_t cursorCondition; -#define CURSOR_PRIV(pScreen) \ - ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) +#define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \ + dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey)) #define HIDE_QD_CURSOR(pScreen, visible) \ if (visible) { \ @@ -595,13 +594,6 @@ QuartzInitCursor( return FALSE; } - // allocate private storage for this screen's QuickDraw cursor info - if (darwinCursorGeneration != serverGeneration) { - if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - darwinCursorGeneration = serverGeneration; - } - ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) ); if (!ScreenPriv) return FALSE; @@ -614,7 +606,7 @@ QuartzInitCursor( // initialize QuickDraw cursor handling GetQDGlobalsArrow(&gQDArrow); PointPriv = (miPointerScreenPtr) - pScreen->devPrivates[miPointerScreenIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; PointPriv->spriteFuncs = &quartzSpriteFuncsRec; diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index 08ee38221..8c6ed99ac 100644 --- a/hw/darwin/quartz/xpr/dri.c +++ b/hw/darwin/quartz/xpr/dri.c @@ -65,9 +65,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include -static int DRIScreenPrivIndex = -1; -static int DRIWindowPrivIndex = -1; -static int DRIPixmapPrivIndex = -1; +static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey; +static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey; +static DevPrivateKey DRIPixmapPrivKey = &DRIPixmapPrivKey; static RESTYPE DRIDrawablePrivResType; @@ -179,11 +179,11 @@ DRIScreenInit(ScreenPtr pScreen) pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec)); if (!pDRIPriv) { - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); return FALSE; } - pScreen->devPrivates[DRIScreenPrivIndex].ptr = (pointer) pDRIPriv; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, pDRIPriv); pDRIPriv->directRenderingSupport = TRUE; pDRIPriv->nrWindows = 0; @@ -214,13 +214,6 @@ DRIFinishScreenInit(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - /* Allocate zero sized private area for each window. Should a window - * become a DRI window, we'll hang a DRIWindowPrivateRec off of this - * private index. - */ - if (!AllocateWindowPrivate(pScreen, DRIWindowPrivIndex, 0)) - return FALSE; - /* Wrap DRI support */ pDRIPriv->wrap.ValidateTree = pScreen->ValidateTree; pScreen->ValidateTree = DRIValidateTree; @@ -249,31 +242,13 @@ DRICloseScreen(ScreenPtr pScreen) if (pDRIPriv && pDRIPriv->directRenderingSupport) { xfree(pDRIPriv); - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); } } Bool DRIExtensionInit(void) { - static unsigned long DRIGeneration = 0; - - if (DRIGeneration != serverGeneration) { - if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - DRIGeneration = serverGeneration; - } - - /* - * Allocate a window private index with a zero sized private area for - * each window, then should a window become a DRI window, we'll hang - * a DRIWindowPrivateRec off of this private index. Do same for pixmaps. - */ - if ((DRIWindowPrivIndex = AllocateWindowPrivateIndex()) < 0) - return FALSE; - if ((DRIPixmapPrivIndex = AllocatePixmapPrivateIndex()) < 0) - return FALSE; - DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete); return TRUE; @@ -417,7 +392,8 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id, } /* save private off of preallocated index */ - pWin->devPrivates[DRIWindowPrivIndex].ptr = (pointer)pDRIDrawablePriv; + dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, + pDRIDrawablePriv); } } @@ -450,7 +426,8 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id, } /* save private off of preallocated index */ - pPix->devPrivates[DRIPixmapPrivIndex].ptr = (pointer)pDRIDrawablePriv; + dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey, + pDRIDrawablePriv); } } #endif @@ -577,9 +554,9 @@ DRIDrawablePrivDelete(pointer pResource, XID id) xfree(pDRIDrawablePriv); if (pDrawable->type == DRAWABLE_WINDOW) { - pWin->devPrivates[DRIWindowPrivIndex].ptr = NULL; + dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL); } else if (pDrawable->type == DRAWABLE_PIXMAP) { - pPix->devPrivates[DRIPixmapPrivIndex].ptr = NULL; + dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey, NULL); } --pDRIPriv->nrWindows; diff --git a/hw/darwin/quartz/xpr/dristruct.h b/hw/darwin/quartz/xpr/dristruct.h index 9a3d01c9b..19d78a973 100644 --- a/hw/darwin/quartz/xpr/dristruct.h +++ b/hw/darwin/quartz/xpr/dristruct.h @@ -40,15 +40,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define DRI_MAX_DRAWABLES 256 -#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) \ - ((DRIWindowPrivIndex < 0) ? \ - NULL : \ - ((DRIDrawablePrivPtr)((pWin)->devPrivates[DRIWindowPrivIndex].ptr))) +#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \ + dixLookupPrivate(&(pWin)->devPrivates, DRIWindowPrivKey)) -#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) \ - ((DRIPixmapPrivIndex < 0) ? \ - NULL : \ - ((DRIDrawablePrivPtr)((pPix)->devPrivates[DRIPixmapPrivIndex].ptr))) +#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) ((DRIDrawablePrivPtr) \ + dixLookupPrivate(&(pPix)->devPrivates, DRIPixmapPrivKey)) typedef struct _DRIDrawablePrivRec { @@ -61,13 +57,12 @@ typedef struct _DRIDrawablePrivRec x_list *notifiers; /* list of (FUN . DATA) */ } DRIDrawablePrivRec, *DRIDrawablePrivPtr; -#define DRI_SCREEN_PRIV(pScreen) \ - ((DRIScreenPrivIndex < 0) ? \ - NULL : \ - ((DRIScreenPrivPtr)((pScreen)->devPrivates[DRIScreenPrivIndex].ptr))) +#define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey)) #define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \ - (screenInfo.screens[screenIndex]->devPrivates[DRIScreenPrivIndex].ptr)) + dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \ + DRIScreenPrivKey)) typedef struct _DRIScreenPrivRec diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index e7f23b78b..c0516e84c 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -53,11 +53,10 @@ typedef struct { miPointerSpriteFuncPtr spriteFuncs; } QuartzCursorScreenRec, *QuartzCursorScreenPtr; -static int darwinCursorScreenIndex = -1; -static unsigned long darwinCursorGeneration = 0; +static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKey; -#define CURSOR_PRIV(pScreen) \ - ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) +#define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \ + dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey)) static Bool @@ -360,15 +359,6 @@ QuartzInitCursor(ScreenPtr pScreen) if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) return FALSE; - /* allocate private storage for this screen's QuickDraw cursor info */ - if (darwinCursorGeneration != serverGeneration) - { - if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - - darwinCursorGeneration = serverGeneration; - } - ScreenPriv = xcalloc(1, sizeof(QuartzCursorScreenRec)); if (ScreenPriv == NULL) return FALSE; @@ -379,7 +369,8 @@ QuartzInitCursor(ScreenPtr pScreen) ScreenPriv->QueryBestSize = pScreen->QueryBestSize; pScreen->QueryBestSize = QuartzCursorQueryBestSize; - PointPriv = (miPointerScreenPtr) pScreen->devPrivates[miPointerScreenIndex].ptr; + PointPriv = (miPointerScreenPtr) + dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; PointPriv->spriteFuncs = &quartzSpriteFuncsRec; diff --git a/hw/dmx/dmxcmap.c b/hw/dmx/dmxcmap.c index 949d7d689..4aa586aff 100644 --- a/hw/dmx/dmxcmap.c +++ b/hw/dmx/dmxcmap.c @@ -46,24 +46,10 @@ #include "micmap.h" -static int dmxInitColormapPrivateFunc(ColormapPtr pColormap, int index) -{ - return TRUE; -} - static Bool dmxAllocateColormapPrivates(ColormapPtr pColormap) { - static unsigned long dmxColormapGeneration; dmxColormapPrivPtr pCmapPriv; - if (dmxColormapGeneration != serverGeneration) { - if ((dmxColormapPrivateIndex - = AllocateColormapPrivateIndex(dmxInitColormapPrivateFunc)) < 0) - return FALSE; - - dmxColormapGeneration = serverGeneration; - } - pCmapPriv = (dmxColormapPrivPtr)xalloc(sizeof(*pCmapPriv)); if (!pCmapPriv) return FALSE; diff --git a/hw/dmx/dmxcmap.h b/hw/dmx/dmxcmap.h index 228f8662e..f968f8622 100644 --- a/hw/dmx/dmxcmap.h +++ b/hw/dmx/dmxcmap.h @@ -56,15 +56,14 @@ extern Bool dmxBECreateColormap(ColormapPtr pColormap); extern Bool dmxBEFreeColormap(ColormapPtr pColormap); /** Private index. \see dmxcmap.c \see dmxscrinit.c \see dmxwindow.c */ -extern int dmxColormapPrivateIndex; +extern DevPrivateKey dmxColormapPrivateKey; /** Set colormap private structure. */ #define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv) \ - (_pCMap)->devPrivates[dmxColormapPrivateIndex].ptr \ - = (pointer)(_pCMapPriv); + dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv) /** Get colormap private structure. */ -#define DMX_GET_COLORMAP_PRIV(_pCMap) \ - (dmxColormapPrivPtr)(_pCMap)->devPrivates[dmxColormapPrivateIndex].ptr +#define DMX_GET_COLORMAP_PRIV(_pCMap) (dmxColormapPrivPtr) \ + dixLookupPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey) #endif /* DMXCMAP_H */ diff --git a/hw/dmx/dmxdpms.c b/hw/dmx/dmxdpms.c index ea0d66c3c..8c745a6aa 100644 --- a/hw/dmx/dmxdpms.c +++ b/hw/dmx/dmxdpms.c @@ -177,7 +177,7 @@ void dmxDPMSWakeup(void) if (screenIsSaved == SCREEN_SAVER_ON) SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); #ifdef DPMSExtension - if (DPMSPowerLevel) DPMSSet(0); + if (DPMSPowerLevel) DPMSSet(serverClient, 0); #endif } @@ -190,11 +190,11 @@ Bool DPMSSupported(void) } /** This is used by clients (e.g., xset) to set the DPMS level. */ -void DPMSSet(int level) +int DPMSSet(ClientPtr client, int level) { int i; - if (!dpmsSupported) return; + if (!dpmsSupported) return Success; if (level < 0) level = DPMSModeOn; if (level > 3) level = DPMSModeOff; @@ -208,5 +208,6 @@ void DPMSSet(int level) dmxSync(dmxScreen, FALSE); } } + return Success; } #endif diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c index 981f64d0a..ce1730cff 100644 --- a/hw/dmx/dmxgc.c +++ b/hw/dmx/dmxgc.c @@ -82,13 +82,9 @@ static GCOps dmxGCOps = { dmxPushPixels }; -/** Initialize the GC on \a pScreen, which currently involves allocating - * the GC private associated with this screen. */ +/** Initialize the GC on \a pScreen */ Bool dmxInitGC(ScreenPtr pScreen) { - if (!AllocateGCPrivate(pScreen, dmxGCPrivateIndex, sizeof(dmxGCPrivRec))) - return FALSE; - return TRUE; } diff --git a/hw/dmx/dmxgc.h b/hw/dmx/dmxgc.h index 3d49f6735..2da3ba85e 100644 --- a/hw/dmx/dmxgc.h +++ b/hw/dmx/dmxgc.h @@ -64,11 +64,11 @@ extern void dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC); extern Bool dmxBEFreeGC(GCPtr pGC); /** Private index. \see dmxgc.c \see dmxscrinit.c */ -extern int dmxGCPrivateIndex; +extern DevPrivateKey dmxGCPrivateKey; /** Get private. */ #define DMX_GET_GC_PRIV(_pGC) \ - (dmxGCPrivPtr)(_pGC)->devPrivates[dmxGCPrivateIndex].ptr + (dmxGCPrivPtr)dixLookupPrivate(&(_pGC)->devPrivates, dmxGCPrivateKey) #define DMX_GC_FUNC_PROLOGUE(_pGC) \ do { \ diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c index 478542a13..f2110b534 100644 --- a/hw/dmx/dmxpict.c +++ b/hw/dmx/dmxpict.c @@ -144,8 +144,7 @@ Bool dmxPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) if (!miPictureInit(pScreen, formats, nformats)) return FALSE; - if (!AllocatePicturePrivate(pScreen, dmxPictPrivateIndex, - sizeof(dmxPictPrivRec))) + if (!dixRequestPrivate(dmxPictPrivateKey, sizeof(dmxPictPrivRec))) return FALSE; ps = GetPictureScreen(pScreen); diff --git a/hw/dmx/dmxpict.h b/hw/dmx/dmxpict.h index c178ef39c..a81eb7d37 100644 --- a/hw/dmx/dmxpict.h +++ b/hw/dmx/dmxpict.h @@ -116,19 +116,19 @@ extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet); extern int dmxBECreatePicture(PicturePtr pPicture); extern Bool dmxBEFreePicture(PicturePtr pPicture); -extern int dmxPictPrivateIndex; /**< Index for picture private data */ -extern int dmxGlyphSetPrivateIndex; /**< Index for glyphset private data */ +extern DevPrivateKey dmxPictPrivateKey; /**< Index for picture private data */ +extern DevPrivateKey dmxGlyphSetPrivateKey; /**< Index for glyphset private data */ /** Get the picture private data given a picture pointer */ #define DMX_GET_PICT_PRIV(_pPict) \ - (dmxPictPrivPtr)(_pPict)->devPrivates[dmxPictPrivateIndex].ptr + (dmxPictPrivPtr)dixLookupPrivate(&(_pPict)->devPrivates, dmxPictPrivateKey) /** Set the glyphset private data given a glyphset pointer */ #define DMX_SET_GLYPH_PRIV(_pGlyph, _pPriv) \ - GlyphSetSetPrivate((_pGlyph), dmxGlyphSetPrivateIndex, (_pPriv)) + GlyphSetSetPrivate((_pGlyph), dmxGlyphSetPrivateKey, (_pPriv)) /** Get the glyphset private data given a glyphset pointer */ #define DMX_GET_GLYPH_PRIV(_pGlyph) \ - (dmxGlyphPrivPtr)GlyphSetGetPrivate((_pGlyph), dmxGlyphSetPrivateIndex) + (dmxGlyphPrivPtr)GlyphSetGetPrivate((_pGlyph), dmxGlyphSetPrivateKey) #endif /* DMXPICT_H */ diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c index 323ae606a..f8d012630 100644 --- a/hw/dmx/dmxpixmap.c +++ b/hw/dmx/dmxpixmap.c @@ -49,8 +49,7 @@ /** Initialize a private area in \a pScreen for pixmap information. */ Bool dmxInitPixmap(ScreenPtr pScreen) { - if (!AllocatePixmapPrivate(pScreen, dmxPixPrivateIndex, - sizeof(dmxPixPrivRec))) + if (!dixRequestPrivate(dmxPixPrivateKey, sizeof(dmxPixPrivRec))) return FALSE; return TRUE; @@ -173,7 +172,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap) dmxSync(dmxScreen, FALSE); } } - dixFreePrivates(*DEVPRIV_PTR(pPixmap)); + dixFreePrivates(pPixmap->devPrivates); xfree(pPixmap); #if 0 diff --git a/hw/dmx/dmxpixmap.h b/hw/dmx/dmxpixmap.h index 4ecd10fd8..3cfd99e6d 100644 --- a/hw/dmx/dmxpixmap.h +++ b/hw/dmx/dmxpixmap.h @@ -57,10 +57,10 @@ extern void dmxBECreatePixmap(PixmapPtr pPixmap); extern Bool dmxBEFreePixmap(PixmapPtr pPixmap); /** Private index. \see dmxpicmap.h \see dmxscrinit.c */ -extern int dmxPixPrivateIndex; +extern DevPrivateKey dmxPixPrivateKey; /** Get pixmap private pointer. */ #define DMX_GET_PIXMAP_PRIV(_pPix) \ - (dmxPixPrivPtr)(_pPix)->devPrivates[dmxPixPrivateIndex].ptr + (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey) #endif /* DMXPIXMAP_H */ diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c index 8ae448a5e..9b15bb38c 100644 --- a/hw/dmx/dmxscrinit.c +++ b/hw/dmx/dmxscrinit.c @@ -67,15 +67,15 @@ static Bool dmxSaveScreen(ScreenPtr pScreen, int what); static unsigned long dmxGeneration; static unsigned long *dmxCursorGeneration; -int dmxGCPrivateIndex; /**< Private index for GCs */ -int dmxWinPrivateIndex; /**< Private index for Windows */ -int dmxPixPrivateIndex; /**< Private index for Pixmaps */ +DevPrivateKey dmxGCPrivateKey = &dmxGCPrivateKey; /**< Private index for GCs */ +DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKey; /**< Private index for Windows */ +DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKey; /**< Private index for Pixmaps */ int dmxFontPrivateIndex; /**< Private index for Fonts */ -int dmxScreenPrivateIndex; /**< Private index for Screens */ -int dmxColormapPrivateIndex; /**< Private index for Colormaps */ +DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKey; /**< Private index for Screens */ +DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKey; /**< Private index for Colormaps */ #ifdef RENDER -int dmxPictPrivateIndex; /**< Private index for Picts */ -int dmxGlyphSetPrivateIndex; /**< Private index for GlyphSets */ +DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKey; /**< Private index for Picts */ +DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKey; /**< Private index for GlyphSets */ #endif /** Initialize the parts of screen \a idx that require access to the @@ -208,43 +208,11 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) int i, j; if (dmxGeneration != serverGeneration) { -#ifdef RENDER - /* Allocate picture private index */ - dmxPictPrivateIndex = AllocatePicturePrivateIndex(); - if (dmxPictPrivateIndex == -1) - return FALSE; - - /* Allocate glyph set private index */ - dmxGlyphSetPrivateIndex = AllocateGlyphSetPrivateIndex(); - if (dmxGlyphSetPrivateIndex == -1) - return FALSE; -#endif - - /* Allocate GC private index */ - dmxGCPrivateIndex = AllocateGCPrivateIndex(); - if (dmxGCPrivateIndex == -1) - return FALSE; - - /* Allocate window private index */ - dmxWinPrivateIndex = AllocateWindowPrivateIndex(); - if (dmxWinPrivateIndex == -1) - return FALSE; - - /* Allocate pixmap private index */ - dmxPixPrivateIndex = AllocatePixmapPrivateIndex(); - if (dmxPixPrivateIndex == -1) - return FALSE; - /* Allocate font private index */ dmxFontPrivateIndex = AllocateFontPrivateIndex(); if (dmxFontPrivateIndex == -1) return FALSE; - /* Allocate screen private index */ - dmxScreenPrivateIndex = AllocateScreenPrivateIndex(); - if (dmxScreenPrivateIndex == -1) - return FALSE; - dmxGeneration = serverGeneration; } diff --git a/hw/dmx/dmxscrinit.h b/hw/dmx/dmxscrinit.h index 46a0a00a4..a4642350c 100644 --- a/hw/dmx/dmxscrinit.h +++ b/hw/dmx/dmxscrinit.h @@ -41,7 +41,7 @@ #include "scrnintstr.h" /** Private index. \see dmxscrrinit.c \see input/dmxconcole.c */ -extern int dmxScreenPrivateIndex; +extern DevPrivateKey dmxScreenPrivateKey; extern Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]); diff --git a/hw/dmx/dmxwindow.c b/hw/dmx/dmxwindow.c index b66f2a3bb..fa6b9a279 100644 --- a/hw/dmx/dmxwindow.c +++ b/hw/dmx/dmxwindow.c @@ -64,8 +64,7 @@ static void dmxDoSetShape(WindowPtr pWindow); /** Initialize the private area for the window functions. */ Bool dmxInitWindow(ScreenPtr pScreen) { - if (!AllocateWindowPrivate(pScreen, dmxWinPrivateIndex, - sizeof(dmxWinPrivRec))) + if (!dixRequestPrivate(dmxWinPrivateKey, sizeof(dmxWinPrivRec))) return FALSE; return TRUE; diff --git a/hw/dmx/dmxwindow.h b/hw/dmx/dmxwindow.h index f976c7954..1a984331e 100644 --- a/hw/dmx/dmxwindow.h +++ b/hw/dmx/dmxwindow.h @@ -107,11 +107,11 @@ extern void dmxSetShape(WindowPtr pWindow); #endif /** Private index. \see dmxwindow.c \see dmxscrinit.c */ -extern int dmxWinPrivateIndex; +extern DevPrivateKey dmxWinPrivateKey; /** Get window private pointer. */ -#define DMX_GET_WINDOW_PRIV(_pWin) \ - ((dmxWinPrivPtr)(_pWin)->devPrivates[dmxWinPrivateIndex].ptr) +#define DMX_GET_WINDOW_PRIV(_pWin) ((dmxWinPrivPtr) \ + dixLookupPrivate(&(_pWin)->devPrivates, dmxWinPrivateKey)) /* All of these macros are only used in dmxwindow.c */ #define DMX_WINDOW_FUNC_PROLOGUE(_pGC) \ diff --git a/hw/dmx/input/dmxconsole.c b/hw/dmx/input/dmxconsole.c index cc820a204..b2a2ec302 100644 --- a/hw/dmx/input/dmxconsole.c +++ b/hw/dmx/input/dmxconsole.c @@ -612,7 +612,8 @@ static Bool dmxCloseConsoleScreen(int idx, ScreenPtr pScreen) { myPrivate *priv, *last; - for (last = priv = pScreen->devPrivates[dmxScreenPrivateIndex].ptr; + for (last = priv = (myPrivate *)dixLookupPrivate(&pScreen->devPrivates, + dmxScreenPrivateKey); priv; priv = priv->next) dmxCloseConsole(last = priv); @@ -846,13 +847,15 @@ void dmxConsoleInit(DevicePtr pDev) dmxConsoleDraw(priv, 1, 1); - if (screenInfo.screens[0]->devPrivates[dmxScreenPrivateIndex].ptr) - priv->next = (screenInfo.screens[0] - ->devPrivates[dmxScreenPrivateIndex].ptr); + if (dixLookupPrivate(&screenInfo.screens[0]->devPrivates, + dmxScreenPrivateKey)) + priv->next = dixLookupPrivate(&screenInfo.screens[0]->devPrivates, + dmxScreenPrivateKey); else DMX_WRAP(CloseScreen, dmxCloseConsoleScreen, priv, screenInfo.screens[0]); - screenInfo.screens[0]->devPrivates[dmxScreenPrivateIndex].ptr = priv; + dixSetPrivate(&screenInfo.screens[0]->devPrivates, dmxScreenPrivateKey, + priv); } /** Fill in the \a info structure for the specified \a pDev. Only used diff --git a/hw/kdrive/savage/s3draw.c b/hw/kdrive/savage/s3draw.c index 258dbcf79..39cc256b3 100644 --- a/hw/kdrive/savage/s3draw.c +++ b/hw/kdrive/savage/s3draw.c @@ -78,9 +78,8 @@ short s3alu[16] = { #define PixTransStore(t) *pix_trans = (t) #endif -int s3GCPrivateIndex; -int s3WindowPrivateIndex; -int s3Generation; +DevPrivateKey s3GCPrivateKey = &s3GCPrivateKey; +DevPrivateKey s3WindowPrivateKey = &s3WindowPrivateKey; /* s3DoBitBlt @@ -2182,7 +2181,7 @@ s3CreateWindow (WindowPtr pWin) KdScreenPriv(pWin->drawable.pScreen); s3ScreenInfo(pScreenPriv); - pWin->devPrivates[s3WindowPrivateIndex].ptr = 0; + dixSetPrivate(&pWin->devPrivates, s3WindowPrivateKey, NULL); return KdCreateWindow (pWin); } @@ -3095,15 +3094,7 @@ s3DrawInit (ScreenPtr pScreen) } else { - if (serverGeneration != s3Generation) - { - s3GCPrivateIndex = AllocateGCPrivateIndex (); - s3WindowPrivateIndex = AllocateWindowPrivateIndex (); - s3Generation = serverGeneration; - } - if (!AllocateWindowPrivate(pScreen, s3WindowPrivateIndex, 0)) - return FALSE; - if (!AllocateGCPrivate(pScreen, s3GCPrivateIndex, sizeof (s3PrivGCRec))) + if (!dixRequestPrivate(s3GCPrivateKey, sizeof (s3PrivGCRec))) return FALSE; pScreen->CreateGC = s3CreateGC; pScreen->CreateWindow = s3CreateWindow; diff --git a/hw/kdrive/savage/s3draw.h b/hw/kdrive/savage/s3draw.h index 068904370..eab8e395e 100644 --- a/hw/kdrive/savage/s3draw.h +++ b/hw/kdrive/savage/s3draw.h @@ -24,8 +24,8 @@ #ifndef _S3DRAW_H_ #define _S3DRAW_H_ -extern int s3GCPrivateIndex; -extern int s3WindowPrivateIndex; +extern DevPrivateKey s3GCPrivateKey; +extern DevPrivateKey s3WindowPrivateKey; typedef struct _s3Pattern { S3PatternCache *cache; @@ -42,16 +42,16 @@ typedef struct _s3PrivGC { s3PatternPtr pPattern; /* pattern */ } s3PrivGCRec, *s3PrivGCPtr; -#define s3GetGCPrivate(g) ((s3PrivGCPtr) \ - (g)->devPrivates[s3GCPrivateIndex].ptr) +#define s3GetGCPrivate(g) ((s3PrivGCPtr) \ + dixLookupPrivate(&(g)->devPrivates, s3GCPrivateKey)) -#define s3GCPrivate(g) s3PrivGCPtr s3Priv = s3GetGCPrivate(g) +#define s3GCPrivate(g) s3PrivGCPtr s3Priv = s3GetGCPrivate(g) -#define s3GetWindowPrivate(w) ((s3PatternPtr) \ - (w)->devPrivates[s3WindowPrivateIndex].ptr) +#define s3GetWindowPrivate(w) ((s3PatternPtr) \ + dixLookupPrivate(&(w)->devPrivates, s3WindowPrivateKey)) -#define s3SetWindowPrivate(w,p) (\ - (w)->devPrivates[s3WindowPrivateIndex].ptr = (pointer) p) +#define s3SetWindowPrivate(w,p) \ + dixSetPrivate(&(w)->devPrivates, s3WindowPrivateKey, p) void _s3LoadPattern (ScreenPtr pScreen, int fb, s3PatternPtr pPattern); diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index c9805ddb6..da618bee5 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -42,9 +42,8 @@ #define DBG_PIXMAP(a) #endif -int kaaGeneration; -int kaaScreenPrivateIndex; -int kaaPixmapPrivateIndex; +DevPrivateKey kaaScreenPrivateKey = &kaaScreenPrivateKey; +DevPrivateKey kaaPixmapPrivateKey = &kaaPixmapPrivateKey; #define KAA_PIXMAP_SCORE_MOVE_IN 10 #define KAA_PIXMAP_SCORE_MAX 20 @@ -1066,13 +1065,6 @@ kaaDrawInit (ScreenPtr pScreen, PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif - if (kaaGeneration != serverGeneration) - { - kaaScreenPrivateIndex = AllocateScreenPrivateIndex(); - kaaPixmapPrivateIndex = AllocatePixmapPrivateIndex(); - kaaGeneration = serverGeneration; - } - pKaaScr = xalloc (sizeof (KaaScreenPrivRec)); if (!pKaaScr) @@ -1080,7 +1072,7 @@ kaaDrawInit (ScreenPtr pScreen, pKaaScr->info = pScreenInfo; - pScreen->devPrivates[kaaScreenPrivateIndex].ptr = (pointer) pKaaScr; + dixSetPrivate(&pScreen->devPrivates, kaaScreenPrivateKey, pKaaScr); /* * Hook up asynchronous drawing @@ -1106,17 +1098,11 @@ kaaDrawInit (ScreenPtr pScreen, if ((pKaaScr->info->flags & KAA_OFFSCREEN_PIXMAPS) && screen->off_screen_base < screen->memory_size) { - if (!AllocatePixmapPrivate(pScreen, kaaPixmapPrivateIndex, - sizeof (KaaPixmapPrivRec))) + if (!dixRequestPrivate(kaaPixmapPrivateKey, sizeof (KaaPixmapPrivRec))) return FALSE; pScreen->CreatePixmap = kaaCreatePixmap; pScreen->DestroyPixmap = kaaDestroyPixmap; } - else - { - if (!AllocatePixmapPrivate(pScreen, kaaPixmapPrivateIndex, 0)) - return FALSE; - } return TRUE; } diff --git a/hw/kdrive/src/kaa.h b/hw/kdrive/src/kaa.h index db890a75b..90b963b10 100644 --- a/hw/kdrive/src/kaa.h +++ b/hw/kdrive/src/kaa.h @@ -27,11 +27,14 @@ #include "picturestr.h" -#define KaaGetScreenPriv(s) ((KaaScreenPrivPtr)(s)->devPrivates[kaaScreenPrivateIndex].ptr) +#define KaaGetScreenPriv(s) ((KaaScreenPrivPtr) \ + dixLookupPrivate(&(s)->devPrivates, kaaScreenPrivateKey)) #define KaaScreenPriv(s) KaaScreenPrivPtr pKaaScr = KaaGetScreenPriv(s) -#define KaaGetPixmapPriv(p) ((KaaPixmapPrivPtr)(p)->devPrivates[kaaPixmapPrivateIndex].ptr) -#define KaaSetPixmapPriv(p,a) ((p)->devPrivates[kaaPixmapPrivateIndex].ptr = (pointer) (a)) +#define KaaGetPixmapPriv(p) ((KaaPixmapPrivPtr) \ + dixLookupPrivate(&(p)->devPrivates, kaaPixmapPrivateKey)) +#define KaaSetPixmapPriv(p,a) \ + dixSetPrivate(&(p)->devPrivates, kaaPixmapPrivateKey, a) #define KaaPixmapPriv(p) KaaPixmapPrivPtr pKaaPixmap = KaaGetPixmapPriv(p) typedef struct { @@ -46,8 +49,8 @@ typedef struct { Bool dirty; } KaaPixmapPrivRec, *KaaPixmapPrivPtr; -extern int kaaScreenPrivateIndex; -extern int kaaPixmapPrivateIndex; +extern DevPrivateKey kaaScreenPrivateKey; +extern DevPrivateKey kaaPixmapPrivateKey; void diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 2da008df9..d6646f0ef 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -498,7 +498,7 @@ typedef struct _KaaScreenInfo { (PixmapWidthPaddingInfo[d].padRoundUp+1))) #endif -extern int kdScreenPrivateIndex; +extern DevPrivateKey kdScreenPrivateKey; extern unsigned long kdGeneration; extern Bool kdEnabled; extern Bool kdSwitchPending; @@ -510,9 +510,9 @@ extern char *kdSwitchCmd; extern KdOsFuncs *kdOsFuncs; #define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \ - (pScreen)->devPrivates[kdScreenPrivateIndex].ptr) -#define KdSetScreenPriv(pScreen,v) ((pScreen)->devPrivates[kdScreenPrivateIndex].ptr = \ - (pointer) v) + dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey)) +#define KdSetScreenPriv(pScreen,v) \ + dixSetPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey, v) #define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv(pScreen) /* kaa.c */ diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index b8fbd731b..fa506861c 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -104,23 +104,22 @@ static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int); -int KdXVWindowIndex = -1; -int KdXvScreenIndex = -1; -static unsigned long KdXVGeneration = 0; +DevPrivateKey KdXVWindowKey = &KdXVWindowKey; +DevPrivateKey KdXvScreenKey = &KdXvScreenKey; static unsigned long PortResource = 0; -int (*XvGetScreenIndexProc)(void) = XvGetScreenIndex; +int (*XvGetScreenKeyProc)(void) = XvGetScreenKey; unsigned long (*XvGetRTPortProc)(void) = XvGetRTPort; int (*XvScreenInitProc)(ScreenPtr) = XvScreenInit; -#define GET_XV_SCREEN(pScreen) \ - ((XvScreenPtr)((pScreen)->devPrivates[KdXvScreenIndex].ptr)) +#define GET_XV_SCREEN(pScreen) ((XvScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, KdXvScreenKey)) #define GET_KDXV_SCREEN(pScreen) \ ((KdXVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr)) -#define GET_KDXV_WINDOW(pWin) \ - ((KdXVWindowPtr)((pWin)->devPrivates[KdXVWindowIndex].ptr)) +#define GET_KDXV_WINDOW(pWin) ((KdXVWindowPtr) \ + dixLookupPrivate(&(pWin)->devPrivates, KdXVWindowKey)) static KdXVInitGenericAdaptorPtr *GenDrivers = NULL; static int NumGenDrivers = 0; @@ -192,21 +191,12 @@ KdXVScreenInit( /* fprintf(stderr,"KdXVScreenInit initializing %d adaptors\n",num); */ - if(KdXVGeneration != serverGeneration) { - if((KdXVWindowIndex = AllocateWindowPrivateIndex()) < 0) - return FALSE; - KdXVGeneration = serverGeneration; - } - - if(!AllocateWindowPrivate(pScreen,KdXVWindowIndex,0)) - return FALSE; - - if(!XvGetScreenIndexProc || !XvGetRTPortProc || !XvScreenInitProc) + if(!XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc) return FALSE; if(Success != (*XvScreenInitProc)(pScreen)) return FALSE; - KdXvScreenIndex = (*XvGetScreenIndexProc)(); + KdXvScreenIndex = (*XvGetScreenKeyProc)(); PortResource = (*XvGetRTPortProc)(); pxvs = GET_XV_SCREEN(pScreen); @@ -938,7 +928,7 @@ KdXVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) if(!winPriv) return BadAlloc; winPriv->PortRec = portPriv; winPriv->next = PrivRoot; - pWin->devPrivates[KdXVWindowIndex].ptr = (pointer)winPriv; + dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv); } return Success; } @@ -956,8 +946,7 @@ KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) if(prevPriv) prevPriv->next = winPriv->next; else - pWin->devPrivates[KdXVWindowIndex].ptr = - (pointer)winPriv->next; + dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv->next); xfree(winPriv); break; } @@ -981,7 +970,8 @@ KdXVCreateWindow(WindowPtr pWin) ret = (*pScreen->CreateWindow)(pWin); pScreen->CreateWindow = KdXVCreateWindow; - if(ret) pWin->devPrivates[KdXVWindowIndex].ptr = NULL; + if (ret) + dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL); return ret; } @@ -1010,7 +1000,7 @@ KdXVDestroyWindow(WindowPtr pWin) xfree(tmp); } - pWin->devPrivates[KdXVWindowIndex].ptr = NULL; + dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL); pScreen->DestroyWindow = ScreenPriv->DestroyWindow; ret = (*pScreen->DestroyWindow)(pWin); @@ -1067,8 +1057,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) pPriv->pDraw = NULL; if(!pPrev) - pWin->devPrivates[KdXVWindowIndex].ptr = - (pointer)(WinPriv->next); + dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, WinPriv->next); else pPrev->next = WinPriv->next; tmp = WinPriv; @@ -1117,8 +1106,7 @@ KdXVClipNotify(WindowPtr pWin, int dx, int dy) pPriv->pDraw = NULL; if(!pPrev) - pWin->devPrivates[KdXVWindowIndex].ptr = - (pointer)(WinPriv->next); + dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv->next); else pPrev->next = WinPriv->next; tmp = WinPriv; diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 69d619e6f..f8febc5a4 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -57,9 +57,9 @@ /* General parameters */ extern int xf86DoConfigure; extern Bool xf86DoConfigurePass1; -extern int xf86ScreenIndex; /* Index into pScreen.devPrivates */ -extern int xf86CreateRootWindowIndex; /* Index into pScreen.devPrivates */ -extern int xf86PixmapIndex; +extern DevPrivateKey xf86ScreenKey; +extern DevPrivateKey xf86CreateRootWindowKey; +extern DevPrivateKey xf86PixmapKey; extern ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ extern const unsigned char byte_reversed[256]; extern ScrnInfoPtr xf86CurrentScreen; @@ -72,8 +72,8 @@ extern Bool sbusSlotClaimed; extern confDRIRec xf86ConfigDRI; extern Bool xf86inSuspend; -#define XF86SCRNINFO(p) ((ScrnInfoPtr)((p)->devPrivates[xf86ScreenIndex].ptr)) - +#define XF86SCRNINFO(p) ((ScrnInfoPtr)dixLookupPrivate(&(p)->devPrivates, \ + xf86ScreenKey)) #define XF86FLIP_PIXELS() \ do { \ if (xf86GetFlipPixels()) { \ diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 9474ec8e0..68f538fae 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -49,8 +49,7 @@ #include "mi.h" -static unsigned long DGAGeneration = 0; -static int DGAScreenIndex = -1; +static DevPrivateKey DGAScreenKey = NULL; static int mieq_installed = 0; static Bool DGACloseScreen(int i, ScreenPtr pScreen); @@ -68,8 +67,8 @@ DGACopyModeInfo( _X_EXPORT int *XDGAEventBase = NULL; -#define DGA_GET_SCREEN_PRIV(pScreen) \ - ((DGAScreenPtr)((pScreen)->devPrivates[DGAScreenIndex].ptr)) +#define DGA_GET_SCREEN_PRIV(pScreen) ((DGAScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, DGAScreenKey)) typedef struct _FakedVisualList{ @@ -116,11 +115,7 @@ DGAInit( if(!modes || num <= 0) return FALSE; - if(DGAGeneration != serverGeneration) { - if((DGAScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - DGAGeneration = serverGeneration; - } + DGAScreenKey = &DGAScreenKey; if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec)))) return FALSE; @@ -148,7 +143,7 @@ DGAInit( modes[i].flags &= ~DGA_PIXMAP_AVAILABLE; #endif - pScreen->devPrivates[DGAScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = DGACloseScreen; pScreenPriv->DestroyColormap = pScreen->DestroyColormap; @@ -176,7 +171,7 @@ DGAReInitModes( int i; /* No DGA? Ignore call (but don't make it look like it failed) */ - if(DGAScreenIndex < 0) + if(DGAScreenKey == NULL) return TRUE; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); @@ -350,7 +345,7 @@ xf86SetDGAMode( DGAModePtr pMode = NULL; /* First check if DGAInit was successful on this screen */ - if (DGAScreenIndex < 0) + if (DGAScreenKey == NULL) return BadValue; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (!pScreenPriv) @@ -485,7 +480,7 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode) DGAModePtr pMode; PixmapPtr pPix; - if(DGAScreenIndex < 0) + if(DGAScreenKey == NULL) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -535,11 +530,12 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode) _X_EXPORT Bool DGAAvailable(int index) { - if(DGAScreenIndex < 0) + if(DGAScreenKey == NULL) return FALSE; - if (!xf86NoSharedResources(((ScrnInfoPtr)screenInfo.screens[index]-> - devPrivates[xf86ScreenIndex].ptr)->scrnIndex,MEM)) + if (!xf86NoSharedResources(((ScrnInfoPtr)dixLookupPrivate( + &screenInfo.screens[index]->devPrivates, + xf86ScreenKey))->scrnIndex, MEM)) return FALSE; if(DGA_GET_SCREEN_PRIV(screenInfo.screens[index])) @@ -553,7 +549,7 @@ DGAActive(int index) { DGAScreenPtr pScreenPriv; - if(DGAScreenIndex < 0) + if(DGAScreenKey == NULL) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -574,7 +570,7 @@ DGAShutdown() ScrnInfoPtr pScrn; int i; - if(DGAScreenIndex < 0) + if(DGAScreenKey == NULL) return; for(i = 0; i < screenInfo.numScreens; i++) { @@ -904,7 +900,7 @@ DGAVTSwitch(void) /* Alternatively, this could send events to DGA clients */ - if(DGAScreenIndex >= 0) { + if(DGAScreenKey) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if(pScreenPriv && pScreenPriv->current) @@ -921,7 +917,7 @@ DGAStealKeyEvent(int index, int key_code, int is_down) DGAScreenPtr pScreenPriv; dgaEvent de; - if(DGAScreenIndex < 0) /* no DGA */ + if(DGAScreenKey == NULL) /* no DGA */ return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -945,7 +941,7 @@ DGAStealMotionEvent(int index, int dx, int dy) DGAScreenPtr pScreenPriv; dgaEvent de; - if(DGAScreenIndex < 0) /* no DGA */ + if(DGAScreenKey == NULL) /* no DGA */ return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -980,7 +976,7 @@ DGAStealButtonEvent(int index, int button, int is_down) DGAScreenPtr pScreenPriv; dgaEvent de; - if (DGAScreenIndex < 0) + if (DGAScreenKey == NULL) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -1006,7 +1002,7 @@ Bool DGAIsDgaEvent (xEvent *e) { int coreEquiv; - if (DGAScreenIndex < 0 || XDGAEventBase == 0) + if (DGAScreenKey == NULL || XDGAEventBase == 0) return FALSE; coreEquiv = e->u.u.type - *XDGAEventBase; if (KeyPress <= coreEquiv && coreEquiv <= MotionNotify) @@ -1275,7 +1271,7 @@ DGAHandleEvent(int screen_num, xEvent *event, DeviceIntPtr device, int nevents) int coreEquiv; /* no DGA */ - if (DGAScreenIndex < 0 || XDGAEventBase == 0) + if (DGAScreenKey == NULL || XDGAEventBase == 0) return; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index a4ae67e46..536d38e8f 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -47,8 +47,7 @@ #ifdef DPMSExtension -static int DPMSGeneration = 0; -static int DPMSIndex = -1; +static DevPrivateKey DPMSKey = NULL; static Bool DPMSClose(int i, ScreenPtr pScreen); static int DPMSCount = 0; #endif @@ -62,18 +61,15 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) DPMSPtr pDPMS; pointer DPMSOpt; - if (serverGeneration != DPMSGeneration) { - if ((DPMSIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - DPMSGeneration = serverGeneration; - } + DPMSKey = &DPMSKey; if (DPMSDisabledSwitch) DPMSEnabled = FALSE; - if (!(pScreen->devPrivates[DPMSIndex].ptr = xcalloc(sizeof(DPMSRec), 1))) + if (!dixSetPrivate(&pScreen->devPrivates, DPMSKey, + xcalloc(sizeof(DPMSRec), 1))) return FALSE; - pDPMS = (DPMSPtr)pScreen->devPrivates[DPMSIndex].ptr; + pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey); pScrn->DPMSSet = set; pDPMS->Flags = flags; DPMSOpt = xf86FindOption(pScrn->options, "dpms"); @@ -110,10 +106,10 @@ DPMSClose(int i, ScreenPtr pScreen) DPMSPtr pDPMS; /* This shouldn't happen */ - if (DPMSIndex < 0) + if (DPMSKey == NULL) return FALSE; - pDPMS = (DPMSPtr)pScreen->devPrivates[DPMSIndex].ptr; + pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey); /* This shouldn't happen */ if (!pDPMS) @@ -132,9 +128,9 @@ DPMSClose(int i, ScreenPtr pScreen) } xfree((pointer)pDPMS); - pScreen->devPrivates[DPMSIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, DPMSKey, NULL); if (--DPMSCount == 0) - DPMSIndex = -1; + DPMSKey = NULL; return pScreen->CloseScreen(i, pScreen); } @@ -153,7 +149,7 @@ DPMSSet(ClientPtr client, int level) DPMSPowerLevel = level; - if (DPMSIndex < 0) + if (DPMSKey == NULL) return Success; if (level != DPMSModeOn) { @@ -165,7 +161,8 @@ DPMSSet(ClientPtr client, int level) /* For each screen, set the DPMS level */ for (i = 0; i < xf86NumScreens; i++) { pScrn = xf86Screens[i]; - pDPMS = (DPMSPtr)screenInfo.screens[i]->devPrivates[DPMSIndex].ptr; + pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates, + DPMSKey); if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { xf86EnableAccess(pScrn); pScrn->DPMSSet(pScrn, level, 0); @@ -186,14 +183,15 @@ DPMSSupported(void) DPMSPtr pDPMS; ScrnInfoPtr pScrn; - if (DPMSIndex < 0) { + if (DPMSKey == NULL) { return FALSE; } /* For each screen, check if DPMS is supported */ for (i = 0; i < xf86NumScreens; i++) { pScrn = xf86Screens[i]; - pDPMS = (DPMSPtr)screenInfo.screens[i]->devPrivates[DPMSIndex].ptr; + pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates, + DPMSKey); if (pDPMS && pScrn->DPMSSet) return TRUE; } diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 7dc45b75d..4b5105632 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -46,10 +46,12 @@ /* Globals that video drivers may access */ -_X_EXPORT int xf86ScreenIndex = -1; /* Index of ScrnInfo in pScreen.devPrivates */ -int xf86CreateRootWindowIndex = -1; /* Index into pScreen.devPrivates */ +/* Index into pScreen.devPrivates */ +DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKey; +/* Index of ScrnInfo in pScreen.devPrivates */ +_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKey; +_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKey; _X_EXPORT ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ -_X_EXPORT int xf86PixmapIndex = 0; _X_EXPORT const unsigned char byte_reversed[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 90f744c64..06af74f43 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -139,8 +139,8 @@ xf86CreateRootWindow(WindowPtr pWin) int err = Success; ScreenPtr pScreen = pWin->drawable.pScreen; RootWinPropPtr pProp; - CreateWindowProcPtr CreateWindow = - (CreateWindowProcPtr)(pScreen->devPrivates[xf86CreateRootWindowIndex].ptr); + CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr) + dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey); #ifdef DEBUG ErrorF("xf86CreateRootWindow(%p)\n", pWin); @@ -156,7 +156,7 @@ xf86CreateRootWindow(WindowPtr pWin) /* Unhook this function ... */ pScreen->CreateWindow = CreateWindow; - pScreen->devPrivates[xf86CreateRootWindowIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL); /* ... and call the previous CreateWindow fuction, if any */ if (NULL!=pScreen->CreateWindow) { @@ -476,7 +476,6 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) { int i, j, k, scr_index; - static unsigned long generation = 0; char **modulelist; pointer *optionlist; screenLayoutPtr layout; @@ -487,14 +486,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86Initialising = TRUE; - /* Do this early? */ - if (generation != serverGeneration) { - xf86ScreenIndex = AllocateScreenPrivateIndex(); - xf86CreateRootWindowIndex = AllocateScreenPrivateIndex(); - xf86PixmapIndex = AllocatePixmapPrivateIndex(); - generation = serverGeneration; - } - if (serverGeneration == 1) { pScreenInfo->numScreens = 0; @@ -1060,8 +1051,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) * Hook in our ScrnInfoRec, and initialise some other pScreen * fields. */ - screenInfo.screens[scr_index]->devPrivates[xf86ScreenIndex].ptr - = (pointer)xf86Screens[i]; + dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, + xf86ScreenKey, xf86Screens[i]); xf86Screens[i]->pScreen = screenInfo.screens[scr_index]; /* The driver should set this, but make sure it is set anyway */ xf86Screens[i]->vtSema = TRUE; @@ -1077,8 +1068,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) i, xf86Screens[i]->pScreen->CreateWindow ); #endif - screenInfo.screens[scr_index]->devPrivates[xf86CreateRootWindowIndex].ptr - = (void*)(xf86Screens[i]->pScreen->CreateWindow); + dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, + xf86CreateRootWindowKey, + xf86Screens[i]->pScreen->CreateWindow); xf86Screens[i]->pScreen->CreateWindow = xf86CreateRootWindow; #ifdef RENDER diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c index 288d72193..4432ad96b 100644 --- a/hw/xfree86/common/xf86RandR.c +++ b/hw/xfree86/common/xf86RandR.c @@ -45,10 +45,9 @@ typedef struct _xf86RandRInfo { Rotation rotation; } XF86RandRInfoRec, *XF86RandRInfoPtr; -static int xf86RandRIndex = -1; -static int xf86RandRGeneration; +static DevPrivateKey xf86RandRKey = NULL; -#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) (p)->devPrivates[xf86RandRIndex].ptr) +#define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey)) static int xf86RandRModeRefresh (DisplayModePtr mode) @@ -338,14 +337,14 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen) scrp->currentMode = scrp->modes; pScreen->CloseScreen = randrp->CloseScreen; xfree (randrp); - pScreen->devPrivates[xf86RandRIndex].ptr = 0; + dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, NULL); return (*pScreen->CloseScreen) (index, pScreen); } _X_EXPORT Rotation xf86GetRotation(ScreenPtr pScreen) { - if (xf86RandRIndex == -1) + if (xf86RandRKey == NULL) return RR_Rotate_0; return XF86RANDRINFO(pScreen)->rotation; @@ -359,7 +358,7 @@ xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, { XF86RandRInfoPtr randrp; - if (xf86RandRIndex == -1) + if (xf86RandRKey == NULL) return FALSE; randrp = XF86RANDRINFO(pScreen); @@ -401,11 +400,8 @@ xf86RandRInit (ScreenPtr pScreen) if (!noPanoramiXExtension) return TRUE; #endif - if (xf86RandRGeneration != serverGeneration) - { - xf86RandRIndex = AllocateScreenPrivateIndex(); - xf86RandRGeneration = serverGeneration; - } + + xf86RandRKey = &xf86RandRKey; randrp = xalloc (sizeof (XF86RandRInfoRec)); if (!randrp) @@ -433,7 +429,7 @@ xf86RandRInit (ScreenPtr pScreen) randrp->rotation = RR_Rotate_0; - pScreen->devPrivates[xf86RandRIndex].ptr = randrp; + dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, randrp); return TRUE; } diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c index fb9151346..763e5c540 100644 --- a/hw/xfree86/common/xf86VidMode.c +++ b/hw/xfree86/common/xf86VidMode.c @@ -47,12 +47,11 @@ #include "vidmodeproc.h" #include "xf86cmap.h" -static int VidModeGeneration = 0; -static int VidModeIndex = -1; +static DevPrivateKey VidModeKey = NULL; static int VidModeCount = 0; static Bool VidModeClose(int i, ScreenPtr pScreen); -#define VMPTR(p) ((VidModePtr)(p)->devPrivates[VidModeIndex].ptr) +#define VMPTR(p) ((VidModePtr)dixLookupPrivate(&(p)->devPrivates, VidModeKey)) #endif @@ -75,15 +74,10 @@ VidModeExtensionInit(ScreenPtr pScreen) return FALSE; } - if (serverGeneration != VidModeGeneration) { - if ((VidModeIndex = AllocateScreenPrivateIndex()) < 0) { - DEBUG_P("AllocateScreenPrivateIndex() failed"); - return FALSE; - } - VidModeGeneration = serverGeneration; - } + VidModeKey = &VidModeKey; - if (!(pScreen->devPrivates[VidModeIndex].ptr = xcalloc(sizeof(VidModeRec), 1))) { + if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey, + xcalloc(sizeof(VidModeRec), 1))) { DEBUG_P("xcalloc failed"); return FALSE; } @@ -118,10 +112,9 @@ VidModeClose(int i, ScreenPtr pScreen) pScreen->CloseScreen = pVidMode->CloseScreen; if (--VidModeCount == 0) { - if (pScreen->devPrivates[VidModeIndex].ptr) - xfree(pScreen->devPrivates[VidModeIndex].ptr); - pScreen->devPrivates[VidModeIndex].ptr = NULL; - VidModeIndex = -1; + xfree(dixLookupPrivate(&pScreen->devPrivates, VidModeKey)); + dixSetPrivate(&pScreen->devPrivates, VidModeKey, NULL); + VidModeKey = NULL; } return pScreen->CloseScreen(i, pScreen); } @@ -134,8 +127,8 @@ VidModeAvailable(int scrnIndex) DEBUG_P("VidModeAvailable"); - if (VidModeIndex < 0) { - DEBUG_P("VidModeIndex < 0"); + if (VidModeKey == NULL) { + DEBUG_P("VidModeKey == NULL"); return FALSE; } diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c index ea6a26dcd..764647ee4 100644 --- a/hw/xfree86/common/xf86cmap.c +++ b/hw/xfree86/common/xf86cmap.c @@ -60,7 +60,7 @@ #include "xf86cmap.h" #define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \ - ((CMapScreenPtr) (pScreen)->devPrivates[CMapScreenIndex].ptr)->field) + ((CMapScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, CMapScreenKey))->field) #define SCREEN_EPILOGUE(pScreen, field, wrapper)\ ((pScreen)->field = wrapper) @@ -102,9 +102,8 @@ typedef struct { int overscan; } CMapColormapRec, *CMapColormapPtr; -static unsigned long CMapGeneration = 0; -static int CMapScreenIndex = -1; -static int CMapColormapIndex = -1; +static DevPrivateKey CMapScreenKey = NULL; +static DevPrivateKey CMapColormapKey = &CMapColormapKey; static void CMapInstallColormap(ColormapPtr); static void CMapStoreColors(ColormapPtr, int, xColorItem *); @@ -119,7 +118,6 @@ static int CMapChangeGamma(int, Gamma); static void ComputeGamma(CMapScreenPtr); static Bool CMapAllocateColormapPrivate(ColormapPtr); -static Bool CMapInitDefMap(ColormapPtr,int); static void CMapRefreshColors(ColormapPtr, int, int*); static void CMapSetOverscan(ColormapPtr, int, int *); static void CMapReinstallMap(ColormapPtr); @@ -145,13 +143,7 @@ _X_EXPORT Bool xf86HandleColormaps( if(!maxColors || !sigRGBbits || !loadPalette) return FALSE; - if(CMapGeneration != serverGeneration) { - if(((CMapScreenIndex = AllocateScreenPrivateIndex()) < 0) || - ((CMapColormapIndex = AllocateColormapPrivateIndex( - CMapInitDefMap)) < 0)) - return FALSE; - CMapGeneration = serverGeneration; - } + CMapScreenKey = &CMapScreenKey; elements = 1 << sigRGBbits; @@ -169,7 +161,7 @@ _X_EXPORT Bool xf86HandleColormaps( return FALSE; } - pScreen->devPrivates[CMapScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, CMapScreenKey, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreenPriv->CreateColormap = pScreen->CreateColormap; @@ -225,12 +217,6 @@ _X_EXPORT Bool xf86HandleColormaps( return TRUE; } -static Bool -CMapInitDefMap(ColormapPtr cmap, int index) -{ - return TRUE; -} - /**** Screen functions ****/ @@ -254,8 +240,8 @@ CMapColormapUseMax(VisualPtr pVisual, CMapScreenPtr pScreenPriv) static Bool CMapAllocateColormapPrivate(ColormapPtr pmap) { - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pmap->pScreen->devPrivates, CMapScreenKey); CMapColormapPtr pColPriv; CMapLinkPtr pLink; int numColors; @@ -274,7 +260,7 @@ CMapAllocateColormapPrivate(ColormapPtr pmap) return FALSE; } - pmap->devPrivates[CMapColormapIndex].ptr = (pointer)pColPriv; + dixSetPrivate(&pmap->devPrivates, CMapColormapKey, pColPriv); pColPriv->numColors = numColors; pColPriv->colors = colors; @@ -296,8 +282,8 @@ static Bool CMapCreateColormap (ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; - CMapScreenPtr pScreenPriv = - (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, CMapScreenKey); Bool ret = FALSE; pScreen->CreateColormap = pScreenPriv->CreateColormap; @@ -314,10 +300,10 @@ static void CMapDestroyColormap (ColormapPtr cmap) { ScreenPtr pScreen = cmap->pScreen; - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr; - CMapColormapPtr pColPriv = - (CMapColormapPtr) cmap->devPrivates[CMapColormapIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, CMapScreenKey); + CMapColormapPtr pColPriv = (CMapColormapPtr)dixLookupPrivate( + &cmap->devPrivates, CMapColormapKey); CMapLinkPtr prevLink = NULL, pLink = pScreenPriv->maps; if(pColPriv) { @@ -356,8 +342,8 @@ CMapStoreColors( ){ ScreenPtr pScreen = pmap->pScreen; VisualPtr pVisual = pmap->pVisual; - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, CMapScreenKey); int *indices = pScreenPriv->PreAllocIndices; int num = ndef; @@ -373,8 +359,8 @@ CMapStoreColors( return; if(pVisual->class == DirectColor) { - CMapColormapPtr pColPriv = - (CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr; + CMapColormapPtr pColPriv = (CMapColormapPtr)dixLookupPrivate( + &pmap->devPrivates, CMapColormapKey); int i; if (CMapColormapUseMax(pVisual, pScreenPriv)) { @@ -431,8 +417,8 @@ CMapInstallColormap(ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; int index = pScreen->myNum; - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, CMapScreenKey); if (pmap == miInstalledMaps[index]) return; @@ -462,8 +448,8 @@ static Bool CMapEnterVT(int index, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, CMapScreenKey); if((*pScreenPriv->EnterVT)(index, flags)) { if(miInstalledMaps[index]) @@ -478,8 +464,8 @@ static Bool CMapSwitchMode(int index, DisplayModePtr mode, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, CMapScreenKey); if((*pScreenPriv->SwitchMode)(index, mode, flags)) { if(miInstalledMaps[index]) @@ -494,8 +480,8 @@ static int CMapSetDGAMode(int index, int num, DGADevicePtr dev) { ScreenPtr pScreen = screenInfo.screens[index]; - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, CMapScreenKey); int ret; ret = (*pScreenPriv->SetDGAMode)(index, num, dev); @@ -516,10 +502,10 @@ CMapSetDGAMode(int index, int num, DGADevicePtr dev) static void CMapReinstallMap(ColormapPtr pmap) { - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr; - CMapColormapPtr cmapPriv = - (CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pmap->pScreen->devPrivates, CMapScreenKey); + CMapColormapPtr cmapPriv = (CMapColormapPtr)dixLookupPrivate( + &pmap->devPrivates, CMapColormapKey); ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum]; int i = cmapPriv->numColors; int *indices = pScreenPriv->PreAllocIndices; @@ -547,10 +533,10 @@ CMapReinstallMap(ColormapPtr pmap) static void CMapRefreshColors(ColormapPtr pmap, int defs, int* indices) { - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr; - CMapColormapPtr pColPriv = - (CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pmap->pScreen->devPrivates, CMapScreenKey); + CMapColormapPtr pColPriv = (CMapColormapPtr)dixLookupPrivate( + &pmap->devPrivates, CMapColormapKey); VisualPtr pVisual = pmap->pVisual; ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum]; int numColors, i; @@ -681,10 +667,10 @@ CMapCompareColors(LOCO *color1, LOCO *color2) static void CMapSetOverscan(ColormapPtr pmap, int defs, int *indices) { - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pmap->pScreen->devPrivates[CMapScreenIndex].ptr; - CMapColormapPtr pColPriv = - (CMapColormapPtr) pmap->devPrivates[CMapColormapIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pmap->pScreen->devPrivates, CMapScreenKey); + CMapColormapPtr pColPriv = (CMapColormapPtr)dixLookupPrivate( + &pmap->devPrivates, CMapColormapKey); ScrnInfoPtr pScrn = xf86Screens[pmap->pScreen->myNum]; VisualPtr pVisual = pmap->pVisual; int i; @@ -819,8 +805,8 @@ CMapSetOverscan(ColormapPtr pmap, int defs, int *indices) static void CMapUnwrapScreen(ScreenPtr pScreen) { - CMapScreenPtr pScreenPriv = - (CMapScreenPtr) pScreen->devPrivates[CMapScreenIndex].ptr; + CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, CMapScreenKey); ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; pScreen->CloseScreen = pScreenPriv->CloseScreen; @@ -904,10 +890,11 @@ CMapChangeGamma( CMapLinkPtr pLink; /* Is this sufficient checking ? */ - if(CMapScreenIndex == -1) + if(CMapScreenKey == NULL) return BadImplementation; - pScreenPriv = (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr; + pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + CMapScreenKey); if(!pScreenPriv) return BadImplementation; @@ -925,8 +912,8 @@ CMapChangeGamma( /* mark all colormaps on this screen */ pLink = pScreenPriv->maps; while(pLink) { - pColPriv = - (CMapColormapPtr) pLink->cmap->devPrivates[CMapColormapIndex].ptr; + pColPriv = (CMapColormapPtr)dixLookupPrivate(&pLink->cmap->devPrivates, + CMapColormapKey); pColPriv->recalculate = TRUE; pLink = pLink->next; } @@ -997,10 +984,11 @@ xf86ChangeGammaRamp( CMapScreenPtr pScreenPriv; CMapLinkPtr pLink; - if(CMapScreenIndex == -1) + if(CMapScreenKey == NULL) return BadImplementation; - pScreenPriv = (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr; + pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + CMapScreenKey); if(!pScreenPriv) return BadImplementation; @@ -1012,8 +1000,8 @@ xf86ChangeGammaRamp( /* mark all colormaps on this screen */ pLink = pScreenPriv->maps; while(pLink) { - pColPriv = - (CMapColormapPtr) pLink->cmap->devPrivates[CMapColormapIndex].ptr; + pColPriv = (CMapColormapPtr)dixLookupPrivate(&pLink->cmap->devPrivates, + CMapColormapKey); pColPriv->recalculate = TRUE; pLink = pLink->next; } @@ -1056,9 +1044,10 @@ xf86GetGammaRampSize(ScreenPtr pScreen) { CMapScreenPtr pScreenPriv; - if(CMapScreenIndex == -1) return 0; + if(CMapScreenKey == NULL) return 0; - pScreenPriv = (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr; + pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + CMapScreenKey); if(!pScreenPriv) return 0; return pScreenPriv->gammaElements; @@ -1076,10 +1065,11 @@ xf86GetGammaRamp( LOCO *entry; int shift, sigbits; - if(CMapScreenIndex == -1) + if(CMapScreenKey == NULL) return BadImplementation; - pScreenPriv = (CMapScreenPtr)pScreen->devPrivates[CMapScreenIndex].ptr; + pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + CMapScreenKey); if(!pScreenPriv) return BadImplementation; diff --git a/hw/xfree86/common/xf86fbman.c b/hw/xfree86/common/xf86fbman.c index 537d53d7d..9fd2e6c70 100644 --- a/hw/xfree86/common/xf86fbman.c +++ b/hw/xfree86/common/xf86fbman.c @@ -42,21 +42,15 @@ #define DEBUG */ -static int xf86FBMangerIndex = -1; -static unsigned long xf86ManagerGeneration = 0; +static DevPrivateKey xf86FBManagerKey = NULL; _X_EXPORT Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ){ - if(xf86ManagerGeneration != serverGeneration) { - if((xf86FBMangerIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - xf86ManagerGeneration = serverGeneration; - } - - pScreen->devPrivates[xf86FBMangerIndex].ptr = (pointer)funcs; + xf86FBManagerKey = &xf86FBManagerKey; + dixSetPrivate(&pScreen->devPrivates, xf86FBManagerKey, funcs); return TRUE; } @@ -65,9 +59,9 @@ _X_EXPORT Bool xf86RegisterOffscreenManager( _X_EXPORT Bool xf86FBManagerRunning(ScreenPtr pScreen) { - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return FALSE; - if(!pScreen->devPrivates[xf86FBMangerIndex].ptr) + if(!dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey)) return FALSE; return TRUE; @@ -81,9 +75,10 @@ xf86RegisterFreeBoxCallback( ){ FBManagerFuncsPtr funcs; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return FALSE; - if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBManagerKey))) return FALSE; return (*funcs->RegisterFreeBoxCallback)(pScreen, FreeBoxCallback, devPriv); @@ -101,9 +96,10 @@ xf86AllocateOffscreenArea( ){ FBManagerFuncsPtr funcs; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return NULL; - if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBManagerKey))) return NULL; return (*funcs->AllocateOffscreenArea)( @@ -122,9 +118,10 @@ xf86AllocateOffscreenLinear( ){ FBManagerFuncsPtr funcs; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return NULL; - if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBManagerKey))) return NULL; return (*funcs->AllocateOffscreenLinear)( @@ -139,10 +136,10 @@ xf86FreeOffscreenArea(FBAreaPtr area) if(!area) return; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return; - if(!(funcs = - (FBManagerFuncsPtr)area->pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate( + &area->pScreen->devPrivates, xf86FBManagerKey))) return; (*funcs->FreeOffscreenArea)(area); @@ -158,10 +155,10 @@ xf86FreeOffscreenLinear(FBLinearPtr linear) if(!linear) return; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return; - if(!(funcs = - (FBManagerFuncsPtr)linear->pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate( + &linear->pScreen->devPrivates, xf86FBManagerKey))) return; (*funcs->FreeOffscreenLinear)(linear); @@ -179,10 +176,10 @@ xf86ResizeOffscreenArea( if(!resize) return FALSE; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return FALSE; - if(!(funcs = - (FBManagerFuncsPtr)resize->pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate( + &resize->pScreen->devPrivates, xf86FBManagerKey))) return FALSE; return (*funcs->ResizeOffscreenArea)(resize, w, h); @@ -197,10 +194,10 @@ xf86ResizeOffscreenLinear( if(!resize) return FALSE; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return FALSE; - if(!(funcs = - (FBManagerFuncsPtr)resize->pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate( + &resize->pScreen->devPrivates, xf86FBManagerKey))) return FALSE; return (*funcs->ResizeOffscreenLinear)(resize, size); @@ -220,9 +217,10 @@ xf86QueryLargestOffscreenArea( *w = 0; *h = 0; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return FALSE; - if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBManagerKey))) return FALSE; return (*funcs->QueryLargestOffscreenArea)( @@ -240,9 +238,10 @@ xf86QueryLargestOffscreenLinear( *size = 0; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return FALSE; - if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBManagerKey))) return FALSE; return (*funcs->QueryLargestOffscreenLinear)( @@ -255,9 +254,10 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) { FBManagerFuncsPtr funcs; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return FALSE; - if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBManagerKey))) return FALSE; return (*funcs->PurgeOffscreenAreas)(pScreen); @@ -269,8 +269,7 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) \************************************************************/ -static unsigned long xf86FBGeneration = 0; -static int xf86FBScreenIndex = -1; +static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKey; typedef struct _FBLink { FBArea area; @@ -320,8 +319,8 @@ localRegisterFreeBoxCallback( FreeBoxCallbackProcPtr *newCallbacks; DevUnion *newPrivates; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); newCallbacks = xrealloc( offman->FreeBoxesUpdateCallback, sizeof(FreeBoxCallbackProcPtr) * (offman->NumCallbacks + 1)); @@ -446,8 +445,8 @@ localAllocateOffscreenArea( FBManagerPtr offman; FBAreaPtr area = NULL; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); if((area = AllocateArea(offman, w, h, gran, moveCB, removeCB, privData))) SendCallFreeBoxCallbacks(offman); @@ -464,8 +463,8 @@ localFreeOffscreenArea(FBAreaPtr area) ScreenPtr pScreen; pScreen = area->pScreen; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); pLink = offman->UsedAreas; if(!pLink) return; @@ -505,8 +504,8 @@ localResizeOffscreenArea( FBLinkPtr pLink, newLink, pLinkPrev = NULL; pScreen = resize->pScreen; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); /* find this link */ if(!(pLink = offman->UsedAreas)) return FALSE; @@ -625,8 +624,8 @@ localQueryLargestOffscreenArea( if((preferences < 0) || (preferences > 3)) return FALSE; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); if(severity < 0) severity = 0; if(severity > 2) severity = 2; @@ -731,8 +730,8 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen) RegionRec FreedRegion; Bool anyUsed = FALSE; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); pLink = offman->UsedAreas; if(!pLink) return TRUE; @@ -780,8 +779,8 @@ LinearRemoveCBWrapper(FBAreaPtr area) FBLinearLinkPtr pLink, pLinkPrev = NULL; ScreenPtr pScreen = area->pScreen; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); pLink = offman->LinearAreas; if(!pLink) return; @@ -911,7 +910,8 @@ localAllocateOffscreenLinear( BoxPtr extents; int w, h, pitch; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); /* Try to allocate from linear memory first...... */ #ifdef DEBUG @@ -991,8 +991,8 @@ localFreeOffscreenLinear(FBLinearPtr linear) FBLinearLinkPtr pLink, pLinkPrev = NULL; ScreenPtr pScreen = linear->pScreen; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); pLink = offman->LinearAreas; if(!pLink) return; @@ -1049,8 +1049,8 @@ localResizeOffscreenLinear(FBLinearPtr resize, int length) FBLinearLinkPtr pLink; ScreenPtr pScreen = resize->pScreen; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); pLink = offman->LinearAreas; if(!pLink) return FALSE; @@ -1099,7 +1099,8 @@ localQueryLargestOffscreenLinear( int priority ) { - FBManagerPtr offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; + FBManagerPtr offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); FBLinearLinkPtr pLink; FBLinearLinkPtr pLinkRet; @@ -1130,7 +1131,8 @@ localQueryLargestOffscreenLinear( FBManagerPtr offman; BoxPtr extents; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); if((extents->x2 - extents->x1) == w) *size = w * h; @@ -1162,9 +1164,8 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen) { FBLinkPtr pLink, tmp; FBLinearLinkPtr pLinearLink, tmp2; - FBManagerPtr offman = - (FBManagerPtr) pScreen->devPrivates[xf86FBScreenIndex].ptr; - + FBManagerPtr offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); pScreen->CloseScreen = offman->CloseScreen; @@ -1188,7 +1189,7 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen) xfree(offman->FreeBoxesUpdateCallback); xfree(offman->devPrivates); xfree(offman); - pScreen->devPrivates[xf86FBScreenIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, NULL); return (*pScreen->CloseScreen) (i, pScreen); } @@ -1332,19 +1333,13 @@ xf86InitFBManagerRegion( if(REGION_NIL(FullRegion)) return FALSE; - if(xf86FBGeneration != serverGeneration) { - if((xf86FBScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - xf86FBGeneration = serverGeneration; - } - if(!xf86RegisterOffscreenManager(pScreen, &xf86FBManFuncs)) return FALSE; offman = xalloc(sizeof(FBManager)); if(!offman) return FALSE; - pScreen->devPrivates[xf86FBScreenIndex].ptr = (pointer)offman; + dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, offman); offman->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86FBCloseScreen; @@ -1380,11 +1375,11 @@ xf86InitFBManagerLinear( return FALSE; /* we expect people to have called the Area setup first for pixmap cache */ - if (!pScreen->devPrivates[xf86FBScreenIndex].ptr) + if (!dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey)) return FALSE; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); offman->LinearAreas = xalloc(sizeof(FBLinearLink)); if (!offman->LinearAreas) return FALSE; @@ -1424,13 +1419,14 @@ xf86AllocateLinearOffscreenArea ( BoxPtr extents; int w, h; - if(xf86FBMangerIndex < 0) + if(xf86FBManagerKey == NULL) return NULL; - if(!(funcs = (FBManagerFuncsPtr)pScreen->devPrivates[xf86FBMangerIndex].ptr)) + if(!(funcs = (FBManagerFuncsPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBManagerKey))) return NULL; - offman = pScreen->devPrivates[xf86FBScreenIndex].ptr; - + offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, + xf86FBScreenKey); extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); w = extents->x2 - extents->x1; diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c index 2e06ffac4..4ec099a19 100644 --- a/hw/xfree86/common/xf86sbusBus.c +++ b/hw/xfree86/common/xf86sbusBus.c @@ -602,8 +602,7 @@ xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp) pScrn->virtualY = psdp->height; } -static int sbusPaletteIndex = -1; -static unsigned long sbusPaletteGeneration = 0; +static DevPrivateKey sbusPaletteKey = &sbusPaletteKey; typedef struct _sbusCmap { sbusDevicePtr psdp; CloseScreenProcPtr CloseScreen; @@ -613,7 +612,8 @@ typedef struct _sbusCmap { unsigned char origBlue[16]; } sbusCmapRec, *sbusCmapPtr; -#define SBUSCMAPPTR(pScreen) ((sbusCmapPtr)((pScreen)->devPrivates[sbusPaletteIndex].ptr)) +#define SBUSCMAPPTR(pScreen) ((sbusCmapPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, sbusPaletteKey)) static void xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, @@ -673,13 +673,8 @@ xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp) struct fbcmap fbcmap; unsigned char data[2]; - if(sbusPaletteGeneration != serverGeneration) { - if((sbusPaletteIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - sbusPaletteGeneration = serverGeneration; - } cmap = xnfcalloc(1, sizeof(sbusCmapRec)); - pScreen->devPrivates[sbusPaletteIndex].ptr = cmap; + dixSetPrivate(&pScreen->devPrivates, sbusPaletteKey, cmap); cmap->psdp = psdp; fbcmap.index = 0; fbcmap.count = 16; diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index 70a946922..f972b1f18 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -110,23 +110,22 @@ static void xf86XVAdjustFrame(int index, int x, int y, int flags); static Bool xf86XVInitAdaptors(ScreenPtr, XF86VideoAdaptorPtr*, int); -static int XF86XVWindowIndex = -1; -int XF86XvScreenIndex = -1; -static unsigned long XF86XVGeneration = 0; +static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKey; +DevPrivateKey XF86XvScreenKey; static unsigned long PortResource = 0; -int (*XvGetScreenIndexProc)(void) = NULL; +DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL; unsigned long (*XvGetRTPortProc)(void) = NULL; int (*XvScreenInitProc)(ScreenPtr) = NULL; #define GET_XV_SCREEN(pScreen) \ - ((XvScreenPtr)((pScreen)->devPrivates[XF86XvScreenIndex].ptr)) + ((XvScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XF86XvScreenKey)) #define GET_XF86XV_SCREEN(pScreen) \ - ((XF86XVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr)) + ((XF86XVScreenPtr)(GET_XV_SCREEN(pScreen)->devPriv.ptr)) #define GET_XF86XV_WINDOW(pWin) \ - ((XF86XVWindowPtr)((pWin)->devPrivates[XF86XVWindowIndex].ptr)) + ((XF86XVWindowPtr)dixLookupPrivate(&(pWin)->devPrivates, XF86XVWindowKey)) static xf86XVInitGenericAdaptorPtr *GenDrivers = NULL; static int NumGenDrivers = 0; @@ -233,21 +232,12 @@ xf86XVScreenInit( XvScreenPtr pxvs; if(num <= 0 || - !XvGetScreenIndexProc || !XvGetRTPortProc || !XvScreenInitProc) - return FALSE; - - if(XF86XVGeneration != serverGeneration) { - if((XF86XVWindowIndex = AllocateWindowPrivateIndex()) < 0) - return FALSE; - XF86XVGeneration = serverGeneration; - } - - if(!AllocateWindowPrivate(pScreen,XF86XVWindowIndex,0)) + !XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc) return FALSE; if(Success != (*XvScreenInitProc)(pScreen)) return FALSE; - XF86XvScreenIndex = (*XvGetScreenIndexProc)(); + XF86XvScreenKey = (*XvGetScreenKeyProc)(); PortResource = (*XvGetRTPortProc)(); pxvs = GET_XV_SCREEN(pScreen); @@ -977,7 +967,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) memset(winPriv, 0, sizeof(XF86XVWindowRec)); winPriv->PortRec = portPriv; winPriv->next = PrivRoot; - pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv; + dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, winPriv); } portPriv->pDraw = (DrawablePtr)pWin; @@ -998,8 +988,8 @@ xf86XVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) if(prevPriv) prevPriv->next = winPriv->next; else - pWin->devPrivates[XF86XVWindowIndex].ptr = - (pointer)winPriv->next; + dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, + winPriv->next); xfree(winPriv); break; } @@ -1037,7 +1027,7 @@ xf86XVDestroyWindow(WindowPtr pWin) xfree(tmp); } - pWin->devPrivates[XF86XVWindowIndex].ptr = NULL; + dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, NULL); pScreen->DestroyWindow = ScreenPriv->DestroyWindow; ret = (*pScreen->DestroyWindow)(pWin); @@ -1094,8 +1084,8 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) pPriv->pDraw = NULL; if(!pPrev) - pWin->devPrivates[XF86XVWindowIndex].ptr = - (pointer)(WinPriv->next); + dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, + WinPriv->next); else pPrev->next = WinPriv->next; tmp = WinPriv; @@ -1146,8 +1136,8 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy) pPriv->pDraw = NULL; if(!pPrev) - pWin->devPrivates[XF86XVWindowIndex].ptr = - (pointer)(WinPriv->next); + dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, + WinPriv->next); else pPrev->next = WinPriv->next; tmp = WinPriv; diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c index f8ff0bed4..05267a240 100644 --- a/hw/xfree86/common/xf86xvmc.c +++ b/hw/xfree86/common/xf86xvmc.c @@ -56,11 +56,10 @@ typedef struct { XvMCAdaptorPtr dixinfo; } xf86XvMCScreenRec, *xf86XvMCScreenPtr; -static unsigned long XF86XvMCGeneration = 0; -static int XF86XvMCScreenIndex = -1; +static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKey; -#define XF86XVMC_GET_PRIVATE(pScreen) \ - (xf86XvMCScreenPtr)((pScreen)->devPrivates[XF86XvMCScreenIndex].ptr) +#define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey) static int @@ -164,19 +163,12 @@ _X_EXPORT Bool xf86XvMCScreenInit( { XvMCAdaptorPtr pAdapt; xf86XvMCScreenPtr pScreenPriv; - XvScreenPtr pxvs = - (XvScreenPtr)(pScreen->devPrivates[XF86XvScreenIndex].ptr); - + XvScreenPtr pxvs = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + XF86XvScreenKey); int i, j; if(!XvMCScreenInitProc) return FALSE; - if(XF86XvMCGeneration != serverGeneration) { - if((XF86XvMCScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - XF86XvMCGeneration = serverGeneration; - } - if(!(pAdapt = xalloc(sizeof(XvMCAdaptorRec) * num_adaptors))) return FALSE; @@ -185,7 +177,7 @@ _X_EXPORT Bool xf86XvMCScreenInit( return FALSE; } - pScreen->devPrivates[XF86XvMCScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, XF86XvMCScreenKey, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86XvMCCloseScreen; diff --git a/hw/xfree86/common/xf86xvpriv.h b/hw/xfree86/common/xf86xvpriv.h index e716c9c6a..4200dac80 100644 --- a/hw/xfree86/common/xf86xvpriv.h +++ b/hw/xfree86/common/xf86xvpriv.h @@ -30,10 +30,11 @@ #define _XF86XVPRIV_H_ #include "xf86xv.h" +#include "privates.h" /*** These are DDX layer privates ***/ -extern int XF86XvScreenIndex; +extern DevPrivateKey XF86XvScreenKey; typedef struct { DestroyWindowProcPtr DestroyWindow; diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c index fa9530860..295e05e9e 100644 --- a/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -62,8 +62,7 @@ unsigned char DGAReqCode = 0; int DGAErrorBase; int DGAEventBase; -static int DGAGeneration = 0; -static int DGAClientPrivateIndex; +static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKey; static int DGACallbackRefCount = 0; /* This holds the client's version information */ @@ -72,7 +71,11 @@ typedef struct { int minor; } DGAPrivRec, *DGAPrivPtr; -#define DGAPRIV(c) ((c)->devPrivates[DGAClientPrivateIndex].ptr) +#define DGA_GETPRIV(c) ((DGAPrivPtr) \ + dixLookupPrivate(&(c)->devPrivates, DGAClientPrivateKey)) +#define DGA_SETPRIV(c,p) \ + dixSetPrivate(&(c)->devPrivates, DGAClientPrivateKey, p) + void XFree86DGAExtensionInit(INITARGS) @@ -97,23 +100,6 @@ XFree86DGAExtensionInit(INITARGS) for (i = KeyPress; i <= MotionNotify; i++) SetCriticalEvent (DGAEventBase + i); } - - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (DGAGeneration != serverGeneration) { - DGAClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to - * our DGAPrivRec. - */ - if (!AllocateClientPrivate(DGAClientPrivateIndex, 0)) { - ErrorF("XFree86DGAExtensionInit: AllocateClientPrivate failed\n"); - return; - } - DGAGeneration = serverGeneration; - } } @@ -590,12 +576,12 @@ ProcXDGASetClientVersion(ClientPtr client) DGAPrivPtr pPriv; REQUEST_SIZE_MATCH(xXDGASetClientVersionReq); - if ((pPriv = DGAPRIV(client)) == NULL) { + if ((pPriv = DGA_GETPRIV(client)) == NULL) { pPriv = xalloc(sizeof(DGAPrivRec)); /* XXX Need to look into freeing this */ if (!pPriv) return BadAlloc; - DGAPRIV(client) = pPriv; + DGA_SETPRIV(client, pPriv); } pPriv->major = stuff->major; pPriv->minor = stuff->minor; diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c index 3a6f83eca..66278a298 100644 --- a/hw/xfree86/dixmods/extmod/xf86misc.c +++ b/hw/xfree86/dixmods/extmod/xf86misc.c @@ -41,8 +41,7 @@ #endif static int miscErrorBase; -static int MiscGeneration = 0; -static int MiscClientPrivateIndex; +static DevPrivateKey MiscClientPrivateKey = &MiscClientPrivateKey; /* This holds the client's version information */ typedef struct { @@ -50,7 +49,10 @@ typedef struct { int minor; } MiscPrivRec, *MiscPrivPtr; -#define MPRIV(c) ((c)->devPrivates[MiscClientPrivateIndex].ptr) +#define M_GETPRIV(c) ((MiscPrivPtr) \ + dixLookupPrivate(&(c)->devPrivates, MiscClientPrivateKey)) +#define M_SETPRIV(c,p) \ + dixSetPrivate(&(c)->devPrivates, MiscClientPrivateKey, p) static void XF86MiscResetProc( ExtensionEntry* /* extEntry */ @@ -61,7 +63,7 @@ ClientVersion(ClientPtr client, int *major, int *minor) { MiscPrivPtr pPriv; - pPriv = MPRIV(client); + pPriv = M_GETPRIV(client); if (!pPriv) { if (major) *major = 0; if (minor) *minor = 0; @@ -123,24 +125,6 @@ XFree86MiscExtensionInit(void) if (!xf86GetModInDevEnabled()) return; - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (MiscGeneration != serverGeneration) { - MiscClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to our - * MiscPrivRec. - */ - if (!AllocateClientPrivate(MiscClientPrivateIndex, 0)) { - ErrorF("XFree86MiscExtensionInit: " - "AllocateClientPrivate failed\n"); - return; - } - MiscGeneration = serverGeneration; - } - if ( (extEntry = AddExtension(XF86MISCNAME, XF86MiscNumberEvents, @@ -205,7 +189,9 @@ ProcXF86MiscSetSaver(client) if (stuff->screen > screenInfo.numScreens) return BadValue; - vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr; + vptr = (ScrnInfoPtr) + dixLookupPrivate(&screenInfo.screens[stuff->screen]->devPrivates, + xf86ScreenKey); REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq); @@ -233,7 +219,9 @@ ProcXF86MiscGetSaver(client) if (stuff->screen > screenInfo.numScreens) return BadValue; - vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr; + vptr = (ScrnInfoPtr) + dixLookupPrivate(&screenInfo.screens[stuff->screen]->devPrivates, + xf86ScreenKey); REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq); rep.type = X_Reply; @@ -497,11 +485,11 @@ ProcXF86MiscSetClientVersion(ClientPtr client) REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); - if ((pPriv = MPRIV(client)) == NULL) { + if ((pPriv = M_GETPRIV(client)) == NULL) { pPriv = xalloc(sizeof(MiscPrivRec)); if (!pPriv) return BadAlloc; - MPRIV(client) = pPriv; + M_SETPRIV(client, pPriv); } if (xf86GetVerbosity() > 1) ErrorF("SetClientVersion: %i %i\n",stuff->major,stuff->minor); diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c index 44ec9f11d..fa3284839 100644 --- a/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -52,8 +52,7 @@ from Kaleb S. KEITHLEY #define DEFAULT_XF86VIDMODE_VERBOSITY 3 static int VidModeErrorBase; -static int VidModeGeneration = 0; -static int VidModeClientPrivateIndex; +static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKey; /* This holds the client's version information */ typedef struct { @@ -61,7 +60,10 @@ typedef struct { int minor; } VidModePrivRec, *VidModePrivPtr; -#define VMPRIV(c) ((c)->devPrivates[VidModeClientPrivateIndex].ptr) +#define VM_GETPRIV(c) ((VidModePrivPtr) \ + dixLookupPrivate(&(c)->devPrivates, VidModeClientPrivateKey)) +#define VM_SETPRIV(c,p) \ + dixSetPrivate(&(c)->devPrivates, VidModeClientPrivateKey, p) static void XF86VidModeResetProc( ExtensionEntry* /* extEntry */ @@ -145,10 +147,12 @@ typedef struct _XF86VidModeScreenPrivate { Bool hasWindow; } XF86VidModeScreenPrivateRec, *XF86VidModeScreenPrivatePtr; -static int ScreenPrivateIndex; +static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKey; -#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr)(s)->devPrivates[ScreenPrivateIndex].ptr) -#define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (pointer) v); +#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ + dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) +#define SetScreenPrivate(s,v) \ + dixSetPrivate(&(s)->devPrivates, ScreenPrivateKey, v) #define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = GetScreenPrivate(s) #define New(t) (xalloc (sizeof (t))) @@ -172,7 +176,6 @@ XFree86VidModeExtensionInit(void) #ifdef XF86VIDMODE_EVENTS EventType = CreateNewResourceType(XF86VidModeFreeEvents); - ScreenPrivateIndex = AllocateScreenPrivateIndex (); #endif for(i = 0; i < screenInfo.numScreens; i++) { @@ -187,27 +190,9 @@ XFree86VidModeExtensionInit(void) if (!enabled) return; - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (VidModeGeneration != serverGeneration) { - VidModeClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to our - * VidModePrivRec. - */ - if (!AllocateClientPrivate(VidModeClientPrivateIndex, 0)) { - ErrorF("XFree86VidModeExtensionInit: " - "AllocateClientPrivate failed\n"); - return; - } - VidModeGeneration = serverGeneration; - } - if ( #ifdef XF86VIDMODE_EVENTS - EventType && ScreenPrivateIndex != -1 && + EventType && #endif (extEntry = AddExtension(XF86VIDMODENAME, XF86VidModeNumberEvents, @@ -239,7 +224,7 @@ ClientMajorVersion(ClientPtr client) { VidModePrivPtr pPriv; - pPriv = VMPRIV(client); + pPriv = VM_GETPRIV(client); if (!pPriv) return 0; else @@ -1682,11 +1667,11 @@ ProcXF86VidModeSetClientVersion(ClientPtr client) REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); - if ((pPriv = VMPRIV(client)) == NULL) { + if ((pPriv = VM_GETPRIV(client)) == NULL) { pPriv = xalloc(sizeof(VidModePrivRec)); if (!pPriv) return BadAlloc; - VMPRIV(client) = pPriv; + VM_SETPRIV(client, pPriv); } pPriv->major = stuff->major; pPriv->minor = stuff->minor; diff --git a/hw/xfree86/dixmods/extmod/xvmod.c b/hw/xfree86/dixmods/extmod/xvmod.c index 7c1450c7a..6b3f1149a 100644 --- a/hw/xfree86/dixmods/extmod/xvmod.c +++ b/hw/xfree86/dixmods/extmod/xvmod.c @@ -16,7 +16,7 @@ void XvRegister() { XvScreenInitProc = XvScreenInit; - XvGetScreenIndexProc = XvGetScreenIndex; + XvGetScreenKeyProc = XvGetScreenKey; XvGetRTPortProc = XvGetRTPort; XvMCScreenInitProc = XvMCScreenInit; } diff --git a/hw/xfree86/dixmods/extmod/xvmodproc.h b/hw/xfree86/dixmods/extmod/xvmodproc.h index 81356a149..b39c915b4 100644 --- a/hw/xfree86/dixmods/extmod/xvmodproc.h +++ b/hw/xfree86/dixmods/extmod/xvmodproc.h @@ -5,7 +5,7 @@ #include "xvmcext.h" -extern int (*XvGetScreenIndexProc)(void); +extern DevPrivateKey (*XvGetScreenKeyProc)(void); extern unsigned long (*XvGetRTPortProc)(void); extern int (*XvScreenInitProc)(ScreenPtr); extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr); diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c index d1bbfcd14..84c0508bc 100644 --- a/hw/xfree86/dri/dri.c +++ b/hw/xfree86/dri/dri.c @@ -79,8 +79,8 @@ extern Bool noPanoramiXExtension; #endif static int DRIEntPrivIndex = -1; -static int DRIScreenPrivIndex = -1; -static int DRIWindowPrivIndex = -1; +static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKey; +static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKey; static unsigned long DRIGeneration = 0; static unsigned int DRIDrawableValidationStamp = 0; @@ -343,20 +343,18 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) pDRIEntPriv = DRI_ENT_PRIV(pScrn); - if (DRIGeneration != serverGeneration) { - if ((DRIScreenPrivIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; + DRIScreenPrivKey = &DRIScreenPrivKey; + if (DRIGeneration != serverGeneration) DRIGeneration = serverGeneration; - } pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec)); if (!pDRIPriv) { - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; - DRIScreenPrivIndex = -1; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); + DRIScreenPrivKey = NULL; return FALSE; } - pScreen->devPrivates[DRIScreenPrivIndex].ptr = (pointer) pDRIPriv; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, pDRIPriv); pDRIPriv->drmFD = pDRIEntPriv->drmFD; pDRIPriv->directRenderingSupport = TRUE; pDRIPriv->pDriverInfo = pDRIInfo; @@ -381,7 +379,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) &pDRIPriv->hSAREA) < 0) { pDRIPriv->directRenderingSupport = FALSE; - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); drmClose(pDRIPriv->drmFD); DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] drmAddMap failed\n"); @@ -398,7 +396,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) (drmAddressPtr)(&pDRIPriv->pSAREA)) < 0) { pDRIPriv->directRenderingSupport = FALSE; - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); drmClose(pDRIPriv->drmFD); DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] drmMap failed\n"); @@ -428,7 +426,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) &pDRIPriv->pDriverInfo->hFrameBuffer) < 0) { pDRIPriv->directRenderingSupport = FALSE; - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); drmUnmap(pDRIPriv->pSAREA, pDRIPriv->pDriverInfo->SAREASize); drmClose(pDRIPriv->drmFD); DRIDrvMsg(pScreen->myNum, X_INFO, @@ -744,8 +742,8 @@ DRICloseScreen(ScreenPtr pScreen) } xfree(pDRIPriv); - pScreen->devPrivates[DRIScreenPrivIndex].ptr = NULL; - DRIScreenPrivIndex = -1; + dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); + DRIScreenPrivKey = NULL; } } @@ -772,30 +770,13 @@ drmServerInfo DRIDRMServerInfo = { Bool DRIExtensionInit(void) { - int i; - ScreenPtr pScreen; - - if (DRIScreenPrivIndex < 0 || DRIGeneration != serverGeneration) { + if (!DRIScreenPrivKey || DRIGeneration != serverGeneration) { return FALSE; } - /* Allocate a window private index with a zero sized private area for - * each window, then should a window become a DRI window, we'll hang - * a DRIWindowPrivateRec off of this private index. - */ - if ((DRIWindowPrivIndex = AllocateWindowPrivateIndex()) < 0) - return FALSE; - DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete); DRIContextPrivResType = CreateNewResourceType(DRIContextPrivDelete); - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - if (!AllocateWindowPrivate(pScreen, DRIWindowPrivIndex, 0)) - return FALSE; - } - RegisterBlockAndWakeupHandlers(DRIBlockHandler, DRIWakeupHandler, NULL); return TRUE; @@ -1302,9 +1283,8 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, pDRIDrawablePriv->nrects = REGION_NUM_RECTS(&pWin->clipList); /* save private off of preallocated index */ - pWin->devPrivates[DRIWindowPrivIndex].ptr = - (pointer)pDRIDrawablePriv; - + dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, + pDRIDrawablePriv); pDRIPriv->nrWindows++; if (pDRIDrawablePriv->nrects) @@ -1362,7 +1342,7 @@ DRIDrawablePrivDestroy(WindowPtr pWin) drmDestroyDrawable(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable); xfree(pDRIDrawablePriv); - pWin->devPrivates[DRIWindowPrivIndex].ptr = NULL; + dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL); } static Bool diff --git a/hw/xfree86/dri/dristruct.h b/hw/xfree86/dri/dristruct.h index c3b0aeede..ae970d834 100644 --- a/hw/xfree86/dri/dristruct.h +++ b/hw/xfree86/dri/dristruct.h @@ -37,15 +37,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xf86drm.h" -#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) \ - ((DRIWindowPrivIndex < 0) ? \ - NULL : \ - ((DRIDrawablePrivPtr)((pWin)->devPrivates[DRIWindowPrivIndex].ptr))) - -#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) \ - ((DRIPixmapPrivIndex < 0) ? \ - NULL : \ - ((DRIDrawablePrivPtr)((pPix)->devPrivates[DRIWindowPrivIndex].ptr))) +#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \ + dixLookupPrivate(&(pWin)->devPrivates, DRIWindowPrivKey)) +#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) ((DRIDrawablePrivPtr) \ + dixLookupPrivate(&(pPix)->devPrivates, DRIWindowPrivKey)) typedef struct _DRIDrawablePrivRec { @@ -65,13 +60,12 @@ struct _DRIContextPrivRec void** pContextStore; }; -#define DRI_SCREEN_PRIV(pScreen) \ - ((DRIScreenPrivIndex < 0) ? \ - NULL : \ - ((DRIScreenPrivPtr)((pScreen)->devPrivates[DRIScreenPrivIndex].ptr))) +#define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey)) #define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \ - (screenInfo.screens[screenIndex]->devPrivates[DRIScreenPrivIndex].ptr)) + dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \ + DRIScreenPrivKey)) #define DRI_ENT_PRIV(pScrn) \ ((DRIEntPrivIndex < 0) ? \ diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index 4dce58fd8..aac32949c 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -42,8 +42,7 @@ typedef struct _ExaXorgScreenPrivRec { OptionInfoPtr options; } ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr; -static int exaXorgServerGeneration; -static int exaXorgScreenPrivateIndex; +static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKey; typedef enum { EXAOPT_MIGRATION_HEURISTIC, @@ -69,8 +68,8 @@ static Bool exaXorgCloseScreen (int i, ScreenPtr pScreen) { ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen); - ExaXorgScreenPrivPtr pScreenPriv = - pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr; + ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr) + dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey); pScreen->CloseScreen = pScreenPriv->SavedCloseScreen; @@ -86,8 +85,8 @@ static void exaXorgEnableDisableFBAccess (int index, Bool enable) { ScreenPtr pScreen = screenInfo.screens[index]; - ExaXorgScreenPrivPtr pScreenPriv = - pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr; + ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr) + dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey); if (!enable) exaEnableDisableFBAccess (index, enable); @@ -111,11 +110,6 @@ exaDDXDriverInit(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ExaXorgScreenPrivPtr pScreenPriv; - if (exaXorgServerGeneration != serverGeneration) { - exaXorgScreenPrivateIndex = AllocateScreenPrivateIndex(); - exaXorgServerGeneration = serverGeneration; - } - pScreenPriv = xcalloc (1, sizeof(ExaXorgScreenPrivRec)); if (pScreenPriv == NULL) return; @@ -166,7 +160,7 @@ exaDDXDriverInit(ScreenPtr pScreen) pExaScr->info->DownloadFromScreen = NULL; } - pScreen->devPrivates[exaXorgScreenPrivateIndex].ptr = pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey, pScreenPriv); pScreenPriv->SavedEnableDisableFBAccess = pScrn->EnableDisableFBAccess; pScrn->EnableDisableFBAccess = exaXorgEnableDisableFBAccess; diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 1af076b88..4b3b66a89 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -238,7 +238,7 @@ _X_HIDDEN void *dixLookupTab[] = { #ifdef XV /* XXX These are exported from the DDX, not DIX. */ SYMVAR(XvScreenInitProc) - SYMVAR(XvGetScreenIndexProc) + SYMVAR(XvGetScreenKeyProc) SYMVAR(XvGetRTPortProc) SYMVAR(XvMCScreenInitProc) #endif @@ -270,20 +270,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(dixFreePrivates) SYMFUNC(dixRegisterPrivateOffset) SYMFUNC(dixLookupPrivateOffset) - SYMFUNC(AllocateExtensionPrivate) - SYMFUNC(AllocateExtensionPrivateIndex) - SYMFUNC(AllocateClientPrivate) - SYMFUNC(AllocateClientPrivateIndex) - SYMFUNC(AllocateGCPrivate) - SYMFUNC(AllocateGCPrivateIndex) - SYMFUNC(AllocateWindowPrivate) - SYMFUNC(AllocateWindowPrivateIndex) - SYMFUNC(AllocateScreenPrivateIndex) - SYMFUNC(AllocateColormapPrivateIndex) - SYMFUNC(AllocateDevicePrivateIndex) - SYMFUNC(AllocateDevicePrivate) - SYMFUNC(AllocatePixmapPrivateIndex) - SYMFUNC(AllocatePixmapPrivate) /* resource.c */ SYMFUNC(AddResource) SYMFUNC(ChangeResourceValue) @@ -521,7 +507,7 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(PictureTransformPoint3d) SYMFUNC(PictureGetSubpixelOrder) SYMFUNC(PictureSetSubpixelOrder) - SYMVAR(PictureScreenPrivateIndex) + SYMVAR(PictureScreenPrivateKey) /* mipict.c */ SYMFUNC(miPictureInit) SYMFUNC(miComputeCompositeRegion) diff --git a/hw/xfree86/loader/misym.c b/hw/xfree86/loader/misym.c index 78ae10e02..e87d35408 100644 --- a/hw/xfree86/loader/misym.c +++ b/hw/xfree86/loader/misym.c @@ -200,9 +200,9 @@ _X_HIDDEN void *miLookupTab[] = { SYMFUNC(miOverlaySetRootClip) SYMVAR(miEmptyBox) SYMVAR(miEmptyData) - SYMVAR(miZeroLineScreenIndex) + SYMVAR(miZeroLineScreenKey) SYMVAR(miSpritePointerFuncs) - SYMVAR(miPointerScreenIndex) + SYMVAR(miPointerScreenKey) SYMVAR(miInstalledMaps) SYMVAR(miInitVisualsProc) #ifdef RENDER diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 9b8dac82e..7beef3193 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -1099,8 +1099,8 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMVAR(xf86HUGE_VAL) /* General variables (from xf86.h) */ - SYMVAR(xf86ScreenIndex) - SYMVAR(xf86PixmapIndex) + SYMVAR(xf86ScreenKey) + SYMVAR(xf86PixmapKey) SYMVAR(xf86Screens) SYMVAR(byte_reversed) SYMVAR(xf86inSuspend) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index 38435c924..d58cc7070 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -59,11 +59,11 @@ static Bool xf86RandR12Init12 (ScreenPtr pScreen); static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen); #endif -static int xf86RandR12Index; -static int xf86RandR12Generation; +static int xf86RandR12Generation; +static DevPrivateKey xf86RandR12Key = &xf86RandR12Key; -#define XF86RANDRINFO(p) \ - ((XF86RandRInfoPtr)(p)->devPrivates[xf86RandR12Index].ptr) +#define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ + dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key)) static int xf86RandR12ModeRefresh (DisplayModePtr mode) @@ -482,10 +482,7 @@ xf86RandR12Init (ScreenPtr pScreen) return TRUE; #endif if (xf86RandR12Generation != serverGeneration) - { - xf86RandR12Index = AllocateScreenPrivateIndex(); xf86RandR12Generation = serverGeneration; - } randrp = xalloc (sizeof (XF86RandRInfoRec)); if (!randrp) @@ -511,7 +508,7 @@ xf86RandR12Init (ScreenPtr pScreen) randrp->maxX = randrp->maxY = 0; - pScreen->devPrivates[xf86RandR12Index].ptr = randrp; + dixSetPrivate(&pScreen->devPrivates, xf86RandR12Key, randrp); #if RANDR_12_INTERFACE if (!xf86RandR12Init12 (pScreen)) diff --git a/hw/xfree86/os-support/solaris/sun_mouse.c b/hw/xfree86/os-support/solaris/sun_mouse.c index aa509d08b..b1b7797f1 100644 --- a/hw/xfree86/os-support/solaris/sun_mouse.c +++ b/hw/xfree86/os-support/solaris/sun_mouse.c @@ -121,8 +121,11 @@ static void vuidMouseSendScreenSize(ScreenPtr pScreen, VuidMsePtr pVuidMse); static void vuidMouseAdjustFrame(int index, int x, int y, int flags); static int vuidMouseGeneration = 0; -static int vuidMouseScreenIndex; -#define vuidMouseScreenPrivate(s) ((s)->devPrivates[vuidMouseScreenIndex].ptr) +static DevPrivateKey vuidMouseScreenKey = &vuidMouseScreenKey; +#define vuidGetMouseScreenPrivate(s) ((VuidMsePtr) \ + dixLookupPrivate(&(s)->devPrivates, vuidMouseScreenKey)) +#define vuidSetMouseScreenPrivate(s,p) \ + dixSetPrivate(&(s)->devPrivates, vuidMouseScreenKey, p) #endif /* HAVE_ABSOLUTE_MOUSE_SCALING */ static inline @@ -455,7 +458,7 @@ static void vuidMouseAdjustFrame(int index, int x, int y, int flags) ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = pScrn->pScreen; xf86AdjustFrameProc *wrappedAdjustFrame - = (xf86AdjustFrameProc *) vuidMouseScreenPrivate(pScreen); + = (xf86AdjustFrameProc *) vuidMouseGetScreenPrivate(pScreen); VuidMsePtr m; if(wrappedAdjustFrame) { @@ -496,15 +499,12 @@ vuidMouseProc(DeviceIntPtr pPointer, int what) case DEVICE_INIT: #ifdef HAVE_ABSOLUTE_MOUSE_SCALING if (vuidMouseGeneration != serverGeneration) { - if ((vuidMouseScreenIndex = AllocateScreenPrivateIndex()) >= 0) { for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen); - vuidMouseScreenPrivate(pScreen) - = (pointer) pScrn->AdjustFrame; + vuidMouseSetScreenPrivate(pScreen, pScrn->AdjustFrame); pScrn->AdjustFrame = vuidMouseAdjustFrame; } - } vuidMouseGeneration = serverGeneration; } #endif diff --git a/hw/xfree86/rac/xf86RAC.c b/hw/xfree86/rac/xf86RAC.c index 8492cdb69..5302a86b2 100644 --- a/hw/xfree86/rac/xf86RAC.c +++ b/hw/xfree86/rac/xf86RAC.c @@ -39,9 +39,8 @@ pScreen->x = y;} #define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x -#define SCREEN_PROLOG(x) \ - pScreen->x = \ - ((RACScreenPtr) (pScreen)->devPrivates[RACScreenIndex].ptr)->x +#define SCREEN_PROLOG(x) pScreen->x = ((RACScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey))->x #define SCREEN_EPILOG(x,y) pScreen->x = y; #define WRAP_PICT_COND(x,y,cond) if (ps)\ @@ -50,9 +49,8 @@ ps->x = y;} #define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;} -#define PICTURE_PROLOGUE(field) \ - ps->field = \ - ((RACScreenPtr) (pScreen)->devPrivates[RACScreenIndex].ptr)->field +#define PICTURE_PROLOGUE(field) ps->field = \ + ((RACScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey))->field #define PICTURE_EPILOGUE(field, wrap) \ ps->field = wrap @@ -65,9 +63,9 @@ #define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x #define SPRITE_PROLOG miPointerScreenPtr PointPriv = \ -(miPointerScreenPtr)pScreen->devPrivates[miPointerScreenIndex].ptr;\ - RACScreenPtr pScreenPriv = \ -((RACScreenPtr) (pScreen)->devPrivates[RACScreenIndex].ptr);\ + (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); \ + RACScreenPtr pScreenPriv = \ + ((RACScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, RACScreenKey));\ PointPriv->spriteFuncs = pScreenPriv->miSprite; #define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\ PointPriv->spriteFuncs = &RACSpriteFuncs; @@ -82,7 +80,7 @@ (x)->ops = &RACGCOps;\ (x)->funcs = &RACGCFuncs; #define GC_UNWRAP(x)\ - RACGCPtr pGCPriv = (RACGCPtr) (x)->devPrivates[RACGCIndex].ptr;\ + RACGCPtr pGCPriv = (RACGCPtr)dixLookupPrivate(&(x)->devPrivates, RACGCKey);\ (x)->ops = pGCPriv->wrapOps;\ (x)->funcs = pGCPriv->wrapFuncs; @@ -255,9 +253,8 @@ static miPointerSpriteFuncRec RACSpriteFuncs = { RACSpriteMoveCursor }; -static int RACScreenIndex = -1; -static int RACGCIndex = -1; -static unsigned long RACGeneration = 0; +static DevPrivateKey RACScreenKey = &RACScreenKey; +static DevPrivateKey RACGCKey = &RACGCKey; Bool @@ -271,24 +268,17 @@ xf86RACInit(ScreenPtr pScreen, unsigned int flag) #endif pScrn = xf86Screens[pScreen->myNum]; - PointPriv = (miPointerScreenPtr)pScreen->devPrivates[miPointerScreenIndex].ptr; - + PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miPointerScreenKey); DPRINT_S("RACInit",pScreen->myNum); - if (RACGeneration != serverGeneration) { - if ( ((RACScreenIndex = AllocateScreenPrivateIndex()) < 0) || - ((RACGCIndex = AllocateGCPrivateIndex()) < 0)) - return FALSE; - RACGeneration = serverGeneration; - } - - if (!AllocateGCPrivate(pScreen, RACGCIndex, sizeof(RACGCRec))) + if (!dixRequestPrivate(RACGCKey, sizeof(RACGCRec))) return FALSE; if (!(pScreenPriv = xalloc(sizeof(RACScreenRec)))) return FALSE; - pScreen->devPrivates[RACScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, RACScreenKey, pScreenPriv); WRAP_SCREEN(CloseScreen, RACCloseScreen); WRAP_SCREEN(SaveScreen, RACSaveScreen); @@ -327,10 +317,10 @@ static Bool RACCloseScreen (int i, ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - RACScreenPtr pScreenPriv = - (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr; - miPointerScreenPtr PointPriv - = (miPointerScreenPtr)pScreen->devPrivates[miPointerScreenIndex].ptr; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); + miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, miPointerScreenKey); #ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif @@ -620,8 +610,8 @@ static void RACAdjustFrame(int index, int x, int y, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = - (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); DPRINT_S("RACAdjustFrame",index); xf86EnableAccess(xf86Screens[index]); @@ -633,8 +623,8 @@ static Bool RACSwitchMode(int index, DisplayModePtr mode, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = - (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); DPRINT_S("RACSwitchMode",index); xf86EnableAccess(xf86Screens[index]); @@ -646,8 +636,8 @@ static Bool RACEnterVT(int index, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = - (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); DPRINT_S("RACEnterVT",index); xf86EnableAccess(xf86Screens[index]); @@ -659,8 +649,8 @@ static void RACLeaveVT(int index, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = - (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); DPRINT_S("RACLeaveVT",index); xf86EnableAccess(xf86Screens[index]); @@ -672,8 +662,8 @@ static void RACFreeScreen(int index, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; - RACScreenPtr pScreenPriv = - (RACScreenPtr) pScreen->devPrivates[RACScreenIndex].ptr; + RACScreenPtr pScreenPriv = (RACScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, RACScreenKey); DPRINT_S("RACFreeScreen",index); xf86EnableAccess(xf86Screens[index]); @@ -685,7 +675,7 @@ static Bool RACCreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; - RACGCPtr pGCPriv = (RACGCPtr) (pGC)->devPrivates[RACGCIndex].ptr; + RACGCPtr pGCPriv = (RACGCPtr)dixLookupPrivate(&pGC->devPrivates, RACGCKey); Bool ret; DPRINT_S("RACCreateGC",pScreen->myNum); diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 457807698..1c2d6a869 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -8,8 +8,7 @@ #include "colormapst.h" #include "cursorstr.h" -int xf86CursorScreenIndex = -1; -static unsigned long xf86CursorGeneration = 0; +DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKey; /* sprite functions */ @@ -48,12 +47,6 @@ xf86InitCursor( xf86CursorScreenPtr ScreenPriv; miPointerScreenPtr PointPriv; - if (xf86CursorGeneration != serverGeneration) { - if ((xf86CursorScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - xf86CursorGeneration = serverGeneration; - } - if (!xf86InitHardwareCursor(pScreen, infoPtr)) return FALSE; @@ -61,7 +54,7 @@ xf86InitCursor( if (!ScreenPriv) return FALSE; - pScreen->devPrivates[xf86CursorScreenIndex].ptr = ScreenPriv; + dixSetPrivate(&pScreen->devPrivates, xf86CursorScreenKey, ScreenPriv); ScreenPriv->SWCursor = TRUE; ScreenPriv->isUp = FALSE; @@ -84,7 +77,7 @@ xf86InitCursor( ScreenPriv->PalettedCursor = TRUE; } - PointPriv = pScreen->devPrivates[miPointerScreenIndex].ptr; + PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); ScreenPriv->showTransparent = PointPriv->showTransparent; if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) @@ -113,10 +106,10 @@ static Bool xf86CursorCloseScreen(int i, ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; - miPointerScreenPtr PointPriv = - pScreen->devPrivates[miPointerScreenIndex].ptr; - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, miPointerScreenKey); + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); if (ScreenPriv->isUp && pScrn->vtSema) xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); @@ -146,8 +139,8 @@ xf86CursorQueryBestSize( unsigned short *height, ScreenPtr pScreen) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); if (class == CursorShape) { if(*width > ScreenPriv->CursorInfoPtr->MaxWidth) @@ -161,8 +154,8 @@ xf86CursorQueryBestSize( static void xf86CursorInstallColormap(ColormapPtr pMap) { - xf86CursorScreenPtr ScreenPriv = - pMap->pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pMap->pScreen->devPrivates, xf86CursorScreenKey); ScreenPriv->pInstalledMap = pMap; @@ -175,8 +168,8 @@ xf86CursorRecolorCursor( CursorPtr pCurs, Bool displayed) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); if (!displayed) return; @@ -195,8 +188,8 @@ xf86CursorEnableDisableFBAccess( Bool enable) { ScreenPtr pScreen = screenInfo.screens[index]; - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); if (!enable && ScreenPriv->CurrentCursor != NullCursor) { CursorPtr currentCursor = ScreenPriv->CurrentCursor; @@ -226,10 +219,10 @@ xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags) { Bool ret; ScreenPtr pScreen = screenInfo.screens[index]; - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; - miPointerScreenPtr PointPriv = - pScreen->devPrivates[miPointerScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); + miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, miPointerScreenKey); if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); @@ -254,8 +247,8 @@ xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags) static Bool xf86CursorRealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) pCurs->devPriv[pScreen->myNum] = NULL; @@ -266,8 +259,8 @@ xf86CursorRealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) static Bool xf86CursorUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) { xfree(pCurs->devPriv[pScreen->myNum]); @@ -280,8 +273,8 @@ xf86CursorUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) static void xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; miPointerScreenPtr PointPriv; @@ -306,8 +299,8 @@ xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) ScreenPriv->HotX = pCurs->bits->xhot; ScreenPriv->HotY = pCurs->bits->yhot; - PointPriv = pScreen->devPrivates[miPointerScreenIndex].ptr; - + PointPriv = (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miPointerScreenKey); if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || (( #ifdef ARGB_CURSOR pCurs->bits->argb && infoPtr->UseHWCursorARGB && @@ -351,8 +344,8 @@ xf86CursorSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) static void xf86CursorMoveCursor(ScreenPtr pScreen, int x, int y) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); ScreenPriv->x = x; ScreenPriv->y = y; @@ -369,8 +362,8 @@ xf86CursorMoveCursor(ScreenPtr pScreen, int x, int y) void xf86ForceHWCursor (ScreenPtr pScreen, Bool on) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); if (on) { diff --git a/hw/xfree86/ramdac/xf86CursorPriv.h b/hw/xfree86/ramdac/xf86CursorPriv.h index 472e2b06b..f82be2edc 100644 --- a/hw/xfree86/ramdac/xf86CursorPriv.h +++ b/hw/xfree86/ramdac/xf86CursorPriv.h @@ -45,6 +45,6 @@ Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); CARD32 xf86ReverseBitOrder(CARD32 data); -extern int xf86CursorScreenIndex; +extern DevPrivateKey xf86CursorScreenKey; #endif /* _XF86CURSORPRIV_H */ diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c index 91caea047..0a753be3f 100644 --- a/hw/xfree86/ramdac/xf86HWCurs.c +++ b/hw/xfree86/ramdac/xf86HWCurs.c @@ -113,8 +113,8 @@ xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr) void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; unsigned char *bits; @@ -157,8 +157,8 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) void xf86SetTransparentCursor(ScreenPtr pScreen) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; if (!ScreenPriv->transparentData) @@ -178,8 +178,8 @@ xf86SetTransparentCursor(ScreenPtr pScreen) void xf86MoveCursor(ScreenPtr pScreen, int x, int y) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; x -= infoPtr->pScrn->frameX0 + ScreenPriv->HotX; @@ -191,8 +191,8 @@ xf86MoveCursor(ScreenPtr pScreen, int x, int y) void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed) { - xf86CursorScreenPtr ScreenPriv = - pScreen->devPrivates[xf86CursorScreenIndex].ptr; + xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; #ifdef ARGB_CURSOR diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c index c1b6ed1ce..ba6e3a8ee 100644 --- a/hw/xfree86/shadowfb/shadow.c +++ b/hw/xfree86/shadowfb/shadow.c @@ -101,14 +101,13 @@ typedef struct { } ShadowGCRec, *ShadowGCPtr; -static int ShadowScreenIndex = -1; -static int ShadowGCIndex = -1; -static unsigned long ShadowGeneration = 0; +static DevPrivateKey ShadowScreenKey = &ShadowScreenKey; +static DevPrivateKey ShadowGCKey = &ShadowGCKey; #define GET_SCREEN_PRIVATE(pScreen) \ - (ShadowScreenPtr)((pScreen)->devPrivates[ShadowScreenIndex].ptr) + (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey) #define GET_GC_PRIVATE(pGC) \ - (ShadowGCPtr)((pGC)->devPrivates[ShadowGCIndex].ptr) + (ShadowGCPtr)dixLookupPrivate(&(pGC)->devPrivates, ShadowGCKey); #define SHADOW_GC_FUNC_PROLOGUE(pGC)\ ShadowGCPtr pGCPriv = GET_GC_PRIVATE(pGC);\ @@ -179,20 +178,13 @@ ShadowFBInit2 ( if(!preRefreshArea && !postRefreshArea) return FALSE; - if (ShadowGeneration != serverGeneration) { - if(((ShadowScreenIndex = AllocateScreenPrivateIndex ()) < 0) || - ((ShadowGCIndex = AllocateGCPrivateIndex()) < 0)) - return FALSE; - ShadowGeneration = serverGeneration; - } - - if(!AllocateGCPrivate(pScreen, ShadowGCIndex, sizeof(ShadowGCRec))) + if(!dixRequestPrivate(ShadowGCKey, sizeof(ShadowGCRec))) return FALSE; if(!(pPriv = (ShadowScreenPtr)xalloc(sizeof(ShadowScreenRec)))) return FALSE; - pScreen->devPrivates[ShadowScreenIndex].ptr = (pointer)pPriv; + dixSetPrivate(&pScreen->devPrivates, ShadowScreenKey, pPriv); pPriv->pScrn = pScrn; pPriv->preRefresh = preRefreshArea; diff --git a/hw/xfree86/xaa/xaaDashLine.c b/hw/xfree86/xaa/xaaDashLine.c index 1a4732baa..63233e05d 100644 --- a/hw/xfree86/xaa/xaaDashLine.c +++ b/hw/xfree86/xaa/xaaDashLine.c @@ -35,7 +35,8 @@ XAAPolyLinesDashed( #endif ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr; + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates, + XAAGetGCKey()); 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 f3434c9f4..65a482fe7 100644 --- a/hw/xfree86/xaa/xaaGC.c +++ b/hw/xfree86/xaa/xaaGC.c @@ -38,7 +38,8 @@ Bool XAACreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; - XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr); + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates, + XAAGetGCKey()); Bool ret; XAA_SCREEN_PROLOGUE(pScreen,CreateGC); diff --git a/hw/xfree86/xaa/xaaGCmisc.c b/hw/xfree86/xaa/xaaGCmisc.c index a7a3f4081..5823cc064 100644 --- a/hw/xfree86/xaa/xaaGCmisc.c +++ b/hw/xfree86/xaa/xaaGCmisc.c @@ -305,7 +305,8 @@ XAAValidatePolylines( DrawablePtr pDraw ) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr; + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates, + XAAGetGCKey()); if(pGC->lineStyle == LineSolid) changes &= ~GCDashList; if(!changes) return; diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c index 93f6995aa..614ecf751 100644 --- a/hw/xfree86/xaa/xaaInit.c +++ b/hw/xfree86/xaa/xaaInit.c @@ -38,22 +38,20 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet); static void XAAEnableDisableFBAccess (int index, Bool enable); static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask); -static int XAAScreenIndex = -1; -static int XAAGCIndex = -1; -static int XAAPixmapIndex = -1; +static DevPrivateKey XAAScreenKey = &XAAScreenKey; +static DevPrivateKey XAAGCKey = &XAAGCKey; +static DevPrivateKey XAAPixmapKey = &XAAPixmapKey; -static unsigned long XAAGeneration = 0; - -int XAAGetScreenIndex(void) { - return XAAScreenIndex; +DevPrivateKey XAAGetScreenKey(void) { + return XAAScreenKey; } -int XAAGetGCIndex(void) { - return XAAGCIndex; +DevPrivateKey XAAGetGCKey(void) { + return XAAGCKey; } -int XAAGetPixmapIndex(void) { - return XAAPixmapIndex; +DevPrivateKey XAAGetPixmapKey(void) { + return XAAPixmapKey; } /* temp kludge */ @@ -103,25 +101,16 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) if (!infoRec) return TRUE; - if (XAAGeneration != serverGeneration) { - if ( ((XAAScreenIndex = AllocateScreenPrivateIndex()) < 0) || - ((XAAGCIndex = AllocateGCPrivateIndex()) < 0) || - ((XAAPixmapIndex = AllocatePixmapPrivateIndex()) < 0)) - return FALSE; - - XAAGeneration = serverGeneration; - } - - if (!AllocateGCPrivate(pScreen, XAAGCIndex, sizeof(XAAGCRec))) + if (!dixRequestPrivate(XAAGCKey, sizeof(XAAGCRec))) return FALSE; - if (!AllocatePixmapPrivate(pScreen, XAAPixmapIndex, sizeof(XAAPixmapRec))) + if (!dixRequestPrivate(XAAPixmapKey, sizeof(XAAPixmapRec))) return FALSE; if (!(pScreenPriv = xalloc(sizeof(XAAScreenRec)))) return FALSE; - pScreen->devPrivates[XAAScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, XAAScreenKey, pScreenPriv); if(!xf86FBManagerRunning(pScreen)) infoRec->Flags &= ~(PIXMAP_CACHE | OFFSCREEN_PIXMAPS); @@ -226,7 +215,7 @@ XAACloseScreen (int i, ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XAAScreenPtr pScreenPriv = - (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr; + (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey); pScrn->EnterVT = pScreenPriv->EnterVT; pScrn->LeaveVT = pScreenPriv->LeaveVT; @@ -524,7 +513,7 @@ XAAEnterVT(int index, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; XAAScreenPtr pScreenPriv = - (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr; + (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey); return((*pScreenPriv->EnterVT)(index, flags)); } @@ -534,7 +523,7 @@ XAALeaveVT(int index, int flags) { ScreenPtr pScreen = screenInfo.screens[index]; XAAScreenPtr pScreenPriv = - (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr; + (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey); XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec; if(infoRec->NeedToSync) { @@ -557,7 +546,7 @@ XAASetDGAMode(int index, int num, DGADevicePtr devRet) ScreenPtr pScreen = screenInfo.screens[index]; XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); XAAScreenPtr pScreenPriv = - (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr; + (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey); int ret; if (!num && infoRec->dgaSaves) { /* restore old pixmap cache state */ @@ -619,7 +608,7 @@ XAAEnableDisableFBAccess (int index, Bool enable) ScreenPtr pScreen = screenInfo.screens[index]; XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); XAAScreenPtr pScreenPriv = - (XAAScreenPtr) pScreen->devPrivates[XAAScreenIndex].ptr; + (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey); if(!enable) { if((infoRec->Flags & OFFSCREEN_PIXMAPS) && (infoRec->OffscreenPixmaps)) diff --git a/hw/xfree86/xaa/xaaLineMisc.c b/hw/xfree86/xaa/xaaLineMisc.c index 537b08b97..cefb59a8e 100644 --- a/hw/xfree86/xaa/xaaLineMisc.c +++ b/hw/xfree86/xaa/xaaLineMisc.c @@ -64,7 +64,8 @@ void XAAComputeDash(GCPtr pGC) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr; + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates, + XAAGetGCKey()); Bool EvenDash = (pGC->numInDashList & 0x01) ? FALSE : TRUE; int PatternLength = 0; unsigned char* DashPtr = (unsigned char*)pGC->dash; diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c index 5897e323b..77c9cb1c9 100644 --- a/hw/xfree86/xaa/xaaOverlayDF.c +++ b/hw/xfree86/xaa/xaaOverlayDF.c @@ -152,11 +152,10 @@ typedef struct { int (*TiledFillChooser)(GCPtr); } XAAOverlayRec, *XAAOverlayPtr; -static int XAAOverlayIndex = -1; -static unsigned long XAAOverlayGeneration = 0; +static DevPrivateKey XAAOverlayKey = &XAAOverlayKey; #define GET_OVERLAY_PRIV(pScreen) \ - ((XAAOverlayPtr)((pScreen)->devPrivates[XAAOverlayIndex].ptr)) + (XAAOverlayPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAOverlayKey) #define SWITCH_DEPTH(d) \ if(pOverPriv->currentDepth != d) { \ @@ -174,18 +173,10 @@ XAAInitDualFramebufferOverlay( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); XAAOverlayPtr pOverPriv; - if (XAAOverlayGeneration != serverGeneration) { - if((XAAOverlayIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - - XAAOverlayGeneration = serverGeneration; - } - - if(!(pOverPriv = xalloc(sizeof(XAAOverlayRec)))) return FALSE; - pScreen->devPrivates[XAAOverlayIndex].ptr = (pointer)pOverPriv; + dixSetPrivate(&pScreen->devPrivates, XAAOverlayKey, pOverPriv); pOverPriv->pScrn = pScrn; pOverPriv->callback = callback; diff --git a/hw/xfree86/xaa/xaaStateChange.c b/hw/xfree86/xaa/xaaStateChange.c index 711f7791f..39ad046c5 100644 --- a/hw/xfree86/xaa/xaaStateChange.c +++ b/hw/xfree86/xaa/xaaStateChange.c @@ -276,18 +276,17 @@ typedef struct _XAAStateWrapRec { #endif } XAAStateWrapRec, *XAAStateWrapPtr; -static int XAAStateIndex = -1; -static unsigned long XAAStateGeneration = 0; +static DevPrivateKey XAAStateKey = &XAAStateKey; /* Wrap functions start here */ #define GET_STATEPRIV_GC(pGC) XAAStateWrapPtr pStatePriv =\ -(XAAStateWrapPtr)(pGC->pScreen->devPrivates[XAAStateIndex].ptr) +(XAAStateWrapPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAStateKey) #define GET_STATEPRIV_SCREEN(pScreen) XAAStateWrapPtr pStatePriv =\ -(XAAStateWrapPtr)(pScreen->devPrivates[XAAStateIndex].ptr) +(XAAStateWrapPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAStateKey) #define GET_STATEPRIV_PSCRN(pScrn) XAAStateWrapPtr pStatePriv =\ -(XAAStateWrapPtr)(pScrn->pScreen->devPrivates[XAAStateIndex].ptr) +(XAAStateWrapPtr)dixLookupPrivate(&(pScrn)->pScreen->devPrivates, XAAStateKey) #define STATE_CHECK_SP(pStatePriv) {\ ScrnInfoPtr pScrn = pStatePriv->pScrn;\ @@ -1526,12 +1525,8 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec) XAAStateWrapPtr pStatePriv; int i = 0; - if (XAAStateGeneration != serverGeneration) { - if((XAAStateIndex = AllocateScreenPrivateIndex()) < 0) return FALSE; - XAAStateGeneration = serverGeneration; - } if(!(pStatePriv = xalloc(sizeof(XAAStateWrapRec)))) return FALSE; - pScreen->devPrivates[XAAStateIndex].ptr = (pointer)pStatePriv; + dixSetPrivate(&pScreen->devPrivates, XAAStateKey, pStatePriv); pStatePriv->RestoreAccelState = infoRec->RestoreAccelState; pStatePriv->pScrn = pScrn; diff --git a/hw/xfree86/xaa/xaaWrapper.c b/hw/xfree86/xaa/xaaWrapper.c index 6d8107b61..642ef8c39 100644 --- a/hw/xfree86/xaa/xaaWrapper.c +++ b/hw/xfree86/xaa/xaaWrapper.c @@ -90,10 +90,8 @@ typedef struct { int depth; } xaaWrapperScrPrivRec, *xaaWrapperScrPrivPtr; -#define xaaWrapperGetScrPriv(s) ((xaaWrapperScrPrivPtr)( \ - (xaaWrapperScrPrivateIndex != -1) \ - ? (s)->devPrivates[xaaWrapperScrPrivateIndex].ptr\ - : NULL)) +#define xaaWrapperGetScrPriv(s) ((xaaWrapperScrPrivPtr) \ + dixLookupPrivate(&(s)->devPrivates, xaaWrapperScrPrivateKey)) #define xaaWrapperScrPriv(s) xaaWrapperScrPrivPtr pScrPriv = xaaWrapperGetScrPriv(s) #define wrap(priv,real,mem,func) {\ @@ -131,13 +129,12 @@ typedef struct _xaaWrapperGCPriv { } xaaWrapperGCPrivRec, *xaaWrapperGCPrivPtr; #define xaaWrapperGetGCPriv(pGC) ((xaaWrapperGCPrivPtr) \ - (pGC)->devPrivates[xaaWrapperGCPrivateIndex].ptr) + dixLookupPrivate(&(pGC)->devPrivates, xaaWrapperGCPrivateKey)) #define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC) -static int xaaWrapperScrPrivateIndex = -1; -static int xaaWrapperGCPrivateIndex = -1; -static int xaaWrapperGeneration = -1; +static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKey; +static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKey; static Bool xaaWrapperCreateScreenResources(ScreenPtr pScreen) @@ -305,18 +302,8 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f #ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif - if (xaaWrapperGeneration != serverGeneration) { - xaaWrapperScrPrivateIndex = AllocateScreenPrivateIndex (); - if (xaaWrapperScrPrivateIndex == -1) - return FALSE; - xaaWrapperGCPrivateIndex = AllocateGCPrivateIndex (); - if (xaaWrapperGCPrivateIndex == -1) - return FALSE; - xaaWrapperGeneration = serverGeneration; - } - if (!AllocateGCPrivate (pScreen, xaaWrapperGCPrivateIndex, - sizeof (xaaWrapperGCPrivRec))) + if (!dixRequestPrivate(xaaWrapperGCPrivateKey, sizeof(xaaWrapperGCPrivRec))) return FALSE; pScrPriv = (xaaWrapperScrPrivPtr) xalloc (sizeof (xaaWrapperScrPrivRec)); @@ -370,7 +357,7 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f } #endif pScrPriv->depth = depth; - pScreen->devPrivates[xaaWrapperScrPrivateIndex].ptr = (pointer) pScrPriv; + dixSetPrivate(&pScreen->devPrivates, xaaWrapperScrPrivateKey, pScrPriv); *func = XAASync; @@ -521,8 +508,8 @@ xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, void XAASync(ScreenPtr pScreen) { - XAAScreenPtr pScreenPriv = - (XAAScreenPtr) pScreen->devPrivates[XAAGetScreenIndex()].ptr; + XAAScreenPtr pScreenPriv = (XAAScreenPtr) + dixLookupPrivate(&pScreen->devPrivates, XAAGetScreenKey()); XAAInfoRecPtr infoRec = pScreenPriv->AccelInfoRec; if(infoRec->NeedToSync) { diff --git a/hw/xfree86/xaa/xaalocal.h b/hw/xfree86/xaa/xaalocal.h index 3ddea241c..1e536c1fa 100644 --- a/hw/xfree86/xaa/xaalocal.h +++ b/hw/xfree86/xaa/xaalocal.h @@ -1639,9 +1639,9 @@ XAAGetPixelFromRGBA ( extern GCOps XAAFallbackOps; extern GCOps *XAAGetFallbackOps(void); extern GCFuncs XAAGCFuncs; -extern int XAAGetScreenIndex(void); -extern int XAAGetGCIndex(void); -extern int XAAGetPixmapIndex(void); +extern DevPrivateKey XAAGetScreenKey(void); +extern DevPrivateKey XAAGetGCKey(void); +extern DevPrivateKey XAAGetPixmapKey(void); extern unsigned int XAAShiftMasks[32]; @@ -1650,28 +1650,28 @@ extern unsigned int byte_expand3[256], byte_reversed_expand3[256]; CARD32 XAAReverseBitOrder(CARD32 data); #define GET_XAASCREENPTR_FROM_SCREEN(pScreen)\ - (pScreen)->devPrivates[XAAGetScreenIndex()].ptr + dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()) #define GET_XAASCREENPTR_FROM_GC(pGC)\ - (pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr + dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()) #define GET_XAASCREENPTR_FROM_DRAWABLE(pDraw)\ - (pDraw)->pScreen->devPrivates[XAAGetScreenIndex()].ptr + dixLookupPrivate(&(pDraw)->pScreen->devPrivates, XAAGetScreenKey()) #define GET_XAAINFORECPTR_FROM_SCREEN(pScreen)\ - ((XAAScreenPtr)((pScreen)->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec +((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->AccelInfoRec #define GET_XAAINFORECPTR_FROM_GC(pGC)\ -((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec +((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec #define GET_XAAINFORECPTR_FROM_DRAWABLE(pDraw)\ -((XAAScreenPtr)((pDraw)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec +((XAAScreenPtr)dixLookupPrivate(&(pDraw)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec #define GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn)\ -((XAAScreenPtr)((pScrn)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec +((XAAScreenPtr)dixLookupPrivate(&(pScrn)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec #define XAA_GET_PIXMAP_PRIVATE(pix)\ - (XAAPixmapPtr)((pix)->devPrivates[XAAGetPixmapIndex()].ptr) + (XAAPixmapPtr)dixLookupPrivate(&(pix)->devPrivates, XAAGetPixmapKey()) #define CHECK_RGB_EQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff)) diff --git a/hw/xfree86/xaa/xaawrap.h b/hw/xfree86/xaa/xaawrap.h index 32c17a60c..38c97d70b 100644 --- a/hw/xfree86/xaa/xaawrap.h +++ b/hw/xfree86/xaa/xaawrap.h @@ -1,14 +1,14 @@ #define XAA_SCREEN_PROLOGUE(pScreen, field)\ ((pScreen)->field = \ - ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field) + ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field) #define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\ ((pScreen)->field = wrapper) #define XAA_GC_FUNC_PROLOGUE(pGC)\ - XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;\ + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ (pGC)->funcs = pGCPriv->wrapFuncs;\ if(pGCPriv->flags)\ (pGC)->ops = pGCPriv->wrapOps @@ -24,13 +24,13 @@ #define XAA_GC_OP_PROLOGUE(pGC)\ - XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\ + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ GCFuncs *oldFuncs = pGC->funcs;\ pGC->funcs = pGCPriv->wrapFuncs;\ pGC->ops = pGCPriv->wrapOps #define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\ - XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\ + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ GCFuncs *oldFuncs = pGC->funcs;\ if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \ pGC->funcs = pGCPriv->wrapFuncs;\ @@ -44,7 +44,7 @@ #define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\ - XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\ + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\ GCFuncs *oldFuncs = pGC->funcs;\ pGC->funcs = pGCPriv->wrapFuncs;\ @@ -64,7 +64,7 @@ #ifdef RENDER #define XAA_RENDER_PROLOGUE(pScreen,field)\ (GetPictureScreen(pScreen)->field = \ - ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field) + ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field) #define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\ (GetPictureScreen(pScreen)->field = wrapper) @@ -74,7 +74,7 @@ #define SYNC_CHECK(pGC) {\ XAAInfoRecPtr infoRec =\ -((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec;\ +((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \ if(infoRec->NeedToSync) {\ (*infoRec->Sync)(infoRec->pScrn);\ infoRec->NeedToSync = FALSE;\ diff --git a/hw/xfree86/xf4bpp/mfbfillarc.c b/hw/xfree86/xf4bpp/mfbfillarc.c index d5b5372f5..89aeadd2b 100644 --- a/hw/xfree86/xf4bpp/mfbfillarc.c +++ b/hw/xfree86/xf4bpp/mfbfillarc.c @@ -253,7 +253,8 @@ xf4bppPolyFillArcSolid mfbPrivGC *priv; int rop; - priv = (mfbPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr; + priv = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); rop = priv->rop; if ((rop == RROP_NOP) || !(pGC->planemask & 1)) #else diff --git a/hw/xfree86/xf4bpp/mfbimggblt.c b/hw/xfree86/xf4bpp/mfbimggblt.c index bf53f4ce9..711a16ee5 100644 --- a/hw/xfree86/xf4bpp/mfbimggblt.c +++ b/hw/xfree86/xf4bpp/mfbimggblt.c @@ -149,7 +149,8 @@ xf4bppImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) backrect.height = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); - pPrivGC = pGC->devPrivates[mfbGetGCPrivateIndex()].ptr; + pPrivGC = (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); oldfillStyle = pPrivGC->colorRrop.fillStyle; /* GJA */ oldfg = pPrivGC->colorRrop.fgPixel; /* GJA */ oldalu = pPrivGC->colorRrop.alu; /* GJA */ diff --git a/hw/xfree86/xf4bpp/mfbzerarc.c b/hw/xfree86/xf4bpp/mfbzerarc.c index c7a8c4d56..61fc7b184 100644 --- a/hw/xfree86/xf4bpp/mfbzerarc.c +++ b/hw/xfree86/xf4bpp/mfbzerarc.c @@ -108,7 +108,8 @@ v16ZeroArcSS int pmask; register int *paddr; - if (((mfbPrivGC *)(pGC->devPrivates[mfbGetGCPrivateIndex()].ptr))->rop == + if (((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()))->rop == RROP_BLACK) pixel = 0; else diff --git a/hw/xfree86/xf4bpp/ppcArea.c b/hw/xfree86/xf4bpp/ppcArea.c index e95696260..df7856a35 100644 --- a/hw/xfree86/xf4bpp/ppcArea.c +++ b/hw/xfree86/xf4bpp/ppcArea.c @@ -49,7 +49,7 @@ int alu ; unsigned long int fg, bg, pm ; int xSrc, ySrc ; PixmapPtr pPixmap ; -ppcPrivGC *pPrivGC = pGC->devPrivates[mfbGetGCPrivateIndex()].ptr; +ppcPrivGC *pPrivGC = dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()); TRACE( ( "xf4bppFillArea(0x%x,%d,0x%x,0x%x)\n", pWin, nboxes, pBox, pGC ) ) ; diff --git a/hw/xfree86/xf4bpp/ppcGC.c b/hw/xfree86/xf4bpp/ppcGC.c index b59dab312..ca3c5e984 100644 --- a/hw/xfree86/xf4bpp/ppcGC.c +++ b/hw/xfree86/xf4bpp/ppcGC.c @@ -183,7 +183,7 @@ register GCPtr pGC ; * a pointer to a ppcPrivGC in its slot. */ *pPriv = vgaPrototypeGCPriv; - (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr) = (pointer) pPriv; + dixSetPrivate(&pGC->devPrivates, mfbGetGCPrivateKey(), pPriv); /* Set the vgaGCOps */ *pOps = vgaGCOps; @@ -209,7 +209,7 @@ xf4bppDestroyGC( pGC ) if ( pGC->freeCompClip && pGC->pCompositeClip ) REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); if(pGC->ops->devPrivate.val) xfree( pGC->ops ); - xfree( pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ; + xfree(dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey())); return ; } @@ -220,7 +220,7 @@ ppcChangePixmapGC register Mask changes ) { -register ppcPrivGCPtr devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ; +register ppcPrivGCPtr devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()); register unsigned long int idx ; /* used for stepping through bitfields */ #define LOWBIT( x ) ( x & - x ) /* Two's complement */ @@ -298,8 +298,8 @@ xf4bppValidateGC( pGC, changes, pDrawable ) register ppcPrivGCPtr devPriv ; WindowPtr pWin ; - devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ; - + devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); if ( pDrawable->type != devPriv->lastDrawableType ) { devPriv->lastDrawableType = pDrawable->type ; xf4bppChangeGCtype( pGC, devPriv ) ; diff --git a/hw/xfree86/xf4bpp/ppcIO.c b/hw/xfree86/xf4bpp/ppcIO.c index 8d726e758..bd20218d3 100644 --- a/hw/xfree86/xf4bpp/ppcIO.c +++ b/hw/xfree86/xf4bpp/ppcIO.c @@ -219,7 +219,7 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width ) pScreen-> ResolveColor = xf4bppResolveColor; mfbFillInScreen(pScreen); - if (!mfbAllocatePrivates(pScreen, (int*)NULL, (int*)NULL)) + if (!mfbAllocatePrivates(pScreen, NULL, NULL)) return FALSE; if (!miScreenInit(pScreen, pbits, virtx, virty, dpix, dpiy, width, diff --git a/hw/xfree86/xf4bpp/ppcPixFS.c b/hw/xfree86/xf4bpp/ppcPixFS.c index f24168bb0..91b753255 100644 --- a/hw/xfree86/xf4bpp/ppcPixFS.c +++ b/hw/xfree86/xf4bpp/ppcPixFS.c @@ -124,7 +124,7 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) return ; } - if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop ) + if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()))->colorRrop.alu ) == GXnoop ) return ; n = nInit * miFindMaxBand(pGC->pCompositeClip) ; @@ -142,8 +142,8 @@ xf4bppSolidPixmapFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit, ppt, pwidth, fSorted ) ; - pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ; - fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ; + pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; + fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ; for ( ; n-- ; ppt++, pwidth++ ) { @@ -258,14 +258,14 @@ int fSorted ; return ; } - if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop ) + if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) return ; SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, pptFree, pwidth, ppt, fSorted ) ; - pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ; - fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ; + pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; + fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; pTile = pGC->stipple ; tlwidth = pTile->devKind ; @@ -356,15 +356,15 @@ int fSorted ; return ; } - if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop ) + if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) return ; SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, pptFree, pwidth, ppt, fSorted ) ; - fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ; - bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.bgPixel ; - pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ; + fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; + bg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.bgPixel ; + pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ; pTile = pGC->stipple ; @@ -459,14 +459,14 @@ int fSorted ; return ; } - if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop ) + if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) return ; SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, pptFree, pwidth, ppt, fSorted ) ; /* the following code is for 8 bits per pixel addressable memory only */ - pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ; + pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; npm = ( ~ pm ) & ( ( 1 << pDrawable->depth ) - 1 ) ; pTile = pGC->tile.pixmap ; tileWidth = pTile->drawable.width ; diff --git a/hw/xfree86/xf4bpp/ppcPixmap.c b/hw/xfree86/xf4bpp/ppcPixmap.c index ec181cfaf..2079e2ee6 100644 --- a/hw/xfree86/xf4bpp/ppcPixmap.c +++ b/hw/xfree86/xf4bpp/ppcPixmap.c @@ -137,6 +137,7 @@ xf4bppCopyPixmap(pSrc) pDst = xalloc(sizeof(PixmapRec) + size); if (!pDst) return NullPixmap; + pDst->devPrivates = NULL; pDst->drawable = pSrc->drawable; pDst->drawable.id = 0; pDst->drawable.serialNumber = NEXT_SERIAL_NUMBER; diff --git a/hw/xfree86/xf4bpp/ppcPntWin.c b/hw/xfree86/xf4bpp/ppcPntWin.c index 5d7a07e12..482b34b5d 100644 --- a/hw/xfree86/xf4bpp/ppcPntWin.c +++ b/hw/xfree86/xf4bpp/ppcPntWin.c @@ -100,7 +100,7 @@ xf4bppPaintWindow(pWin, pRegion, what) { register mfbPrivWin *pPrivWin; - pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbGetWindowPrivateIndex()].ptr); + pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, mfbGetWindowPrivateKey()); TRACE(("xf4bppPaintWindow( pWin= 0x%x, pRegion= 0x%x, what= %d )\n", pWin,pRegion,what)); diff --git a/hw/xfree86/xf4bpp/ppcPolyPnt.c b/hw/xfree86/xf4bpp/ppcPolyPnt.c index 1d6905563..c61fd6d26 100644 --- a/hw/xfree86/xf4bpp/ppcPolyPnt.c +++ b/hw/xfree86/xf4bpp/ppcPolyPnt.c @@ -102,7 +102,7 @@ if ( pDrawable->type == DRAWABLE_PIXMAP ) { return ; } -devPriv = (ppcPrivGC *) ( pGC->devPrivates[mfbGetGCPrivateIndex()].ptr ) ; +devPriv = (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()); if ( ( alu = devPriv->colorRrop.alu ) == GXnoop ) return ; diff --git a/hw/xfree86/xf4bpp/ppcWinFS.c b/hw/xfree86/xf4bpp/ppcWinFS.c index e19ce0d40..982bf424c 100644 --- a/hw/xfree86/xf4bpp/ppcWinFS.c +++ b/hw/xfree86/xf4bpp/ppcWinFS.c @@ -96,7 +96,7 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) return ; } - if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop ) + if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) return ; n = nInit * miFindMaxBand( pGC->pCompositeClip ) ; @@ -114,8 +114,8 @@ xf4bppSolidWindowFS( pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) n = miClipSpans( pGC->pCompositeClip, pptInit, pwidthInit, nInit, ppt, pwidth, fSorted ) ; - pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ; - fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ; + pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; + fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; for ( ; n-- ; ppt++, pwidth++ ) if ( *pwidth ) @@ -163,14 +163,14 @@ int fSorted ; return ; } - if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop ) + if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) return ; SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, pptFree, pwidth, ppt, fSorted ) ; - pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ; - fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ; + pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; + fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; xSrc = pGC->patOrg.x + pDrawable->x ; ySrc = pGC->patOrg.y + pDrawable->y ; @@ -215,15 +215,15 @@ int fSorted ; return ; } - if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop ) + if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) return ; SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, pptFree, pwidth, ppt, fSorted ) ; - pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ; - fg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.fgPixel ; - bg = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.bgPixel ; + pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; + fg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.fgPixel ; + bg = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.bgPixel ; xSrc = pGC->patOrg.x + pDrawable->x ; ySrc = pGC->patOrg.y + pDrawable->y ; @@ -260,7 +260,7 @@ int fSorted ; TRACE( ( "xf4bppTileWindowFS(pDrawable=0x%x,pGC=0x%x,nInit=%d,pptInit=0x%x,pwidthInit=0x%x,fSorted=%d)\n", pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted ) ) ; - if ( ( alu = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.alu ) == GXnoop ) + if ( ( alu = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.alu ) == GXnoop ) return ; SETSPANPTRS( nInit, n, pwidthInit, pwidthFree, pptInit, @@ -268,7 +268,7 @@ int fSorted ; xSrc = pGC->patOrg.x + pDrawable->x ; ySrc = pGC->patOrg.y + pDrawable->y ; - pm = ( (ppcPrivGC *) pGC->devPrivates[mfbGetGCPrivateIndex()].ptr )->colorRrop.planemask ; + pm = ( (ppcPrivGC *)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()) )->colorRrop.planemask ; for ( ; n-- ; ppt++, pwidth++ ) xf4bppTileRect( (WindowPtr)pDrawable, pGC->tile.pixmap, alu, pm, diff --git a/hw/xfree86/xf4bpp/ppcWindow.c b/hw/xfree86/xf4bpp/ppcWindow.c index 01768d9ff..055466738 100644 --- a/hw/xfree86/xf4bpp/ppcWindow.c +++ b/hw/xfree86/xf4bpp/ppcWindow.c @@ -218,7 +218,7 @@ register WindowPtr pWin ; TRACE(("xf4bppCreateWindowForXYhardware (pWin= 0x%x)\n", pWin)); - pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbGetWindowPrivateIndex()].ptr); + pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, mfbGetWindowPrivateKey()); pPrivWin->pRotatedBorder = NullPixmap; pPrivWin->pRotatedBackground = NullPixmap; pPrivWin->fastBackground = 0; diff --git a/hw/xfree86/xf4bpp/vgaGC.c b/hw/xfree86/xf4bpp/vgaGC.c index 5a8604090..6495e5638 100644 --- a/hw/xfree86/xf4bpp/vgaGC.c +++ b/hw/xfree86/xf4bpp/vgaGC.c @@ -107,7 +107,7 @@ xf4bppChangeWindowGC( pGC, changes ) register GC *pGC ; register Mask changes ; { -register ppcPrivGCPtr devPriv = (ppcPrivGCPtr) (pGC->devPrivates[mfbGetGCPrivateIndex()].ptr) ; +register ppcPrivGCPtr devPriv = (ppcPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, mfbGetGCPrivateKey()); register unsigned long int idx ; /* used for stepping through bitfields */ #define LOWBIT( x ) ( x & - x ) /* Two's complement */ diff --git a/hw/xfree86/xf8_32bpp/cfb8_32.h b/hw/xfree86/xf8_32bpp/cfb8_32.h index 31028a30b..281e5f2e0 100644 --- a/hw/xfree86/xf8_32bpp/cfb8_32.h +++ b/hw/xfree86/xf8_32bpp/cfb8_32.h @@ -22,10 +22,8 @@ typedef struct { } cfb8_32ScreenRec, *cfb8_32ScreenPtr; -extern int cfb8_32GCPrivateIndex; /* XXX */ -extern int cfb8_32GetGCPrivateIndex(void); -extern int cfb8_32ScreenPrivateIndex; /* XXX */ -extern int cfb8_32GetScreenPrivateIndex(void); +extern DevPrivateKey cfb8_32GetGCPrivateKey(void); +extern DevPrivateKey cfb8_32GetScreenPrivateKey(void); RegionPtr cfb8_32CopyArea( @@ -198,11 +196,11 @@ cfb8_32ChangeWindowAttributes( ); -#define CFB8_32_GET_GC_PRIVATE(pGC)\ - (cfb8_32GCPtr)((pGC)->devPrivates[cfb8_32GetGCPrivateIndex()].ptr) +#define CFB8_32_GET_GC_PRIVATE(pGC) ((cfb8_32GCPtr) \ + dixLookupPrivate(&(pGC)->devPrivates, cfb8_32GetGCPrivateKey())) -#define CFB8_32_GET_SCREEN_PRIVATE(pScreen)\ - (cfb8_32ScreenPtr)((pScreen)->devPrivates[cfb8_32GetScreenPrivateIndex()].ptr) +#define CFB8_32_GET_SCREEN_PRIVATE(pScreen) ((cfb8_32ScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, cfb8_32GetScreenPrivateKey())) Bool xf86Overlay8Plus32Init (ScreenPtr pScreen); diff --git a/hw/xfree86/xf8_32bpp/cfbscrinit.c b/hw/xfree86/xf8_32bpp/cfbscrinit.c index 29dc6691f..fffd8d392 100644 --- a/hw/xfree86/xf8_32bpp/cfbscrinit.c +++ b/hw/xfree86/xf8_32bpp/cfbscrinit.c @@ -31,42 +31,41 @@ /* CAUTION: We require that cfb8 and cfb32 were NOT compiled with CFB_NEED_SCREEN_PRIVATE */ -int cfb8_32GCPrivateIndex; -int cfb8_32GetGCPrivateIndex(void) { return cfb8_32GCPrivateIndex; } -int cfb8_32ScreenPrivateIndex; -int cfb8_32GetScreenPrivateIndex(void) { return cfb8_32ScreenPrivateIndex; } -static unsigned long cfb8_32Generation = 0; +static DevPrivateKey cfb8_32GCPrivateKey = &cfb8_32GCPrivateKey; +DevPrivateKey cfb8_32GetGCPrivateKey(void) +{ + return cfb8_32GCPrivateKey; +} + +static DevPrivateKey cfb8_32ScreenPrivateKey = &cfb8_32ScreenPrivateKey; +DevPrivateKey cfb8_32GetScreenPrivateKey(void) +{ + return cfb8_32ScreenPrivateKey; +} static Bool cfb8_32AllocatePrivates(ScreenPtr pScreen) { cfb8_32ScreenPtr pScreenPriv; - if(cfb8_32Generation != serverGeneration) { - if(((cfb8_32GCPrivateIndex = AllocateGCPrivateIndex()) < 0) || - ((cfb8_32ScreenPrivateIndex = AllocateScreenPrivateIndex()) < 0)) - return FALSE; - cfb8_32Generation = serverGeneration; - } - if (!(pScreenPriv = xalloc(sizeof(cfb8_32ScreenRec)))) return FALSE; - pScreen->devPrivates[cfb8_32ScreenPrivateIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, cfb8_32ScreenPrivateKey, pScreenPriv); /* All cfb will have the same GC and Window private indicies */ - if(!mfbAllocatePrivates(pScreen,&cfbWindowPrivateIndex, &cfbGCPrivateIndex)) + if(!mfbAllocatePrivates(pScreen, &cfbWindowPrivateKey, &cfbGCPrivateKey)) return FALSE; /* The cfb indicies are the mfb indicies. Reallocating them resizes them */ - if(!AllocateWindowPrivate(pScreen,cfbWindowPrivateIndex,sizeof(cfbPrivWin))) + if(!dixRequestPrivate(cfbWindowPrivateKey, sizeof(cfbPrivWin))) return FALSE; - if(!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) + if(!dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC))) return FALSE; - if(!AllocateGCPrivate(pScreen, cfb8_32GCPrivateIndex, sizeof(cfb8_32GCRec))) + if(!dixRequestPrivate(cfb8_32GCPrivateKey, sizeof(cfb8_32GCRec))) return FALSE; return TRUE; @@ -166,7 +165,7 @@ cfb8_32CloseScreen (int i, ScreenPtr pScreen) xfree(pScreenPriv->visualData); xfree((pointer) pScreenPriv); - pScreen->devPrivates[cfb8_32ScreenPrivateIndex].ptr = NULL; + dixSetPrivate(&pScreen->devPrivates, cfb8_32ScreenPrivateKey, NULL); return(cfb32CloseScreen(i, pScreen)); } diff --git a/hw/xfree86/xf8_32bpp/xf86overlay.c b/hw/xfree86/xf8_32bpp/xf86overlay.c index c5585ca6d..bab014b8c 100644 --- a/hw/xfree86/xf8_32bpp/xf86overlay.c +++ b/hw/xfree86/xf8_32bpp/xf86overlay.c @@ -180,23 +180,22 @@ typedef struct { } OverlayPixmapRec, *OverlayPixmapPtr; -static int OverlayScreenIndex = -1; -static int OverlayGCIndex = -1; -static int OverlayPixmapIndex = -1; -static unsigned long OverlayGeneration = 0; +static DevPrivateKey OverlayScreenKey = &OverlayScreenKey; +static DevPrivateKey OverlayGCKey = &OverlayGCKey; +static DevPrivateKey OverlayPixmapKey = &OverlayPixmapKey; /** Macros **/ #define TILE_EXISTS(pGC) (!(pGC)->tileIsPixel && (pGC)->tile.pixmap) -#define OVERLAY_GET_PIXMAP_PRIVATE(pPix) \ - (OverlayPixmapPtr)((pPix)->devPrivates[OverlayPixmapIndex].ptr) +#define OVERLAY_GET_PIXMAP_PRIVATE(pPix) ((OverlayPixmapPtr) \ + dixLookupPrivate(&(pPix)->devPrivates, OverlayPixmapKey)) -#define OVERLAY_GET_SCREEN_PRIVATE(pScreen) \ - (OverlayScreenPtr)((pScreen)->devPrivates[OverlayScreenIndex].ptr) +#define OVERLAY_GET_SCREEN_PRIVATE(pScreen) ((OverlayScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, OverlayScreenKey)) -#define OVERLAY_GET_GC_PRIVATE(pGC) \ - (OverlayGCPtr)((pGC)->devPrivates[OverlayGCIndex].ptr) +#define OVERLAY_GET_GC_PRIVATE(pGC) ((OverlayGCPtr) \ + dixLookupPrivate(&(pGC)->devPrivates, OverlayGCKey)) #define OVERLAY_GC_FUNC_PROLOGUE(pGC)\ OverlayGCPtr pGCPriv = OVERLAY_GET_GC_PRIVATE(pGC);\ @@ -258,26 +257,16 @@ xf86Overlay8Plus32Init (ScreenPtr pScreen) { OverlayScreenPtr pScreenPriv; - if(OverlayGeneration != serverGeneration) { - if(((OverlayScreenIndex = AllocateScreenPrivateIndex()) < 0) || - ((OverlayGCIndex = AllocateGCPrivateIndex()) < 0) || - ((OverlayPixmapIndex = AllocatePixmapPrivateIndex()) < 0)) - return FALSE; - - OverlayGeneration = serverGeneration; - } - - if (!AllocateGCPrivate(pScreen, OverlayGCIndex, sizeof(OverlayGCRec))) + if (!dixRequestPrivate(OverlayGCKey, sizeof(OverlayGCRec))) return FALSE; - if (!AllocatePixmapPrivate(pScreen, OverlayPixmapIndex, - sizeof(OverlayPixmapRec))) + if (!dixRequestPrivate(OverlayPixmapKey, sizeof(OverlayPixmapRec))) return FALSE; if (!(pScreenPriv = xalloc(sizeof(OverlayScreenRec)))) return FALSE; - pScreen->devPrivates[OverlayScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, OverlayScreenKey, pScreenPriv); pScreenPriv->CreateGC = pScreen->CreateGC; pScreenPriv->CloseScreen = pScreen->CloseScreen; diff --git a/hw/xgl/egl/xegl.c b/hw/xgl/egl/xegl.c index c671dbe7c..1cf615bb6 100644 --- a/hw/xgl/egl/xegl.c +++ b/hw/xgl/egl/xegl.c @@ -42,14 +42,13 @@ #define XEGL_DEFAULT_SCREEN_WIDTH 800 #define XEGL_DEFAULT_SCREEN_HEIGHT 600 -int xeglScreenGeneration = -1; -int xeglScreenPrivateIndex; +DevPrivateKey xeglScreenPrivateKey = &xeglScreenPrivateKey; -#define XEGL_GET_SCREEN_PRIV(pScreen) \ - ((xeglScreenPtr) (pScreen)->devPrivates[xeglScreenPrivateIndex].ptr) +#define XEGL_GET_SCREEN_PRIV(pScreen) ((xeglScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, xeglScreenPrivateKey)) -#define XEGL_SET_SCREEN_PRIV(pScreen, v) \ - ((pScreen)->devPrivates[xeglScreenPrivateIndex].ptr = (pointer) v) +#define XEGL_SET_SCREEN_PRIV(pScreen, v) \ + dixSetPrivate(&(pScreen)->devPrivates, xeglScreenPrivateKey, v) #define XEGL_SCREEN_PRIV(pScreen) \ xeglScreenPtr pScreenPriv = XEGL_GET_SCREEN_PRIV (pScreen) @@ -66,15 +65,6 @@ xeglAllocatePrivates (ScreenPtr pScreen) { xeglScreenPtr pScreenPriv; - if (xeglScreenGeneration != serverGeneration) - { - xeglScreenPrivateIndex = AllocateScreenPrivateIndex (); - if (xeglScreenPrivateIndex < 0) - return FALSE; - - xeglScreenGeneration = serverGeneration; - } - pScreenPriv = xalloc (sizeof (xeglScreenRec)); if (!pScreenPriv) return FALSE; diff --git a/hw/xgl/egl/xegl.h b/hw/xgl/egl/xegl.h index be9b48c9c..0a07397bf 100644 --- a/hw/xgl/egl/xegl.h +++ b/hw/xgl/egl/xegl.h @@ -109,7 +109,7 @@ extern KdMouseInfo *kdMouseInfo; extern KdOsFuncs *kdOsFuncs; extern Bool kdDontZap; extern Bool kdDisableZaphod; -extern int xeglScreenPrivateIndex; +extern DevPrivateKey xeglScreenPrivateKey; extern KdMouseFuncs LinuxEvdevMouseFuncs; extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs; @@ -117,8 +117,8 @@ extern KdKeyboardFuncs LinuxEvdevKeyboardFuncs; (RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270) #define RR_Reflect_All (RR_Reflect_X | RR_Reflect_Y) -#define KdGetScreenPriv(pScreen) \ - ((xeglScreenPtr) ((pScreen)->devPrivates[xeglScreenPrivateIndex].ptr)) +#define KdGetScreenPriv(pScreen) ((xeglScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, xeglScreenPrivateKey)) #define KdScreenPriv(pScreen) \ xeglScreenPtr pScreenPriv = KdGetScreenPriv (pScreen) diff --git a/hw/xgl/glx/xglx.c b/hw/xgl/glx/xglx.c index 92974f0d4..657afc075 100644 --- a/hw/xgl/glx/xglx.c +++ b/hw/xgl/glx/xglx.c @@ -105,14 +105,13 @@ typedef struct _xglxScreen { CloseScreenProcPtr CloseScreen; } xglxScreenRec, *xglxScreenPtr; -int xglxScreenGeneration = -1; -int xglxScreenPrivateIndex; +DevPrivateKey xglxScreenPrivateKey = &xglxScreenPrivateKey; -#define XGLX_GET_SCREEN_PRIV(pScreen) \ - ((xglxScreenPtr) (pScreen)->devPrivates[xglxScreenPrivateIndex].ptr) +#define XGLX_GET_SCREEN_PRIV(pScreen) ((xglxScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, xglxScreenPrivateKey)) -#define XGLX_SET_SCREEN_PRIV(pScreen, v) \ - ((pScreen)->devPrivates[xglxScreenPrivateIndex].ptr = (pointer) v) +#define XGLX_SET_SCREEN_PRIV(pScreen, v) \ + dixSetPrivate(&(pScreen)->devPrivates, xglxScreenPrivateKey, v) #define XGLX_SCREEN_PRIV(pScreen) \ xglxScreenPtr pScreenPriv = XGLX_GET_SCREEN_PRIV (pScreen) @@ -148,15 +147,6 @@ xglxAllocatePrivates (ScreenPtr pScreen) { xglxScreenPtr pScreenPriv; - if (xglxScreenGeneration != serverGeneration) - { - xglxScreenPrivateIndex = AllocateScreenPrivateIndex (); - if (xglxScreenPrivateIndex < 0) - return FALSE; - - xglxScreenGeneration = serverGeneration; - } - pScreenPriv = xalloc (sizeof (xglxScreenRec)); if (!pScreenPriv) return FALSE; diff --git a/hw/xgl/xgl.h b/hw/xgl/xgl.h index 5710bbf5a..ea28ea11d 100644 --- a/hw/xgl/xgl.h +++ b/hw/xgl/xgl.h @@ -224,10 +224,11 @@ typedef struct _xglGlyph { xglAreaPtr pArea; } xglGlyphRec, *xglGlyphPtr; -extern int xglGlyphPrivateIndex; +extern DevPrivateKey xglGlyphPrivateKey; #define XGL_GET_GLYPH_PRIV(pScreen, pGlyph) ((xglGlyphPtr) \ - (GetGlyphPrivatesForScreen (pGlyph, pScreen))[xglGlyphPrivateIndex].ptr) + dixLookupPrivate(GetGlyphPrivatesForScreen (pGlyph, pScreen), \ + xglGlyphPrivateKey)) #define XGL_GLYPH_PRIV(pScreen, pGlyph) \ xglGlyphPtr pGlyphPriv = XGL_GET_GLYPH_PRIV (pScreen, pGlyph) @@ -295,13 +296,13 @@ typedef struct _xglScreen { #endif } xglScreenRec, *xglScreenPtr; -extern int xglScreenPrivateIndex; +extern DevPrivateKey xglScreenPrivateKey; -#define XGL_GET_SCREEN_PRIV(pScreen) \ - ((xglScreenPtr) (pScreen)->devPrivates[xglScreenPrivateIndex].ptr) +#define XGL_GET_SCREEN_PRIV(pScreen) ((xglScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, xglScreenPrivateKey)) -#define XGL_SET_SCREEN_PRIV(pScreen, v) \ - ((pScreen)->devPrivates[xglScreenPrivateIndex].ptr = (pointer) v) +#define XGL_SET_SCREEN_PRIV(pScreen, v) \ + dixSetPrivate(&(pScreen)->devPrivates, xglScreenPrivateKey, v) #define XGL_SCREEN_PRIV(pScreen) \ xglScreenPtr pScreenPriv = XGL_GET_SCREEN_PRIV (pScreen) @@ -336,10 +337,10 @@ typedef struct _xglGC { GCOpsPtr ops; } xglGCRec, *xglGCPtr; -extern int xglGCPrivateIndex; +extern DevPrivateKey xglGCPrivateKey; -#define XGL_GET_GC_PRIV(pGC) \ - ((xglGCPtr) (pGC)->devPrivates[xglGCPrivateIndex].ptr) +#define XGL_GET_GC_PRIV(pGC) ((xglGCPtr) \ + dixLookupPrivate(&(pGC)->devPrivates, xglGCPrivateKey)) #define XGL_GC_PRIV(pGC) \ xglGCPtr pGCPriv = XGL_GET_GC_PRIV (pGC) @@ -396,10 +397,10 @@ typedef struct _xglPixmap { } xglPixmapRec, *xglPixmapPtr; -extern int xglPixmapPrivateIndex; +extern DevPrivateKey xglPixmapPrivateKey; -#define XGL_GET_PIXMAP_PRIV(pPixmap) \ - ((xglPixmapPtr) (pPixmap)->devPrivates[xglPixmapPrivateIndex].ptr) +#define XGL_GET_PIXMAP_PRIV(pPixmap) ((xglPixmapPtr) \ + dixLookupPrivate(&(pPixmap)->devPrivates, xglPixmapPrivateKey)) #define XGL_PIXMAP_PRIV(pPixmap) \ xglPixmapPtr pPixmapPriv = XGL_GET_PIXMAP_PRIV (pPixmap) @@ -411,10 +412,10 @@ typedef struct _xglWin { PixmapPtr pPixmap; } xglWinRec, *xglWinPtr; -extern int xglWinPrivateIndex; +extern DevPrivateKey xglWinPrivateKey; -#define XGL_GET_WINDOW_PRIV(pWin) \ - ((xglWinPtr) (pWin)->devPrivates[xglWinPrivateIndex].ptr) +#define XGL_GET_WINDOW_PRIV(pWin) ((xglWinPtr) \ + dixLookupPrivate(&(pWin)->devPrivates, xglWinPrivateKey)) #define XGL_WINDOW_PRIV(pWin) \ xglWinPtr pWinPriv = XGL_GET_WINDOW_PRIV (pWin) diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c index 166c33eb9..59ed00a72 100644 --- a/hw/xgl/xglpixmap.c +++ b/hw/xgl/xglpixmap.c @@ -310,7 +310,7 @@ xglDestroyPixmap (PixmapPtr pPixmap) xglFiniPixmap (pPixmap); - dixFreePrivates(*DEVPRIV_PTR(pPixmap)); + dixFreePrivates(pPixmap->devPrivates); xfree (pPixmap); return TRUE; diff --git a/hw/xgl/xglxv.c b/hw/xgl/xglxv.c index aaa66c738..bfa16e3ca 100644 --- a/hw/xgl/xglxv.c +++ b/hw/xgl/xglxv.c @@ -35,11 +35,11 @@ #include #include -static unsigned int xglXvScreenIndex = 0; +static DevPrivateKey xglXvScreenKey; static unsigned long portResource = 0; -#define XGL_GET_XV_SCREEN(pScreen) \ - ((XvScreenPtr) ((pScreen)->devPrivates[xglXvScreenIndex].ptr)) +#define XGL_GET_XV_SCREEN(pScreen) ((XvScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, xglXvScreenKey)) #define XGL_XV_SCREEN(pScreen) \ XvScreenPtr pXvScreen = XGL_GET_XV_SCREEN (pScreen) @@ -591,7 +591,7 @@ xglXvScreenInit (ScreenPtr pScreen) if (status != Success) return FALSE; - xglXvScreenIndex = XvGetScreenIndex (); + xglXvScreenKey = XvGetScreenKey (); portResource = XvGetRTPort (); pXvScreen = XGL_GET_XV_SCREEN (pScreen); diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index a52ce1f35..06e6e0205 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -35,7 +35,7 @@ is" without express or implied warranty. #include "XNFont.h" #include "Color.h" -int xnestGCPrivateIndex; +DevPrivateKey xnestGCPrivateKey = &xnestGCPrivateKey; static GCFuncs xnestFuncs = { xnestValidateGC, diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 5bf0300c6..324cf9696 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -74,8 +74,6 @@ InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) break; } - xnestWindowPrivateIndex = AllocateWindowPrivateIndex(); - xnestGCPrivateIndex = AllocateGCPrivateIndex(); xnestFontPrivateIndex = AllocateFontPrivateIndex(); if (!xnestNumScreens) xnestNumScreens = 1; diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index c4b8aa65e..c9c662af3 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -33,7 +33,7 @@ is" without express or implied warranty. #include "Screen.h" #include "XNPixmap.h" -int xnestPixmapPrivateIndex; +DevPrivateKey xnestPixmapPrivateKey = &xnestPixmapPrivateKey; PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth) @@ -56,8 +56,8 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth) pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->refcnt = 1; pPixmap->devKind = PixmapBytePad(width, depth); - pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr = - (pointer)((char *)pPixmap + pScreen->totalPixmapSize); + dixSetPrivate(&pPixmap->devPrivates, xnestPixmapPrivateKey, + (char *)pPixmap + pScreen->totalPixmapSize); if (width && height) xnestPixmapPriv(pPixmap)->pixmap = XCreatePixmap(xnestDisplay, @@ -75,7 +75,7 @@ xnestDestroyPixmap(PixmapPtr pPixmap) if(--pPixmap->refcnt) return TRUE; XFreePixmap(xnestDisplay, xnestPixmap(pPixmap)); - dixFreePrivates(*DEVPRIV_PTR(pPixmap)); + dixFreePrivates(pPixmap->devPrivates); xfree(pPixmap); return TRUE; } diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index d08e48245..f91454928 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -49,8 +49,6 @@ Window xnestScreenSaverWindows[MAXSCREENS]; extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); #endif -static int xnestScreenGeneration = -1; - ScreenPtr xnestScreen(Window window) { @@ -146,21 +144,13 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) VisualID defaultVisual; int rootDepth; - if (!(AllocateWindowPrivate(pScreen, xnestWindowPrivateIndex, - sizeof(xnestPrivWin)) && - AllocateGCPrivate(pScreen, xnestGCPrivateIndex, - sizeof(xnestPrivGC)))) - return False; - - if (xnestScreenGeneration != serverGeneration) { - if ((xnestPixmapPrivateIndex = AllocatePixmapPrivateIndex()) < 0) - return False; - xnestScreenGeneration = serverGeneration; - } - - if (!AllocatePixmapPrivate(pScreen,xnestPixmapPrivateIndex, - sizeof (xnestPrivPixmap))) + if (!dixRequestPrivate(xnestWindowPrivateKey, sizeof(xnestPrivWin))) return False; + if (!dixRequestPrivate(xnestGCPrivateKey, sizeof(xnestPrivGC))) + return False; + if (!dixRequestPrivate(xnestPixmapPrivateKey, sizeof (xnestPrivPixmap))) + return False; + visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec)); numVisuals = 0; diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index f87a1baa7..0955e61b9 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -39,7 +39,7 @@ is" without express or implied warranty. #include "Events.h" #include "Args.h" -int xnestWindowPrivateIndex; +DevPrivateKey xnestWindowPrivateKey = &xnestWindowPrivateKey; static int xnestFindWindowMatch(WindowPtr pWin, pointer ptr) diff --git a/hw/xnest/XNGC.h b/hw/xnest/XNGC.h index d3ac3df0b..19535fe3a 100644 --- a/hw/xnest/XNGC.h +++ b/hw/xnest/XNGC.h @@ -22,10 +22,10 @@ typedef struct { int nClipRects; } xnestPrivGC; -extern int xnestGCPrivateIndex; +extern DevPrivateKey xnestGCPrivateKey; -#define xnestGCPriv(pGC) \ - ((xnestPrivGC *)((pGC)->devPrivates[xnestGCPrivateIndex].ptr)) +#define xnestGCPriv(pGC) ((xnestPrivGC *) \ + dixLookupPrivate(&(pGC)->devPrivates, xnestGCPrivateKey)) #define xnestGC(pGC) (xnestGCPriv(pGC)->gc) diff --git a/hw/xnest/XNPixmap.h b/hw/xnest/XNPixmap.h index 6971b1162..3b0833993 100644 --- a/hw/xnest/XNPixmap.h +++ b/hw/xnest/XNPixmap.h @@ -15,14 +15,14 @@ is" without express or implied warranty. #ifndef XNESTPIXMAP_H #define XNESTPIXMAP_H -extern int xnestPixmapPrivateIndex; +extern DevPrivateKey xnestPixmapPrivateKey; typedef struct { Pixmap pixmap; } xnestPrivPixmap; -#define xnestPixmapPriv(pPixmap) \ - ((xnestPrivPixmap *)((pPixmap)->devPrivates[xnestPixmapPrivateIndex].ptr)) +#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \ + dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey)) #define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap) diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index 21be5f5e3..1aaf4e153 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -35,10 +35,10 @@ typedef struct { Window window; } xnestWindowMatch; -extern int xnestWindowPrivateIndex; +extern DevPrivateKey xnestWindowPrivateKey; -#define xnestWindowPriv(pWin) \ - ((xnestPrivWin *)((pWin)->devPrivates[xnestWindowPrivateIndex].ptr)) +#define xnestWindowPriv(pWin) ((xnestPrivWin *) \ + dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey)) #define xnestWindow(pWin) (xnestWindowPriv(pWin)->window) diff --git a/hw/xprint/attributes.c b/hw/xprint/attributes.c index d8ee5adf8..9756e281d 100644 --- a/hw/xprint/attributes.c +++ b/hw/xprint/attributes.c @@ -124,7 +124,7 @@ SysAttrs systemAttributes; * attrCtxtPrivIndex hold the attribute store's context private index. * This index is allocated at the time the attribute store is initialized. */ -static int attrCtxtPrivIndex; +static DevPrivateKey attrCtxtPrivKey = &attrCtxtPrivKey; /* * The ContextAttrs structure descibes the context private space reserved @@ -521,8 +521,7 @@ XpBuildAttributeStore( { if(attrList != (PrAttrPtr)NULL) FreeAttrList(); - attrCtxtPrivIndex = XpAllocateContextPrivateIndex(); - XpAllocateContextPrivate(attrCtxtPrivIndex, sizeof(ContextAttrs)); + dixRequestPrivate(attrCtxtPrivKey, sizeof(ContextAttrs)); BuildSystemAttributes(); attrGeneration = serverGeneration; @@ -592,7 +591,8 @@ XpInitAttributes(XpContextPtr pContext) PrAttrPtr pPrAttr = attrList; /* Initialize all the pointers to NULL */ - pCtxtAttrs = (ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr; + pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, + attrCtxtPrivKey); (void)memset((void *)pCtxtAttrs, 0, (size_t) sizeof(ContextAttrs)); for(pPrAttr = attrList; pPrAttr != (PrAttrPtr)NULL; pPrAttr = pPrAttr->next) @@ -612,8 +612,8 @@ XpDestroyAttributes( { ContextAttrPtr pCtxtAttrs; - pCtxtAttrs = (ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr; - + pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, + attrCtxtPrivKey); if(pCtxtAttrs->printerAttrs != (XrmDatabase)NULL) XrmDestroyDatabase(pCtxtAttrs->printerAttrs); if(pCtxtAttrs->docAttrs != (XrmDatabase)NULL) @@ -661,7 +661,8 @@ XpGetOneAttribute( } else { - pCtxtAttrs=(ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr; + pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, + attrCtxtPrivKey); switch(class) { case XPPrinterAttr: @@ -714,7 +715,8 @@ XpPutOneAttribute( XrmBinding bindings[1]; XrmQuark quarks[2]; - pCtxtAttrs = (ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr; + pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, + attrCtxtPrivKey); switch(class) { case XPPrinterAttr: @@ -900,7 +902,8 @@ XpGetAttributes( db = systemAttributes.server; else { - pCtxtAttrs=(ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr; + pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, + attrCtxtPrivKey); switch(class) { case XPServerAttr: @@ -952,7 +955,8 @@ XpAugmentAttributes( db = XrmGetStringDatabase(attributes); if(db == (XrmDatabase)NULL) return BadAlloc; - pCtxtAttrs = (ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr; + pCtxtAttrs = (ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, + attrCtxtPrivKey); switch(class) { case XPPrinterAttr: @@ -988,7 +992,8 @@ XpSetAttributes( db = XrmGetStringDatabase(attributes); if(db == (XrmDatabase)NULL) return BadAlloc; - pCtxtAttrs=(ContextAttrPtr)pContext->devPrivates[attrCtxtPrivIndex].ptr; + pCtxtAttrs=(ContextAttrPtr)dixLookupPrivate(&pContext->devPrivates, + attrCtxtPrivKey); switch(class) { case XPPrinterAttr: diff --git a/hw/xprint/pcl/Pcl.h b/hw/xprint/pcl/Pcl.h index 217e30438..216353be8 100644 --- a/hw/xprint/pcl/Pcl.h +++ b/hw/xprint/pcl/Pcl.h @@ -83,10 +83,10 @@ typedef char *XPointer; /****** * externally visible variables from PclInit.c ******/ -extern int PclScreenPrivateIndex, PclWindowPrivateIndex; -extern int PclContextPrivateIndex; -extern int PclPixmapPrivateIndex; -extern int PclGCPrivateIndex; +extern DevPrivateKey PclScreenPrivateKey, PclWindowPrivateKey; +extern DevPrivateKey PclContextPrivateKey; +extern DevPrivateKey PclPixmapPrivateKey; +extern DevPrivateKey PclGCPrivateKey; /****** * externally visible variables from PclAttVal.c diff --git a/hw/xprint/pcl/PclArc.c b/hw/xprint/pcl/PclArc.c index 0d8289e33..20d3f723d 100644 --- a/hw/xprint/pcl/PclArc.c +++ b/hw/xprint/pcl/PclArc.c @@ -85,7 +85,7 @@ PclDoArc( pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); XpGetReproductionArea( pCon, &repro ); /* diff --git a/hw/xprint/pcl/PclColor.c b/hw/xprint/pcl/PclColor.c index 8b05da056..5e8ffa63c 100644 --- a/hw/xprint/pcl/PclColor.c +++ b/hw/xprint/pcl/PclColor.c @@ -129,8 +129,8 @@ PclCreateColormap(ColormapPtr pColor) PclCmapToContexts *new; PclScreenPrivPtr sPriv; - sPriv = (PclScreenPrivPtr)pColor->pScreen - ->devPrivates[PclScreenPrivateIndex].ptr; + sPriv = (PclScreenPrivPtr) + dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey); /* * Use existing code to initialize the values in the colormap @@ -175,8 +175,8 @@ PclDestroyColormap(ColormapPtr pColor) /* * Find the colormap <-> contexts mapping */ - sPriv = (PclScreenPrivPtr)pColor->pScreen - ->devPrivates[PclScreenPrivateIndex].ptr; + sPriv = (PclScreenPrivPtr) + dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey); pCmap = sPriv->colormaps; while( pCmap ) { @@ -195,8 +195,8 @@ PclDestroyColormap(ColormapPtr pColor) con = pCmap->contexts; while( con ) { - cPriv = con->context->devPrivates[PclContextPrivateIndex].ptr; - + cPriv = dixLookupPrivate(&con->context->devPrivates, + PclContextPrivateKey); pPal = cPriv->palettes; while( pPal ) { @@ -259,8 +259,8 @@ PclStoreColors(ColormapPtr pColor, char t[80]; int i; - sPriv = (PclScreenPrivPtr)pColor->pScreen - ->devPrivates[PclScreenPrivateIndex].ptr; + sPriv = (PclScreenPrivPtr) + dixLookupPrivate(&pColor->pScreen->devPrivates, PclScreenPrivateKey); p = sPriv->colormaps; while( p ) { @@ -278,8 +278,8 @@ PclStoreColors(ColormapPtr pColor, * For each context, get the palette ID and update the * appropriate palette. */ - cPriv = con->context - ->devPrivates[PclContextPrivateIndex].ptr; + cPriv = dixLookupPrivate(&con->context->devPrivates, + PclContextPrivateKey); pMap = PclFindPaletteMap( cPriv, pColor, NULL ); /* @@ -407,7 +407,8 @@ PclUpdateColormap(DrawablePtr pDrawable, unsigned short r, g, b, rr, gg, bb; int i; - cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr; + cPriv = (PclContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); c = wColormap( win ); cmap = (ColormapPtr)LookupIDByType( c, RT_COLORMAP ); @@ -436,8 +437,9 @@ PclUpdateColormap(DrawablePtr pDrawable, /* * Add the colormap to the screen-level colormap<->context mapping. */ - sPriv = (PclScreenPrivPtr)cmap->pScreen - ->devPrivates[PclScreenPrivateIndex].ptr; + sPriv = (PclScreenPrivPtr) + dixLookupPrivate(&cmap->pScreen->devPrivates, + PclScreenPrivateKey); pCmap = sPriv->colormaps; while( pCmap && ( pCmap->colormapId != cmap->mid ) ) pCmap = pCmap->next; diff --git a/hw/xprint/pcl/PclGC.c b/hw/xprint/pcl/PclGC.c index ba82c566a..e64e779db 100644 --- a/hw/xprint/pcl/PclGC.c +++ b/hw/xprint/pcl/PclGC.c @@ -144,7 +144,8 @@ PclGetDrawablePrivateStuff( return FALSE; else { - cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr; + cPriv = (PclContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); *gc = cPriv->lastGC; *valid = cPriv->validGC; *file = cPriv->pPageFile; @@ -171,7 +172,8 @@ PclSetDrawablePrivateGC( { case DRAWABLE_PIXMAP: pix = (PixmapPtr)pDrawable; - pixPriv = pix->devPrivates[PclPixmapPrivateIndex].ptr; + pixPriv = (PclPixmapPrivPtr) + dixLookupPrivate(&pix->devPrivates, PclPixmapPrivateKey); pixPriv->lastGC = gc; pixPriv->validGC = 1; @@ -179,8 +181,8 @@ PclSetDrawablePrivateGC( case DRAWABLE_WINDOW: pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - pPriv = ((PclContextPrivPtr) - (pCon->devPrivates[PclContextPrivateIndex].ptr)); + pPriv = (PclContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); pPriv->validGC = 1; pPriv->lastGC = gc; @@ -316,13 +318,14 @@ PclUpdateDrawableGC( XpContextPtr pCon; PclContextPrivPtr cPriv; PclGCPrivPtr gcPriv = (PclGCPrivPtr) - (pGC->devPrivates[PclGCPrivateIndex].ptr); + dixLookupPrivate(&pGC->devPrivates, PclGCPrivateKey); if( !PclGetDrawablePrivateStuff( pDrawable, &dGC, &valid, outFile ) ) return FALSE; pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr; + cPriv = (PclContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); /* * Here's where we update the colormap. Since there can be diff --git a/hw/xprint/pcl/PclInit.c b/hw/xprint/pcl/PclInit.c index 183225274..478a34244 100644 --- a/hw/xprint/pcl/PclInit.c +++ b/hw/xprint/pcl/PclInit.c @@ -67,11 +67,11 @@ static void AllocatePclPrivates(ScreenPtr pScreen); static int PclInitContext(XpContextPtr pCon); static Bool PclDestroyContext(XpContextPtr pCon); -int PclScreenPrivateIndex; -int PclContextPrivateIndex; -int PclPixmapPrivateIndex; -int PclWindowPrivateIndex; -int PclGCPrivateIndex; +DevPrivateKey PclScreenPrivateKey = &PclScreenPrivateKey; +DevPrivateKey PclContextPrivateKey = &PclContextPrivateKey; +DevPrivateKey PclPixmapPrivateKey = &PclPixmapPrivateKey; +DevPrivateKey PclWindowPrivateKey = &PclWindowPrivateKey; +DevPrivateKey PclGCPrivateKey = &PclGCPrivateKey; #ifdef XP_PCL_COLOR /* @@ -119,7 +119,8 @@ Bool PclCloseScreen(int index, ScreenPtr pScreen) { - PclScreenPrivPtr pPriv = pScreen->devPrivates[PclScreenPrivateIndex].ptr; + PclScreenPrivPtr pPriv = (PclScreenPrivPtr) + dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey); pScreen->CloseScreen = pPriv->CloseScreen; xfree( pPriv ); @@ -157,8 +158,8 @@ InitializePclDriver( */ AllocatePclPrivates(pScreen); - pPriv = - (PclScreenPrivPtr)pScreen->devPrivates[PclScreenPrivateIndex].ptr; + pPriv = (PclScreenPrivPtr) + dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey); maxDim = MAX( pScreen->height, pScreen->width ); xRes = pScreen->width / ( pScreen->mmWidth / 25.4 ); @@ -260,33 +261,13 @@ InitializePclDriver( static void AllocatePclPrivates(ScreenPtr pScreen) { - static unsigned long PclGeneration = 0; + dixRequestPrivate(PclWindowPrivateKey, sizeof( PclWindowPrivRec ) ); + dixRequestPrivate(PclContextPrivateKey, sizeof( PclContextPrivRec ) ); + dixRequestPrivate(PclGCPrivateKey, sizeof( PclGCPrivRec ) ); + dixRequestPrivate(PclPixmapPrivateKey, sizeof( PclPixmapPrivRec ) ); - if((unsigned long) PclGeneration != serverGeneration) - { - PclScreenPrivateIndex = AllocateScreenPrivateIndex(); - - PclWindowPrivateIndex = AllocateWindowPrivateIndex(); - AllocateWindowPrivate( pScreen, PclWindowPrivateIndex, - sizeof( PclWindowPrivRec ) ); - - PclContextPrivateIndex = XpAllocateContextPrivateIndex(); - XpAllocateContextPrivate( PclContextPrivateIndex, - sizeof( PclContextPrivRec ) ); - - PclGCPrivateIndex = AllocateGCPrivateIndex(); - AllocateGCPrivate( pScreen, PclGCPrivateIndex, - sizeof( PclGCPrivRec ) ); - - PclPixmapPrivateIndex = AllocatePixmapPrivateIndex(); - AllocatePixmapPrivate( pScreen, PclPixmapPrivateIndex, - sizeof( PclPixmapPrivRec ) ); - - PclGeneration = serverGeneration; - } - - pScreen->devPrivates[PclScreenPrivateIndex].ptr = (pointer)xalloc( - sizeof(PclScreenPrivRec)); + dixSetPrivate(&pScreen->devPrivates, PclScreenPrivateKey, + xalloc(sizeof(PclScreenPrivRec))); } /* @@ -349,8 +330,8 @@ PclInitContext(XpContextPtr pCon) /* * Set up the context privates */ - pConPriv = - (PclContextPrivPtr)pCon->devPrivates[PclContextPrivateIndex].ptr; + pConPriv = (PclContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); pConPriv->jobFileName = (char *)NULL; pConPriv->pageFileName = (char *)NULL; @@ -483,7 +464,7 @@ static Bool PclDestroyContext(XpContextPtr pCon) { PclContextPrivPtr pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); PclPaletteMapPtr p, t; PclCmapToContexts *pCmap; ScreenPtr screen; @@ -541,7 +522,8 @@ PclDestroyContext(XpContextPtr pCon) * Remove the context from the screen-level colormap<->contexts mappings */ screen = screenInfo.screens[pCon->screenNum]; - sPriv = (PclScreenPrivPtr)screen->devPrivates[PclScreenPrivateIndex].ptr; + sPriv = (PclScreenPrivPtr) + dixLookupPrivate(&screen->devPrivates, PclScreenPrivateKey); pCmap = sPriv->colormaps; while( pCmap ) { @@ -583,8 +565,8 @@ PclGetContextFromWindow(WindowPtr win) while( win ) { - pPriv = - (PclWindowPrivPtr)win->devPrivates[PclWindowPrivateIndex].ptr; + pPriv = (PclWindowPrivPtr) + dixLookupPrivate(&win->devPrivates, PclWindowPrivateKey); if( pPriv->validContext ) return pPriv->context; diff --git a/hw/xprint/pcl/PclLine.c b/hw/xprint/pcl/PclLine.c index 52a586d17..68d55a525 100644 --- a/hw/xprint/pcl/PclLine.c +++ b/hw/xprint/pcl/PclLine.c @@ -107,7 +107,7 @@ PclPolyLine( pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); /* * Allocate the storage required to deal with the clipping @@ -223,7 +223,7 @@ PclPolySegment( pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); /* * Allocate the storage for the temporary regions. diff --git a/hw/xprint/pcl/PclPixel.c b/hw/xprint/pcl/PclPixel.c index f41af272f..d219838f0 100644 --- a/hw/xprint/pcl/PclPixel.c +++ b/hw/xprint/pcl/PclPixel.c @@ -125,13 +125,15 @@ PclPolyPoint( pDrawable, pGC, mode, nPoints, pPoints ) if( pDrawable->type == DRAWABLE_WINDOW ) { pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); - cPriv = pCon->devPrivates[PclContextPrivateIndex].ptr; + cPriv = (PclContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); cPriv->changeMask = GCLineWidth | GCLineStyle; } else { - pPriv = - ((PixmapPtr)pDrawable)->devPrivates[PclPixmapPrivateIndex].ptr; + pPriv = (PclPixmapPrivPtr) + dixLookupPrivate(&((PixmapPtr)pDrawable)->devPrivates, + PclPixmapPrivateKey); pPriv->changeMask = GCLineWidth | GCLineStyle; } #endif diff --git a/hw/xprint/pcl/PclPolygon.c b/hw/xprint/pcl/PclPolygon.c index 9867758bb..7d95d6484 100644 --- a/hw/xprint/pcl/PclPolygon.c +++ b/hw/xprint/pcl/PclPolygon.c @@ -76,7 +76,7 @@ PclPolyRectangle( pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); /* * Allocate the storage required to deal with the clipping @@ -170,7 +170,7 @@ PclFillPolygon( pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); /* * Generate the PCL code to draw the filled polygon, by defining @@ -283,7 +283,7 @@ PclPolyFillRect( pCon = PclGetContextFromWindow( (WindowPtr) pDrawable ); pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); /* * Allocate the storage required to deal with the clipping diff --git a/hw/xprint/pcl/PclPrint.c b/hw/xprint/pcl/PclPrint.c index 176a0025a..ac8ea1537 100644 --- a/hw/xprint/pcl/PclPrint.c +++ b/hw/xprint/pcl/PclPrint.c @@ -72,8 +72,8 @@ PclStartJob( Bool sendClientData, ClientPtr client) { - PclContextPrivPtr pConPriv = - (PclContextPrivPtr)pCon->devPrivates[PclContextPrivateIndex].ptr; + PclContextPrivPtr pConPriv = (PclContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); PclPaletteMap *pal; /* @@ -130,7 +130,7 @@ PclEndJob( Bool cancel) { PclContextPrivPtr priv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); #ifdef CCP_DEBUG FILE *xpoutput; @@ -250,9 +250,9 @@ PclStartPage( WindowPtr pWin) { PclContextPrivPtr pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; - PclWindowPrivPtr pWinPriv = - (PclWindowPrivPtr)pWin->devPrivates[PclWindowPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); + PclWindowPrivPtr pWinPriv = (PclWindowPrivPtr) + dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey); xRectangle repro; char t[80]; XpOid orient, plex, tray, medium; @@ -488,7 +488,7 @@ PclEndPage( WindowPtr pWin) { PclContextPrivPtr pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); struct stat statBuf; @@ -532,7 +532,7 @@ PclStartDoc(XpContextPtr pCon, XPDocumentType type) { PclContextPrivPtr pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); #ifndef XP_PCL_LJ3 /* @@ -592,7 +592,7 @@ PclDocumentData( { int type = 0; PclContextPrivPtr pPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); XpOidDocFmtList *formats; XpOidDocFmt *f; char t[80]; @@ -700,7 +700,7 @@ PclGetDocumentData( int maxBufferSize) { PclContextPrivPtr pPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); pPriv->getDocClient = client; pPriv->getDocBufSize = maxBufferSize; diff --git a/hw/xprint/pcl/PclText.c b/hw/xprint/pcl/PclText.c index 246c0195b..324de3014 100644 --- a/hw/xprint/pcl/PclText.c +++ b/hw/xprint/pcl/PclText.c @@ -123,7 +123,7 @@ char font_type; pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); pSoftFontInfo = pConPriv->pSoftFontInfo; font_type = isInternal(pGC->font); if ( font_type == DOWNLOAD_FONT ) { @@ -293,7 +293,7 @@ char font_type; pCon = PclGetContextFromWindow( (WindowPtr)pDrawable ); pConPriv = (PclContextPrivPtr) - pCon->devPrivates[PclContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PclContextPrivateKey); pSoftFontInfo = pConPriv->pSoftFontInfo; font_type = isInternal(pGC->font); diff --git a/hw/xprint/pcl/PclWindow.c b/hw/xprint/pcl/PclWindow.c index 80f4e91b1..997cfe4f0 100644 --- a/hw/xprint/pcl/PclWindow.c +++ b/hw/xprint/pcl/PclWindow.c @@ -97,9 +97,9 @@ PclCreateWindow( Bool status = Success; ScreenPtr pScreen = pWin->drawable.pScreen; PclScreenPrivPtr pScreenPriv = (PclScreenPrivPtr) - pScreen->devPrivates[PclScreenPrivateIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, PclScreenPrivateKey); PclWindowPrivPtr pWinPriv = (PclWindowPrivPtr) - pWin->devPrivates[PclWindowPrivateIndex].ptr; + dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey); /* * Initialize this window's private struct. @@ -142,7 +142,8 @@ PclCreateWindow( /* * Invalidate the window's private print context. */ - pPriv = (PclWindowPrivPtr)pWin->devPrivates[PclWindowPrivateIndex].ptr; + pPriv = (PclWindowPrivPtr) + dixLookupPrivate(&pWin->devPrivates, PclWindowPrivateKey); pPriv->validContext = 0; return TRUE; diff --git a/hw/xprint/pcl/Pclmap.h b/hw/xprint/pcl/Pclmap.h index ae88b5a42..79724213f 100644 --- a/hw/xprint/pcl/Pclmap.h +++ b/hw/xprint/pcl/Pclmap.h @@ -82,11 +82,11 @@ copyright holders. #define InitializePclDriver CATNAME(Initialize, PclDriver) #define PclCloseScreen PCLNAME(CloseScreen) #define PclGetContextFromWindow PCLNAME(GetContextFromWindow) -#define PclScreenPrivateIndex PCLNAME(ScreenPrivateIndex) -#define PclWindowPrivateIndex PCLNAME(WindowPrivateIndex) -#define PclContextPrivateIndex PCLNAME(ContextPrivateIndex) -#define PclPixmapPrivateIndex PCLNAME(PixmapPrivateIndex) -#define PclGCPrivateIndex PCLNAME(GCPrivateIndex) +#define PclScreenPrivateKey PCLNAME(ScreenPrivateKey) +#define PclWindowPrivateKey PCLNAME(WindowPrivateKey) +#define PclContextPrivateKey PCLNAME(ContextPrivateKey) +#define PclPixmapPrivateKey PCLNAME(PixmapPrivateKey) +#define PclGCPrivateKey PCLNAME(GCPrivateKey) /* PclPrint.c */ #define PclStartJob PCLNAME(StartJob) diff --git a/hw/xprint/ps/Ps.h b/hw/xprint/ps/Ps.h index 3adad39e4..db1dd9129 100644 --- a/hw/xprint/ps/Ps.h +++ b/hw/xprint/ps/Ps.h @@ -121,10 +121,10 @@ typedef char *XPointer; * Public index variables from PsInit.c */ -extern int PsScreenPrivateIndex; -extern int PsWindowPrivateIndex; -extern int PsContextPrivateIndex; -extern int PsPixmapPrivateIndex; +extern DevPrivateKey PsScreenPrivateKey; +extern DevPrivateKey PsWindowPrivateKey; +extern DevPrivateKey PsContextPrivateKey; +extern DevPrivateKey PsPixmapPrivateKey; extern XpValidatePoolsRec PsValidatePoolsRec; /* diff --git a/hw/xprint/ps/PsGC.c b/hw/xprint/ps/PsGC.c index 3ec07a77a..19898c90e 100644 --- a/hw/xprint/ps/PsGC.c +++ b/hw/xprint/ps/PsGC.c @@ -162,9 +162,11 @@ PsGetDrawablePrivateStuff( c = wColormap((WindowPtr)pDrawable); cmap = (ColormapPtr)LookupIDByType(c, RT_COLORMAP); - cPriv = pCon->devPrivates[PsContextPrivateIndex].ptr; + cPriv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); sPriv = (PsScreenPrivPtr) - pDrawable->pScreen->devPrivates[PsScreenPrivateIndex].ptr; + dixLookupPrivate(&pDrawable->pScreen->devPrivates, + PsScreenPrivateKey); *gc = cPriv->lastGC; *valid = cPriv->validGC; *psOut = cPriv->pPsOut; @@ -189,7 +191,8 @@ PsGetPsContextPriv( DrawablePtr pDrawable ) pCon = PsGetContextFromWindow((WindowPtr)pDrawable); if (pCon != NULL) { - return pCon->devPrivates[PsContextPrivateIndex].ptr; + return (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); } } return NULL; @@ -257,8 +260,9 @@ PsUpdateDrawableGC( PsOut_Offset(*psOut, pDrawable->x, pDrawable->y); PsOut_Clip(*psOut, pGC->clientClipType, (PsClipPtr)pGC->clientClip); } - cPriv = ( PsGetContextFromWindow( (WindowPtr)pDrawable ) ) - ->devPrivates[PsContextPrivateIndex].ptr; + cPriv = (PsContextPrivPtr)dixLookupPrivate( + &PsGetContextFromWindow((WindowPtr)pDrawable)->devPrivates, + PsContextPrivateKey); break; } return TRUE; diff --git a/hw/xprint/ps/PsInit.c b/hw/xprint/ps/PsInit.c index 639908f73..6c86fa221 100644 --- a/hw/xprint/ps/PsInit.c +++ b/hw/xprint/ps/PsInit.c @@ -97,10 +97,10 @@ static void AllocatePsPrivates(ScreenPtr pScreen); static int PsInitContext(XpContextPtr pCon); static int PsDestroyContext(XpContextPtr pCon); -int PsScreenPrivateIndex; -int PsContextPrivateIndex; -int PsPixmapPrivateIndex; -int PsWindowPrivateIndex; +DevPrivateKey PsScreenPrivateKey = &PsScreenPrivateKey; +DevPrivateKey PsContextPrivateKey = &PsContextPrivateKey; +DevPrivateKey PsPixmapPrivateKey = &PsPixmapPrivateKey; +DevPrivateKey PsWindowPrivateKey = &PsWindowPrivateKey; #ifdef GLXEXT extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); @@ -152,7 +152,8 @@ InitializePsDriver(ndx, pScreen, argc, argv) AllocatePsPrivates(pScreen); #if 0 - pPriv = (PsScreenPrivPtr)pScreen->devPrivates[PsScreenPrivateIndex].ptr; + pPriv = (PsScreenPrivPtr) + dixLookupPrivate(&pScreen->devPrivates, PsScreenPrivateKey); pPriv->resDB = rmdb; #endif @@ -476,28 +477,12 @@ InitializePsDriver(ndx, pScreen, argc, argv) static void AllocatePsPrivates(ScreenPtr pScreen) { - static unsigned long PsGeneration = 0; + dixRequestPrivate(PsWindowPrivateKey, sizeof(PsWindowPrivRec)); + dixRequestPrivate(PsContextPrivateKey, sizeof(PsContextPrivRec)); + dixRequestPrivate(PsPixmapPrivateKey, sizeof(PsPixmapPrivRec)); - if((unsigned long)PsGeneration != serverGeneration) - { - PsScreenPrivateIndex = AllocateScreenPrivateIndex(); - - PsWindowPrivateIndex = AllocateWindowPrivateIndex(); - AllocateWindowPrivate(pScreen, PsWindowPrivateIndex, - sizeof(PsWindowPrivRec)); - - PsContextPrivateIndex = XpAllocateContextPrivateIndex(); - XpAllocateContextPrivate(PsContextPrivateIndex, - sizeof(PsContextPrivRec)); - - PsPixmapPrivateIndex = AllocatePixmapPrivateIndex(); - AllocatePixmapPrivate(pScreen, PsPixmapPrivateIndex, - sizeof(PsPixmapPrivRec)); - - PsGeneration = serverGeneration; - } - pScreen->devPrivates[PsScreenPrivateIndex].ptr = - (pointer)xalloc(sizeof(PsScreenPrivRec)); + dixSetPrivate(&pScreen->devPrivates, PsScreenPrivateKey, + xalloc(sizeof(PsScreenPrivRec))); } /* @@ -552,8 +537,8 @@ PsInitContext(pCon) /* * Set up the context privates */ - pConPriv = - (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; + pConPriv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); memset(pConPriv, 0, sizeof(PsContextPrivRec)); pConPriv->jobFileName = (char *)NULL; @@ -622,8 +607,8 @@ static Bool PsDestroyContext(pCon) XpContextPtr pCon; { - PsContextPrivPtr pConPriv = - (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; + PsContextPrivPtr pConPriv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); if( pConPriv->pJobFile!=(FILE *)NULL ) { @@ -655,7 +640,8 @@ PsGetContextFromWindow(win) while( win ) { - pPriv = (PsWindowPrivPtr)win->devPrivates[PsWindowPrivateIndex].ptr; + pPriv = (PsWindowPrivPtr) + dixLookupPrivate(&win->devPrivates, PsWindowPrivateKey); if( pPriv->validContext ) return pPriv->context; win = win->parent; } diff --git a/hw/xprint/ps/PsPixmap.c b/hw/xprint/ps/PsPixmap.c index 220feab2b..1fa4e4056 100644 --- a/hw/xprint/ps/PsPixmap.c +++ b/hw/xprint/ps/PsPixmap.c @@ -111,14 +111,11 @@ PsCreatePixmap( pPixmap->drawable.height = height; pPixmap->devKind = 0; pPixmap->refcnt = 1; - - pPixmap->devPrivates = (DevUnion *)xcalloc(1, sizeof(DevUnion)); - if( !pPixmap->devPrivates ) - { xfree(pPixmap); return NullPixmap; } + pPixmap->devPrivates = NULL; pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec)); if( !pPixmap->devPrivate.ptr ) - { xfree(pPixmap->devPrivates); xfree(pPixmap); return NullPixmap; } + { xfree(pPixmap); return NullPixmap; } return pPixmap; } @@ -201,7 +198,7 @@ PsDestroyPixmap(PixmapPtr pPixmap) PsScrubPixmap(pPixmap); xfree(priv); - dixFreePrivates(*DEVPRIV_PTR(pPixmap)); + dixFreePrivates(pPixmap->devPrivates); xfree(pPixmap); return TRUE; } diff --git a/hw/xprint/ps/PsPrint.c b/hw/xprint/ps/PsPrint.c index 4571c07d7..386646858 100644 --- a/hw/xprint/ps/PsPrint.c +++ b/hw/xprint/ps/PsPrint.c @@ -165,8 +165,8 @@ PsStartJob( Bool sendClientData, ClientPtr client) { - PsContextPrivPtr pConPriv = - (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; + PsContextPrivPtr pConPriv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); /* * Create a temporary file to store the printer output. @@ -191,8 +191,8 @@ PsEndJob( struct stat buffer; int error; - PsContextPrivPtr priv = - (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; + PsContextPrivPtr priv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); if (cancel == True) { if (priv->getDocClient != (ClientPtr) NULL) { @@ -291,10 +291,10 @@ PsStartPage( { int iorient, iplex, icount, ires; unsigned short iwd, iht; - PsContextPrivPtr pConPriv = - (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; - PsWindowPrivPtr pWinPriv = - (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr; + PsContextPrivPtr pConPriv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); + PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr) + dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey); /* * Put a pointer to the context in the window private structure @@ -337,10 +337,10 @@ PsEndPage( XpContextPtr pCon, WindowPtr pWin) { - PsWindowPrivPtr pWinPriv = - (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr; - PsContextPrivPtr pConPriv = - (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; + PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr) + dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey); + PsContextPrivPtr pConPriv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); PsOut_EndPage(pConPriv->pPsOut); @@ -366,8 +366,8 @@ PsStartDoc(XpContextPtr pCon, XPDocumentType type) int iorient, iplex, icount, ires; unsigned short iwd, iht; char *title; - PsContextPrivPtr pConPriv = - (PsContextPrivPtr)pCon->devPrivates[PsContextPrivateIndex].ptr; + PsContextPrivPtr pConPriv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); /* get job level attributes */ title = XpGetOneAttribute(pCon, XPJobAttr, "job-name"); @@ -420,7 +420,8 @@ PsDocumentData( len_opt) return BadValue; - cPriv = pCon->devPrivates[PsContextPrivateIndex].ptr; + cPriv = (PsContextPrivPtr) + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); psOut = cPriv->pPsOut; if (pDraw) @@ -448,7 +449,7 @@ PsGetDocumentData( int maxBufferSize) { PsContextPrivPtr pPriv = (PsContextPrivPtr) - pCon->devPrivates[PsContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, PsContextPrivateKey); pPriv->getDocClient = client; pPriv->getDocBufSize = maxBufferSize; diff --git a/hw/xprint/ps/PsWindow.c b/hw/xprint/ps/PsWindow.c index 26075a80a..d107e5c26 100644 --- a/hw/xprint/ps/PsWindow.c +++ b/hw/xprint/ps/PsWindow.c @@ -123,9 +123,9 @@ PsCreateWindow(WindowPtr pWin) Bool status = Success; ScreenPtr pScreen = pWin->drawable.pScreen; PsScreenPrivPtr pScreenPriv = (PsScreenPrivPtr) - pScreen->devPrivates[PsScreenPrivateIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, PsScreenPrivateKey); PsWindowPrivPtr pWinPriv = (PsWindowPrivPtr) - pWin->devPrivates[PsWindowPrivateIndex].ptr; + dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey); /* * Initialize this window's private struct. @@ -165,7 +165,8 @@ PsCreateWindow(WindowPtr pWin) return status; #endif - pPriv = (PsWindowPrivPtr)pWin->devPrivates[PsWindowPrivateIndex].ptr; + pPriv = (PsWindowPrivPtr) + dixLookupPrivate(&pWin->devPrivates, PsWindowPrivateKey); pPriv->validContext = 0; return TRUE; diff --git a/hw/xprint/raster/Raster.c b/hw/xprint/raster/Raster.c index 0286a18fa..dccef613c 100644 --- a/hw/xprint/raster/Raster.c +++ b/hw/xprint/raster/Raster.c @@ -151,8 +151,8 @@ static int RasterReproducibleArea(XpContextPtr pCon, #define DOC_PCL 1 #define DOC_RASTER 2 -static int RasterScreenPrivateIndex, RasterContextPrivateIndex; -static int RasterGeneration = 0; +static DevPrivateKey RasterScreenPrivateKey = &RasterScreenPrivateKey; +static DevPrivateKey RasterContextPrivateKey = &RasterContextPrivateKey; static char RASTER_DRIV_NAME[] = "XP-RASTER"; static int doc_type = DOC_RASTER; @@ -205,7 +205,7 @@ InitializeRasterDriver( AllocateRasterPrivates(pScreen); pPriv = (RasterScreenPrivPtr) - pScreen->devPrivates[RasterScreenPrivateIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey); maxDim = MAX( pScreen->height, pScreen->width ); numBytes = maxDim + BITMAP_SCANLINE_PAD - 1; /* pixels per row */ @@ -252,7 +252,7 @@ GetPropString( char *propName) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); char *type; XrmValue val; struct stat status; @@ -371,7 +371,7 @@ StartJob( ClientPtr client) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); SetDocumentType( pCon ); @@ -488,7 +488,7 @@ EndJob( Bool cancel) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); if( cancel == True ) { @@ -549,7 +549,7 @@ StartPage( WindowPtr pWin) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); if(pConPriv->pPageFile != (FILE *)NULL) { @@ -830,7 +830,7 @@ SendPage( XpContextPtr pCon ) { struct stat statBuf; RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); if(stat(pConPriv->pageFileName, &statBuf) < 0) return BadAlloc; @@ -872,7 +872,7 @@ EndPage( WindowPtr pWin) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); struct stat statBuf; char *rasterFileName = (char *)NULL, *pCommand = (char *)NULL; FILE *pRasterFile = (FILE *)NULL; @@ -1068,7 +1068,7 @@ DocumentData( ClientPtr client) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); char *preRasterStr = PRE_RASTER, *postRasterStr = POST_RASTER, *noRasterStr = NO_RASTER; @@ -1135,7 +1135,7 @@ GetDocumentData( int maxBufferSize) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pContext->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pContext->devPrivates, RasterContextPrivateKey); pConPriv->getDocClient = client; pConPriv->getDocBufSize = maxBufferSize; @@ -1146,17 +1146,9 @@ static void AllocateRasterPrivates( ScreenPtr pScreen) { - if(RasterGeneration != serverGeneration) - { - RasterScreenPrivateIndex = AllocateScreenPrivateIndex(); - RasterContextPrivateIndex = XpAllocateContextPrivateIndex(); - XpAllocateContextPrivate( RasterContextPrivateIndex, - sizeof( RasterContextPrivRec ) ); - - RasterGeneration = serverGeneration; - } - pScreen->devPrivates[RasterScreenPrivateIndex].ptr = (pointer)Xalloc( - sizeof(RasterScreenPrivRec)); + dixRequestPrivate(RasterContextPrivateKey, sizeof( RasterContextPrivRec ) ); + dixSetPrivate(&pScreen->devPrivates, RasterScreenPrivateKey, + Xalloc(sizeof(RasterScreenPrivRec))); } /* @@ -1171,7 +1163,7 @@ RasterChangeWindowAttributes( Bool status = Success; ScreenPtr pScreen = pWin->drawable.pScreen; RasterScreenPrivPtr pScreenPriv = (RasterScreenPrivPtr) - pScreen->devPrivates[RasterScreenPrivateIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey); if(pWin->backingStore == NotUseful) { @@ -1270,7 +1262,7 @@ RasterInitContext( * Set up the context privates */ pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); pConPriv->jobFileName = (char *)NULL; pConPriv->pageFileName = (char *)NULL; @@ -1355,7 +1347,7 @@ RasterDestroyContext( XpContextPtr pCon) { RasterContextPrivPtr pConPriv = (RasterContextPrivPtr) - pCon->devPrivates[RasterContextPrivateIndex].ptr; + dixLookupPrivate(&pCon->devPrivates, RasterContextPrivateKey); /* * Clean up the temporary files @@ -1477,7 +1469,7 @@ RasterCloseScreen( { Bool status = Success; RasterScreenPrivPtr pScreenPriv = (RasterScreenPrivPtr) - pScreen->devPrivates[RasterScreenPrivateIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, RasterScreenPrivateKey); /* * Call any wrapped CloseScreen proc. diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 09a9fb295..fad5e2b2e 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -631,11 +631,11 @@ extern DWORD g_dwEvents; #ifdef HAS_DEVWINDOWS extern int g_fdMessageQueue; #endif -extern int g_iScreenPrivateIndex; -extern int g_iCmapPrivateIndex; -extern int g_iGCPrivateIndex; -extern int g_iPixmapPrivateIndex; -extern int g_iWindowPrivateIndex; +extern DevPrivateKey g_iScreenPrivateKey; +extern DevPrivateKey g_iCmapPrivateKey; +extern DevPrivateKey g_iGCPrivateKey; +extern DevPrivateKey g_iPixmapPrivateKey; +extern DevPrivateKey g_iWindowPrivateKey; extern unsigned long g_ulServerGeneration; extern CARD32 g_c32LastInputEventTime; extern DWORD g_dwEnginesSupported; @@ -661,11 +661,11 @@ extern FARPROC g_fpTrackMouseEvent; * Screen privates macros */ -#define winGetScreenPriv(pScreen) \ - ((winPrivScreenPtr) (pScreen)->devPrivates[g_iScreenPrivateIndex].ptr) +#define winGetScreenPriv(pScreen) ((winPrivScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey)) #define winSetScreenPriv(pScreen,v) \ - ((pScreen)->devPrivates[g_iScreenPrivateIndex].ptr = (pointer) v) + dixSetPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey, v) #define winScreenPriv(pScreen) \ winPrivScreenPtr pScreenPriv = winGetScreenPriv(pScreen) @@ -675,11 +675,11 @@ extern FARPROC g_fpTrackMouseEvent; * Colormap privates macros */ -#define winGetCmapPriv(pCmap) \ - ((winPrivCmapPtr) (pCmap)->devPrivates[g_iCmapPrivateIndex].ptr) +#define winGetCmapPriv(pCmap) ((winPrivCmapPtr) \ + dixLookupPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey)) #define winSetCmapPriv(pCmap,v) \ - ((pCmap)->devPrivates[g_iCmapPrivateIndex].ptr = (pointer) v) + dixSetPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey, v) #define winCmapPriv(pCmap) \ winPrivCmapPtr pCmapPriv = winGetCmapPriv(pCmap) @@ -689,11 +689,11 @@ extern FARPROC g_fpTrackMouseEvent; * GC privates macros */ -#define winGetGCPriv(pGC) \ - ((winPrivGCPtr) (pGC)->devPrivates[g_iGCPrivateIndex].ptr) +#define winGetGCPriv(pGC) ((winPrivGCPtr) \ + dixLookupPrivate(&(pGC)->devPrivates, g_iGCPrivateKey)) #define winSetGCPriv(pGC,v) \ - ((pGC)->devPrivates[g_iGCPrivateIndex].ptr = (pointer) v) + dixSetPrivate(&(pGC)->devPrivates, g_iGCPrivateKey, v) #define winGCPriv(pGC) \ winPrivGCPtr pGCPriv = winGetGCPriv(pGC) @@ -703,11 +703,11 @@ extern FARPROC g_fpTrackMouseEvent; * Pixmap privates macros */ -#define winGetPixmapPriv(pPixmap) \ - ((winPrivPixmapPtr) (pPixmap)->devPrivates[g_iPixmapPrivateIndex].ptr) +#define winGetPixmapPriv(pPixmap) ((winPrivPixmapPtr) \ + dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey)) #define winSetPixmapPriv(pPixmap,v) \ - ((pPixmap)->devPrivates[g_iPixmapPrivateIndex].ptr = (pointer) v) + dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey, v) #define winPixmapPriv(pPixmap) \ winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap) @@ -717,11 +717,11 @@ extern FARPROC g_fpTrackMouseEvent; * Window privates macros */ -#define winGetWindowPriv(pWin) \ - ((winPrivWinPtr) (pWin)->devPrivates[g_iWindowPrivateIndex].ptr) +#define winGetWindowPriv(pWin) ((winPrivWinPtr) \ + dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey)) #define winSetWindowPriv(pWin,v) \ - ((pWin)->devPrivates[g_iWindowPrivateIndex].ptr = (pointer) v) + dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey, v) #define winWindowPriv(pWin) \ winPrivWinPtr pWinPriv = winGetWindowPriv(pWin) diff --git a/hw/xwin/winallpriv.c b/hw/xwin/winallpriv.c index f4decfb59..21ccd9b3b 100644 --- a/hw/xwin/winallpriv.c +++ b/hw/xwin/winallpriv.c @@ -57,12 +57,6 @@ winAllocatePrivates (ScreenPtr pScreen) /* We need a new slot for our privates if the screen gen has changed */ if (g_ulServerGeneration != serverGeneration) { - /* Get an index that we can store our privates at */ - g_iScreenPrivateIndex = AllocateScreenPrivateIndex (); - g_iGCPrivateIndex = AllocateGCPrivateIndex (); - g_iPixmapPrivateIndex = AllocatePixmapPrivateIndex (); - g_iWindowPrivateIndex = AllocateWindowPrivateIndex (); - g_ulServerGeneration = serverGeneration; } @@ -84,24 +78,21 @@ winAllocatePrivates (ScreenPtr pScreen) winSetScreenPriv (pScreen, pScreenPriv); /* Reserve GC memory for our privates */ - if (!AllocateGCPrivate (pScreen, g_iGCPrivateIndex, - sizeof (winPrivGCRec))) + if (!dixRequestPrivate(g_iGCPrivateKey, sizeof (winPrivGCRec))) { ErrorF ("winAllocatePrivates - AllocateGCPrivate () failed\n"); return FALSE; } /* Reserve Pixmap memory for our privates */ - if (!AllocatePixmapPrivate (pScreen, g_iPixmapPrivateIndex, - sizeof (winPrivPixmapRec))) + if (!dixRequestPrivate(g_iPixmapPrivateKey, sizeof (winPrivPixmapRec))) { ErrorF ("winAllocatePrivates - AllocatePixmapPrivates () failed\n"); return FALSE; } /* Reserve Window memory for our privates */ - if (!AllocateWindowPrivate (pScreen, g_iWindowPrivateIndex, - sizeof (winPrivWinRec))) + if (!dixRequestPrivate(g_iWindowPrivateKey, sizeof (winPrivWinRec))) { ErrorF ("winAllocatePrivates () - AllocateWindowPrivates () failed\n"); return FALSE; @@ -155,9 +146,6 @@ winAllocateCmapPrivates (ColormapPtr pCmap) /* Get a new privates index when the server generation changes */ if (s_ulPrivateGeneration != serverGeneration) { - /* Get an index that we can store our privates at */ - g_iCmapPrivateIndex = AllocateColormapPrivateIndex (winInitCmapPrivates); - /* Save the new server generation */ s_ulPrivateGeneration = serverGeneration; } diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c index c1e619bf8..021b8b82c 100644 --- a/hw/xwin/wincursor.c +++ b/hw/xwin/wincursor.c @@ -598,7 +598,8 @@ winInitCursor (ScreenPtr pScreen) pScreenPriv->cursor.QueryBestSize = pScreen->QueryBestSize; pScreen->QueryBestSize = winCursorQueryBestSize; - pPointPriv = (miPointerScreenPtr) pScreen->devPrivates[miPointerScreenIndex].ptr; + pPointPriv = (miPointerScreenPtr) + dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); pScreenPriv->cursor.spriteFuncs = pPointPriv->spriteFuncs; pPointPriv->spriteFuncs = &winSpriteFuncsRec; diff --git a/hw/xwin/winfillsp.c b/hw/xwin/winfillsp.c index 7e3966965..702f34f96 100644 --- a/hw/xwin/winfillsp.c +++ b/hw/xwin/winfillsp.c @@ -35,15 +35,6 @@ #include "win.h" -/* - * References to external symbols - */ - -extern int g_iPixmapPrivateIndex; -extern int g_iGCPrivateIndex; -extern int g_copyROP[]; - - extern void ROP16(HDC hdc, int rop); #define TRANSLATE_COLOR(color) \ diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c index af8190d3f..fddada39e 100644 --- a/hw/xwin/winglobals.c +++ b/hw/xwin/winglobals.c @@ -44,11 +44,11 @@ int g_iLastScreen = -1; #ifdef HAS_DEVWINDOWS int g_fdMessageQueue = WIN_FD_INVALID; #endif -int g_iScreenPrivateIndex = -1; -int g_iCmapPrivateIndex = -1; -int g_iGCPrivateIndex = -1; -int g_iPixmapPrivateIndex = -1; -int g_iWindowPrivateIndex = -1; +DevPrivateKey g_iScreenPrivateKey = &g_iScreenPrivateKey; +DevPrivateKey g_iCmapPrivateKey = &g_iCmapPrivateKey; +DevPrivateKey g_iGCPrivateKey = &g_iGCPrivateKey; +DevPrivateKey g_iPixmapPrivateKey = &g_iPixmapPrivateKey; +DevPrivateKey g_iWindowPrivateKey = &g_iWindowPrivateKey; unsigned long g_ulServerGeneration = 0; Bool g_fInitializedDefaultScreens = FALSE; DWORD g_dwEnginesSupported = 0; diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c index 0a7579b61..20ff9f7db 100644 --- a/hw/xwin/winmultiwindowwndproc.c +++ b/hw/xwin/winmultiwindowwndproc.c @@ -365,7 +365,7 @@ winTopLevelWindowProc (HWND hwnd, UINT message, ErrorF ("\thenght %08X\n", pWin->drawable.height); ErrorF ("\tpScreen %08X\n", pWin->drawable.pScreen); ErrorF ("\tserialNumber %08X\n", pWin->drawable.serialNumber); - ErrorF ("g_iWindowPrivateIndex %d\n", g_iWindowPrivateIndex); + ErrorF ("g_iWindowPrivateKey %p\n", g_iWindowPrivateKey); ErrorF ("pWinPriv %08X\n", pWinPriv); ErrorF ("s_pScreenPriv %08X\n", s_pScreenPriv); ErrorF ("s_pScreenInfo %08X\n", s_pScreenInfo); diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c index baff60c92..ffe72079a 100644 --- a/hw/xwin/winpixmap.c +++ b/hw/xwin/winpixmap.c @@ -35,13 +35,6 @@ #include "win.h" -/* - * References to external symbols - */ - -extern int g_iPixmapPrivateIndex; - - /* * Local prototypes */ diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 52adba819..2038e6fe5 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -73,9 +73,6 @@ winMWExtWMProcs = { * References to external symbols */ -extern winScreenInfo g_ScreenInfo[]; -extern miPointerScreenFuncRec g_winPointerCursorFuncs; -extern int g_iScreenPrivateIndex; extern Bool g_fSoftwareCursor; diff --git a/hw/xwin/winsetsp.c b/hw/xwin/winsetsp.c index 8a3faee93..f894d6cda 100644 --- a/hw/xwin/winsetsp.c +++ b/hw/xwin/winsetsp.c @@ -35,15 +35,6 @@ #include "win.h" -/* - * References to external symbols - */ - -extern int g_iPixmapPrivateIndex; -extern int g_iGCPrivateIndex; -extern int g_copyROP[]; - - /* See Porting Layer Definition - p. 55 */ void winSetSpansNativeGDI (DrawablePtr pDrawable, diff --git a/include/colormapst.h b/include/colormapst.h index c9d9514ad..f1fc8ebef 100644 --- a/include/colormapst.h +++ b/include/colormapst.h @@ -52,6 +52,7 @@ SOFTWARE. #include "colormap.h" #include "screenint.h" +#include "privates.h" /* Shared color -- the color is used by AllocColorPlanes */ typedef struct @@ -126,7 +127,7 @@ typedef struct _ColormapRec Entry *green; Entry *blue; pointer devPriv; - DevUnion *devPrivates; /* dynamic devPrivates added after devPriv + PrivateRec *devPrivates; /* dynamic devPrivates added after devPriv already existed - must keep devPriv */ } ColormapRec; diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 01142a59d..8d4d7318e 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -261,9 +261,6 @@ /* Internal define for Xinerama */ #undef PANORAMIX -/* Support pixmap privates */ -#undef PIXPRIV - /* Overall prefix */ #undef PROJECTROOT diff --git a/include/dix.h b/include/dix.h index 05366ecd0..54629cd14 100644 --- a/include/dix.h +++ b/include/dix.h @@ -496,12 +496,6 @@ void ScreenRestructured (ScreenPtr pScreen); #endif -extern int AllocateClientPrivateIndex(void); - -extern Bool AllocateClientPrivate( - int /*index*/, - unsigned /*amount*/); - extern int ffs(int i); /* diff --git a/include/dixstruct.h b/include/dixstruct.h index 2a3e696fd..7f14abab4 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -29,6 +29,7 @@ SOFTWARE. #include "cursor.h" #include "gc.h" #include "pixmap.h" +#include "privates.h" #include /* @@ -110,7 +111,7 @@ typedef struct _Client { Bool big_requests; /* supports large requests */ int priority; ClientState clientState; - DevUnion *devPrivates; + PrivateRec *devPrivates; #ifdef XKB unsigned short xkbClientFlags; unsigned short mapNotifyMask; diff --git a/include/extension.h b/include/extension.h index 27decc12c..6e6081740 100644 --- a/include/extension.h +++ b/include/extension.h @@ -58,12 +58,6 @@ extern Bool EnableDisableExtension(char *name, Bool enable); extern void EnableDisableExtensionError(char *name, Bool enable); -extern int AllocateExtensionPrivateIndex(void); - -extern Bool AllocateExtensionPrivate( - int /*index*/, - unsigned /*amount*/); - extern void InitExtensions(int argc, char **argv); extern void InitVisualWrap(void); diff --git a/include/extnsionst.h b/include/extnsionst.h index 58bf0a206..59acd0ef4 100644 --- a/include/extnsionst.h +++ b/include/extnsionst.h @@ -53,6 +53,7 @@ SOFTWARE. #include "screenint.h" #include "extension.h" #include "gc.h" +#include "privates.h" typedef struct _ExtensionEntry { int index; @@ -69,7 +70,7 @@ typedef struct _ExtensionEntry { pointer extPrivate; unsigned short (* MinorOpcode)( /* called for errors */ ClientPtr /* client */); - DevUnion *devPrivates; + PrivateRec *devPrivates; } ExtensionEntry; /* diff --git a/include/gcstruct.h b/include/gcstruct.h index 14f747836..8d9b05575 100644 --- a/include/gcstruct.h +++ b/include/gcstruct.h @@ -56,6 +56,7 @@ SOFTWARE. #include "region.h" #include "pixmap.h" #include "screenint.h" +#include "privates.h" #include /* @@ -308,7 +309,7 @@ typedef struct _GC { unsigned long serialNumber; GCFuncs *funcs; GCOps *ops; - DevUnion *devPrivates; + PrivateRec *devPrivates; /* * The following were moved here from private storage to allow device- * independent access to them from screen wrappers. diff --git a/include/input.h b/include/input.h index 97a78567f..4f9164a19 100644 --- a/include/input.h +++ b/include/input.h @@ -158,9 +158,6 @@ typedef struct { unsigned char id; } LedCtrl; -extern int AllocateDevicePrivateIndex(void); -extern Bool AllocateDevicePrivate(DeviceIntPtr device, int index); - extern KeybdCtrl defaultKeyboardControl; extern PtrCtrl defaultPointerControl; diff --git a/include/inputstr.h b/include/inputstr.h index 3398949d4..bb7f35096 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -52,6 +52,7 @@ SOFTWARE. #include "input.h" #include "window.h" #include "dixstruct.h" +#include "privates.h" #define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))) @@ -62,7 +63,7 @@ SOFTWARE. #define EMASKSIZE MAX_DEVICES -extern int CoreDevicePrivatesIndex; +extern DevPrivateKey CoreDevicePrivateKey; /* Kludge: OtherClients and InputClients must be compatible, see code */ @@ -327,7 +328,7 @@ typedef struct _DeviceIntRec { void *pad0; #endif char *config_info; /* used by the hotplug layer */ - DevUnion *devPrivates; + PrivateRec *devPrivates; int nPrivates; DeviceUnwrapProc unwrapProc; } DeviceIntRec; diff --git a/include/pixmapstr.h b/include/pixmapstr.h index 459488226..4162c667e 100644 --- a/include/pixmapstr.h +++ b/include/pixmapstr.h @@ -47,27 +47,17 @@ SOFTWARE. #ifndef PIXMAPSTRUCT_H #define PIXMAPSTRUCT_H -#include #include "pixmap.h" #include "screenint.h" #include "regionstr.h" - -/* - * The padN members are unfortunate ABI BC. See fdo bug #6924. - */ +#include "privates.h" typedef struct _Drawable { unsigned char type; /* DRAWABLE_ */ unsigned char class; /* specific to type */ unsigned char depth; unsigned char bitsPerPixel; -#if defined(_XSERVER64) - XID pad0; -#endif XID id; /* resource id */ -#if defined(_XSERVER64) - XID pad1; -#endif short x; /* window: screen absolute, pixmap: 0 */ short y; /* window: screen absolute, pixmap: 0 */ unsigned short width; @@ -85,7 +75,7 @@ typedef struct _Pixmap { int refcnt; int devKind; DevUnion devPrivate; - DevUnion *devPrivates; /* real devPrivates like gcs & windows */ + PrivateRec *devPrivates; #ifdef COMPOSITE short screen_x; short screen_y; diff --git a/include/privates.h b/include/privates.h index e377b3068..9539a2912 100644 --- a/include/privates.h +++ b/include/privates.h @@ -27,13 +27,6 @@ typedef struct _Private { struct _Private *next; } PrivateRec; -/* - * Backwards compatibility macro. Use to get the proper PrivateRec - * reference from any of the structure types that supported the old - * devPrivates mechanism. - */ -#define DEVPRIV_PTR(foo) ((PrivateRec **)(&(foo)->devPrivates[0].ptr)) - /* * Request pre-allocated private space for your driver/module. * Calling this is not necessary if only a pointer by itself is needed. @@ -154,7 +147,4 @@ dixLookupPrivateOffset(RESTYPE type); extern int dixRegisterPrivateOffset(RESTYPE type, unsigned offset); -/* Used by the legacy support, don't rely on this being here */ -#define PadToLong(w) ((((w) + sizeof(long)-1) / sizeof(long)) * sizeof(long)) - #endif /* PRIVATES_H */ diff --git a/include/screenint.h b/include/screenint.h index bf8da4432..6d074a375 100644 --- a/include/screenint.h +++ b/include/screenint.h @@ -55,22 +55,6 @@ typedef struct _Visual *VisualPtr; typedef struct _Depth *DepthPtr; typedef struct _Screen *ScreenPtr; -extern int AllocateScreenPrivateIndex(void); - -extern int AllocateWindowPrivateIndex(void); - -extern Bool AllocateWindowPrivate( - ScreenPtr /* pScreen */, - int /* index */, - unsigned /* amount */); - -extern int AllocateGCPrivateIndex(void); - -extern Bool AllocateGCPrivate( - ScreenPtr /* pScreen */, - int /* index */, - unsigned /* amount */); - extern int AddScreen( Bool (* /*pfnInit*/)( int /*index*/, @@ -80,18 +64,6 @@ extern int AddScreen( int /*argc*/, char** /*argv*/); -extern int AllocatePixmapPrivateIndex(void); - -extern Bool AllocatePixmapPrivate( - ScreenPtr /* pScreen */, - int /* index */, - unsigned /* amount */); - - typedef struct _ColormapRec *ColormapPtr; -typedef int (*InitCmapPrivFunc)(ColormapPtr, int); - -extern int AllocateColormapPrivateIndex( - InitCmapPrivFunc /* initPrivFunc */); #endif /* SCREENINT_H */ diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 110f4dce9..a24c5f528 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -56,6 +56,7 @@ SOFTWARE. #include "validate.h" #include #include "dix.h" +#include "privates.h" typedef struct _PixmapFormat { unsigned char depth; @@ -449,12 +450,6 @@ typedef struct _Screen { pointer devPrivate; short numVisuals; VisualPtr visuals; - int WindowPrivateLen; - unsigned *WindowPrivateSizes; - unsigned totalWindowSize; - int GCPrivateLen; - unsigned *GCPrivateSizes; - unsigned totalGCSize; /* Random screen procedures */ @@ -546,7 +541,7 @@ typedef struct _Screen { pointer wakeupData; /* anybody can get a piece of this array */ - DevUnion *devPrivates; + PrivateRec *devPrivates; CreateScreenResourcesProcPtr CreateScreenResources; ModifyPixmapHeaderProcPtr ModifyPixmapHeader; @@ -558,8 +553,6 @@ typedef struct _Screen { PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */ - int PixmapPrivateLen; - unsigned int *PixmapPrivateSizes; unsigned int totalPixmapSize; MarkWindowProcPtr MarkWindow; diff --git a/include/window.h b/include/window.h index d5437a759..f85eceb2d 100644 --- a/include/window.h +++ b/include/window.h @@ -83,9 +83,6 @@ extern int WalkTree( VisitWindowProcPtr /*func*/, pointer /*data*/); -extern WindowPtr AllocateWindow( - ScreenPtr /*pScreen*/); - extern Bool CreateRootWindow( ScreenPtr /*pScreen*/); diff --git a/include/windowstr.h b/include/windowstr.h index 6d874ae9e..ca212ad99 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -55,6 +55,7 @@ SOFTWARE. #include "property.h" #include "resource.h" /* for ROOT_WINDOW_ID_BASE */ #include "dix.h" +#include "privates.h" #include "miscstruct.h" #include #include "opaque.h" @@ -159,7 +160,7 @@ typedef struct _Window { #ifdef COMPOSITE unsigned redirectDraw:2; /* rendering is redirected from here */ #endif - DevUnion *devPrivates; + PrivateRec *devPrivates; } WindowRec; /* diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 5edee539b..71ea115e6 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -246,7 +246,7 @@ typedef struct device->public.realInputProc = oldprocs->realInputProc; \ device->unwrapProc = oldprocs->unwrapProc; -#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr) +#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey)) /***====================================================================***/ diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in index b9643a2a4..97d53a2ee 100644 --- a/include/xorg-config.h.in +++ b/include/xorg-config.h.in @@ -57,9 +57,6 @@ /* Solaris 8 or later? */ #undef __SOL8__ -/* Whether to use pixmap privates */ -#undef PIXPRIV - /* Define to 1 if you have the `walkcontext' function (used on Solaris for xorg_backtrace in hw/xfree86/common/xf86Events.c */ #undef HAVE_WALKCONTEXT diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in index c117dfa33..4b9104d9f 100644 --- a/include/xorg-server.h.in +++ b/include/xorg-server.h.in @@ -70,9 +70,6 @@ /* Internal define for Xinerama */ #undef PANORAMIX -/* Support pixmap privates */ -#undef PIXPRIV - /* Support RANDR extension */ #undef RANDR diff --git a/mfb/mfb.h b/mfb/mfb.h index 001f43e53..42f3002f2 100644 --- a/mfb/mfb.h +++ b/mfb/mfb.h @@ -705,8 +705,8 @@ extern Bool mfbCloseScreen( extern Bool mfbAllocatePrivates( ScreenPtr /*pScreen*/, - int * /*pWinIndex*/, - int * /*pGCIndex*/ + DevPrivateKey *pWinKey, + DevPrivateKey *pGCIndex ); extern Bool mfbScreenInit( @@ -891,14 +891,10 @@ typedef struct { typedef mfbPrivGC *mfbPrivGCPtr; #endif -/* XXX these should be static, but it breaks the ABI */ -extern int mfbGCPrivateIndex; /* index into GC private array */ -extern int mfbGetGCPrivateIndex(void); -extern int mfbWindowPrivateIndex; /* index into Window private array */ -extern int mfbGetWindowPrivateIndex(void); +extern DevPrivateKey mfbGetGCPrivateKey(void); +extern DevPrivateKey mfbGetWindowPrivateKey(void); #ifdef PIXMAP_PER_WINDOW -extern int frameWindowPrivateIndex; /* index into Window private array */ -extern int frameGetWindowPrivateIndex(void); +extern DevPrivateKey frameGetWindowPrivateKey(void); #endif #ifndef MFB_PROTOTYPES_ONLY diff --git a/mfb/mfbbitblt.c b/mfb/mfbbitblt.c index 270fd96a7..3efee45b1 100644 --- a/mfb/mfbbitblt.c +++ b/mfb/mfbbitblt.c @@ -397,8 +397,7 @@ int dstx, dsty; * must register a function for n-to-1 copy operations */ -static unsigned long copyPlaneGeneration; -static int copyPlaneScreenIndex = -1; +static DevPrivateKey copyPlaneScreenKey = ©PlaneScreenKey; typedef RegionPtr (*CopyPlaneFuncPtr)( DrawablePtr /* pSrcDrawable */, @@ -417,14 +416,7 @@ mfbRegisterCopyPlaneProc (pScreen, proc) ScreenPtr pScreen; CopyPlaneFuncPtr proc; { - if (copyPlaneGeneration != serverGeneration) - { - copyPlaneScreenIndex = AllocateScreenPrivateIndex(); - if (copyPlaneScreenIndex < 0) - return FALSE; - copyPlaneGeneration = serverGeneration; - } - pScreen->devPrivates[copyPlaneScreenIndex].fptr = (CopyPlaneFuncPtr)proc; + dixSetPrivate(&pScreen->devPrivates, copyPlaneScreenKey, proc); return TRUE; } @@ -469,9 +461,9 @@ unsigned long plane; if (pSrcDrawable->depth != 1) { - if (copyPlaneScreenIndex >= 0 && - (copyPlane = (CopyPlaneFuncPtr) - pSrcDrawable->pScreen->devPrivates[copyPlaneScreenIndex].fptr) + if ((copyPlane = (CopyPlaneFuncPtr) + dixLookupPrivate(&pSrcDrawable->pScreen->devPrivates, + copyPlaneScreenKey)) ) { return (*copyPlane) (pSrcDrawable, pDstDrawable, diff --git a/mfb/mfbfillarc.c b/mfb/mfbfillarc.c index 30ec00dc3..cbf47a0eb 100644 --- a/mfb/mfbfillarc.c +++ b/mfb/mfbfillarc.c @@ -289,7 +289,8 @@ mfbPolyFillArcSolid(pDraw, pGC, narcs, parcs) RegionPtr cclip; int rop; - priv = (mfbPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr; + priv = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); rop = priv->rop; if ((rop == RROP_NOP) || !(pGC->planemask & 1)) return; diff --git a/mfb/mfbfillrct.c b/mfb/mfbfillrct.c index f9209d096..506776b3f 100644 --- a/mfb/mfbfillrct.c +++ b/mfb/mfbfillrct.c @@ -96,7 +96,8 @@ mfbPolyFillRect(pDrawable, pGC, nrectFill, prectInit) if (!(pGC->planemask & 1)) return; - priv = (mfbPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr; + priv = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); alu = priv->ropFillArea; pfn = priv->FillArea; ppix = pGC->pRotatedPixmap; diff --git a/mfb/mfbfillsp.c b/mfb/mfbfillsp.c index 112f5327c..e9be737da 100644 --- a/mfb/mfbfillsp.c +++ b/mfb/mfbfillsp.c @@ -624,7 +624,8 @@ mfbTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) if (pGC->fillStyle == FillTiled) rop = pGC->alu; else - rop = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->ropOpStip; + rop = ((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()))->ropOpStip; flip = 0; switch(rop) @@ -769,7 +770,8 @@ mfbUnnaturalTileFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) { pTile = pGC->stipple; tlwidth = pTile->devKind / PGSZB; - rop = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->ropOpStip; + rop = ((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()))->ropOpStip; } xSrc = pDrawable->x; @@ -926,7 +928,8 @@ mfbUnnaturalStippleFS(pDrawable, pGC, nInit, pptInit, pwidthInit, fSorted) ppt, pwidth, fSorted); pTile = pGC->stipple; - rop = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->rop; + rop = ((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()))->rop; tlwidth = pTile->devKind / PGSZB; xSrc = pDrawable->x; ySrc = pDrawable->y; diff --git a/mfb/mfbgc.c b/mfb/mfbgc.c index c60e97676..7492d7c04 100644 --- a/mfb/mfbgc.c +++ b/mfb/mfbgc.c @@ -381,7 +381,8 @@ matchCommon ( FONTMINBOUNDS(pGC->font,leftSideBearing) > 32 || FONTMINBOUNDS(pGC->font,characterWidth) < 0) return 0; - priv = (mfbPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr; + priv = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); for (i = 0; i < numberCommonOps; i++) { cop = &mfbCommonOps[i]; if ((pGC->fgPixel & 1) != cop->fg) @@ -420,7 +421,8 @@ mfbCreateGC(pGC) /* mfb wants to translate before scan convesion */ pGC->miTranslate = 1; - pPriv = (mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr); + pPriv = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); pPriv->rop = mfbReduceRop(pGC->alu, pGC->fgPixel); pGC->fExpose = TRUE; pGC->pRotatedPixmap = NullPixmap; @@ -508,8 +510,8 @@ mfbValidateGC(pGC, changes, pDrawable) new_rotate = (oldOrg.x != pGC->lastWinOrg.x) || (oldOrg.y != pGC->lastWinOrg.y); - devPriv = ((mfbPrivGCPtr) (pGC->devPrivates[mfbGCPrivateIndex].ptr)); - + devPriv = (mfbPrivGCPtr)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); /* if the client clip is different or moved OR the subwindowMode has changed OR diff --git a/mfb/mfbimggblt.c b/mfb/mfbimggblt.c index e5c186b89..2778b625c 100644 --- a/mfb/mfbimggblt.c +++ b/mfb/mfbimggblt.c @@ -184,7 +184,8 @@ MFBIMAGEGLYPHBLT(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) but that is usually not a cheap thing to do. */ - pPrivGC = pGC->devPrivates[mfbGCPrivateIndex].ptr; + pPrivGC = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); oldFillArea = pPrivGC->FillArea; if (pGC->bgPixel & 1) diff --git a/mfb/mfbline.c b/mfb/mfbline.c index 863a6187b..65baa5efd 100644 --- a/mfb/mfbline.c +++ b/mfb/mfbline.c @@ -146,7 +146,8 @@ mfbLineSS (pDrawable, pGC, mode, npt, pptInit) return; cclip = pGC->pCompositeClip; - alu = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->rop; + alu = ((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()))->rop; pboxInit = REGION_RECTS(cclip); nboxInit = REGION_NUM_RECTS(cclip); @@ -525,7 +526,8 @@ mfbLineSD( pDrawable, pGC, mode, npt, pptInit) return; cclip = pGC->pCompositeClip; - fgrop = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->rop; + fgrop = ((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()))->rop; pboxInit = REGION_RECTS(cclip); nboxInit = REGION_NUM_RECTS(cclip); diff --git a/mfb/mfbpixmap.c b/mfb/mfbpixmap.c index b13e3af0f..1f3f011fb 100644 --- a/mfb/mfbpixmap.c +++ b/mfb/mfbpixmap.c @@ -113,7 +113,7 @@ mfbDestroyPixmap(pPixmap) { if(--pPixmap->refcnt) return TRUE; - dixFreePrivates(*DEVPRIV_PTR(pPixmap)); + dixFreePrivates(pPixmap->devPrivates); xfree(pPixmap); return TRUE; } diff --git a/mfb/mfbpntwin.c b/mfb/mfbpntwin.c index b18797a40..725d6beb8 100644 --- a/mfb/mfbpntwin.c +++ b/mfb/mfbpntwin.c @@ -56,6 +56,7 @@ SOFTWARE. #include "regionstr.h" #include "pixmapstr.h" #include "scrnintstr.h" +#include "privates.h" #include "mfb.h" #include "maskbits.h" @@ -69,8 +70,8 @@ mfbPaintWindow(pWin, pRegion, what) { register mfbPrivWin *pPrivWin; - pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr); - + pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + mfbGetWindowPrivateKey()); switch (what) { case PW_BACKGROUND: switch (pWin->backgroundState) { diff --git a/mfb/mfbpolypnt.c b/mfb/mfbpolypnt.c index 1c4045126..146cfdce0 100644 --- a/mfb/mfbpolypnt.c +++ b/mfb/mfbpolypnt.c @@ -88,7 +88,8 @@ mfbPolyPoint(pDrawable, pGC, mode, npt, pptInit) if (!(pGC->planemask & 1)) return; - pGCPriv = (mfbPrivGC *) pGC->devPrivates[mfbGCPrivateIndex].ptr; + pGCPriv = (mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()); rop = pGCPriv->rop; mfbGetPixelWidthAndPointer(pDrawable, nlwidth, addrl); diff --git a/mfb/mfbscrinit.c b/mfb/mfbscrinit.c index 13ea5d365..515e9e3ce 100644 --- a/mfb/mfbscrinit.c +++ b/mfb/mfbscrinit.c @@ -68,13 +68,13 @@ SOFTWARE. #include "servermd.h" #ifdef PIXMAP_PER_WINDOW -int frameWindowPrivateIndex; -int frameGetWindowPrivateIndex(void) { return frameWindowPrivateIndex; } +static DevPrivateKey frameWindowPrivateKey = &frameWindowPrivateKey; +DevPrivateKey frameGetWindowPrivateKey(void) { return frameWindowPrivateKey; } #endif -int mfbWindowPrivateIndex; -int mfbGetWindowPrivateIndex(void) { return mfbWindowPrivateIndex; } -int mfbGCPrivateIndex; -int mfbGetGCPrivateIndex(void) { return mfbGCPrivateIndex; } +static DevPrivateKey mfbWindowPrivateKey = &mfbWindowPrivateKey; +DevPrivateKey mfbGetWindowPrivateKey(void) { return mfbWindowPrivateKey; } +static DevPrivateKey mfbGCPrivateKey = &mfbGCPrivateKey; +DevPrivateKey mfbGetGCPrivateKey(void) { return mfbGCPrivateKey; } static unsigned long mfbGeneration = 0; static VisualRec visual = { @@ -90,30 +90,23 @@ static DepthRec depth = { }; Bool -mfbAllocatePrivates(pScreen, pWinIndex, pGCIndex) - ScreenPtr pScreen; - int *pWinIndex, *pGCIndex; +mfbAllocatePrivates(ScreenPtr pScreen, + DevPrivateKey *pWinIndex, DevPrivateKey *pGCIndex) { if (mfbGeneration != serverGeneration) { -#ifdef PIXMAP_PER_WINDOW - frameWindowPrivateIndex = AllocateWindowPrivateIndex(); -#endif - mfbWindowPrivateIndex = AllocateWindowPrivateIndex(); - mfbGCPrivateIndex = miAllocateGCPrivateIndex(); visual.vid = FakeClientID(0); VID = visual.vid; mfbGeneration = serverGeneration; } if (pWinIndex) - *pWinIndex = mfbWindowPrivateIndex; + *pWinIndex = mfbWindowPrivateKey; if (pGCIndex) - *pGCIndex = mfbGCPrivateIndex; + *pGCIndex = mfbGCPrivateKey; pScreen->GetWindowPixmap = mfbGetWindowPixmap; pScreen->SetWindowPixmap = mfbSetWindowPixmap; - return (AllocateWindowPrivate(pScreen, mfbWindowPrivateIndex, - sizeof(mfbPrivWin)) && - AllocateGCPrivate(pScreen, mfbGCPrivateIndex, sizeof(mfbPrivGC))); + return (dixRequestPrivate(mfbWindowPrivateKey, sizeof(mfbPrivWin)) && + dixRequestPrivate(mfbGCPrivateKey, sizeof(mfbPrivGC))); } @@ -126,7 +119,7 @@ mfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width) int dpix, dpiy; /* dots per inch */ int width; /* pixel width of frame buffer */ { - if (!mfbAllocatePrivates(pScreen, (int *)NULL, (int *)NULL)) + if (!mfbAllocatePrivates(pScreen, NULL, NULL)) return FALSE; pScreen->defColormap = (Colormap) FakeClientID(0); /* whitePixel, blackPixel */ @@ -167,7 +160,8 @@ mfbGetWindowPixmap(pWin) WindowPtr pWin; { #ifdef PIXMAP_PER_WINDOW - return (PixmapPtr)(pWin->devPrivates[frameWindowPrivateIndex].ptr); + return (PixmapPtr)dixLookupPrivate(&pWin->devPrivates, + frameWindowPrivateKey); #else ScreenPtr pScreen = pWin->drawable.pScreen; @@ -181,7 +175,7 @@ mfbSetWindowPixmap(pWin, pPix) PixmapPtr pPix; { #ifdef PIXMAP_PER_WINDOW - pWin->devPrivates[frameWindowPrivateIndex].ptr = (pointer)pPix; + dixSetPrivate(&pWin->devPrivates, frameWindowPrivateKey, pPix); #else (* pWin->drawable.pScreen->SetScreenPixmap)(pPix); #endif diff --git a/mfb/mfbwindow.c b/mfb/mfbwindow.c index b138d5805..c522b07a3 100644 --- a/mfb/mfbwindow.c +++ b/mfb/mfbwindow.c @@ -55,6 +55,7 @@ SOFTWARE. #include #include "scrnintstr.h" #include "windowstr.h" +#include "privates.h" #include "mfb.h" #include "mistruct.h" #include "regionstr.h" @@ -66,7 +67,8 @@ mfbCreateWindow(pWin) { register mfbPrivWin *pPrivWin; - pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr); + pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + mfbGetWindowPrivateKey()); pPrivWin->pRotatedBorder = NullPixmap; pPrivWin->pRotatedBackground = NullPixmap; pPrivWin->fastBackground = FALSE; @@ -83,8 +85,8 @@ mfbDestroyWindow(pWin) { register mfbPrivWin *pPrivWin; - pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr); - + pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + mfbGetWindowPrivateKey()); if (pPrivWin->pRotatedBorder) (*pWin->drawable.pScreen->DestroyPixmap)(pPrivWin->pRotatedBorder); if (pPrivWin->pRotatedBackground) @@ -116,7 +118,8 @@ mfbPositionWindow(pWin, x, y) register mfbPrivWin *pPrivWin; int reset = 0; - pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr); + pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + mfbGetWindowPrivateKey()); if (pWin->backgroundState == BackgroundPixmap && pPrivWin->fastBackground) { mfbXRotatePixmap(pPrivWin->pRotatedBackground, @@ -227,7 +230,8 @@ mfbChangeWindowAttributes(pWin, mask) register mfbPrivWin *pPrivWin; WindowPtr pBgWin; - pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbWindowPrivateIndex].ptr); + pPrivWin = (mfbPrivWin *)dixLookupPrivate(&pWin->devPrivates, + mfbGetWindowPrivateKey()); /* * When background state changes from ParentRelative and * we had previously rotated the fast border pixmap to match diff --git a/mfb/mfbzerarc.c b/mfb/mfbzerarc.c index 964e2f100..624e45fee 100644 --- a/mfb/mfbzerarc.c +++ b/mfb/mfbzerarc.c @@ -92,7 +92,8 @@ mfbZeroArcSS( PixelType pmask; register PixelType *paddr; - if (((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->rop == + if (((mfbPrivGC *)dixLookupPrivate(&pGC->devPrivates, + mfbGetGCPrivateKey()))->rop == RROP_BLACK) pixel = 0; else diff --git a/mi/mi.h b/mi/mi.h index c71c9b7c0..8d8f488a0 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -55,6 +55,7 @@ SOFTWARE. #include #include "input.h" #include "cursor.h" +#include "privates.h" #define MiBits CARD32 @@ -412,7 +413,7 @@ extern Bool miScreenInit( VisualPtr /*visuals*/ ); -extern int miAllocateGCPrivateIndex( +extern DevPrivateKey miAllocateGCPrivateIndex( void ); diff --git a/mi/mibank.c b/mi/mibank.c index 00638a4c2..b52399cfe 100644 --- a/mi/mibank.c +++ b/mi/mibank.c @@ -177,15 +177,15 @@ typedef struct _miBankQueue #define ALLOCATE_LOCAL_ARRAY(atype, ntype) \ (atype *)ALLOCATE_LOCAL((ntype) * sizeof(atype)) -static int miBankScreenIndex; -static int miBankGCIndex; +static DevPrivateKey miBankScreenKey = &miBankScreenKey; +static DevPrivateKey miBankGCKey = &miBankGCKey; static unsigned long miBankGeneration = 0; -#define BANK_SCRPRIVLVAL pScreen->devPrivates[miBankScreenIndex].ptr +#define BANK_SCRPRIVLVAL dixLookupPrivate(&pScreen->devPrivates, miBankScreenKey) #define BANK_SCRPRIVATE ((miBankScreenPtr)(BANK_SCRPRIVLVAL)) -#define BANK_GCPRIVLVAL(pGC) (pGC)->devPrivates[miBankGCIndex].ptr +#define BANK_GCPRIVLVAL(pGC) dixLookupPrivate(&(pGC)->devPrivates, miBankGCKey) #define BANK_GCPRIVATE(pGC) ((miBankGCPtr)(BANK_GCPRIVLVAL(pGC))) @@ -2116,15 +2116,9 @@ miInitializeBanking( /* Private areas */ if (miBankGeneration != serverGeneration) - { - if (((miBankScreenIndex = AllocateScreenPrivateIndex()) < 0) || - ((miBankGCIndex = AllocateGCPrivateIndex()) < 0)) - return FALSE; - miBankGeneration = serverGeneration; - } - if (!AllocateGCPrivate(pScreen, miBankGCIndex, + if (!dixRequestPrivate(miBankGCKey, (nBanks * sizeof(RegionPtr)) + (sizeof(miBankGCRec) - sizeof(RegionPtr)))) return FALSE; @@ -2273,7 +2267,7 @@ miInitializeBanking( SCREEN_WRAP(PaintWindowBorder, miBankPaintWindow); SCREEN_WRAP(CopyWindow, miBankCopyWindow); - BANK_SCRPRIVLVAL = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, miBankScreenKey, pScreenPriv); return TRUE; } diff --git a/mi/midispcur.c b/mi/midispcur.c index feb6c2f98..8b782925a 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -54,8 +54,7 @@ in this Software without prior written authorization from The Open Group. /* per-screen private data */ -static int miDCScreenIndex; -static unsigned long miDCGeneration = 0; +static DevPrivateKey miDCScreenKey = &miDCScreenKey; static Bool miDCCloseScreen(int index, ScreenPtr pScreen); @@ -117,13 +116,6 @@ miDCInitialize (pScreen, screenFuncs) { miDCScreenPtr pScreenPriv; - if (miDCGeneration != serverGeneration) - { - miDCScreenIndex = AllocateScreenPrivateIndex (); - if (miDCScreenIndex < 0) - return FALSE; - miDCGeneration = serverGeneration; - } pScreenPriv = (miDCScreenPtr) xalloc (sizeof (miDCScreenRec)); if (!pScreenPriv) return FALSE; @@ -149,7 +141,7 @@ miDCInitialize (pScreen, screenFuncs) pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = miDCCloseScreen; - pScreen->devPrivates[miDCScreenIndex].ptr = (pointer) pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, miDCScreenKey, pScreenPriv); if (!miSpriteInitialize (pScreen, &miDCFuncs, screenFuncs)) { @@ -170,7 +162,8 @@ miDCCloseScreen (index, pScreen) { miDCScreenPtr pScreenPriv; - pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; + pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miDCScreenKey); pScreen->CloseScreen = pScreenPriv->CloseScreen; tossGC (pScreenPriv->pSourceGC); tossGC (pScreenPriv->pMaskGC); @@ -475,7 +468,8 @@ miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) if (!pPriv) return FALSE; } - pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; + pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miDCScreenKey); pWin = WindowTable[pScreen->myNum]; #ifdef ARGB_CURSOR if (pPriv->pPicture) @@ -520,7 +514,8 @@ miDCSaveUnderCursor (pScreen, x, y, w, h) WindowPtr pWin; GCPtr pGC; - pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; + pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miDCScreenKey); pSave = pScreenPriv->pSave; pWin = WindowTable[pScreen->myNum]; if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) @@ -552,7 +547,8 @@ miDCRestoreUnderCursor (pScreen, x, y, w, h) WindowPtr pWin; GCPtr pGC; - pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; + pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miDCScreenKey); pSave = pScreenPriv->pSave; pWin = WindowTable[pScreen->myNum]; if (!pSave) @@ -578,7 +574,8 @@ miDCChangeSave (pScreen, x, y, w, h, dx, dy) GCPtr pGC; int sourcex, sourcey, destx, desty, copyw, copyh; - pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; + pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miDCScreenKey); pSave = pScreenPriv->pSave; pWin = WindowTable[pScreen->myNum]; /* @@ -721,7 +718,8 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) if (!pPriv) return FALSE; } - pScreenPriv = (miDCScreenPtr) pScreen->devPrivates[miDCScreenIndex].ptr; + pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miDCScreenKey); pWin = WindowTable[pScreen->myNum]; pTemp = pScreenPriv->pTemp; if (!pTemp || diff --git a/mi/miline.h b/mi/miline.h index b97b8cf9d..ffa4b2743 100644 --- a/mi/miline.h +++ b/mi/miline.h @@ -119,9 +119,8 @@ extern void miSetZeroLineBias( t = y1; y1 = y2; y2 = t;\ } -#define miGetZeroLineBias(_pScreen) \ - ((miZeroLineScreenIndex < 0) ? \ - 0 : ((_pScreen)->devPrivates[miZeroLineScreenIndex].uval)) +#define miGetZeroLineBias(_pScreen) ((unsigned long) \ + dixLookupPrivate(&(_pScreen)->devPrivates, miZeroLineScreenKey)) #define CalcLineDeltas(_x1,_y1,_x2,_y2,_adx,_ady,_sx,_sy,_SX,_SY,_octant) \ (_octant) = 0; \ @@ -148,7 +147,7 @@ extern void miSetZeroLineBias( #define IsXDecreasingOctant(_octant) ((_octant) & XDECREASING) #define IsYDecreasingOctant(_octant) ((_octant) & YDECREASING) -extern int miZeroLineScreenIndex; +extern DevPrivateKey miZeroLineScreenKey; extern int miZeroClipLine( int /*xmin*/, diff --git a/mi/mioverlay.c b/mi/mioverlay.c index 1dbb85da5..a1f32ad60 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -10,6 +10,7 @@ #include "mi.h" #include "gcstruct.h" #include "regionstr.h" +#include "privates.h" #include "mivalidate.h" #include "mioverlay.h" #include "migc.h" @@ -53,9 +54,8 @@ typedef struct { Bool copyUnderlay; } miOverlayScreenRec, *miOverlayScreenPtr; -static unsigned long miOverlayGeneration = 0; -static int miOverlayWindowIndex = -1; -static int miOverlayScreenIndex = -1; +static DevPrivateKey miOverlayWindowKey = &miOverlayWindowKey; +static DevPrivateKey miOverlayScreenKey = &miOverlayScreenKey; static void RebuildTree(WindowPtr); static Bool HasUnderlayChildren(WindowPtr); @@ -85,10 +85,10 @@ static void miOverlaySetShape(WindowPtr); #endif static void miOverlayChangeBorderWidth(WindowPtr, unsigned int); -#define MIOVERLAY_GET_SCREEN_PRIVATE(pScreen) \ - ((miOverlayScreenPtr)((pScreen)->devPrivates[miOverlayScreenIndex].ptr)) -#define MIOVERLAY_GET_WINDOW_PRIVATE(pWin) \ - ((miOverlayWindowPtr)((pWin)->devPrivates[miOverlayWindowIndex].ptr)) +#define MIOVERLAY_GET_SCREEN_PRIVATE(pScreen) ((miOverlayScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, miOverlayScreenKey)) +#define MIOVERLAY_GET_WINDOW_PRIVATE(pWin) ((miOverlayWindowPtr) \ + dixLookupPrivate(&(pWin)->devPrivates, miOverlayWindowKey)) #define MIOVERLAY_GET_WINDOW_TREE(pWin) \ (MIOVERLAY_GET_WINDOW_PRIVATE(pWin)->tree) @@ -112,22 +112,13 @@ miInitOverlay( if(!inOverlayFunc || !transFunc) return FALSE; - if(miOverlayGeneration != serverGeneration) { - if(((miOverlayScreenIndex = AllocateScreenPrivateIndex()) < 0) || - ((miOverlayWindowIndex = AllocateWindowPrivateIndex()) < 0)) - return FALSE; - - miOverlayGeneration = serverGeneration; - } - - if(!AllocateWindowPrivate(pScreen, miOverlayWindowIndex, - sizeof(miOverlayWindowRec))) + if(!dixRequestPrivate(miOverlayWindowKey, sizeof(miOverlayWindowRec))) return FALSE; if(!(pScreenPriv = xalloc(sizeof(miOverlayScreenRec)))) return FALSE; - pScreen->devPrivates[miOverlayScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, miOverlayScreenKey, pScreenPriv); pScreenPriv->InOverlay = inOverlayFunc; pScreenPriv->MakeTransparent = transFunc; diff --git a/mi/mipointer.c b/mi/mipointer.c index b86a26a97..4d1db4fca 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -41,10 +41,10 @@ in this Software without prior written authorization from The Open Group. # include "dixstruct.h" # include "inputstr.h" -_X_EXPORT int miPointerScreenIndex; -static unsigned long miPointerGeneration = 0; +_X_EXPORT DevPrivateKey miPointerScreenKey = &miPointerScreenKey; -#define GetScreenPrivate(s) ((miPointerScreenPtr) ((s)->devPrivates[miPointerScreenIndex].ptr)) +#define GetScreenPrivate(s) ((miPointerScreenPtr) \ + dixLookupPrivate(&(s)->devPrivates, miPointerScreenKey)) #define SetupScreen(s) miPointerScreenPtr pScreenPriv = GetScreenPrivate(s) /* @@ -76,13 +76,6 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) { miPointerScreenPtr pScreenPriv; - if (miPointerGeneration != serverGeneration) - { - miPointerScreenIndex = AllocateScreenPrivateIndex(); - if (miPointerScreenIndex < 0) - return FALSE; - miPointerGeneration = serverGeneration; - } pScreenPriv = (miPointerScreenPtr) xalloc (sizeof (miPointerScreenRec)); if (!pScreenPriv) return FALSE; @@ -99,7 +92,7 @@ miPointerInitialize (pScreen, spriteFuncs, screenFuncs, waitForUpdate) pScreenPriv->showTransparent = FALSE; pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = miPointerCloseScreen; - pScreen->devPrivates[miPointerScreenIndex].ptr = (pointer) pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, miPointerScreenKey, pScreenPriv); /* * set up screen cursor method table */ diff --git a/mi/mipointer.h b/mi/mipointer.h index 1bce42c26..e864fddf4 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -28,6 +28,7 @@ in this Software without prior written authorization from The Open Group. #include "cursor.h" #include "input.h" +#include "privates.h" typedef struct _miPointerSpriteFuncRec { Bool (*RealizeCursor)( @@ -166,6 +167,6 @@ extern void miPointerSetPosition( extern void miPointerUpdateSprite( DeviceIntPtr pDev); -extern int miPointerScreenIndex; +extern DevPrivateKey miPointerScreenKey; #endif /* MIPOINTER_H */ diff --git a/mi/miscrinit.c b/mi/miscrinit.c index cc40cbede..2dd8cd955 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -293,35 +293,22 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, return miScreenDevPrivateInit(pScreen, width, pbits); } -_X_EXPORT int +static DevPrivateKey privateKey = &privateKey; + +_X_EXPORT DevPrivateKey miAllocateGCPrivateIndex() { - static int privateIndex = -1; - static unsigned long miGeneration = 0; - - if (miGeneration != serverGeneration) - { - privateIndex = AllocateGCPrivateIndex(); - miGeneration = serverGeneration; - } - return privateIndex; + return privateKey; } -_X_EXPORT int miZeroLineScreenIndex; -static unsigned int miZeroLineGeneration = 0; +_X_EXPORT DevPrivateKey miZeroLineScreenKey; _X_EXPORT void miSetZeroLineBias(pScreen, bias) ScreenPtr pScreen; unsigned int bias; { - if (miZeroLineGeneration != serverGeneration) - { - miZeroLineScreenIndex = AllocateScreenPrivateIndex(); - miZeroLineGeneration = serverGeneration; - } - if (miZeroLineScreenIndex >= 0) - pScreen->devPrivates[miZeroLineScreenIndex].uval = bias; + dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey, (pointer)bias); } _X_EXPORT PixmapPtr diff --git a/mi/misprite.c b/mi/misprite.c index 0b402fa59..0af3368b6 100644 --- a/mi/misprite.c +++ b/mi/misprite.c @@ -67,8 +67,7 @@ in this Software without prior written authorization from The Open Group. * screen wrappers */ -static int miSpriteScreenIndex; -static unsigned long miSpriteGeneration = 0; +static DevPrivateKey miSpriteScreenKey = &miSpriteScreenKey; static Bool miSpriteCloseScreen(int i, ScreenPtr pScreen); static void miSpriteGetImage(DrawablePtr pDrawable, int sx, int sy, @@ -91,10 +90,9 @@ static void miSpriteStoreColors(ColormapPtr pMap, int ndef, static void miSpriteComputeSaved(ScreenPtr pScreen); -#define SCREEN_PROLOGUE(pScreen, field)\ - ((pScreen)->field = \ - ((miSpriteScreenPtr) (pScreen)->devPrivates[miSpriteScreenIndex].ptr)->field) - +#define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \ + ((miSpriteScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ + miSpriteScreenKey))->field) #define SCREEN_EPILOGUE(pScreen, field)\ ((pScreen)->field = miSprite##field) @@ -128,8 +126,8 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) ScreenPtr pScreen = closure; miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); if (pScreenPriv->isUp && RECT_IN_REGION (pScreen, pRegion, &pScreenPriv->saved) != rgnOUT) { @@ -156,14 +154,6 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) if (!DamageSetup (pScreen)) return FALSE; - if (miSpriteGeneration != serverGeneration) - { - miSpriteScreenIndex = AllocateScreenPrivateIndex (); - if (miSpriteScreenIndex < 0) - return FALSE; - miSpriteGeneration = serverGeneration; - } - pScreenPriv = (miSpriteScreenPtr) xalloc (sizeof (miSpriteScreenRec)); if (!pScreenPriv) return FALSE; @@ -214,7 +204,7 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs) pScreenPriv->colors[MASK_COLOR].red = 0; pScreenPriv->colors[MASK_COLOR].green = 0; pScreenPriv->colors[MASK_COLOR].blue = 0; - pScreen->devPrivates[miSpriteScreenIndex].ptr = (pointer) pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, miSpriteScreenKey, pScreenPriv); pScreen->CloseScreen = miSpriteCloseScreen; pScreen->GetImage = miSpriteGetImage; @@ -247,8 +237,8 @@ miSpriteCloseScreen (i, pScreen) { miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->GetImage = pScreenPriv->GetImage; pScreen->GetSpans = pScreenPriv->GetSpans; @@ -278,8 +268,8 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine) SCREEN_PROLOGUE (pScreen, GetImage); - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp && ORG_OVERLAP(&pScreenPriv->saved,pDrawable->x,pDrawable->y, sx, sy, w, h)) @@ -308,8 +298,8 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart) SCREEN_PROLOGUE (pScreen, GetSpans); - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp) { DDXPointPtr pts; @@ -350,8 +340,8 @@ miSpriteSourceValidate (pDrawable, x, y, width, height) SCREEN_PROLOGUE (pScreen, SourceValidate); - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp && ORG_OVERLAP(&pScreenPriv->saved, pDrawable->x, pDrawable->y, x, y, width, height)) @@ -374,7 +364,8 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) SCREEN_PROLOGUE (pScreen, CopyWindow); - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); /* * Damage will take care of destination check */ @@ -399,8 +390,8 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask) ScreenPtr pScreen = screenInfo.screens[i]; miSpriteScreenPtr pPriv; - pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); SCREEN_PROLOGUE(pScreen, BlockHandler); (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); @@ -421,8 +412,8 @@ miSpriteInstallColormap (pMap) ScreenPtr pScreen = pMap->pScreen; miSpriteScreenPtr pPriv; - pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); SCREEN_PROLOGUE(pScreen, InstallColormap); (*pScreen->InstallColormap) (pMap); @@ -450,8 +441,8 @@ miSpriteStoreColors (pMap, ndef, pdef) int updated; VisualPtr pVisual; - pPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; - + pPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); SCREEN_PROLOGUE(pScreen, StoreColors); (*pScreen->StoreColors) (pMap, ndef, pdef); @@ -518,7 +509,7 @@ static void miSpriteFindColors (ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv = (miSpriteScreenPtr) - pScreen->devPrivates[miSpriteScreenIndex].ptr; + dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); CursorPtr pCursor; xColorItem *sourceColor, *maskColor; @@ -562,7 +553,8 @@ miSpriteRealizeCursor (pScreen, pCursor) { miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); if (pCursor == pScreenPriv->pCursor) pScreenPriv->checkPixels = TRUE; return (*pScreenPriv->funcs->RealizeCursor) (pScreen, pCursor); @@ -575,7 +567,8 @@ miSpriteUnrealizeCursor (pScreen, pCursor) { miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); return (*pScreenPriv->funcs->UnrealizeCursor) (pScreen, pCursor); } @@ -588,7 +581,8 @@ miSpriteSetCursor (pScreen, pCursor, x, y) { miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); if (!pCursor) { pScreenPriv->shouldBeUp = FALSE; @@ -688,7 +682,8 @@ miSpriteMoveCursor (pScreen, x, y) { miSpriteScreenPtr pScreenPriv; - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); miSpriteSetCursor (pScreen, pScreenPriv->pCursor, x, y); } @@ -703,7 +698,8 @@ miSpriteRemoveCursor (pScreen) miSpriteScreenPtr pScreenPriv; DamageDrawInternal (pScreen, TRUE); - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); miSpriteIsUpFALSE (pScreen, pScreenPriv); pScreenPriv->pCacheWin = NullWindow; if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pScreen, @@ -732,7 +728,8 @@ miSpriteRestoreCursor (pScreen) DamageDrawInternal (pScreen, TRUE); miSpriteComputeSaved (pScreen); - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); pCursor = pScreenPriv->pCursor; x = pScreenPriv->x - (int)pCursor->bits->xhot; y = pScreenPriv->y - (int)pCursor->bits->yhot; @@ -767,7 +764,8 @@ miSpriteComputeSaved (pScreen) int wpad, hpad; CursorPtr pCursor; - pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr; + pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + miSpriteScreenKey); pCursor = pScreenPriv->pCursor; x = pScreenPriv->x - (int)pCursor->bits->xhot; y = pScreenPriv->y - (int)pCursor->bits->yhot; diff --git a/miext/cw/cw.c b/miext/cw/cw.c index b03f5e3a8..df4b121d8 100644 --- a/miext/cw/cw.c +++ b/miext/cw/cw.c @@ -43,13 +43,12 @@ #define CW_ASSERT(x) do {} while (0) #endif -int cwGCIndex; -int cwScreenIndex; -int cwWindowIndex; +DevPrivateKey cwGCKey = &cwGCKey; +DevPrivateKey cwScreenKey = &cwScreenKey; +DevPrivateKey cwWindowKey = &cwWindowKey; #ifdef RENDER -int cwPictureIndex; +DevPrivateKey cwPictureKey = &cwPictureKey; #endif -static unsigned long cwGeneration = 0; extern GCOps cwGCOps; static Bool @@ -237,7 +236,7 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) static void cwChangeGC(GCPtr pGC, unsigned long mask) { - cwGCPtr pPriv = (cwGCPtr)(pGC)->devPrivates[cwGCIndex].ptr; + cwGCPtr pPriv = (cwGCPtr)dixLookupPrivate(&pGC->devPrivates, cwGCKey); FUNC_PROLOGUE(pGC, pPriv); @@ -249,7 +248,7 @@ cwChangeGC(GCPtr pGC, unsigned long mask) static void cwCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) { - cwGCPtr pPriv = (cwGCPtr)(pGCDst)->devPrivates[cwGCIndex].ptr; + cwGCPtr pPriv = (cwGCPtr)dixLookupPrivate(&pGCDst->devPrivates, cwGCKey); FUNC_PROLOGUE(pGCDst, pPriv); @@ -261,7 +260,7 @@ cwCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) static void cwDestroyGC(GCPtr pGC) { - cwGCPtr pPriv = (cwGCPtr)(pGC)->devPrivates[cwGCIndex].ptr; + cwGCPtr pPriv = (cwGCPtr)dixLookupPrivate(&pGC->devPrivates, cwGCKey); FUNC_PROLOGUE(pGC, pPriv); @@ -275,7 +274,7 @@ cwDestroyGC(GCPtr pGC) static void cwChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) { - cwGCPtr pPriv = (cwGCPtr)(pGC)->devPrivates[cwGCIndex].ptr; + cwGCPtr pPriv = (cwGCPtr)dixLookupPrivate(&pGC->devPrivates, cwGCKey); FUNC_PROLOGUE(pGC, pPriv); @@ -287,7 +286,7 @@ cwChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) static void cwCopyClip(GCPtr pgcDst, GCPtr pgcSrc) { - cwGCPtr pPriv = (cwGCPtr)(pgcDst)->devPrivates[cwGCIndex].ptr; + cwGCPtr pPriv = (cwGCPtr)dixLookupPrivate(&pgcDst->devPrivates, cwGCKey); FUNC_PROLOGUE(pgcDst, pPriv); @@ -299,7 +298,7 @@ cwCopyClip(GCPtr pgcDst, GCPtr pgcSrc) static void cwDestroyClip(GCPtr pGC) { - cwGCPtr pPriv = (cwGCPtr)(pGC)->devPrivates[cwGCIndex].ptr; + cwGCPtr pPriv = (cwGCPtr)dixLookupPrivate(&pGC->devPrivates, cwGCKey); FUNC_PROLOGUE(pGC, pPriv); @@ -621,34 +620,14 @@ miInitializeCompositeWrapper(ScreenPtr pScreen) Bool has_render = GetPictureScreenIfSet(pScreen) != NULL; #endif - if (cwGeneration != serverGeneration) - { - cwScreenIndex = AllocateScreenPrivateIndex(); - if (cwScreenIndex < 0) - return; - cwGCIndex = AllocateGCPrivateIndex(); - cwWindowIndex = AllocateWindowPrivateIndex(); -#ifdef RENDER - if (has_render) - cwPictureIndex = AllocatePicturePrivateIndex(); -#endif - cwGeneration = serverGeneration; - } - if (!AllocateGCPrivate(pScreen, cwGCIndex, sizeof(cwGCRec))) + if (!dixRequestPrivate(cwGCKey, sizeof(cwGCRec))) return; - if (!AllocateWindowPrivate(pScreen, cwWindowIndex, 0)) - return; -#ifdef RENDER - if (has_render) { - if (!AllocatePicturePrivate(pScreen, cwPictureIndex, 0)) - return; - } -#endif + pScreenPriv = (cwScreenPtr)xalloc(sizeof(cwScreenRec)); if (!pScreenPriv) return; - pScreen->devPrivates[cwScreenIndex].ptr = (pointer)pScreenPriv; + dixSetPrivate(&pScreen->devPrivates, cwScreenKey, pScreenPriv); SCREEN_EPILOGUE(pScreen, CloseScreen, cwCloseScreen); SCREEN_EPILOGUE(pScreen, GetImage, cwGetImage); @@ -675,8 +654,8 @@ cwCloseScreen (int i, ScreenPtr pScreen) PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif - pScreenPriv = (cwScreenPtr)pScreen->devPrivates[cwScreenIndex].ptr; - + pScreenPriv = (cwScreenPtr)dixLookupPrivate(&pScreen->devPrivates, + cwScreenKey); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->GetImage = pScreenPriv->GetImage; pScreen->GetSpans = pScreenPriv->GetSpans; diff --git a/miext/cw/cw.h b/miext/cw/cw.h index 0d57b9b9d..45247d670 100644 --- a/miext/cw/cw.h +++ b/miext/cw/cw.h @@ -26,6 +26,7 @@ #include "gcstruct.h" #include "picturestr.h" +#include "privates.h" /* * One of these structures is allocated per GC that gets used with a window with @@ -43,10 +44,10 @@ typedef struct { GCFuncs *wrapFuncs; /* wrapped funcs */ } cwGCRec, *cwGCPtr; -extern int cwGCIndex; +extern DevPrivateKey cwGCKey; -#define getCwGC(pGC) ((cwGCPtr)(pGC)->devPrivates[cwGCIndex].ptr) -#define setCwGC(pGC,p) ((pGC)->devPrivates[cwGCIndex].ptr = (pointer) (p)) +#define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey)) +#define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p) /* * One of these structures is allocated per Picture that gets used with a @@ -59,17 +60,17 @@ typedef struct { unsigned long stateChanges; } cwPictureRec, *cwPicturePtr; -#define getCwPicture(pPicture) \ - (pPicture->pDrawable ? (cwPicturePtr)(pPicture)->devPrivates[cwPictureIndex].ptr : 0) -#define setCwPicture(pPicture,p) ((pPicture)->devPrivates[cwPictureIndex].ptr = (pointer) (p)) +#define getCwPicture(pPicture) (pPicture->pDrawable ? \ + (cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0) +#define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p) -extern int cwPictureIndex; +extern DevPrivateKey cwPictureKey; +extern DevPrivateKey cwWindowKey; -extern int cwWindowIndex; - -#define cwWindowPrivate(pWindow) ((pWindow)->devPrivates[cwWindowIndex].ptr) +#define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey) #define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow)) -#define setCwPixmap(pWindow,pPixmap) (cwWindowPrivate(pWindow) = (pointer) (pPixmap)) +#define setCwPixmap(pWindow,pPixmap) \ + dixSetPrivate(&(pWindow)->devPrivates, cwWindowKey, pPixmap) #define cwDrawableIsRedirWindow(pDraw) \ ((pDraw)->type == DRAWABLE_WINDOW && \ @@ -112,10 +113,10 @@ typedef struct { #endif } cwScreenRec, *cwScreenPtr; -extern int cwScreenIndex; +extern DevPrivateKey cwScreenKey; -#define getCwScreen(pScreen) ((cwScreenPtr)(pScreen)->devPrivates[cwScreenIndex].ptr) -#define setCwScreen(pScreen,p) ((cwScreenPtr)(pScreen)->devPrivates[cwScreenIndex].ptr = (p)) +#define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey)) +#define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p) #define CW_OFFSET_XYPOINTS(ppt, npt) do { \ DDXPointPtr _ppt = (DDXPointPtr)(ppt); \ diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 65314d8a9..b7f6fb550 100755 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -65,16 +65,15 @@ #define DAMAGE_DEBUG(x) #endif -#define getPixmapDamageRef(pPixmap) \ - ((DamagePtr *) &(pPixmap->devPrivates[damagePixPrivateIndex].ptr)) +#define getPixmapDamageRef(pPixmap) ((DamagePtr *) \ + dixLookupPrivateAddr(&(pPixmap)->devPrivates, damagePixPrivateKey)) #define pixmapDamage(pPixmap) damagePixPriv(pPixmap) -static int damageScrPrivateIndex; -static int damagePixPrivateIndex; -static int damageGCPrivateIndex; -static int damageWinPrivateIndex; -static int damageGeneration; +static DevPrivateKey damageScrPrivateKey = &damageScrPrivateKey; +static DevPrivateKey damagePixPrivateKey = &damagePixPrivateKey; +static DevPrivateKey damageGCPrivateKey = &damageGCPrivateKey; +static DevPrivateKey damageWinPrivateKey = &damageWinPrivateKey; static DamagePtr * getDrawableDamageRef (DrawablePtr pDrawable) @@ -115,7 +114,7 @@ getDrawableDamageRef (DrawablePtr pDrawable) #define winDamageRef(pWindow) \ DamagePtr *pPrev = (DamagePtr *) \ - &(pWindow->devPrivates[damageWinPrivateIndex].ptr) + dixLookupPrivateAddr(&(pWindow)->devPrivates, damageWinPrivateKey) static void DamageReportDamage (DamagePtr pDamage, RegionPtr pDamageRegion) @@ -1779,30 +1778,10 @@ DamageSetup (ScreenPtr pScreen) PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); #endif - if (damageGeneration != serverGeneration) - { - damageScrPrivateIndex = AllocateScreenPrivateIndex (); - if (damageScrPrivateIndex == -1) - return FALSE; - damageGCPrivateIndex = AllocateGCPrivateIndex (); - if (damageGCPrivateIndex == -1) - return FALSE; - damagePixPrivateIndex = AllocatePixmapPrivateIndex (); - if (damagePixPrivateIndex == -1) - return FALSE; - damageWinPrivateIndex = AllocateWindowPrivateIndex (); - if (damageWinPrivateIndex == -1) - return FALSE; - damageGeneration = serverGeneration; - } - if (pScreen->devPrivates[damageScrPrivateIndex].ptr) + if (dixLookupPrivate(&pScreen->devPrivates, damageScrPrivateKey)) return TRUE; - if (!AllocateGCPrivate (pScreen, damageGCPrivateIndex, sizeof (DamageGCPrivRec))) - return FALSE; - if (!AllocatePixmapPrivate (pScreen, damagePixPrivateIndex, 0)) - return FALSE; - if (!AllocateWindowPrivate (pScreen, damageWinPrivateIndex, 0)) + if (!dixRequestPrivate(damageGCPrivateKey, sizeof(DamageGCPrivRec))) return FALSE; pScrPriv = (DamageScrPrivPtr) xalloc (sizeof (DamageScrPrivRec)); @@ -1827,7 +1806,7 @@ DamageSetup (ScreenPtr pScreen) } #endif - pScreen->devPrivates[damageScrPrivateIndex].ptr = (pointer) pScrPriv; + dixSetPrivate(&pScreen->devPrivates, damageScrPrivateKey, pScrPriv); return TRUE; } diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h index 1e0efad4f..9f3dd6684 100755 --- a/miext/damage/damagestr.h +++ b/miext/damage/damagestr.h @@ -29,6 +29,7 @@ #include "damage.h" #include "gcstruct.h" +#include "privates.h" #ifdef RENDER # include "picturestr.h" #endif @@ -80,31 +81,31 @@ typedef struct _damageGCPriv { } DamageGCPrivRec, *DamageGCPrivPtr; /* XXX should move these into damage.c, damageScrPrivateIndex is static */ -#define damageGetScrPriv(pScr) \ - ((DamageScrPrivPtr) (pScr)->devPrivates[damageScrPrivateIndex].ptr) +#define damageGetScrPriv(pScr) ((DamageScrPrivPtr) \ + dixLookupPrivate(&(pScr)->devPrivates, damageScrPrivateKey)) #define damageScrPriv(pScr) \ DamageScrPrivPtr pScrPriv = damageGetScrPriv(pScr) #define damageGetPixPriv(pPix) \ - ((DamagePtr) (pPix)->devPrivates[damagePixPrivateIndex].ptr) + dixLookupPrivate(&(pPix)->devPrivates, damagePixPrivateKey) #define damgeSetPixPriv(pPix,v) \ - ((pPix)->devPrivates[damagePixPrivateIndex].ptr = (pointer ) (v)) + dixSetPrivate(&(pPix)->devPrivates, damagePixPrivateKey, v) #define damagePixPriv(pPix) \ DamagePtr pDamage = damageGetPixPriv(pPix) #define damageGetGCPriv(pGC) \ - ((DamageGCPrivPtr) (pGC)->devPrivates[damageGCPrivateIndex].ptr) + dixLookupPrivate(&(pGC)->devPrivates, damageGCPrivateKey) #define damageGCPriv(pGC) \ DamageGCPrivPtr pGCPriv = damageGetGCPriv(pGC) #define damageGetWinPriv(pWin) \ - ((DamagePtr) (pWin)->devPrivates[damageWinPrivateIndex].ptr) + ((DamagePtr)dixLookupPrivate(&(pWin)->devPrivates, damageWinPrivateKey)) #define damageSetWinPriv(pWin,d) \ - ((pWin)->devPrivates[damageWinPrivateIndex].ptr = (d)) + dixSetPrivate(&(pWin)->devPrivates, damageWinPrivateKey, d) #endif /* _DAMAGESTR_H_ */ diff --git a/miext/rootless/accel/rlAccel.c b/miext/rootless/accel/rlAccel.c index d62bee740..a14412416 100644 --- a/miext/rootless/accel/rlAccel.c +++ b/miext/rootless/accel/rlAccel.c @@ -46,10 +46,10 @@ typedef struct _rlAccelScreenRec { CloseScreenProcPtr CloseScreen; } rlAccelScreenRec, *rlAccelScreenPtr; -static int rlAccelScreenPrivateIndex = -1; +static DevPrivateKey rlAccelScreenPrivateKey = &rlAccelScreenPrivateKey; -#define RLACCELREC(pScreen) \ - ((rlAccelScreenRec *)(pScreen)->devPrivates[rlAccelScreenPrivateIndex].ptr) +#define RLACCELREC(pScreen) ((rlAccelScreenRec *) \ + dixLookupPrivate(&(pScreen)->devPrivates, rlAccelScreenPrivateKey)) /* This is mostly identical to fbGCOps. */ static GCOps rlAccelOps = { @@ -128,15 +128,8 @@ rlCloseScreen (int iScreen, ScreenPtr pScreen) Bool RootlessAccelInit(ScreenPtr pScreen) { - static unsigned long rlAccelGeneration = 0; rlAccelScreenRec *s; - if (rlAccelGeneration != serverGeneration) { - rlAccelScreenPrivateIndex = AllocateScreenPrivateIndex(); - if (rlAccelScreenPrivateIndex == -1) return FALSE; - rlAccelGeneration = serverGeneration; - } - s = xalloc(sizeof(rlAccelScreenRec)); if (!s) return FALSE; RLACCELREC(pScreen) = s; diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 3bf6af02f..5ebe35e63 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -52,9 +52,9 @@ // Global variables -extern int rootlessGCPrivateIndex; -extern int rootlessScreenPrivateIndex; -extern int rootlessWindowPrivateIndex; +extern DevPrivateKey rootlessGCPrivateKey; +extern DevPrivateKey rootlessScreenPrivateKey; +extern DevPrivateKey rootlessWindowPrivateKey; // RootlessGCRec: private per-gc data @@ -133,12 +133,17 @@ typedef struct _RootlessScreenRec { // Accessors for screen and window privates -#define SCREENREC(pScreen) \ - ((RootlessScreenRec *)(pScreen)->devPrivates[rootlessScreenPrivateIndex].ptr) +#define SCREENREC(pScreen) ((RootlessScreenRec *) \ + dixLookupPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey)) -#define WINREC(pWin) \ - ((RootlessWindowRec *)(pWin)->devPrivates[rootlessWindowPrivateIndex].ptr) +#define SETSCREENREC(pScreen, v) \ + dixSetPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey, v) +#define WINREC(pWin) ((RootlessWindowRec *) \ + dixLookupPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey)) + +#define SETWINREC(pWin, v) \ + dixSetPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey, v) // Call a rootless implementation function. // Many rootless implementation functions are allowed to be NULL. diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c index b26f52c54..bf129eadc 100644 --- a/miext/rootless/rootlessGC.c +++ b/miext/rootless/rootlessGC.c @@ -276,11 +276,11 @@ RootlessCreateGC(GCPtr pGC) Bool result; SCREEN_UNWRAP(pGC->pScreen, CreateGC); - s = (RootlessScreenRec *) pGC->pScreen-> - devPrivates[rootlessScreenPrivateIndex].ptr; + s = SCREENREC(pGC->pScreen); result = s->CreateGC(pGC); - gcrec = (RootlessGCRec *) pGC->devPrivates[rootlessGCPrivateIndex].ptr; + gcrec = (RootlessGCRec *) + dixLookupPrivate(&pGC->devPrivates, rootlessGCPrivateKey); gcrec->originalOps = NULL; // don't wrap ops yet gcrec->originalFuncs = pGC->funcs; pGC->funcs = &rootlessGCFuncs; @@ -302,7 +302,7 @@ RootlessCreateGC(GCPtr pGC) // does not assume ops have been wrapped #define GCFUNC_UNWRAP(pGC) \ RootlessGCRec *gcrec = (RootlessGCRec *) \ - (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + dixLookupPrivate(&(pGC)->devPrivates, rootlessGCPrivateKey); \ (pGC)->funcs = gcrec->originalFuncs; \ if (gcrec->originalOps) { \ (pGC)->ops = gcrec->originalOps; \ @@ -399,7 +399,7 @@ static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) // assumes both funcs and ops are wrapped #define GCOP_UNWRAP(pGC) \ RootlessGCRec *gcrec = (RootlessGCRec *) \ - (pGC)->devPrivates[rootlessGCPrivateIndex].ptr; \ + dixLookupPrivate(&(pGC)->devPrivates, rootlessGCPrivateKey); \ GCFuncs *saveFuncs = pGC->funcs; \ (pGC)->funcs = gcrec->originalFuncs; \ (pGC)->ops = gcrec->originalOps; diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index 700de6edc..f647893de 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -61,9 +61,9 @@ extern int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, extern Bool RootlessCreateGC(GCPtr pGC); // Initialize globals -int rootlessGCPrivateIndex = -1; -int rootlessScreenPrivateIndex = -1; -int rootlessWindowPrivateIndex = -1; +DevPrivateKey rootlessGCPrivateKey = &rootlessGCPrivateKey; +DevPrivateKey rootlessScreenPrivateKey = &rootlessScreenPrivateKey; +DevPrivateKey rootlessWindowPrivateKey = &rootlessWindowPrivateKey; /* @@ -547,28 +547,14 @@ static Bool RootlessAllocatePrivates(ScreenPtr pScreen) { RootlessScreenRec *s; - static unsigned long rootlessGeneration = 0; - - if (rootlessGeneration != serverGeneration) { - rootlessScreenPrivateIndex = AllocateScreenPrivateIndex(); - if (rootlessScreenPrivateIndex == -1) return FALSE; - rootlessGCPrivateIndex = AllocateGCPrivateIndex(); - if (rootlessGCPrivateIndex == -1) return FALSE; - rootlessWindowPrivateIndex = AllocateWindowPrivateIndex(); - if (rootlessWindowPrivateIndex == -1) return FALSE; - rootlessGeneration = serverGeneration; - } // no allocation needed for screen privates - if (!AllocateGCPrivate(pScreen, rootlessGCPrivateIndex, - sizeof(RootlessGCRec))) - return FALSE; - if (!AllocateWindowPrivate(pScreen, rootlessWindowPrivateIndex, 0)) + if (!dixRequestPrivate(rootlessGCPrivateKey, sizeof(RootlessGCRec))) return FALSE; s = xalloc(sizeof(RootlessScreenRec)); if (! s) return FALSE; - SCREENREC(pScreen) = s; + SETSCREENREC(pScreen, s); s->pixmap_data = NULL; s->pixmap_data_size = 0; @@ -583,8 +569,7 @@ RootlessAllocatePrivates(ScreenPtr pScreen) static void RootlessWrap(ScreenPtr pScreen) { - RootlessScreenRec *s = (RootlessScreenRec*) - pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + RootlessScreenRec *s = SCREENREC(pScreen); #define WRAP(a) \ if (pScreen->a) { \ @@ -650,8 +635,7 @@ Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs) if (!RootlessAllocatePrivates(pScreen)) return FALSE; - s = (RootlessScreenRec*) - pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; + s = SCREENREC(pScreen); s->imp = procs; diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 30b7daaab..687748c2d 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -66,7 +66,7 @@ RootlessCreateWindow(WindowPtr pWin) Bool result; RegionRec saveRoot; - WINREC(pWin) = NULL; + SETWINREC(pWin, NULL); SCREEN_UNWRAP(pWin->drawable.pScreen, CreateWindow); @@ -107,7 +107,7 @@ RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec) #endif xfree(winRec); - WINREC(pWin) = NULL; + SETWINREC(pWin, NULL); } @@ -353,7 +353,7 @@ RootlessEnsureFrame(WindowPtr pWin) winRec->pixmap = NULL; winRec->wid = NULL; - WINREC(pWin) = winRec; + SETWINREC(pWin, winRec); #ifdef SHAPE // Set the frame's shape if the window is shaped @@ -370,7 +370,7 @@ RootlessEnsureFrame(WindowPtr pWin) { RL_DEBUG_MSG("implementation failed to create frame!\n"); xfree(winRec); - WINREC(pWin) = NULL; + SETWINREC(pWin, NULL); return NULL; } @@ -1298,8 +1298,8 @@ RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent) /* Switch the frame record from one to the other. */ - WINREC(pWin) = NULL; - WINREC(pTopWin) = winRec; + SETWINREC(pWin, NULL); + SETWINREC(pTopWin, winRec); RootlessInitializeFrame(pTopWin, winRec); RootlessReshapeFrame(pTopWin); diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c index f624216db..74544b1a0 100644 --- a/miext/shadow/shadow.c +++ b/miext/shadow/shadow.c @@ -36,8 +36,7 @@ #include "gcstruct.h" #include "shadow.h" -int shadowScrPrivateIndex; -int shadowGeneration; +DevPrivateKey shadowScrPrivateKey = &shadowScrPrivateKey; #define wrap(priv, real, mem) {\ priv->mem = real->mem; \ @@ -116,7 +115,8 @@ static void shadowReportFunc(DamagePtr pDamage, RegionPtr pRegion, void *closure) { ScreenPtr pScreen = closure; - shadowBufPtr pBuf = pScreen->devPrivates[shadowScrPrivateIndex].ptr; + shadowBufPtr pBuf = (shadowBufPtr) + dixLookupPrivate(&pScreen->devPrivates, shadowScrPrivateKey); /* Register the damaged region, use DamageReportNone below when we * want to break BC below... */ @@ -138,13 +138,6 @@ shadowSetup(ScreenPtr pScreen) if (!DamageSetup(pScreen)) return FALSE; - if (shadowGeneration != serverGeneration) { - shadowScrPrivateIndex = AllocateScreenPrivateIndex(); - if (shadowScrPrivateIndex == -1) - return FALSE; - shadowGeneration = serverGeneration; - } - pBuf = (shadowBufPtr) xalloc(sizeof(shadowBufRec)); if (!pBuf) return FALSE; @@ -175,7 +168,7 @@ shadowSetup(ScreenPtr pScreen) REGION_NULL(pScreen, &pBuf->damage); /* bc */ #endif - pScreen->devPrivates[shadowScrPrivateIndex].ptr = (pointer) pBuf; + dixSetPrivate(&pScreen->devPrivates, shadowScrPrivateKey, pBuf); return TRUE; } diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h index 8986809f4..2e45df2b5 100644 --- a/miext/shadow/shadow.h +++ b/miext/shadow/shadow.h @@ -74,9 +74,10 @@ typedef struct _shadowBuf { #define SHADOW_REFLECT_Y 32 #define SHADOW_REFLECT_ALL (SHADOW_REFLECT_X|SHADOW_REFLECT_Y) -extern int shadowScrPrivateIndex; +extern DevPrivateKey shadowScrPrivateKey; -#define shadowGetBuf(pScr) ((shadowBufPtr) (pScr)->devPrivates[shadowScrPrivateIndex].ptr) +#define shadowGetBuf(pScr) ((shadowBufPtr) \ + dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey)) #define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr) #define shadowDamage(pBuf) DamageRegion(pBuf->pDamage) diff --git a/randr/randr.c b/randr/randr.c index 958f9c192..bc2b995d2 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -56,9 +56,9 @@ static int SProcRRDispatch (ClientPtr pClient); int RREventBase; int RRErrorBase; RESTYPE RRClientType, RREventType; /* resource types for event masks */ -int RRClientPrivateIndex; +DevPrivateKey RRClientPrivateKey = &RRClientPrivateKey; -int rrPrivIndex = -1; +DevPrivateKey rrPrivKey = &rrPrivKey; static void RRClientCallback (CallbackListPtr *list, @@ -214,8 +214,6 @@ Bool RRInit (void) return TRUE; } -static int RRScreenGeneration; - Bool RRScreenInit(ScreenPtr pScreen) { rrScrPrivPtr pScrPriv; @@ -223,13 +221,6 @@ Bool RRScreenInit(ScreenPtr pScreen) if (!RRInit ()) return FALSE; - if (RRScreenGeneration != serverGeneration) - { - if ((rrPrivIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - RRScreenGeneration = serverGeneration; - } - pScrPriv = (rrScrPrivPtr) xcalloc (1, sizeof (rrScrPrivRec)); if (!pScrPriv) return FALSE; @@ -333,8 +324,7 @@ RRExtensionInit (void) if (RRNScreens == 0) return; - RRClientPrivateIndex = AllocateClientPrivateIndex (); - if (!AllocateClientPrivate (RRClientPrivateIndex, + if (!dixRequestPrivate(RRClientPrivateKey, sizeof (RRClientRec) + screenInfo.numScreens * sizeof (RRTimesRec))) return; diff --git a/randr/randrstr.h b/randr/randrstr.h index bd19fe9d0..e8358bc0c 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -262,11 +262,11 @@ typedef struct _rrScrPriv { #endif } rrScrPrivRec, *rrScrPrivPtr; -extern int rrPrivIndex; +extern DevPrivateKey rrPrivKey; -#define rrGetScrPriv(pScr) ((rrScrPrivPtr) (pScr)->devPrivates[rrPrivIndex].ptr) +#define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey)) #define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr) -#define SetRRScreen(s,p) ((s)->devPrivates[rrPrivIndex].ptr = (pointer) (p)) +#define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p) /* * each window has a list of clients requesting @@ -298,7 +298,7 @@ typedef struct _RRClient { } RRClientRec, *RRClientPtr; extern RESTYPE RRClientType, RREventType; /* resource types for event masks */ -extern int RRClientPrivateIndex; +extern DevPrivateKey RRClientPrivateKey; extern RESTYPE RRCrtcType, RRModeType, RROutputType; #define LookupOutput(client,id,a) ((RROutputPtr) \ @@ -311,7 +311,7 @@ extern RESTYPE RRCrtcType, RRModeType, RROutputType; (SecurityLookupIDByType (client, id, \ RRModeType, a))) -#define GetRRClient(pClient) ((RRClientPtr) (pClient)->devPrivates[RRClientPrivateIndex].ptr) +#define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey)) #define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient) /* Initialize the extension */ diff --git a/record/record.c b/record/record.c index 0ed8f84c2..2e65e677b 100644 --- a/record/record.c +++ b/record/record.c @@ -164,13 +164,13 @@ typedef struct { ProcFunctionPtr recordVector[256]; } RecordClientPrivateRec, *RecordClientPrivatePtr; -static int RecordClientPrivateIndex; +static DevPrivateKey RecordClientPrivateKey = &RecordClientPrivateKey; /* RecordClientPrivatePtr RecordClientPrivate(ClientPtr) * gets the client private of the given client. Syntactic sugar. */ #define RecordClientPrivate(_pClient) (RecordClientPrivatePtr) \ - ((_pClient)->devPrivates[RecordClientPrivateIndex].ptr) + dixLookupPrivate(&(_pClient)->devPrivates, RecordClientPrivateKey) /***************************************************************************/ @@ -982,8 +982,8 @@ RecordInstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) memcpy(pClientPriv->recordVector, pClient->requestVector, sizeof (pClientPriv->recordVector)); pClientPriv->originalVector = pClient->requestVector; - pClient->devPrivates[RecordClientPrivateIndex].ptr = - (pointer)pClientPriv; + dixSetPrivate(&pClient->devPrivates, + RecordClientPrivateKey, pClientPriv); pClient->requestVector = pClientPriv->recordVector; } while ((pIter = RecordIterateSet(pRCAP->pRequestMajorOpSet, @@ -1096,7 +1096,8 @@ RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) if (!otherRCAPwantsProcVector) { /* nobody needs it, so free it */ pClient->requestVector = pClientPriv->originalVector; - pClient->devPrivates[RecordClientPrivateIndex].ptr = NULL; + dixSetPrivate(&pClient->devPrivates, + RecordClientPrivateKey, NULL); xfree(pClientPriv); } } /* end if this RCAP specifies any requests */ @@ -2948,10 +2949,6 @@ RecordExtensionInit(void) if (!RTContext) return; - RecordClientPrivateIndex = AllocateClientPrivateIndex(); - if (!AllocateClientPrivate(RecordClientPrivateIndex, 0)) - return; - ppAllContexts = NULL; numContexts = numEnabledContexts = numEnabledRCAPs = 0; diff --git a/render/animcur.c b/render/animcur.c index 1f25e79d0..444d70645 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -87,14 +87,14 @@ static CursorBits animCursorBits = { empty, empty, 2, 1, 1, 0, 0, 1 }; -static int AnimCurScreenPrivateIndex = -1; static int AnimCurGeneration; +static DevPrivateKey AnimCurScreenPrivateKey = &AnimCurScreenPrivateKey; #define IsAnimCur(c) ((c)->bits == &animCursorBits) #define GetAnimCur(c) ((AnimCurPtr) ((c) + 1)) -#define GetAnimCurScreen(s) ((AnimCurScreenPtr) ((s)->devPrivates[AnimCurScreenPrivateIndex].ptr)) -#define GetAnimCurScreenIfSet(s) ((AnimCurScreenPrivateIndex != -1) ? GetAnimCurScreen(s) : NULL) -#define SetAnimCurScreen(s,p) ((s)->devPrivates[AnimCurScreenPrivateIndex].ptr = (pointer) (p)) +#define GetAnimCurScreen(s) ((AnimCurScreenPtr)dixLookupPrivate(&(s)->devPrivates, AnimCurScreenPrivateKey)) +#define GetAnimCurScreenIfSet(s) GetAnimCurScreen(s) +#define SetAnimCurScreen(s,p) dixSetPrivate(&(s)->devPrivates, AnimCurScreenPrivateKey, p) #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) @@ -128,8 +128,6 @@ AnimCurCloseScreen (int index, ScreenPtr pScreen) SetAnimCurScreen(pScreen,0); ret = (*pScreen->CloseScreen) (index, pScreen); xfree (as); - if (index == 0) - AnimCurScreenPrivateIndex = -1; return ret; } @@ -324,9 +322,6 @@ AnimCurInit (ScreenPtr pScreen) if (AnimCurGeneration != serverGeneration) { - AnimCurScreenPrivateIndex = AllocateScreenPrivateIndex (); - if (AnimCurScreenPrivateIndex < 0) - return FALSE; AnimCurGeneration = serverGeneration; animCurState.pCursor = 0; animCurState.pScreen = 0; diff --git a/render/glyph.c b/render/glyph.c index 583a52ba3..cb1534d6e 100644 --- a/render/glyph.c +++ b/render/glyph.c @@ -81,220 +81,18 @@ static const CARD8 glyphDepths[GlyphFormatNum] = { 1, 4, 8, 16, 32 }; static GlyphHashRec globalGlyphs[GlyphFormatNum]; -static int globalTotalGlyphPrivateSize = 0; - -static int glyphPrivateCount = 0; - -void -ResetGlyphPrivates (void) -{ - glyphPrivateCount = 0; -} - -int -AllocateGlyphPrivateIndex (void) -{ - return glyphPrivateCount++; -} - -Bool -AllocateGlyphPrivate (ScreenPtr pScreen, - int index2, - unsigned amount) -{ - PictureScreenPtr ps; - unsigned oldamount; - - ps = GetPictureScreenIfSet (pScreen); - if (!ps) - return FALSE; - - /* Round up sizes for proper alignment */ - amount = ((amount + (sizeof (DevUnion) - 1)) / sizeof (DevUnion)) * - sizeof (DevUnion); - - if (index2 >= ps->glyphPrivateLen) - { - unsigned *nsizes; - nsizes = (unsigned *) xrealloc (ps->glyphPrivateSizes, - (index2 + 1) * sizeof (unsigned)); - if (!nsizes) - return FALSE; - - while (ps->glyphPrivateLen <= index2) - { - nsizes[ps->glyphPrivateLen++] = 0; - ps->totalGlyphPrivateSize += sizeof (DevUnion); - } - ps->glyphPrivateSizes = nsizes; - } - oldamount = ps->glyphPrivateSizes[index2]; - if (amount > oldamount) - { - ps->glyphPrivateSizes[index2] = amount; - ps->totalGlyphPrivateSize += (amount - oldamount); - } - ps->totalGlyphPrivateSize = BitmapBytePad (ps->totalGlyphPrivateSize * 8); - - return TRUE; -} - static void -SetGlyphScreenPrivateOffsets (void) +FreeGlyphPrivates (GlyphPtr glyph) { - PictureScreenPtr ps; - int offset = 0; - int i; + ScreenPtr pScreen; + int i; - for (i = 0; i < screenInfo.numScreens; i++) - { - ps = GetPictureScreenIfSet (screenInfo.screens[i]); - if (ps && ps->totalGlyphPrivateSize) - { - ps->glyphPrivateOffset = offset; - offset += ps->totalGlyphPrivateSize / sizeof (DevUnion); - } - } -} - -static void -SetGlyphPrivatePointers (GlyphPtr glyph) -{ - PictureScreenPtr ps; - int i; - char *ptr; - DevUnion *ppriv; - unsigned *sizes; - unsigned size; - int len; - - for (i = 0; i < screenInfo.numScreens; i++) - { - ps = GetPictureScreenIfSet (screenInfo.screens[i]); - if (ps && ps->totalGlyphPrivateSize) - { - ppriv = glyph->devPrivates + ps->glyphPrivateOffset; - sizes = ps->glyphPrivateSizes; - ptr = (char *) (ppriv + ps->glyphPrivateLen); - for (len = ps->glyphPrivateLen; --len >= 0; ppriv++, sizes++) - { - if ((size = *sizes) != 0) - { - ppriv->ptr = (pointer) ptr; - ptr += size; - } - else - ppriv->ptr = (pointer) 0; - } - } - } -} - -static Bool -ReallocGlobalGlyphPrivate (GlyphPtr glyph) -{ - PictureScreenPtr ps; - DevUnion *devPrivates; - char *ptr; - int i; - - devPrivates = xalloc (globalTotalGlyphPrivateSize); - if (!devPrivates) - return FALSE; - - ptr = (char *) devPrivates; - for (i = 0; i < screenInfo.numScreens; i++) - { - ps = GetPictureScreenIfSet (screenInfo.screens[i]); - if (ps && ps->totalGlyphPrivateSize) - { - if (ps->glyphPrivateOffset != -1) - { - memcpy (ptr, glyph->devPrivates + ps->glyphPrivateOffset, - ps->totalGlyphPrivateSize); - } - else if (ps->totalGlyphPrivateSize) - { - memset (ptr, 0, ps->totalGlyphPrivateSize); - } - - ptr += ps->totalGlyphPrivateSize; - } + for (i = 0; i < screenInfo.numScreens; i++) { + pScreen = screenInfo.screens[i]; + dixFreePrivates(*GetGlyphPrivatesForScreen(glyph, pScreen)); } - if (glyph->devPrivates) - xfree (glyph->devPrivates); - - glyph->devPrivates = devPrivates; - - return TRUE; -} - -Bool -GlyphInit (ScreenPtr pScreen) -{ - PictureScreenPtr ps = GetPictureScreen (pScreen); - - ps->totalGlyphPrivateSize = 0; - ps->glyphPrivateSizes = 0; - ps->glyphPrivateLen = 0; - ps->glyphPrivateOffset = -1; - - return TRUE; -} - -Bool -GlyphFinishInit (ScreenPtr pScreen) -{ - PictureScreenPtr ps = GetPictureScreen (pScreen); - - if (ps->totalGlyphPrivateSize) - { - GlyphPtr glyph; - int fdepth, i; - - globalTotalGlyphPrivateSize += ps->totalGlyphPrivateSize; - - for (fdepth = 0; fdepth < GlyphFormatNum; fdepth++) - { - if (!globalGlyphs[fdepth].hashSet) - continue; - - for (i = 0; i < globalGlyphs[fdepth].hashSet->size; i++) - { - glyph = globalGlyphs[fdepth].table[i].glyph; - if (glyph && glyph != DeletedGlyph) - { - if (!ReallocGlobalGlyphPrivate (glyph)) - return FALSE; - } - } - } - - SetGlyphScreenPrivateOffsets (); - - for (fdepth = 0; fdepth < GlyphFormatNum; fdepth++) - { - if (!globalGlyphs[fdepth].hashSet) - continue; - - for (i = 0; i < globalGlyphs[fdepth].hashSet->size; i++) - { - glyph = globalGlyphs[fdepth].table[i].glyph; - if (glyph && glyph != DeletedGlyph) - { - SetGlyphPrivatePointers (glyph); - - if (!(*ps->RealizeGlyph) (pScreen, glyph)) - return FALSE; - } - } - } - } - else - ps->glyphPrivateOffset = 0; - - return TRUE; + dixFreePrivates(glyph->devPrivates); } void @@ -304,8 +102,6 @@ GlyphUninit (ScreenPtr pScreen) GlyphPtr glyph; int fdepth, i; - globalTotalGlyphPrivateSize -= ps->totalGlyphPrivateSize; - for (fdepth = 0; fdepth < GlyphFormatNum; fdepth++) { if (!globalGlyphs[fdepth].hashSet) @@ -317,43 +113,20 @@ GlyphUninit (ScreenPtr pScreen) if (glyph && glyph != DeletedGlyph) { (*ps->UnrealizeGlyph) (pScreen, glyph); - - if (globalTotalGlyphPrivateSize) - { - if (!ReallocGlobalGlyphPrivate (glyph)) - return; - } - else - { - if (glyph->devPrivates) - xfree (glyph->devPrivates); - glyph->devPrivates = NULL; - } + FreeGlyphPrivates(glyph); + glyph->devPrivates = NULL; } } } - if (globalTotalGlyphPrivateSize) - SetGlyphScreenPrivateOffsets (); - for (fdepth = 0; fdepth < GlyphFormatNum; fdepth++) { if (!globalGlyphs[fdepth].hashSet) continue; for (i = 0; i < globalGlyphs[fdepth].hashSet->size; i++) - { glyph = globalGlyphs[fdepth].table[i].glyph; - if (glyph && glyph != DeletedGlyph) - { - if (globalTotalGlyphPrivateSize) - SetGlyphPrivatePointers (glyph); - } - } } - - if (ps->glyphPrivateSizes) - xfree (ps->glyphPrivateSizes); } GlyphHashSetPtr @@ -367,50 +140,6 @@ FindGlyphHashSet (CARD32 filled) return 0; } -static int _GlyphSetPrivateAllocateIndex = 0; - -int -AllocateGlyphSetPrivateIndex (void) -{ - return _GlyphSetPrivateAllocateIndex++; -} - -void -ResetGlyphSetPrivateIndex (void) -{ - _GlyphSetPrivateAllocateIndex = 0; -} - -Bool -_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr) -{ - pointer *new; - - if (n > glyphSet->maxPrivate) { - if (glyphSet->devPrivates && - glyphSet->devPrivates != (pointer)(&glyphSet[1])) { - new = (pointer *) xrealloc (glyphSet->devPrivates, - (n + 1) * sizeof (pointer)); - if (!new) - return FALSE; - } else { - new = (pointer *) xalloc ((n + 1) * sizeof (pointer)); - if (!new) - return FALSE; - if (glyphSet->devPrivates) - memcpy (new, - glyphSet->devPrivates, - (glyphSet->maxPrivate + 1) * sizeof (pointer)); - } - glyphSet->devPrivates = new; - /* Zero out new, uninitialize privates */ - while (++glyphSet->maxPrivate < n) - glyphSet->devPrivates[glyphSet->maxPrivate] = (pointer)0; - } - glyphSet->devPrivates[n] = ptr; - return TRUE; -} - GlyphRefPtr FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare) { @@ -539,8 +268,7 @@ FreeGlyph (GlyphPtr glyph, int format) (*ps->UnrealizeGlyph) (screenInfo.screens[i], glyph); } - if (glyph->devPrivates) - xfree (glyph->devPrivates); + FreeGlyphPrivates(glyph); xfree (glyph); } } @@ -566,8 +294,7 @@ AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id) if (ps) (*ps->UnrealizeGlyph) (screenInfo.screens[i], glyph); } - if (glyph->devPrivates) - xfree (glyph->devPrivates); + FreeGlyphPrivates(glyph); xfree (glyph); glyph = gr->glyph; } @@ -634,16 +361,7 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth) glyph->refcnt = 0; glyph->size = size + sizeof (xGlyphInfo); glyph->info = *gi; - - if (globalTotalGlyphPrivateSize) - { - glyph->devPrivates = xalloc (globalTotalGlyphPrivateSize); - if (!glyph->devPrivates) - return 0; - - SetGlyphPrivatePointers (glyph); - } else - glyph->devPrivates = NULL; + glyph->devPrivates = NULL; for (i = 0; i < screenInfo.numScreens; i++) { @@ -659,8 +377,7 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth) (*ps->UnrealizeGlyph) (screenInfo.screens[i], glyph); } - if (glyph->devPrivates) - xfree (glyph->devPrivates); + FreeGlyphPrivates(glyph); xfree (glyph); return 0; } @@ -744,15 +461,11 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) return FALSE; } - size = (sizeof (GlyphSetRec) + - (sizeof (pointer) * _GlyphSetPrivateAllocateIndex)); + size = sizeof (GlyphSetRec); glyphSet = xalloc (size); if (!glyphSet) return FALSE; bzero((char *)glyphSet, size); - glyphSet->maxPrivate = _GlyphSetPrivateAllocateIndex - 1; - if (_GlyphSetPrivateAllocateIndex) - glyphSet->devPrivates = (pointer)(&glyphSet[1]); if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0])) { @@ -792,11 +505,7 @@ FreeGlyphSet (pointer value, else ResizeGlyphHash (&globalGlyphs[glyphSet->fdepth], 0, TRUE); xfree (table); - - if (glyphSet->devPrivates && - glyphSet->devPrivates != (pointer)(&glyphSet[1])) - xfree(glyphSet->devPrivates); - + dixFreePrivates(glyphSet->devPrivates); xfree (glyphSet); } return Success; diff --git a/render/glyphstr.h b/render/glyphstr.h index 22150deee..e89f34e59 100644 --- a/render/glyphstr.h +++ b/render/glyphstr.h @@ -30,6 +30,7 @@ #include "screenint.h" #include "regionstr.h" #include "miscstruct.h" +#include "privates.h" #define GlyphFormat1 0 #define GlyphFormat4 1 @@ -40,7 +41,7 @@ typedef struct _Glyph { CARD32 refcnt; - DevUnion *devPrivates; + PrivateRec *devPrivates; CARD32 size; /* info + bitmap */ xGlyphInfo info; /* bits follow */ @@ -71,18 +72,14 @@ typedef struct _GlyphSet { int fdepth; GlyphHashRec hash; int maxPrivate; - pointer *devPrivates; + PrivateRec *devPrivates; } GlyphSetRec, *GlyphSetPtr; -#define GlyphSetGetPrivate(pGlyphSet,n) \ - ((n) > (pGlyphSet)->maxPrivate ? \ - (pointer) 0 : \ - (pGlyphSet)->devPrivates[n]) +#define GlyphSetGetPrivate(pGlyphSet,k) \ + dixLookupPrivate(&(pGlyphSet)->devPrivates, k) -#define GlyphSetSetPrivate(pGlyphSet,n,ptr) \ - ((n) > (pGlyphSet)->maxPrivate ? \ - _GlyphSetSetNewPrivate(pGlyphSet, n, ptr) : \ - ((((pGlyphSet)->devPrivates[n] = (ptr)) != 0) || TRUE)) +#define GlyphSetSetPrivate(pGlyphSet,k,ptr) \ + dixSetPrivate(&(pGlyphSet)->devPrivates, k, ptr) typedef struct _GlyphList { INT16 xOff; @@ -94,32 +91,6 @@ typedef struct _GlyphList { GlyphHashSetPtr FindGlyphHashSet (CARD32 filled); -int -AllocateGlyphSetPrivateIndex (void); - -void -ResetGlyphSetPrivateIndex (void); - -Bool -_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr); - -void -ResetGlyphPrivates (void); - -int -AllocateGlyphPrivateIndex (void); - -Bool -AllocateGlyphPrivate (ScreenPtr pScreen, - int index2, - unsigned amount); - -Bool -GlyphInit (ScreenPtr pScreen); - -Bool -GlyphFinishInit (ScreenPtr pScreen); - void GlyphUninit (ScreenPtr pScreen); diff --git a/render/picture.c b/render/picture.c index ede865f28..bc2c3b526 100644 --- a/render/picture.c +++ b/render/picture.c @@ -41,65 +41,14 @@ #include "servermd.h" #include "picturestr.h" -_X_EXPORT int PictureScreenPrivateIndex = -1; -int PictureWindowPrivateIndex; +_X_EXPORT DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKey; +DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKey; static int PictureGeneration; RESTYPE PictureType; RESTYPE PictFormatType; RESTYPE GlyphSetType; int PictureCmapPolicy = PictureCmapPolicyDefault; -/* Picture Private machinery */ - -static int picturePrivateCount; - -void -ResetPicturePrivateIndex (void) -{ - picturePrivateCount = 0; -} - -int -AllocatePicturePrivateIndex (void) -{ - return picturePrivateCount++; -} - -Bool -AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount) -{ - PictureScreenPtr ps = GetPictureScreen(pScreen); - unsigned int oldamount; - - /* Round up sizes for proper alignment */ - amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); - - if (index2 >= ps->PicturePrivateLen) - { - unsigned int *nsizes; - - nsizes = (unsigned int *)xrealloc(ps->PicturePrivateSizes, - (index2 + 1) * sizeof(unsigned int)); - if (!nsizes) - return FALSE; - while (ps->PicturePrivateLen <= index2) - { - nsizes[ps->PicturePrivateLen++] = 0; - ps->totalPictureSize += sizeof(DevUnion); - } - ps->PicturePrivateSizes = nsizes; - } - oldamount = ps->PicturePrivateSizes[index2]; - if (amount > oldamount) - { - ps->PicturePrivateSizes[index2] = amount; - ps->totalPictureSize += (amount - oldamount); - } - - return TRUE; -} - - Bool PictureDestroyWindow (WindowPtr pWindow) { @@ -137,8 +86,6 @@ PictureCloseScreen (int index, ScreenPtr pScreen) (*ps->CloseIndexed) (pScreen, &ps->formats[n]); GlyphUninit (pScreen); SetPictureScreen(pScreen, 0); - if (ps->PicturePrivateSizes) - xfree (ps->PicturePrivateSizes); xfree (ps->formats); xfree (ps); return ret; @@ -497,8 +444,6 @@ PictureFinishInit (void) for (s = 0; s < screenInfo.numScreens; s++) { - if (!GlyphFinishInit (screenInfo.screens[s])) - return FALSE; if (!PictureInitIndexedFormats (screenInfo.screens[s])) return FALSE; (void) AnimCurInit (screenInfo.screens[s]); @@ -637,10 +582,6 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) GlyphSetType = CreateNewResourceType (FreeGlyphSet); if (!GlyphSetType) return FALSE; - PictureScreenPrivateIndex = AllocateScreenPrivateIndex(); - if (PictureScreenPrivateIndex < 0) - return FALSE; - PictureWindowPrivateIndex = AllocateWindowPrivateIndex(); PictureGeneration = serverGeneration; #ifdef XResExtension RegisterResourceName (PictureType, "PICTURE"); @@ -648,9 +589,6 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) RegisterResourceName (GlyphSetType, "GLYPHSET"); #endif } - if (!AllocateWindowPrivate (pScreen, PictureWindowPrivateIndex, 0)) - return FALSE; - if (!formats) { formats = PictureCreateDefaultFormats (pScreen, &nformats); @@ -697,18 +635,7 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) return FALSE; } SetPictureScreen(pScreen, ps); - if (!GlyphInit (pScreen)) - { - SetPictureScreen(pScreen, 0); - xfree (formats); - xfree (ps); - return FALSE; - } - ps->totalPictureSize = sizeof (PictureRec); - ps->PicturePrivateSizes = 0; - ps->PicturePrivateLen = 0; - ps->formats = formats; ps->fallback = formats; ps->nformats = nformats; @@ -773,37 +700,6 @@ SetPictureToDefaults (PicturePtr pPicture) pPicture->pSourcePict = 0; } -PicturePtr -AllocatePicture (ScreenPtr pScreen) -{ - PictureScreenPtr ps = GetPictureScreen(pScreen); - PicturePtr pPicture; - char *ptr; - DevUnion *ppriv; - unsigned int *sizes; - unsigned int size; - int i; - - pPicture = (PicturePtr) xalloc (ps->totalPictureSize); - if (!pPicture) - return 0; - ppriv = (DevUnion *)(pPicture + 1); - pPicture->devPrivates = ppriv; - sizes = ps->PicturePrivateSizes; - ptr = (char *)(ppriv + ps->PicturePrivateLen); - for (i = ps->PicturePrivateLen; --i >= 0; ppriv++, sizes++) - { - if ( (size = *sizes) ) - { - ppriv->ptr = (pointer)ptr; - ptr += size; - } - else - ppriv->ptr = (pointer)NULL; - } - return pPicture; -} - PicturePtr CreatePicture (Picture pid, DrawablePtr pDrawable, @@ -816,7 +712,7 @@ CreatePicture (Picture pid, PicturePtr pPicture; PictureScreenPtr ps = GetPictureScreen(pDrawable->pScreen); - pPicture = AllocatePicture (pDrawable->pScreen); + pPicture = (PicturePtr)xalloc(sizeof(PictureRec)); if (!pPicture) { *error = BadAlloc; @@ -827,6 +723,7 @@ CreatePicture (Picture pid, pPicture->pDrawable = pDrawable; pPicture->pFormat = pFormat; pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24); + pPicture->devPrivates = NULL; if (pDrawable->type == DRAWABLE_PIXMAP) { ++((PixmapPtr)pDrawable)->refcnt; @@ -1607,7 +1504,8 @@ FreePicture (pointer value, WindowPtr pWindow = (WindowPtr) pPicture->pDrawable; PicturePtr *pPrev; - for (pPrev = (PicturePtr *) &((pWindow)->devPrivates[PictureWindowPrivateIndex].ptr); + for (pPrev = (PicturePtr *)dixLookupPrivateAddr + (&pWindow->devPrivates, PictureWindowPrivateKey); *pPrev; pPrev = &(*pPrev)->pNext) { @@ -1623,6 +1521,7 @@ FreePicture (pointer value, (*pScreen->DestroyPixmap) ((PixmapPtr)pPicture->pDrawable); } } + dixFreePrivates(pPicture->devPrivates); xfree (pPicture); } return Success; diff --git a/render/picturestr.h b/render/picturestr.h index 005c58808..aafe4e80a 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -27,6 +27,7 @@ #include "glyphstr.h" #include "scrnintstr.h" #include "resource.h" +#include "privates.h" typedef struct _DirectFormat { CARD16 red, redMask; @@ -173,7 +174,7 @@ typedef struct _Picture { RegionPtr pCompositeClip; - DevUnion *devPrivates; + PrivateRec *devPrivates; PictTransform *transform; @@ -328,10 +329,6 @@ typedef void (*UnrealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph); typedef struct _PictureScreen { - int totalPictureSize; - unsigned int *PicturePrivateSizes; - int PicturePrivateLen; - PictFormatPtr formats; PictFormatPtr fallback; int nformats; @@ -389,30 +386,25 @@ typedef struct _PictureScreen { AddTrapsProcPtr AddTraps; - int totalGlyphPrivateSize; - unsigned int *glyphPrivateSizes; - int glyphPrivateLen; - int glyphPrivateOffset; - RealizeGlyphProcPtr RealizeGlyph; UnrealizeGlyphProcPtr UnrealizeGlyph; } PictureScreenRec, *PictureScreenPtr; -extern int PictureScreenPrivateIndex; -extern int PictureWindowPrivateIndex; +extern DevPrivateKey PictureScreenPrivateKey; +extern DevPrivateKey PictureWindowPrivateKey; extern RESTYPE PictureType; extern RESTYPE PictFormatType; extern RESTYPE GlyphSetType; -#define GetPictureScreen(s) ((PictureScreenPtr) ((s)->devPrivates[PictureScreenPrivateIndex].ptr)) -#define GetPictureScreenIfSet(s) ((PictureScreenPrivateIndex != -1) ? GetPictureScreen(s) : NULL) -#define SetPictureScreen(s,p) ((s)->devPrivates[PictureScreenPrivateIndex].ptr = (pointer) (p)) -#define GetPictureWindow(w) ((PicturePtr) ((w)->devPrivates[PictureWindowPrivateIndex].ptr)) -#define SetPictureWindow(w,p) ((w)->devPrivates[PictureWindowPrivateIndex].ptr = (pointer) (p)) +#define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey)) +#define GetPictureScreenIfSet(s) GetPictureScreen(s) +#define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p) +#define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey)) +#define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p) -#define GetGlyphPrivatesForScreen(glyph, s) \ - ((glyph)->devPrivates + (GetPictureScreen (s))->glyphPrivateOffset) +#define GetGlyphPrivatesForScreen(glyph, s) \ + ((PrivateRec **)dixLookupPrivateAddr(&(glyph)->devPrivates, s)) #define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\ pPicture = SecurityLookupIDByType(client, pid, PictureType, mode);\ @@ -430,15 +422,6 @@ extern RESTYPE GlyphSetType; } \ } \ -void -ResetPicturePrivateIndex (void); - -int -AllocatePicturePrivateIndex (void); - -Bool -AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount); - Bool PictureDestroyWindow (WindowPtr pWindow); @@ -501,9 +484,6 @@ PictureFinishInit (void); void SetPictureToDefaults (PicturePtr pPicture); -PicturePtr -AllocatePicture (ScreenPtr pScreen); - #if 0 Bool miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); diff --git a/render/render.c b/render/render.c index e57ffb126..7b2745758 100644 --- a/render/render.c +++ b/render/render.c @@ -216,14 +216,14 @@ RenderResetProc (ExtensionEntry *extEntry); static CARD8 RenderReqCode; #endif int RenderErrBase; -int RenderClientPrivateIndex; +DevPrivateKey RenderClientPrivateKey; typedef struct _RenderClient { int major_version; int minor_version; } RenderClientRec, *RenderClientPtr; -#define GetRenderClient(pClient) ((RenderClientPtr) (pClient)->devPrivates[RenderClientPrivateIndex].ptr) +#define GetRenderClient(pClient) ((RenderClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RenderClientPrivateKey)) static void RenderClientCallback (CallbackListPtr *list, @@ -247,9 +247,7 @@ RenderExtensionInit (void) return; if (!PictureFinishInit ()) return; - RenderClientPrivateIndex = AllocateClientPrivateIndex (); - if (!AllocateClientPrivate (RenderClientPrivateIndex, - sizeof (RenderClientRec))) + if (!dixRequestPrivate(RenderClientPrivateKey, sizeof(RenderClientRec))) return; if (!AddCallback (&ClientStateCallback, RenderClientCallback, 0)) return; @@ -268,8 +266,6 @@ RenderExtensionInit (void) static void RenderResetProc (ExtensionEntry *extEntry) { - ResetPicturePrivateIndex(); - ResetGlyphSetPrivateIndex(); } static int diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 450f366f2..975ebc36d 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -55,8 +55,7 @@ static RESTYPE CursorClientType; static RESTYPE CursorHideCountType; static RESTYPE CursorWindowType; -static int CursorScreenPrivateIndex = -1; -static int CursorGeneration; +static DevPrivateKey CursorScreenPrivateKey = &CursorScreenPrivateKey; static CursorPtr CursorCurrent; static CursorPtr pInvisibleCursor = NULL; @@ -113,9 +112,9 @@ typedef struct _CursorScreen { CursorHideCountPtr pCursorHideCounts; } CursorScreenRec, *CursorScreenPtr; -#define GetCursorScreen(s) ((CursorScreenPtr) ((s)->devPrivates[CursorScreenPrivateIndex].ptr)) -#define GetCursorScreenIfSet(s) ((CursorScreenPrivateIndex != -1) ? GetCursorScreen(s) : NULL) -#define SetCursorScreen(s,p) ((s)->devPrivates[CursorScreenPrivateIndex].ptr = (pointer) (p)) +#define GetCursorScreen(s) ((CursorScreenPtr)dixLookupPrivate(&(s)->devPrivates, CursorScreenPrivateKey)) +#define GetCursorScreenIfSet(s) GetCursorScreen(s) +#define SetCursorScreen(s,p) dixSetPrivate(&(s)->devPrivates, CursorScreenPrivateKey, p) #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) @@ -171,8 +170,6 @@ CursorCloseScreen (int index, ScreenPtr pScreen) deleteCursorHideCountsForScreen(pScreen); ret = (*pScreen->CloseScreen) (index, pScreen); xfree (cs); - if (index == 0) - CursorScreenPrivateIndex = -1; return ret; } @@ -1011,13 +1008,6 @@ XFixesCursorInit (void) { int i; - if (CursorGeneration != serverGeneration) - { - CursorScreenPrivateIndex = AllocateScreenPrivateIndex (); - if (CursorScreenPrivateIndex < 0) - return FALSE; - CursorGeneration = serverGeneration; - } for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c index 32dee8a18..0db49895e 100755 --- a/xfixes/xfixes.c +++ b/xfixes/xfixes.c @@ -56,7 +56,7 @@ static unsigned char XFixesReqCode; int XFixesEventBase; int XFixesErrorBase; -static int XFixesClientPrivateIndex; +static DevPrivateKey XFixesClientPrivateKey = &XFixesClientPrivateKey; static int ProcXFixesQueryVersion(ClientPtr client) @@ -239,9 +239,7 @@ XFixesExtensionInit(void) { ExtensionEntry *extEntry; - XFixesClientPrivateIndex = AllocateClientPrivateIndex (); - if (!AllocateClientPrivate (XFixesClientPrivateIndex, - sizeof (XFixesClientRec))) + if (!dixRequestPrivate(XFixesClientPrivateKey, sizeof (XFixesClientRec))) return; if (!AddCallback (&ClientStateCallback, XFixesClientCallback, 0)) return; diff --git a/xfixes/xfixesint.h b/xfixes/xfixesint.h index 48927ae0f..33a3205ed 100755 --- a/xfixes/xfixesint.h +++ b/xfixes/xfixesint.h @@ -66,7 +66,7 @@ typedef struct _XFixesClient { CARD32 minor_version; } XFixesClientRec, *XFixesClientPtr; -#define GetXFixesClient(pClient) ((XFixesClientPtr) (pClient)->devPrivates[XFixesClientPrivateIndex].ptr) +#define GetXFixesClient(pClient) ((XFixesClientPtr)dixLookupPrivate(&(pClient)->devPrivates, XFixesClientPrivateKey)) extern int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr); diff --git a/xkb/ddxFakeMtn.c b/xkb/ddxFakeMtn.c index 1060afe99..320e0ca33 100644 --- a/xkb/ddxFakeMtn.c +++ b/xkb/ddxFakeMtn.c @@ -107,7 +107,7 @@ ScreenPtr pScreen, oldScreen; oldY= y; else oldY+= y; -#define GetScreenPrivate(s) ((miPointerScreenPtr) ((s)->devPrivates[miPointerScreenIndex].ptr)) +#define GetScreenPrivate(s) ((miPointerScreenPtr)dixLookupPrivate(&(s)->devPrivates, miPointerScreenKey)) (*(GetScreenPrivate(oldScreen))->screenFuncs->CursorOffScreen) (&pScreen, &oldX, &oldY); } diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 2e0c89fc2..7f0f74db1 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -40,8 +40,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xkb.h" #include -static unsigned int _xkbServerGeneration; -static int xkbDevicePrivateIndex = -1; +static DevPrivateKey xkbDevicePrivateKey = &xkbDevicePrivateKey; static void xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, @@ -64,20 +63,12 @@ XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc) { xkbDeviceInfoPtr xkbPrivPtr; - if (serverGeneration != _xkbServerGeneration) { - if ((xkbDevicePrivateIndex = AllocateDevicePrivateIndex()) == -1) - return; - _xkbServerGeneration = serverGeneration; - } - if (!AllocateDevicePrivate(device, xkbDevicePrivateIndex)) - return; - xkbPrivPtr = (xkbDeviceInfoPtr) xalloc(sizeof(xkbDeviceInfoRec)); if (!xkbPrivPtr) return; xkbPrivPtr->unwrapProc = NULL; - device->devPrivates[xkbDevicePrivateIndex].ptr = xkbPrivPtr; + dixSetPrivate(&device->devPrivates, xkbDevicePrivateKey, xkbPrivPtr); WRAP_PROCESS_INPUT_PROC(device,xkbPrivPtr, proc,xkbUnwrapProc); } From 41355a53c29bbf879da0c6ea562294fcc7ef89ff Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 28 Aug 2007 15:10:20 -0400 Subject: [PATCH 094/552] xace: add hooks + new access codes: core protocol input requests --- Xext/xace.c | 2 +- Xext/xacestr.h | 2 +- dix/devices.c | 129 ++++++++++++++++++++++++++++++++++++------------- dix/events.c | 124 ++++++++++++++++++++++++++++++----------------- dix/grabs.c | 10 ++++ 5 files changed, 188 insertions(+), 79 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 54e910f82..4d34dc3d9 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -84,7 +84,7 @@ int XaceHook(int hook, ...) XaceDeviceAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, DeviceIntPtr), - va_arg(ap, Bool), + va_arg(ap, Mask), Success /* default allow */ }; calldata = &rec; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 10c625b18..c98be3d32 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -50,7 +50,7 @@ typedef struct { typedef struct { ClientPtr client; DeviceIntPtr dev; - Bool fromRequest; + Mask access_mode; int status; } XaceDeviceAccessRec; diff --git a/dix/devices.c b/dix/devices.c index a62ab6580..dfbd2bfd8 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1271,10 +1271,10 @@ AllModifierKeysAreUp(dev, map1, per1, map2, per2) static int DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, - int numKeyPerModifier) + int numKeyPerModifier, xSetModifierMappingReply *rep) { DeviceIntPtr pDev = NULL; - int i = 0, inputMapLen = numKeyPerModifier * 8; + int rc, i = 0, inputMapLen = numKeyPerModifier * 8; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { @@ -1289,8 +1289,9 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, } } - if (XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE) != Success) - return BadAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + if (rc != Success) + return rc; /* None of the modifiers (old or new) may be down while we change * the map. */ @@ -1300,7 +1301,8 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, !AllModifierKeysAreUp(pDev, inputMap, numKeyPerModifier, pDev->key->modifierKeyMap, pDev->key->maxKeysPerModifier)) { - return MappingBusy; + rep->success = MappingBusy; + return Success; } } } @@ -1337,6 +1339,7 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, } } + rep->success = Success; return Success; } @@ -1344,8 +1347,8 @@ int ProcSetModifierMapping(ClientPtr client) { xSetModifierMappingReply rep; + int rc; REQUEST(xSetModifierMappingReq); - REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq); if (client->req_len != ((stuff->numKeyPerModifier << 1) + @@ -1356,8 +1359,10 @@ ProcSetModifierMapping(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; - rep.success = DoSetModifierMapping(client, (KeyCode *)&stuff[1], - stuff->numKeyPerModifier); + rc = DoSetModifierMapping(client, (KeyCode *)&stuff[1], + stuff->numKeyPerModifier, &rep); + if (rc != Success) + return rc; /* FIXME: Send mapping notifies for all the extended devices as well. */ SendMappingNotify(MappingModifier, 0, 0, client); @@ -1370,8 +1375,14 @@ ProcGetModifierMapping(ClientPtr client) { xGetModifierMappingReply rep; KeyClassPtr keyc = inputInfo.keyboard->key; - + int rc; REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, + DixGetAttrAccess); + if (rc != Success) + return rc; + rep.type = X_Reply; rep.numKeyPerModifier = keyc->maxKeysPerModifier; rep.sequenceNumber = client->sequence; @@ -1394,6 +1405,7 @@ ProcChangeKeyboardMapping(ClientPtr client) KeySymsRec keysyms; KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms; DeviceIntPtr pDev = NULL; + int rc; REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); len = client->req_len - (sizeof(xChangeKeyboardMappingReq) >> 2); @@ -1414,8 +1426,9 @@ ProcChangeKeyboardMapping(ClientPtr client) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { - if (XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE) != Success) - return BadAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + if (rc != Success) + return rc; } } @@ -1437,14 +1450,22 @@ ProcChangeKeyboardMapping(ClientPtr client) } static int -DoSetPointerMapping(DeviceIntPtr device, BYTE *map, int n) +DoSetPointerMapping(ClientPtr client, DeviceIntPtr device, BYTE *map, int n) { - int i = 0; + int rc, i = 0; DeviceIntPtr dev = NULL; if (!device || !device->button) return BadDevice; + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetAttrAccess); + if (rc != Success) + return rc; + } + } + for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { for (i = 0; i < n; i++) { @@ -1469,12 +1490,12 @@ DoSetPointerMapping(DeviceIntPtr device, BYTE *map, int n) int ProcSetPointerMapping(ClientPtr client) { - REQUEST(xSetPointerMappingReq); BYTE *map; int ret; xSetPointerMappingReply rep; - + REQUEST(xSetPointerMappingReq); REQUEST_AT_LEAST_SIZE(xSetPointerMappingReq); + if (client->req_len != (sizeof(xSetPointerMappingReq)+stuff->nElts+3) >> 2) return BadLength; rep.type = X_Reply; @@ -1492,7 +1513,7 @@ ProcSetPointerMapping(ClientPtr client) if (BadDeviceMap(&map[0], (int)stuff->nElts, 1, 255, &client->errorValue)) return BadValue; - ret = DoSetPointerMapping(inputInfo.pointer, map, stuff->nElts); + ret = DoSetPointerMapping(client, inputInfo.pointer, map, stuff->nElts); if (ret != Success) { rep.success = ret; WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); @@ -1509,11 +1530,16 @@ int ProcGetKeyboardMapping(ClientPtr client) { xGetKeyboardMappingReply rep; - REQUEST(xGetKeyboardMappingReq); KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms; - + int rc; + REQUEST(xGetKeyboardMappingReq); REQUEST_SIZE_MATCH(xGetKeyboardMappingReq); + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, + DixGetAttrAccess); + if (rc != Success) + return rc; + if ((stuff->firstKeyCode < curKeySyms->minKeyCode) || (stuff->firstKeyCode > curKeySyms->maxKeyCode)) { client->errorValue = stuff->firstKeyCode; @@ -1546,8 +1572,14 @@ ProcGetPointerMapping(ClientPtr client) { xGetPointerMappingReply rep; ButtonClassPtr butc = inputInfo.pointer->button; - + int rc; REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.pointer, + DixGetAttrAccess); + if (rc != Success) + return rc; + rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.nElts = butc->numButtons; @@ -1766,8 +1798,9 @@ ProcChangeKeyboardControl (ClientPtr client) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { - if (XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE) != Success) - return BadAccess; + ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + if (ret != Success) + return ret; } } @@ -1786,11 +1819,16 @@ ProcChangeKeyboardControl (ClientPtr client) int ProcGetKeyboardControl (ClientPtr client) { - int i; + int rc, i; KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl; xGetKeyboardControlReply rep; - REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, + DixGetAttrAccess); + if (rc != Success) + return rc; + rep.type = X_Reply; rep.length = 5; rep.sequenceNumber = client->sequence; @@ -1812,6 +1850,7 @@ ProcBell(ClientPtr client) DeviceIntPtr keybd = inputInfo.keyboard; int base = keybd->kbdfeed->ctrl.bell; int newpercent; + int rc; REQUEST(xBellReq); REQUEST_SIZE_MATCH(xBellReq); @@ -1832,6 +1871,10 @@ ProcBell(ClientPtr client) for (keybd = inputInfo.devices; keybd; keybd = keybd->next) { if ((keybd->coreEvents || keybd == inputInfo.keyboard) && keybd->kbdfeed && keybd->kbdfeed->BellProc) { + + rc = XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixBellAccess); + if (rc != Success) + return rc; #ifdef XKB if (!noXkbExtension) XkbHandleBell(FALSE, FALSE, keybd, newpercent, @@ -1851,8 +1894,8 @@ ProcChangePointerControl(ClientPtr client) { DeviceIntPtr mouse = inputInfo.pointer; PtrCtrl ctrl; /* might get BadValue part way through */ + int rc; REQUEST(xChangePointerControlReq); - REQUEST_SIZE_MATCH(xChangePointerControlReq); if (!mouse->ptrfeed->CtrlProc) @@ -1903,6 +1946,14 @@ ProcChangePointerControl(ClientPtr client) } } + for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { + if ((mouse->coreEvents || mouse == inputInfo.pointer) && + mouse->ptrfeed && mouse->ptrfeed->CtrlProc) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixSetAttrAccess); + if (rc != Success) + return rc; + } + } for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { if ((mouse->coreEvents || mouse == inputInfo.pointer) && @@ -1920,8 +1971,14 @@ ProcGetPointerControl(ClientPtr client) { PtrCtrl *ctrl = &inputInfo.pointer->ptrfeed->ctrl; xGetPointerControlReply rep; - + int rc; REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.pointer, + DixGetAttrAccess); + if (rc != Success) + return rc; + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -1959,11 +2016,15 @@ ProcGetMotionEvents(ClientPtr client) DeviceIntPtr mouse = inputInfo.pointer; TimeStamp start, stop; REQUEST(xGetMotionEventsReq); - REQUEST_SIZE_MATCH(xGetMotionEventsReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; + rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixReadAccess); + if (rc != Success) + return rc; + if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); rep.type = X_Reply; @@ -2019,7 +2080,7 @@ int ProcQueryKeymap(ClientPtr client) { xQueryKeymapReply rep; - int i; + int rc, i; CARD8 *down = inputInfo.keyboard->key->down; REQUEST_SIZE_MATCH(xReq); @@ -2027,11 +2088,13 @@ ProcQueryKeymap(ClientPtr client) rep.sequenceNumber = client->sequence; rep.length = 2; - if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) - bzero((char *)&rep.map[0], 32); - else - for (i = 0; i<32; i++) - rep.map[i] = down[i]; + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, + DixReadAccess); + if (rc != Success) + return rc; + + for (i = 0; i<32; i++) + rep.map[i] = down[i]; WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); return Success; diff --git a/dix/events.c b/dix/events.c index f109dad4d..deae4e340 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2523,18 +2523,24 @@ ProcWarpPointer(ClientPtr client) WindowPtr dest = NULL; int x, y, rc; ScreenPtr newScreen; - + DeviceIntPtr dev; REQUEST(xWarpPointerReq); - REQUEST_SIZE_MATCH(xWarpPointerReq); + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess); + if (rc != Success) + return rc; + } + } #ifdef PANORAMIX if(!noPanoramiXExtension) return XineramaWarpPointer(client); #endif if (stuff->dstWid != None) { - rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess); + rc = dixLookupWindow(&dest, stuff->dstWid, client, DixGetAttrAccess); if (rc != Success) return rc; } @@ -2547,7 +2553,7 @@ ProcWarpPointer(ClientPtr client) XID winID = stuff->srcWid; WindowPtr source; - rc = dixLookupWindow(&source, winID, client, DixReadAccess); + rc = dixLookupWindow(&source, winID, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -2689,8 +2695,6 @@ CheckPassiveGrabsOnWindow( (grab->confineTo->realized && BorderSizeNotEmpty(grab->confineTo)))) { - if (XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE)) - return FALSE; #ifdef XKB if (!noXkbExtension) { XE_KBPTR.state &= 0x1f00; @@ -3546,10 +3550,10 @@ EnterLeaveEvent( xKeymapEvent ke; ClientPtr client = grab ? rClient(grab) : clients[CLIENT_ID(pWin->drawable.id)]; - if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, FALSE) == Success) - memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31); - else + if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess)) bzero((char *)&ke.map[0], 31); + else + memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31); ke.type = KeymapNotify; if (grab) @@ -3653,10 +3657,10 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { xKeymapEvent ke; ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)]; - if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE) == Success) - memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); - else + if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess)) bzero((char *)&ke.map[0], 31); + else + memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); ke.type = KeymapNotify; (void)DeliverEventsToWindow(pWin, (xEvent *)&ke, 1, @@ -3881,7 +3885,7 @@ SetInputFocus( else if ((focusID == FollowKeyboard) && followOK) focusWin = inputInfo.keyboard->focus->win; else { - rc = dixLookupWindow(&focusWin, focusID, client, DixReadAccess); + rc = dixLookupWindow(&focusWin, focusID, client, DixSetAttrAccess); if (rc != Success) return rc; /* It is a match error to try to set the input focus to an @@ -3889,6 +3893,10 @@ SetInputFocus( if(!focusWin->realized) return(BadMatch); } + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetFocusAccess); + if (rc != Success) + return Success; + focus = dev->focus; if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, focus->time) == EARLIER)) @@ -3941,9 +3949,6 @@ ProcSetInputFocus(client) REQUEST_SIZE_MATCH(xSetInputFocusReq); - if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) - return Success; - return SetInputFocus(client, inputInfo.keyboard, stuff->focus, stuff->revertTo, stuff->time, FALSE); } @@ -3958,10 +3963,16 @@ int ProcGetInputFocus(ClientPtr client) { xGetInputFocusReply rep; - /* REQUEST(xReq); */ FocusClassPtr focus = inputInfo.keyboard->focus; - + int rc; + /* REQUEST(xReq); */ REQUEST_SIZE_MATCH(xReq); + + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, + DixGetFocusAccess); + if (rc != Success) + return rc; + rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; @@ -3991,6 +4002,7 @@ ProcGrabPointer(ClientPtr client) CursorPtr cursor, oldCursor; REQUEST(xGrabPointerReq); TimeStamp time; + Mask access_mode = DixGrabAccess; int rc; REQUEST_SIZE_MATCH(xGrabPointerReq); @@ -4017,7 +4029,7 @@ ProcGrabPointer(ClientPtr client) client->errorValue = stuff->eventMask; return BadValue; } - rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (stuff->confineTo == None) @@ -4025,7 +4037,7 @@ ProcGrabPointer(ClientPtr client) else { rc = dixLookupWindow(&confineTo, stuff->confineTo, client, - DixReadAccess); + DixSetAttrAccess); if (rc != Success) return rc; } @@ -4033,14 +4045,22 @@ ProcGrabPointer(ClientPtr client) cursor = NullCursor; else { - cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, DixReadAccess); - if (!cursor) + rc = dixLookupResource((pointer *)&cursor, stuff->cursor, RT_CURSOR, + client, DixUseAccess); + if (rc != Success) { client->errorValue = stuff->cursor; - return BadCursor; + return (rc == BadValue) ? BadCursor : rc; } + access_mode |= DixForceAccess; } + if (stuff->pointerMode == GrabModeSync || + stuff->keyboardMode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, device, access_mode); + if (rc != Success) + return rc; + /* at this point, some sort of reply is guaranteed. */ time = ClientTimeToServerTime(stuff->time); rep.type = X_Reply; @@ -4192,6 +4212,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, WindowPtr pWin; GrabPtr grab; TimeStamp time; + Mask access_mode = DixGrabAccess; int rc; UpdateCurrentTime(); @@ -4210,9 +4231,16 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, client->errorValue = ownerEvents; return BadValue; } - rc = dixLookupWindow(&pWin, grabWindow, client, DixReadAccess); + + rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; + if (this_mode == GrabModeSync || other_mode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc != Success) + return rc; + time = ClientTimeToServerTime(ctime); grab = dev->grab; if (grab && !SameClient(grab, client)) @@ -4256,14 +4284,10 @@ ProcGrabKeyboard(ClientPtr client) REQUEST_SIZE_MATCH(xGrabKeyboardReq); - if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) { - result = Success; - rep.status = AlreadyGrabbed; - } else - result = GrabDevice(client, inputInfo.keyboard, stuff->keyboardMode, - stuff->pointerMode, stuff->grabWindow, - stuff->ownerEvents, stuff->time, - KeyPressMask | KeyReleaseMask, &rep.status); + result = GrabDevice(client, inputInfo.keyboard, stuff->keyboardMode, + stuff->pointerMode, stuff->grabWindow, + stuff->ownerEvents, stuff->time, + KeyPressMask | KeyReleaseMask, &rep.status); if (result != Success) return result; @@ -4308,14 +4332,18 @@ ProcQueryPointer(ClientPtr client) { xQueryPointerReply rep; WindowPtr pWin, t; - REQUEST(xResourceReq); DeviceIntPtr mouse = inputInfo.pointer; int rc; - + REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + + rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; + rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixReadAccess); + if (rc != Success) + return rc; + if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); rep.type = X_Reply; @@ -4488,7 +4516,7 @@ ProcSendEvent(ClientPtr client) effectiveFocus = pWin = inputFocus; } else - dixLookupWindow(&pWin, stuff->destination, client, DixReadAccess); + dixLookupWindow(&pWin, stuff->destination, client, DixSendAccess); if (!pWin) return BadWindow; @@ -4612,7 +4640,7 @@ ProcGrabKey(ClientPtr client) client->errorValue = stuff->modifiers; return BadValue; } - rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; @@ -4640,6 +4668,7 @@ ProcGrabButton(ClientPtr client) REQUEST(xGrabButtonReq); CursorPtr cursor; GrabPtr grab; + Mask access_mode = DixGrabAccess; int rc; REQUEST_SIZE_MATCH(xGrabButtonReq); @@ -4671,14 +4700,14 @@ ProcGrabButton(ClientPtr client) client->errorValue = stuff->eventMask; return BadValue; } - rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (stuff->confineTo == None) confineTo = NullWindow; else { rc = dixLookupWindow(&confineTo, stuff->confineTo, client, - DixReadAccess); + DixSetAttrAccess); if (rc != Success) return rc; } @@ -4686,15 +4715,22 @@ ProcGrabButton(ClientPtr client) cursor = NullCursor; else { - cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, DixReadAccess); + rc = dixLookupResource((pointer *)&cursor, stuff->cursor, RT_CURSOR, + client, DixUseAccess); + if (rc != Success) if (!cursor) { client->errorValue = stuff->cursor; - return BadCursor; + return (rc == BadValue) ? BadCursor : rc; } + access_mode |= DixForceAccess; } - + if (stuff->pointerMode == GrabModeSync || + stuff->keyboardMode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.pointer, access_mode); + if (rc != Success) + return rc; grab = CreateGrab(client->index, inputInfo.pointer, pWin, (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, diff --git a/dix/grabs.c b/dix/grabs.c index 2210cd05e..b8d0df88d 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -58,6 +58,7 @@ SOFTWARE. #include "inputstr.h" #include "cursorstr.h" #include "dixgrabs.h" +#include "xace.h" #define BITMASK(i) (((Mask)1) << ((i) & 31)) #define MASKIDX(i) ((i) >> 5) @@ -309,6 +310,8 @@ int AddPassiveGrabToList(GrabPtr pGrab) { GrabPtr grab; + Mask access_mode = DixGrabAccess; + int rc; for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { @@ -322,6 +325,13 @@ AddPassiveGrabToList(GrabPtr pGrab) } } + if (grab->keyboardMode == GrabModeSync || grab->pointerMode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, clients[CLIENT_ID(grab->resource)], + grab->device, access_mode); + if (rc != Success) + return rc; + /* Remove all grabs that match the new one exactly */ for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { From e39694789e31e221fc8dec44ace9c697daf7acad Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 29 Aug 2007 14:16:46 -0400 Subject: [PATCH 095/552] xace: drop map-window checking hook, add new hooks for controlling the delivery of events to windows and clients. This is tentative. It's likely that an additional last-resort hook will be necessary for code that calls TryClientEvents or WriteEventsToClient directly. It's also possible that new xace machinery will be necessary to classify events and pull useful resource ID's out of them. The failure case also needs some thinking through. Should event delivery "succeed" or should it report undeliverable? Finally, XKB appears to call WriteToClient to pass events. Sigh. --- Xext/xace.c | 19 +++++++++++++++++-- Xext/xace.h | 25 +++++++++++++------------ Xext/xacestr.h | 16 ++++++++++++++-- dix/events.c | 35 ++++++++++++++++++++++++++++------- dix/window.c | 5 +++-- 5 files changed, 75 insertions(+), 25 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 4d34dc3d9..3091ecd32 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -113,10 +113,25 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_MAP_ACCESS: { - XaceMapAccessRec rec = { + case XACE_SEND_ACCESS: { + XaceSendAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, DeviceIntPtr), + va_arg(ap, WindowPtr), + va_arg(ap, xEventPtr), + va_arg(ap, int), + Success /* default allow */ + }; + calldata = &rec; + prv = &rec.status; + break; + } + case XACE_RECEIVE_ACCESS: { + XaceReceiveAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, WindowPtr), + va_arg(ap, xEventPtr), + va_arg(ap, int), Success /* default allow */ }; calldata = &rec; diff --git a/Xext/xace.h b/Xext/xace.h index f1a6e9d8c..c1fc0714f 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -46,18 +46,19 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_DEVICE_ACCESS 3 #define XACE_PROPERTY_ACCESS 4 #define XACE_DRAWABLE_ACCESS 5 -#define XACE_MAP_ACCESS 6 -#define XACE_CLIENT_ACCESS 7 -#define XACE_EXT_ACCESS 8 -#define XACE_SERVER_ACCESS 9 -#define XACE_SELECTION_ACCESS 10 -#define XACE_SCREEN_ACCESS 11 -#define XACE_SCREENSAVER_ACCESS 12 -#define XACE_AUTH_AVAIL 13 -#define XACE_KEY_AVAIL 14 -#define XACE_AUDIT_BEGIN 15 -#define XACE_AUDIT_END 16 -#define XACE_NUM_HOOKS 17 +#define XACE_SEND_ACCESS 6 +#define XACE_RECEIVE_ACCESS 7 +#define XACE_CLIENT_ACCESS 8 +#define XACE_EXT_ACCESS 9 +#define XACE_SERVER_ACCESS 10 +#define XACE_SELECTION_ACCESS 11 +#define XACE_SCREEN_ACCESS 12 +#define XACE_SCREENSAVER_ACCESS 13 +#define XACE_AUTH_AVAIL 14 +#define XACE_KEY_AVAIL 15 +#define XACE_AUDIT_BEGIN 16 +#define XACE_AUDIT_END 17 +#define XACE_NUM_HOOKS 18 extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index c98be3d32..15d39b72e 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -70,12 +70,24 @@ typedef struct { int status; } XaceDrawableAccessRec; -/* XACE_MAP_ACCESS */ +/* XACE_SEND_ACCESS */ +typedef struct { + ClientPtr client; + DeviceIntPtr dev; + WindowPtr pWin; + xEventPtr events; + int count; + int status; +} XaceSendAccessRec; + +/* XACE_RECEIVE_ACCESS */ typedef struct { ClientPtr client; WindowPtr pWin; + xEventPtr events; + int count; int status; -} XaceMapAccessRec; +} XaceReceiveAccessRec; /* XACE_CLIENT_ACCESS */ typedef struct { diff --git a/dix/events.c b/dix/events.c index deae4e340..42c3ba195 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1753,8 +1753,10 @@ DeliverEventsToWindow(WindowPtr pWin, xEvent *pEvents, int count, if (filter != CantBeFiltered && !((wOtherEventMasks(pWin)|pWin->eventMask) & filter)) return 0; - if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, - pWin->eventMask, filter, grab)) ) + if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) + nondeliveries--; + else if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, + pWin->eventMask, filter, grab)) ) { if (attempt > 0) { @@ -1781,7 +1783,10 @@ DeliverEventsToWindow(WindowPtr pWin, xEvent *pEvents, int count, other = (InputClients *)wOtherClients(pWin); for (; other; other = other->next) { - if ( (attempt = TryClientEvents(rClient(other), pEvents, count, + if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents, + count)) + nondeliveries--; + else if ( (attempt = TryClientEvents(rClient(other), pEvents, count, other->mask[mskidx], filter, grab)) ) { if (attempt > 0) @@ -1878,6 +1883,8 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, return XineramaTryClientEventsResult( wClient(pWin), NullGrab, pWin->eventMask, filter); #endif + if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) + return 0; return TryClientEvents(wClient(pWin), pEvents, count, pWin->eventMask, filter, NullGrab); } @@ -1892,6 +1899,9 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, return XineramaTryClientEventsResult( rClient(other), NullGrab, other->mask, filter); #endif + if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents, + count)) + return 0; return TryClientEvents(rClient(other), pEvents, count, other->mask, filter, NullGrab); } @@ -1986,6 +1996,9 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, Mask filter = filters[type]; int deliveries = 0; + if (XaceHook(XACE_SEND_ACCESS, NULL, dev, pWin, xE, count)) + return 0; + if (type & EXTENSION_EVENT_BASE) { OtherInputMasks *inputMasks; @@ -2829,6 +2842,8 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) return; } /* just deliver it to the focus window */ + if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count)) + return; FixUpEventFromWindow(xE, focus, None, FALSE); if (xE->u.u.type & EXTENSION_EVENT_BASE) mskidx = keybd->id; @@ -2877,9 +2892,12 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, if (!deliveries) { FixUpEventFromWindow(xE, grab->window, None, TRUE); - deliveries = TryClientEvents(rClient(grab), xE, count, - (Mask)grab->eventMask, - filters[xE->u.u.type], grab); + if (!XaceHook(XACE_SEND_ACCESS, thisDev, grab->window, xE, count) && + !XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), grab->window, xE, + count)) + deliveries = TryClientEvents(rClient(grab), xE, count, + (Mask)grab->eventMask, + filters[xE->u.u.type], grab); if (deliveries && (xE->u.u.type == MotionNotify #ifdef XINPUT || xE->u.u.type == DeviceMotionNotify @@ -4530,6 +4548,9 @@ ProcSendEvent(ClientPtr client) { for (;pWin; pWin = pWin->parent) { + if (XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, + &stuff->event, 1)) + return Success; if (DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask, NullGrab, 0)) return Success; @@ -4540,7 +4561,7 @@ ProcSendEvent(ClientPtr client) break; } } - else + else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, &stuff->event, 1)) (void)DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask, NullGrab, 0); return Success; diff --git a/dix/window.c b/dix/window.c index 1a598faca..b6bbdd4cb 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2744,8 +2744,9 @@ MapWindow(WindowPtr pWin, ClientPtr client) return(Success); /* general check for permission to map window */ - if (XaceHook(XACE_MAP_ACCESS, client, pWin) != Success) - return Success; + if (XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW, + DixShowAccess, pWin) != Success) + return Success; pScreen = pWin->drawable.pScreen; if ( (pParent = pWin->parent) ) From 4795df62456b73c6790f271e0a20a83c60496490 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 29 Aug 2007 14:40:10 -0400 Subject: [PATCH 096/552] xace: add hooks + new access codes: TOG-CUP extension. --- Xext/cup.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Xext/cup.c b/Xext/cup.c index 6bfa27837..b544a7517 100644 --- a/Xext/cup.c +++ b/Xext/cup.c @@ -224,12 +224,13 @@ int ProcStoreColors( { REQUEST (xXcupStoreColorsReq); ColormapPtr pcmp; + int rc; REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq); - pcmp = (ColormapPtr) SecurityLookupIDByType (client, stuff->cmap, - RT_COLORMAP, DixWriteAccess); + rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, + client, DixAddAccess); - if (pcmp) { + if (rc == Success) { int ncolors, n; xXcupStoreColorsReply rep; xColorItem* cptr; @@ -273,7 +274,7 @@ int ProcStoreColors( return client->noClientException; } else { client->errorValue = stuff->cmap; - return BadColor; + return (rc == BadValue) ? BadColor : rc; } } From 47ab4d648b31ea1d5800e0bc84cf5f25025bffe3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 30 Aug 2007 11:40:39 -0400 Subject: [PATCH 097/552] devPrivates rework: convert CursorRec and CursorBits over to new interface. --- dix/cursor.c | 14 +++++++++++++- hw/darwin/iokit/xfIOKitCursor.c | 20 ++++++++++---------- hw/darwin/quartz/fullscreen/quartzCursor.c | 10 +++++----- hw/darwin/quartz/quartzCursor.c | 10 +++++----- hw/dmx/dmxcursor.c | 8 ++++---- hw/dmx/dmxcursor.h | 7 +++++-- hw/xfree86/modes/xf86Cursors.c | 5 +++-- hw/xfree86/ramdac/xf86Cursor.c | 6 +++--- hw/xfree86/ramdac/xf86HWCurs.c | 4 ++-- hw/xgl/glx/xglx.c | 4 ++-- hw/xnest/Cursor.c | 6 +++--- hw/xnest/XNCursor.h | 9 ++++++--- include/cursorstr.h | 6 ++++-- mi/midispcur.c | 17 ++++++++++------- 14 files changed, 75 insertions(+), 51 deletions(-) diff --git a/dix/cursor.c b/dix/cursor.c index b188e3f98..324faa169 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -99,6 +99,7 @@ FreeCursorBits(CursorBitsPtr bits) CloseFont(this->font, (Font)0); xfree(this); } + dixFreePrivates(bits->devPrivates); xfree(bits); } } @@ -124,6 +125,7 @@ FreeCursor(pointer value, XID cid) pscr = screenInfo.screens[nscr]; (void)( *pscr->UnrealizeCursor)( pscr, pCurs); } + dixFreePrivates(pCurs->devPrivates); FreeCursorBits(pCurs->bits); xfree( pCurs); return(Success); @@ -192,9 +194,9 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, bits->height = cm->height; bits->xhot = cm->xhot; bits->yhot = cm->yhot; + bits->devPrivates = NULL; bits->refcnt = -1; CheckForEmptyMask(bits); - pCurs->bits = bits; pCurs->refcnt = 1; #ifdef XFIXES @@ -210,10 +212,14 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; + pCurs->devPrivates = NULL; + pCurs->id = cid; + /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, DixCreateAccess, pCurs); if (rc != Success) { + dixFreePrivates(pCurs->devPrivates); FreeCursorBits(bits); xfree(pCurs); return rc; @@ -232,6 +238,7 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, pscr = screenInfo.screens[nscr]; ( *pscr->UnrealizeCursor)( pscr, pCurs); } + dixFreePrivates(pCurs->devPrivates); FreeCursorBits(bits); xfree(pCurs); return BadAlloc; @@ -394,10 +401,14 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; + pCurs->id = cid; + pCurs->devPrivates = NULL; + /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, DixCreateAccess, pCurs); if (rc != Success) { + dixFreePrivates(pCurs->devPrivates); FreeCursorBits(bits); xfree(pCurs); return rc; @@ -416,6 +427,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, pscr = screenInfo.screens[nscr]; ( *pscr->UnrealizeCursor)( pscr, pCurs); } + dixFreePrivates(pCurs->devPrivates); FreeCursorBits(pCurs->bits); xfree(pCurs); return BadAlloc; diff --git a/hw/darwin/iokit/xfIOKitCursor.c b/hw/darwin/iokit/xfIOKitCursor.c index 224710114..3101a8932 100644 --- a/hw/darwin/iokit/xfIOKitCursor.c +++ b/hw/darwin/iokit/xfIOKitCursor.c @@ -202,7 +202,7 @@ XFIOKitRealizeCursor8( } // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + dixSetPrivate(&pCursor->devPrivates, pScreen, newCursor); return TRUE; } @@ -285,7 +285,7 @@ XFIOKitRealizeCursor15( #endif // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + dixSetPrivate(&pCursor->devPrivates, pScreen, newCursor); return TRUE; } @@ -369,7 +369,7 @@ XFIOKitRealizeCursor24( #endif // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; + dixSetPrivate(&pCursor->devPrivates, pScreen, newCursor); return TRUE; } @@ -422,7 +422,7 @@ XFIOKitUnrealizeCursor( !ScreenPriv->canHWCursor) { result = (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor); } else { - xfree( pCursor->devPriv[pScreen->myNum] ); + xfree(dixLookupPrivate(&pCursor->devPrivates, pScreen)); result = TRUE; } @@ -476,20 +476,20 @@ XFIOKitSetCursor( // change the cursor image in shared memory if (dfb->bitsPerPixel == 8) { - cursorPrivPtr newCursor = - (cursorPrivPtr) pCursor->devPriv[pScreen->myNum]; + cursorPrivPtr newCursor = dixLookupPrivate(&pCursor->devPrivates, + pScreen); memcpy(cshmem->cursor.bw8.image[0], newCursor->image, CURSORWIDTH*CURSORHEIGHT); memcpy(cshmem->cursor.bw8.mask[0], newCursor->mask, CURSORWIDTH*CURSORHEIGHT); } else if (dfb->bitsPerPixel == 16) { - unsigned short *newCursor = - (unsigned short *) pCursor->devPriv[pScreen->myNum]; + unsigned short *newCursor = dixLookupPrivate(&pCursor->devPrivates, + pScreen); memcpy(cshmem->cursor.rgb.image[0], newCursor, 2*CURSORWIDTH*CURSORHEIGHT); } else { - unsigned int *newCursor = - (unsigned int *) pCursor->devPriv[pScreen->myNum]; + unsigned int *newCursor = dixLookupPrivate(&pCursor->devPrivates, + pScreen); memcpy(cshmem->cursor.rgb24.image[0], newCursor, 4*CURSORWIDTH*CURSORHEIGHT); } diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index bee83b875..797149ef9 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -318,7 +318,7 @@ QuartzRealizeCursor( if (!qdCursor) return FALSE; // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) qdCursor; + dixSetPrivate(&pCursor->devPrivates, pScreen, qdCursor); return TRUE; } @@ -345,13 +345,13 @@ QuartzUnrealizeCursor( (pScreen, pCursor); } } else { - CCrsrHandle oldCursor = (CCrsrHandle) pCursor->devPriv[pScreen->myNum]; - + CCrsrHandle oldCursor = dixLookupPrivate(&pCursor->devPrivates, + pScreen); if (currentCursor != oldCursor) { // This should only fail when quitting, in which case we just leak. FreeQDCursor(oldCursor); } - pCursor->devPriv[pScreen->myNum] = NULL; + dixSetPrivate(&pCursor->devPrivates, pScreen, NULL); return TRUE; } } @@ -391,7 +391,7 @@ QuartzSetCursor( (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); ScreenPriv->qdCursorMode = TRUE; - CHANGE_QD_CURSOR(pCursor->devPriv[pScreen->myNum]); + CHANGE_QD_CURSOR(dixLookupPrivate(&pCursor->devPrivates, pScreen)); SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); } else if (quartzRootless) { diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c index a121ce17c..aa7ce2295 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -321,7 +321,7 @@ QuartzRealizeCursor( if (!qdCursor) return FALSE; // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) qdCursor; + dixSetPrivate(&pCursor->devPrivates, pScreen, qdCursor); return TRUE; } @@ -348,13 +348,13 @@ QuartzUnrealizeCursor( (pScreen, pCursor); } } else { - CCrsrHandle oldCursor = (CCrsrHandle) pCursor->devPriv[pScreen->myNum]; - + CCrsrHandle oldCursor = dixLookupPrivate(&pCursor->devPrivates, + pScreen); if (currentCursor != oldCursor) { // This should only fail when quitting, in which case we just leak. FreeQDCursor(oldCursor); } - pCursor->devPriv[pScreen->myNum] = NULL; + dixSetPrivate(&pCursor->devPrivates, pScreen, NULL); return TRUE; } } @@ -394,7 +394,7 @@ QuartzSetCursor( (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); ScreenPriv->qdCursorMode = TRUE; - CHANGE_QD_CURSOR(pCursor->devPriv[pScreen->myNum]); + CHANGE_QD_CURSOR(dixLookupPrivate(&pCursor->devPrivates, pScreen)); SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); } else if (quartzRootless) { diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c index 1ad199d58..8a801169c 100644 --- a/hw/dmx/dmxcursor.c +++ b/hw/dmx/dmxcursor.c @@ -662,8 +662,8 @@ static Bool _dmxRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) DMXDBG2("_dmxRealizeCursor(%d,%p)\n", pScreen->myNum, pCursor); - pCursor->devPriv[pScreen->myNum] = xalloc(sizeof(*pCursorPriv)); - if (!pCursor->devPriv[pScreen->myNum]) + DMX_SET_CURSOR_PRIV(pCursor, pScreen, xalloc(sizeof(*pCursorPriv))); + if (!DMX_GET_CURSOR_PRIV(pCursor, pScreen)) return FALSE; pCursorPriv = DMX_GET_CURSOR_PRIV(pCursor, pScreen); @@ -700,9 +700,9 @@ static Bool _dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) if (dmxScreen->beDisplay) { if (dmxBEFreeCursor(pScreen, pCursor)) - xfree(pCursor->devPriv[pScreen->myNum]); + xfree(DMX_GET_CURSOR_PRIV(pCursor, pScreen)); } - pCursor->devPriv[pScreen->myNum] = NULL; + DMX_SET_CURSOR_PRIV(pCursor, pScreen, NULL); return TRUE; } diff --git a/hw/dmx/dmxcursor.h b/hw/dmx/dmxcursor.h index 7b70c6250..d909bd01e 100644 --- a/hw/dmx/dmxcursor.h +++ b/hw/dmx/dmxcursor.h @@ -63,7 +63,10 @@ extern void dmxHideCursor(DMXScreenInfo *dmxScreen); extern void dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor); extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor); -#define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) \ - (dmxCursorPrivPtr)(_pCursor)->devPriv[(_pScreen)->myNum] +#define DMX_GET_CURSOR_PRIV(_pCursor, _pScreen) \ + ((dmxCursorPrivPtr)dixLookupPrivate(&(_pCursor)->devPrivates, _pScreen)) + +#define DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) \ + dixSetPrivate(&(_pCursor)->devPrivates, _pScreen, v) #endif /* DMXCURSOR_H */ diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index b5101642b..acf34c1d1 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -226,7 +226,8 @@ xf86_set_cursor_colors (ScrnInfoPtr scrn, int bg, int fg) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); CursorPtr cursor = xf86_config->cursor; int c; - CARD8 *bits = cursor ? cursor->devPriv[screen->myNum] : NULL; + CARD8 *bits = cursor ? dixLookupPrivate(&cursor->devPrivates, + screen) : NULL; /* Save ARGB versions of these colors */ xf86_config->cursor_fg = (CARD32) fg | 0xff000000; @@ -612,7 +613,7 @@ xf86_reload_cursors (ScreenPtr screen) else #endif (*cursor_info->LoadCursorImage)(cursor_info->pScrn, - cursor->devPriv[screen->myNum]); + dixLookupPrivate(&cursor->devPrivates, screen)); (*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y); (*cursor_info->ShowCursor)(cursor_info->pScrn); diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c index 1c2d6a869..5b1ce5e1f 100644 --- a/hw/xfree86/ramdac/xf86Cursor.c +++ b/hw/xfree86/ramdac/xf86Cursor.c @@ -251,7 +251,7 @@ xf86CursorRealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) - pCurs->devPriv[pScreen->myNum] = NULL; + dixSetPrivate(&pCurs->devPrivates, pScreen, NULL); return (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCurs); } @@ -263,8 +263,8 @@ xf86CursorUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCurs) &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) { - xfree(pCurs->devPriv[pScreen->myNum]); - pCurs->devPriv[pScreen->myNum] = NULL; + xfree(dixLookupPrivate(&pCurs->devPrivates, pScreen)); + dixSetPrivate(&pCurs->devPrivates, pScreen, NULL); } return (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCurs); diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c index 0a753be3f..d10e283d7 100644 --- a/hw/xfree86/ramdac/xf86HWCurs.c +++ b/hw/xfree86/ramdac/xf86HWCurs.c @@ -123,7 +123,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) return; } - bits = pCurs->devPriv[pScreen->myNum]; + bits = (unsigned char *)dixLookupPrivate(&pCurs->devPrivates, pScreen); x -= infoPtr->pScrn->frameX0 + ScreenPriv->HotX; y -= infoPtr->pScrn->frameY0 + ScreenPriv->HotY; @@ -133,7 +133,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) #endif if (!bits) { bits = (*infoPtr->RealizeCursor)(infoPtr, pCurs); - pCurs->devPriv[pScreen->myNum] = bits; + dixSetPrivate(&pCurs->devPrivates, pScreen, bits); } if (!(infoPtr->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) diff --git a/hw/xgl/glx/xglx.c b/hw/xgl/glx/xglx.c index 657afc075..d7f0ed3f9 100644 --- a/hw/xgl/glx/xglx.c +++ b/hw/xgl/glx/xglx.c @@ -121,10 +121,10 @@ typedef struct _xglxCursor { } xglxCursorRec, *xglxCursorPtr; #define XGLX_GET_CURSOR_PRIV(pCursor, pScreen) \ - ((xglxCursorPtr) (pCursor)->devPriv[(pScreen)->myNum]) + ((xglxCursorPtr)dixLookupPrivate(&(pCursor)->devPrivates, pScreen)) #define XGLX_SET_CURSOR_PRIV(pCursor, pScreen, v) \ - ((pCursor)->devPriv[(pScreen)->myNum] = (pointer) v) + dixSetPrivate(&(pCursor)->devPrivates, pScreen, v) #define XGLX_CURSOR_PRIV(pCursor, pScreen) \ xglxCursorPtr pCursorPriv = XGLX_GET_CURSOR_PRIV (pCursor, pScreen) diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c index 134276e7b..138698068 100644 --- a/hw/xnest/Cursor.c +++ b/hw/xnest/Cursor.c @@ -104,8 +104,8 @@ xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) bg_color.green = pCursor->backGreen; bg_color.blue = pCursor->backBlue; - pCursor->devPriv[pScreen->myNum] = (pointer)xalloc(sizeof(xnestPrivCursor)); - xnestCursorPriv(pCursor, pScreen)->cursor = + xnestSetCursorPriv(pCursor, pScreen, xalloc(sizeof(xnestPrivCursor))); + xnestCursor(pCursor, pScreen) = XCreatePixmapCursor(xnestDisplay, source, mask, &fg_color, &bg_color, pCursor->bits->xhot, pCursor->bits->yhot); @@ -119,7 +119,7 @@ Bool xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) { XFreeCursor(xnestDisplay, xnestCursor(pCursor, pScreen)); - xfree(xnestCursorPriv(pCursor, pScreen)); + xfree(xnestGetCursorPriv(pCursor, pScreen)); return True; } diff --git a/hw/xnest/XNCursor.h b/hw/xnest/XNCursor.h index ffec9eb0a..9705f6bea 100644 --- a/hw/xnest/XNCursor.h +++ b/hw/xnest/XNCursor.h @@ -19,11 +19,14 @@ typedef struct { Cursor cursor; } xnestPrivCursor; -#define xnestCursorPriv(pCursor, pScreen) \ - ((xnestPrivCursor *)((pCursor)->devPriv[pScreen->myNum])) +#define xnestGetCursorPriv(pCursor, pScreen) \ + ((xnestPrivCursor *)dixLookupPrivate(&(pCursor)->devPrivates, pScreen)) + +#define xnestSetCursorPriv(pCursor, pScreen, v) \ + dixSetPrivate(&(pCursor)->devPrivates, pScreen, v) #define xnestCursor(pCursor, pScreen) \ - (xnestCursorPriv(pCursor, pScreen)->cursor) + (xnestGetCursorPriv(pCursor, pScreen)->cursor) Bool xnestRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); Bool xnestUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); diff --git a/include/cursorstr.h b/include/cursorstr.h index b7beaa0c5..bca35969b 100644 --- a/include/cursorstr.h +++ b/include/cursorstr.h @@ -49,6 +49,7 @@ SOFTWARE. #define CURSORSTRUCT_H #include "cursor.h" +#include "privates.h" /* * device-independent cursor storage */ @@ -63,7 +64,7 @@ typedef struct _CursorBits { Bool emptyMask; /* all zeros mask */ unsigned short width, height, xhot, yhot; /* metrics */ int refcnt; /* can be shared */ - pointer devPriv[MAXSCREENS]; /* set by pScr->RealizeCursor*/ + PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/ #ifdef ARGB_CURSOR CARD32 *argb; /* full-color alpha blended */ #endif @@ -74,7 +75,8 @@ typedef struct _Cursor { unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */ unsigned short backRed, backGreen, backBlue; /* device-independent color */ int refcnt; - pointer devPriv[MAXSCREENS]; /* set by pScr->RealizeCursor*/ + PrivateRec *devPrivates; /* set by pScr->RealizeCursor*/ + XID id; #ifdef XFIXES CARD32 serialNumber; Atom name; diff --git a/mi/midispcur.c b/mi/midispcur.c index 8b782925a..f974c0845 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -190,7 +190,7 @@ miDCRealizeCursor (pScreen, pCursor) CursorPtr pCursor; { if (pCursor->bits->refcnt <= 1) - pCursor->bits->devPriv[pScreen->myNum] = (pointer)NULL; + dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL); return TRUE; } @@ -290,7 +290,7 @@ miDCRealize ( xfree ((pointer) pPriv); return (miDCCursorPtr)NULL; } - pCursor->bits->devPriv[pScreen->myNum] = (pointer) pPriv; + dixSetPrivate(&pCursor->bits->devPrivates, pScreen, pPriv); return pPriv; } pPriv->pPicture = 0; @@ -308,7 +308,7 @@ miDCRealize ( xfree ((pointer) pPriv); return (miDCCursorPtr)NULL; } - pCursor->bits->devPriv[pScreen->myNum] = (pointer) pPriv; + dixSetPrivate(&pCursor->bits->devPrivates, pScreen, pPriv); /* create the two sets of bits, clipping as appropriate */ @@ -354,7 +354,8 @@ miDCUnrealizeCursor (pScreen, pCursor) { miDCCursorPtr pPriv; - pPriv = (miDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum]; + pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, + pScreen); if (pPriv && (pCursor->bits->refcnt <= 1)) { if (pPriv->sourceBits) @@ -366,7 +367,7 @@ miDCUnrealizeCursor (pScreen, pCursor) FreePicture (pPriv->pPicture, 0); #endif xfree ((pointer) pPriv); - pCursor->bits->devPriv[pScreen->myNum] = (pointer)NULL; + dixSetPrivate(&pCursor->bits->devPrivates, pScreen, NULL); } return TRUE; } @@ -461,7 +462,8 @@ miDCPutUpCursor (pScreen, pCursor, x, y, source, mask) miDCCursorPtr pPriv; WindowPtr pWin; - pPriv = (miDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum]; + pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, + pScreen); if (!pPriv) { pPriv = miDCRealize(pScreen, pCursor); @@ -711,7 +713,8 @@ miDCMoveCursor (pScreen, pCursor, x, y, w, h, dx, dy, source, mask) XID gcval = FALSE; PixmapPtr pTemp; - pPriv = (miDCCursorPtr) pCursor->bits->devPriv[pScreen->myNum]; + pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, + pScreen); if (!pPriv) { pPriv = miDCRealize(pScreen, pCursor); From cda92bbf12107865e93c03c71b901ef51466dc31 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 30 Aug 2007 11:48:45 -0400 Subject: [PATCH 098/552] xace: add hooks + new access codes: XFixes extension. Required a new name argument to the selection access hook to handle XFixesSelectSelectionInput. --- Xext/xace.c | 1 + Xext/xacestr.h | 1 + dix/dispatch.c | 32 ++++++++++++++++------------ xfixes/cursor.c | 55 ++++++++++++++++++++++++++++++++++-------------- xfixes/region.c | 34 +++++++++++++++++------------- xfixes/saveset.c | 2 +- xfixes/select.c | 9 +++++++- 7 files changed, 87 insertions(+), 47 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 3091ecd32..cc689864b 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -173,6 +173,7 @@ int XaceHook(int hook, ...) case XACE_SELECTION_ACCESS: { XaceSelectionAccessRec rec = { va_arg(ap, ClientPtr), + va_arg(ap, Atom), va_arg(ap, Selection*), va_arg(ap, Mask), Success /* default allow */ diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 15d39b72e..0957f0da1 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -115,6 +115,7 @@ typedef struct { /* XACE_SELECTION_ACCESS */ typedef struct { ClientPtr client; + Atom name; Selection *selection; Mask access_mode; int status; diff --git a/dix/dispatch.c b/dix/dispatch.c index 1ad3c9437..7adfe02be 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1013,10 +1013,6 @@ ProcSetSelectionOwner(ClientPtr client) { xEvent event; - rc = XaceHook(XACE_SELECTION_ACCESS, client, CurrentSelections[i], - DixSetAttrAccess); - if (rc != Success) - return rc; /* If the timestamp in client's request is in the past relative to the time stamp indicating the last time the owner of the selection was set, do not set the selection, just return @@ -1024,6 +1020,12 @@ ProcSetSelectionOwner(ClientPtr client) if (CompareTimeStamps(time, CurrentSelections[i].lastTimeChanged) == EARLIER) return Success; + + rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, + CurrentSelections[i], DixSetAttrAccess); + if (rc != Success) + return rc; + if (CurrentSelections[i].client && (!pWin || (CurrentSelections[i].client != client))) { @@ -1054,19 +1056,17 @@ ProcSetSelectionOwner(ClientPtr client) CurrentSelections = newsels; CurrentSelections[i].selection = stuff->selection; CurrentSelections[i].devPrivates = NULL; - rc = XaceHook(XACE_SELECTION_ACCESS, CurrentSelections[i], - DixSetAttrAccess); + rc = XaceHook(XACE_SELECTION_ACCESS, stuff->selection, + CurrentSelections[i], DixSetAttrAccess); if (rc != Success) return rc; } - dixFreePrivates(CurrentSelections[i].devPrivates); CurrentSelections[i].lastTimeChanged = time; CurrentSelections[i].window = stuff->window; CurrentSelections[i].destwindow = stuff->window; CurrentSelections[i].pWin = pWin; CurrentSelections[i].client = (pWin ? client : NullClient); CurrentSelections[i].destclient = (pWin ? client : NullClient); - CurrentSelections[i].devPrivates = NULL; if (SelectionCallback) { SelectionInfoRec info; @@ -1092,7 +1092,7 @@ ProcGetSelectionOwner(ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); if (ValidAtom(stuff->id)) { - int i; + int rc, i; xGetSelectionOwnerReply reply; i = 0; @@ -1101,12 +1101,16 @@ ProcGetSelectionOwner(ClientPtr client) reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; - if (i < NumCurrentSelections && - XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i], - DixGetAttrAccess) == Success) + if (i < NumCurrentSelections) reply.owner = CurrentSelections[i].destwindow; else reply.owner = None; + + rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->id, NULL, + DixGetAttrAccess); + if (rc != Success) + return rc; + WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply); return(client->noClientException); } @@ -1143,8 +1147,8 @@ ProcConvertSelection(ClientPtr client) CurrentSelections[i].selection != stuff->selection) i++; if ((i < NumCurrentSelections) && (CurrentSelections[i].window != None) && - XaceHook(XACE_SELECTION_ACCESS, client, &CurrentSelections[i], - DixReadAccess) == Success) + XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, + &CurrentSelections[i], DixReadAccess) == Success) { event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 975ebc36d..91f149e1a 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -51,6 +51,7 @@ #include "servermd.h" #include "inputstr.h" #include "windowstr.h" +#include "xace.h" static RESTYPE CursorClientType; static RESTYPE CursorHideCountType; @@ -238,7 +239,7 @@ ProcXFixesSelectCursorInput (ClientPtr client) int rc; REQUEST_SIZE_MATCH (xXFixesSelectCursorInputReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); if (rc != Success) return rc; if (stuff->eventMask & ~CursorAllEvents) @@ -343,14 +344,16 @@ ProcXFixesGetCursorImage (ClientPtr client) xXFixesGetCursorImageReply *rep; CursorPtr pCursor; CARD32 *image; - int npixels; - int width, height; - int x, y; + int npixels, width, height, rc, x, y; REQUEST_SIZE_MATCH(xXFixesGetCursorImageReq); pCursor = CursorCurrent; if (!pCursor) return BadCursor; + rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, + DixReadAccess, pCursor); + if (rc != Success) + return rc; GetSpritePosition (&x, &y); width = pCursor->bits->width; height = pCursor->bits->height; @@ -411,7 +414,7 @@ ProcXFixesSetCursorName (ClientPtr client) Atom atom; REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq); - VERIFY_CURSOR(pCursor, stuff->cursor, client, DixWriteAccess); + VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess); tchar = (char *) &stuff[1]; atom = MakeAtom (tchar, stuff->nbytes, TRUE); if (atom == BAD_RESOURCE) @@ -444,7 +447,7 @@ ProcXFixesGetCursorName (ClientPtr client) int len; REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq); - VERIFY_CURSOR(pCursor, stuff->cursor, client, DixReadAccess); + VERIFY_CURSOR(pCursor, stuff->cursor, client, DixGetAttrAccess); if (pCursor->name) str = NameForAtom (pCursor->name); else @@ -493,12 +496,16 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) char *name; int nbytes, nbytesRound; int width, height; - int x, y; + int rc, x, y; REQUEST_SIZE_MATCH(xXFixesGetCursorImageAndNameReq); pCursor = CursorCurrent; if (!pCursor) return BadCursor; + rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, + DixReadAccess|DixGetAttrAccess, pCursor); + if (rc != Success) + return rc; GetSpritePosition (&x, &y); width = pCursor->bits->width; height = pCursor->bits->height; @@ -675,8 +682,10 @@ ProcXFixesChangeCursor (ClientPtr client) REQUEST(xXFixesChangeCursorReq); REQUEST_SIZE_MATCH(xXFixesChangeCursorReq); - VERIFY_CURSOR (pSource, stuff->source, client, DixReadAccess); - VERIFY_CURSOR (pDestination, stuff->destination, client, DixWriteAccess); + VERIFY_CURSOR (pSource, stuff->source, client, + DixReadAccess|DixGetAttrAccess); + VERIFY_CURSOR (pDestination, stuff->destination, client, + DixWriteAccess|DixSetAttrAccess); ReplaceCursor (pSource, TestForCursor, (pointer) pDestination); return (client->noClientException); @@ -710,7 +719,8 @@ ProcXFixesChangeCursorByName (ClientPtr client) REQUEST(xXFixesChangeCursorByNameReq); REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes); - VERIFY_CURSOR(pSource, stuff->source, client, DixReadAccess); + VERIFY_CURSOR(pSource, stuff->source, client, + DixReadAccess|DixGetAttrAccess); tchar = (char *) &stuff[1]; name = MakeAtom (tchar, stuff->nbytes, FALSE); if (name) @@ -838,10 +848,11 @@ ProcXFixesHideCursor (ClientPtr client) REQUEST_SIZE_MATCH (xXFixesHideCursorReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) { + ret = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, + client, DixGetAttrAccess); + if (ret != Success) { client->errorValue = stuff->window; - return BadWindow; + return (ret == BadValue) ? BadWindow : ret; } /* @@ -859,6 +870,11 @@ ProcXFixesHideCursor (ClientPtr client) * This is the first time this client has hid the cursor * for this screen. */ + ret = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen, + DixHideAccess); + if (ret != Success) + return ret; + ret = createCursorHideCount(client, pWin->drawable.pScreen); if (ret == Success) { @@ -885,14 +901,16 @@ ProcXFixesShowCursor (ClientPtr client) { WindowPtr pWin; CursorHideCountPtr pChc; + int rc; REQUEST(xXFixesShowCursorReq); REQUEST_SIZE_MATCH (xXFixesShowCursorReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) { + rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, + client, DixGetAttrAccess); + if (rc != Success) { client->errorValue = stuff->window; - return BadWindow; + return (rc == BadValue) ? BadWindow : rc; } /* @@ -904,6 +922,11 @@ ProcXFixesShowCursor (ClientPtr client) return BadMatch; } + rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen, + DixShowAccess); + if (rc != Success) + return rc; + pChc->hideCount--; if (pChc->hideCount <= 0) { FreeResource(pChc->resource, 0); diff --git a/xfixes/region.c b/xfixes/region.c index d4316be78..d90b1e0ff 100755 --- a/xfixes/region.c +++ b/xfixes/region.c @@ -109,18 +109,18 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client) { RegionPtr pRegion; PixmapPtr pPixmap; + int rc; REQUEST (xXFixesCreateRegionFromBitmapReq); REQUEST_SIZE_MATCH (xXFixesCreateRegionFromBitmapReq); LEGAL_NEW_RESOURCE (stuff->region, client); - pPixmap = (PixmapPtr) SecurityLookupIDByType (client, stuff->bitmap, - RT_PIXMAP, - DixReadAccess); - if (!pPixmap) + rc = dixLookupResource((pointer *)&pPixmap, stuff->bitmap, RT_PIXMAP, + client, DixReadAccess); + if (rc != Success) { client->errorValue = stuff->bitmap; - return BadPixmap; + return (rc == BadValue) ? BadPixmap : rc; } if (pPixmap->drawable.depth != 1) return BadMatch; @@ -155,15 +155,17 @@ ProcXFixesCreateRegionFromWindow (ClientPtr client) RegionPtr pRegion; Bool copy = TRUE; WindowPtr pWin; + int rc; REQUEST (xXFixesCreateRegionFromWindowReq); REQUEST_SIZE_MATCH (xXFixesCreateRegionFromWindowReq); LEGAL_NEW_RESOURCE (stuff->region, client); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) + rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, + client, DixGetAttrAccess); + if (rc != Success) { client->errorValue = stuff->window; - return BadWindow; + return (rc == BadValue) ? BadWindow : rc; } switch (stuff->kind) { case WindowRegionBounding: @@ -224,7 +226,7 @@ ProcXFixesCreateRegionFromGC (ClientPtr client) REQUEST_SIZE_MATCH (xXFixesCreateRegionFromGCReq); LEGAL_NEW_RESOURCE (stuff->region, client); - rc = dixLookupGC(&pGC, stuff->gc, client, DixReadAccess); + rc = dixLookupGC(&pGC, stuff->gc, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -274,7 +276,7 @@ ProcXFixesCreateRegionFromPicture (ClientPtr client) REQUEST_SIZE_MATCH (xXFixesCreateRegionFromPictureReq); LEGAL_NEW_RESOURCE (stuff->region, client); - VERIFY_PICTURE(pPicture, stuff->picture, client, DixReadAccess, + VERIFY_PICTURE(pPicture, stuff->picture, client, DixGetAttrAccess, RenderErrBase + BadPicture); switch (pPicture->clientClipType) { @@ -635,7 +637,7 @@ ProcXFixesSetGCClipRegion (ClientPtr client) REQUEST(xXFixesSetGCClipRegionReq); REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq); - rc = dixLookupGC(&pGC, stuff->gc, client, DixWriteAccess); + rc = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); if (rc != Success) return rc; @@ -681,14 +683,16 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client) ScreenPtr pScreen; RegionPtr pRegion; RegionPtr *pDestRegion; + int rc; REQUEST(xXFixesSetWindowShapeRegionReq); REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq); - pWin = (WindowPtr) LookupIDByType (stuff->dest, RT_WINDOW); - if (!pWin) + rc = dixLookupResource((pointer *)&pWin, stuff->dest, RT_WINDOW, + client, DixSetAttrAccess); + if (rc != Success) { client->errorValue = stuff->dest; - return BadWindow; + return (rc == BadValue) ? BadWindow : rc; } VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixWriteAccess); pScreen = pWin->drawable.pScreen; @@ -780,7 +784,7 @@ ProcXFixesSetPictureClipRegion (ClientPtr client) REQUEST(xXFixesSetPictureClipRegionReq); REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq); - VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess, + VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess, RenderErrBase + BadPicture); pScreen = pPicture->pDrawable->pScreen; ps = GetPictureScreen (pScreen); diff --git a/xfixes/saveset.c b/xfixes/saveset.c index 8d66843d9..e6e297638 100755 --- a/xfixes/saveset.c +++ b/xfixes/saveset.c @@ -35,7 +35,7 @@ ProcXFixesChangeSaveSet(ClientPtr client) REQUEST(xXFixesChangeSaveSetReq); REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq); - result = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + result = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (result != Success) return result; if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) diff --git a/xfixes/select.c b/xfixes/select.c index c0076801d..9de152f29 100755 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -25,6 +25,7 @@ #endif #include "xfixesint.h" +#include "xace.h" static RESTYPE SelectionClientType, SelectionWindowType; static Bool SelectionCallbackRegistered = FALSE; @@ -131,8 +132,14 @@ XFixesSelectSelectionInput (ClientPtr pClient, WindowPtr pWindow, CARD32 eventMask) { + int rc; SelectionEventPtr *prev, e; + rc = XaceHook(XACE_SELECTION_ACCESS, pClient, selection, NULL, + DixGetAttrAccess); + if (rc != Success) + return rc; + for (prev = &selectionEvents; (e = *prev); prev = &e->next) { if (e->selection == selection && @@ -196,7 +203,7 @@ ProcXFixesSelectSelectionInput (ClientPtr client) int rc; REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); if (rc != Success) return rc; if (stuff->eventMask & ~SelectionAllEvents) From 766c693ef3637ee6fc402df594060ed2c1346761 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 30 Aug 2007 13:06:28 -0400 Subject: [PATCH 099/552] xace: add hooks + new access codes: MIT-SCREEN-SAVER extension --- Xext/saver.c | 51 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/Xext/saver.c b/Xext/saver.c index 004258382..d282173f8 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -48,6 +48,7 @@ in this Software without prior written authorization from the X Consortium. #include "gcstruct.h" #include "cursorstr.h" #include "colormapst.h" +#include "xace.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" @@ -789,7 +790,11 @@ ProcScreenSaverQueryInfo (client) REQUEST_SIZE_MATCH (xScreenSaverQueryInfoReq); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, - DixUnknownAccess); + DixGetAttrAccess); + if (rc != Success) + return rc; + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, pDraw->pScreen, + DixGetAttrAccess); if (rc != Success) return rc; @@ -858,9 +863,15 @@ ProcScreenSaverSelectInput (client) REQUEST_SIZE_MATCH (xScreenSaverSelectInputReq); rc = dixLookupDrawable (&pDraw, stuff->drawable, client, 0, - DixUnknownAccess); + DixGetAttrAccess); if (rc != Success) return rc; + + rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, pDraw->pScreen, + DixSetAttrAccess); + if (rc != Success) + return rc; + if (!setEventMask (pDraw->pScreen, client, stuff->eventMask)) return BadAlloc; return Success; @@ -894,12 +905,16 @@ ScreenSaverSetAttributes (ClientPtr client) REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq); ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, - DixUnknownAccess); + DixGetAttrAccess); if (ret != Success) return ret; pScreen = pDraw->pScreen; pParent = WindowTable[pScreen->myNum]; + ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess); + if (ret != Success) + return ret; + len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2); if (Ones(stuff->mask) != len) return BadLength; @@ -1055,8 +1070,9 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - pPixmap = (PixmapPtr)LookupIDByType(pixID, RT_PIXMAP); - if (pPixmap != (PixmapPtr) NULL) + ret = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP, + client, DixReadAccess); + if (ret == Success) { if ((pPixmap->drawable.depth != depth) || (pPixmap->drawable.pScreen != pScreen)) @@ -1070,7 +1086,7 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - ret = BadPixmap; + ret = (ret == BadValue) ? BadPixmap : ret; client->errorValue = pixID; goto PatchUp; } @@ -1092,8 +1108,9 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - pPixmap = (PixmapPtr)LookupIDByType(pixID, RT_PIXMAP); - if (pPixmap) + ret = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP, + client, DixReadAccess); + if (ret == Success) { if ((pPixmap->drawable.depth != depth) || (pPixmap->drawable.pScreen != pScreen)) @@ -1107,7 +1124,7 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - ret = BadPixmap; + ret = (ret == BadValue) ? BadPixmap : ret; client->errorValue = pixID; goto PatchUp; } @@ -1185,10 +1202,11 @@ ScreenSaverSetAttributes (ClientPtr client) break; case CWColormap: cmap = (Colormap) *pVlist; - pCmap = (ColormapPtr)LookupIDByType(cmap, RT_COLORMAP); - if (!pCmap) + ret = dixLookupResource((pointer *)&pCmap, cmap, RT_COLORMAP, + client, DixUseAccess); + if (ret != Success) { - ret = BadColor; + ret = (ret == BadValue) ? BadColor : ret; client->errorValue = cmap; goto PatchUp; } @@ -1208,10 +1226,11 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - pCursor = (CursorPtr)LookupIDByType(cursorID, RT_CURSOR); - if (!pCursor) + ret = dixLookupResource((pointer *)&pCursor, cursorID, + RT_CURSOR, client, DixUseAccess); + if (ret != Success) { - ret = BadCursor; + ret = (ret == BadValue) ? BadCursor : ret; client->errorValue = cursorID; goto PatchUp; } @@ -1253,7 +1272,7 @@ ScreenSaverUnsetAttributes (ClientPtr client) REQUEST_SIZE_MATCH (xScreenSaverUnsetAttributesReq); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, - DixUnknownAccess); + DixGetAttrAccess); if (rc != Success) return rc; pPriv = GetScreenPrivate (pDraw->pScreen); From 53f346b158fa8e10de5a8777fa6d8d86f918878b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 30 Aug 2007 13:20:04 -0400 Subject: [PATCH 100/552] xace: add hooks + new access codes: SHAPE extension --- Xext/shape.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Xext/shape.c b/Xext/shape.c index 928eeee31..0f49f7332 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -323,7 +323,7 @@ ProcShapeRectangles (client) REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); UpdateCurrentTime(); - rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); if (rc != Success) return rc; switch (stuff->destKind) { @@ -423,7 +423,7 @@ ProcShapeMask (client) REQUEST_SIZE_MATCH (xShapeMaskReq); UpdateCurrentTime(); - rc = dixLookupWindow(&pWin, stuff->dest, client, DixWriteAccess); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); if (rc != Success) return rc; switch (stuff->destKind) { @@ -444,10 +444,10 @@ ProcShapeMask (client) if (stuff->src == None) srcRgn = 0; else { - pPixmap = (PixmapPtr) SecurityLookupIDByType(client, stuff->src, - RT_PIXMAP, DixReadAccess); - if (!pPixmap) - return BadPixmap; + rc = dixLookupResource((pointer *)&pPixmap, stuff->src, RT_PIXMAP, + client, DixReadAccess); + if (rc != Success) + return (rc == BadValue) ? BadPixmap : rc; if (pPixmap->drawable.pScreen != pScreen || pPixmap->drawable.depth != 1) return BadMatch; @@ -531,7 +531,7 @@ ProcShapeCombine (client) REQUEST_SIZE_MATCH (xShapeCombineReq); UpdateCurrentTime(); - rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixUnknownAccess); + rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess); if (rc != Success) return rc; if (!pDestWin->optional) @@ -552,7 +552,7 @@ ProcShapeCombine (client) } pScreen = pDestWin->drawable.pScreen; - rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixUnknownAccess); + rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixGetAttrAccess); if (rc != Success) return rc; switch (stuff->srcKind) { @@ -651,7 +651,7 @@ ProcShapeOffset (client) REQUEST_SIZE_MATCH (xShapeOffsetReq); UpdateCurrentTime(); - rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); if (rc != Success) return rc; switch (stuff->destKind) { @@ -716,7 +716,7 @@ ProcShapeQueryExtents (client) RegionPtr region; REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep.type = X_Reply; @@ -826,7 +826,7 @@ ProcShapeSelectInput (client) int rc; REQUEST_SIZE_MATCH (xShapeSelectInputReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); if (rc != Success) return rc; pHead = (ShapeEventPtr *)SecurityLookupIDByType(client, @@ -999,7 +999,7 @@ ProcShapeInputSelected (client) register int n; REQUEST_SIZE_MATCH (xShapeInputSelectedReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pHead = (ShapeEventPtr *) SecurityLookupIDByType(client, @@ -1041,7 +1041,7 @@ ProcShapeGetRectangles (client) register int n; REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; switch (stuff->kind) { From 1005b29cc6939851b40397cc9cd0de9476ad3046 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 30 Aug 2007 14:48:24 -0400 Subject: [PATCH 101/552] xace: Correct some access modes. --- dix/window.c | 2 +- xfixes/cursor.c | 2 +- xfixes/select.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dix/window.c b/dix/window.c index b6bbdd4cb..70ce2ad9e 100644 --- a/dix/window.c +++ b/dix/window.c @@ -1396,7 +1396,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) else { rc = dixLookupResource((pointer *)&pCursor, cursorID, - RT_CURSOR, client, DixReadAccess); + RT_CURSOR, client, DixUseAccess); if (rc != Success) { error = (rc == BadValue) ? BadCursor : rc; diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 91f149e1a..52f483e03 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -239,7 +239,7 @@ ProcXFixesSelectCursorInput (ClientPtr client) int rc; REQUEST_SIZE_MATCH (xXFixesSelectCursorInputReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if (stuff->eventMask & ~CursorAllEvents) diff --git a/xfixes/select.c b/xfixes/select.c index 9de152f29..2321212ce 100755 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -203,7 +203,7 @@ ProcXFixesSelectSelectionInput (ClientPtr client) int rc; REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if (stuff->eventMask & ~SelectionAllEvents) From fd04b983db6a70bf747abe02ca07c1fbbaae6343 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 31 Aug 2007 09:55:27 -0400 Subject: [PATCH 102/552] xace: add hooks + new access codes: Render extension --- render/animcur.c | 19 +++++++-- render/picture.c | 31 +++++++++------ render/picturestr.h | 2 +- render/render.c | 94 ++++++++++++++++++++++++++++----------------- 4 files changed, 94 insertions(+), 52 deletions(-) diff --git a/render/animcur.c b/render/animcur.c index 444d70645..da3d4a02d 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -44,6 +44,7 @@ #include "dixfontstr.h" #include "opaque.h" #include "picturestr.h" +#include "xace.h" typedef struct _AnimCurElt { CursorPtr pCursor; /* cursor to show */ @@ -346,10 +347,10 @@ AnimCurInit (ScreenPtr pScreen) } int -AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor) +AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid) { CursorPtr pCursor; - int i; + int rc, i; AnimCurPtr ac; for (i = 0; i < screenInfo.numScreens; i++) @@ -366,7 +367,6 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp if (!pCursor) return BadAlloc; pCursor->bits = &animCursorBits; - animCursorBits.refcnt++; pCursor->refcnt = 1; pCursor->foreRed = cursors[0]->foreRed; @@ -377,9 +377,22 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp pCursor->backGreen = cursors[0]->backGreen; pCursor->backBlue = cursors[0]->backBlue; + pCursor->devPrivates = NULL; + pCursor->id = cid; + + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, + DixCreateAccess, pCursor); + if (rc != Success) { + dixFreePrivates(pCursor->devPrivates); + xfree(pCursor); + return rc; + } + /* * Fill in the AnimCurRec */ + animCursorBits.refcnt++; ac = GetAnimCur (pCursor); ac->nelt = ncursor; ac->elts = (AnimCurElt *) (ac + 1); diff --git a/render/picture.c b/render/picture.c index bc2c3b526..7b200ee41 100644 --- a/render/picture.c +++ b/render/picture.c @@ -40,6 +40,7 @@ #include "gcstruct.h" #include "servermd.h" #include "picturestr.h" +#include "xace.h" _X_EXPORT DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKey; DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKey; @@ -724,6 +725,13 @@ CreatePicture (Picture pid, pPicture->pFormat = pFormat; pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24); pPicture->devPrivates = NULL; + + /* security creation/labeling check */ + *error = XaceHook(XACE_RESOURCE_ACCESS, client, pid, PictureType, + DixCreateAccess|DixSetAttrAccess, pPicture); + if (*error != Success) + goto out; + if (pDrawable->type == DRAWABLE_PIXMAP) { ++((PixmapPtr)pDrawable)->refcnt; @@ -743,6 +751,7 @@ CreatePicture (Picture pid, *error = Success; if (*error == Success) *error = (*ps->CreatePicture) (pPicture); +out: if (*error != Success) { FreePicture (pPicture, (XID) 0); @@ -1060,14 +1069,13 @@ ChangePicture (PicturePtr pPicture, pAlpha = 0; else { - pAlpha = (PicturePtr) SecurityLookupIDByType(client, - pid, - PictureType, - DixWriteAccess|DixReadAccess); - if (!pAlpha) + error = dixLookupResource((pointer *)&pAlpha, pid, + PictureType, client, + DixReadAccess); + if (error != Success) { client->errorValue = pid; - error = BadPixmap; + error = (error == BadValue) ? BadPixmap : error; break; } if (pAlpha->pDrawable == NULL || @@ -1122,14 +1130,13 @@ ChangePicture (PicturePtr pPicture, else { clipType = CT_PIXMAP; - pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - pid, - RT_PIXMAP, - DixReadAccess); - if (!pPixmap) + error = dixLookupResource((pointer *)&pPixmap, pid, + RT_PIXMAP, client, + DixReadAccess); + if (error != Success) { client->errorValue = pid; - error = BadPixmap; + error = (error == BadValue) ? BadPixmap : error; break; } } diff --git a/render/picturestr.h b/render/picturestr.h index aafe4e80a..fad974168 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -630,7 +630,7 @@ Bool AnimCurInit (ScreenPtr pScreen); int -AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor); +AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid); void AddTraps (PicturePtr pPicture, diff --git a/render/render.c b/render/render.c index 7b2745758..37d2d620e 100644 --- a/render/render.c +++ b/render/render.c @@ -46,6 +46,7 @@ #include "glyphstr.h" #include #include "cursorstr.h" +#include "xace.h" #if HAVE_STDINT_H #include @@ -623,7 +624,7 @@ ProcRenderCreatePicture (ClientPtr client) LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, - DixWriteAccess); + DixReadAccess|DixAddAccess); if (rc != Success) return rc; @@ -664,7 +665,7 @@ ProcRenderChangePicture (ClientPtr client) int len; REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess, + VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, RenderErrBase + BadPicture); len = client->req_len - (sizeof(xRenderChangePictureReq) >> 2); @@ -684,7 +685,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client) int result; REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess, + VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, RenderErrBase + BadPicture); if (!pPicture->pDrawable) return BadDrawable; @@ -983,7 +984,7 @@ ProcRenderCreateGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; PictFormatPtr format; - int f; + int rc, f; REQUEST(xRenderCreateGlyphSetReq); REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq); @@ -1022,6 +1023,11 @@ ProcRenderCreateGlyphSet (ClientPtr client) glyphSet = AllocateGlyphSet (f, format); if (!glyphSet) return BadAlloc; + /* security creation/labeling check */ + rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->gsid, GlyphSetType, + DixCreateAccess, glyphSet); + if (rc != Success) + return rc; if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet)) return BadAlloc; return Success; @@ -1031,20 +1037,19 @@ static int ProcRenderReferenceGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; + int rc; REQUEST(xRenderReferenceGlyphSetReq); REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq); LEGAL_NEW_RESOURCE(stuff->gsid, client); - glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, - stuff->existing, - GlyphSetType, - DixWriteAccess); - if (!glyphSet) + rc = dixLookupResource((pointer *)&glyphSet, stuff->existing, GlyphSetType, + client, DixGetAttrAccess); + if (rc != Success) { client->errorValue = stuff->existing; - return RenderErrBase + BadGlyphSet; + return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; } glyphSet->refcnt++; if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet)) @@ -1059,17 +1064,16 @@ static int ProcRenderFreeGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; + int rc; REQUEST(xRenderFreeGlyphSetReq); REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq); - glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, - stuff->glyphset, - GlyphSetType, - DixDestroyAccess); - if (!glyphSet) + rc = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType, + client, DixDestroyAccess); + if (rc != Success) { client->errorValue = stuff->glyphset; - return RenderErrBase + BadGlyphSet; + return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; } FreeResource (stuff->glyphset, RT_NONE); return client->noClientException; @@ -1093,19 +1097,18 @@ ProcRenderAddGlyphs (ClientPtr client) xGlyphInfo *gi; CARD8 *bits; int size; - int err = BadAlloc; + int err; REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq); - glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, - stuff->glyphset, - GlyphSetType, - DixWriteAccess); - if (!glyphSet) + err = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType, + client, DixAddAccess); + if (err != Success) { client->errorValue = stuff->glyphset; - return RenderErrBase + BadGlyphSet; + return (err == BadValue) ? RenderErrBase + BadGlyphSet : err; } + err = BadAlloc; nglyphs = stuff->nglyphs; if (nglyphs > UINT32_MAX / sizeof(GlyphNewRec)) return BadAlloc; @@ -1195,19 +1198,17 @@ ProcRenderFreeGlyphs (ClientPtr client) { REQUEST(xRenderFreeGlyphsReq); GlyphSetPtr glyphSet; - int nglyph; + int rc, nglyph; CARD32 *gids; CARD32 glyph; REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq); - glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, - stuff->glyphset, - GlyphSetType, - DixWriteAccess); - if (!glyphSet) + rc = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType, + client, DixRemoveAccess); + if (rc != Success) { client->errorValue = stuff->glyphset; - return RenderErrBase + BadGlyphSet; + return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; } nglyph = ((client->req_len << 2) - sizeof (xRenderFreeGlyphsReq)) >> 2; gids = (CARD32 *) (stuff + 1); @@ -1284,7 +1285,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, stuff->glyphset, GlyphSetType, - DixReadAccess); + DixUseAccess); if (!glyphSet) { client->errorValue = stuff->glyphset; @@ -1346,7 +1347,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) glyphSet = (GlyphSetPtr) SecurityLookupIDByType (client, gs, GlyphSetType, - DixReadAccess); + DixUseAccess); if (!glyphSet) { client->errorValue = gs; @@ -1679,7 +1680,7 @@ ProcRenderSetPictureTransform (ClientPtr client) int result; REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess, + VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, RenderErrBase + BadPicture); result = SetPictureTransform (pPicture, (PictTransform *) &stuff->transform); if (client->noClientException != Success) @@ -1704,7 +1705,7 @@ ProcRenderQueryFilters (ClientPtr client) REQUEST_SIZE_MATCH(xRenderQueryFiltersReq); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, - DixReadAccess); + DixGetAttrAccess); if (rc != Success) return rc; @@ -1809,7 +1810,7 @@ ProcRenderSetPictureFilter (ClientPtr client) char *name; REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess, + VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, RenderErrBase + BadPicture); name = (char *) (stuff + 1); params = (xFixed *) (name + ((stuff->nbytes + 3) & ~3)); @@ -1853,7 +1854,8 @@ ProcRenderCreateAnimCursor (ClientPtr client) deltas[i] = elt->delay; elt++; } - ret = AnimCursorCreate (cursors, deltas, ncursor, &pCursor); + ret = AnimCursorCreate (cursors, deltas, ncursor, &pCursor, client, + stuff->cid); xfree (cursors); if (ret != Success) return ret; @@ -1899,6 +1901,11 @@ static int ProcRenderCreateSolidFill(ClientPtr client) pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error); if (!pPicture) return error; + /* security creation/labeling check */ + error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, + DixCreateAccess, pPicture); + if (error != Success) + return error; if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) return BadAlloc; return Success; @@ -1928,6 +1935,11 @@ static int ProcRenderCreateLinearGradient (ClientPtr client) stuff->nStops, stops, colors, &error); if (!pPicture) return error; + /* security creation/labeling check */ + error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, + DixCreateAccess, pPicture); + if (error != Success) + return error; if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) return BadAlloc; return Success; @@ -1958,6 +1970,11 @@ static int ProcRenderCreateRadialGradient (ClientPtr client) stuff->nStops, stops, colors, &error); if (!pPicture) return error; + /* security creation/labeling check */ + error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, + DixCreateAccess, pPicture); + if (error != Success) + return error; if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) return BadAlloc; return Success; @@ -1987,6 +2004,11 @@ static int ProcRenderCreateConicalGradient (ClientPtr client) stuff->nStops, stops, colors, &error); if (!pPicture) return error; + /* security creation/labeling check */ + error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, + DixCreateAccess, pPicture); + if (error != Success) + return error; if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) return BadAlloc; return Success; From c9ceb4878063ca22487c708d9d1f86e367f2cec8 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 31 Aug 2007 11:03:54 -0400 Subject: [PATCH 103/552] xace: add hooks + new access codes: Composite extension --- composite/compext.c | 47 ++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/composite/compext.c b/composite/compext.c index 8d2a2d790..b32967960 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -45,6 +45,7 @@ #endif #include "compint.h" +#include "xace.h" #define SERVER_COMPOSITE_MAJOR 0 #define SERVER_COMPOSITE_MINOR 4 @@ -157,14 +158,16 @@ static int ProcCompositeRedirectWindow (ClientPtr client) { WindowPtr pWin; + int rc; REQUEST(xCompositeRedirectWindowReq); REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) + rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + DixSetAttrAccess|DixManageAccess|DixBlendAccess); + if (rc != Success) { client->errorValue = stuff->window; - return BadWindow; + return (rc == BadValue) ? BadWindow : rc; } return compRedirectWindow (client, pWin, stuff->update); } @@ -173,14 +176,16 @@ static int ProcCompositeRedirectSubwindows (ClientPtr client) { WindowPtr pWin; + int rc; REQUEST(xCompositeRedirectSubwindowsReq); REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) + rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + DixSetAttrAccess|DixManageAccess|DixBlendAccess); + if (rc != Success) { client->errorValue = stuff->window; - return BadWindow; + return (rc == BadValue) ? BadWindow : rc; } return compRedirectSubwindows (client, pWin, stuff->update); } @@ -223,14 +228,16 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client) WindowPtr pWin; CompWindowPtr cw; RegionPtr pBorderClip, pRegion; + int rc; REQUEST(xCompositeCreateRegionFromBorderClipReq); REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) + rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + DixGetAttrAccess); + if (rc != Success) { client->errorValue = stuff->window; - return BadWindow; + return (rc == BadValue) ? BadWindow : rc; } LEGAL_NEW_RESOURCE (stuff->region, client); @@ -257,14 +264,16 @@ ProcCompositeNameWindowPixmap (ClientPtr client) WindowPtr pWin; CompWindowPtr cw; PixmapPtr pPixmap; + int rc; REQUEST(xCompositeNameWindowPixmapReq); REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) + rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + DixGetAttrAccess); + if (rc != Success) { client->errorValue = stuff->window; - return BadWindow; + return (rc == BadValue) ? BadWindow : rc; } if (!pWin->viewable) @@ -429,13 +438,15 @@ ProcCompositeGetOverlayWindow (ClientPtr client) ScreenPtr pScreen; CompScreenPtr cs; CompOverlayClientPtr pOc; + int rc; REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); - pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); - if (!pWin) + rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + DixGetAttrAccess); + if (rc != Success) { client->errorValue = stuff->window; - return BadWindow; + return (rc == BadValue) ? BadWindow : rc; } pScreen = pWin->drawable.pScreen; @@ -446,6 +457,12 @@ ProcCompositeGetOverlayWindow (ClientPtr client) return BadAlloc; } } + + rc = XaceHook(XACE_RESOURCE_ACCESS, client, cs->pOverlayWin->drawable.id, + RT_WINDOW, DixGetAttrAccess, cs->pOverlayWin); + if (rc != Success) + return rc; + MapWindow(cs->pOverlayWin, serverClient); /* Record that client is using this overlay window */ From ce9e83d913511fe619da42f805d7bcd1a2a60d90 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 4 Sep 2007 14:01:55 -0400 Subject: [PATCH 104/552] xace: add hooks + new access codes: Damage extension --- damageext/damageext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/damageext/damageext.c b/damageext/damageext.c index 159746536..517c72dac 100755 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -185,7 +185,7 @@ ProcDamageCreate (ClientPtr client) REQUEST_SIZE_MATCH(xDamageCreateReq); LEGAL_NEW_RESOURCE(stuff->damage, client); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, - DixReadAccess); + DixGetAttrAccess|DixReadAccess); if (rc != Success) return rc; @@ -295,7 +295,7 @@ ProcDamageAdd (ClientPtr client) REQUEST_SIZE_MATCH(xDamageAddReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, - DixReadAccess); + DixWriteAccess); if (rc != Success) return rc; From 0003ccfcdfae1b473aa024342304b84256d378b9 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 5 Sep 2007 11:18:36 -0400 Subject: [PATCH 105/552] xace: add new fields to resource access hook to allow parent resource objects to be passed in at create time. Also added a missing devPrivates initializer. --- Xext/xace.c | 4 +++- Xext/xacestr.h | 4 +++- composite/compext.c | 2 +- dix/colormap.c | 2 +- dix/cursor.c | 7 ++++--- dix/dispatch.c | 2 +- dix/gc.c | 4 ++-- dix/resource.c | 2 +- dix/window.c | 10 +++++----- render/animcur.c | 6 +++--- render/picture.c | 4 ++-- render/render.c | 10 +++++----- xfixes/cursor.c | 4 ++-- 13 files changed, 33 insertions(+), 28 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index cc689864b..92f0e4048 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -72,8 +72,10 @@ int XaceHook(int hook, ...) va_arg(ap, ClientPtr), va_arg(ap, XID), va_arg(ap, RESTYPE), - va_arg(ap, Mask), va_arg(ap, pointer), + va_arg(ap, RESTYPE), + va_arg(ap, pointer), + va_arg(ap, Mask), Success /* default allow */ }; calldata = &rec; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 0957f0da1..e12a52c9a 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -41,8 +41,10 @@ typedef struct { ClientPtr client; XID id; RESTYPE rtype; - Mask access_mode; pointer res; + RESTYPE ptype; + pointer parent; + Mask access_mode; int status; } XaceResourceAccessRec; diff --git a/composite/compext.c b/composite/compext.c index b32967960..2d3bafadb 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -459,7 +459,7 @@ ProcCompositeGetOverlayWindow (ClientPtr client) } rc = XaceHook(XACE_RESOURCE_ACCESS, client, cs->pOverlayWin->drawable.id, - RT_WINDOW, DixGetAttrAccess, cs->pOverlayWin); + RT_WINDOW, cs->pOverlayWin, RT_NONE, NULL, DixGetAttrAccess); if (rc != Success) return rc; diff --git a/dix/colormap.c b/dix/colormap.c index 98f2f1b22..d07cff7db 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -397,7 +397,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, * Security creation/labeling check */ i = XaceHook(XACE_RESOURCE_ACCESS, clients[client], mid, RT_COLORMAP, - DixCreateAccess, pmap); + pmap, RT_NONE, NULL, DixCreateAccess); if (i != Success) { FreeResource(mid, RT_NONE); return i; diff --git a/dix/cursor.c b/dix/cursor.c index 324faa169..0ddf9d791 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -212,12 +212,12 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; - pCurs->devPrivates = NULL; pCurs->id = cid; + pCurs->devPrivates = NULL; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, - DixCreateAccess, pCurs); + pCurs, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { dixFreePrivates(pCurs->devPrivates); FreeCursorBits(bits); @@ -365,6 +365,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, bits->height = cm.height; bits->xhot = cm.xhot; bits->yhot = cm.yhot; + bits->devPrivates = NULL; if (sourcefont != maskfont) bits->refcnt = -1; else @@ -406,7 +407,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, - DixCreateAccess, pCurs); + pCurs, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { dixFreePrivates(pCurs->devPrivates); FreeCursorBits(bits); diff --git a/dix/dispatch.c b/dix/dispatch.c index 7adfe02be..507854ee6 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1558,7 +1558,7 @@ CreatePmap: pMap->drawable.id = stuff->pid; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP, - DixCreateAccess, pMap); + pMap, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { (*pDraw->pScreen->DestroyPixmap)(pMap); return rc; diff --git a/dix/gc.c b/dix/gc.c index d77932c9e..443f6c686 100644 --- a/dix/gc.c +++ b/dix/gc.c @@ -638,8 +638,8 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, pGC->stipple->refcnt++; /* security creation/labeling check */ - *pStatus = XaceHook(XACE_RESOURCE_ACCESS, client, gcid, RT_GC, - DixCreateAccess|DixSetAttrAccess, pGC); + *pStatus = XaceHook(XACE_RESOURCE_ACCESS, client, gcid, RT_GC, pGC, + RT_NONE, NULL, DixCreateAccess|DixSetAttrAccess); if (*pStatus != Success) goto out; diff --git a/dix/resource.c b/dix/resource.c index 844d12ec0..a557ba4c3 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -901,7 +901,7 @@ dixLookupResource(pointer *result, XID id, RESTYPE rtype, if (client) { client->errorValue = id; cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, - mode, res->value); + res->value, RT_NONE, NULL, mode); if (cid != Success) return cid; } diff --git a/dix/window.c b/dix/window.c index 70ce2ad9e..6c6531958 100644 --- a/dix/window.c +++ b/dix/window.c @@ -698,8 +698,8 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, /* security creation/labeling check */ - *error = XaceHook(XACE_RESOURCE_ACCESS, client, wid, RT_WINDOW, - DixCreateAccess|DixSetAttrAccess, pWin); + *error = XaceHook(XACE_RESOURCE_ACCESS, client, wid, RT_WINDOW, pWin, + RT_WINDOW, pWin->parent, DixCreateAccess|DixSetAttrAccess); if (*error != Success) { xfree(pWin); return NullWindow; @@ -955,7 +955,7 @@ DestroySubwindows(WindowPtr pWin, ClientPtr client) while (pWin->lastChild) { int rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->lastChild->drawable.id, RT_WINDOW, - DixDestroyAccess, pWin->lastChild); + pWin->lastChild, RT_NONE, NULL, DixDestroyAccess); if (rc != Success) return rc; FreeResource(pWin->lastChild->drawable.id, RT_NONE); @@ -1275,7 +1275,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) } if (val == xTrue) { rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, - RT_WINDOW, DixGrabAccess, pWin); + RT_WINDOW, pWin, RT_NONE, NULL, DixGrabAccess); if (rc != Success) { error = rc; client->errorValue = pWin->drawable.id; @@ -2745,7 +2745,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) /* general check for permission to map window */ if (XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW, - DixShowAccess, pWin) != Success) + pWin, RT_NONE, NULL, DixShowAccess) != Success) return Success; pScreen = pWin->drawable.pScreen; diff --git a/render/animcur.c b/render/animcur.c index da3d4a02d..125928931 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -377,12 +377,12 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp pCursor->backGreen = cursors[0]->backGreen; pCursor->backBlue = cursors[0]->backBlue; - pCursor->devPrivates = NULL; pCursor->id = cid; + pCursor->devPrivates = NULL; /* security creation/labeling check */ - rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, - DixCreateAccess, pCursor); + rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, pCursor, + RT_NONE, NULL, DixCreateAccess); if (rc != Success) { dixFreePrivates(pCursor->devPrivates); xfree(pCursor); diff --git a/render/picture.c b/render/picture.c index 7b200ee41..660ef12ad 100644 --- a/render/picture.c +++ b/render/picture.c @@ -727,8 +727,8 @@ CreatePicture (Picture pid, pPicture->devPrivates = NULL; /* security creation/labeling check */ - *error = XaceHook(XACE_RESOURCE_ACCESS, client, pid, PictureType, - DixCreateAccess|DixSetAttrAccess, pPicture); + *error = XaceHook(XACE_RESOURCE_ACCESS, client, pid, PictureType, pPicture, + RC_DRAWABLE, pDrawable, DixCreateAccess|DixSetAttrAccess); if (*error != Success) goto out; diff --git a/render/render.c b/render/render.c index 37d2d620e..40d5add05 100644 --- a/render/render.c +++ b/render/render.c @@ -1025,7 +1025,7 @@ ProcRenderCreateGlyphSet (ClientPtr client) return BadAlloc; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->gsid, GlyphSetType, - DixCreateAccess, glyphSet); + glyphSet, RT_NONE, NULL, DixCreateAccess); if (rc != Success) return rc; if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet)) @@ -1903,7 +1903,7 @@ static int ProcRenderCreateSolidFill(ClientPtr client) return error; /* security creation/labeling check */ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, - DixCreateAccess, pPicture); + pPicture, RT_NONE, NULL, DixCreateAccess); if (error != Success) return error; if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) @@ -1937,7 +1937,7 @@ static int ProcRenderCreateLinearGradient (ClientPtr client) return error; /* security creation/labeling check */ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, - DixCreateAccess, pPicture); + pPicture, RT_NONE, NULL, DixCreateAccess); if (error != Success) return error; if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) @@ -1972,7 +1972,7 @@ static int ProcRenderCreateRadialGradient (ClientPtr client) return error; /* security creation/labeling check */ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, - DixCreateAccess, pPicture); + pPicture, RT_NONE, NULL, DixCreateAccess); if (error != Success) return error; if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) @@ -2006,7 +2006,7 @@ static int ProcRenderCreateConicalGradient (ClientPtr client) return error; /* security creation/labeling check */ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, - DixCreateAccess, pPicture); + pPicture, RT_NONE, NULL, DixCreateAccess); if (error != Success) return error; if (!AddResource (stuff->pid, PictureType, (pointer)pPicture)) diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 52f483e03..1d122faea 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -351,7 +351,7 @@ ProcXFixesGetCursorImage (ClientPtr client) if (!pCursor) return BadCursor; rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, - DixReadAccess, pCursor); + pCursor, RT_NONE, NULL, DixReadAccess); if (rc != Success) return rc; GetSpritePosition (&x, &y); @@ -503,7 +503,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) if (!pCursor) return BadCursor; rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, - DixReadAccess|DixGetAttrAccess, pCursor); + pCursor, RT_NONE, NULL, DixReadAccess|DixGetAttrAccess); if (rc != Success) return rc; GetSpritePosition (&x, &y); From 57907e0943da0c3fd3bf6c128d210b544629ce72 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 6 Sep 2007 16:55:51 -0400 Subject: [PATCH 106/552] devPrivates rework: register an offset for every resource type, use signed values so -1 actually works correctly, and provide a macro for adding an offset to a pointer. --- dix/privates.c | 42 +++++++++++++++++++++++------------------- dix/resource.c | 2 ++ include/privates.h | 9 ++++++++- 3 files changed, 33 insertions(+), 20 deletions(-) diff --git a/dix/privates.c b/dix/privates.c index 38c552360..e04da41b1 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -35,6 +35,7 @@ from The Open Group. #include "resource.h" #include "privates.h" #include "gcstruct.h" +#include "cursorstr.h" #include "colormapst.h" #include "inputstr.h" @@ -174,21 +175,34 @@ dixRegisterPrivateDeleteFunc(const DevPrivateKey key, } /* Table of devPrivates offsets */ -static unsigned *offsets = NULL; -static unsigned offsetsSize = 0; +static const int offsetDefaults[] = { + -1, /* RT_NONE */ + offsetof(WindowRec, devPrivates), /* RT_WINDOW */ + offsetof(PixmapRec, devPrivates), /* RT_PIXMAP */ + offsetof(GC, devPrivates), /* RT_GC */ + -1, /* RT_FONT */ + offsetof(CursorRec, devPrivates), /* RT_CURSOR */ + offsetof(ColormapRec, devPrivates), /* RT_COLORMAP */ + -1, /* RT_CMAPENTRY */ + -1, /* RT_OTHERCLIENT */ + -1 /* RT_PASSIVEGRAB */ +}; + +static int *offsets = NULL; +static int offsetsSize = 0; /* * Specify where the devPrivates field is located in a structure type */ _X_EXPORT int -dixRegisterPrivateOffset(RESTYPE type, unsigned offset) +dixRegisterPrivateOffset(RESTYPE type, int offset) { type = type & TypeMask; /* resize offsets table if necessary */ while (type >= offsetsSize) { unsigned i = offsetsSize * 2 * sizeof(int); - offsets = (unsigned *)xrealloc(offsets, i); + offsets = (int *)xrealloc(offsets, i); if (!offsets) { offsetsSize = 0; return FALSE; @@ -214,7 +228,6 @@ int dixResetPrivates(void) { PrivateDescRec *next; - unsigned i; /* reset internal structures */ while (items) { @@ -224,20 +237,11 @@ dixResetPrivates(void) } if (offsets) xfree(offsets); - offsetsSize = 16; - offsets = (unsigned *)xalloc(offsetsSize * sizeof(unsigned)); + offsetsSize = sizeof(offsetDefaults); + offsets = (int *)xalloc(offsetsSize); + offsetsSize /= sizeof(int); if (!offsets) return FALSE; - for (i=0; i < offsetsSize; i++) - offsets[i] = -1; - - /* register basic resource offsets */ - return dixRegisterPrivateOffset(RT_WINDOW, - offsetof(WindowRec, devPrivates)) && - dixRegisterPrivateOffset(RT_PIXMAP, - offsetof(PixmapRec, devPrivates)) && - dixRegisterPrivateOffset(RT_GC, - offsetof(GC, devPrivates)) && - dixRegisterPrivateOffset(RT_COLORMAP, - offsetof(ColormapRec, devPrivates)); + memcpy(offsets, offsetDefaults, sizeof(offsetDefaults)); + return TRUE; } diff --git a/dix/resource.c b/dix/resource.c index a557ba4c3..c892cf96b 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -225,6 +225,8 @@ CreateNewResourceType(DeleteType deleteFunc) (next + 1) * sizeof(DeleteType)); if (!funcs) return 0; + if (!dixRegisterPrivateOffset(next, -1)) + return 0; #ifdef XResExtension { diff --git a/include/privates.h b/include/privates.h index 9539a2912..8d59b728f 100644 --- a/include/privates.h +++ b/include/privates.h @@ -143,8 +143,15 @@ dixLookupPrivateOffset(RESTYPE type); /* * Specifies the offset where the devPrivates field is located. + * A negative value indicates no devPrivates field is available. */ extern int -dixRegisterPrivateOffset(RESTYPE type, unsigned offset); +dixRegisterPrivateOffset(RESTYPE type, int offset); + +/* + * Convenience macro for adding an offset to an object pointer + * when making a call to one of the devPrivates functions + */ +#define DEVPRIV_AT(ptr, offset) ((PrivateRec **)((char *)ptr + offset)) #endif /* PRIVATES_H */ From 963e69b8efc39369915e7f0c6f370ac0d5d2b60f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 19 Sep 2007 11:11:41 -0400 Subject: [PATCH 107/552] xace: add special-case for just setting the event mask on a window, this should only check "receive" permission, not "setattr" permission. --- dix/dispatch.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 507854ee6..8c68e5567 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -570,11 +570,13 @@ ProcChangeWindowAttributes(ClientPtr client) { WindowPtr pWin; REQUEST(xChangeWindowAttributesReq); - int result; - int len, rc; + int result, len, rc; + Mask access_mode = DixSetAttrAccess; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); + if (stuff->valueMask == CWEventMask) + access_mode = DixReceiveAccess; + rc = dixLookupWindow(&pWin, stuff->window, client, access_mode); if (rc != Success) return rc; len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2); From 5b36b64192517e2470766ce7ff1d4dc04c936fad Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 19 Sep 2007 11:11:54 -0400 Subject: [PATCH 108/552] xace: add missing argument to hook call. --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 42c3ba195..0d82d19f3 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2892,7 +2892,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, if (!deliveries) { FixUpEventFromWindow(xE, grab->window, None, TRUE); - if (!XaceHook(XACE_SEND_ACCESS, thisDev, grab->window, xE, count) && + if (!XaceHook(XACE_SEND_ACCESS, 0, thisDev, grab->window, xE, count) && !XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), grab->window, xE, count)) deliveries = TryClientEvents(rClient(grab), xE, count, From 082c0f7fb34458ebb303cf875d1d75686eca25e6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 19 Sep 2007 13:59:35 -0400 Subject: [PATCH 109/552] devPrivates rework: move devPrivates field in drawable structure types to just below the DrawableRec. Wish there were a better way to do this but it has to be in the same place for all drawable types. --- include/pixmapstr.h | 2 +- include/windowstr.h | 2 +- render/picture.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pixmapstr.h b/include/pixmapstr.h index 4162c667e..5f0e0c508 100644 --- a/include/pixmapstr.h +++ b/include/pixmapstr.h @@ -72,10 +72,10 @@ typedef struct _Drawable { typedef struct _Pixmap { DrawableRec drawable; + PrivateRec *devPrivates; int refcnt; int devKind; DevUnion devPrivate; - PrivateRec *devPrivates; #ifdef COMPOSITE short screen_x; short screen_y; diff --git a/include/windowstr.h b/include/windowstr.h index ca212ad99..4359481cd 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -124,6 +124,7 @@ typedef struct _WindowOpt { typedef struct _Window { DrawableRec drawable; + PrivateRec *devPrivates; WindowPtr parent; /* ancestor chain */ WindowPtr nextSib; /* next lower sibling */ WindowPtr prevSib; /* next higher sibling */ @@ -160,7 +161,6 @@ typedef struct _Window { #ifdef COMPOSITE unsigned redirectDraw:2; /* rendering is redirected from here */ #endif - PrivateRec *devPrivates; } WindowRec; /* diff --git a/render/picture.c b/render/picture.c index 660ef12ad..184edb48b 100644 --- a/render/picture.c +++ b/render/picture.c @@ -728,7 +728,7 @@ CreatePicture (Picture pid, /* security creation/labeling check */ *error = XaceHook(XACE_RESOURCE_ACCESS, client, pid, PictureType, pPicture, - RC_DRAWABLE, pDrawable, DixCreateAccess|DixSetAttrAccess); + RT_PIXMAP, pDrawable, DixCreateAccess|DixSetAttrAccess); if (*error != Success) goto out; From e93cff52fed9074aa007c2e6ec6b578f69aef3cb Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 19 Sep 2007 14:48:20 -0400 Subject: [PATCH 110/552] xace: add hooks + new access codes: DOUBLE-BUFFER extension --- dbe/dbe.c | 16 +++++++++++----- dbe/midbe.c | 12 +++++++++--- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/dbe/dbe.c b/dbe/dbe.c index 223b0c983..8175a352f 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -54,6 +54,7 @@ #define NEED_DBE_PROTOCOL #include "dbestruct.h" #include "midbe.h" +#include "xace.h" /* GLOBALS */ @@ -233,7 +234,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); /* The window must be valid. */ - status = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + status = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (status != Success) return status; @@ -720,7 +721,7 @@ ProcDbeGetVisualInfo(ClientPtr client) for (i = 0; i < stuff->n; i++) { rc = dixLookupDrawable(pDrawables+i, drawables[i], client, 0, - DixReadAccess); + DixGetAttrAccess); if (rc != Success) { Xfree(pDrawables); return rc; @@ -748,7 +749,9 @@ ProcDbeGetVisualInfo(ClientPtr client) pDrawables[i]->pScreen; pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); - if (!(*pDbeScreenPriv->GetVisualInfo)(pScreen, &pScrVisInfo[i])) + rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess); + if ((rc != Success) || + !(*pDbeScreenPriv->GetVisualInfo)(pScreen, &pScrVisInfo[i])) { /* We failed to alloc pScrVisInfo[i].visinfo. */ @@ -764,7 +767,7 @@ ProcDbeGetVisualInfo(ClientPtr client) Xfree(pDrawables); } - return(BadAlloc); + return (rc == Success) ? BadAlloc : rc; } /* Account for n, number of xDbeVisInfo items in list. */ @@ -877,7 +880,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr client) REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, DixReadAccess))) + stuff->buffer, dbeWindowPrivResType, DixGetAttrAccess))) { rep.attributes = None; } @@ -1615,6 +1618,9 @@ DbeExtensionInit(void) CreateNewResourceType(DbeDrawableDelete) | RC_DRAWABLE; dbeWindowPrivResType = CreateNewResourceType(DbeWindowPrivDelete); + if (!dixRegisterPrivateOffset(dbeDrawableResType, + offsetof(PixmapRec, devPrivates))) + return; for (i = 0; i < screenInfo.numScreens; i++) { diff --git a/dbe/midbe.c b/dbe/midbe.c index f26a09c6d..e1c7f8d7d 100644 --- a/dbe/midbe.c +++ b/dbe/midbe.c @@ -56,6 +56,7 @@ #include "gcstruct.h" #include "inputstr.h" #include "midbe.h" +#include "xace.h" #include @@ -153,6 +154,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) DbeScreenPrivPtr pDbeScreenPriv; GCPtr pGC; xRectangle clearRect; + int rc; pScreen = pWin->drawable.pScreen; @@ -191,14 +193,18 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) return(BadAlloc); } + /* Security creation/labeling check. */ + rc = XaceHook(XACE_RESOURCE_ACCESS, serverClient, bufId, + dbeDrawableResType, pDbeWindowPrivPriv->pBackBuffer, + RT_WINDOW, pWin, DixCreateAccess); /* Make the back pixmap a DBE drawable resource. */ - if (!AddResource(bufId, dbeDrawableResType, - (pointer)pDbeWindowPrivPriv->pBackBuffer)) + if (rc != Success || !AddResource(bufId, dbeDrawableResType, + pDbeWindowPrivPriv->pBackBuffer)) { /* free the buffer and the drawable resource */ FreeResource(bufId, RT_NONE); - return(BadAlloc); + return (rc == Success) ? BadAlloc : rc; } From 90bacdef723e1e49c72775144916750758d3568c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 20 Sep 2007 06:53:51 -0400 Subject: [PATCH 111/552] xace: add hooks + new access codes: MIT-SHM extension --- Xext/shm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Xext/shm.c b/Xext/shm.c index 8fa584275..2afe055bc 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -58,6 +58,7 @@ in this Software without prior written authorization from The Open Group. #include "extnsionst.h" #include "servermd.h" #include "shmint.h" +#include "xace.h" #define _XSHM_SERVER_ #include #include @@ -907,7 +908,7 @@ ProcShmGetImage(client) return(BadValue); } rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, - DixUnknownAccess); + DixReadAccess); if (rc != Success) return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); @@ -1039,7 +1040,7 @@ ProcShmCreatePixmap(client) return BadImplementation; LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, - DixUnknownAccess); + DixGetAttrAccess); if (rc != Success) return rc; @@ -1068,6 +1069,12 @@ CreatePmap: shmdesc->addr + stuff->offset); if (pMap) { + rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP, + pMap, RT_NONE, NULL, DixCreateAccess); + if (rc != Success) { + pDraw->pScreen->DestroyPixmap(pMap); + return rc; + } dixSetPrivate(&pMap->devPrivates, shmPixmapPrivate, shmdesc); shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; @@ -1076,6 +1083,7 @@ CreatePmap: { return(client->noClientException); } + pDraw->pScreen->DestroyPixmap(pMap); } return (BadAlloc); } From 661b1328cf992d8855552677a94d60de1d8ce942 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 20 Sep 2007 08:41:26 -0400 Subject: [PATCH 112/552] xace: add hooks + new access codes: SYNC extension May need to revisit this extension in the future, depending on observed use. --- Xext/sync.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Xext/sync.c b/Xext/sync.c index d9b6a9f06..81b0cc4aa 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -433,18 +433,18 @@ SyncInitTrigger(client, pTrigger, counter, changes) Mask changes; { SyncCounter *pCounter = pTrigger->pCounter; - int status; + int rc; Bool newcounter = FALSE; if (changes & XSyncCACounter) { if (counter == None) pCounter = NULL; - else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType( - client, counter, RTCounter, DixReadAccess))) + else if (Success != (rc = dixLookupResource((pointer *)&pCounter, + counter, RTCounter, client, DixReadAccess))) { client->errorValue = counter; - return SyncErrorBase + XSyncBadCounter; + return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; } if (pCounter != pTrigger->pCounter) { /* new counter for trigger */ @@ -526,8 +526,8 @@ SyncInitTrigger(client, pTrigger, counter, changes) */ if (newcounter) { - if ((status = SyncAddTriggerToCounter(pTrigger)) != Success) - return status; + if ((rc = SyncAddTriggerToCounter(pTrigger)) != Success) + return rc; } else if (IsSystemCounter(pCounter)) { @@ -1465,7 +1465,7 @@ ProcSyncSetPriority(client) priorityclient = client; else { rc = dixLookupClient(&priorityclient, stuff->id, client, - DixUnknownAccess); + DixSetAttrAccess); if (rc != Success) return rc; } @@ -1502,7 +1502,7 @@ ProcSyncGetPriority(client) priorityclient = client; else { rc = dixLookupClient(&priorityclient, stuff->id, client, - DixUnknownAccess); + DixGetAttrAccess); if (rc != Success) return rc; } From 82f7195a628cc7ec94abc0cfe5bae2be8af443bc Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 20 Sep 2007 09:17:09 -0400 Subject: [PATCH 113/552] xace: modifications to ChangeWindowAttributes special case: separate Receive and SetAttr. Refer to 963e69b8efc39369915e7f0c6f370ac0d5d2b60f --- dix/dispatch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 8c68e5567..952ef6004 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -571,11 +571,11 @@ ProcChangeWindowAttributes(ClientPtr client) WindowPtr pWin; REQUEST(xChangeWindowAttributesReq); int result, len, rc; - Mask access_mode = DixSetAttrAccess; + Mask access_mode = 0; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); - if (stuff->valueMask == CWEventMask) - access_mode = DixReceiveAccess; + access_mode |= (stuff->valueMask & CWEventMask) ? DixReceiveAccess : 0; + access_mode |= (stuff->valueMask & ~CWEventMask) ? DixSetAttrAccess : 0; rc = dixLookupWindow(&pWin, stuff->window, client, access_mode); if (rc != Success) return rc; From f6532a81eec5f096e27285687964b77c17987f72 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 20 Sep 2007 12:17:17 -0400 Subject: [PATCH 114/552] xace: add hooks + new access codes: APPGROUP extension --- Xext/appgroup.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Xext/appgroup.c b/Xext/appgroup.c index 7bd205587..c40782df5 100644 --- a/Xext/appgroup.c +++ b/Xext/appgroup.c @@ -345,7 +345,7 @@ int AttrValidate( ColormapPtr pColormap; rc = dixLookupWindow(&pWin, pAppGrp->default_root, client, - DixUnknownAccess); + DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; @@ -367,8 +367,10 @@ int AttrValidate( } if (pAppGrp->default_colormap) { - pColormap = (ColormapPtr)LookupIDByType (pAppGrp->default_colormap, RT_COLORMAP); - /* XXX check that pColormap is not NULL */ + rc = dixLookupResource((pointer *)&pColormap, pAppGrp->default_colormap, + RT_COLORMAP, client, DixUseAccess); + if (rc != Success) + return rc; if (pColormap->pScreen != pScreen) return BadColor; if (pColormap->pVisual->vid != (pAppGrp->root_visual ? pAppGrp->root_visual : pScreen->rootVisual)) @@ -470,7 +472,7 @@ int ProcXagQuery( int n, rc; REQUEST_SIZE_MATCH (xXagQueryReq); - rc = dixLookupClient(&pClient, stuff->resource, client, DixUnknownAccess); + rc = dixLookupClient(&pClient, stuff->resource, client, DixGetAttrAccess); if (rc != Success) return rc; From a247886b082cea93fa8f8980616a9c388ba70111 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 20 Sep 2007 13:06:38 -0400 Subject: [PATCH 115/552] xace: add hooks + new access codes: XF86-Bigfont extension --- Xext/xf86bigfont.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index c2f891a7e..29f07a63e 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -445,10 +445,10 @@ ProcXF86BigfontQueryFont( #endif client->errorValue = stuff->id; /* EITHER font or gc */ pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - DixReadAccess); + DixGetAttrAccess); if (!pFont) { GC *pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, - DixReadAccess); + DixGetAttrAccess); if (!pGC) { client->errorValue = stuff->id; return BadFont; /* procotol spec says only error is BadFont */ From 9bd04055a2175ec16756d3bf73ae03b5e163a28a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 25 Sep 2007 09:33:51 -0400 Subject: [PATCH 116/552] xace: change prototype of VALIDATE_DRAWABLE_AND_GC macro to allow access mode to be passed to dixLookupDrawable. --- Xext/panoramiXprocs.c | 8 ++++---- Xext/shm.c | 2 +- Xext/xvdisp.c | 12 ++++++------ dix/dispatch.c | 28 ++++++++++++++-------------- include/dix.h | 6 ++---- 5 files changed, 27 insertions(+), 29 deletions(-) diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 1c53a1e1a..5933c02bc 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -1049,8 +1049,7 @@ int PanoramiXCopyArea(ClientPtr client) FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; - VALIDATE_DRAWABLE_AND_GC(dst->info[j].id, pDst, pGC, client); - + VALIDATE_DRAWABLE_AND_GC(dst->info[j].id, pDst, DixWriteAccess); if(drawables[0]->depth != pDst->depth) { client->errorValue = stuff->dstDrawable; xfree(data); @@ -1086,7 +1085,8 @@ int PanoramiXCopyArea(ClientPtr client) stuff->dstY = dsty - panoramiXdataPtr[j].y; } - VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess); + if (stuff->dstDrawable != stuff->srcDrawable) { rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0, DixReadAccess); @@ -1195,7 +1195,7 @@ int PanoramiXCopyPlane(ClientPtr client) stuff->dstY = dsty - panoramiXdataPtr[j].y; } - VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess); if (stuff->dstDrawable != stuff->srcDrawable) { rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0, DixReadAccess); diff --git a/Xext/shm.c b/Xext/shm.c index 2afe055bc..ee4c34035 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -795,7 +795,7 @@ ProcShmPutImage(client) REQUEST(xShmPutImageReq); REQUEST_SIZE_MATCH(xShmPutImageReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VERIFY_SHMPTR(stuff->shmseg, stuff->offset, FALSE, shmdesc, client); if ((stuff->sendEvent != xTrue) && (stuff->sendEvent != xFalse)) return BadValue; diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index af2e09b82..a2dac7584 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -535,7 +535,7 @@ ProcXvPutVideo(ClientPtr client) REQUEST(xvPutVideoReq); REQUEST_SIZE_MATCH(xvPutVideoReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); if(!(pPort = LOOKUP_PORT(stuff->port, client) )) { @@ -581,7 +581,7 @@ ProcXvPutStill(ClientPtr client) REQUEST(xvPutStillReq); REQUEST_SIZE_MATCH(xvPutStillReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); if(!(pPort = LOOKUP_PORT(stuff->port, client) )) { @@ -628,7 +628,7 @@ ProcXvGetVideo(ClientPtr client) REQUEST(xvGetVideoReq); REQUEST_SIZE_MATCH(xvGetVideoReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); if(!(pPort = LOOKUP_PORT(stuff->port, client) )) { @@ -675,7 +675,7 @@ ProcXvGetStill(ClientPtr client) REQUEST(xvGetStillReq); REQUEST_SIZE_MATCH(xvGetStillReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); if(!(pPort = LOOKUP_PORT(stuff->port, client) )) { @@ -1036,7 +1036,7 @@ ProcXvPutImage(ClientPtr client) REQUEST(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); if(!(pPort = LOOKUP_PORT(stuff->port, client) )) { @@ -1124,7 +1124,7 @@ ProcXvShmPutImage(ClientPtr client) REQUEST(xvShmPutImageReq); REQUEST_SIZE_MATCH(xvShmPutImageReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); if(!(pPort = LOOKUP_PORT(stuff->port, client) )) { diff --git a/dix/dispatch.c b/dix/dispatch.c index 952ef6004..65eb8cc41 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1791,7 +1791,7 @@ ProcCopyArea(ClientPtr client) REQUEST_SIZE_MATCH(xCopyAreaReq); - VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess); if (stuff->dstDrawable != stuff->srcDrawable) { rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0, @@ -1832,7 +1832,7 @@ ProcCopyPlane(ClientPtr client) REQUEST_SIZE_MATCH(xCopyPlaneReq); - VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess); if (stuff->dstDrawable != stuff->srcDrawable) { rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0, @@ -1885,7 +1885,7 @@ ProcPolyPoint(ClientPtr client) client->errorValue = stuff->coordMode; return BadValue; } - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); npoint = ((client->req_len << 2) - sizeof(xPolyPointReq)) >> 2; if (npoint) (*pGC->ops->PolyPoint)(pDraw, pGC, stuff->coordMode, npoint, @@ -1908,7 +1908,7 @@ ProcPolyLine(ClientPtr client) client->errorValue = stuff->coordMode; return BadValue; } - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); npoint = ((client->req_len << 2) - sizeof(xPolyLineReq)) >> 2; if (npoint > 1) (*pGC->ops->Polylines)(pDraw, pGC, stuff->coordMode, npoint, @@ -1925,7 +1925,7 @@ ProcPolySegment(ClientPtr client) REQUEST(xPolySegmentReq); REQUEST_AT_LEAST_SIZE(xPolySegmentReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq); if (nsegs & 4) return(BadLength); @@ -1944,7 +1944,7 @@ ProcPolyRectangle (ClientPtr client) REQUEST(xPolyRectangleReq); REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq); if (nrects & 4) return(BadLength); @@ -1964,7 +1964,7 @@ ProcPolyArc(ClientPtr client) REQUEST(xPolyArcReq); REQUEST_AT_LEAST_SIZE(xPolyArcReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); narcs = (client->req_len << 2) - sizeof(xPolyArcReq); if (narcs % sizeof(xArc)) return(BadLength); @@ -1996,7 +1996,7 @@ ProcFillPoly(ClientPtr client) return BadValue; } - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); things = ((client->req_len << 2) - sizeof(xFillPolyReq)) >> 2; if (things) (*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape, @@ -2014,7 +2014,7 @@ ProcPolyFillRectangle(ClientPtr client) REQUEST(xPolyFillRectangleReq); REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq); if (things & 4) return(BadLength); @@ -2035,7 +2035,7 @@ ProcPolyFillArc(ClientPtr client) REQUEST(xPolyFillArcReq); REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); if (narcs % sizeof(xArc)) return(BadLength); @@ -2110,7 +2110,7 @@ ProcPutImage(ClientPtr client) REQUEST(xPutImageReq); REQUEST_AT_LEAST_SIZE(xPutImageReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); if (stuff->format == XYBitmap) { if ((stuff->depth != 1) || @@ -2396,7 +2396,7 @@ ProcPolyText(ClientPtr client) GC *pGC; REQUEST_AT_LEAST_SIZE(xPolyTextReq); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); err = PolyText(client, pDraw, @@ -2426,7 +2426,7 @@ ProcImageText8(ClientPtr client) REQUEST(xImageTextReq); REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); err = ImageText(client, pDraw, @@ -2456,7 +2456,7 @@ ProcImageText16(ClientPtr client) REQUEST(xImageTextReq); REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1); - VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, pGC, client); + VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); err = ImageText(client, pDraw, diff --git a/include/dix.h b/include/dix.h index 54629cd14..59533bae7 100644 --- a/include/dix.h +++ b/include/dix.h @@ -81,11 +81,9 @@ SOFTWARE. return(BadIDChoice);\ } -#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, pGC, client)\ +#define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\ {\ - int rc;\ - rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY,\ - DixWriteAccess);\ + int rc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode);\ if (rc != Success)\ return rc;\ rc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess);\ From b61461425eb15fcff2a58330d74fe5a5a1f226fc Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 25 Sep 2007 09:56:00 -0400 Subject: [PATCH 117/552] xace: add hooks + new access codes: XV extension. May need to revisit this extension in the future, depending on observed use. --- Xext/xvdisp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index a2dac7584..f6130dfe1 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -383,7 +383,7 @@ ProcXvQueryAdaptors(ClientPtr client) REQUEST(xvQueryAdaptorsReq); REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; @@ -718,7 +718,7 @@ ProcXvSelectVideoNotify(ClientPtr client) REQUEST(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); - rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReceiveAccess); if (rc != Success) return rc; @@ -835,7 +835,7 @@ ProcXvStopVideo(ClientPtr client) return (status); } - rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess); if (rc != Success) return rc; From 5c03d131815cfe2f78792277ab8352e69e830196 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 28 Sep 2007 08:02:00 -0400 Subject: [PATCH 118/552] xace: add new hooks + access controls: XInput extension. Introduces new dix API to lookup a device, dixLookupDevice(), which replaces LookupDeviceIntRec and LookupDevice. --- Xext/xtest.c | 8 ++++---- Xi/allowev.c | 8 ++++---- Xi/chgdctl.c | 7 ++----- Xi/chgfctl.c | 8 ++++---- Xi/chgkmap.c | 7 +++---- Xi/chgprop.c | 3 +-- Xi/chgptr.c | 2 -- Xi/closedev.c | 9 ++++----- Xi/devbell.c | 9 ++++----- Xi/exevents.c | 37 +++++++++++++++++++++++++--------- Xi/extinit.c | 23 --------------------- Xi/getbmap.c | 8 ++++---- Xi/getdctl.c | 9 ++++----- Xi/getfctl.c | 9 ++++----- Xi/getfocus.c | 8 +++++--- Xi/getkmap.c | 8 ++++---- Xi/getmmap.c | 8 ++++---- Xi/getprop.c | 3 +-- Xi/getselev.c | 3 +-- Xi/getvers.c | 1 - Xi/grabdev.c | 15 +++++++------- Xi/grabdevb.c | 14 ++++++------- Xi/grabdevk.c | 14 ++++++------- Xi/gtmotion.c | 9 ++++----- Xi/listdev.c | 10 +++++++-- Xi/opendev.c | 7 ++++--- Xi/queryst.c | 9 ++++----- Xi/selectev.c | 3 +-- Xi/sendexev.c | 8 ++++---- Xi/setbmap.c | 7 +++---- Xi/setdval.c | 8 ++++---- Xi/setfocus.c | 7 ++++--- Xi/setmmap.c | 7 +++---- Xi/setmode.c | 8 ++++---- Xi/stubs.c | 2 ++ Xi/ungrdev.c | 8 ++++---- Xi/ungrdevb.c | 14 ++++++------- Xi/ungrdevk.c | 14 ++++++------- config/dbus.c | 2 +- dix/devices.c | 18 ++++++++++++----- hw/dmx/input/dmxeq.c | 4 ++-- hw/xfree86/common/xf86Xinput.c | 1 - include/extinit.h | 5 ----- include/input.h | 10 ++++----- xkb/xkbUtils.c | 2 +- 45 files changed, 187 insertions(+), 197 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 8d879c7df..42cf8178f 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -49,7 +49,6 @@ from The Open Group. #include #include #define EXTENSION_EVENT_BASE 64 -#include "extinit.h" /* LookupDeviceIntRec */ #endif /* XINPUT */ #include "modinit.h" @@ -286,11 +285,12 @@ ProcXTestFakeInput(client) #ifdef XINPUT if (extension) { - dev = LookupDeviceIntRec(stuff->deviceid & 0177); - if (!dev) + rc = dixLookupDevice(&dev, stuff->deviceid & 0177, client, + DixWriteAccess); + if (rc != Success) { client->errorValue = stuff->deviceid & 0177; - return BadValue; + return rc; } if (nev > 1) { diff --git a/Xi/allowev.c b/Xi/allowev.c index cf075e112..0043cb138 100644 --- a/Xi/allowev.c +++ b/Xi/allowev.c @@ -60,7 +60,6 @@ SOFTWARE. #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "allowev.h" @@ -95,13 +94,14 @@ ProcXAllowDeviceEvents(ClientPtr client) { TimeStamp time; DeviceIntPtr thisdev; + int rc; REQUEST(xAllowDeviceEventsReq); REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); - thisdev = LookupDeviceIntRec(stuff->deviceid); - if (thisdev == NULL) - return BadDevice; + rc = dixLookupDevice(&thisdev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; time = ClientTimeToServerTime(stuff->time); switch (stuff->mode) { diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index 055f459d0..e7d04a781 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -61,7 +61,6 @@ SOFTWARE. #include /* control constants */ #include "XIstubs.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "exevents.h" @@ -112,11 +111,9 @@ ProcXChangeDeviceControl(ClientPtr client) REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); len = stuff->length - (sizeof(xChangeDeviceControlReq) >> 2); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { - ret = BadDevice; + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (ret != Success) goto out; - } rep.repType = X_Reply; rep.RepType = X_ChangeDeviceControl; diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c index 46bb8e78f..8fc24d5ff 100644 --- a/Xi/chgfctl.c +++ b/Xi/chgfctl.c @@ -60,7 +60,6 @@ SOFTWARE. #include #include /* control constants */ -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "chgfctl.h" @@ -444,14 +443,15 @@ ProcXChangeFeedbackControl(ClientPtr client) StringFeedbackPtr s; BellFeedbackPtr b; LedFeedbackPtr l; + int rc; REQUEST(xChangeFeedbackControlReq); REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; switch (stuff->feedbackid) { case KbdFeedbackClass: diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c index bfdc1cedc..3361e9801 100644 --- a/Xi/chgkmap.c +++ b/Xi/chgkmap.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" @@ -107,9 +106,9 @@ ProcXChangeDeviceKeyMapping(ClientPtr client) REQUEST(xChangeDeviceKeyMappingReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (ret != Success) + return ret; len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2); ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify, diff --git a/Xi/chgprop.c b/Xi/chgprop.c index 13463dd1c..58db88620 100644 --- a/Xi/chgprop.c +++ b/Xi/chgprop.c @@ -60,7 +60,6 @@ SOFTWARE. #include "windowstr.h" #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" @@ -115,7 +114,7 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client) stuff->count) return BadLength; - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); if (rc != Success) return rc; diff --git a/Xi/chgptr.c b/Xi/chgptr.c index 2ce81d1d6..28950918f 100644 --- a/Xi/chgptr.c +++ b/Xi/chgptr.c @@ -63,8 +63,6 @@ SOFTWARE. #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ -#include "extinit.h" /* LookupDeviceIntRec */ - #include "dixevents.h" #include "exevents.h" #include "exglobals.h" diff --git a/Xi/closedev.c b/Xi/closedev.c index 1ec3fa163..b2b5f69a6 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -62,7 +62,6 @@ SOFTWARE. #include #include #include "XIstubs.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "closedev.h" @@ -140,16 +139,16 @@ DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client) int ProcXCloseDevice(ClientPtr client) { - int i; + int rc, i; WindowPtr pWin, p1; DeviceIntPtr d; REQUEST(xCloseDeviceReq); REQUEST_SIZE_MATCH(xCloseDeviceReq); - d = LookupDeviceIntRec(stuff->deviceid); - if (d == NULL) - return BadDevice; + rc = dixLookupDevice(&d, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; if (d->grab && SameClient(d->grab, client)) (*d->DeactivateGrab) (d); /* release active grab */ diff --git a/Xi/devbell.c b/Xi/devbell.c index 83e844d93..264f64800 100644 --- a/Xi/devbell.c +++ b/Xi/devbell.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "devbell.h" @@ -93,7 +92,7 @@ ProcXDeviceBell(ClientPtr client) DeviceIntPtr dev; KbdFeedbackPtr k; BellFeedbackPtr b; - int base; + int rc, base; int newpercent; CARD8 class; pointer ctrl; @@ -102,10 +101,10 @@ ProcXDeviceBell(ClientPtr client) REQUEST(xDeviceBellReq); REQUEST_SIZE_MATCH(xDeviceBellReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixBellAccess); + if (rc != Success) { client->errorValue = stuff->deviceid; - return BadDevice; + return rc; } if (stuff->percent < -100 || stuff->percent > 100) { diff --git a/Xi/exevents.c b/Xi/exevents.c index 377311ec9..9a179500b 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -67,11 +67,11 @@ SOFTWARE. #include "region.h" #include "exevents.h" #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "dixevents.h" /* DeliverFocusedEvent */ #include "dixgrabs.h" /* CreateGrab() */ #include "scrnintstr.h" +#include "xace.h" #ifdef XKB #include "xkbsrv.h" @@ -511,6 +511,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, WindowPtr pWin, confineTo; CursorPtr cursor; GrabPtr grab; + Mask access_mode = DixGrabAccess; int rc; if ((this_device_mode != GrabModeSync) && @@ -531,25 +532,33 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, client->errorValue = ownerEvents; return BadValue; } - rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (rconfineTo == None) confineTo = NullWindow; else { - rc = dixLookupWindow(&confineTo, rconfineTo, client, DixUnknownAccess); + rc = dixLookupWindow(&confineTo, rconfineTo, client, DixSetAttrAccess); if (rc != Success) return rc; } if (rcursor == None) cursor = NullCursor; else { - cursor = (CursorPtr) LookupIDByType(rcursor, RT_CURSOR); - if (!cursor) { + rc = dixLookupResource((pointer *)&cursor, rcursor, RT_CURSOR, + client, DixUseAccess); + if (rc != Success) + { client->errorValue = rcursor; - return BadCursor; + return (rc == BadValue) ? BadCursor : rc; } + access_mode |= DixForceAccess; } + if (this_device_mode == GrabModeSync || other_devices_mode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc != Success) + return rc; grab = CreateGrab(client->index, dev, pWin, eventMask, (Bool) ownerEvents, (Bool) this_device_mode, @@ -569,6 +578,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, WindowPtr pWin; GrabPtr grab; KeyClassPtr k = dev->key; + Mask access_mode = DixGrabAccess; int rc; if (k == NULL) @@ -596,7 +606,12 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, client->errorValue = ownerEvents; return BadValue; } - rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess); + if (rc != Success) + return rc; + if (this_device_mode == GrabModeSync || other_devices_mode == GrabModeSync) + access_mode |= DixFreezeAccess; + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); if (rc != Success) return rc; @@ -837,7 +852,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, if (!mask) break; } - } else + } else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, ev, count)) (void)(DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, d->id)); return Success; } @@ -1101,7 +1116,8 @@ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask) { DeviceIntPtr dev; - dev = LookupDeviceIntRec(pEvents->deviceid & DEVICE_BITS); + dixLookupDevice(&dev, pEvents->deviceid & DEVICE_BITS, serverClient, + DixReadAccess); if (!dev) return 0; @@ -1125,7 +1141,8 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, { DeviceIntPtr dev; - dev = LookupDeviceIntRec(xE->deviceid & DEVICE_BITS); + dixLookupDevice(&dev, xE->deviceid & DEVICE_BITS, serverClient, + DixReadAccess); if (!dev) return; diff --git a/Xi/extinit.c b/Xi/extinit.c index 73bae5e85..1a435edad 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -856,29 +856,6 @@ MakeDeviceTypeAtoms(void) MakeAtom(dev_type[i].name, strlen(dev_type[i].name), 1); } -/************************************************************************** - * Return a DeviceIntPtr corresponding to a specified device id. - * - */ - -DeviceIntPtr -LookupDeviceIntRec(CARD8 id) -{ - DeviceIntPtr dev; - - for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->id == id) - return dev; - } - - for (dev = inputInfo.off_devices; dev; dev = dev->next) { - if (dev->id == id) - return dev; - } - - return NULL; -} - /***************************************************************************** * * SEventIDispatch diff --git a/Xi/getbmap.c b/Xi/getbmap.c index ebb0613af..9f93b06ef 100644 --- a/Xi/getbmap.c +++ b/Xi/getbmap.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "getbmap.h" @@ -92,6 +91,7 @@ ProcXGetDeviceButtonMapping(ClientPtr client) DeviceIntPtr dev; xGetDeviceButtonMappingReply rep; ButtonClassPtr b; + int rc; REQUEST(xGetDeviceButtonMappingReq); REQUEST_SIZE_MATCH(xGetDeviceButtonMappingReq); @@ -102,9 +102,9 @@ ProcXGetDeviceButtonMapping(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; b = dev->button; if (b == NULL) diff --git a/Xi/getdctl.c b/Xi/getdctl.c index 8a84e91bc..3f2bb29ae 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "getdctl.h" @@ -238,7 +237,7 @@ SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep) int ProcXGetDeviceControl(ClientPtr client) { - int total_length = 0; + int rc, total_length = 0; char *buf, *savbuf; DeviceIntPtr dev; xGetDeviceControlReply rep; @@ -246,9 +245,9 @@ ProcXGetDeviceControl(ClientPtr client) REQUEST(xGetDeviceControlReq); REQUEST_SIZE_MATCH(xGetDeviceControlReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; rep.repType = X_Reply; rep.RepType = X_GetDeviceControl; diff --git a/Xi/getfctl.c b/Xi/getfctl.c index 7dff32f4f..1b1e594a2 100644 --- a/Xi/getfctl.c +++ b/Xi/getfctl.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "getfctl.h" @@ -290,7 +289,7 @@ SRepXGetFeedbackControl(ClientPtr client, int size, int ProcXGetFeedbackControl(ClientPtr client) { - int total_length = 0; + int rc, total_length = 0; char *buf, *savbuf; DeviceIntPtr dev; KbdFeedbackPtr k; @@ -304,9 +303,9 @@ ProcXGetFeedbackControl(ClientPtr client) REQUEST(xGetFeedbackControlReq); REQUEST_SIZE_MATCH(xGetFeedbackControlReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; rep.repType = X_Reply; rep.RepType = X_GetFeedbackControl; diff --git a/Xi/getfocus.c b/Xi/getfocus.c index 073913bf2..dfef22fb7 100644 --- a/Xi/getfocus.c +++ b/Xi/getfocus.c @@ -60,7 +60,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "getfocus.h" @@ -93,12 +92,15 @@ ProcXGetDeviceFocus(ClientPtr client) DeviceIntPtr dev; FocusClassPtr focus; xGetDeviceFocusReply rep; + int rc; REQUEST(xGetDeviceFocusReq); REQUEST_SIZE_MATCH(xGetDeviceFocusReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL || !dev->focus) + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess); + if (rc != Success) + return rc; + if (!dev->focus) return BadDevice; rep.repType = X_Reply; diff --git a/Xi/getkmap.c b/Xi/getkmap.c index eaa0cffcc..0eec1d8df 100644 --- a/Xi/getkmap.c +++ b/Xi/getkmap.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "swaprep.h" @@ -94,13 +93,14 @@ ProcXGetDeviceKeyMapping(ClientPtr client) xGetDeviceKeyMappingReply rep; DeviceIntPtr dev; KeySymsPtr k; + int rc; REQUEST(xGetDeviceKeyMappingReq); REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; if (dev->key == NULL) return BadMatch; k = &dev->key->curKeySyms; diff --git a/Xi/getmmap.c b/Xi/getmmap.c index 8a99d63ed..c6c9c3362 100644 --- a/Xi/getmmap.c +++ b/Xi/getmmap.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include /* Request macro */ -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "getmmap.h" @@ -94,13 +93,14 @@ ProcXGetDeviceModifierMapping(ClientPtr client) DeviceIntPtr dev; xGetDeviceModifierMappingReply rep; KeyClassPtr kp; + int rc; REQUEST(xGetDeviceModifierMappingReq); REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; kp = dev->key; if (kp == NULL) diff --git a/Xi/getprop.c b/Xi/getprop.c index 531e65f27..188f549e5 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -60,7 +60,6 @@ SOFTWARE. #include "windowstr.h" /* window structs */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "swaprep.h" @@ -112,7 +111,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) rep.length = 0; rep.count = 0; - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; diff --git a/Xi/getselev.c b/Xi/getselev.c index 819b2dbd0..caa376fcb 100644 --- a/Xi/getselev.c +++ b/Xi/getselev.c @@ -60,7 +60,6 @@ SOFTWARE. #include #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window struct */ -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "swaprep.h" @@ -114,7 +113,7 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) rep.this_client_count = 0; rep.all_clients_count = 0; - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; diff --git a/Xi/getvers.c b/Xi/getvers.c index a223a5d1e..a4afe808f 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "getvers.h" diff --git a/Xi/grabdev.c b/Xi/grabdev.c index b303695fd..110fc6b5f 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -60,7 +60,6 @@ SOFTWARE. #include "windowstr.h" /* window structure */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "dixevents.h" /* GrabDevice */ @@ -122,9 +121,9 @@ ProcXGrabDevice(ClientPtr client) rep.sequenceNumber = client->sequence; rep.length = 0; - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (rc != Success) + return rc; if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1], stuff->event_count, tmp, dev, @@ -153,7 +152,7 @@ int CreateMaskFromList(ClientPtr client, XEventClass * list, int count, struct tmask *mask, DeviceIntPtr dev, int req) { - int i, j; + int rc, i, j; int device; DeviceIntPtr tdev; @@ -167,8 +166,10 @@ CreateMaskFromList(ClientPtr client, XEventClass * list, int count, if (device > 255) return BadClass; - tdev = LookupDeviceIntRec(device); - if (tdev == NULL || (dev != NULL && tdev != dev)) + rc = dixLookupDevice(&tdev, device, client, DixReadAccess); + if (rc != BadDevice && rc != Success) + return rc; + if (rc == BadDevice || (dev != NULL && tdev != dev)) return BadClass; for (j = 0; j < ExtEventIndex; j++) diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c index 21e46fceb..7eb542232 100644 --- a/Xi/grabdevb.c +++ b/Xi/grabdevb.c @@ -61,7 +61,6 @@ SOFTWARE. #include #include #include "exevents.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "grabdev.h" @@ -117,14 +116,15 @@ ProcXGrabDeviceButton(ClientPtr client) (sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count) return BadLength; - dev = LookupDeviceIntRec(stuff->grabbed_device); - if (dev == NULL) - return BadDevice; + ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); + if (ret != Success) + return ret; if (stuff->modifier_device != UseXKeyboard) { - mdev = LookupDeviceIntRec(stuff->modifier_device); - if (mdev == NULL) - return BadDevice; + ret = dixLookupDevice(&mdev, stuff->modifier_device, client, + DixReadAccess); + if (ret != Success) + return ret; if (mdev->key == NULL) return BadMatch; } else diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c index 8da36ba8f..e187a4f7b 100644 --- a/Xi/grabdevk.c +++ b/Xi/grabdevk.c @@ -61,7 +61,6 @@ SOFTWARE. #include #include #include "exevents.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "grabdev.h" @@ -115,14 +114,15 @@ ProcXGrabDeviceKey(ClientPtr client) if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count) return BadLength; - dev = LookupDeviceIntRec(stuff->grabbed_device); - if (dev == NULL) - return BadDevice; + ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); + if (ret != Success) + return ret; if (stuff->modifier_device != UseXKeyboard) { - mdev = LookupDeviceIntRec(stuff->modifier_device); - if (mdev == NULL) - return BadDevice; + ret = dixLookupDevice(&mdev, stuff->modifier_device, client, + DixReadAccess); + if (ret != Success) + return ret; if (mdev->key == NULL) return BadMatch; } else diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index 51d4248cd..de22d0484 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" @@ -96,7 +95,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) INT32 *coords = NULL, *bufptr; xGetDeviceMotionEventsReply rep; unsigned long i; - int num_events, axes, size = 0, tsize; + int rc, num_events, axes, size = 0, tsize; unsigned long nEvents; DeviceIntPtr dev; TimeStamp start, stop; @@ -106,9 +105,9 @@ ProcXGetDeviceMotionEvents(ClientPtr client) REQUEST(xGetDeviceMotionEventsReq); REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); + if (rc != Success) + return rc; v = dev->valuator; if (v == NULL || v->numAxes == 0) return BadMatch; diff --git a/Xi/listdev.c b/Xi/listdev.c index 160ad02fb..041de7635 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -63,8 +63,8 @@ SOFTWARE. #include #include "XIstubs.h" #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" /* FIXME */ +#include "xace.h" #include "listdev.h" @@ -310,7 +310,7 @@ ProcXListInputDevices(ClientPtr client) xListInputDevicesReply rep; int numdevs = 0; int namesize = 1; /* need 1 extra byte for strcpy */ - int size = 0; + int rc, size = 0; int total_length; char *devbuf; char *classbuf; @@ -329,10 +329,16 @@ ProcXListInputDevices(ClientPtr client) AddOtherInputDevices(); for (d = inputInfo.devices; d; d = d->next) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc != Success) + return rc; SizeDeviceInfo(d, &namesize, &size); numdevs++; } for (d = inputInfo.off_devices; d; d = d->next) { + rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); + if (rc != Success) + return rc; SizeDeviceInfo(d, &namesize, &size); numdevs++; } diff --git a/Xi/opendev.c b/Xi/opendev.c index dfefe055c..128b1bd9c 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -61,7 +61,6 @@ SOFTWARE. #include #include "XIstubs.h" #include "windowstr.h" /* window structure */ -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "opendev.h" @@ -107,13 +106,15 @@ ProcXOpenDevice(ClientPtr client) stuff->deviceid == inputInfo.keyboard->id) return BadDevice; - if ((dev = LookupDeviceIntRec(stuff->deviceid)) == NULL) { /* not open */ + status = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); + if (status == BadDevice) { /* not open */ for (dev = inputInfo.off_devices; dev; dev = dev->next) if (dev->id == stuff->deviceid) break; if (dev == NULL) return BadDevice; - } + } else if (status != Success) + return status; OpenInputDevice(dev, client, &status); if (status != Success) diff --git a/Xi/queryst.c b/Xi/queryst.c index 2b66b7eb2..71ab79be8 100644 --- a/Xi/queryst.c +++ b/Xi/queryst.c @@ -42,7 +42,6 @@ from The Open Group. #include "windowstr.h" /* window structure */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" @@ -74,7 +73,7 @@ int ProcXQueryDeviceState(ClientPtr client) { char n; - int i; + int rc, i; int num_classes = 0; int total_length = 0; char *buf, *savbuf; @@ -96,9 +95,9 @@ ProcXQueryDeviceState(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); + if (rc != Success) + return rc; v = dev->valuator; if (v != NULL && v->motionHintWindow != NULL) diff --git a/Xi/selectev.c b/Xi/selectev.c index a5cf56754..b93618ace 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -61,7 +61,6 @@ SOFTWARE. #include "windowstr.h" /* window structure */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" @@ -164,7 +163,7 @@ ProcXSelectExtensionEvent(ClientPtr client) if (stuff->length != (sizeof(xSelectExtensionEventReq) >> 2) + stuff->count) return BadLength; - ret = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + ret = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); if (ret != Success) return ret; diff --git a/Xi/sendexev.c b/Xi/sendexev.c index 20b415a1f..e4e38d790 100644 --- a/Xi/sendexev.c +++ b/Xi/sendexev.c @@ -59,9 +59,9 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* Window */ +#include "extnsionst.h" /* EventSwapPtr */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" @@ -131,9 +131,9 @@ ProcXSendExtensionEvent(ClientPtr client) (stuff->num_events * (sizeof(xEvent) >> 2))) return BadLength; - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixWriteAccess); + if (ret != Success) + return ret; /* The client's event type must be one defined by an extension. */ diff --git a/Xi/setbmap.c b/Xi/setbmap.c index 40f0f9a99..3035c649e 100644 --- a/Xi/setbmap.c +++ b/Xi/setbmap.c @@ -63,7 +63,6 @@ SOFTWARE. #include #include #include "exevents.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "setbmap.h" @@ -110,9 +109,9 @@ ProcXSetDeviceButtonMapping(ClientPtr client) rep.sequenceNumber = client->sequence; rep.status = MappingSuccess; - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (ret != Success) + return ret; ret = SetButtonMapping(client, dev, stuff->map_length, (BYTE *) & stuff[1]); diff --git a/Xi/setdval.c b/Xi/setdval.c index cb35b9157..b1e22fc21 100644 --- a/Xi/setdval.c +++ b/Xi/setdval.c @@ -60,7 +60,6 @@ SOFTWARE. #include #include #include "XIstubs.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "setdval.h" @@ -92,6 +91,7 @@ ProcXSetDeviceValuators(ClientPtr client) { DeviceIntPtr dev; xSetDeviceValuatorsReply rep; + int rc; REQUEST(xSetDeviceValuatorsReq); REQUEST_AT_LEAST_SIZE(xSetDeviceValuatorsReq); @@ -106,9 +106,9 @@ ProcXSetDeviceValuators(ClientPtr client) stuff->num_valuators) return BadLength; - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; if (dev->valuator == NULL) return BadMatch; diff --git a/Xi/setfocus.c b/Xi/setfocus.c index 74de17e97..c6edbc2e5 100644 --- a/Xi/setfocus.c +++ b/Xi/setfocus.c @@ -63,7 +63,6 @@ SOFTWARE. #include "dixevents.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "setfocus.h" @@ -102,8 +101,10 @@ ProcXSetDeviceFocus(ClientPtr client) REQUEST(xSetDeviceFocusReq); REQUEST_SIZE_MATCH(xSetDeviceFocusReq); - dev = LookupDeviceIntRec(stuff->device); - if (dev == NULL || !dev->focus) + ret = dixLookupDevice(&dev, stuff->device, client, DixSetFocusAccess); + if (ret != Success) + return ret; + if (!dev->focus) return BadDevice; ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo, diff --git a/Xi/setmmap.c b/Xi/setmmap.c index 19ec71bbe..be3d3cb6c 100644 --- a/Xi/setmmap.c +++ b/Xi/setmmap.c @@ -60,7 +60,6 @@ SOFTWARE. #include #include #include "exevents.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "setmmap.h" @@ -99,9 +98,9 @@ ProcXSetDeviceModifierMapping(ClientPtr client) REQUEST(xSetDeviceModifierMappingReq); REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (ret != Success) + return ret; rep.repType = X_Reply; rep.RepType = X_SetDeviceModifierMapping; diff --git a/Xi/setmode.c b/Xi/setmode.c index 957721c66..8b6003ad0 100644 --- a/Xi/setmode.c +++ b/Xi/setmode.c @@ -60,7 +60,6 @@ SOFTWARE. #include #include #include "XIstubs.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "setmode.h" @@ -92,6 +91,7 @@ ProcXSetDeviceMode(ClientPtr client) { DeviceIntPtr dev; xSetDeviceModeReply rep; + int rc; REQUEST(xSetDeviceModeReq); REQUEST_SIZE_MATCH(xSetDeviceModeReq); @@ -101,9 +101,9 @@ ProcXSetDeviceMode(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + if (rc != Success) + return rc; if (dev->valuator == NULL) return BadMatch; if ((dev->grab) && !SameClient(dev->grab, client)) diff --git a/Xi/stubs.c b/Xi/stubs.c index 40cd02fe1..80ddd73c0 100644 --- a/Xi/stubs.c +++ b/Xi/stubs.c @@ -65,6 +65,7 @@ SOFTWARE. #include #include #include "XIstubs.h" +#include "xace.h" /*********************************************************************** * @@ -153,6 +154,7 @@ AddOtherInputDevices(void) void OpenInputDevice(DeviceIntPtr dev, ClientPtr client, int *status) { + *status = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess); } /**************************************************************************** diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c index 505d6690f..7abb1d061 100644 --- a/Xi/ungrdev.c +++ b/Xi/ungrdev.c @@ -59,7 +59,6 @@ SOFTWARE. #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "ungrdev.h" @@ -94,13 +93,14 @@ ProcXUngrabDevice(ClientPtr client) DeviceIntPtr dev; GrabPtr grab; TimeStamp time; + int rc; REQUEST(xUngrabDeviceReq); REQUEST_SIZE_MATCH(xUngrabDeviceReq); - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); + if (rc != Success) + return rc; grab = dev->grab; time = ClientTimeToServerTime(stuff->time); diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c index 0dfe805b7..85ca5c6ce 100644 --- a/Xi/ungrdevb.c +++ b/Xi/ungrdevb.c @@ -60,7 +60,6 @@ SOFTWARE. #include "windowstr.h" /* window structure */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "dixgrabs.h" @@ -107,22 +106,23 @@ ProcXUngrabDeviceButton(ClientPtr client) REQUEST(xUngrabDeviceButtonReq); REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); - dev = LookupDeviceIntRec(stuff->grabbed_device); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); + if (rc != Success) + return rc; if (dev->button == NULL) return BadMatch; if (stuff->modifier_device != UseXKeyboard) { - mdev = LookupDeviceIntRec(stuff->modifier_device); - if (mdev == NULL) + rc = dixLookupDevice(&mdev, stuff->modifier_device, client, + DixReadAccess); + if (rc != Success) return BadDevice; if (mdev->key == NULL) return BadMatch; } else mdev = (DeviceIntPtr) LookupKeyboardDevice(); - rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c index e6307af01..ac4003569 100644 --- a/Xi/ungrdevk.c +++ b/Xi/ungrdevk.c @@ -60,7 +60,6 @@ SOFTWARE. #include "windowstr.h" /* window structure */ #include #include -#include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" #include "dixgrabs.h" @@ -107,22 +106,23 @@ ProcXUngrabDeviceKey(ClientPtr client) REQUEST(xUngrabDeviceKeyReq); REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); - dev = LookupDeviceIntRec(stuff->grabbed_device); - if (dev == NULL) - return BadDevice; + rc = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); + if (rc != Success) + return rc; if (dev->key == NULL) return BadMatch; if (stuff->modifier_device != UseXKeyboard) { - mdev = LookupDeviceIntRec(stuff->modifier_device); - if (mdev == NULL) + rc = dixLookupDevice(&mdev, stuff->modifier_device, client, + DixReadAccess); + if (rc != Success) return BadDevice; if (mdev->key == NULL) return BadMatch; } else mdev = (DeviceIntPtr) LookupKeyboardDevice(); - rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; diff --git a/config/dbus.c b/config/dbus.c index c8675120f..e564c90fc 100644 --- a/config/dbus.c +++ b/config/dbus.c @@ -213,7 +213,7 @@ remove_device(DBusMessage *message, DBusMessage *reply, DBusError *error) MALFORMED_MESSAGE_ERROR(); } - dev = LookupDeviceIntRec(deviceid); + dixLookupDevice(&dev, deviceid, serverClient, DixUnknownAccess); if (!dev) { DebugF("[config/dbus] bogus device id %d given\n", deviceid); ret = BadMatch; diff --git a/dix/devices.c b/dix/devices.c index 3f4a33d6e..bd1bef722 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -717,20 +717,28 @@ LookupPointerDevice(void) return inputInfo.pointer ? &inputInfo.pointer->public : NULL; } -DevicePtr -LookupDevice(int id) +int +dixLookupDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode) { DeviceIntPtr dev; + int rc; + *pDev = NULL; for (dev=inputInfo.devices; dev; dev=dev->next) { if (dev->id == (CARD8)id) - return (DevicePtr)dev; + goto found; } for (dev=inputInfo.off_devices; dev; dev=dev->next) { if (dev->id == (CARD8)id) - return (DevicePtr)dev; + goto found; } - return NULL; + return BadDevice; + +found: + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); + if (rc == Success) + *pDev = dev; + return rc; } void diff --git a/hw/dmx/input/dmxeq.c b/hw/dmx/input/dmxeq.c index 3e98fb799..dff0b4423 100644 --- a/hw/dmx/input/dmxeq.c +++ b/hw/dmx/input/dmxeq.c @@ -82,7 +82,6 @@ #ifdef XINPUT #include #define EXTENSION_PROC_ARGS void * -#include "extinit.h" /* For LookupDeviceIntRec */ #endif #if DMX_EQ_DEBUG @@ -217,8 +216,9 @@ static void dmxeqProcessXInputEvent(xEvent *xe, EventRec *e) { deviceKeyButtonPointer *ev = (deviceKeyButtonPointer *)xe; int id = ev->deviceid & DEVICE_BITS; - DeviceIntPtr pDevice = LookupDeviceIntRec(id); + DeviceIntPtr pDevice; + dixLookupDevice(&pDevice, id, serverClient, DixUnknownAccess); if (!pDevice) { dmxLog(dmxError, "dmxeqProcessInputEvents: id %d not found\n", id); return; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index e45d44c02..b694b7303 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -77,7 +77,6 @@ #define EXTENSION_PROC_ARGS void * #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "windowstr.h" /* screenIsSaved */ diff --git a/include/extinit.h b/include/extinit.h index e616b6d93..df9773caf 100644 --- a/include/extinit.h +++ b/include/extinit.h @@ -44,9 +44,4 @@ AssignTypeAndName ( char * /* name */ ); -DeviceIntPtr -LookupDeviceIntRec ( - CARD8 /* id */ - ); - #endif /* EXTINIT_H */ diff --git a/include/input.h b/include/input.h index 4f9164a19..d8a9fe852 100644 --- a/include/input.h +++ b/include/input.h @@ -201,8 +201,11 @@ extern DevicePtr LookupKeyboardDevice(void); extern DevicePtr LookupPointerDevice(void); -extern DevicePtr LookupDevice( - int /* id */); +extern int dixLookupDevice( + DeviceIntPtr * /* dev */, + int /* id */, + ClientPtr /* client */, + Mask /* access_mode */); extern void QueryMinMaxKeyCodes( KeyCode* /*minCode*/, @@ -436,9 +439,6 @@ extern int GetMotionHistory( extern void SwitchCoreKeyboard(DeviceIntPtr pDev); extern void SwitchCorePointer(DeviceIntPtr pDev); -extern DeviceIntPtr LookupDeviceIntRec( - CARD8 deviceid); - /* Implemented by the DDX. */ extern int NewInputDeviceRequest( InputOption *options, diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index c7f9a2681..877d4d242 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -65,7 +65,7 @@ DeviceIntPtr dev = NULL; if (id&(~0xff)) dev = NULL; - dev= (DeviceIntPtr)LookupDevice(id); + dixLookupDevice(&dev, id, serverClient, DixUnknownAccess); if (dev!=NULL) return dev; if ((!dev)&&(why_rtrn)) From 8b548657204000e18c7a38706a0071ae2f93159f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 28 Sep 2007 13:34:18 -0400 Subject: [PATCH 119/552] xace: add hooks + new access codes: XKB extension. Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of inputInfo.keyboard and inputInfo.pointer, respectively; all use cases are non-XI compliant anyway. --- XTrap/xtrapddmi.c | 6 +- XTrap/xtrapdi.c | 6 +- Xext/xtest.c | 6 +- Xi/grabdevb.c | 9 ++- Xi/grabdevk.c | 9 ++- Xi/ungrdevb.c | 2 +- Xi/ungrdevk.c | 2 +- dix/devices.c | 12 ---- hw/kdrive/ephyr/ephyr.c | 2 +- hw/kdrive/vxworks/vxkbd.c | 2 +- hw/xfree86/loader/dixsym.c | 2 - hw/xgl/egl/kinput.c | 2 +- hw/xgl/glx/xglx.c | 2 +- hw/xgl/xglinput.c | 2 +- include/input.h | 4 -- include/xkbsrv.h | 46 ++++++++---- xkb/ddxDevBtn.c | 2 +- xkb/ddxFakeBtn.c | 2 +- xkb/xkb.c | 101 ++++++++++++++------------ xkb/xkbAccessX.c | 2 +- xkb/xkbActions.c | 10 +-- xkb/xkbEvents.c | 2 +- xkb/xkbLEDs.c | 10 +-- xkb/xkbPrOtherEv.c | 2 +- xkb/xkbUtils.c | 143 +++++++++++++++++++++---------------- 25 files changed, 215 insertions(+), 173 deletions(-) diff --git a/XTrap/xtrapddmi.c b/XTrap/xtrapddmi.c index 73a20c1f6..3f1a72ab8 100644 --- a/XTrap/xtrapddmi.c +++ b/XTrap/xtrapddmi.c @@ -52,7 +52,7 @@ SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include /* From library include environment */ -#include "input.h" /* From server include env. (must be before Xlib.h!) */ +#include "inputstr.h" /* From server include env. (must be before Xlib.h!) */ #ifdef PC # include "scrintst.h" /* Screen struct */ # include "extnsist.h" @@ -96,8 +96,8 @@ int XETrapSimulateXEvent(register xXTrapInputReq *request, xEvent xev; register int x = request->input.x; register int y = request->input.y; - DevicePtr keydev = LookupKeyboardDevice(); - DevicePtr ptrdev = LookupPointerDevice(); + DevicePtr keydev = (DevicePtr)inputInfo.keyboard; + DevicePtr ptrdev = (DevicePtr)inputInfo.pointer; if (request->input.screen < screenInfo.numScreens) { diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c index 23d3bde7f..efad36f7a 100644 --- a/XTrap/xtrapdi.c +++ b/XTrap/xtrapdi.c @@ -58,7 +58,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include -#include "input.h" /* Server DevicePtr definitions */ +#include "inputstr.h" /* Server DevicePtr definitions */ #include "misc.h" /* Server swapping macros */ #include "dixstruct.h" /* Server ClientRec definitions */ #include "resource.h" /* Used with the MakeAtom call */ @@ -277,7 +277,7 @@ Bool XETrapRedirectDevices() /* Do we need to redirect the keyboard device? */ if (XETrapKbdDev == NULL) { - if ((XETrapKbdDev = LookupKeyboardDevice()) == NULL) + if ((XETrapKbdDev = (DevicePtr)inputInfo.keyboard) == NULL) { retval = False; } @@ -302,7 +302,7 @@ Bool XETrapRedirectDevices() #ifndef VECTORED_EVENTS if (XETrapPtrDev == NULL) { - if ((XETrapPtrDev = LookupPointerDevice()) == 0L) + if ((XETrapPtrDev = (DevicePtr)inputInfo.pointer) == 0L) { retval = False; } diff --git a/Xext/xtest.c b/Xext/xtest.c index 42cf8178f..add996655 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -316,7 +316,7 @@ ProcXTestFakeInput(client) #ifdef XINPUT if (!extension) #endif /* XINPUT */ - dev = (DeviceIntPtr)LookupKeyboardDevice(); + dev = inputInfo.keyboard; if (ev->u.u.detail < dev->key->curKeySyms.minKeyCode || ev->u.u.detail > dev->key->curKeySyms.maxKeyCode) { @@ -360,7 +360,7 @@ ProcXTestFakeInput(client) break; } #endif /* XINPUT */ - dev = (DeviceIntPtr)LookupPointerDevice(); + dev = inputInfo.pointer; if (ev->u.keyButtonPointer.root == None) root = GetCurrentRootWindow(); else @@ -449,7 +449,7 @@ ProcXTestFakeInput(client) #ifdef XINPUT if (!extension) #endif /* XINPUT */ - dev = (DeviceIntPtr)LookupPointerDevice(); + dev = inputInfo.pointer; if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c index 7eb542232..c2661e85b 100644 --- a/Xi/grabdevb.c +++ b/Xi/grabdevb.c @@ -62,6 +62,7 @@ SOFTWARE. #include #include "exevents.h" #include "exglobals.h" +#include "xace.h" #include "grabdev.h" #include "grabdevb.h" @@ -127,8 +128,12 @@ ProcXGrabDeviceButton(ClientPtr client) return ret; if (mdev->key == NULL) return BadMatch; - } else - mdev = (DeviceIntPtr) LookupKeyboardDevice(); + } else { + mdev = inputInfo.keyboard; + ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixReadAccess); + if (ret != Success) + return ret; + } class = (XEventClass *) (&stuff[1]); /* first word of values */ diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c index e187a4f7b..43b19280d 100644 --- a/Xi/grabdevk.c +++ b/Xi/grabdevk.c @@ -62,6 +62,7 @@ SOFTWARE. #include #include "exevents.h" #include "exglobals.h" +#include "xace.h" #include "grabdev.h" #include "grabdevk.h" @@ -125,8 +126,12 @@ ProcXGrabDeviceKey(ClientPtr client) return ret; if (mdev->key == NULL) return BadMatch; - } else - mdev = (DeviceIntPtr) LookupKeyboardDevice(); + } else { + mdev = inputInfo.keyboard; + ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixReadAccess); + if (ret != Success) + return ret; + } class = (XEventClass *) (&stuff[1]); /* first word of values */ diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c index 85ca5c6ce..590699f05 100644 --- a/Xi/ungrdevb.c +++ b/Xi/ungrdevb.c @@ -120,7 +120,7 @@ ProcXUngrabDeviceButton(ClientPtr client) if (mdev->key == NULL) return BadMatch; } else - mdev = (DeviceIntPtr) LookupKeyboardDevice(); + mdev = inputInfo.keyboard; rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c index ac4003569..521765ea3 100644 --- a/Xi/ungrdevk.c +++ b/Xi/ungrdevk.c @@ -120,7 +120,7 @@ ProcXUngrabDeviceKey(ClientPtr client) if (mdev->key == NULL) return BadMatch; } else - mdev = (DeviceIntPtr) LookupKeyboardDevice(); + mdev = inputInfo.keyboard; rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) diff --git a/dix/devices.c b/dix/devices.c index bd1bef722..b6cb4a5c0 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -705,18 +705,6 @@ RegisterKeyboardDevice(DeviceIntPtr device) RegisterOtherDevice(device); } -_X_EXPORT DevicePtr -LookupKeyboardDevice(void) -{ - return inputInfo.keyboard ? &inputInfo.keyboard->public : NULL; -} - -_X_EXPORT DevicePtr -LookupPointerDevice(void) -{ - return inputInfo.pointer ? &inputInfo.pointer->public : NULL; -} - int dixLookupDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode) { diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index e8001df73..2e0c00491 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -691,7 +691,7 @@ ephyrUpdateModifierState(unsigned int state) int i; CARD8 mask; - pkeydev = (DeviceIntPtr)LookupKeyboardDevice(); + pkeydev = inputInfo.keyboard; if (!pkeydev) return; diff --git a/hw/kdrive/vxworks/vxkbd.c b/hw/kdrive/vxworks/vxkbd.c index be528c78a..ac83ef729 100644 --- a/hw/kdrive/vxworks/vxkbd.c +++ b/hw/kdrive/vxworks/vxkbd.c @@ -232,7 +232,7 @@ VxWorksKeyboardRead (int fd) void VxWorksKeyboardLeds (int leds) { - DeviceIntPtr pKeyboard = (DeviceIntPtr) LookupKeyboardDevice (); + DeviceIntPtr pKeyboard = inputInfo.keyboard; KeyboardCtrl *ctrl = &pKeyboard->kbdfeed->ctrl; led_ioctl_info led_info; int i; diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 4b3b66a89..0eaa2d3a6 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -139,8 +139,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(InitKeyboardDeviceStruct) SYMFUNC(SendMappingNotify) SYMFUNC(InitPointerDeviceStruct) - SYMFUNC(LookupKeyboardDevice) - SYMFUNC(LookupPointerDevice) /* dispatch.c */ SYMFUNC(SetInputCheck) SYMFUNC(SendErrorToClient) diff --git a/hw/xgl/egl/kinput.c b/hw/xgl/egl/kinput.c index 981cffcfa..774e00eb5 100644 --- a/hw/xgl/egl/kinput.c +++ b/hw/xgl/egl/kinput.c @@ -439,7 +439,7 @@ KdKeybdProc(DeviceIntPtr pDevice, int onoff) switch (onoff) { case DEVICE_INIT: - if (pDev != LookupKeyboardDevice()) + if (pDev != (DevicePtr)inputInfo.keyboard) { return !Success; } diff --git a/hw/xgl/glx/xglx.c b/hw/xgl/glx/xglx.c index 89bd72e41..33b276b74 100644 --- a/hw/xgl/glx/xglx.c +++ b/hw/xgl/glx/xglx.c @@ -1100,7 +1100,7 @@ xglxKeybdProc (DeviceIntPtr pDevice, int xkbOp, xkbEvent, xkbError, xkbMajor, xkbMinor; #endif - if (pDev != LookupKeyboardDevice ()) + if (pDev != (DevicePtr)inputInfo.keyboard) return !Success; xmodMap = XGetModifierMapping (xdisplay); diff --git a/hw/xgl/xglinput.c b/hw/xgl/xglinput.c index cda21ad49..9499fcf1f 100644 --- a/hw/xgl/xglinput.c +++ b/hw/xgl/xglinput.c @@ -224,7 +224,7 @@ xglKeybdProc (DeviceIntPtr pDevice, switch (onoff) { case DEVICE_INIT: - if (pDev != LookupKeyboardDevice ()) + if (pDev != (DevicePtr)inputInfo.keyboard) return !Success; ret = InitKeyboardDeviceStruct (pDev, diff --git a/include/input.h b/include/input.h index d8a9fe852..ca67cfac5 100644 --- a/include/input.h +++ b/include/input.h @@ -197,10 +197,6 @@ extern void RegisterPointerDevice( extern void RegisterKeyboardDevice( DeviceIntPtr /*device*/); -extern DevicePtr LookupKeyboardDevice(void); - -extern DevicePtr LookupPointerDevice(void); - extern int dixLookupDevice( DeviceIntPtr * /* dev */, int /* id */, diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 71ea115e6..e4a1db3c5 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -262,6 +262,7 @@ typedef struct extern int XkbReqCode; extern int XkbEventBase; extern int XkbDisableLockActions; +extern int XkbKeyboardErrorCode; extern char * XkbBaseDirectory; extern char * XkbBinDirectory; extern char * XkbInitialMap; @@ -352,29 +353,44 @@ extern void XkbFreeNames( Bool /* freeMap */ ); -extern DeviceIntPtr _XkbLookupAnyDevice( - int /* id */, - int * /* why_rtrn */ +extern int _XkbLookupAnyDevice( + DeviceIntPtr *pDev, + int id, + ClientPtr client, + Mask access_mode, + int *xkb_err ); -extern DeviceIntPtr _XkbLookupKeyboard( - int /* id */, - int * /* why_rtrn */ +extern int _XkbLookupKeyboard( + DeviceIntPtr *pDev, + int id, + ClientPtr client, + Mask access_mode, + int *xkb_err ); -extern DeviceIntPtr _XkbLookupBellDevice( - int /* id */, - int * /* why_rtrn */ +extern int _XkbLookupBellDevice( + DeviceIntPtr *pDev, + int id, + ClientPtr client, + Mask access_mode, + int *xkb_err ); -extern DeviceIntPtr _XkbLookupLedDevice( - int /* id */, - int * /* why_rtrn */ +extern int _XkbLookupLedDevice( + DeviceIntPtr *pDev, + int id, + ClientPtr client, + Mask access_mode, + int *xkb_err ); -extern DeviceIntPtr _XkbLookupButtonDevice( - int /* id */, - int * /* why_rtrn */ +extern int _XkbLookupButtonDevice( + DeviceIntPtr *pDev, + int id, + ClientPtr client, + Mask access_mode, + int *xkb_err ); extern XkbDescPtr XkbAllocKeyboard( diff --git a/xkb/ddxDevBtn.c b/xkb/ddxDevBtn.c index 7e27c5189..5313a1ec5 100644 --- a/xkb/ddxDevBtn.c +++ b/xkb/ddxDevBtn.c @@ -53,7 +53,7 @@ deviceValuator * val; int x,y; int nAxes, i, count; - if ((dev==(DeviceIntPtr)LookupPointerDevice())||(!dev->public.on)) + if (dev == inputInfo.pointer || !dev->public.on) return; nAxes = (dev->valuator?dev->valuator->numAxes:0); diff --git a/xkb/ddxFakeBtn.c b/xkb/ddxFakeBtn.c index 8144fd2c5..2dad54fea 100644 --- a/xkb/ddxFakeBtn.c +++ b/xkb/ddxFakeBtn.c @@ -46,7 +46,7 @@ xEvent ev; int x,y; DevicePtr ptr; - if ((ptr = LookupPointerDevice())==NULL) + if ((ptr = (DevicePtr)inputInfo.pointer)==NULL) return; GetSpritePosition(&x,&y); ev.u.u.type = event; diff --git a/xkb/xkb.c b/xkb/xkb.c index cf4243070..9efdfb6b5 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -38,6 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XKBSRV_NEED_FILE_FUNCS #include #include "extnsionst.h" +#include "xace.h" #include "xkb.h" #include @@ -45,7 +46,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. int XkbEventBase; static int XkbErrorBase; int XkbReqCode; -static int XkbKeyboardErrorCode; + int XkbKeyboardErrorCode; CARD32 xkbDebugFlags = 0; static CARD32 xkbDebugCtrls = 0; @@ -53,19 +54,23 @@ static RESTYPE RT_XKBCLIENT; /***====================================================================***/ -#define CHK_DEVICE(d,sp,lf) {\ +#define CHK_DEVICE(dev, id, client, access_mode, lf) {\ int why;\ - d = (DeviceIntPtr)lf((sp),&why);\ - if (!dev) {\ - client->errorValue = _XkbErrCode2(why,(sp));\ - return XkbKeyboardErrorCode;\ + int rc = lf(&(dev), id, client, access_mode, &why);\ + if (rc != Success) {\ + client->errorValue = _XkbErrCode2(why, id);\ + return rc;\ }\ } -#define CHK_KBD_DEVICE(d,sp) CHK_DEVICE(d,sp,_XkbLookupKeyboard) -#define CHK_LED_DEVICE(d,sp) CHK_DEVICE(d,sp,_XkbLookupLedDevice) -#define CHK_BELL_DEVICE(d,sp) CHK_DEVICE(d,sp,_XkbLookupBellDevice) -#define CHK_ANY_DEVICE(d,sp) CHK_DEVICE(d,sp,_XkbLookupAnyDevice) +#define CHK_KBD_DEVICE(dev, id, client, mode) \ + CHK_DEVICE(dev, id, client, mode, _XkbLookupKeyboard) +#define CHK_LED_DEVICE(dev, id, client, mode) \ + CHK_DEVICE(dev, id, client, mode, _XkbLookupLedDevice) +#define CHK_BELL_DEVICE(dev, id, client, mode) \ + CHK_DEVICE(dev, id, client, mode, _XkbLookupBellDevice) +#define CHK_ANY_DEVICE(dev, id, client, mode) \ + CHK_DEVICE(dev, id, client, mode, _XkbLookupAnyDevice) #define CHK_ATOM_ONLY2(a,ev,er) {\ if (((a)==None)||(!ValidAtom((a)))) {\ @@ -206,7 +211,7 @@ ProcXkbSelectEvents(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_ANY_DEVICE(dev,stuff->deviceSpec); + CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess); if (((stuff->affectWhich&XkbMapNotifyMask)!=0)&&(stuff->affectMap)) { client->mapNotifyMask&= ~stuff->affectMap; @@ -351,7 +356,7 @@ ProcXkbBell(ClientPtr client) REQUEST(xkbBellReq); DeviceIntPtr dev; WindowPtr pWin; - int base; + int rc, base; int newPercent,oldPitch,oldDuration; pointer ctrl; @@ -360,7 +365,7 @@ ProcXkbBell(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_BELL_DEVICE(dev,stuff->deviceSpec); + CHK_BELL_DEVICE(dev, stuff->deviceSpec, client, DixBellAccess); CHK_ATOM_OR_NONE(stuff->name); if ((stuff->forceSound)&&(stuff->eventOnly)) { @@ -448,10 +453,10 @@ ProcXkbBell(ClientPtr client) return BadValue; } if (stuff->window!=None) { - pWin= (WindowPtr)LookupIDByType(stuff->window,RT_WINDOW); - if (pWin==NULL) { + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); + if (rc != Success) { client->errorValue= stuff->window; - return BadValue; + return rc; } } else pWin= NULL; @@ -499,7 +504,7 @@ ProcXkbGetState(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess); xkb= &dev->key->xkbInfo->state; bzero(&rep,sizeof(xkbGetStateReply)); @@ -544,7 +549,7 @@ ProcXkbLatchLockState(ClientPtr client) if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); CHK_MASK_MATCH(0x01, stuff->affectModLocks, stuff->modLocks); CHK_MASK_MATCH(0x01, stuff->affectModLatches, stuff->modLatches); @@ -612,7 +617,7 @@ ProcXkbGetControls(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); xkb = dev->key->xkbInfo->desc->ctrls; rep.type = X_Reply; @@ -689,7 +694,7 @@ ProcXkbSetControls(ClientPtr client) if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask); for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) { @@ -1370,7 +1375,7 @@ ProcXkbGetMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); CHK_MASK_OVERLAP(0x01,stuff->full,stuff->partial); CHK_MASK_LEGAL(0x02,stuff->full,XkbAllMapComponentsMask); CHK_MASK_LEGAL(0x03,stuff->partial,XkbAllMapComponentsMask); @@ -2299,7 +2304,7 @@ ProcXkbSetMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask); XkbSetCauseXkbReq(&cause,X_kbSetMap,client); @@ -2569,7 +2574,7 @@ ProcXkbGetCompatMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); xkb = dev->key->xkbInfo->desc; compat= xkb->compat; @@ -2613,7 +2618,7 @@ ProcXkbSetCompatMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); data = (char *)&stuff[1]; xkbi = dev->key->xkbInfo; @@ -2748,7 +2753,7 @@ ProcXkbGetIndicatorState(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess); sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId, XkbXI_IndicatorStateMask); @@ -2859,7 +2864,7 @@ XkbIndicatorPtr leds; if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); xkb= dev->key->xkbInfo->desc; leds= xkb->indicators; @@ -2878,7 +2883,7 @@ int ProcXkbSetIndicatorMap(ClientPtr client) { register int i,bit; - int nIndicators,why; + int nIndicators; DeviceIntPtr dev; XkbSrvInfoPtr xkbi; xkbIndicatorMapWireDesc *from; @@ -2891,11 +2896,8 @@ ProcXkbSetIndicatorMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - dev = _XkbLookupKeyboard(stuff->deviceSpec,&why); - if (!dev) { - client->errorValue = _XkbErrCode2(why,stuff->deviceSpec); - return XkbKeyboardErrorCode; - } + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + xkbi= dev->key->xkbInfo; if (stuff->which==0) @@ -2971,7 +2973,7 @@ ProcXkbGetNamedIndicator(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_LED_DEVICE(dev,stuff->deviceSpec); + CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess); CHK_ATOM_ONLY(stuff->indicator); sli= XkbFindSrvLedInfo(dev,stuff->ledClass,stuff->ledID,0); @@ -3057,7 +3059,7 @@ ProcXkbSetNamedIndicator(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_LED_DEVICE(dev,stuff->deviceSpec); + CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); CHK_ATOM_ONLY(stuff->indicator); CHK_MASK_LEGAL(0x10,stuff->whichGroups,XkbIM_UseAnyGroup); CHK_MASK_LEGAL(0x11,stuff->whichMods,XkbIM_UseAnyMods); @@ -3125,7 +3127,7 @@ ProcXkbSetNamedIndicator(ClientPtr client) kbd= dev; if ((sli->flags&XkbSLI_HasOwnState)==0) - kbd= (DeviceIntPtr)LookupKeyboardDevice(); + kbd = inputInfo.keyboard; XkbFlushLedEvents(dev,kbd,sli,&ed,&changes,&cause); return client->noClientException; } @@ -3433,7 +3435,7 @@ ProcXkbGetNames(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask); xkb = dev->key->xkbInfo->desc; @@ -3543,7 +3545,7 @@ ProcXkbSetNames(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixUnknownAccess); CHK_MASK_LEGAL(0x01,stuff->which,XkbAllNamesMask); xkb = dev->key->xkbInfo->desc; @@ -4379,7 +4381,7 @@ ProcXkbGetGeometry(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); CHK_ATOM_OR_NONE(stuff->name); geom= XkbLookupNamedGeometry(dev,stuff->name,&shouldFree); @@ -4842,7 +4844,7 @@ ProcXkbSetGeometry(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); CHK_ATOM_OR_NONE(stuff->name); xkb= dev->key->xkbInfo->desc; @@ -4897,6 +4899,7 @@ ProcXkbPerClientFlags(ClientPtr client) DeviceIntPtr dev; xkbPerClientFlagsReply rep; XkbInterestPtr interest; + Mask access_mode = DixGetAttrAccess | DixSetAttrAccess; REQUEST(xkbPerClientFlagsReq); REQUEST_SIZE_MATCH(xkbPerClientFlagsReq); @@ -4904,7 +4907,7 @@ ProcXkbPerClientFlags(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode); CHK_MASK_LEGAL(0x01,stuff->change,XkbPCF_AllFlagsMask); CHK_MASK_MATCH(0x02,stuff->change,stuff->value); @@ -5040,7 +5043,7 @@ ProcXkbListComponents(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); status= Success; str= (unsigned char *)&stuff[1]; @@ -5123,6 +5126,7 @@ ProcXkbGetKbdByName(ClientPtr client) Bool geom_changed; XkbSrvLedInfoPtr old_sli; XkbSrvLedInfoPtr sli; + Mask access_mode = DixGetAttrAccess | DixSetAttrAccess; REQUEST(xkbGetKbdByNameReq); REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq); @@ -5130,7 +5134,7 @@ ProcXkbGetKbdByName(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev,stuff->deviceSpec); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode); xkb = dev->key->xkbInfo->desc; status= Success; @@ -5664,7 +5668,7 @@ char * str; wanted= stuff->wanted; - CHK_ANY_DEVICE(dev,stuff->deviceSpec); + CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); CHK_MASK_LEGAL(0x01,wanted,XkbXI_AllDeviceFeaturesMask); if ((!dev->button)||((stuff->nBtns<1)&&(!stuff->allBtns))) @@ -5968,7 +5972,7 @@ DeviceIntPtr kbd; kbd= dev; if ((sli->flags&XkbSLI_HasOwnState)==0) - kbd= (DeviceIntPtr)LookupKeyboardDevice(); + kbd = inputInfo.keyboard; XkbFlushLedEvents(dev,kbd,sli,&ed,&changes,&cause); ledWire= (xkbDeviceLedsWireDesc *)mapWire; @@ -5993,7 +5997,7 @@ xkbExtensionDeviceNotify ed; change= stuff->change; - CHK_ANY_DEVICE(dev,stuff->deviceSpec); + CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); CHK_MASK_LEGAL(0x01,change,XkbXI_AllFeaturesMask); wire= (char *)&stuff[1]; @@ -6043,7 +6047,7 @@ xkbExtensionDeviceNotify ed; ed.nBtns= stuff->nBtns; if (dev->key) kbd= dev; - else kbd= (DeviceIntPtr)LookupKeyboardDevice(); + else kbd= inputInfo.keyboard; acts= &dev->button->xkb_acts[stuff->firstBtn]; for (i=0;inBtns;i++,acts++) { if (acts->type!=XkbSA_NoAction) @@ -6069,10 +6073,15 @@ ProcXkbSetDebuggingFlags(ClientPtr client) { CARD32 newFlags,newCtrls,extraLength; xkbSetDebuggingFlagsReply rep; +int rc; REQUEST(xkbSetDebuggingFlagsReq); REQUEST_AT_LEAST_SIZE(xkbSetDebuggingFlagsReq); + rc = XaceHook(XACE_SERVER_ACCESS, client, DixDebugAccess); + if (rc != Success) + return rc; + newFlags= xkbDebugFlags&(~stuff->affectFlags); newFlags|= (stuff->flags&stuff->affectFlags); newCtrls= xkbDebugCtrls&(~stuff->affectCtrls); diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 2954a0c0e..fbd281536 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -689,7 +689,7 @@ ProcessPointerEvent( register xEvent * xE, register DeviceIntPtr mouse, int count) { -DeviceIntPtr dev = (DeviceIntPtr)LookupKeyboardDevice(); +DeviceIntPtr dev = inputInfo.keyboard; XkbSrvInfoPtr xkbi = dev->key->xkbInfo; unsigned changed = 0; diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 7f0f74db1..822afffcb 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -1026,8 +1026,9 @@ DeviceIntPtr dev; int button; if (filter->keycode==0) { /* initial press */ - dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL); - if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice())) + _XkbLookupButtonDevice(&dev, pAction->devbtn.device, serverClient, + DixUnknownAccess, &button); + if (!dev || !dev->public.on || dev == inputInfo.pointer) return 1; button= pAction->devbtn.button; @@ -1066,8 +1067,9 @@ int button; int button; filter->active= 0; - dev= _XkbLookupButtonDevice(filter->upAction.devbtn.device,NULL); - if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice())) + _XkbLookupButtonDevice(&dev, filter->upAction.devbtn.device, + serverClient, DixUnknownAccess, &button); + if (!dev || !dev->public.on || dev == inputInfo.pointer) return 1; button= filter->upAction.btn.button; diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 11dc17ad3..15b4949e5 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -806,7 +806,7 @@ Bool XkbFilterEvents(ClientPtr pClient,int nEvents,xEvent *xE) { int i, button_mask; -DeviceIntPtr pXDev = (DeviceIntPtr)LookupKeyboardDevice(); +DeviceIntPtr pXDev = inputInfo.keyboard; XkbSrvInfoPtr xkbi; xkbi= pXDev->key->xkbInfo; diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index d607d9066..2877af0c4 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -239,7 +239,7 @@ unsigned oldState; if (dev->key && dev->key->xkbInfo) kbd= dev; - else kbd= (DeviceIntPtr)LookupKeyboardDevice(); + else kbd= inputInfo.keyboard; state= &kbd->key->xkbInfo->state; ctrls= kbd->key->xkbInfo->desc->ctrls; @@ -444,7 +444,7 @@ XkbIndicatorMapPtr map; XkbDescPtr xkb; if ((sli->flags&XkbSLI_HasOwnState)==0) - dev= (DeviceIntPtr)LookupKeyboardDevice(); + dev= inputInfo.keyboard; sli->usesBase&= ~which; sli->usesLatched&= ~which; @@ -731,7 +731,7 @@ xkbExtensionDeviceNotify my_ed; return; if (dev->key && dev->key->xkbInfo) kbd= dev; - else kbd= (DeviceIntPtr)LookupKeyboardDevice(); + else kbd= inputInfo.keyboard; if (ed==NULL) { ed= &my_ed; @@ -808,7 +808,7 @@ xkbExtensionDeviceNotify my_ed; return; if (dev->key && dev->key->xkbInfo) kbd= dev; - else kbd= (DeviceIntPtr)LookupKeyboardDevice(); + else kbd= inputInfo.keyboard; if (ed==NULL) { ed= &my_ed; @@ -869,7 +869,7 @@ Bool kb_changed; return; if (dev->key && dev->key->xkbInfo) kbd= dev; - else kbd= (DeviceIntPtr)LookupKeyboardDevice(); + else kbd= inputInfo.keyboard; xkbi= kbd->key->xkbInfo; if (changes==NULL) { diff --git a/xkb/xkbPrOtherEv.c b/xkb/xkbPrOtherEv.c index a2ea0909a..d65107cdc 100644 --- a/xkb/xkbPrOtherEv.c +++ b/xkb/xkbPrOtherEv.c @@ -71,7 +71,7 @@ Bool xkbCares,isBtn; if ((!isBtn)||((dev->button)&&(dev->button->xkb_acts))) { DeviceIntPtr kbd; if (dev->key) kbd= dev; - else kbd= (DeviceIntPtr)LookupKeyboardDevice(); + else kbd= inputInfo.keyboard; XkbHandleActions(dev,kbd,xE,count); return; } diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 877d4d242..31c1a9fa9 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -49,92 +49,115 @@ int XkbDisableLockActions = 0; /***====================================================================***/ -DeviceIntPtr -_XkbLookupAnyDevice(int id,int *why_rtrn) +int +_XkbLookupAnyDevice(DeviceIntPtr *pDev, int id, ClientPtr client, + Mask access_mode, int *xkb_err) { -DeviceIntPtr dev = NULL; + int rc = XkbKeyboardErrorCode; - dev= (DeviceIntPtr)LookupKeyboardDevice(); - if ((id==XkbUseCoreKbd)||(dev->id==id)) - return dev; - - dev= (DeviceIntPtr)LookupPointerDevice(); - if ((id==XkbUseCorePtr)||(dev->id==id)) - return dev; - - if (id&(~0xff)) - dev = NULL; - - dixLookupDevice(&dev, id, serverClient, DixUnknownAccess); - if (dev!=NULL) - return dev; - if ((!dev)&&(why_rtrn)) - *why_rtrn= XkbErr_BadDevice; - return dev; + if (id == XkbUseCoreKbd) { + if (inputInfo.keyboard) + id = inputInfo.keyboard->id; + else + goto out; + } + if (id == XkbUseCorePtr) { + if (inputInfo.pointer) + id = inputInfo.pointer->id; + else + goto out; + } + rc = dixLookupDevice(pDev, id, client, access_mode); +out: + if (rc != Success) + *xkb_err = XkbErr_BadDevice; + return rc; } -DeviceIntPtr -_XkbLookupKeyboard(int id,int *why_rtrn) +int +_XkbLookupKeyboard(DeviceIntPtr *pDev, int id, ClientPtr client, + Mask access_mode, int *xkb_err) { -DeviceIntPtr dev = NULL; + DeviceIntPtr dev; + int rc; if (id == XkbDfltXIId) id = XkbUseCoreKbd; - if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL) - return NULL; - else if ((!dev->key)||(!dev->key->xkbInfo)) { - if (why_rtrn) - *why_rtrn= XkbErr_BadClass; - return NULL; + + rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err); + if (rc != Success) + return rc; + + dev = *pDev; + if (!dev->key || !dev->key->xkbInfo) { + *pDev = NULL; + *xkb_err= XkbErr_BadClass; + return XkbKeyboardErrorCode; } - return dev; + return Success; } -DeviceIntPtr -_XkbLookupBellDevice(int id,int *why_rtrn) +int +_XkbLookupBellDevice(DeviceIntPtr *pDev, int id, ClientPtr client, + Mask access_mode, int *xkb_err) { -DeviceIntPtr dev = NULL; + DeviceIntPtr dev; + int rc; - if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL) - return NULL; - else if ((!dev->kbdfeed)&&(!dev->bell)) { - if (why_rtrn) - *why_rtrn= XkbErr_BadClass; - return NULL; + rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err); + if (rc != Success) + return rc; + + dev = *pDev; + if (!dev->kbdfeed && !dev->bell) { + *pDev = NULL; + *xkb_err= XkbErr_BadClass; + return XkbKeyboardErrorCode; } - return dev; + return Success; } -DeviceIntPtr -_XkbLookupLedDevice(int id,int *why_rtrn) +int +_XkbLookupLedDevice(DeviceIntPtr *pDev, int id, ClientPtr client, + Mask access_mode, int *xkb_err) { -DeviceIntPtr dev = NULL; + DeviceIntPtr dev; + int rc; if (id == XkbDfltXIId) id = XkbUseCorePtr; - if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL) - return NULL; - else if ((!dev->kbdfeed)&&(!dev->leds)) { - if (why_rtrn) - *why_rtrn= XkbErr_BadClass; - return NULL; + + rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err); + if (rc != Success) + return rc; + + dev = *pDev; + if (!dev->kbdfeed && !dev->leds) { + *pDev = NULL; + *xkb_err= XkbErr_BadClass; + return XkbKeyboardErrorCode; } - return dev; + return Success; } -DeviceIntPtr -_XkbLookupButtonDevice(int id,int *why_rtrn) +int +_XkbLookupButtonDevice(DeviceIntPtr *pDev, int id, ClientPtr client, + Mask access_mode, int *xkb_err) { -DeviceIntPtr dev = NULL; + DeviceIntPtr dev; + int rc; - if ((dev= _XkbLookupAnyDevice(id,why_rtrn))==NULL) - return NULL; - else if (!dev->button) { - if (why_rtrn) - *why_rtrn= XkbErr_BadClass; - return NULL; + rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err); + if (rc != Success) + return rc; + + dev = *pDev; + if (!dev->button) { + *pDev = NULL; + *xkb_err= XkbErr_BadClass; + return XkbKeyboardErrorCode; } - return dev; + return Success; } void From 50551ec693f40b91652fe4814e9fe2e1f9ab6517 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 28 Sep 2007 15:04:33 -0400 Subject: [PATCH 120/552] xace: remove obsoleted DRAWABLE_ACCESS hook. --- Xext/security.c | 1 - Xext/xace.c | 10 ---------- Xext/xace.h | 27 +++++++++++++-------------- Xext/xacestr.h | 7 ------- Xext/xselinux.c | 1 - dix/dispatch.c | 3 +-- 6 files changed, 14 insertions(+), 35 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index fe1e48a14..ec414a0c3 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1836,7 +1836,6 @@ SecurityExtensionInit(INITARGS) XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL); XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL); XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL); - XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL); XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL); XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL); XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL); diff --git a/Xext/xace.c b/Xext/xace.c index 92f0e4048..3de259f71 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -105,16 +105,6 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_DRAWABLE_ACCESS: { - XaceDrawableAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, DrawablePtr), - Success /* default allow */ - }; - calldata = &rec; - prv = &rec.status; - break; - } case XACE_SEND_ACCESS: { XaceSendAccessRec rec = { va_arg(ap, ClientPtr), diff --git a/Xext/xace.h b/Xext/xace.h index c1fc0714f..e9fe9f31b 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -45,20 +45,19 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_RESOURCE_ACCESS 2 #define XACE_DEVICE_ACCESS 3 #define XACE_PROPERTY_ACCESS 4 -#define XACE_DRAWABLE_ACCESS 5 -#define XACE_SEND_ACCESS 6 -#define XACE_RECEIVE_ACCESS 7 -#define XACE_CLIENT_ACCESS 8 -#define XACE_EXT_ACCESS 9 -#define XACE_SERVER_ACCESS 10 -#define XACE_SELECTION_ACCESS 11 -#define XACE_SCREEN_ACCESS 12 -#define XACE_SCREENSAVER_ACCESS 13 -#define XACE_AUTH_AVAIL 14 -#define XACE_KEY_AVAIL 15 -#define XACE_AUDIT_BEGIN 16 -#define XACE_AUDIT_END 17 -#define XACE_NUM_HOOKS 18 +#define XACE_SEND_ACCESS 5 +#define XACE_RECEIVE_ACCESS 6 +#define XACE_CLIENT_ACCESS 7 +#define XACE_EXT_ACCESS 8 +#define XACE_SERVER_ACCESS 9 +#define XACE_SELECTION_ACCESS 10 +#define XACE_SCREEN_ACCESS 11 +#define XACE_SCREENSAVER_ACCESS 12 +#define XACE_AUTH_AVAIL 13 +#define XACE_KEY_AVAIL 14 +#define XACE_AUDIT_BEGIN 15 +#define XACE_AUDIT_END 16 +#define XACE_NUM_HOOKS 17 extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index e12a52c9a..1dae4d6b5 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -65,13 +65,6 @@ typedef struct { int status; } XacePropertyAccessRec; -/* XACE_DRAWABLE_ACCESS */ -typedef struct { - ClientPtr client; - DrawablePtr pDraw; - int status; -} XaceDrawableAccessRec; - /* XACE_SEND_ACCESS */ typedef struct { ClientPtr client; diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 1ffd79d79..bc86a3294 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1389,7 +1389,6 @@ XSELinuxExtensionInit(INITARGS) XaceRegisterCallback(XACE_RESOURCE_ACCESS, XSELinuxResLookup, NULL); XaceRegisterCallback(XACE_MAP_ACCESS, XSELinuxMap, NULL); XaceRegisterCallback(XACE_SERVER_ACCESS, XSELinuxServer, NULL); - XaceRegisterCallback(XACE_DRAWABLE_ACCESS, XSELinuxDrawable, NULL); XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); /* XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, XSELinuxDeclare, NULL); XaceRegisterCallback(XACE_DEVICE_ACCESS, XSELinuxDevice, NULL); */ diff --git a/dix/dispatch.c b/dix/dispatch.c index 65eb8cc41..50384db30 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -2273,8 +2273,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); } - if (pDraw->type == DRAWABLE_WINDOW && - XaceHook(XACE_DRAWABLE_ACCESS, client, pDraw) != Success) + if (pDraw->type == DRAWABLE_WINDOW) { pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw); if (pVisibleRegion) From b77d272d7555c1e0f176ee74b8717030a6d6c7b0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 2 Oct 2007 13:21:53 -0400 Subject: [PATCH 121/552] xace: add hooks + new access codes: XTEST extension --- Xext/xtest.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index add996655..79c53b426 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -141,7 +141,7 @@ ProcXTestCompareCursor(client) register int n, rc; REQUEST_SIZE_MATCH(xXTestCompareCursorReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if (stuff->cursor == None) @@ -149,11 +149,12 @@ ProcXTestCompareCursor(client) else if (stuff->cursor == XTestCurrentCursor) pCursor = GetSpriteCursor(); else { - pCursor = (CursorPtr)LookupIDByType(stuff->cursor, RT_CURSOR); - if (!pCursor) + rc = dixLookupResource((pointer *)&pCursor, stuff->cursor, RT_CURSOR, + client, DixReadAccess); + if (rc != Success) { client->errorValue = stuff->cursor; - return (BadCursor); + return (rc == BadValue) ? BadCursor : rc; } } rep.type = X_Reply; @@ -366,7 +367,7 @@ ProcXTestFakeInput(client) else { rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client, - DixUnknownAccess); + DixGetAttrAccess); if (rc != Success) return rc; if (root->parent) From 59cebcd2e9302d15a52588ecafbbc2d2c5ae3a6c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 2 Oct 2007 13:39:25 -0400 Subject: [PATCH 122/552] xace: add creation hook for new input devices. Unfortunately, more information is needed to properly label the device. This will come from the configuration file, the hotplug messages, etc. It will either have to be passed into this function, or this hook moved down into the callers. --- dix/devices.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index b6cb4a5c0..3395cd33d 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -119,7 +119,6 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->name = (char *)NULL; dev->type = 0; dev->id = devid; - inputInfo.numDevices++; dev->public.on = FALSE; dev->public.processInputProc = (ProcessInputProc)NoopDDA; dev->public.realInputProc = (ProcessInputProc)NoopDDA; @@ -156,6 +155,15 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->inited = FALSE; dev->enabled = FALSE; + /* security creation/labeling check + */ + if (XaceHook(XACE_DEVICE_ACCESS, serverClient, dev, DixCreateAccess)) { + xfree(dev); + return NULL; + } + + inputInfo.numDevices++; + for (prev = &inputInfo.off_devices; *prev; prev = &(*prev)->next) ; *prev = dev; From 7e9e01a4a34fa45521067d43c5bbff942dd5d51a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 10 Oct 2007 17:40:22 -0400 Subject: [PATCH 123/552] dix: pass a valid ClientPtr to SetFontPath in all cases. --- dix/main.c | 6 +++--- hw/dmx/dmxfont.c | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dix/main.c b/dix/main.c index 03e0013e8..119828bd7 100644 --- a/dix/main.c +++ b/dix/main.c @@ -388,9 +388,9 @@ main(int argc, char *argv[], char *envp[]) FatalError("failed to initialize core devices"); InitFonts(); - if (loadableFonts) { - SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error); - } + if (loadableFonts) + SetFontPath(serverClient, 0, (unsigned char *)defaultFontPath, + &error); else { if (SetDefaultFontPath(defaultFontPath) != Success) ErrorF("failed to set default font path '%s'", diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c index e5f86350a..b70f7d2df 100644 --- a/hw/dmx/dmxfont.c +++ b/hw/dmx/dmxfont.c @@ -361,7 +361,8 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) } } - if (SetFontPath(NULL, newnpaths, (unsigned char *)newfp, &error)) { + if (SetFontPath(serverClient, newnpaths, (unsigned char *)newfp, + &error)) { /* Note that this should never happen since all of the * FPEs were previously valid. */ dmxLog(dmxError, "Cannot reset the default font path.\n"); From 473bc6ec4c59e1a962b0b897c449a69aa5064ab0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 10 Oct 2007 19:43:12 -0400 Subject: [PATCH 124/552] xace: remove the special-cased "ignore" functionality from the property code. There will be no more faking of Success to hide things. XACE does not provide polyinstantiation. --- Xext/xace.h | 5 ----- dix/property.c | 11 +++++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Xext/xace.h b/Xext/xace.h index e9fe9f31b..fc96458a9 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -20,11 +20,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _XACE_H #define _XACE_H -/* Special value used for ignore operation. This is a deprecated feature - * only for Security extension support. Do not use in new code. - */ -#define XaceIgnoreError BadRequest - #ifdef XACE #define XACE_EXTENSION_NAME "XAccessControlExtension" diff --git a/dix/property.c b/dix/property.c index 5f12dec3c..cff51d894 100644 --- a/dix/property.c +++ b/dix/property.c @@ -161,7 +161,7 @@ ProcRotateProperties(ClientPtr client) if (rc != Success) { DEALLOCATE_LOCAL(props); client->errorValue = atoms[i]; - return (rc == XaceIgnoreError) ? Success : rc; + return rc; } props[i] = pProp; } @@ -282,7 +282,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, xfree(data); xfree(pProp); pClient->errorValue = property; - return (rc == XaceIgnoreError) ? Success : rc; + return rc; } pProp->next = pWin->optional->userProps; pWin->optional->userProps = pProp; @@ -293,7 +293,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, DixWriteAccess); if (rc != Success) { pClient->errorValue = property; - return (rc == XaceIgnoreError) ? Success : rc; + return rc; } /* To append or prepend to a property the request format and type must match those of the already defined property. The @@ -499,8 +499,7 @@ ProcGetProperty(ClientPtr client) rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, access_mode); if (rc != Success) { client->errorValue = stuff->property; - return (rc == XaceIgnoreError) ? - NullPropertyReply(client, pProp->type, pProp->format, &reply) : rc; + return rc; } /* If the request type and actual type don't match. Return the @@ -641,7 +640,7 @@ ProcDeleteProperty(ClientPtr client) FindProperty(pWin, stuff->property), DixDestroyAccess); if (result != Success) { client->errorValue = stuff->property; - return (result == XaceIgnoreError) ? Success : result; + return result; } result = DeleteProperty(pWin, stuff->property); From 8f23d40068151ad85cde239d07031284f0b2c4dc Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 10 Oct 2007 19:56:03 -0400 Subject: [PATCH 125/552] xace: move the property deletion hook inside the DeleteProperty function. --- dix/property.c | 17 ++++++++--------- hw/darwin/quartz/xpr/xprFrame.c | 2 +- hw/xwin/winwin32rootless.c | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/dix/property.c b/dix/property.c index cff51d894..713507a09 100644 --- a/dix/property.c +++ b/dix/property.c @@ -365,9 +365,10 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, } int -DeleteProperty(WindowPtr pWin, Atom propName) +DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName) { PropertyPtr pProp, prevProp; + int rc; if (!(pProp = wUserProps (pWin))) return(Success); @@ -381,6 +382,11 @@ DeleteProperty(WindowPtr pWin, Atom propName) } if (pProp) { + rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, + DixDestroyAccess); + if (rc != Success) + return rc; + if (prevProp == (PropertyPtr)NULL) /* takes care of head */ { if (!(pWin->optional->userProps = pProp->next)) @@ -636,14 +642,7 @@ ProcDeleteProperty(ClientPtr client) return (BadAtom); } - result = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, - FindProperty(pWin, stuff->property), DixDestroyAccess); - if (result != Success) { - client->errorValue = stuff->property; - return result; - } - - result = DeleteProperty(pWin, stuff->property); + result = DeleteProperty(client, pWin, stuff->property); if (client->noClientException != Success) return(client->noClientException); else diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index 76c719ec0..c5b84f08b 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -337,7 +337,7 @@ xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects, void xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin) { - DeleteProperty(oldWin, xa_native_window_id()); + DeleteProperty(serverClient, oldWin, xa_native_window_id()); xprSetNativeProperty(pFrame); } diff --git a/hw/xwin/winwin32rootless.c b/hw/xwin/winwin32rootless.c index 832e36d44..4b4cd3ded 100755 --- a/hw/xwin/winwin32rootless.c +++ b/hw/xwin/winwin32rootless.c @@ -971,7 +971,7 @@ winMWExtWMRootlessSwitchWindow (RootlessWindowPtr pFrame, WindowPtr oldWin) SetWindowLongPtr (pRLWinPriv->hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN); - DeleteProperty (oldWin, AtmWindowsWmNativeHwnd ()); + DeleteProperty (serverClient, oldWin, AtmWindowsWmNativeHwnd ()); winMWExtWMSetNativeProperty (pFrame); #if CYGMULTIWINDOW_DEBUG #if 0 From 6adeba17301a309be2f34cd51eca84a13d5503fd Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 11 Oct 2007 14:17:17 -0400 Subject: [PATCH 126/552] dix: Add a new "registry" mechanism for registering string names of things. Supports protocol requests, events, and errors, and resource names. Modify XRES extension to use it. --- Xext/xres.c | 21 +-- configure.ac | 5 + dix/Makefile.am | 1 + dix/main.c | 2 + dix/registry.c | 375 +++++++++++++++++++++++++++++++++++++ dix/resource.c | 33 +--- hw/xfree86/loader/dixsym.c | 8 +- include/Makefile.am | 1 + include/dix-config.h.in | 3 + include/registry.h | 65 +++++++ include/resource.h | 5 - randr/rrcrtc.c | 4 +- randr/rrmode.c | 2 - randr/rroutput.c | 4 +- render/picture.c | 2 - 15 files changed, 469 insertions(+), 62 deletions(-) create mode 100644 dix/registry.c create mode 100644 include/registry.h diff --git a/Xext/xres.c b/Xext/xres.c index 1617337bf..3660260c2 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -22,6 +22,7 @@ #include "windowstr.h" #include "gcstruct.h" #include "modinit.h" +#include "registry.h" static int ProcXResQueryVersion (ClientPtr client) @@ -161,17 +162,20 @@ ProcXResQueryClientResources (ClientPtr client) if(num_types) { xXResType scratch; + char *name; for(i = 0; i < lastResourceType; i++) { if(!counts[i]) continue; - if(!ResourceNames[i + 1]) { + name = (char *)LookupResourceName(i + 1); + if (strcmp(name, XREGISTRY_UNKNOWN)) + scratch.resource_type = MakeAtom(name, strlen(name), TRUE); + else { char buf[40]; snprintf(buf, sizeof(buf), "Unregistered resource %i", i + 1); - RegisterResourceName(i + 1, buf); + scratch.resource_type = MakeAtom(buf, strlen(buf), TRUE); } - scratch.resource_type = ResourceNames[i + 1]; scratch.count = counts[i]; if(client->swapped) { @@ -387,15 +391,4 @@ ResExtensionInit(INITARGS) (void) AddExtension(XRES_NAME, 0, 0, ProcResDispatch, SProcResDispatch, ResResetProc, StandardMinorOpcode); - - RegisterResourceName(RT_NONE, "NONE"); - RegisterResourceName(RT_WINDOW, "WINDOW"); - RegisterResourceName(RT_PIXMAP, "PIXMAP"); - RegisterResourceName(RT_GC, "GC"); - RegisterResourceName(RT_FONT, "FONT"); - RegisterResourceName(RT_CURSOR, "CURSOR"); - RegisterResourceName(RT_COLORMAP, "COLORMAP"); - RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY"); - RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT"); - RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); } diff --git a/configure.ac b/configure.ac index ca8fcc227..e73e250bd 100644 --- a/configure.ac +++ b/configure.ac @@ -493,6 +493,7 @@ AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with [GLX_USE_TLS=no]) dnl Extensions. +AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string registry module (default: enabled)]), [XREGISTRY=$enableval], [XREGISTRY=yes]) AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes]) AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) @@ -733,6 +734,10 @@ if test "x$XVMC" = xyes; then AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) fi +AM_CONDITIONAL(XREGISTRY, [test "x$XREGISTRY" = xyes]) +if test "x$XREGISTRY" = xyes; then + AC_DEFINE(XREGISTRY, 1, [Build registry module]) +fi AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) if test "x$COMPOSITE" = xyes; then diff --git a/dix/Makefile.am b/dix/Makefile.am index 827243a71..65c387c31 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -27,6 +27,7 @@ libdix_la_SOURCES = \ pixmap.c \ privates.c \ property.c \ + registry.c \ resource.c \ swaprep.c \ swapreq.c \ diff --git a/dix/main.c b/dix/main.c index 119828bd7..ca0028a39 100644 --- a/dix/main.c +++ b/dix/main.c @@ -102,6 +102,7 @@ Equipment Corporation. #include "dixfont.h" #include "extnsionst.h" #include "privates.h" +#include "registry.h" #ifdef XPRINT #include "DiPrint.h" #endif @@ -354,6 +355,7 @@ main(int argc, char *argv[], char *envp[]) InitGlyphCaching(); if (!dixResetPrivates()) FatalError("couldn't init private data storage"); + dixResetRegistry(); ResetFontPrivateIndex(); InitCallbackManager(); InitVisualWrap(); diff --git a/dix/registry.c b/dix/registry.c new file mode 100644 index 000000000..7b521b55d --- /dev/null +++ b/dix/registry.c @@ -0,0 +1,375 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. This permission +notice 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 NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR 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. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifdef XREGISTRY + +#include +#include +#include "resource.h" +#include "registry.h" + +#define BASE_SIZE 16 + +static const char ***requests, **events, **errors, **resources; +static unsigned nmajor, *nminor, nevent, nerror, nresource; + +static int double_size(void *p, unsigned n, unsigned size) +{ + char **ptr = (char **)p; + unsigned s, f; + + if (n) { + s = n * size; + n *= 2 * size; + f = n; + } else { + s = 0; + n = f = BASE_SIZE * size; + } + + *ptr = xrealloc(*ptr, n); + if (!*ptr) { + dixResetRegistry(); + return FALSE; + } + memset(*ptr + s, 0, f - s); + return TRUE; +} + +/* + * Registration functions + */ + +void +RegisterRequestName(unsigned major, unsigned minor, const char *name) +{ + while (major >= nmajor) { + if (!double_size(&requests, nmajor, sizeof(const char **))) + return; + if (!double_size(&nminor, nmajor, sizeof(unsigned))) + return; + nmajor = nmajor ? nmajor * 2 : BASE_SIZE; + } + while (minor >= nminor[major]) { + if (!double_size(requests+major, nminor[major], sizeof(const char *))) + return; + nminor[major] = nminor[major] ? nminor[major] * 2 : BASE_SIZE; + } + + requests[major][minor] = name; +} + +void +RegisterEventName(unsigned event, const char *name) { + while (event >= nevent) { + if (!double_size(&events, nevent, sizeof(const char *))) + return; + nevent = nevent ? nevent * 2 : BASE_SIZE; + } + + events[event] = name; +} + +void +RegisterErrorName(unsigned error, const char *name) { + while (error >= nerror) { + if (!double_size(&errors, nerror, sizeof(const char *))) + return; + nerror = nerror ? nerror * 2 : BASE_SIZE; + } + + errors[error] = name; +} + +void +RegisterResourceName(RESTYPE resource, const char *name) +{ + resource &= TypeMask; + + while (resource >= nresource) { + if (!double_size(&resources, nresource, sizeof(const char *))) + return; + nresource = nresource ? nresource * 2 : BASE_SIZE; + } + + resources[resource] = name; +} + +/* + * Lookup functions + */ + +const char * +LookupRequestName(int major, int minor) +{ + if (major >= nmajor) + return XREGISTRY_UNKNOWN; + if (minor >= nminor[major]) + return XREGISTRY_UNKNOWN; + + return requests[major][minor] ? requests[major][minor] : XREGISTRY_UNKNOWN; +} + +const char * +LookupEventName(int event) +{ + if (event >= nevent) + return XREGISTRY_UNKNOWN; + + return events[event] ? events[event] : XREGISTRY_UNKNOWN; +} + +const char * +LookupErrorName(int error) +{ + if (error >= nerror) + return XREGISTRY_UNKNOWN; + + return errors[error] ? errors[error] : XREGISTRY_UNKNOWN; +} + +const char * +LookupResourceName(RESTYPE resource) +{ + resource &= TypeMask; + + if (resource >= nresource) + return XREGISTRY_UNKNOWN; + + return resources[resource] ? resources[resource] : XREGISTRY_UNKNOWN; +} + +/* + * Setup and teardown + */ +void +dixResetRegistry(void) +{ + /* Free all memory */ + while (nmajor) + xfree(requests[--nmajor]); + xfree(requests); + xfree(nminor); + xfree(events); + xfree(errors); + xfree(resources); + + requests = NULL; + nminor = NULL; + events = NULL; + errors = NULL; + resources = NULL; + + nmajor = nevent = nerror = nresource = 0; + + /* Add built-in resources */ + RegisterResourceName(RT_NONE, "NONE"); + RegisterResourceName(RT_WINDOW, "WINDOW"); + RegisterResourceName(RT_PIXMAP, "PIXMAP"); + RegisterResourceName(RT_GC, "GC"); + RegisterResourceName(RT_FONT, "FONT"); + RegisterResourceName(RT_CURSOR, "CURSOR"); + RegisterResourceName(RT_COLORMAP, "COLORMAP"); + RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY"); + RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT"); + RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); + + /* Add the core protocol */ + RegisterRequestName(X_CreateWindow, 0, "CreateWindow"); + RegisterRequestName(X_ChangeWindowAttributes, 0, "ChangeWindowAttributes"); + RegisterRequestName(X_GetWindowAttributes, 0, "GetWindowAttributes"); + RegisterRequestName(X_DestroyWindow, 0, "DestroyWindow"); + RegisterRequestName(X_DestroySubwindows, 0, "DestroySubwindows"); + RegisterRequestName(X_ChangeSaveSet, 0, "ChangeSaveSet"); + RegisterRequestName(X_ReparentWindow, 0, "ReparentWindow"); + RegisterRequestName(X_MapWindow, 0, "MapWindow"); + RegisterRequestName(X_MapSubwindows, 0, "MapSubwindows"); + RegisterRequestName(X_UnmapWindow, 0, "UnmapWindow"); + RegisterRequestName(X_UnmapSubwindows, 0, "UnmapSubwindows"); + RegisterRequestName(X_ConfigureWindow, 0, "ConfigureWindow"); + RegisterRequestName(X_CirculateWindow, 0, "CirculateWindow"); + RegisterRequestName(X_GetGeometry, 0, "GetGeometry"); + RegisterRequestName(X_QueryTree, 0, "QueryTree"); + RegisterRequestName(X_InternAtom, 0, "InternAtom"); + RegisterRequestName(X_GetAtomName, 0, "GetAtomName"); + RegisterRequestName(X_ChangeProperty, 0, "ChangeProperty"); + RegisterRequestName(X_DeleteProperty, 0, "DeleteProperty"); + RegisterRequestName(X_GetProperty, 0, "GetProperty"); + RegisterRequestName(X_ListProperties, 0, "ListProperties"); + RegisterRequestName(X_SetSelectionOwner, 0, "SetSelectionOwner"); + RegisterRequestName(X_GetSelectionOwner, 0, "GetSelectionOwner"); + RegisterRequestName(X_ConvertSelection, 0, "ConvertSelection"); + RegisterRequestName(X_SendEvent, 0, "SendEvent"); + RegisterRequestName(X_GrabPointer, 0, "GrabPointer"); + RegisterRequestName(X_UngrabPointer, 0, "UngrabPointer"); + RegisterRequestName(X_GrabButton, 0, "GrabButton"); + RegisterRequestName(X_UngrabButton, 0, "UngrabButton"); + RegisterRequestName(X_ChangeActivePointerGrab, 0, "ChangeActivePointerGrab"); + RegisterRequestName(X_GrabKeyboard, 0, "GrabKeyboard"); + RegisterRequestName(X_UngrabKeyboard, 0, "UngrabKeyboard"); + RegisterRequestName(X_GrabKey, 0, "GrabKey"); + RegisterRequestName(X_UngrabKey, 0, "UngrabKey"); + RegisterRequestName(X_AllowEvents, 0, "AllowEvents"); + RegisterRequestName(X_GrabServer, 0, "GrabServer"); + RegisterRequestName(X_UngrabServer, 0, "UngrabServer"); + RegisterRequestName(X_QueryPointer, 0, "QueryPointer"); + RegisterRequestName(X_GetMotionEvents, 0, "GetMotionEvents"); + RegisterRequestName(X_TranslateCoords, 0, "TranslateCoords"); + RegisterRequestName(X_WarpPointer, 0, "WarpPointer"); + RegisterRequestName(X_SetInputFocus, 0, "SetInputFocus"); + RegisterRequestName(X_GetInputFocus, 0, "GetInputFocus"); + RegisterRequestName(X_QueryKeymap, 0, "QueryKeymap"); + RegisterRequestName(X_OpenFont, 0, "OpenFont"); + RegisterRequestName(X_CloseFont, 0, "CloseFont"); + RegisterRequestName(X_QueryFont, 0, "QueryFont"); + RegisterRequestName(X_QueryTextExtents, 0, "QueryTextExtents"); + RegisterRequestName(X_ListFonts, 0, "ListFonts"); + RegisterRequestName(X_ListFontsWithInfo, 0, "ListFontsWithInfo"); + RegisterRequestName(X_SetFontPath, 0, "SetFontPath"); + RegisterRequestName(X_GetFontPath, 0, "GetFontPath"); + RegisterRequestName(X_CreatePixmap, 0, "CreatePixmap"); + RegisterRequestName(X_FreePixmap, 0, "FreePixmap"); + RegisterRequestName(X_CreateGC, 0, "CreateGC"); + RegisterRequestName(X_ChangeGC, 0, "ChangeGC"); + RegisterRequestName(X_CopyGC, 0, "CopyGC"); + RegisterRequestName(X_SetDashes, 0, "SetDashes"); + RegisterRequestName(X_SetClipRectangles, 0, "SetClipRectangles"); + RegisterRequestName(X_FreeGC, 0, "FreeGC"); + RegisterRequestName(X_ClearArea, 0, "ClearArea"); + RegisterRequestName(X_CopyArea, 0, "CopyArea"); + RegisterRequestName(X_CopyPlane, 0, "CopyPlane"); + RegisterRequestName(X_PolyPoint, 0, "PolyPoint"); + RegisterRequestName(X_PolyLine, 0, "PolyLine"); + RegisterRequestName(X_PolySegment, 0, "PolySegment"); + RegisterRequestName(X_PolyRectangle, 0, "PolyRectangle"); + RegisterRequestName(X_PolyArc, 0, "PolyArc"); + RegisterRequestName(X_FillPoly, 0, "FillPoly"); + RegisterRequestName(X_PolyFillRectangle, 0, "PolyFillRectangle"); + RegisterRequestName(X_PolyFillArc, 0, "PolyFillArc"); + RegisterRequestName(X_PutImage, 0, "PutImage"); + RegisterRequestName(X_GetImage, 0, "GetImage"); + RegisterRequestName(X_PolyText8, 0, "PolyText8"); + RegisterRequestName(X_PolyText16, 0, "PolyText16"); + RegisterRequestName(X_ImageText8, 0, "ImageText8"); + RegisterRequestName(X_ImageText16, 0, "ImageText16"); + RegisterRequestName(X_CreateColormap, 0, "CreateColormap"); + RegisterRequestName(X_FreeColormap, 0, "FreeColormap"); + RegisterRequestName(X_CopyColormapAndFree, 0, "CopyColormapAndFree"); + RegisterRequestName(X_InstallColormap, 0, "InstallColormap"); + RegisterRequestName(X_UninstallColormap, 0, "UninstallColormap"); + RegisterRequestName(X_ListInstalledColormaps, 0, "ListInstalledColormaps"); + RegisterRequestName(X_AllocColor, 0, "AllocColor"); + RegisterRequestName(X_AllocNamedColor, 0, "AllocNamedColor"); + RegisterRequestName(X_AllocColorCells, 0, "AllocColorCells"); + RegisterRequestName(X_AllocColorPlanes, 0, "AllocColorPlanes"); + RegisterRequestName(X_FreeColors, 0, "FreeColors"); + RegisterRequestName(X_StoreColors, 0, "StoreColors"); + RegisterRequestName(X_StoreNamedColor, 0, "StoreNamedColor"); + RegisterRequestName(X_QueryColors, 0, "QueryColors"); + RegisterRequestName(X_LookupColor, 0, "LookupColor"); + RegisterRequestName(X_CreateCursor, 0, "CreateCursor"); + RegisterRequestName(X_CreateGlyphCursor, 0, "CreateGlyphCursor"); + RegisterRequestName(X_FreeCursor, 0, "FreeCursor"); + RegisterRequestName(X_RecolorCursor, 0, "RecolorCursor"); + RegisterRequestName(X_QueryBestSize, 0, "QueryBestSize"); + RegisterRequestName(X_QueryExtension, 0, "QueryExtension"); + RegisterRequestName(X_ListExtensions, 0, "ListExtensions"); + RegisterRequestName(X_ChangeKeyboardMapping, 0, "ChangeKeyboardMapping"); + RegisterRequestName(X_GetKeyboardMapping, 0, "GetKeyboardMapping"); + RegisterRequestName(X_ChangeKeyboardControl, 0, "ChangeKeyboardControl"); + RegisterRequestName(X_GetKeyboardControl, 0, "GetKeyboardControl"); + RegisterRequestName(X_Bell, 0, "Bell"); + RegisterRequestName(X_ChangePointerControl, 0, "ChangePointerControl"); + RegisterRequestName(X_GetPointerControl, 0, "GetPointerControl"); + RegisterRequestName(X_SetScreenSaver, 0, "SetScreenSaver"); + RegisterRequestName(X_GetScreenSaver, 0, "GetScreenSaver"); + RegisterRequestName(X_ChangeHosts, 0, "ChangeHosts"); + RegisterRequestName(X_ListHosts, 0, "ListHosts"); + RegisterRequestName(X_SetAccessControl, 0, "SetAccessControl"); + RegisterRequestName(X_SetCloseDownMode, 0, "SetCloseDownMode"); + RegisterRequestName(X_KillClient, 0, "KillClient"); + RegisterRequestName(X_RotateProperties, 0, "RotateProperties"); + RegisterRequestName(X_ForceScreenSaver, 0, "ForceScreenSaver"); + RegisterRequestName(X_SetPointerMapping, 0, "SetPointerMapping"); + RegisterRequestName(X_GetPointerMapping, 0, "GetPointerMapping"); + RegisterRequestName(X_SetModifierMapping, 0, "SetModifierMapping"); + RegisterRequestName(X_GetModifierMapping, 0, "GetModifierMapping"); + RegisterRequestName(X_NoOperation, 0, "NoOperation"); + + RegisterErrorName(Success, "Success"); + RegisterErrorName(BadRequest, "BadRequest"); + RegisterErrorName(BadValue, "BadValue"); + RegisterErrorName(BadWindow, "BadWindow"); + RegisterErrorName(BadPixmap, "BadPixmap"); + RegisterErrorName(BadAtom, "BadAtom"); + RegisterErrorName(BadCursor, "BadCursor"); + RegisterErrorName(BadFont, "BadFont"); + RegisterErrorName(BadMatch, "BadMatch"); + RegisterErrorName(BadDrawable, "BadDrawable"); + RegisterErrorName(BadAccess, "BadAccess"); + RegisterErrorName(BadAlloc, "BadAlloc"); + RegisterErrorName(BadColor, "BadColor"); + RegisterErrorName(BadGC, "BadGC"); + RegisterErrorName(BadIDChoice, "BadIDChoice"); + RegisterErrorName(BadName, "BadName"); + RegisterErrorName(BadLength, "BadLength"); + RegisterErrorName(BadImplementation, "BadImplementation"); + + RegisterEventName(X_Error, "Error"); + RegisterEventName(X_Reply, "Reply"); + RegisterEventName(KeyPress, "KeyPress"); + RegisterEventName(KeyRelease, "KeyRelease"); + RegisterEventName(ButtonPress, "ButtonPress"); + RegisterEventName(ButtonRelease, "ButtonRelease"); + RegisterEventName(MotionNotify, "MotionNotify"); + RegisterEventName(EnterNotify, "EnterNotify"); + RegisterEventName(LeaveNotify, "LeaveNotify"); + RegisterEventName(FocusIn, "FocusIn"); + RegisterEventName(FocusOut, "FocusOut"); + RegisterEventName(KeymapNotify, "KeymapNotify"); + RegisterEventName(Expose, "Expose"); + RegisterEventName(GraphicsExpose, "GraphicsExpose"); + RegisterEventName(NoExpose, "NoExpose"); + RegisterEventName(VisibilityNotify, "VisibilityNotify"); + RegisterEventName(CreateNotify, "CreateNotify"); + RegisterEventName(DestroyNotify, "DestroyNotify"); + RegisterEventName(UnmapNotify, "UnmapNotify"); + RegisterEventName(MapNotify, "MapNotify"); + RegisterEventName(MapRequest, "MapRequest"); + RegisterEventName(ReparentNotify, "ReparentNotify"); + RegisterEventName(ConfigureNotify, "ConfigureNotify"); + RegisterEventName(ConfigureRequest, "ConfigureRequest"); + RegisterEventName(GravityNotify, "GravityNotify"); + RegisterEventName(ResizeRequest, "ResizeRequest"); + RegisterEventName(CirculateNotify, "CirculateNotify"); + RegisterEventName(CirculateRequest, "CirculateRequest"); + RegisterEventName(PropertyNotify, "PropertyNotify"); + RegisterEventName(SelectionClear, "SelectionClear"); + RegisterEventName(SelectionRequest, "SelectionRequest"); + RegisterEventName(SelectionNotify, "SelectionNotify"); + RegisterEventName(ColormapNotify, "ColormapNotify"); + RegisterEventName(ClientMessage, "ClientMessage"); + RegisterEventName(MappingNotify, "MappingNotify"); +} + +#endif /* XREGISTRY */ diff --git a/dix/resource.c b/dix/resource.c index c892cf96b..857776dc5 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -151,10 +151,11 @@ Equipment Corporation. #ifdef XSERVER_DTRACE #include +#include "registry.h" typedef const char *string; #include "Xserver-dtrace.h" -#define TypeNameString(t) NameForAtom(ResourceNames[t & TypeMask]) +#define TypeNameString(t) LookupResourceName(t) #endif static void RebuildTable( @@ -202,17 +203,6 @@ CallResourceStateCallback(ResourceState state, ResourceRec *res) } } -#ifdef XResExtension - -_X_EXPORT Atom * ResourceNames = NULL; - -_X_EXPORT void RegisterResourceName (RESTYPE type, char *name) -{ - ResourceNames[type & TypeMask] = MakeAtom(name, strlen(name), TRUE); -} - -#endif - _X_EXPORT RESTYPE CreateNewResourceType(DeleteType deleteFunc) { @@ -228,17 +218,6 @@ CreateNewResourceType(DeleteType deleteFunc) if (!dixRegisterPrivateOffset(next, -1)) return 0; -#ifdef XResExtension - { - Atom *newnames; - newnames = xrealloc(ResourceNames, (next + 1) * sizeof(Atom)); - if(!newnames) - return 0; - ResourceNames = newnames; - ResourceNames[next] = 0; - } -#endif - lastResourceType = next; DeleteFuncs = funcs; DeleteFuncs[next] = deleteFunc; @@ -291,14 +270,6 @@ InitClientResources(ClientPtr client) DeleteFuncs[RT_CMAPENTRY & TypeMask] = FreeClientPixels; DeleteFuncs[RT_OTHERCLIENT & TypeMask] = OtherClientGone; DeleteFuncs[RT_PASSIVEGRAB & TypeMask] = DeletePassiveGrab; - -#ifdef XResExtension - if(ResourceNames) - xfree(ResourceNames); - ResourceNames = xalloc((lastResourceType + 1) * sizeof(Atom)); - if(!ResourceNames) - return FALSE; -#endif } clientTable[i = client->index].resources = (ResourcePtr *)xalloc(INITBUCKETS*sizeof(ResourcePtr)); diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 0eaa2d3a6..139e23c6e 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -65,6 +65,7 @@ #include "osdep.h" #include "privates.h" #include "resource.h" +#include "registry.h" #include "servermd.h" #include "scrnintstr.h" #include "windowstr.h" @@ -285,9 +286,12 @@ _X_HIDDEN void *dixLookupTab[] = { SYMVAR(lastResourceType) SYMVAR(TypeMask) SYMVAR(ResourceStateCallback) -#ifdef RES + /* registry.c */ +#ifdef XREGISTRY + SYMFUNC(RegisterRequestName) + SYMFUNC(RegisterEventName) + SYMFUNC(RegisterErrorName) SYMFUNC(RegisterResourceName) - SYMVAR(ResourceNames) #endif /* swaprep.c */ SYMFUNC(CopySwap32Write) diff --git a/include/Makefile.am b/include/Makefile.am index ef39836be..0654b5788 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -37,6 +37,7 @@ sdk_HEADERS = \ propertyst.h \ region.h \ regionstr.h \ + registry.h \ resource.h \ rgb.h \ screenint.h \ diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 8d4d7318e..a091527f1 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -329,6 +329,9 @@ /* unaligned word accesses behave as expected */ #undef WORKING_UNALIGNED_INT +/* Build X string registry */ +#undef XREGISTRY + /* Build X-ACE extension */ #undef XACE diff --git a/include/registry.h b/include/registry.h new file mode 100644 index 000000000..d57f32d2d --- /dev/null +++ b/include/registry.h @@ -0,0 +1,65 @@ +/*********************************************************** + +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 NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHOR 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. + +******************************************************************/ + +#ifndef DIX_REGISTRY_H +#define DIX_REGISTRY_H + +#ifdef XREGISTRY + +#include "resource.h" + +/* Internal string registry - for auditing, debugging, security, etc. */ + +/* + * Registration functions. The name string is not copied, so it must + * not be a stack variable. + */ +void RegisterRequestName(unsigned major, unsigned minor, const char *name); +void RegisterEventName(unsigned event, const char *name); +void RegisterErrorName(unsigned error, const char *name); +void RegisterResourceName(RESTYPE type, const char *name); + +/* + * Lookup functions. The returned string must not be modified. + */ +const char *LookupRequestName(int major, int minor); +const char *LookupEventName(int event); +const char *LookupErrorName(int error); +const char *LookupResourceName(RESTYPE rtype); + +/* + * Result returned from any unsuccessful lookup + */ +#define XREGISTRY_UNKNOWN "" + +/* + * Setup and teardown + */ +void dixResetRegistry(void); + +#else /* XREGISTRY */ + +/* Define calls away when the registry is not being built. */ + +#define RegisterRequestName(a, b, c) { ; } +#define RegisterEventName(a, b) { ; } +#define RegisterErrorName(a, b) { ; } +#define RegisterResourceName(a, b) { ; } + +#define LookupRequestName(a, b) XREGISTRY_UNKNOWN +#define LookupEventName(a) XREGISTRY_UNKNOWN +#define LookupErrorName(a) XREGISTRY_UNKNOWN +#define LookupResourceName(a) XREGISTRY_UNKNOWN + +#define dixResetRegistry() { ; } + +#endif /* XREGISTRY */ +#endif /* DIX_REGISTRY_H */ diff --git a/include/resource.h b/include/resource.h index 087d62c09..4a3380488 100644 --- a/include/resource.h +++ b/include/resource.h @@ -239,11 +239,6 @@ extern unsigned int GetXIDList( extern RESTYPE lastResourceType; extern RESTYPE TypeMask; -#ifdef XResExtension -extern Atom *ResourceNames; -void RegisterResourceName(RESTYPE type, char* name); -#endif - /* * These are deprecated compatibility functions and will be removed soon! * Please use the noted replacements instead. diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index db5007e28..6384857c3 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -500,9 +500,7 @@ RRCrtcInit (void) RRCrtcType = CreateNewResourceType (RRCrtcDestroyResource); if (!RRCrtcType) return FALSE; -#ifdef XResExtension - RegisterResourceName (RRCrtcType, "CRTC"); -#endif + RegisterResourceName (RRCrtcType, "CRTC"); return TRUE; } diff --git a/randr/rrmode.c b/randr/rrmode.c index 11175810c..d7cc916ea 100644 --- a/randr/rrmode.c +++ b/randr/rrmode.c @@ -266,9 +266,7 @@ RRModeInit (void) RRModeType = CreateNewResourceType (RRModeDestroyResource); if (!RRModeType) return FALSE; -#ifdef XResExtension RegisterResourceName (RRModeType, "MODE"); -#endif return TRUE; } diff --git a/randr/rroutput.c b/randr/rroutput.c index c1e971ddc..fea87978f 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -420,9 +420,7 @@ RROutputInit (void) RROutputType = CreateNewResourceType (RROutputDestroyResource); if (!RROutputType) return FALSE; -#ifdef XResExtension - RegisterResourceName (RROutputType, "OUTPUT"); -#endif + RegisterResourceName (RROutputType, "OUTPUT"); return TRUE; } diff --git a/render/picture.c b/render/picture.c index 184edb48b..dd4221f1a 100644 --- a/render/picture.c +++ b/render/picture.c @@ -584,11 +584,9 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) if (!GlyphSetType) return FALSE; PictureGeneration = serverGeneration; -#ifdef XResExtension RegisterResourceName (PictureType, "PICTURE"); RegisterResourceName (PictFormatType, "PICTFORMAT"); RegisterResourceName (GlyphSetType, "GLYPHSET"); -#endif } if (!formats) { From 526f40434c86548830c4f72940462b6253fe9790 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 12 Oct 2007 18:18:00 -0400 Subject: [PATCH 127/552] NULL is not a valid argument to CreatePicture, please use serverClient as the client argument if no real client is creating the object. --- hw/xgl/xglscreen.c | 3 ++- render/mirect.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xgl/xglscreen.c b/hw/xgl/xglscreen.c index 9b7297b91..6bd91b72a 100644 --- a/hw/xgl/xglscreen.c +++ b/hw/xgl/xglscreen.c @@ -463,7 +463,8 @@ xglCreateSolidAlphaPicture (ScreenPtr pScreen) tmpval[0] = xTrue; pScreenPriv->pSolidAlpha = CreatePicture (0, &pPixmap->drawable, pFormat, - CPRepeat, tmpval, 0, &error); + CPRepeat, tmpval, + serverClient, &error); (*pScreen->DestroyPixmap) (pPixmap); if (pScreenPriv->pSolidAlpha) diff --git a/render/mirect.c b/render/mirect.c index 87767a76c..fa9dab80b 100644 --- a/render/mirect.c +++ b/render/mirect.c @@ -158,7 +158,7 @@ miCompositeRects (CARD8 op, tmpval[0] = xTrue; pSrc = CreatePicture (0, &pPixmap->drawable, rgbaFormat, - CPRepeat, tmpval, 0, &error); + CPRepeat, tmpval, serverClient, &error); if (!pSrc) goto bail4; From 5277a6ff589b5ddb475b90e1aaf5dbd9172d9711 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 13:38:35 -0400 Subject: [PATCH 128/552] registry: Register Input extension protocol names. --- Xi/extinit.c | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/Xi/extinit.c b/Xi/extinit.c index 1a435edad..bf5ebd221 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -69,6 +69,7 @@ SOFTWARE. #include "extinit.h" #include "exglobals.h" #include "swaprep.h" +#include "registry.h" /* modules local to Xi */ #include "allowev.h" @@ -936,6 +937,7 @@ XInputExtensionInit(void) AllExtensionVersions[IReqCode - 128] = thisversion; MakeDeviceTypeAtoms(); RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone); + RegisterResourceName(RT_INPUTCLIENT, "INPUTCLIENT"); FixExtensionEvents(extEntry); ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch; EventSwapVector[DeviceValuator] = SEventIDispatch; @@ -957,4 +959,119 @@ XInputExtensionInit(void) } else { FatalError("IExtensionInit: AddExtensions failed\n"); } + + RegisterRequestName(IReqCode, X_GetExtensionVersion, + INAME ":GetExtensionVersion"); + RegisterRequestName(IReqCode, X_ListInputDevices, + INAME ":ListInputDevices"); + RegisterRequestName(IReqCode, X_OpenDevice, + INAME ":OpenDevice"); + RegisterRequestName(IReqCode, X_CloseDevice, + INAME ":CloseDevice"); + RegisterRequestName(IReqCode, X_SetDeviceMode, + INAME ":SetDeviceMode"); + RegisterRequestName(IReqCode, X_SelectExtensionEvent, + INAME ":SelectExtensionEvent"); + RegisterRequestName(IReqCode, X_GetSelectedExtensionEvents, + INAME ":GetSelectedExtensionEvents"); + RegisterRequestName(IReqCode, X_ChangeDeviceDontPropagateList, + INAME ":ChangeDeviceDontPropagateList"); + RegisterRequestName(IReqCode, X_GetDeviceDontPropagateList, + INAME ":GetDeviceDontPropagageList"); + RegisterRequestName(IReqCode, X_GetDeviceMotionEvents, + INAME ":GetDeviceMotionEvents"); + RegisterRequestName(IReqCode, X_ChangeKeyboardDevice, + INAME ":ChangeKeyboardDevice"); + RegisterRequestName(IReqCode, X_ChangePointerDevice, + INAME ":ChangePointerDevice"); + RegisterRequestName(IReqCode, X_GrabDevice, + INAME ":GrabDevice"); + RegisterRequestName(IReqCode, X_UngrabDevice, + INAME ":UngrabDevice"); + RegisterRequestName(IReqCode, X_GrabDeviceKey, + INAME ":GrabDeviceKey"); + RegisterRequestName(IReqCode, X_UngrabDeviceKey, + INAME ":UngrabDeviceKey"); + RegisterRequestName(IReqCode, X_GrabDeviceButton, + INAME ":GrabDeviceButton"); + RegisterRequestName(IReqCode, X_UngrabDeviceButton, + INAME ":UngrabDeviceButton"); + RegisterRequestName(IReqCode, X_AllowDeviceEvents, + INAME ":AllowDeviceEvents"); + RegisterRequestName(IReqCode, X_GetDeviceFocus, + INAME ":GetDeviceFocus"); + RegisterRequestName(IReqCode, X_SetDeviceFocus, + INAME ":SetDeviceFocus"); + RegisterRequestName(IReqCode, X_GetFeedbackControl, + INAME ":GetFeedbackControl"); + RegisterRequestName(IReqCode, X_ChangeFeedbackControl, + INAME ":ChangeFeedbackControl"); + RegisterRequestName(IReqCode, X_GetDeviceKeyMapping, + INAME ":GetDeviceKeyMapping"); + RegisterRequestName(IReqCode, X_ChangeDeviceKeyMapping, + INAME ":ChangeDeviceKeyMapping"); + RegisterRequestName(IReqCode, X_GetDeviceModifierMapping, + INAME ":GetDeviceModifierMapping"); + RegisterRequestName(IReqCode, X_SetDeviceModifierMapping, + INAME ":SetDeviceModifierMapping"); + RegisterRequestName(IReqCode, X_GetDeviceButtonMapping, + INAME ":GetDeviceButtonMapping"); + RegisterRequestName(IReqCode, X_SetDeviceButtonMapping, + INAME ":SetDeviceButtonMapping"); + RegisterRequestName(IReqCode, X_QueryDeviceState, + INAME ":QueryDeviceState"); + RegisterRequestName(IReqCode, X_SendExtensionEvent, + INAME ":SendExtensionEvent"); + RegisterRequestName(IReqCode, X_DeviceBell, + INAME ":DeviceBell"); + RegisterRequestName(IReqCode, X_SetDeviceValuators, + INAME ":SetDeviceValuators"); + RegisterRequestName(IReqCode, X_GetDeviceControl, + INAME ":GetDeviceControl"); + RegisterRequestName(IReqCode, X_ChangeDeviceControl, + INAME ":ChangeDeviceControl"); + + RegisterEventName(extEntry->eventBase + XI_DeviceValuator, + INAME ":DeviceValuator"); + RegisterEventName(extEntry->eventBase + XI_DeviceKeyPress, + INAME ":DeviceKeyPress"); + RegisterEventName(extEntry->eventBase + XI_DeviceKeyRelease, + INAME ":DeviceKeyRelease"); + RegisterEventName(extEntry->eventBase + XI_DeviceButtonPress, + INAME ":DeviceButtonPress"); + RegisterEventName(extEntry->eventBase + XI_DeviceButtonRelease, + INAME ":DeviceButtonRelease"); + RegisterEventName(extEntry->eventBase + XI_DeviceMotionNotify, + INAME ":DeviceMotionNotify"); + RegisterEventName(extEntry->eventBase + XI_DeviceFocusIn, + INAME ":DeviceFocusIn"); + RegisterEventName(extEntry->eventBase + XI_DeviceFocusOut, + INAME ":DeviceFocusOut"); + RegisterEventName(extEntry->eventBase + XI_ProximityIn, + INAME ":ProximityIn"); + RegisterEventName(extEntry->eventBase + XI_ProximityOut, + INAME ":ProximityOut"); + RegisterEventName(extEntry->eventBase + XI_DeviceStateNotify, + INAME ":DeviceStateNotify"); + RegisterEventName(extEntry->eventBase + XI_DeviceMappingNotify, + INAME ":DeviceMappingNotify"); + RegisterEventName(extEntry->eventBase + XI_ChangeDeviceNotify, + INAME ":ChangeDeviceNotify"); + RegisterEventName(extEntry->eventBase + XI_DeviceKeystateNotify, + INAME ":DeviceKeystateNotify"); + RegisterEventName(extEntry->eventBase + XI_DeviceButtonstateNotify, + INAME ":DeviceButtonstateNotify"); + RegisterEventName(extEntry->eventBase + XI_DevicePresenceNotify, + INAME ":DevicePresenceNotify"); + + RegisterErrorName(extEntry->errorBase + XI_BadDevice, + INAME ":BadDevice"); + RegisterErrorName(extEntry->errorBase + XI_BadEvent, + INAME ":BadEvent"); + RegisterErrorName(extEntry->errorBase + XI_BadMode, + INAME ":BadMode"); + RegisterErrorName(extEntry->errorBase + XI_DeviceBusy, + INAME ":DeviceBusy"); + RegisterErrorName(extEntry->errorBase + XI_BadClass, + INAME ":BadClass"); } From a5cf3f21f712e46dbf9bca289e67be75f2b531d3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 14:27:32 -0400 Subject: [PATCH 129/552] registry: Register XKB extension protocol names. --- xkb/xkb.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/xkb/xkb.c b/xkb/xkb.c index 9efdfb6b5..63576c220 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -35,6 +35,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "misc.h" #include "inputstr.h" +#include "registry.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "extnsionst.h" @@ -6226,8 +6227,62 @@ XkbExtensionInit(void) XkbErrorBase = (unsigned char)extEntry->errorBase; XkbKeyboardErrorCode = XkbErrorBase+XkbKeyboard; RT_XKBCLIENT = CreateNewResourceType(XkbClientGone); - } - return; + } else + return; + + RegisterRequestName(XkbReqCode, X_kbUseExtension, + XkbName ":UseExtension"); + RegisterRequestName(XkbReqCode, X_kbSelectEvents, + XkbName ":SelectEvents"); + RegisterRequestName(XkbReqCode, X_kbBell, + XkbName ":Bell"); + RegisterRequestName(XkbReqCode, X_kbGetState, + XkbName ":GetState"); + RegisterRequestName(XkbReqCode, X_kbLatchLockState, + XkbName ":LatchLockState"); + RegisterRequestName(XkbReqCode, X_kbGetControls, + XkbName ":GetControls"); + RegisterRequestName(XkbReqCode, X_kbSetControls, + XkbName ":SetControls"); + RegisterRequestName(XkbReqCode, X_kbGetMap, + XkbName ":GetMap"); + RegisterRequestName(XkbReqCode, X_kbSetMap, + XkbName ":SetMap"); + RegisterRequestName(XkbReqCode, X_kbGetCompatMap, + XkbName ":GetCompatMap"); + RegisterRequestName(XkbReqCode, X_kbSetCompatMap, + XkbName ":SetCompatMap"); + RegisterRequestName(XkbReqCode, X_kbGetIndicatorState, + XkbName ":GetIndicatorState"); + RegisterRequestName(XkbReqCode, X_kbGetIndicatorMap, + XkbName ":GetIndicatorMap"); + RegisterRequestName(XkbReqCode, X_kbSetIndicatorMap, + XkbName ":SetIndicatorMap"); + RegisterRequestName(XkbReqCode, X_kbGetNamedIndicator, + XkbName ":GetNamedIndicator"); + RegisterRequestName(XkbReqCode, X_kbSetNamedIndicator, + XkbName ":SetNamedIndicator"); + RegisterRequestName(XkbReqCode, X_kbGetNames, + XkbName ":GetNames"); + RegisterRequestName(XkbReqCode, X_kbSetNames, + XkbName ":SetNames"); + RegisterRequestName(XkbReqCode, X_kbGetGeometry, + XkbName ":GetGeometry"); + RegisterRequestName(XkbReqCode, X_kbSetGeometry, + XkbName ":SetGeometry"); + RegisterRequestName(XkbReqCode, X_kbPerClientFlags, + XkbName ":PerClientFlags"); + RegisterRequestName(XkbReqCode, X_kbListComponents, + XkbName ":ListComponents"); + RegisterRequestName(XkbReqCode, X_kbGetKbdByName, + XkbName ":GetKbdByName"); + RegisterRequestName(XkbReqCode, X_kbGetDeviceInfo, + XkbName ":GetDeviceInfo"); + RegisterRequestName(XkbReqCode, X_kbSetDeviceInfo, + XkbName ":SetDeviceInfo"); + RegisterRequestName(XkbReqCode, X_kbSetDebuggingFlags, + XkbName ":SetDebuggingFlags"); + + RegisterEventName(extEntry->eventBase, XkbName ":EventCode"); + RegisterErrorName(extEntry->errorBase, XkbName ":Keyboard"); } - - From 166ef972febc00c665e1d5aeb68e75d7bbcf9879 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 15:22:02 -0400 Subject: [PATCH 130/552] registry: Register composite extension protocol names. --- composite/compext.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/composite/compext.c b/composite/compext.c index 2918556f8..98adabbaa 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -46,6 +46,7 @@ #include "compint.h" #include "xace.h" +#include "registry.h" #define SERVER_COMPOSITE_MAJOR 0 #define SERVER_COMPOSITE_MINOR 4 @@ -754,4 +755,23 @@ CompositeExtensionInit (void) /* Initialization succeeded */ noCompositeExtension = FALSE; + + RegisterRequestName(CompositeReqCode, X_CompositeQueryVersion, + COMPOSITE_NAME ":CompositeQueryVersion"); + RegisterRequestName(CompositeReqCode, X_CompositeRedirectWindow, + COMPOSITE_NAME ":CompositeRedirectWindow"); + RegisterRequestName(CompositeReqCode, X_CompositeRedirectSubwindows, + COMPOSITE_NAME ":CompositeRedirectSubwindows"); + RegisterRequestName(CompositeReqCode, X_CompositeUnredirectWindow, + COMPOSITE_NAME ":CompositeUnredirectWindow"); + RegisterRequestName(CompositeReqCode, X_CompositeUnredirectSubwindows, + COMPOSITE_NAME ":CompositeUnredirectSubwindows"); + RegisterRequestName(CompositeReqCode, X_CompositeCreateRegionFromBorderClip, + COMPOSITE_NAME ":CompositeCreateRegionFromBorderClip"); + RegisterRequestName(CompositeReqCode, X_CompositeNameWindowPixmap, + COMPOSITE_NAME ":CompositeNameWindowPixmap"); + RegisterRequestName(CompositeReqCode, X_CompositeGetOverlayWindow, + COMPOSITE_NAME ":CompositeGetOverlayWindow"); + RegisterRequestName(CompositeReqCode, X_CompositeReleaseOverlayWindow, + COMPOSITE_NAME ":CompositeReleaseOverlayWindow"); } From 32f3f5a1e7654f8bb43ea16b9227b3994e616739 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 15:32:17 -0400 Subject: [PATCH 131/552] registry: Register DMX extension protocol names. --- hw/dmx/dmx.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c index 24d1620b8..a4d6beb08 100644 --- a/hw/dmx/dmx.c +++ b/hw/dmx/dmx.c @@ -54,6 +54,7 @@ #define EXTENSION_PROC_ARGS void * #include "extnsionst.h" #include "opaque.h" +#include "registry.h" #include "dmxextension.h" #include @@ -126,6 +127,45 @@ void DMXExtensionInit(void) ProcDMXDispatch, SProcDMXDispatch, DMXResetProc, StandardMinorOpcode))) DMXCode = extEntry->base; + else + return; + + RegisterRequestName(DMXCode, X_DMXQueryVersion, + DMX_EXTENSION_NAME ":DMXQueryVersion"); + RegisterRequestName(DMXCode, X_DMXGetScreenCount, + DMX_EXTENSION_NAME ":DMXGetScreenCount"); + RegisterRequestName(DMXCode, X_DMXGetScreenInformationDEPRECATED, + DMX_EXTENSION_NAME ":DMXGetScreenInfoDEPRECATED"); + RegisterRequestName(DMXCode, X_DMXGetWindowAttributes, + DMX_EXTENSION_NAME ":DMXGetWindowAttributes"); + RegisterRequestName(DMXCode, X_DMXGetInputCount, + DMX_EXTENSION_NAME ":DMXGetInputCount"); + RegisterRequestName(DMXCode, X_DMXGetInputAttributes, + DMX_EXTENSION_NAME ":DMXGetInputAttributes"); + RegisterRequestName(DMXCode, X_DMXForceWindowCreationDEPRECATED, + DMX_EXTENSION_NAME ":DMXForceWindowCreationDEPRECATED"); + RegisterRequestName(DMXCode, X_DMXReconfigureScreenDEPRECATED, + DMX_EXTENSION_NAME ":DMXReconfigureScreenDEPRECATED"); + RegisterRequestName(DMXCode, X_DMXSync, + DMX_EXTENSION_NAME ":DMXSync"); + RegisterRequestName(DMXCode, X_DMXForceWindowCreation, + DMX_EXTENSION_NAME ":DMXForceWindowCreation"); + RegisterRequestName(DMXCode, X_DMXGetScreenAttributes, + DMX_EXTENSION_NAME ":DMXGetScreenAttributes"); + RegisterRequestName(DMXCode, X_DMXChangeScreensAttributes, + DMX_EXTENSION_NAME ":DMXChangeScreensAttributes"); + RegisterRequestName(DMXCode, X_DMXAddScreen, + DMX_EXTENSION_NAME ":DMXAddScreen"); + RegisterRequestName(DMXCode, X_DMXRemoveScreen, + DMX_EXTENSION_NAME ":DMXRemoveScreen"); + RegisterRequestName(DMXCode, X_DMXGetDesktopAttributes, + DMX_EXTENSION_NAME ":DMXGetDesktopAttributes"); + RegisterRequestName(DMXCode, X_DMXChangeDesktopAttributes, + DMX_EXTENSION_NAME ":DMXChangeDesktopAttributes"); + RegisterRequestName(DMXCode, X_DMXAddInput, + DMX_EXTENSION_NAME ":DMXAddInput"); + RegisterRequestName(DMXCode, X_DMXRemoveInput, + DMX_EXTENSION_NAME ":DMXRemoveInput"); } static void dmxSetScreenAttribute(int bit, DMXScreenAttributesPtr attr, From 3464b419230c6d17e940d967b567c5d2cb22d232 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 15:45:12 -0400 Subject: [PATCH 132/552] registry: Register APPLEDRI extension protocol names. --- hw/darwin/quartz/xpr/appledri.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c index 70b740077..d9690fdb1 100644 --- a/hw/darwin/quartz/xpr/appledri.c +++ b/hw/darwin/quartz/xpr/appledri.c @@ -53,6 +53,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "swaprep.h" #include "dri.h" #include "dristruct.h" +#include "registry.h" static int DRIErrorBase = 0; @@ -92,7 +93,33 @@ AppleDRIExtensionInit(void) DRIErrorBase = extEntry->errorBase; DRIEventBase = extEntry->eventBase; EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent; - } + } else + return; + + RegisterRequestName(DRIReqCode, X_AppleDRIQueryVersion, + APPLEDRINAME ":QueryVersion"); + RegisterRequestName(DRIReqCode, X_AppleDRIQueryDirectRenderingCapable, + APPLEDRINAME ":QueryDirectRenderingCapable"); + RegisterRequestName(DRIReqCode, X_AppleDRICreateSurface, + APPLEDRINAME ":CreateSurface"); + RegisterRequestName(DRIReqCode, X_AppleDRIDestroySurface, + APPLEDRINAME ":DestroySurface"); + RegisterRequestName(DRIReqCode, X_AppleDRIAuthConnection, + APPLEDRINAME ":AuthConnection"); + + RegisterEventName(DRIEventBase + AppleDRIObsoleteEvent1, + APPLEDRINAME ":ObsoleteEvent1"); + RegisterEventName(DRIEventBase + AppleDRIObsoleteEvent2, + APPLEDRINAME ":ObsoleteEvent2"); + RegisterEventName(DRIEventBase + AppleDRIObsoleteEvent3, + APPLEDRINAME ":ObsoleteEvent3"); + RegisterEventName(DRIEventBase + AppleDRISurfaceNotify, + APPLEDRINAME ":SurfaceNotify"); + + RegisterErrorName(DRIEventBase + AppleDRIClientNotLocal, + APPLEDRINAME ":ClientNotLocal"); + RegisterErrorName(DRIEventBase + AppleDRIOperationNotSupported, + APPLEDRINAME ":OperationNotSupported"); } /*ARGSUSED*/ From b9f5ab98c8dea36dcce1ad15fd2e059a77e77c39 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 16:18:37 -0400 Subject: [PATCH 133/552] registry: Register XINERAMA extension protocol names. --- Xext/panoramiX.c | 14 ++++++++++++++ hw/darwin/quartz/pseudoramiX.c | 14 ++++++++++++++ randr/rrxinerama.c | 26 +++++++++++++++++++++----- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 26c280990..1ba0c4dd2 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -53,6 +53,7 @@ Equipment Corporation. #include "globals.h" #include "servermd.h" #include "resource.h" +#include "registry.h" #ifdef RENDER #include "picturestr.h" #endif @@ -589,6 +590,19 @@ void PanoramiXExtensionInit(int argc, char *argv[]) #ifdef RENDER PanoramiXRenderInit (); #endif + + RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, + PANORAMIX_PROTOCOL_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_PanoramiXGetState, + PANORAMIX_PROTOCOL_NAME ":GetState"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, + PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, + PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); + RegisterRequestName(extEntry->base, X_XineramaIsActive, + PANORAMIX_PROTOCOL_NAME ":IsActive"); + RegisterRequestName(extEntry->base, X_XineramaQueryScreens, + PANORAMIX_PROTOCOL_NAME ":QueryScreens"); } extern Bool CreateConnectionBlock(void); diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index 787601b5d..cdd4fffff 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -42,6 +42,7 @@ Equipment Corporation. #include "window.h" #include #include "globals.h" +#include "registry.h" extern int noPseudoramiXExtension; extern int noPanoramiXExtension; @@ -147,6 +148,19 @@ void PseudoramiXExtensionInit(int argc, char *argv[]) PANORAMIX_PROTOCOL_NAME); return; } + + RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, + PANORAMIX_PROTOCOL_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_PanoramiXGetState, + PANORAMIX_PROTOCOL_NAME ":GetState"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, + PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, + PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); + RegisterRequestName(extEntry->base, X_XineramaIsActive, + PANORAMIX_PROTOCOL_NAME ":IsActive"); + RegisterRequestName(extEntry->base, X_XineramaQueryScreens, + PANORAMIX_PROTOCOL_NAME ":QueryScreens"); } diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c index 896f61fb5..c49980256 100644 --- a/randr/rrxinerama.c +++ b/randr/rrxinerama.c @@ -71,6 +71,7 @@ #include "randrstr.h" #include "swaprep.h" #include +#include "registry.h" #define RR_XINERAMA_MAJOR_VERSION 1 #define RR_XINERAMA_MINOR_VERSION 1 @@ -423,6 +424,8 @@ RRXineramaResetProc(ExtensionEntry* extEntry) void RRXineramaExtensionInit(void) { + ExtensionEntry *extEntry; + #ifdef PANORAMIX if(!noPanoramiXExtension) return; @@ -436,9 +439,22 @@ RRXineramaExtensionInit(void) if (screenInfo.numScreens > 1) return; - (void) AddExtension(PANORAMIX_PROTOCOL_NAME, 0,0, - ProcRRXineramaDispatch, - SProcRRXineramaDispatch, - RRXineramaResetProc, - StandardMinorOpcode); + extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, + ProcRRXineramaDispatch, + SProcRRXineramaDispatch, + RRXineramaResetProc, + StandardMinorOpcode); + + RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, + PANORAMIX_PROTOCOL_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_PanoramiXGetState, + PANORAMIX_PROTOCOL_NAME ":GetState"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, + PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); + RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, + PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); + RegisterRequestName(extEntry->base, X_XineramaIsActive, + PANORAMIX_PROTOCOL_NAME ":IsActive"); + RegisterRequestName(extEntry->base, X_XineramaQueryScreens, + PANORAMIX_PROTOCOL_NAME ":QueryScreens"); } From eee46b4681ec55297604b0425705f2b18381f7ca Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 17:06:22 -0400 Subject: [PATCH 134/552] registry: Register APPLEWM extension protocol names. --- hw/darwin/quartz/applewm.c | 41 +++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index d3c26ed28..8b9f1ee81 100644 --- a/hw/darwin/quartz/applewm.c +++ b/hw/darwin/quartz/applewm.c @@ -42,6 +42,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "servermd.h" #include "swaprep.h" #include "propertyst.h" +#include "registry.h" #include #include "darwin.h" #define _APPLEWM_SERVER_ @@ -127,7 +128,45 @@ AppleWMExtensionInit( WMEventBase = extEntry->eventBase; EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; appleWMProcs = procsPtr; - } + } else + return; + + RegisterRequestName(WMReqCode, X_AppleWMQueryVersion, + APPLEWMNAME ":QueryVersion"); + RegisterRequestName(WMReqCode, X_AppleWMFrameGetRect, + APPLEWMNAME ":FrameGetRect"); + RegisterRequestName(WMReqCode, X_AppleWMFrameHitTest, + APPLEWMNAME ":FrameHitTest"); + RegisterRequestName(WMReqCode, X_AppleWMFrameDraw, + APPLEWMNAME ":FrameDraw"); + RegisterRequestName(WMReqCode, X_AppleWMDisableUpdate, + APPLEWMNAME ":DisableUpdate"); + RegisterRequestName(WMReqCode, X_AppleWMReenableUpdate, + APPLEWMNAME ":ReenableUpdate"); + RegisterRequestName(WMReqCode, X_AppleWMSelectInput, + APPLEWMNAME ":SelectInput"); + RegisterRequestName(WMReqCode, X_AppleWMSetWindowMenuCheck, + APPLEWMNAME ":SetWindowMenuCheck"); + RegisterRequestName(WMReqCode, X_AppleWMSetFrontProcess, + APPLEWMNAME ":SetFrontProcess"); + RegisterRequestName(WMReqCode, X_AppleWMSetWindowLevel, + APPLEWMNAME ":SetWindowLevel"); + RegisterRequestName(WMReqCode, X_AppleWMSetCanQuit, + APPLEWMNAME ":SetCanQuit"); + RegisterRequestName(WMReqCode, X_AppleWMSetWindowMenu, + APPLEWMNAME ":SetWindowMenu"); + + RegisterEventName(WMEventBase + AppleWMControllerNotify, + APPLEWMNAME ":ControllerNotify"); + RegisterEventName(WMEventBase + AppleWMActivationNotify, + APPLEWMNAME ":ActivationNotify"); + RegisterEventName(WMEventBase + AppleWMPasteboardNotify, + APPLEWMNAME ":PasteboardNotify"); + + RegisterErrorName(WMErrorBase + AppleWMClientNotLocal, + APPLEWMNAME ":ClientNotLocal"); + RegisterErrorName(WMErrorBase + AppleWMOperationNotSupported, + APPLEWMNAME ":OperationNotSupported"); } /*ARGSUSED*/ From b7786724080fd3928ef7b8c294346661d7ffd90b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 17:15:34 -0400 Subject: [PATCH 135/552] registry: Register XF86DRI extension protocol names. --- hw/xfree86/dri/xf86dri.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c index fdf0e9983..c658421e8 100644 --- a/hw/xfree86/dri/xf86dri.c +++ b/hw/xfree86/dri/xf86dri.c @@ -53,6 +53,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" +#include "registry.h" #define _XF86DRI_SERVER_ #include "xf86dristr.h" #include "swaprep.h" @@ -112,7 +113,42 @@ XFree86DRIExtensionInit(void) StandardMinorOpcode))) { DRIReqCode = (unsigned char)extEntry->base; DRIErrorBase = extEntry->errorBase; - } + } else + return; + + RegisterRequestName(DRIReqCode, X_XF86DRIQueryVersion, + XF86DRINAME ":QueryVersion"); + RegisterRequestName(DRIReqCode, X_XF86DRIQueryDirectRenderingCapable, + XF86DRINAME ":QueryDirectRenderingCapable"); + RegisterRequestName(DRIReqCode, X_XF86DRIOpenConnection, + XF86DRINAME ":OpenConnection"); + RegisterRequestName(DRIReqCode, X_XF86DRICloseConnection, + XF86DRINAME ":CloseConnection"); + RegisterRequestName(DRIReqCode, X_XF86DRIGetClientDriverName, + XF86DRINAME ":GetClientDriverName"); + RegisterRequestName(DRIReqCode, X_XF86DRICreateContext, + XF86DRINAME ":CreateContext"); + RegisterRequestName(DRIReqCode, X_XF86DRIDestroyContext, + XF86DRINAME ":DestroyContext"); + RegisterRequestName(DRIReqCode, X_XF86DRICreateDrawable, + XF86DRINAME ":CreateDrawable"); + RegisterRequestName(DRIReqCode, X_XF86DRIDestroyDrawable, + XF86DRINAME ":DestroyDrawable"); + RegisterRequestName(DRIReqCode, X_XF86DRIGetDrawableInfo, + XF86DRINAME ":GetDrawableInfo"); + RegisterRequestName(DRIReqCode, X_XF86DRIGetDeviceInfo, + XF86DRINAME ":GetDeviceInfo"); + RegisterRequestName(DRIReqCode, X_XF86DRIAuthConnection, + XF86DRINAME ":AuthConnection"); + RegisterRequestName(DRIReqCode, X_XF86DRIOpenFullScreen, + XF86DRINAME ":OpenFullScreen"); + RegisterRequestName(DRIReqCode, X_XF86DRICloseFullScreen, + XF86DRINAME ":CloseFullScreen"); + + RegisterErrorName(DRIErrorBase + XF86DRIClientNotLocal, + XF86DRINAME ":ClientNotLocal"); + RegisterErrorName(DRIErrorBase + XF86DRIOperationNotSupported, + XF86DRINAME ":OperationNotSupported"); } /*ARGSUSED*/ From 960677e876c068400fb45e1764bb5470cd8c389f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 17:30:00 -0400 Subject: [PATCH 136/552] registry: Register XF86VidMode extension protocol names. --- hw/xfree86/dixmods/extmod/xf86vmode.c | 67 ++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c index fa3284839..2ad681c90 100644 --- a/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -43,6 +43,7 @@ from Kaleb S. KEITHLEY #include "extnsionst.h" #include "scrnintstr.h" #include "servermd.h" +#include "registry.h" #define _XF86VIDMODE_SERVER_ #include #include "swaprep.h" @@ -209,7 +210,71 @@ XFree86VidModeExtensionInit(void) XF86VidModeEventBase = extEntry->eventBase; EventSwapVector[XF86VidModeEventBase] = (EventSwapPtr)SXF86VidModeNotifyEvent; #endif - } + } else + return; + + RegisterRequestName(extEntry->base, X_XF86VidModeQueryVersion, + XF86VIDMODENAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetModeLine, + XF86VIDMODENAME ":GetModeLine"); + RegisterRequestName(extEntry->base, X_XF86VidModeModModeLine, + XF86VIDMODENAME ":ModModeLine"); + RegisterRequestName(extEntry->base, X_XF86VidModeSwitchMode, + XF86VIDMODENAME ":SwitchMode"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetMonitor, + XF86VIDMODENAME ":GetMonitor"); + RegisterRequestName(extEntry->base, X_XF86VidModeLockModeSwitch, + XF86VIDMODENAME ":LockModeSwitch"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetAllModeLines, + XF86VIDMODENAME ":GetAllModeLines"); + RegisterRequestName(extEntry->base, X_XF86VidModeAddModeLine, + XF86VIDMODENAME ":AddModeLine"); + RegisterRequestName(extEntry->base, X_XF86VidModeDeleteModeLine, + XF86VIDMODENAME ":DeleteModeLine"); + RegisterRequestName(extEntry->base, X_XF86VidModeValidateModeLine, + XF86VIDMODENAME ":ValidateModeLine"); + RegisterRequestName(extEntry->base, X_XF86VidModeSwitchToMode, + XF86VIDMODENAME ":SwitchToMode"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetViewPort, + XF86VIDMODENAME ":GetViewPort"); + RegisterRequestName(extEntry->base, X_XF86VidModeSetViewPort, + XF86VIDMODENAME ":SetViewPort"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetDotClocks, + XF86VIDMODENAME ":GetDotClocks"); + RegisterRequestName(extEntry->base, X_XF86VidModeSetClientVersion, + XF86VIDMODENAME ":SetClientVersion"); + RegisterRequestName(extEntry->base, X_XF86VidModeSetGamma, + XF86VIDMODENAME ":SetGamma"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetGamma, + XF86VIDMODENAME ":GetGamma"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetGammaRamp, + XF86VIDMODENAME ":GetGammaRamp"); + RegisterRequestName(extEntry->base, X_XF86VidModeSetGammaRamp, + XF86VIDMODENAME ":SetGammaRamp"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetGammaRampSize, + XF86VIDMODENAME ":GetGammaRampSize"); + RegisterRequestName(extEntry->base, X_XF86VidModeGetPermissions, + XF86VIDMODENAME ":GetPermissions"); + +#ifdef XF86VIDMODE_EVENTS + RegisterEventName(extEntry->eventBase + XF86VidModeNotify, + XF86VIDMODENAME ":Notify"); +#endif + + RegisterErrorName(extEntry->errorBase + XF86VidModeBadClock, + XF86VIDMODENAME ":BadClock"); + RegisterErrorName(extEntry->errorBase + XF86VidModeBadHTimings, + XF86VIDMODENAME ":BadHTimings"); + RegisterErrorName(extEntry->errorBase + XF86VidModeBadVTimings, + XF86VIDMODENAME ":BadVTimings"); + RegisterErrorName(extEntry->errorBase + XF86VidModeModeUnsuitable, + XF86VIDMODENAME ":ModeUnsuitable"); + RegisterErrorName(extEntry->errorBase + XF86VidModeExtensionDisabled, + XF86VIDMODENAME ":ExtensionDisabled"); + RegisterErrorName(extEntry->errorBase + XF86VidModeClientNotLocal, + XF86VIDMODENAME ":ClientNotLocal"); + RegisterErrorName(extEntry->errorBase + XF86VidModeZoomLocked, + XF86VIDMODENAME ":ZoomLocked"); } /*ARGSUSED*/ From 2cd1b32b77e0ceeaccb3f01c4ac13a97c557668c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 17:37:58 -0400 Subject: [PATCH 137/552] registry: Register XF86Misc extension protocol names. --- hw/xfree86/dixmods/extmod/xf86misc.c | 46 +++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c index 66278a298..274b1d3f1 100644 --- a/hw/xfree86/dixmods/extmod/xf86misc.c +++ b/hw/xfree86/dixmods/extmod/xf86misc.c @@ -19,6 +19,7 @@ #include "scrnintstr.h" #include "inputstr.h" #include "servermd.h" +#include "registry.h" #define _XF86MISC_SERVER_ #undef _XF86MISC_SAVER_COMPAT_ #include @@ -137,7 +138,50 @@ XFree86MiscExtensionInit(void) XF86MiscReqCode = (unsigned char)extEntry->base; #endif miscErrorBase = extEntry->errorBase; - } + } else + return; + + RegisterRequestName(extEntry->base, X_XF86MiscQueryVersion, + XF86MISCNAME ":QueryVersion"); +#ifdef _XF86MISC_SAVER_COMPAT_ + RegisterRequestName(extEntry->base, X_XF86MiscGetSaver, + XF86MISCNAME ":GetSaver"); + RegisterRequestName(extEntry->base, X_XF86MiscSetSaver, + XF86MISCNAME ":SetSaver"); +#endif + RegisterRequestName(extEntry->base, X_XF86MiscGetMouseSettings, + XF86MISCNAME ":GetMouseSettings"); + RegisterRequestName(extEntry->base, X_XF86MiscGetKbdSettings, + XF86MISCNAME ":GetKbdSettings"); + RegisterRequestName(extEntry->base, X_XF86MiscSetMouseSettings, + XF86MISCNAME ":SetMouseSettings"); + RegisterRequestName(extEntry->base, X_XF86MiscSetKbdSettings, + XF86MISCNAME ":SetKbdSettings"); + RegisterRequestName(extEntry->base, X_XF86MiscSetGrabKeysState, + XF86MISCNAME ":SetGrabKeysState"); + RegisterRequestName(extEntry->base, X_XF86MiscSetClientVersion, + XF86MISCNAME ":SetClientVersion"); + RegisterRequestName(extEntry->base, X_XF86MiscGetFilePaths, + XF86MISCNAME ":GetFilePaths"); + RegisterRequestName(extEntry->base, X_XF86MiscPassMessage, + XF86MISCNAME ":PassMessage"); + + RegisterErrorName(extEntry->errorBase + XF86MiscBadMouseProtocol, + XF86MISCNAME ":BadMouseProtocol"); + RegisterErrorName(extEntry->errorBase + XF86MiscBadMouseBaudRate, + XF86MISCNAME ":BadMouseBaudRate"); + RegisterErrorName(extEntry->errorBase + XF86MiscBadMouseFlags, + XF86MISCNAME ":BadMouseFlags"); + RegisterErrorName(extEntry->errorBase + XF86MiscBadMouseCombo, + XF86MISCNAME ":BadMouseCombo"); + RegisterErrorName(extEntry->errorBase + XF86MiscBadKbdType, + XF86MISCNAME ":BadKbdType"); + RegisterErrorName(extEntry->errorBase + XF86MiscModInDevDisabled, + XF86MISCNAME ":ModInDevDisabled"); + RegisterErrorName(extEntry->errorBase + XF86MiscModInDevClientNotLocal, + XF86MISCNAME ":ModInDevClientNotLocal"); + RegisterErrorName(extEntry->errorBase + XF86MiscNoModule, + XF86MISCNAME ":NoModule"); } /*ARGSUSED*/ From 3815284e899b61731b6a63c4ba14c5d773e24eb6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 17:57:59 -0400 Subject: [PATCH 138/552] registry: Register XF86DGA extension protocol names. --- hw/xfree86/dixmods/extmod/xf86dga2.c | 68 +++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c index 295e05e9e..3b866c798 100644 --- a/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -22,6 +22,7 @@ #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" +#include "registry.h" #define _XF86DGA_SERVER_ #include #include @@ -99,7 +100,72 @@ XFree86DGAExtensionInit(INITARGS) DGAEventBase = extEntry->eventBase; for (i = KeyPress; i <= MotionNotify; i++) SetCriticalEvent (DGAEventBase + i); - } + } else + return; + + RegisterRequestName(DGAReqCode, X_XF86DGAQueryVersion, + XF86DGANAME ":QueryVersion"); + RegisterRequestName(DGAReqCode, X_XF86DGAGetVideoLL, + XF86DGANAME ":GetVideoLL"); + RegisterRequestName(DGAReqCode, X_XF86DGADirectVideo, + XF86DGANAME ":DirectVideo"); + RegisterRequestName(DGAReqCode, X_XF86DGAGetViewPortSize, + XF86DGANAME ":GetViewPortSize"); + RegisterRequestName(DGAReqCode, X_XF86DGASetViewPort, + XF86DGANAME ":SetViewPort"); + RegisterRequestName(DGAReqCode, X_XF86DGAGetVidPage, + XF86DGANAME ":GetVidPage"); + RegisterRequestName(DGAReqCode, X_XF86DGASetVidPage, + XF86DGANAME ":SetVidPage"); + RegisterRequestName(DGAReqCode, X_XF86DGAInstallColormap, + XF86DGANAME ":InstallColormap"); + RegisterRequestName(DGAReqCode, X_XF86DGAQueryDirectVideo, + XF86DGANAME ":QueryDirectVideo"); + RegisterRequestName(DGAReqCode, X_XF86DGAViewPortChanged, + XF86DGANAME ":ViewPortChanged"); + RegisterRequestName(DGAReqCode, X_XDGAQueryModes, + XF86DGANAME ":QueryModes"); + RegisterRequestName(DGAReqCode, X_XDGASetMode, + XF86DGANAME ":SetMode"); + RegisterRequestName(DGAReqCode, X_XDGASetViewport, + XF86DGANAME ":SetViewport"); + RegisterRequestName(DGAReqCode, X_XDGAInstallColormap, + XF86DGANAME ":InstallColormap"); + RegisterRequestName(DGAReqCode, X_XDGASelectInput, + XF86DGANAME ":SelectInput"); + RegisterRequestName(DGAReqCode, X_XDGAFillRectangle, + XF86DGANAME ":FillRectangle"); + RegisterRequestName(DGAReqCode, X_XDGACopyArea, + XF86DGANAME ":CopyArea"); + RegisterRequestName(DGAReqCode, X_XDGACopyTransparentArea, + XF86DGANAME ":CopyTransparentArea"); + RegisterRequestName(DGAReqCode, X_XDGAGetViewportStatus, + XF86DGANAME ":GetViewportStatus"); + RegisterRequestName(DGAReqCode, X_XDGASync, + XF86DGANAME ":Sync"); + RegisterRequestName(DGAReqCode, X_XDGAOpenFramebuffer, + XF86DGANAME ":OpenFramebuffer"); + RegisterRequestName(DGAReqCode, X_XDGACloseFramebuffer, + XF86DGANAME ":CloseFramebuffer"); + RegisterRequestName(DGAReqCode, X_XDGASetClientVersion, + XF86DGANAME ":SetClientVersion"); + RegisterRequestName(DGAReqCode, X_XDGAChangePixmapMode, + XF86DGANAME ":ChangePixmapMode"); + RegisterRequestName(DGAReqCode, X_XDGACreateColormap, + XF86DGANAME ":CreateColormap"); + + /* 7 Events: Don't know where they are defined. EFW */ + + RegisterErrorName(extEntry->errorBase + XF86DGAClientNotLocal, + XF86DGANAME ":ClientNotLocal"); + RegisterErrorName(extEntry->errorBase + XF86DGANoDirectVideoMode, + XF86DGANAME ":NoDirectVideoMode"); + RegisterErrorName(extEntry->errorBase + XF86DGAScreenNotActive, + XF86DGANAME ":ScreenNotActive"); + RegisterErrorName(extEntry->errorBase + XF86DGADirectNotActivated, + XF86DGANAME ":DirectNotActivated"); + RegisterErrorName(extEntry->errorBase + XF86DGAOperationNotSupported, + XF86DGANAME ":OperationNotSupported"); } From 4c3285c883cc50a91bc5262bbc9d073d816f860a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 18:04:47 -0400 Subject: [PATCH 139/552] registry: Register WINDOWSWM extension protocol names. --- hw/xwin/winwindowswm.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index e1994de84..1356465d9 100755 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -41,6 +41,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "scrnintstr.h" #include "servermd.h" #include "swaprep.h" +#include "registry.h" #define _WINDOWSWM_SERVER_ #include "windowswmstr.h" @@ -105,7 +106,35 @@ winWindowsWMExtensionInit () WMErrorBase = extEntry->errorBase; WMEventBase = extEntry->eventBase; EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; - } + } else + return; + + RegisterRequestName(WMReqCode, X_WindowsWMQueryVersion, + WINDOWSWMNAME ":QueryVersion"); + RegisterRequestName(WMReqCode, X_WindowsWMFrameGetRect, + WINDOWSWMNAME ":FrameGetRect"); + RegisterRequestName(WMReqCode, X_WindowsWMFrameDraw, + WINDOWSWMNAME ":FrameDraw"); + RegisterRequestName(WMReqCode, X_WindowsWMFrameSetTitle, + WINDOWSWMNAME ":FrameSetTitle"); + RegisterRequestName(WMReqCode, X_WindowsWMDisableUpdate, + WINDOWSWMNAME ":DisableUpdate"); + RegisterRequestName(WMReqCode, X_WindowsWMReenableUpdate, + WINDOWSWMNAME ":ReenableUpdate"); + RegisterRequestName(WMReqCode, X_WindowsWMSelectInput, + WINDOWSWMNAME ":SelectInput"); + RegisterRequestName(WMReqCode, X_WindowsWMSetFrontProcess, + WINDOWSWMNAME ":SetFrontProcess"); + + RegisterEventName(WMEventBase + WindowsWMControllerNotify, + WINDOWSWMNAME ":ControllerNotify"); + RegisterEventName(WMEventBase + WindowsWMActivationNotify, + WINDOWSWMNAME ":ActivationNotify"); + + RegisterErrorName(WMErrorBase + WindowsWMClientNotLocal, + WINDOWSWMNAME ":ClientNotLocal"); + RegisterErrorName(WMErrorBase + WindowsWMOperationNotSupported, + WINDOWSWMNAME ":OperationNotSupported"); } /*ARGSUSED*/ From 2e1e5be1d9067816525aa13a1d818e8ca6899599 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 18:18:57 -0400 Subject: [PATCH 140/552] registry: Register DBE extension protocol names. --- dbe/dbe.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dbe/dbe.c b/dbe/dbe.c index 8175a352f..a872544e7 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -51,6 +51,7 @@ #include "extnsionst.h" #include "gcstruct.h" #include "dixstruct.h" +#include "registry.h" #define NEED_DBE_PROTOCOL #include "dbestruct.h" #include "midbe.h" @@ -1747,5 +1748,25 @@ DbeExtensionInit(void) dbeErrorBase = extEntry->errorBase; + RegisterRequestName(extEntry->base, X_DbeGetVersion, + DBE_PROTOCOL_NAME ":GetVersion"); + RegisterRequestName(extEntry->base, X_DbeAllocateBackBufferName, + DBE_PROTOCOL_NAME ":AllocateBackBufferName"); + RegisterRequestName(extEntry->base, X_DbeDeallocateBackBufferName, + DBE_PROTOCOL_NAME ":DeallocateBackBufferName"); + RegisterRequestName(extEntry->base, X_DbeSwapBuffers, + DBE_PROTOCOL_NAME ":SwapBuffers"); + RegisterRequestName(extEntry->base, X_DbeBeginIdiom, + DBE_PROTOCOL_NAME ":BeginIdiom"); + RegisterRequestName(extEntry->base, X_DbeEndIdiom, + DBE_PROTOCOL_NAME ":EndIdiom"); + RegisterRequestName(extEntry->base, X_DbeGetVisualInfo, + DBE_PROTOCOL_NAME ":GetVisualInfo"); + RegisterRequestName(extEntry->base, X_DbeGetBackBufferAttributes, + DBE_PROTOCOL_NAME ":GetBackBufferAttributes"); + + RegisterErrorName(dbeErrorBase + DbeBadBuffer, + DBE_PROTOCOL_NAME ":BadBuffer"); + } /* DbeExtensionInit() */ From ea09c9acc8f0d5577f54c864ff88b7f03d93b2f4 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 18:25:12 -0400 Subject: [PATCH 141/552] registry: Register Record extension protocol names. --- record/record.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/record/record.c b/record/record.c index 2e65e677b..5772baf46 100644 --- a/record/record.c +++ b/record/record.c @@ -43,6 +43,7 @@ and Jim Haggerty of Metheus. #include #include "set.h" #include "swaprep.h" +#include "registry.h" #include #include @@ -2965,5 +2966,24 @@ RecordExtensionInit(void) } RecordErrorBase = extentry->errorBase; + RegisterRequestName(extentry->base, X_RecordQueryVersion, + RECORD_NAME ":QueryVersion"); + RegisterRequestName(extentry->base, X_RecordCreateContext, + RECORD_NAME ":CreateContext"); + RegisterRequestName(extentry->base, X_RecordRegisterClients, + RECORD_NAME ":RegisterClients"); + RegisterRequestName(extentry->base, X_RecordUnregisterClients, + RECORD_NAME ":UnregisterClients"); + RegisterRequestName(extentry->base, X_RecordGetContext, + RECORD_NAME ":GetContext"); + RegisterRequestName(extentry->base, X_RecordEnableContext, + RECORD_NAME ":EnableContext"); + RegisterRequestName(extentry->base, X_RecordDisableContext, + RECORD_NAME ":DisableContext"); + RegisterRequestName(extentry->base, X_RecordFreeContext, + RECORD_NAME ":FreeContext"); + + RegisterErrorName(RecordErrorBase + XRecordBadContext, + RECORD_NAME ":BadContext"); } /* RecordExtensionInit */ From 106758893b68033f14f69c4ee6591fb6a149ba37 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 18:31:40 -0400 Subject: [PATCH 142/552] registry: Register XFixes extension protocol names. --- xfixes/xfixes.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c index 0db49895e..ccce7b9fd 100755 --- a/xfixes/xfixes.c +++ b/xfixes/xfixes.c @@ -45,6 +45,7 @@ #endif #include "xfixesint.h" +#include "registry.h" /* * Must use these instead of the constants from xfixeswire.h. They advertise @@ -257,5 +258,80 @@ XFixesExtensionInit(void) (EventSwapPtr) SXFixesSelectionNotifyEvent; EventSwapVector[XFixesEventBase + XFixesCursorNotify] = (EventSwapPtr) SXFixesCursorNotifyEvent; - } + } else + return; + + RegisterRequestName(XFixesReqCode, X_XFixesQueryVersion, + XFIXES_NAME ":QueryVersion"); + RegisterRequestName(XFixesReqCode, X_XFixesChangeSaveSet, + XFIXES_NAME ":ChangeSaveSet"); + RegisterRequestName(XFixesReqCode, X_XFixesSelectSelectionInput, + XFIXES_NAME ":SelectSelectionInput"); + RegisterRequestName(XFixesReqCode, X_XFixesSelectCursorInput, + XFIXES_NAME ":SelectCursorInput"); + RegisterRequestName(XFixesReqCode, X_XFixesGetCursorImage, + XFIXES_NAME ":GetCursorImage"); + /*************** Version 2 ******************/ + RegisterRequestName(XFixesReqCode, X_XFixesCreateRegion, + XFIXES_NAME ":CreateRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesCreateRegionFromBitmap, + XFIXES_NAME ":CreateRegionFromBitmap"); + RegisterRequestName(XFixesReqCode, X_XFixesCreateRegionFromWindow, + XFIXES_NAME ":CreateRegionFromWindow"); + RegisterRequestName(XFixesReqCode, X_XFixesCreateRegionFromGC, + XFIXES_NAME ":CreateRegionFromGC"); + RegisterRequestName(XFixesReqCode, X_XFixesCreateRegionFromPicture, + XFIXES_NAME ":CreateRegionFromPicture"); + RegisterRequestName(XFixesReqCode, X_XFixesDestroyRegion, + XFIXES_NAME ":DestroyRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesSetRegion, + XFIXES_NAME ":SetRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesCopyRegion, + XFIXES_NAME ":CopyRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesUnionRegion, + XFIXES_NAME ":UnionRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesIntersectRegion, + XFIXES_NAME ":IntersectRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesSubtractRegion, + XFIXES_NAME ":SubtractRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesInvertRegion, + XFIXES_NAME ":InvertRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesTranslateRegion, + XFIXES_NAME ":TranslateRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesRegionExtents, + XFIXES_NAME ":RegionExtents"); + RegisterRequestName(XFixesReqCode, X_XFixesFetchRegion, + XFIXES_NAME ":FetchRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesSetGCClipRegion, + XFIXES_NAME ":SetGCClipRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesSetWindowShapeRegion, + XFIXES_NAME ":SetWindowShapeRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesSetPictureClipRegion, + XFIXES_NAME ":SetPictureClipRegion"); + RegisterRequestName(XFixesReqCode, X_XFixesSetCursorName, + XFIXES_NAME ":SetCursorName"); + RegisterRequestName(XFixesReqCode, X_XFixesGetCursorName, + XFIXES_NAME ":GetCursorName"); + RegisterRequestName(XFixesReqCode, X_XFixesGetCursorImageAndName, + XFIXES_NAME ":GetCursorImageAndName"); + RegisterRequestName(XFixesReqCode, X_XFixesChangeCursor, + XFIXES_NAME ":ChangeCursor"); + RegisterRequestName(XFixesReqCode, X_XFixesChangeCursorByName, + XFIXES_NAME ":ChangeCursorByName"); + /*************** Version 3 ******************/ + RegisterRequestName(XFixesReqCode, X_XFixesExpandRegion, + XFIXES_NAME ":ExpandRegion"); + /*************** Version 4 ******************/ + RegisterRequestName(XFixesReqCode, X_XFixesHideCursor, + XFIXES_NAME ":HideCursor"); + RegisterRequestName(XFixesReqCode, X_XFixesShowCursor, + XFIXES_NAME ":ShowCursor"); + + RegisterEventName(XFixesEventBase + XFixesSelectionNotify, + XFIXES_NAME ":SelectionNotify"); + RegisterEventName(XFixesEventBase + XFixesCursorNotify, + XFIXES_NAME ":CursorNotify"); + + RegisterErrorName(XFixesErrorBase + BadRegion, + XFIXES_NAME ":BadRegion"); } From b38a91993364aa80cfd99721e319e1458d9fb760 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 18:50:06 -0400 Subject: [PATCH 143/552] registry: Register XTrap extension protocol names. --- XTrap/xtrapdi.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c index efad36f7a..734922ceb 100644 --- a/XTrap/xtrapdi.c +++ b/XTrap/xtrapdi.c @@ -62,6 +62,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "misc.h" /* Server swapping macros */ #include "dixstruct.h" /* Server ClientRec definitions */ #include "resource.h" /* Used with the MakeAtom call */ +#include "registry.h" #ifdef PC # include "scrintst.h" /* Screen struct */ # include "extnsist.h" @@ -463,6 +464,41 @@ void DEC_XTRAPInit() XETrap_avail.data.xtrap_revision); #endif + RegisterRequestName(extEntry->base, XETrap_Reset, + XTrapExtName ":Reset"); + RegisterRequestName(extEntry->base, XETrap_GetAvailable, + XTrapExtName ":GetAvailable"); + RegisterRequestName(extEntry->base, XETrap_Config, + XTrapExtName ":Config"); + RegisterRequestName(extEntry->base, XETrap_StartTrap, + XTrapExtName ":StartTrap"); + RegisterRequestName(extEntry->base, XETrap_StopTrap, + XTrapExtName ":StopTrap"); + RegisterRequestName(extEntry->base, XETrap_GetCurrent, + XTrapExtName ":GetCurrent"); + RegisterRequestName(extEntry->base, XETrap_GetStatistics, + XTrapExtName ":GetStatistics"); +#ifndef _XINPUT + RegisterRequestName(extEntry->base, XETrap_SimulateXEvent, + XTrapExtName ":SimulateXEvent"); +#endif + RegisterRequestName(extEntry->base, XETrap_GetVersion, + XTrapExtName ":GetVersion"); + RegisterRequestName(extEntry->base, XETrap_GetLastInpTime, + XTrapExtName ":GetLastInpTime"); + + RegisterEventName(extEntry->eventBase, XTrapExtName ":Event"); + + RegisterErrorName(extEntry->errorBase + BadIO, + XTrapExtName ":BadIO"); + RegisterErrorName(extEntry->errorBase + BadStatistics, + XTrapExtName ":BadStatistics"); + RegisterErrorName(extEntry->errorBase + BadDevices, + XTrapExtName ":BadDevices"); + RegisterErrorName(extEntry->errorBase + BadScreen, + XTrapExtName ":BadScreen"); + RegisterErrorName(extEntry->errorBase + BadSwapReq, + XTrapExtName ":BadSwapReq"); return; } From 20db50b4c44a14f7eeac2b1de17ada68482521da Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 18:56:59 -0400 Subject: [PATCH 144/552] registry: Register DAMAGE extension protocol names. --- damageext/damageext.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/damageext/damageext.c b/damageext/damageext.c index 517c72dac..ac2198b0b 100755 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -25,6 +25,7 @@ #endif #include "damageextint.h" +#include "registry.h" static unsigned char DamageReqCode; static int DamageEventBase; @@ -526,5 +527,23 @@ DamageExtensionInit(void) DamageErrorBase = extEntry->errorBase; EventSwapVector[DamageEventBase + XDamageNotify] = (EventSwapPtr) SDamageNotifyEvent; - } + } else + return; + + RegisterRequestName(DamageReqCode, X_DamageQueryVersion, + DAMAGE_NAME ":QueryVersion"); + RegisterRequestName(DamageReqCode, X_DamageCreate, + DAMAGE_NAME ":Create"); + RegisterRequestName(DamageReqCode, X_DamageDestroy, + DAMAGE_NAME ":Destroy"); + RegisterRequestName(DamageReqCode, X_DamageSubtract, + DAMAGE_NAME ":Subtract"); + RegisterRequestName(DamageReqCode, X_DamageAdd, + DAMAGE_NAME ":Add"); + + RegisterEventName(DamageEventBase + XDamageNotify, + DAMAGE_NAME ":Notify"); + + RegisterErrorName(extEntry->errorBase + BadDamage, + DAMAGE_NAME ":BadDamage"); } From c827db57e4d9ca14c82b099dcfc9b7a0c0b5ba0a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 19:06:01 -0400 Subject: [PATCH 145/552] registry: Register RANDR extension protocol names. --- randr/randr.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/randr/randr.c b/randr/randr.c index bc2b995d2..d5b9819f1 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -32,6 +32,7 @@ #endif #include "randrstr.h" +#include "registry.h" /* From render.h */ #ifndef SubPixelUnknown @@ -351,6 +352,73 @@ RRExtensionInit (void) #ifdef PANORAMIX RRXineramaExtensionInit(); #endif + + RegisterRequestName(extEntry->base, X_RRQueryVersion, + RANDR_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_RROldGetScreenInfo, + RANDR_NAME ":OldGetScreenInfo"); + RegisterRequestName(extEntry->base, X_RR1_0SetScreenConfig, + RANDR_NAME ":1_0SetScreenConfig"); + RegisterRequestName(extEntry->base, X_RRSetScreenConfig, + RANDR_NAME ":SetScreenConfig"); + RegisterRequestName(extEntry->base, X_RROldScreenChangeSelectInput, + RANDR_NAME ":OldScreenChangeSelectInput"); + RegisterRequestName(extEntry->base, X_RRSelectInput, + RANDR_NAME ":SelectInput"); + RegisterRequestName(extEntry->base, X_RRGetScreenInfo, + RANDR_NAME ":GetScreenInfo"); + /* V1.2 additions */ + RegisterRequestName(extEntry->base, X_RRGetScreenSizeRange, + RANDR_NAME ":GetScreenSizeRange"); + RegisterRequestName(extEntry->base, X_RRSetScreenSize, + RANDR_NAME ":SetScreenSize"); + RegisterRequestName(extEntry->base, X_RRGetScreenResources, + RANDR_NAME ":GetScreenResources"); + RegisterRequestName(extEntry->base, X_RRGetOutputInfo, + RANDR_NAME ":GetOutputInfo"); + RegisterRequestName(extEntry->base, X_RRListOutputProperties, + RANDR_NAME ":ListOutputProperties"); + RegisterRequestName(extEntry->base, X_RRQueryOutputProperty, + RANDR_NAME ":QueryOutputProperty"); + RegisterRequestName(extEntry->base, X_RRConfigureOutputProperty, + RANDR_NAME ":ConfigureOutputProperty"); + RegisterRequestName(extEntry->base, X_RRChangeOutputProperty, + RANDR_NAME ":ChangeOutputProperty"); + RegisterRequestName(extEntry->base, X_RRDeleteOutputProperty, + RANDR_NAME ":DeleteOutputProperty"); + RegisterRequestName(extEntry->base, X_RRGetOutputProperty, + RANDR_NAME ":GetOutputProperty"); + RegisterRequestName(extEntry->base, X_RRCreateMode, + RANDR_NAME ":CreateMode"); + RegisterRequestName(extEntry->base, X_RRDestroyMode, + RANDR_NAME ":DestroyMode"); + RegisterRequestName(extEntry->base, X_RRAddOutputMode, + RANDR_NAME ":AddOutputMode"); + RegisterRequestName(extEntry->base, X_RRDeleteOutputMode, + RANDR_NAME ":DeleteOutputMode"); + RegisterRequestName(extEntry->base, X_RRGetCrtcInfo, + RANDR_NAME ":GetCrtcInfo"); + RegisterRequestName(extEntry->base, X_RRSetCrtcConfig, + RANDR_NAME ":SetCrtcConfig"); + RegisterRequestName(extEntry->base, X_RRGetCrtcGammaSize, + RANDR_NAME ":GetCrtcGammaSize"); + RegisterRequestName(extEntry->base, X_RRGetCrtcGamma, + RANDR_NAME ":GetCrtcGamma"); + RegisterRequestName(extEntry->base, X_RRSetCrtcGamma, + RANDR_NAME ":SetCrtcGamma"); + + RegisterEventName(RREventBase + RRScreenChangeNotify, + RANDR_NAME ":ScreenChangeNotify"); + /* V1.2 additions */ + RegisterEventName(RREventBase + RRNotify, + RANDR_NAME ":Notify"); + + RegisterErrorName(RRErrorBase + BadRROutput, + RANDR_NAME ":BadRROutput"); + RegisterErrorName(RRErrorBase + BadRRCrtc, + RANDR_NAME ":BadRRCrtc"); + RegisterErrorName(RRErrorBase + BadRRMode, + RANDR_NAME ":BadRRMode"); } static int From 8964c6d8e14ae47798762191e359b2bf138ca32e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 19:10:51 -0400 Subject: [PATCH 146/552] registry: Register RENDER extension protocol names. --- render/render.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/render/render.c b/render/render.c index 40d5add05..fe50dd28e 100644 --- a/render/render.c +++ b/render/render.c @@ -40,6 +40,7 @@ #include "colormapst.h" #include "extnsionst.h" #include "servermd.h" +#include "registry.h" #include #include #include "picturestr.h" @@ -262,6 +263,95 @@ RenderExtensionInit (void) RenderReqCode = (CARD8) extEntry->base; #endif RenderErrBase = extEntry->errorBase; + + RegisterRequestName(extEntry->base, X_RenderQueryVersion, + RENDER_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_RenderQueryPictFormats, + RENDER_NAME ":QueryPictFormats"); + RegisterRequestName(extEntry->base, X_RenderQueryPictIndexValues, + RENDER_NAME ":QueryPictIndexValues"); + RegisterRequestName(extEntry->base, X_RenderQueryDithers, + RENDER_NAME ":QueryDithers"); + RegisterRequestName(extEntry->base, X_RenderCreatePicture, + RENDER_NAME ":CreatePicture"); + RegisterRequestName(extEntry->base, X_RenderChangePicture, + RENDER_NAME ":ChangePicture"); + RegisterRequestName(extEntry->base, X_RenderSetPictureClipRectangles, + RENDER_NAME ":SetPictureClipRectangles"); + RegisterRequestName(extEntry->base, X_RenderFreePicture, + RENDER_NAME ":FreePicture"); + RegisterRequestName(extEntry->base, X_RenderComposite, + RENDER_NAME ":Composite"); + RegisterRequestName(extEntry->base, X_RenderScale, + RENDER_NAME ":Scale"); + RegisterRequestName(extEntry->base, X_RenderTrapezoids, + RENDER_NAME ":Trapezoids"); + RegisterRequestName(extEntry->base, X_RenderTriangles, + RENDER_NAME ":Triangles"); + RegisterRequestName(extEntry->base, X_RenderTriStrip, + RENDER_NAME ":TriStrip"); + RegisterRequestName(extEntry->base, X_RenderTriFan, + RENDER_NAME ":TriFan"); + RegisterRequestName(extEntry->base, X_RenderColorTrapezoids, + RENDER_NAME ":ColorTrapezoids"); + RegisterRequestName(extEntry->base, X_RenderColorTriangles, + RENDER_NAME ":ColorTriangles"); + RegisterRequestName(extEntry->base, X_RenderCreateGlyphSet, + RENDER_NAME ":CreateGlyphSet"); + RegisterRequestName(extEntry->base, X_RenderReferenceGlyphSet, + RENDER_NAME ":ReferenceGlyphSet"); + RegisterRequestName(extEntry->base, X_RenderFreeGlyphSet, + RENDER_NAME ":FreeGlyphSet"); + RegisterRequestName(extEntry->base, X_RenderAddGlyphs, + RENDER_NAME ":AddGlyphs"); + RegisterRequestName(extEntry->base, X_RenderAddGlyphsFromPicture, + RENDER_NAME ":AddGlyphsFromPicture"); + RegisterRequestName(extEntry->base, X_RenderFreeGlyphs, + RENDER_NAME ":FreeGlyphs"); + RegisterRequestName(extEntry->base, X_RenderCompositeGlyphs8, + RENDER_NAME ":CompositeGlyphs8"); + RegisterRequestName(extEntry->base, X_RenderCompositeGlyphs16, + RENDER_NAME ":CompositeGlyphs16"); + RegisterRequestName(extEntry->base, X_RenderCompositeGlyphs32, + RENDER_NAME ":CompositeGlyphs32"); + RegisterRequestName(extEntry->base, X_RenderFillRectangles, + RENDER_NAME ":FillRectangles"); + /* 0.5 */ + RegisterRequestName(extEntry->base, X_RenderCreateCursor, + RENDER_NAME ":CreateCursor"); + /* 0.6 */ + RegisterRequestName(extEntry->base, X_RenderSetPictureTransform, + RENDER_NAME ":SetPictureTransform"); + RegisterRequestName(extEntry->base, X_RenderQueryFilters, + RENDER_NAME ":QueryFilters"); + RegisterRequestName(extEntry->base, X_RenderSetPictureFilter, + RENDER_NAME ":SetPictureFilter"); + /* 0.8 */ + RegisterRequestName(extEntry->base, X_RenderCreateAnimCursor, + RENDER_NAME ":CreateAnimCursor"); + /* 0.9 */ + RegisterRequestName(extEntry->base, X_RenderAddTraps, + RENDER_NAME ":AddTraps"); + /* 0.10 */ + RegisterRequestName(extEntry->base, X_RenderCreateSolidFill, + RENDER_NAME ":CreateSolidFill"); + RegisterRequestName(extEntry->base, X_RenderCreateLinearGradient, + RENDER_NAME ":CreateLinearGradient"); + RegisterRequestName(extEntry->base, X_RenderCreateRadialGradient, + RENDER_NAME ":CreateRadialGradient"); + RegisterRequestName(extEntry->base, X_RenderCreateConicalGradient, + RENDER_NAME ":CreateConicalGradient"); + + RegisterErrorName(RenderErrBase + BadPictFormat, + RENDER_NAME ":BadPictFormat"); + RegisterErrorName(RenderErrBase + BadPicture, + RENDER_NAME ":BadPicture"); + RegisterErrorName(RenderErrBase + BadPictOp, + RENDER_NAME ":BadPictOp"); + RegisterErrorName(RenderErrBase + BadGlyphSet, + RENDER_NAME ":BadGlyphSet"); + RegisterErrorName(RenderErrBase + BadGlyph, + RENDER_NAME ":BadGlyph"); } static void From 2c9646ad4e65bb061d910c9e2b1a8a978f21fa17 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 19:18:03 -0400 Subject: [PATCH 147/552] registry: Register SHM extension protocol names. --- Xext/shm.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Xext/shm.c b/Xext/shm.c index ee4c34035..56a944be1 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -59,6 +59,7 @@ in this Software without prior written authorization from The Open Group. #include "servermd.h" #include "shmint.h" #include "xace.h" +#include "registry.h" #define _XSHM_SERVER_ #include #include @@ -246,7 +247,27 @@ ShmExtensionInit(INITARGS) ShmCompletionCode = extEntry->eventBase; BadShmSegCode = extEntry->errorBase; EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent; - } + } else + return; + + RegisterRequestName(ShmReqCode, X_ShmQueryVersion, + SHMNAME ":QueryVersion"); + RegisterRequestName(ShmReqCode, X_ShmAttach, + SHMNAME ":Attach"); + RegisterRequestName(ShmReqCode, X_ShmDetach, + SHMNAME ":Detach"); + RegisterRequestName(ShmReqCode, X_ShmPutImage, + SHMNAME ":PutImage"); + RegisterRequestName(ShmReqCode, X_ShmGetImage, + SHMNAME ":GetImage"); + RegisterRequestName(ShmReqCode, X_ShmCreatePixmap, + SHMNAME ":CreatePixmap"); + + RegisterEventName(extEntry->eventBase + ShmCompletion, + SHMNAME ":Completion"); + + RegisterErrorName(extEntry->errorBase + BadShmSeg, + SHMNAME ":BadShmSeg"); } /*ARGSUSED*/ From 48891d5696f56711f23743cb03be39cf6b26c522 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 19:32:01 -0400 Subject: [PATCH 148/552] registry: Register EVIE extension protocol names. --- Xext/xevie.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Xext/xevie.c b/Xext/xevie.c index 7dd67bbf6..8dc167814 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -45,6 +45,7 @@ of the copyright holder. #include "colormapst.h" #include "scrnintstr.h" #include "servermd.h" +#include "registry.h" #define _XEVIE_SERVER_ #include #include @@ -146,9 +147,21 @@ XevieExtensionInit (void) StandardMinorOpcode))) { ReqCode = (unsigned char)extEntry->base; ErrorBase = extEntry->errorBase; - } + } else + return; /* PC servers initialize the desktop colors (citems) here! */ + + RegisterRequestName(ReqCode, X_XevieQueryVersion, + XEVIENAME ":QueryVersion"); + RegisterRequestName(ReqCode, X_XevieStart, + XEVIENAME ":Start"); + RegisterRequestName(ReqCode, X_XevieEnd, + XEVIENAME ":End"); + RegisterRequestName(ReqCode, X_XevieSend, + XEVIENAME ":Send"); + RegisterRequestName(ReqCode, X_XevieSelectInput, + XEVIENAME ":SelectInput"); } /*ARGSUSED*/ From 5c8b1a91726817816d20faefad21c7a68ab634cc Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 19:35:04 -0400 Subject: [PATCH 149/552] registry: Register Resource extension protocol names. --- Xext/xres.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Xext/xres.c b/Xext/xres.c index 3660260c2..e78176e41 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -17,6 +17,7 @@ #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" +#include "registry.h" #include #include "pixmapstr.h" #include "windowstr.h" @@ -388,7 +389,18 @@ SProcResDispatch (ClientPtr client) void ResExtensionInit(INITARGS) { - (void) AddExtension(XRES_NAME, 0, 0, + ExtensionEntry *extEntry; + + extEntry = AddExtension(XRES_NAME, 0, 0, ProcResDispatch, SProcResDispatch, ResResetProc, StandardMinorOpcode); + + RegisterRequestName(extEntry->base, X_XResQueryVersion, + XRES_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_XResQueryClients, + XRES_NAME ":QueryClients"); + RegisterRequestName(extEntry->base, X_XResQueryClientResources, + XRES_NAME ":QueryClientResources"); + RegisterRequestName(extEntry->base, X_XResQueryClientPixmapBytes, + XRES_NAME ":QueryClientPixmapBytes"); } From f077578e42eee424b0e534774574c84af9d6f85b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 19:43:02 -0400 Subject: [PATCH 150/552] registry: Register XPrint extension protocol names. --- Xext/xprint.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/Xext/xprint.c b/Xext/xprint.c index ef5111837..48559dd44 100644 --- a/Xext/xprint.c +++ b/Xext/xprint.c @@ -80,6 +80,7 @@ copyright holders. #include "pixmapstr.h" #include "extnsionst.h" #include "dixstruct.h" +#include "registry.h" #include #include #include @@ -310,6 +311,69 @@ XpExtensionInit(INITARGS) screenInfo.screens[i]->CloseScreen = XpCloseScreen; } } + + RegisterRequestName(XpReqCode, X_PrintQueryVersion, + XP_PRINTNAME ":QueryVersion"); + RegisterRequestName(XpReqCode, X_PrintGetPrinterList, + XP_PRINTNAME ":GetPrinterList"); + RegisterRequestName(XpReqCode, X_PrintCreateContext, + XP_PRINTNAME ":CreateContext"); + RegisterRequestName(XpReqCode, X_PrintSetContext, + XP_PRINTNAME ":SetContext"); + RegisterRequestName(XpReqCode, X_PrintGetContext, + XP_PRINTNAME ":GetContext"); + RegisterRequestName(XpReqCode, X_PrintDestroyContext, + XP_PRINTNAME ":DestroyContext"); + RegisterRequestName(XpReqCode, X_PrintGetContextScreen, + XP_PRINTNAME ":GetContextScreen"); + RegisterRequestName(XpReqCode, X_PrintStartJob, + XP_PRINTNAME ":StartJob"); + RegisterRequestName(XpReqCode, X_PrintEndJob, + XP_PRINTNAME ":EndJob"); + RegisterRequestName(XpReqCode, X_PrintStartDoc, + XP_PRINTNAME ":StartDoc"); + RegisterRequestName(XpReqCode, X_PrintEndDoc, + XP_PRINTNAME ":EndDoc"); + RegisterRequestName(XpReqCode, X_PrintPutDocumentData, + XP_PRINTNAME ":PutDocumentData"); + RegisterRequestName(XpReqCode, X_PrintGetDocumentData, + XP_PRINTNAME ":GetDocumentData"); + RegisterRequestName(XpReqCode, X_PrintStartPage, + XP_PRINTNAME ":StartPage"); + RegisterRequestName(XpReqCode, X_PrintEndPage, + XP_PRINTNAME ":EndPage"); + RegisterRequestName(XpReqCode, X_PrintSelectInput, + XP_PRINTNAME ":SelectInput"); + RegisterRequestName(XpReqCode, X_PrintInputSelected, + XP_PRINTNAME ":InputSelected"); + RegisterRequestName(XpReqCode, X_PrintGetAttributes, + XP_PRINTNAME ":GetAttributes"); + RegisterRequestName(XpReqCode, X_PrintSetAttributes, + XP_PRINTNAME ":SetAttributes"); + RegisterRequestName(XpReqCode, X_PrintGetOneAttribute, + XP_PRINTNAME ":GetOneAttribute"); + RegisterRequestName(XpReqCode, X_PrintRehashPrinterList, + XP_PRINTNAME ":RehashPrinterList"); + RegisterRequestName(XpReqCode, X_PrintGetPageDimensions, + XP_PRINTNAME ":GetPageDimensions"); + RegisterRequestName(XpReqCode, X_PrintQueryScreens, + XP_PRINTNAME ":QueryScreens"); + RegisterRequestName(XpReqCode, X_PrintSetImageResolution, + XP_PRINTNAME ":SetImageResolution"); + RegisterRequestName(XpReqCode, X_PrintGetImageResolution, + XP_PRINTNAME ":GetImageResolution"); + + RegisterEventName(XpEventBase + XPPrintNotify, + XP_PRINTNAME ":PrintNotify"); + RegisterEventName(XpEventBase + XPAttributeNotify, + XP_PRINTNAME ":AttributeNotify"); + + RegisterErrorName(XpErrorBase + XPBadContext, + XP_PRINTNAME ":BadContext"); + RegisterErrorName(XpErrorBase + XPBadSequence, + XP_PRINTNAME ":BadSequence"); + RegisterErrorName(XpErrorBase + XPBadResourceID, + XP_PRINTNAME ":BadResourceID"); } static void From 16764a2d299c7c0c98002aadd52ab4a1a36758c3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 20:29:23 -0400 Subject: [PATCH 151/552] registry: Register DPMS extension protocol names. --- Xext/dpms.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/Xext/dpms.c b/Xext/dpms.c index 97622cb96..613493aae 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -44,15 +44,13 @@ Equipment Corporation. #include "dixstruct.h" #include "extnsionst.h" #include "opaque.h" +#include "registry.h" #define DPMS_SERVER #include #include #include "dpmsproc.h" #include "modinit.h" -#if 0 -static unsigned char DPMSCode; -#endif static DISPATCH_PROC(ProcDPMSDispatch); static DISPATCH_PROC(SProcDPMSDispatch); static DISPATCH_PROC(ProcDPMSGetVersion); @@ -76,18 +74,29 @@ static void DPMSResetProc(ExtensionEntry* extEntry); void DPMSExtensionInit(INITARGS) { -#if 0 ExtensionEntry *extEntry; - if ((extEntry = AddExtension(DPMSExtensionName, 0, 0, - ProcDPMSDispatch, SProcDPMSDispatch, - DPMSResetProc, StandardMinorOpcode))) - DPMSCode = (unsigned char)extEntry->base; -#else - (void) AddExtension(DPMSExtensionName, 0, 0, - ProcDPMSDispatch, SProcDPMSDispatch, - DPMSResetProc, StandardMinorOpcode); -#endif + if (!(extEntry = AddExtension(DPMSExtensionName, 0, 0, + ProcDPMSDispatch, SProcDPMSDispatch, + DPMSResetProc, StandardMinorOpcode))) + return; + + RegisterRequestName(extEntry->base, X_DPMSGetVersion, + DPMSExtensionName ":GetVersion"); + RegisterRequestName(extEntry->base, X_DPMSCapable, + DPMSExtensionName ":Capable"); + RegisterRequestName(extEntry->base, X_DPMSGetTimeouts, + DPMSExtensionName ":GetTimeouts"); + RegisterRequestName(extEntry->base, X_DPMSSetTimeouts, + DPMSExtensionName ":SetTimeouts"); + RegisterRequestName(extEntry->base, X_DPMSEnable, + DPMSExtensionName ":Enable"); + RegisterRequestName(extEntry->base, X_DPMSDisable, + DPMSExtensionName ":Disable"); + RegisterRequestName(extEntry->base, X_DPMSForceLevel, + DPMSExtensionName ":ForceLevel"); + RegisterRequestName(extEntry->base, X_DPMSInfo, + DPMSExtensionName ":Info"); } /*ARGSUSED*/ From 3877faf7d9fe00ed634077e38a198ae4b91a2bb4 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 20:35:13 -0400 Subject: [PATCH 152/552] registry: Register Multibuffer extension protocol names. --- Xext/mbuf.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/Xext/mbuf.c b/Xext/mbuf.c index ee2ef6405..701af66a4 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group. #include "resource.h" #include "opaque.h" #include "sleepuntil.h" +#include "registry.h" #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #include @@ -254,7 +255,39 @@ MultibufferExtensionInit() MultibufferErrorBase = extEntry->errorBase; EventSwapVector[MultibufferEventBase + MultibufferClobberNotify] = (EventSwapPtr) SClobberNotifyEvent; EventSwapVector[MultibufferEventBase + MultibufferUpdateNotify] = (EventSwapPtr) SUpdateNotifyEvent; - } + } else + return; + + RegisterRequestName(extEntry->base, X_MbufGetBufferVersion, + MULTIBUFFER_PROTOCOL_NAME ":GetBufferVersion"); + RegisterRequestName(extEntry->base, X_MbufCreateImageBuffers, + MULTIBUFFER_PROTOCOL_NAME ":CreateImageBuffers"); + RegisterRequestName(extEntry->base, X_MbufDestroyImageBuffers, + MULTIBUFFER_PROTOCOL_NAME ":DestroyImageBuffers"); + RegisterRequestName(extEntry->base, X_MbufDisplayImageBuffers, + MULTIBUFFER_PROTOCOL_NAME ":DisplayImageBuffers"); + RegisterRequestName(extEntry->base, X_MbufSetMBufferAttributes, + MULTIBUFFER_PROTOCOL_NAME ":SetMBufferAttributes"); + RegisterRequestName(extEntry->base, X_MbufGetMBufferAttributes, + MULTIBUFFER_PROTOCOL_NAME ":GetMBufferAttributes"); + RegisterRequestName(extEntry->base, X_MbufSetBufferAttributes, + MULTIBUFFER_PROTOCOL_NAME ":SetBufferAttributes"); + RegisterRequestName(extEntry->base, X_MbufGetBufferAttributes, + MULTIBUFFER_PROTOCOL_NAME ":GetBufferAttributes"); + RegisterRequestName(extEntry->base, X_MbufGetBufferInfo, + MULTIBUFFER_PROTOCOL_NAME ":GetBufferInfo"); + RegisterRequestName(extEntry->base, X_MbufCreateStereoWindow, + MULTIBUFFER_PROTOCOL_NAME ":CreateStereoWindow"); + RegisterRequestName(extEntry->base, X_MbufClearImageBufferArea, + MULTIBUFFER_PROTOCOL_NAME ":ClearImageBufferArea"); + + RegisterEventName(MultibufferEventBase + MultibufferClobberNotify, + MULTIBUFFER_PROTOCOL_NAME ":ClobberNotify"); + RegisterEventName(MultibufferEventBase + MultibufferUpdateNotify, + MULTIBUFFER_PROTOCOL_NAME ":UpdateNotify"); + + RegisterErrorName(MultibufferErrorBase + BadBuffer, + MULTIBUFFER_PROTOCOL_NAME ":BadBuffer"); } /*ARGSUSED*/ From 32fe282d5b8306514d641e15bc6d9fd4ab360977 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 20:45:18 -0400 Subject: [PATCH 153/552] registry: Register XTest extension protocol names. --- Xext/xtest.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 79c53b426..3895a0073 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -42,6 +42,7 @@ from The Open Group. #include "scrnintstr.h" #include "dixevents.h" #include "sleepuntil.h" +#include "registry.h" #define _XTEST_SERVER_ #include #include @@ -53,10 +54,6 @@ from The Open Group. #include "modinit.h" -#if 0 -static unsigned char XTestReqCode; -#endif - #ifdef XINPUT extern int DeviceValuator; #endif /* XINPUT */ @@ -88,18 +85,21 @@ static DISPATCH_PROC(SProcXTestGrabControl); void XTestExtensionInit(INITARGS) { -#if 0 ExtensionEntry *extEntry; - if ((extEntry = AddExtension(XTestExtensionName, 0, 0, - ProcXTestDispatch, SProcXTestDispatch, - XTestResetProc, StandardMinorOpcode)) != 0) - XTestReqCode = (unsigned char)extEntry->base; -#else - (void) AddExtension(XTestExtensionName, 0, 0, - ProcXTestDispatch, SProcXTestDispatch, - XTestResetProc, StandardMinorOpcode); -#endif + if (!(extEntry = AddExtension(XTestExtensionName, 0, 0, + ProcXTestDispatch, SProcXTestDispatch, + XTestResetProc, StandardMinorOpcode))) + return; + + RegisterRequestName(extEntry->base, X_XTestGetVersion, + XTestExtensionName ":GetVersion"); + RegisterRequestName(extEntry->base, X_XTestCompareCursor, + XTestExtensionName ":CompareCursor"); + RegisterRequestName(extEntry->base, X_XTestFakeInput, + XTestExtensionName ":FakeInput"); + RegisterRequestName(extEntry->base, X_XTestGrabControl, + XTestExtensionName ":GrabControl"); } /*ARGSUSED*/ From 35ae03871af88b2f420dd83448011a077852d7a0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 20:50:26 -0400 Subject: [PATCH 154/552] registry: Register XC-MISC extension protocol names. --- Xext/xcmisc.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index d9a7f100d..ba0402c76 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -39,6 +39,7 @@ from The Open Group. #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" +#include "registry.h" #include #include "modinit.h" @@ -48,10 +49,6 @@ from The Open Group. #define UINT32_MAX 0xffffffffU #endif -#if 0 -static unsigned char XCMiscCode; -#endif - static void XCMiscResetProc( ExtensionEntry * /* extEntry */ ); @@ -68,18 +65,19 @@ static DISPATCH_PROC(SProcXCMiscGetXIDRange); void XCMiscExtensionInit(INITARGS) { -#if 0 ExtensionEntry *extEntry; - if ((extEntry = AddExtension(XCMiscExtensionName, 0, 0, + if (!(extEntry = AddExtension(XCMiscExtensionName, 0, 0, ProcXCMiscDispatch, SProcXCMiscDispatch, - XCMiscResetProc, StandardMinorOpcode)) != 0) - XCMiscCode = (unsigned char)extEntry->base; -#else - (void) AddExtension(XCMiscExtensionName, 0, 0, - ProcXCMiscDispatch, SProcXCMiscDispatch, - XCMiscResetProc, StandardMinorOpcode); -#endif + XCMiscResetProc, StandardMinorOpcode))) + return; + + RegisterRequestName(extEntry->base, X_XCMiscGetVersion, + XCMiscExtensionName ":GetVersion"); + RegisterRequestName(extEntry->base, X_XCMiscGetXIDRange, + XCMiscExtensionName ":GetXIDRange"); + RegisterRequestName(extEntry->base, X_XCMiscGetXIDList, + XCMiscExtensionName ":GetXIDList"); } /*ARGSUSED*/ From 12766c5b5ffdab95255a63b2c8421ee773fd43b5 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:00:46 -0400 Subject: [PATCH 155/552] registry: Register Xv extension protocol names. --- Xext/xvmain.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/Xext/xvmain.c b/Xext/xvmain.c index a2fc10802..b3449b4a5 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -92,6 +92,7 @@ SOFTWARE. #include "resource.h" #include "opaque.h" #include "input.h" +#include "registry.h" #define GLOBAL @@ -195,6 +196,58 @@ XvExtensionInit(void) (void)MakeAtom(XvName, strlen(XvName), xTrue); + RegisterRequestName(XvReqCode, xv_QueryExtension, + XvName ":QueryExtension"); + RegisterRequestName(XvReqCode, xv_QueryAdaptors, + XvName ":QueryAdaptors"); + RegisterRequestName(XvReqCode, xv_QueryEncodings, + XvName ":QueryEncodings"); + RegisterRequestName(XvReqCode, xv_GrabPort, + XvName ":GrabPort"); + RegisterRequestName(XvReqCode, xv_UngrabPort, + XvName ":UngrabPort"); + RegisterRequestName(XvReqCode, xv_PutVideo, + XvName ":PutVideo"); + RegisterRequestName(XvReqCode, xv_PutStill, + XvName ":PutStill"); + RegisterRequestName(XvReqCode, xv_GetVideo, + XvName ":GetVideo"); + RegisterRequestName(XvReqCode, xv_GetStill, + XvName ":GetStill"); + RegisterRequestName(XvReqCode, xv_StopVideo, + XvName ":StopVideo"); + RegisterRequestName(XvReqCode, xv_SelectVideoNotify, + XvName ":SelectVideoNotify"); + RegisterRequestName(XvReqCode, xv_SelectPortNotify, + XvName ":SelectPortNotify"); + RegisterRequestName(XvReqCode, xv_QueryBestSize, + XvName ":QueryBestSize"); + RegisterRequestName(XvReqCode, xv_SetPortAttribute, + XvName ":SetPortAttribute"); + RegisterRequestName(XvReqCode, xv_GetPortAttribute, + XvName ":GetPortAttribute"); + RegisterRequestName(XvReqCode, xv_QueryPortAttributes, + XvName ":QueryPortAttributes"); + RegisterRequestName(XvReqCode, xv_ListImageFormats, + XvName ":ListImageFormats"); + RegisterRequestName(XvReqCode, xv_QueryImageAttributes, + XvName ":QueryImageAttributes"); + RegisterRequestName(XvReqCode, xv_PutImage, + XvName ":PutImage"); + RegisterRequestName(XvReqCode, xv_ShmPutImage, + XvName ":ShmPutImage"); + + RegisterEventName(XvEventBase + XvVideoNotify, + XvName ":VideoNotify"); + RegisterEventName(XvEventBase + XvPortNotify, + XvName ":PortNotify"); + + RegisterErrorName(XvErrorBase + XvBadPort, + XvName ":BadPort"); + RegisterErrorName(XvErrorBase + XvBadEncoding, + XvName ":BadEncoding"); + RegisterErrorName(XvErrorBase + XvBadControl, + XvName ":BadControl"); } } From 32f6171862461d17ebea58a2fb6ddd16ac71358c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:10:14 -0400 Subject: [PATCH 156/552] registry: Register XF86Bigfont extension protocol names. --- Xext/xf86bigfont.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index 29f07a63e..a8af43d09 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -71,6 +71,7 @@ #include "gcstruct.h" #include "dixfontstr.h" #include "extnsionst.h" +#include "registry.h" #define _XF86BIGFONT_SERVER_ #include @@ -86,10 +87,6 @@ static DISPATCH_PROC(SProcXF86BigfontDispatch); static DISPATCH_PROC(SProcXF86BigfontQueryVersion); static DISPATCH_PROC(SProcXF86BigfontQueryFont); -#if 0 -static unsigned char XF86BigfontReqCode; -#endif - #ifdef HAS_SHM /* A random signature, transmitted to the clients so they can verify that the @@ -149,7 +146,6 @@ CheckForShmSyscall(void) void XFree86BigfontExtensionInit() { -#if 0 ExtensionEntry* extEntry; if ((extEntry = AddExtension(XF86BIGFONTNAME, @@ -159,16 +155,6 @@ XFree86BigfontExtensionInit() SProcXF86BigfontDispatch, XF86BigfontResetProc, StandardMinorOpcode))) { - XF86BigfontReqCode = (unsigned char) extEntry->base; -#else - if (AddExtension(XF86BIGFONTNAME, - XF86BigfontNumberEvents, - XF86BigfontNumberErrors, - ProcXF86BigfontDispatch, - SProcXF86BigfontDispatch, - XF86BigfontResetProc, - StandardMinorOpcode)) { -#endif #ifdef HAS_SHM #ifdef MUST_CHECK_FOR_SHM_SYSCALL /* @@ -200,7 +186,13 @@ XFree86BigfontExtensionInit() # endif #endif #endif - } + } else + return; + + RegisterRequestName(extEntry->base, X_XF86BigfontQueryVersion, + XF86BIGFONTNAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_XF86BigfontQueryFont, + XF86BIGFONTNAME ":QueryFont"); } From 7e182a5d89d618e20dcc77850131690733322d39 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:13:39 -0400 Subject: [PATCH 157/552] registry: Register MIT-MISC extension protocol names. --- Xext/mitmisc.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c index 924b88063..0b231529b 100644 --- a/Xext/mitmisc.c +++ b/Xext/mitmisc.c @@ -38,14 +38,11 @@ in this Software without prior written authorization from The Open Group. #include "os.h" #include "dixstruct.h" #include "extnsionst.h" +#include "registry.h" #define _MITMISC_SERVER_ #include #include "modinit.h" -#if 0 -static unsigned char MITReqCode; -#endif - static void MITResetProc( ExtensionEntry * /* extEntry */ ); @@ -60,18 +57,17 @@ static DISPATCH_PROC(SProcMITSetBugMode); void MITMiscExtensionInit(INITARGS) { -#if 0 ExtensionEntry *extEntry; - if ((extEntry = AddExtension(MITMISCNAME, 0, 0, - ProcMITDispatch, SProcMITDispatch, - MITResetProc, StandardMinorOpcode)) != 0) - MITReqCode = (unsigned char)extEntry->base; -#else - (void) AddExtension(MITMISCNAME, 0, 0, - ProcMITDispatch, SProcMITDispatch, - MITResetProc, StandardMinorOpcode); -#endif + if (!(extEntry = AddExtension(MITMISCNAME, 0, 0, + ProcMITDispatch, SProcMITDispatch, + MITResetProc, StandardMinorOpcode))) + return; + + RegisterRequestName(extEntry->base, X_MITSetBugMode, + MITMISCNAME ":SetBugMode"); + RegisterRequestName(extEntry->base, X_MITGetBugMode, + MITMISCNAME ":GetBugMode"); } /*ARGSUSED*/ From f6226d3bfe1515058e2092e8662ae87825501209 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:35:12 -0400 Subject: [PATCH 158/552] registry: Register TOG-CUP extension protocol names. --- Xext/cup.c | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/Xext/cup.c b/Xext/cup.c index b544a7517..4adfc6116 100644 --- a/Xext/cup.c +++ b/Xext/cup.c @@ -39,6 +39,7 @@ in this Software without prior written authorization from The Open Group. #include "scrnintstr.h" #include "servermd.h" #include "swapreq.h" +#include "registry.h" #define _XCUP_SERVER_ #include #include @@ -51,11 +52,6 @@ static int ProcDispatch(ClientPtr client); static int SProcDispatch(ClientPtr client); static void ResetProc(ExtensionEntry* extEntry); -#if 0 -static unsigned char ReqCode = 0; -static int ErrorBase; -#endif - #if defined(WIN32) || defined(TESTWIN32) #define HAVE_SPECIAL_DESKTOP_COLORS #endif @@ -128,30 +124,25 @@ static xColorItem citems[] = { void XcupExtensionInit (INITARGS) { -#if 0 ExtensionEntry* extEntry; - if ((extEntry = AddExtension (XCUPNAME, - 0, - XcupNumberErrors, - ProcDispatch, - SProcDispatch, - ResetProc, - StandardMinorOpcode))) { - ReqCode = (unsigned char)extEntry->base; - ErrorBase = extEntry->errorBase; - } -#else - (void) AddExtension (XCUPNAME, - 0, - XcupNumberErrors, - ProcDispatch, - SProcDispatch, - ResetProc, - StandardMinorOpcode); -#endif + if (!(extEntry = AddExtension (XCUPNAME, + 0, + XcupNumberErrors, + ProcDispatch, + SProcDispatch, + ResetProc, + StandardMinorOpcode))) + return; /* PC servers initialize the desktop colors (citems) here! */ + + RegisterRequestName(extEntry->base, X_XcupQueryVersion, + XCUPNAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_XcupGetReservedColormapEntries, + XCUPNAME ":GetReservedColormapEntries"); + RegisterRequestName(extEntry->base, X_XcupStoreColors, + XCUPNAME ":StoreColors"); } /*ARGSUSED*/ From e987648cf2c21dcbd77dd9a71793090a48e4f521 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:38:56 -0400 Subject: [PATCH 159/552] registry: Register EVI extension protocol names. --- Xext/EVI.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/Xext/EVI.c b/Xext/EVI.c index 8fe3481d4..b6752c083 100644 --- a/Xext/EVI.c +++ b/Xext/EVI.c @@ -30,14 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "dixstruct.h" #include "extnsionst.h" #include "dix.h" +#include "registry.h" #define _XEVI_SERVER_ #include #include "EVIstruct.h" #include "modinit.h" -#if 0 -static unsigned char XEVIReqCode = 0; -#endif static EviPrivPtr eviPriv; static int @@ -182,19 +180,18 @@ EVIResetProc(ExtensionEntry *extEntry) void EVIExtensionInit(INITARGS) { -#if 0 ExtensionEntry *extEntry; - if ((extEntry = AddExtension(EVINAME, 0, 0, - ProcEVIDispatch, - SProcEVIDispatch, - EVIResetProc, StandardMinorOpcode))) { - XEVIReqCode = (unsigned char)extEntry->base; -#else - if (AddExtension(EVINAME, 0, 0, - ProcEVIDispatch, SProcEVIDispatch, - EVIResetProc, StandardMinorOpcode)) { -#endif - eviPriv = eviDDXInit(); - } + if (!(extEntry = AddExtension(EVINAME, 0, 0, + ProcEVIDispatch, + SProcEVIDispatch, + EVIResetProc, StandardMinorOpcode))) + return; + + eviPriv = eviDDXInit(); + + RegisterRequestName(extEntry->base, X_EVIQueryVersion, + EVINAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_EVIGetVisualInfo, + EVINAME ":GetVisualInfo"); } From 1254cc399c53eadcc32eeabf69990ed2526c7ae0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:43:06 -0400 Subject: [PATCH 160/552] registry: Register Fontcache extension protocol names. --- Xext/fontcache.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Xext/fontcache.c b/Xext/fontcache.c index c54340b61..9fae2d70b 100644 --- a/Xext/fontcache.c +++ b/Xext/fontcache.c @@ -42,6 +42,7 @@ #include "scrnintstr.h" #include "inputstr.h" #include "servermd.h" +#include "registry.h" #define _FONTCACHE_SERVER_ #include #include @@ -67,28 +68,34 @@ static DISPATCH_PROC(SProcFontCacheGetCacheStatistics); static DISPATCH_PROC(SProcFontCacheQueryVersion); static DISPATCH_PROC(SProcFontCacheChangeCacheSettings); -#if 0 -static unsigned char FontCacheReqCode = 0; -#endif - void FontCacheExtensionInit(INITARGS) { ExtensionEntry* extEntry; - if ( + if (! (extEntry = AddExtension(FONTCACHENAME, FontCacheNumberEvents, FontCacheNumberErrors, ProcFontCacheDispatch, SProcFontCacheDispatch, FontCacheResetProc, - StandardMinorOpcode))) { -#if 0 - FontCacheReqCode = (unsigned char)extEntry->base; -#endif - miscErrorBase = extEntry->errorBase; - } + StandardMinorOpcode))) + return; + + RegisterRequestName(extEntry->base, X_FontCacheQueryVersion, + FONTCACHENAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_FontCacheGetCacheSettings, + FONTCACHENAME ":GetCacheSettings"); + RegisterRequestName(extEntry->base, X_FontCacheChangeCacheSettings, + FONTCACHENAME ":ChangeCacheSettings"); + RegisterRequestName(extEntry->base, X_FontCacheGetCacheStatistics, + FONTCACHENAME ":GetCacheStatistics"); + + RegisterErrorName(extEntry->errorBase + FontCacheBadProtocol, + FONTCACHENAME ":BadProtocol"); + RegisterErrorName(extEntry->errorBase + FontCacheCannotAllocMemory, + FONTCACHENAME ":CannotAllocMemory"); } /*ARGSUSED*/ From 6ec35a8cf539c900b334dd6df146b394f54e3706 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:46:56 -0400 Subject: [PATCH 161/552] registry: Register BigRequests extension protocol names. --- Xext/bigreq.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/Xext/bigreq.c b/Xext/bigreq.c index d38879079..6303f388e 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -37,14 +37,11 @@ from The Open Group. #include "os.h" #include "dixstruct.h" #include "extnsionst.h" +#include "registry.h" #include #include "opaque.h" #include "modinit.h" -#if 0 -static unsigned char XBigReqCode; -#endif - static void BigReqResetProc( ExtensionEntry * /* extEntry */ ); @@ -54,18 +51,15 @@ static DISPATCH_PROC(ProcBigReqDispatch); void BigReqExtensionInit(INITARGS) { -#if 0 ExtensionEntry *extEntry; - if ((extEntry = AddExtension(XBigReqExtensionName, 0, 0, - ProcBigReqDispatch, ProcBigReqDispatch, - BigReqResetProc, StandardMinorOpcode)) != 0) - XBigReqCode = (unsigned char)extEntry->base; -#else - (void) AddExtension(XBigReqExtensionName, 0, 0, - ProcBigReqDispatch, ProcBigReqDispatch, - BigReqResetProc, StandardMinorOpcode); -#endif + if (!(extEntry = AddExtension(XBigReqExtensionName, 0, 0, + ProcBigReqDispatch, ProcBigReqDispatch, + BigReqResetProc, StandardMinorOpcode))) + return; + + RegisterRequestName(extEntry->base, X_BigReqEnable, + XBigReqExtensionName ":Enable"); } /*ARGSUSED*/ From b504678ba5407a6fd8d47d051305f7c3d5606dfe Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 21:54:25 -0400 Subject: [PATCH 162/552] registry: Register APPGROUP extension protocol names. --- Xext/appgroup.c | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/Xext/appgroup.c b/Xext/appgroup.c index c40782df5..4fb402066 100644 --- a/Xext/appgroup.c +++ b/Xext/appgroup.c @@ -39,6 +39,7 @@ from The Open Group. #include "windowstr.h" #include "colormapst.h" #include "servermd.h" +#include "registry.h" #define _XAG_SERVER_ #include #include "xacestr.h" @@ -762,14 +763,35 @@ static void XagCallClientStateChange( void XagExtensionInit(INITARGS) { - if (AddExtension (XAGNAME, - 0, - XagNumberErrors, - ProcXagDispatch, - SProcXagDispatch, - XagResetProc, - StandardMinorOpcode)) { + ExtensionEntry *extEntry; + + if ((extEntry = AddExtension (XAGNAME, + 0, + XagNumberErrors, + ProcXagDispatch, + SProcXagDispatch, + XagResetProc, + StandardMinorOpcode))) { RT_APPGROUP = CreateNewResourceType (XagAppGroupFree); XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL); - } + } else + return; + + RegisterRequestName(extEntry->base, X_XagQueryVersion, + XAGNAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_XagCreate, + XAGNAME ":Create"); + RegisterRequestName(extEntry->base, X_XagDestroy, + XAGNAME ":Destroy"); + RegisterRequestName(extEntry->base, X_XagGetAttr, + XAGNAME ":GetAttr"); + RegisterRequestName(extEntry->base, X_XagQuery, + XAGNAME ":Query"); + RegisterRequestName(extEntry->base, X_XagCreateAssoc, + XAGNAME ":CreateAssoc"); + RegisterRequestName(extEntry->base, X_XagDestroyAssoc, + XAGNAME ":DestroyAssoc"); + + RegisterErrorName(extEntry->errorBase + XagBadAppGroup, + XAGNAME ":BadAppGroup"); } From 9f597f6c87e0b14cc382d8e5929e42f822db4329 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 22:01:20 -0400 Subject: [PATCH 163/552] registry: Register SYNC extension protocol names. --- Xext/sync.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/Xext/sync.c b/Xext/sync.c index 81b0cc4aa..750e0db94 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -67,6 +67,7 @@ PERFORMANCE OF THIS SOFTWARE. #include "dixstruct.h" #include "resource.h" #include "opaque.h" +#include "registry.h" #define _SYNC_SERVER #include #include @@ -2411,6 +2412,45 @@ SyncExtensionInit(INITARGS) fprintf(stderr, "Sync Extension %d.%d\n", SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION); #endif + + RegisterRequestName(extEntry->base, X_SyncInitialize, + SYNC_NAME ":Initialize"); + RegisterRequestName(extEntry->base, X_SyncListSystemCounters, + SYNC_NAME ":ListSystemCounters"); + RegisterRequestName(extEntry->base, X_SyncCreateCounter, + SYNC_NAME ":CreateCounter"); + RegisterRequestName(extEntry->base, X_SyncSetCounter, + SYNC_NAME ":SetCounter"); + RegisterRequestName(extEntry->base, X_SyncChangeCounter, + SYNC_NAME ":ChangeCounter"); + RegisterRequestName(extEntry->base, X_SyncQueryCounter, + SYNC_NAME ":QueryCounter"); + RegisterRequestName(extEntry->base, X_SyncDestroyCounter, + SYNC_NAME ":DestroyCounter"); + RegisterRequestName(extEntry->base, X_SyncAwait, + SYNC_NAME ":Await"); + RegisterRequestName(extEntry->base, X_SyncCreateAlarm, + SYNC_NAME ":CreateAlarm"); + RegisterRequestName(extEntry->base, X_SyncChangeAlarm, + SYNC_NAME ":ChangeAlarm"); + RegisterRequestName(extEntry->base, X_SyncQueryAlarm, + SYNC_NAME ":QueryAlarm"); + RegisterRequestName(extEntry->base, X_SyncDestroyAlarm, + SYNC_NAME ":DestroyAlarm"); + RegisterRequestName(extEntry->base, X_SyncSetPriority, + SYNC_NAME ":SetPriority"); + RegisterRequestName(extEntry->base, X_SyncGetPriority, + SYNC_NAME ":GetPriority"); + + RegisterEventName(SyncEventBase + XSyncCounterNotify, + SYNC_NAME ":CounterNotify"); + RegisterEventName(SyncEventBase + XSyncAlarmNotify, + SYNC_NAME ":AlarmNotify"); + + RegisterErrorName(SyncErrorBase + XSyncBadCounter, + SYNC_NAME ":BadCounter"); + RegisterErrorName(SyncErrorBase + XSyncBadAlarm, + SYNC_NAME ":BadAlarm"); } From 4e274e90e16b1d954391e1af3e2074fb10f70ee7 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 22:04:20 -0400 Subject: [PATCH 164/552] registry: Register SHAPE extension protocol names. --- Xext/shape.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/Xext/shape.c b/Xext/shape.c index 0f49f7332..12ab53a05 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group. #include "dixstruct.h" #include "resource.h" #include "opaque.h" +#include "registry.h" #define _SHAPE_SERVER_ /* don't want Xlib structures */ #include #include "regionstr.h" @@ -111,9 +112,6 @@ static DISPATCH_PROC(SProcShapeSelectInput); #include "panoramiXsrv.h" #endif -#if 0 -static unsigned char ShapeReqCode = 0; -#endif static int ShapeEventBase = 0; static RESTYPE ClientType, EventType; /* resource types for event masks */ @@ -154,12 +152,32 @@ ShapeExtensionInit(void) ProcShapeDispatch, SProcShapeDispatch, ShapeResetProc, StandardMinorOpcode))) { -#if 0 - ShapeReqCode = (unsigned char)extEntry->base; -#endif ShapeEventBase = extEntry->eventBase; EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent; - } + } else + return; + + RegisterRequestName(extEntry->base, X_ShapeQueryVersion, + SHAPENAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_ShapeRectangles, + SHAPENAME ":Rectangles"); + RegisterRequestName(extEntry->base, X_ShapeMask, + SHAPENAME ":Mask"); + RegisterRequestName(extEntry->base, X_ShapeCombine, + SHAPENAME ":Combine"); + RegisterRequestName(extEntry->base, X_ShapeOffset, + SHAPENAME ":Offset"); + RegisterRequestName(extEntry->base, X_ShapeQueryExtents, + SHAPENAME ":QueryExtents"); + RegisterRequestName(extEntry->base, X_ShapeSelectInput, + SHAPENAME ":SelectInput"); + RegisterRequestName(extEntry->base, X_ShapeInputSelected, + SHAPENAME ":InputSelected"); + RegisterRequestName(extEntry->base, X_ShapeGetRectangles, + SHAPENAME ":GetRectangles"); + + RegisterEventName(ShapeEventBase + ShapeNotify, + SHAPENAME ":Notify"); } /*ARGSUSED*/ From 58c3240fcbec23aad122e1c340f6bb6d3b18f779 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 22:09:47 -0400 Subject: [PATCH 165/552] registry: Register MIT-SCREEN-SAVER extension protocol names. --- Xext/saver.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Xext/saver.c b/Xext/saver.c index d282173f8..eff932573 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -49,6 +49,7 @@ in this Software without prior written authorization from the X Consortium. #include "cursorstr.h" #include "colormapst.h" #include "xace.h" +#include "registry.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" @@ -62,9 +63,6 @@ in this Software without prior written authorization from the X Consortium. #include "modinit.h" -#if 0 -static unsigned char ScreenSaverReqCode = 0; -#endif static int ScreenSaverEventBase = 0; static DISPATCH_PROC(ProcScreenSaverQueryInfo); @@ -274,12 +272,26 @@ ScreenSaverExtensionInit(INITARGS) ProcScreenSaverDispatch, SProcScreenSaverDispatch, ScreenSaverResetProc, StandardMinorOpcode))) { -#if 0 - ScreenSaverReqCode = (unsigned char)extEntry->base; -#endif ScreenSaverEventBase = extEntry->eventBase; EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent; - } + } else + return; + + RegisterRequestName(extEntry->base, X_ScreenSaverQueryVersion, + ScreenSaverName ":QueryVersion"); + RegisterRequestName(extEntry->base, X_ScreenSaverQueryInfo, + ScreenSaverName ":QueryInfo"); + RegisterRequestName(extEntry->base, X_ScreenSaverSelectInput, + ScreenSaverName ":SelectInput"); + RegisterRequestName(extEntry->base, X_ScreenSaverSetAttributes, + ScreenSaverName ":SetAttributes"); + RegisterRequestName(extEntry->base, X_ScreenSaverUnsetAttributes, + ScreenSaverName ":UnsetAttributes"); + RegisterRequestName(extEntry->base, X_ScreenSaverSuspend, + ScreenSaverName ":Suspend"); + + RegisterEventName(ScreenSaverEventBase + ScreenSaverNotify, + ScreenSaverName ":Notify"); } /*ARGSUSED*/ From 853ea337bdad17f8f6ec7d940de14ce2cbbbf93e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 22:13:02 -0400 Subject: [PATCH 166/552] registry: Register XvMC extension protocol names. --- Xext/xvmc.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Xext/xvmc.c b/Xext/xvmc.c index 7ae8cc0da..a1e0ed186 100644 --- a/Xext/xvmc.c +++ b/Xext/xvmc.c @@ -16,6 +16,7 @@ #include "scrnintstr.h" #include "extnsionst.h" #include "servermd.h" +#include "registry.h" #include #include "xvdix.h" #include @@ -700,6 +701,34 @@ XvMCExtensionInit(void) XvMCReqCode = extEntry->base; XvMCEventBase = extEntry->eventBase; XvMCErrorBase = extEntry->errorBase; + + RegisterRequestName(XvMCReqCode, xvmc_QueryVersion, + XvMCName ":QueryVersion"); + RegisterRequestName(XvMCReqCode, xvmc_ListSurfaceTypes, + XvMCName ":ListSurfaceTypes"); + RegisterRequestName(XvMCReqCode, xvmc_CreateContext, + XvMCName ":CreateContext"); + RegisterRequestName(XvMCReqCode, xvmc_DestroyContext, + XvMCName ":DestroyContext"); + RegisterRequestName(XvMCReqCode, xvmc_CreateSurface, + XvMCName ":CreateSurface"); + RegisterRequestName(XvMCReqCode, xvmc_DestroySurface, + XvMCName ":DestroySurface"); + RegisterRequestName(XvMCReqCode, xvmc_CreateSubpicture, + XvMCName ":CreateSubpicture"); + RegisterRequestName(XvMCReqCode, xvmc_DestroySubpicture, + XvMCName ":DestroySubpicture"); + RegisterRequestName(XvMCReqCode, xvmc_ListSubpictureTypes, + XvMCName ":ListSubpictureTypes"); + RegisterRequestName(XvMCReqCode, xvmc_GetDRInfo, + XvMCName ":GetDRInfo"); + + RegisterErrorName(XvMCErrorBase + XvMCBadContext, + XvMCName ":BadContext"); + RegisterErrorName(XvMCErrorBase + XvMCBadSurface, + XvMCName ":BadSurface"); + RegisterErrorName(XvMCErrorBase + XvMCBadSubpicture, + XvMCName ":BadSubpicture"); } static Bool From fe97f7c54a1b42acd542696b6cdc9e83e89548f3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 15 Oct 2007 22:46:08 -0400 Subject: [PATCH 167/552] registry: Add some missing #include's. --- randr/rrcrtc.c | 1 + randr/rrmode.c | 1 + randr/rroutput.c | 1 + render/picture.c | 1 + 4 files changed, 4 insertions(+) diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 6384857c3..43486cddb 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -22,6 +22,7 @@ #include "randrstr.h" #include "swaprep.h" +#include "registry.h" RESTYPE RRCrtcType; diff --git a/randr/rrmode.c b/randr/rrmode.c index d7cc916ea..63a67dad0 100644 --- a/randr/rrmode.c +++ b/randr/rrmode.c @@ -21,6 +21,7 @@ */ #include "randrstr.h" +#include "registry.h" RESTYPE RRModeType; diff --git a/randr/rroutput.c b/randr/rroutput.c index fea87978f..1ecde31a2 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -21,6 +21,7 @@ */ #include "randrstr.h" +#include "registry.h" RESTYPE RROutputType; diff --git a/render/picture.c b/render/picture.c index dd4221f1a..049274e9f 100644 --- a/render/picture.c +++ b/render/picture.c @@ -41,6 +41,7 @@ #include "servermd.h" #include "picturestr.h" #include "xace.h" +#include "registry.h" _X_EXPORT DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKey; DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKey; From 773f6491c1cc8819038e753d08c32ba213f80f8f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 16 Oct 2007 19:11:36 -0400 Subject: [PATCH 168/552] xace: update the DeleteProperty prototype to include the client argument. This should have been part of 8f23d40068151ad85cde239d07031284f0b2c4dc. --- include/property.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/property.h b/include/property.h index 77536aa4d..ba7d226cd 100644 --- a/include/property.h +++ b/include/property.h @@ -74,6 +74,7 @@ extern int ChangeWindowProperty( Bool /*sendevent*/); extern int DeleteProperty( + ClientPtr /*client*/, WindowPtr /*pWin*/, Atom /*propName*/); From e3a8cbe523bae8b771ad3c8ad497f4444f6d05d5 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 17 Oct 2007 13:48:44 -0400 Subject: [PATCH 169/552] xace: add creation/labeling hook to CreateRootWindow(). --- dix/window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dix/window.c b/dix/window.c index 597ad2ef3..17ab2a7a3 100644 --- a/dix/window.c +++ b/dix/window.c @@ -434,6 +434,12 @@ CreateRootWindow(ScreenPtr pScreen) pWin->border.pixel = pScreen->blackPixel; pWin->borderWidth = 0; + /* security creation/labeling check + */ + if (XaceHook(XACE_RESOURCE_ACCESS, serverClient, pWin->drawable.id, + RT_WINDOW, pWin, RT_NONE, NULL, DixCreateAccess)) + return FALSE; + if (!AddResource(pWin->drawable.id, RT_WINDOW, (pointer)pWin)) return FALSE; From db66e66dbf26b91c655f1659859c022cc31f0db6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 17 Oct 2007 13:51:11 -0400 Subject: [PATCH 170/552] xace: Add an access_mode field to the extension structure. This allows the same callback to be used for both extension hooks. --- Xext/xace.c | 15 +++++++++++++-- Xext/xacestr.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 3de259f71..b12666159 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -67,6 +67,17 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } + case XACE_EXT_DISPATCH: { + XaceExtAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, ExtensionEntry*), + DixUseAccess, + Success /* default allow */ + }; + calldata = &rec; + prv = &rec.status; + break; + } case XACE_RESOURCE_ACCESS: { XaceResourceAccessRec rec = { va_arg(ap, ClientPtr), @@ -141,11 +152,11 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_EXT_DISPATCH: case XACE_EXT_ACCESS: { XaceExtAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, ExtensionEntry*), + DixGetAttrAccess, Success /* default allow */ }; calldata = &rec; @@ -228,7 +239,7 @@ int XaceHook(int hook, ...) /* call callbacks and return result, if any. */ CallCallbacks(&XaceHooks[hook], calldata); - return prv ? *prv : 0; + return prv ? *prv : Success; } static int diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 1dae4d6b5..1c615433b 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -97,6 +97,7 @@ typedef struct { typedef struct { ClientPtr client; ExtensionEntry *ext; + Mask access_mode; int status; } XaceExtAccessRec; From baabae623b3658196b67a710dc72663c2105bf31 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 17 Oct 2007 13:54:56 -0400 Subject: [PATCH 171/552] xselinux: Started reworking extension using new XACE hooks. --- Xext/xselinux.c | 1749 +++++++++------------------ Xext/xselinux.h | 105 +- configure.ac | 2 +- hw/xfree86/dixmods/extmod/modinit.h | 1 - mi/miinitext.c | 6 +- 5 files changed, 564 insertions(+), 1299 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index bc86a3294..9ff055484 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -32,13 +32,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #endif -#include #include -#include -#include +#include "resource.h" +#include "privates.h" +#include "registry.h" #include "dixstruct.h" #include "extnsionst.h" -#include "resource.h" +#include "scrnintstr.h" #include "selection.h" #include "xacestr.h" #include "xselinux.h" @@ -50,14 +50,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "modinit.h" -#ifndef XSELINUXCONFIGFILE -#warning "XSELinux Policy file is not defined" -#define XSELINUXCONFIGFILE NULL -#endif +/* private state record */ +static DevPrivateKey stateKey = &stateKey; -/* devPrivates in client and extension */ -static int clientPrivateIndex; -static int extnsnPrivateIndex; +/* This is what we store for security state */ +typedef struct { + security_id_t sid; + struct avc_entry_ref aeref; + char *client_path; +} SELinuxStateRec; /* audit file descriptor */ static int audit_fd; @@ -65,1337 +66,681 @@ static int audit_fd; /* structure passed to auditing callback */ typedef struct { ClientPtr client; /* client */ - char *property; /* property name, if any */ + char *client_path; /* client's executable path */ + unsigned id; /* resource id, if any */ + int restype; /* resource type, if any */ + Atom property; /* property name, if any */ char *extension; /* extension name, if any */ -} XSELinuxAuditRec; +} SELinuxAuditRec; /* labeling handle */ static struct selabel_handle *label_hnd; -/* Atoms for SELinux window labeling properties */ -Atom atom_ctx; -Atom atom_client_ctx; +/* whether AVC is active */ +static int avc_active; -/* Selection stuff from dix */ -extern Selection *CurrentSelections; -extern int NumCurrentSelections; +/* atoms for window label properties */ +static Atom atom_ctx; +static Atom atom_client_ctx; -/* Dynamically allocated security classes and permissions */ +/* The unlabeled SID */ +static security_id_t unlabeled_sid; + +/* Array of object classes indexed by resource type */ +static security_class_t *knownTypes; +static unsigned numKnownTypes; + +/* dynamically allocated security classes and permissions */ static struct security_class_mapping map[] = { - { "drawable", - { "create", "destroy", "draw", "copy", "getattr", NULL }}, - { "window", - { "addchild", "create", "destroy", "map", "unmap", "chstack", - "chproplist", "chprop", "listprop", "getattr", "setattr", "setfocus", - "move", "chselection", "chparent", "ctrllife", "enumerate", - "transparent", "mousemotion", "clientcomevent", "inputevent", - "drawevent", "windowchangeevent", "windowchangerequest", - "serverchangeevent", "extensionevent", NULL }}, - { "gc", - { "create", "free", "getattr", "setattr", NULL }}, - { "font", - { "load", "free", "getattr", "use", NULL }}, - { "colormap", - { "create", "free", "install", "uninstall", "list", "read", "store", - "getattr", "setattr", NULL }}, - { "property", - { "create", "free", "read", "write", NULL }}, - { "cursor", - { "create", "createglyph", "free", "assign", "setattr", NULL }}, - { "xclient", - { "kill", NULL }}, - { "xinput", - { "lookup", "getattr", "setattr", "setfocus", "warppointer", - "activegrab", "passivegrab", "ungrab", "bell", "mousemotion", - "relabelinput", NULL }}, - { "xserver", - { "screensaver", "gethostlist", "sethostlist", "getfontpath", - "setfontpath", "getattr", "grab", "ungrab", NULL }}, - { "xextension", - { "query", "use", NULL }}, + { "x_drawable", { "read", "write", "destroy", "create", "getattr", "setattr", "list_property", "get_property", "set_property", "", "", "list_child", "add_child", "remove_child", "hide", "show", "blend", "override", "", "", "", "", "send", "receive", "", "manage", NULL }}, + { "x_screen", { "", "", "", "", "getattr", "setattr", "saver_getattr", "saver_setattr", "", "", "", "", "", "", "hide_cursor", "show_cursor", "saver_hide", "saver_show", NULL }}, + { "x_gc", { "", "", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, + { "x_font", { "", "", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_glyph", "remove_glyph", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, + { "x_colormap", { "read", "write", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_color", "remove_color", "", "", "", "", "", "", "install", "uninstall", "", "", "use", NULL }}, + { "x_property", { "read", "write", "destroy", "create", NULL }}, + { "x_selection", { "read", "", "", "", "getattr", "setattr", NULL }}, + { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, + { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }}, + { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "", "manage", "", "bell", NULL }}, + { "x_server", { "record", "", "", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "grab", "", "", "", "", "", "", "", "manage", "debug", NULL }}, + { "x_extension", { "", "", "", "", "query", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, + { "x_resource", { "read", "write", "write", "write", "read", "write", "read", "read", "write", "read", "write", "read", "write", "write", "write", "read", "read", "write", "write", "write", "write", "write", "write", "read", "read", "write", "read", "write", NULL }}, { NULL } }; /* - * list of classes corresponding to SIDs in the - * rsid array of the security state structure (below). - * - * XXX SIDs should be stored in their native objects, not all - * bunched together in the client structure. However, this will - * require modification to the resource manager. + * Returns the object class corresponding to the given resource type. */ -static security_class_t sClasses[] = { - SECCLASS_WINDOW, - SECCLASS_DRAWABLE, - SECCLASS_GC, - SECCLASS_CURSOR, - SECCLASS_FONT, - SECCLASS_COLORMAP, - SECCLASS_PROPERTY, - SECCLASS_XCLIENT, - SECCLASS_XINPUT, - SECCLASS_XSERVER -}; -#define NRES (sizeof(sClasses)/sizeof(sClasses[0])) - -/* This is what we store for client security state */ -typedef struct { - int haveState; - security_id_t sid; - security_id_t rsid[NRES]; - struct avc_entry_ref aeref; -} XSELinuxClientStateRec; - -/* Convenience macros for accessing security state fields */ -#define STATEPTR(client) \ - ((client)->devPrivates[clientPrivateIndex].ptr) -#define HAVESTATE(client) \ - (((XSELinuxClientStateRec*)STATEPTR(client))->haveState) -#define SID(client) \ - (((XSELinuxClientStateRec*)STATEPTR(client))->sid) -#define RSID(client,n) \ - (((XSELinuxClientStateRec*)STATEPTR(client))->rsid[n]) -#define AEREF(client) \ - (((XSELinuxClientStateRec*)STATEPTR(client))->aeref) -#define EXTENSIONSID(ext) \ - ((ext)->devPrivates[extnsnPrivateIndex].ptr) - -/* - * Returns the index into the rsid array where the SID for the - * given class is stored. - */ -static int -IndexByClass(security_class_t class) +static security_class_t +SELinuxTypeToClass(RESTYPE type) { - int i; - for (i=0; i 10) - ErrorF("Warning: possibly mangled ID %x\n", id); - - c = id & RESOURCE_ID_MASK; - if (c > 100) - ErrorF("Warning: possibly mangled ID %x\n", id); - */ -} - -/* - * Byte-swap a CARD32 id if necessary. - */ -static XID -SwapXID(ClientPtr client, XID id) -{ - register char n; - if (client->swapped) - swapl(&id, n); - return id; -} - -/* - * ServerPerm - check access permissions on a server-owned object. - * - * Arguments: - * client: Client doing the request. - * class: Security class of the server object being accessed. - * perm: Permissions required on the object. - * - * Returns: X status code. - */ -static int -ServerPerm(ClientPtr client, - security_class_t class, - access_vector_t perm) -{ - int idx = IndexByClass(class); - if (HAVESTATE(client)) - { - XSELinuxAuditRec auditdata; - auditdata.client = client; - auditdata.property = NULL; - auditdata.extension = NULL; - errno = 0; - if (avc_has_perm(SID(client), RSID(serverClient,idx), class, - perm, &AEREF(client), &auditdata) < 0) - { - if (errno == EACCES) - return BadAccess; - ErrorF("ServerPerm: unexpected error %d\n", errno); - return BadValue; - } - } - else - { - ErrorF("No client state in server-perm check!\n"); - return Success; + if (type >= numKnownTypes) { + /* Need to increase size of classes array */ + unsigned size = sizeof(security_class_t); + knownTypes = xrealloc(knownTypes, (type + 1) * size); + if (!knownTypes) + return 0; + memset(knownTypes + numKnownTypes, 0, + (type - numKnownTypes + 1) * size); } - return Success; + if (!knownTypes[type]) { + const char *str; + knownTypes[type] = SECCLASS_X_RESOURCE; + + if (fulltype & RC_DRAWABLE) + knownTypes[type] = SECCLASS_X_DRAWABLE; + if (fulltype == RT_GC) + knownTypes[type] = SECCLASS_X_GC; + if (fulltype == RT_FONT) + knownTypes[type] = SECCLASS_X_FONT; + if (fulltype == RT_CURSOR) + knownTypes[type] = SECCLASS_X_CURSOR; + if (fulltype == RT_COLORMAP) + knownTypes[type] = SECCLASS_X_COLORMAP; + + /* Need to do a string lookup */ + str = LookupResourceName(fulltype); + if (!strcmp(str, "PICTURE")) + knownTypes[type] = SECCLASS_X_DRAWABLE; + if (!strcmp(str, "GLYPHSET")) + knownTypes[type] = SECCLASS_X_FONT; + } + +// ErrorF("Returning a class of %d for a type of %d\n", knownTypes[type], type); + return knownTypes[type]; } /* - * IDPerm - check access permissions on a resource. - * - * Arguments: - * client: Client doing the request. - * id: resource id of the resource being accessed. - * class: Security class of the resource being accessed. - * perm: Permissions required on the resource. - * - * Returns: X status code. + * Performs an SELinux permission check. */ static int -IDPerm(ClientPtr sclient, - XID id, - security_class_t class, - access_vector_t perm) +SELinuxDoCheck(ClientPtr client, SELinuxStateRec *obj, security_class_t class, + Mask access_mode, SELinuxAuditRec *auditdata) { - ClientPtr tclient; - int idx = IndexByClass(class); - XSELinuxAuditRec auditdata; + SELinuxStateRec *subj; - if (id == None) +// ErrorF("SuperCheck: client=%d, class=%d, access_mode=%x\n", client->index, class, access_mode); + + /* serverClient requests OK */ + if (client->index == 0) return Success; - CheckXID(id); - tclient = clients[CLIENT_ID(id)]; - - /* - * This happens in the case where a client has - * disconnected. XXX might want to make the server - * own orphaned resources... - */ - if (!tclient || !HAVESTATE(tclient) || !HAVESTATE(sclient)) - { - return Success; - } - - auditdata.client = sclient; - auditdata.property = NULL; - auditdata.extension = NULL; + subj = dixLookupPrivate(&client->devPrivates, stateKey); + auditdata->client = client; + auditdata->client_path = subj->client_path; errno = 0; - if (avc_has_perm(SID(sclient), RSID(tclient,idx), class, - perm, &AEREF(sclient), &auditdata) < 0) - { + + if (avc_has_perm(subj->sid, obj->sid, class, access_mode, &subj->aeref, + auditdata) < 0) { if (errno == EACCES) return BadAccess; - ErrorF("IDPerm: unexpected error %d\n", errno); + ErrorF("ServerPerm: unexpected error %d\n", errno); return BadValue; } return Success; } -/* - * GetPropertySID - compute SID for a property object. - * - * Arguments: - * basecontext: context of client owning the property. - * name: name of the property. - * - * Returns: proper SID for the object or NULL on error. - */ -static security_id_t -GetPropertySID(security_context_t base, const char *name) -{ - security_context_t con, result; - security_id_t sid = NULL; - - /* look in the mappings of names to types */ - if (selabel_lookup(label_hnd, &con, name, SELABEL_X_PROP) < 0) - goto out; - - /* perform a transition to obtain the final context */ - if (security_compute_create(base, con, SECCLASS_PROPERTY, &result) < 0) - goto out2; - - /* get a SID for the context */ - avc_context_to_sid(result, &sid); - freecon(result); - out2: - freecon(con); - out: - return sid; -} - -/* - * GetExtensionSID - compute SID for an extension object. - * - * Arguments: - * name: name of the extension. - * - * Returns: proper SID for the object or NULL on error. - */ -static security_id_t -GetExtensionSID(const char *name) -{ - security_context_t base, con, result; - security_id_t sid = NULL; - - /* get server context */ - if (getcon(&base) < 0) - goto out; - - /* look in the mappings of names to types */ - if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EXT) < 0) - goto out2; - - /* perform a transition to obtain the final context */ - if (security_compute_create(base, con, SECCLASS_XEXTENSION, &result) < 0) - goto out3; - - /* get a SID for the context */ - avc_context_to_sid(result, &sid); - freecon(result); - out3: - freecon(con); - out2: - freecon(base); - out: - return sid; -} - -/* - * AssignServerState - set up server security state. - * - * Arguments: - */ -static void -AssignServerState(void) -{ - int i; - security_context_t basectx, objctx; - XSELinuxClientStateRec *state; - - state = (XSELinuxClientStateRec*)STATEPTR(serverClient); - avc_entry_ref_init(&state->aeref); - - /* use the context of the X server process for the serverClient */ - if (getcon(&basectx) < 0) - FatalError("Couldn't get context of X server process\n"); - - /* get a SID from the context */ - if (avc_context_to_sid(basectx, &state->sid) < 0) - FatalError("Client %d: context_to_sid(%s) failed\n", 0, basectx); - - /* get contexts and then SIDs for each resource type */ - for (i=0; irsid[i]) < 0) - FatalError("Client %d: context_to_sid(%s) failed\n", - 0, objctx); - - freecon(objctx); - } - - /* mark as set up, free base context, and return */ - state->haveState = TRUE; - freecon(basectx); -} - -/* - * AssignClientState - set up client security state. - * - * Arguments: - * client: client to set up (can be serverClient). - */ -static void -AssignClientState(ClientPtr client) -{ - int i; - security_context_t basectx, objctx; - XSELinuxClientStateRec *state; - - state = (XSELinuxClientStateRec*)STATEPTR(client); - avc_entry_ref_init(&state->aeref); - - XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; - if (_XSERVTransIsLocal(ci)) { - /* for local clients, can get context from the socket */ - int fd = _XSERVTransGetConnectionNumber(ci); - if (getpeercon(fd, &basectx) < 0) - FatalError("Client %d: couldn't get context from socket\n", - client->index); - } - else - /* for remote clients, need to use a default context */ - if (selabel_lookup(label_hnd, &basectx, NULL, SELABEL_X_CLIENT) < 0) - FatalError("Client %d: couldn't get default remote connection context\n", - client->index); - - /* get a SID from the context */ - if (avc_context_to_sid(basectx, &state->sid) < 0) - FatalError("Client %d: context_to_sid(%s) failed\n", - client->index, basectx); - - /* get contexts and then SIDs for each resource type */ - for (i=0; iindex, basectx, sClasses[i]); - - if (avc_context_to_sid(objctx, &state->rsid[i]) < 0) - FatalError("Client %d: context_to_sid(%s) failed\n", - client->index, objctx); - - freecon(objctx); - } - - /* mark as set up, free base context, and return */ - state->haveState = TRUE; - freecon(basectx); -} - -/* - * FreeClientState - tear down client security state. - * - * Arguments: - * client: client to release (can be serverClient). - */ -static void -FreeClientState(ClientPtr client) -{ - int i; - XSELinuxClientStateRec *state = (XSELinuxClientStateRec*)STATEPTR(client); - - /* client state may not be set up if its auth was rejected */ - if (state->haveState) { - state = (XSELinuxClientStateRec*)STATEPTR(client); - sidput(state->sid); - for (i=0; irsid[i]); - state->haveState = FALSE; - } -} - -#define REQUEST_SIZE_CHECK(client, req) \ - (client->req_len >= (sizeof(req) >> 2)) -#define IDPERM(client, req, field, class, perm) \ - (REQUEST_SIZE_CHECK(client,req) ? \ - IDPerm(client, SwapXID(client,((req*)stuff)->field), class, perm) : \ - BadLength) - -static int -CheckSendEventPerms(ClientPtr client) -{ - register char n; - access_vector_t perm = 0; - REQUEST(xSendEventReq); - - /* might need type bounds checking here */ - if (!REQUEST_SIZE_CHECK(client, xSendEventReq)) - return BadLength; - - switch (stuff->event.u.u.type) { - case SelectionClear: - case SelectionNotify: - case SelectionRequest: - case ClientMessage: - case PropertyNotify: - perm = WINDOW__CLIENTCOMEVENT; - break; - case ButtonPress: - case ButtonRelease: - case KeyPress: - case KeyRelease: - case KeymapNotify: - case MotionNotify: - case EnterNotify: - case LeaveNotify: - case FocusIn: - case FocusOut: - perm = WINDOW__INPUTEVENT; - break; - case Expose: - case GraphicsExpose: - case NoExpose: - case VisibilityNotify: - perm = WINDOW__DRAWEVENT; - break; - case CirculateNotify: - case ConfigureNotify: - case CreateNotify: - case DestroyNotify: - case MapNotify: - case UnmapNotify: - case GravityNotify: - case ReparentNotify: - perm = WINDOW__WINDOWCHANGEEVENT; - break; - case CirculateRequest: - case ConfigureRequest: - case MapRequest: - case ResizeRequest: - perm = WINDOW__WINDOWCHANGEREQUEST; - break; - case ColormapNotify: - case MappingNotify: - perm = WINDOW__SERVERCHANGEEVENT; - break; - default: - perm = WINDOW__EXTENSIONEVENT; - break; - } - if (client->swapped) - swapl(&stuff->destination, n); - return IDPerm(client, stuff->destination, SECCLASS_WINDOW, perm); -} - -static int -CheckConvertSelectionPerms(ClientPtr client) -{ - register char n; - int rval = Success; - REQUEST(xConvertSelectionReq); - - if (!REQUEST_SIZE_CHECK(client, xConvertSelectionReq)) - return BadLength; - - if (client->swapped) - { - swapl(&stuff->selection, n); - swapl(&stuff->requestor, n); - } - - if (ValidAtom(stuff->selection)) - { - int i = 0; - while ((i < NumCurrentSelections) && - CurrentSelections[i].selection != stuff->selection) i++; - if (i < NumCurrentSelections) { - rval = IDPerm(client, CurrentSelections[i].window, - SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); - if (rval != Success) - return rval; - } - } - return IDPerm(client, stuff->requestor, - SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT); -} - -static int -CheckSetSelectionOwnerPerms(ClientPtr client) -{ - register char n; - int rval = Success; - REQUEST(xSetSelectionOwnerReq); - - if (!REQUEST_SIZE_CHECK(client, xSetSelectionOwnerReq)) - return BadLength; - - if (client->swapped) - { - swapl(&stuff->selection, n); - swapl(&stuff->window, n); - } - - if (ValidAtom(stuff->selection)) - { - int i = 0; - while ((i < NumCurrentSelections) && - CurrentSelections[i].selection != stuff->selection) i++; - if (i < NumCurrentSelections) { - rval = IDPerm(client, CurrentSelections[i].window, - SECCLASS_WINDOW, WINDOW__CHSELECTION); - if (rval != Success) - return rval; - } - } - return IDPerm(client, stuff->window, - SECCLASS_WINDOW, WINDOW__CHSELECTION); -} +//static void +//SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) +//{ +// XaceSelectionAccessRec *rec = calldata; +//} static void -XSELinuxCoreDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - XaceCoreDispatchRec *rec = (XaceCoreDispatchRec*)calldata; - ClientPtr client = rec->client; - REQUEST(xReq); - int rval = Success, rval2 = Success, rval3 = Success; + XaceExtAccessRec *rec = calldata; + SELinuxStateRec *subj, *obj, *serv; + SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + int rc; - switch(stuff->reqType) { - /* Drawable class control requirements */ - case X_ClearArea: - rval = IDPERM(client, xClearAreaReq, window, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - case X_PolySegment: - case X_PolyRectangle: - case X_PolyArc: - case X_PolyFillRectangle: - case X_PolyFillArc: - rval = IDPERM(client, xPolySegmentReq, drawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - case X_PolyPoint: - case X_PolyLine: - rval = IDPERM(client, xPolyPointReq, drawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - case X_FillPoly: - rval = IDPERM(client, xFillPolyReq, drawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - case X_PutImage: - rval = IDPERM(client, xPutImageReq, drawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - case X_CopyArea: - case X_CopyPlane: - rval = IDPERM(client, xCopyAreaReq, srcDrawable, - SECCLASS_DRAWABLE, DRAWABLE__COPY); - rval2 = IDPERM(client, xCopyAreaReq, dstDrawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - case X_GetImage: - rval = IDPERM(client, xGetImageReq, drawable, - SECCLASS_DRAWABLE, DRAWABLE__COPY); - break; - case X_GetGeometry: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_DRAWABLE, DRAWABLE__GETATTR); - break; - - /* Window class control requirements */ - case X_ChangeProperty: - rval = IDPERM(client, xChangePropertyReq, window, - SECCLASS_WINDOW, - WINDOW__CHPROPLIST | WINDOW__CHPROP | - WINDOW__LISTPROP); - break; - case X_ChangeSaveSet: - rval = IDPERM(client, xChangeSaveSetReq, window, - SECCLASS_WINDOW, - WINDOW__CTRLLIFE | WINDOW__CHPARENT); - break; - case X_ChangeWindowAttributes: - rval = IDPERM(client, xChangeWindowAttributesReq, window, - SECCLASS_WINDOW, WINDOW__SETATTR); - break; - case X_CirculateWindow: - rval = IDPERM(client, xCirculateWindowReq, window, - SECCLASS_WINDOW, WINDOW__CHSTACK); - break; - case X_ConfigureWindow: - rval = IDPERM(client, xConfigureWindowReq, window, - SECCLASS_WINDOW, - WINDOW__SETATTR | WINDOW__MOVE | WINDOW__CHSTACK); - break; - case X_ConvertSelection: - rval = CheckConvertSelectionPerms(client); - break; - case X_CreateWindow: - rval = IDPERM(client, xCreateWindowReq, wid, - SECCLASS_WINDOW, - WINDOW__CREATE | WINDOW__SETATTR | WINDOW__MOVE); - rval2 = IDPERM(client, xCreateWindowReq, parent, - SECCLASS_WINDOW, - WINDOW__CHSTACK | WINDOW__ADDCHILD); - rval3 = IDPERM(client, xCreateWindowReq, wid, - SECCLASS_DRAWABLE, DRAWABLE__CREATE); - break; - case X_DeleteProperty: - rval = IDPERM(client, xDeletePropertyReq, window, - SECCLASS_WINDOW, - WINDOW__CHPROP | WINDOW__CHPROPLIST); - break; - case X_DestroyWindow: - case X_DestroySubwindows: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_WINDOW, - WINDOW__ENUMERATE | WINDOW__UNMAP | WINDOW__DESTROY); - rval2 = IDPERM(client, xResourceReq, id, - SECCLASS_DRAWABLE, DRAWABLE__DESTROY); - break; - case X_GetMotionEvents: - rval = IDPERM(client, xGetMotionEventsReq, window, - SECCLASS_WINDOW, WINDOW__MOUSEMOTION); - break; - case X_GetProperty: - rval = IDPERM(client, xGetPropertyReq, window, - SECCLASS_WINDOW, WINDOW__LISTPROP); - break; - case X_GetWindowAttributes: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_WINDOW, WINDOW__GETATTR); - break; - case X_KillClient: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_XCLIENT, XCLIENT__KILL); - break; - case X_ListProperties: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_WINDOW, WINDOW__LISTPROP); - break; - case X_MapWindow: - case X_MapSubwindows: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_WINDOW, - WINDOW__ENUMERATE | WINDOW__GETATTR | WINDOW__MAP); - break; - case X_QueryTree: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_WINDOW, WINDOW__ENUMERATE | WINDOW__GETATTR); - break; - case X_RotateProperties: - rval = IDPERM(client, xRotatePropertiesReq, window, - SECCLASS_WINDOW, WINDOW__CHPROP | WINDOW__CHPROPLIST); - break; - case X_ReparentWindow: - rval = IDPERM(client, xReparentWindowReq, window, - SECCLASS_WINDOW, WINDOW__CHPARENT | WINDOW__MOVE); - rval2 = IDPERM(client, xReparentWindowReq, parent, - SECCLASS_WINDOW, WINDOW__CHSTACK | WINDOW__ADDCHILD); - break; - case X_SendEvent: - rval = CheckSendEventPerms(client); - break; - case X_SetInputFocus: - rval = IDPERM(client, xSetInputFocusReq, focus, - SECCLASS_WINDOW, WINDOW__SETFOCUS); - rval2 = ServerPerm(client, SECCLASS_XINPUT, XINPUT__SETFOCUS); - break; - case X_SetSelectionOwner: - rval = CheckSetSelectionOwnerPerms(client); - break; - case X_TranslateCoords: - rval = IDPERM(client, xTranslateCoordsReq, srcWid, - SECCLASS_WINDOW, WINDOW__GETATTR); - rval2 = IDPERM(client, xTranslateCoordsReq, dstWid, - SECCLASS_WINDOW, WINDOW__GETATTR); - break; - case X_UnmapWindow: - case X_UnmapSubwindows: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_WINDOW, - WINDOW__ENUMERATE | WINDOW__GETATTR | - WINDOW__UNMAP); - break; - case X_WarpPointer: - rval = IDPERM(client, xWarpPointerReq, srcWid, - SECCLASS_WINDOW, WINDOW__GETATTR); - rval2 = IDPERM(client, xWarpPointerReq, dstWid, - SECCLASS_WINDOW, WINDOW__GETATTR); - rval3 = ServerPerm(client, SECCLASS_XINPUT, XINPUT__WARPPOINTER); - break; - - /* Input class control requirements */ - case X_GrabButton: - case X_GrabKey: - rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__PASSIVEGRAB); - break; - case X_GrabKeyboard: - case X_GrabPointer: - case X_ChangeActivePointerGrab: - rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__ACTIVEGRAB); - break; - case X_AllowEvents: - case X_UngrabButton: - case X_UngrabKey: - case X_UngrabKeyboard: - case X_UngrabPointer: - rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__UNGRAB); - break; - case X_GetKeyboardControl: - case X_GetKeyboardMapping: - case X_GetPointerControl: - case X_GetPointerMapping: - case X_GetModifierMapping: - case X_QueryKeymap: - case X_QueryPointer: - rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__GETATTR); - break; - case X_ChangeKeyboardControl: - case X_ChangePointerControl: - case X_ChangeKeyboardMapping: - case X_SetModifierMapping: - case X_SetPointerMapping: - rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__SETATTR); - break; - case X_Bell: - rval = ServerPerm(client, SECCLASS_XINPUT, XINPUT__BELL); - break; - - /* Colormap class control requirements */ - case X_AllocColor: - case X_AllocColorCells: - case X_AllocColorPlanes: - case X_AllocNamedColor: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_COLORMAP, - COLORMAP__READ | COLORMAP__STORE); - break; - case X_CopyColormapAndFree: - rval = IDPERM(client, xCopyColormapAndFreeReq, mid, - SECCLASS_COLORMAP, COLORMAP__CREATE); - rval2 = IDPERM(client, xCopyColormapAndFreeReq, srcCmap, - SECCLASS_COLORMAP, - COLORMAP__READ | COLORMAP__FREE); - break; - case X_CreateColormap: - rval = IDPERM(client, xCreateColormapReq, mid, - SECCLASS_COLORMAP, COLORMAP__CREATE); - rval2 = IDPERM(client, xCreateColormapReq, window, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - case X_FreeColormap: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_COLORMAP, COLORMAP__FREE); - break; - case X_FreeColors: - rval = IDPERM(client, xFreeColorsReq, cmap, - SECCLASS_COLORMAP, COLORMAP__STORE); - break; - case X_InstallColormap: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_COLORMAP, COLORMAP__INSTALL); - rval2 = ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__INSTALL); - break; - case X_ListInstalledColormaps: - rval = ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__LIST); - break; - case X_LookupColor: - case X_QueryColors: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_COLORMAP, COLORMAP__READ); - break; - case X_StoreColors: - case X_StoreNamedColor: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_COLORMAP, COLORMAP__STORE); - break; - case X_UninstallColormap: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_COLORMAP, COLORMAP__UNINSTALL); - rval2 = ServerPerm(client, SECCLASS_COLORMAP, COLORMAP__UNINSTALL); - break; - - /* Font class control requirements */ - case X_CloseFont: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_FONT, FONT__FREE); - break; - case X_ImageText8: - case X_ImageText16: - /* Font accesses checked through the resource manager */ - rval = IDPERM(client, xImageTextReq, drawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - case X_OpenFont: - rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD); - rval2 = IDPERM(client, xOpenFontReq, fid, - SECCLASS_FONT, FONT__USE); - break; - case X_PolyText8: - case X_PolyText16: - /* Font accesses checked through the resource manager */ - rval = ServerPerm(client, SECCLASS_FONT, FONT__LOAD); - rval2 = IDPERM(client, xPolyTextReq, gc, - SECCLASS_GC, GC__SETATTR); - rval3 = IDPERM(client, xPolyTextReq, drawable, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - break; - - /* Pixmap class control requirements */ - case X_CreatePixmap: - rval = IDPERM(client, xCreatePixmapReq, pid, - SECCLASS_DRAWABLE, DRAWABLE__CREATE); - break; - case X_FreePixmap: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_DRAWABLE, DRAWABLE__DESTROY); - break; - - /* Cursor class control requirements */ - case X_CreateCursor: - rval = IDPERM(client, xCreateCursorReq, cid, - SECCLASS_CURSOR, CURSOR__CREATE); - rval2 = IDPERM(client, xCreateCursorReq, source, - SECCLASS_DRAWABLE, DRAWABLE__DRAW); - rval3 = IDPERM(client, xCreateCursorReq, mask, - SECCLASS_DRAWABLE, DRAWABLE__COPY); - break; - case X_CreateGlyphCursor: - rval = IDPERM(client, xCreateGlyphCursorReq, cid, - SECCLASS_CURSOR, CURSOR__CREATEGLYPH); - rval2 = IDPERM(client, xCreateGlyphCursorReq, source, - SECCLASS_FONT, FONT__USE); - rval3 = IDPERM(client, xCreateGlyphCursorReq, mask, - SECCLASS_FONT, FONT__USE); - break; - case X_RecolorCursor: - rval = IDPERM(client, xRecolorCursorReq, cursor, - SECCLASS_CURSOR, CURSOR__SETATTR); - break; - case X_FreeCursor: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_CURSOR, CURSOR__FREE); - break; - - /* GC class control requirements */ - case X_CreateGC: - rval = IDPERM(client, xCreateGCReq, gc, - SECCLASS_GC, GC__CREATE | GC__SETATTR); - break; - case X_ChangeGC: - case X_SetDashes: - case X_SetClipRectangles: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_GC, GC__SETATTR); - break; - case X_CopyGC: - rval = IDPERM(client, xCopyGCReq, srcGC, - SECCLASS_GC, GC__GETATTR); - rval2 = IDPERM(client, xCopyGCReq, dstGC, - SECCLASS_GC, GC__SETATTR); - break; - case X_FreeGC: - rval = IDPERM(client, xResourceReq, id, - SECCLASS_GC, GC__FREE); - break; - - /* Server class control requirements */ - case X_GrabServer: - rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GRAB); - break; - case X_UngrabServer: - rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__UNGRAB); - break; - case X_ForceScreenSaver: - case X_GetScreenSaver: - case X_SetScreenSaver: - rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SCREENSAVER); - break; - case X_ListHosts: - rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETHOSTLIST); - break; - case X_ChangeHosts: - case X_SetAccessControl: - rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SETHOSTLIST); - break; - case X_GetFontPath: - rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETFONTPATH); - break; - case X_SetFontPath: - rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__SETFONTPATH); - break; - case X_QueryBestSize: - rval = ServerPerm(client, SECCLASS_XSERVER, XSERVER__GETATTR); - break; - - default: - break; - } - if (rval != Success) - rec->status = rval; - if (rval2 != Success) - rec->status = rval2; - if (rval != Success) - rec->status = rval3; -} - -static void -XSELinuxExtDispatch(CallbackListPtr *pcbl, pointer unused, pointer calldata) -{ - XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; - ClientPtr client = rec->client; - ExtensionEntry *ext = rec->ext; - security_id_t extsid; - access_vector_t perm; - REQUEST(xReq); + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->ext->devPrivates, stateKey); + /* If this is a new object that needs labeling, do it now */ /* XXX there should be a separate callback for this */ - if (!EXTENSIONSID(ext)) - { - extsid = GetExtensionSID(ext->name); - if (!extsid) + if (obj->sid == unlabeled_sid) { + const char *name = rec->ext->name; + security_context_t con; + security_id_t sid; + + serv = dixLookupPrivate(&serverClient->devPrivates, stateKey); + + /* Look in the mappings of property names to contexts */ + if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EXT) < 0) { + ErrorF("XSELinux: a property label lookup failed!\n"); + rec->status = BadValue; return; - EXTENSIONSID(ext) = extsid; + } + /* Get a SID for context */ + if (avc_context_to_sid(con, &sid) < 0) { + ErrorF("XSELinux: a context_to_SID call failed!\n"); + rec->status = BadAlloc; + return; + } + + sidput(obj->sid); + + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(serv->sid, sid, SECCLASS_X_EXTENSION, + &obj->sid) < 0) { + ErrorF("XSELinux: a SID transition call failed!\n"); + freecon(con); + rec->status = BadValue; + return; + } + freecon(con); } - extsid = (security_id_t)EXTENSIONSID(ext); - perm = ((stuff->reqType == X_QueryExtension) || - (stuff->reqType == X_ListExtensions)) ? - XEXTENSION__QUERY : XEXTENSION__USE; - - if (HAVESTATE(client)) - { - XSELinuxAuditRec auditdata; - auditdata.client = client; - auditdata.property = NULL; - auditdata.extension = ext->name; - errno = 0; - if (avc_has_perm(SID(client), extsid, SECCLASS_XEXTENSION, - perm, &AEREF(client), &auditdata) < 0) - { - if (errno == EACCES) - rec->status = BadAccess; - ErrorF("ExtDispatch: unexpected error %d\n", errno); - rec->status = BadValue; - } - } else - ErrorF("No client state in extension dispatcher!\n"); -} /* XSELinuxExtDispatch */ + /* Perform the security check */ + auditdata.extension = rec->ext->name; + rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_EXTENSION, + rec->access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} static void -XSELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata; - WindowPtr pWin = rec->pWin; - ClientPtr client = rec->client; - ClientPtr tclient; - access_vector_t perm = 0; - security_id_t propsid; - char *propname = NameForAtom(rec->pProp->propertyName); + XacePropertyAccessRec *rec = calldata; + SELinuxStateRec *subj, *obj; + SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + int rc; - tclient = wClient(pWin); - if (!tclient || !HAVESTATE(tclient)) - return; + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->pProp->devPrivates, stateKey); - propsid = GetPropertySID(SID(tclient)->ctx, propname); - if (!propsid) - return; + /* If this is a new object that needs labeling, do it now */ + if (rec->access_mode & DixCreateAccess) { + const char *name = NameForAtom(rec->pProp->propertyName); + security_context_t con; + security_id_t sid; - if (rec->access_mode & DixReadAccess) - perm |= PROPERTY__READ; - if (rec->access_mode & DixWriteAccess) - perm |= PROPERTY__WRITE; - if (rec->access_mode & DixDestroyAccess) - perm |= PROPERTY__FREE; - if (!rec->access_mode) - perm = PROPERTY__READ | PROPERTY__WRITE | PROPERTY__FREE; - - if (HAVESTATE(client)) - { - XSELinuxAuditRec auditdata; - auditdata.client = client; - auditdata.property = propname; - auditdata.extension = NULL; - errno = 0; - if (avc_has_perm(SID(client), propsid, SECCLASS_PROPERTY, - perm, &AEREF(client), &auditdata) < 0) - { - if (errno == EACCES) - rec->status = BadAccess; - ErrorF("Property: unexpected error %d\n", errno); + /* Look in the mappings of property names to contexts */ + if (selabel_lookup(label_hnd, &con, name, SELABEL_X_PROP) < 0) { + ErrorF("XSELinux: a property label lookup failed!\n"); rec->status = BadValue; + return; } - } else - ErrorF("No client state in property callback!\n"); - - /* XXX this should be saved in the property structure */ - sidput(propsid); -} /* XSELinuxProperty */ - -static void -XSELinuxResLookup(CallbackListPtr *pcbl, pointer unused, pointer calldata) -{ - XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata; - ClientPtr client = rec->client; - REQUEST(xReq); - access_vector_t perm = 0; - int rval = Success; - - /* serverClient requests OK */ - if (client->index == 0) - return; - - switch(rec->rtype) { - case RT_FONT: { - switch(stuff->reqType) { - case X_ImageText8: - case X_ImageText16: - case X_PolyText8: - case X_PolyText16: - perm = FONT__USE; - break; - case X_ListFonts: - case X_ListFontsWithInfo: - case X_QueryFont: - case X_QueryTextExtents: - perm = FONT__GETATTR; - break; - default: - break; - } - if (perm) - rval = IDPerm(client, rec->id, SECCLASS_FONT, perm); - break; + /* Get a SID for context */ + if (avc_context_to_sid(con, &sid) < 0) { + ErrorF("XSELinux: a context_to_SID call failed!\n"); + rec->status = BadAlloc; + return; } - default: - break; + + sidput(obj->sid); + + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(subj->sid, sid, SECCLASS_X_PROPERTY, + &obj->sid) < 0) { + ErrorF("XSELinux: a SID transition call failed!\n"); + freecon(con); + rec->status = BadValue; + return; + } + freecon(con); + avc_entry_ref_init(&obj->aeref); } - if (rval != Success) - rec->status = rval; -} /* XSELinuxResLookup */ + + /* Perform the security check */ + auditdata.property = rec->pProp->propertyName; + rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_PROPERTY, + rec->access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} static void -XSELinuxMap(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; - if (IDPerm(rec->client, rec->pWin->drawable.id, - SECCLASS_WINDOW, WINDOW__MAP) != Success) - rec->status = BadAccess; -} /* XSELinuxMap */ + XaceResourceAccessRec *rec = calldata; + SELinuxStateRec *subj, *obj, *pobj; + SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + PrivateRec **privatePtr; + security_class_t class; + int rc, offset; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + + /* Determine if the resource object has a devPrivates field */ + offset = dixLookupPrivateOffset(rec->rtype); + if (offset < 0) { + /* No: use the SID of the owning client */ + class = SECCLASS_X_RESOURCE; + privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates; + obj = dixLookupPrivate(privatePtr, stateKey); + } else { + /* Yes: use the SID from the resource object itself */ + class = SELinuxTypeToClass(rec->rtype); + privatePtr = DEVPRIV_AT(rec->res, offset); + obj = dixLookupPrivate(privatePtr, stateKey); + } + + /* If this is a new object that needs labeling, do it now */ + if (rec->access_mode & DixCreateAccess && offset >= 0) { + if (rec->parent) + offset = dixLookupPrivateOffset(rec->ptype); + if (rec->parent && offset >= 0) + /* Use the SID of the parent object in the labeling operation */ + pobj = dixLookupPrivate(DEVPRIV_AT(rec->parent, offset), stateKey); + else + /* Use the SID of the subject */ + pobj = subj; + + sidput(obj->sid); + + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(subj->sid, pobj->sid, class, &obj->sid) < 0) { + ErrorF("XSELinux: a compute_create call failed!\n"); + rec->status = BadValue; + return; + } + } + + /* Perform the security check */ + auditdata.restype = rec->rtype; + auditdata.id = rec->id; + rc = SELinuxDoCheck(rec->client, obj, class, rec->access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} static void -XSELinuxDrawable(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) { - XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; - if (IDPerm(rec->client, rec->pDraw->id, - SECCLASS_DRAWABLE, DRAWABLE__COPY) != Success) - rec->status = BadAccess; -} /* XSELinuxDrawable */ + XaceScreenAccessRec *rec = calldata; + SELinuxStateRec *subj, *obj; + SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + Mask access_mode = rec->access_mode; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->screen->devPrivates, stateKey); + + /* If this is a new object that needs labeling, do it now */ + if (access_mode & DixCreateAccess) { + sidput(obj->sid); + + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SCREEN, + &obj->sid) < 0) { + ErrorF("XSELinux: a compute_create call failed!\n"); + rec->status = BadValue; + return; + } + } + + if (is_saver) + access_mode <<= 2; + + rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_SCREEN, + access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} static void -XSELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - XaceServerAccessRec *rec = (XaceServerAccessRec*)calldata; - access_vector_t perm = (rec->access_mode == DixReadAccess) ? - XSERVER__GETHOSTLIST : XSERVER__SETHOSTLIST; + XaceClientAccessRec *rec = calldata; + SELinuxStateRec *obj; + SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + int rc; - if (ServerPerm(rec->client, SECCLASS_XSERVER, perm) != Success) - rec->status = BadAccess; -} /* XSELinuxServer */ + obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); + + rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_CLIENT, + rec->access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} + +static void +SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceServerAccessRec *rec = calldata; + SELinuxStateRec *obj; + SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + int rc; + + obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); + + rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_SERVER, + rec->access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} /* Extension callbacks */ static void -XSELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxStateInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - NewClientInfoRec *pci = (NewClientInfoRec *)calldata; + PrivateCallbackRec *rec = calldata; + SELinuxStateRec *state = *rec->value; + + sidget(unlabeled_sid); + state->sid = unlabeled_sid; + + avc_entry_ref_init(&state->aeref); +} + +static void +SELinuxStateFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + PrivateCallbackRec *rec = calldata; + SELinuxStateRec *state = *rec->value; + + xfree(state->client_path); + + if (avc_active) + sidput(state->sid); +} + +static void +SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + NewClientInfoRec *pci = calldata; ClientPtr client = pci->client; + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + SELinuxStateRec *state; + security_context_t ctx; - switch(client->clientState) - { - case ClientStateInitial: - AssignServerState(); - break; + if (client->clientState != ClientStateInitial) + return; - case ClientStateRunning: - { - AssignClientState(client); - break; - } - case ClientStateGone: - case ClientStateRetained: - { - FreeClientState(client); - break; - } - default: break; - } -} /* XSELinuxClientState */ + state = dixLookupPrivate(&client->devPrivates, stateKey); + sidput(state->sid); + + if (_XSERVTransIsLocal(ci)) { + int fd = _XSERVTransGetConnectionNumber(ci); + struct ucred creds; + socklen_t len = sizeof(creds); + char path[PATH_MAX + 1]; + size_t bytes; + + /* For local clients, can get context from the socket */ + if (getpeercon(fd, &ctx) < 0) + FatalError("Client %d: couldn't get context from socket\n", + client->index); + + /* Try and determine the client's executable name */ + memset(&creds, 0, sizeof(creds)); + if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &creds, &len) < 0) + goto finish; + + snprintf(path, PATH_MAX + 1, "/proc/%d/cmdline", creds.pid); + fd = open(path, O_RDONLY); + if (fd < 0) + goto finish; + + bytes = read(fd, path, PATH_MAX + 1); + close(fd); + if (bytes <= 0) + goto finish; + + state->client_path = xalloc(bytes); + if (!state->client_path) + goto finish; + + memcpy(state->client_path, path, bytes); + state->client_path[bytes - 1] = 0; + } else + /* For remote clients, need to use a default context */ + if (selabel_lookup(label_hnd, &ctx, NULL, SELABEL_X_CLIENT) < 0) + FatalError("Client %d: couldn't get default remote context\n", + client->index); + +finish: + /* Get a SID from the context */ + if (avc_context_to_sid(ctx, &state->sid) < 0) + FatalError("Client %d: context_to_sid(%s) failed\n", + client->index, ctx); + + freecon(ctx); +} /* Labeling callbacks */ static void -XSELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - ResourceStateInfoRec *rec = (ResourceStateInfoRec *)calldata; + ResourceStateInfoRec *rec = calldata; + SELinuxStateRec *state; WindowPtr pWin; - ClientPtr client; - security_context_t ctx; - int rc; if (rec->type != RT_WINDOW) return; pWin = (WindowPtr)rec->value; - client = wClient(pWin); + state = dixLookupPrivate(&wClient(pWin)->devPrivates, stateKey); - if (HAVESTATE(client)) { - rc = avc_sid_to_context(SID(client), &ctx); + if (state->sid) { + security_context_t ctx; + int rc = avc_sid_to_context(state->sid, &ctx); if (rc < 0) FatalError("XSELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); + if (rc != Success) + FatalError("XSELinux: Failed to set label property on window!\n"); freecon(ctx); } else + FatalError("XSELinux: Unexpected unlabeled client found\n"); + + state = dixLookupPrivate(&pWin->devPrivates, stateKey); + + if (state->sid) { + security_context_t ctx; + int rc = avc_sid_to_context(state->sid, &ctx); + if (rc < 0) + FatalError("XSELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, - pWin, atom_client_ctx, XA_STRING, 8, - PropModeReplace, 10, "UNLABELED!", FALSE); - if (rc != Success) - FatalError("XSELinux: Failed to set context property on window!\n"); -} /* XSELinuxResourceState */ - -static Bool -XSELinuxLoadConfigFile(void) -{ - struct selinux_opt options[] = { - { SELABEL_OPT_PATH, XSELINUXCONFIGFILE }, - { SELABEL_OPT_VALIDATE, (char *)1 }, - }; - - if (!XSELINUXCONFIGFILE) - return FALSE; - - label_hnd = selabel_open(SELABEL_CTX_X, options, 2); - return !!label_hnd; -} /* XSELinuxLoadConfigFile */ - -static void -XSELinuxFreeConfigData(void) -{ - selabel_close(label_hnd); - label_hnd = NULL; -} /* XSELinuxFreeConfigData */ + pWin, atom_ctx, XA_STRING, 8, + PropModeReplace, strlen(ctx), ctx, FALSE); + if (rc != Success) + FatalError("XSELinux: Failed to set label property on window!\n"); + freecon(ctx); + } + else + FatalError("XSELinux: Unexpected unlabeled window found\n"); +} /* Extension dispatch functions */ static int -ProcXSELinuxDispatch(ClientPtr client) +ProcSELinuxDispatch(ClientPtr client) { return BadRequest; -} /* ProcXSELinuxDispatch */ +} static void -XSELinuxResetProc(ExtensionEntry *extEntry) +SELinuxResetProc(ExtensionEntry *extEntry) { - FreeClientState(serverClient); + /* XXX unregister all callbacks here */ - XSELinuxFreeConfigData(); + selabel_close(label_hnd); + label_hnd = NULL; audit_close(audit_fd); avc_destroy(); -} /* XSELinuxResetProc */ + avc_active = 0; -static void -XSELinuxAVCAudit(void *auditdata, - security_class_t class, - char *msgbuf, - size_t msgbufsize) -{ - XSELinuxAuditRec *audit = (XSELinuxAuditRec*)auditdata; - ClientPtr client = audit->client; - char requestNum[8]; - REQUEST(xReq); - - if (stuff) - snprintf(requestNum, 8, "%d", stuff->reqType); - - snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s", - stuff ? "request=" : "", - stuff ? requestNum : "", - audit->property ? " property=" : "", - audit->property ? audit->property : "", - audit->extension ? " extension=" : "", - audit->extension ? audit->extension : ""); + xfree(knownTypes); + knownTypes = NULL; + numKnownTypes = 0; } -static void -XSELinuxAVCLog(const char *fmt, ...) +static int +SELinuxAudit(void *auditdata, + security_class_t class, + char *msgbuf, + size_t msgbufsize) +{ + SELinuxAuditRec *audit = auditdata; + ClientPtr client = audit->client; + char idNum[16], *propertyName; + int major = 0, minor = 0; + REQUEST(xReq); + + if (audit->id) + snprintf(idNum, 16, "%x", audit->id); + if (stuff) { + major = stuff->reqType; + minor = (major < 128) ? 0 : MinorOpcodeOfRequest(client); + } + + propertyName = audit->property ? NameForAtom(audit->property) : NULL; + + return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s", + stuff ? "request=" : "", + stuff ? LookupRequestName(major, minor) : "", + audit->client_path ? " client=" : "", + audit->client_path ? audit->client_path : "", + audit->id ? " resid=" : "", + audit->id ? idNum : "", + audit->restype ? " restype=" : "", + audit->restype ? LookupResourceName(audit->restype) : "", + audit->property ? " property=" : "", + audit->property ? propertyName : "", + audit->extension ? " extension=" : "", + audit->extension ? audit->extension : ""); +} + +static int +SELinuxLog(int type, const char *fmt, ...) { va_list ap; va_start(ap, fmt); VErrorF(fmt, ap); va_end(ap); + return 0; } -/* XSELinuxExtensionSetup - * - * Set up the XSELinux Extension (pre-init) - */ -void -XSELinuxExtensionSetup(INITARGS) +static void +SELinuxFixupLabels(void) { - /* Allocate the client private index */ - clientPrivateIndex = AllocateClientPrivateIndex(); - if (!AllocateClientPrivate(clientPrivateIndex, - sizeof (XSELinuxClientStateRec))) - FatalError("XSELinux: Failed to allocate client private.\n"); + int i; + XaceScreenAccessRec srec; + SELinuxStateRec *state; + security_context_t ctx; + pointer unused; - /* Allocate the extension private index */ - extnsnPrivateIndex = AllocateExtensionPrivateIndex(); - if (!AllocateExtensionPrivate(extnsnPrivateIndex, 0)) - FatalError("XSELinux: Failed to allocate extension private.\n"); + /* Do the serverClient */ + state = dixLookupPrivate(&serverClient->devPrivates, stateKey); + sidput(state->sid); + + /* Use the context of the X server process for the serverClient */ + if (getcon(&ctx) < 0) + FatalError("Couldn't get context of X server process\n"); + + /* Get a SID from the context */ + if (avc_context_to_sid(ctx, &state->sid) < 0) + FatalError("serverClient: context_to_sid(%s) failed\n", ctx); + + freecon(ctx); + + srec.client = serverClient; + srec.access_mode = DixCreateAccess; + srec.status = Success; + + for (i = 0; i < screenInfo.numScreens; i++) { + /* Do the screen object */ + srec.screen = screenInfo.screens[i]; + SELinuxScreen(NULL, NULL, &srec); + + /* Do the default colormap */ + dixLookupResource(&unused, screenInfo.screens[i]->defColormap, + RT_COLORMAP, serverClient, DixCreateAccess); + } } -/* XSELinuxExtensionInit - * - * Initialize the XSELinux Extension - */ void XSELinuxExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - struct avc_log_callback alc = {XSELinuxAVCLog, XSELinuxAVCAudit}; + ExtensionEntry *extEntry; + struct selinux_opt options[] = { { SELABEL_OPT_VALIDATE, (char *)1 } }; + security_context_t con; + int ret = TRUE; - if (!is_selinux_enabled()) - { + /* Setup SELinux stuff */ + if (!is_selinux_enabled()) { ErrorF("XSELinux: Extension failed to load: SELinux not enabled\n"); return; } - if (selinux_set_mapping(map) < 0) { + selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback)SELinuxLog); + selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback)SELinuxAudit); + + if (selinux_set_mapping(map) < 0) FatalError("XSELinux: Failed to set up security class mapping\n"); - } - if (avc_init("xserver", NULL, &alc, NULL, NULL) < 0) - { + if (avc_open(NULL, 0) < 0) FatalError("XSELinux: Couldn't initialize SELinux userspace AVC\n"); - } + avc_active = 1; - if (!AddCallback(&ClientStateCallback, XSELinuxClientState, NULL)) - return; - if (!AddCallback(&ResourceStateCallback, XSELinuxResourceState, NULL)) - return; + label_hnd = selabel_open(SELABEL_CTX_X, options, 1); + if (!label_hnd) + FatalError("XSELinux: Failed to open x_contexts mapping in policy\n"); + + if (security_get_initial_context("unlabeled", &con) < 0) + FatalError("XSELinux: Failed to look up unlabeled context\n"); + if (avc_context_to_sid(con, &unlabeled_sid) < 0) + FatalError("XSELinux: a context_to_SID call failed!\n"); + freecon(con); + + /* Prepare for auditing */ + audit_fd = audit_open(); + if (audit_fd < 0) + FatalError("XSELinux: Failed to open the system audit log\n"); + + /* Allocate private storage */ + if (!dixRequestPrivate(stateKey, sizeof(SELinuxStateRec))) + FatalError("XSELinux: Failed to allocate private storage.\n"); /* Create atoms for doing window labeling */ - atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, 1); + atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, TRUE); if (atom_ctx == BAD_RESOURCE) FatalError("XSELinux: Failed to create atom\n"); - atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, 1); + atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, TRUE); if (atom_client_ctx == BAD_RESOURCE) FatalError("XSELinux: Failed to create atom\n"); - /* Load the config file. If this fails, shut down the server, - * since an unknown security status is worse than no security. - */ - if (XSELinuxLoadConfigFile() != TRUE) - { - FatalError("XSELinux: Failed to load security policy\n"); - } + /* Register callbacks */ + ret &= dixRegisterPrivateInitFunc(stateKey, SELinuxStateInit, NULL); + ret &= dixRegisterPrivateDeleteFunc(stateKey, SELinuxStateFree, NULL); - /* prepare for auditing */ - audit_fd = audit_open(); - if (audit_fd < 0) - { - FatalError("XSELinux: Failed to open the system audit log\n"); - } + ret &= AddCallback(&ClientStateCallback, SELinuxClientState, 0); + ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, 0); - /* register security callbacks */ - XaceRegisterCallback(XACE_CORE_DISPATCH, XSELinuxCoreDispatch, NULL); - XaceRegisterCallback(XACE_EXT_ACCESS, XSELinuxExtDispatch, NULL); - XaceRegisterCallback(XACE_EXT_DISPATCH, XSELinuxExtDispatch, NULL); - XaceRegisterCallback(XACE_RESOURCE_ACCESS, XSELinuxResLookup, NULL); - XaceRegisterCallback(XACE_MAP_ACCESS, XSELinuxMap, NULL); - XaceRegisterCallback(XACE_SERVER_ACCESS, XSELinuxServer, NULL); - XaceRegisterCallback(XACE_PROPERTY_ACCESS, XSELinuxProperty, NULL); - /* XaceRegisterCallback(XACE_DECLARE_EXT_SECURE, XSELinuxDeclare, NULL); - XaceRegisterCallback(XACE_DEVICE_ACCESS, XSELinuxDevice, NULL); */ + ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, 0); + ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, 0); +// ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, 0); + ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, 0); +// ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, 0); +// ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, 0); + ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, 0); + ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, 0); + ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, 0); +// ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, 0); + ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, 0); + ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, &ret); + if (!ret) + FatalError("XSELinux: Failed to register one or more callbacks\n"); - /* register extension with server */ + /* Add extension to server */ extEntry = AddExtension(XSELINUX_EXTENSION_NAME, XSELinuxNumberEvents, XSELinuxNumberErrors, - ProcXSELinuxDispatch, ProcXSELinuxDispatch, - XSELinuxResetProc, StandardMinorOpcode); + ProcSELinuxDispatch, ProcSELinuxDispatch, + SELinuxResetProc, StandardMinorOpcode); + + /* Label objects that were created before we could register ourself */ + SELinuxFixupLabels(); } diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 57fcbb20f..02ec86bf3 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -20,6 +20,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _XSELINUX_H #define _XSELINUX_H +#include "dixaccess.h" + /* Extension info */ #define XSELINUX_EXTENSION_NAME "SELinux" #define XSELINUX_MAJOR_VERSION 1 @@ -28,95 +30,18 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XSELinuxNumberErrors 0 /* Private Flask definitions */ -#define SECCLASS_DRAWABLE 1 -#define DRAWABLE__CREATE 0x00000001UL -#define DRAWABLE__DESTROY 0x00000002UL -#define DRAWABLE__DRAW 0x00000004UL -#define DRAWABLE__COPY 0x00000008UL -#define DRAWABLE__GETATTR 0x00000010UL -#define SECCLASS_WINDOW 2 -#define WINDOW__ADDCHILD 0x00000001UL -#define WINDOW__CREATE 0x00000002UL -#define WINDOW__DESTROY 0x00000004UL -#define WINDOW__MAP 0x00000008UL -#define WINDOW__UNMAP 0x00000010UL -#define WINDOW__CHSTACK 0x00000020UL -#define WINDOW__CHPROPLIST 0x00000040UL -#define WINDOW__CHPROP 0x00000080UL -#define WINDOW__LISTPROP 0x00000100UL -#define WINDOW__GETATTR 0x00000200UL -#define WINDOW__SETATTR 0x00000400UL -#define WINDOW__SETFOCUS 0x00000800UL -#define WINDOW__MOVE 0x00001000UL -#define WINDOW__CHSELECTION 0x00002000UL -#define WINDOW__CHPARENT 0x00004000UL -#define WINDOW__CTRLLIFE 0x00008000UL -#define WINDOW__ENUMERATE 0x00010000UL -#define WINDOW__TRANSPARENT 0x00020000UL -#define WINDOW__MOUSEMOTION 0x00040000UL -#define WINDOW__CLIENTCOMEVENT 0x00080000UL -#define WINDOW__INPUTEVENT 0x00100000UL -#define WINDOW__DRAWEVENT 0x00200000UL -#define WINDOW__WINDOWCHANGEEVENT 0x00400000UL -#define WINDOW__WINDOWCHANGEREQUEST 0x00800000UL -#define WINDOW__SERVERCHANGEEVENT 0x01000000UL -#define WINDOW__EXTENSIONEVENT 0x02000000UL -#define SECCLASS_GC 3 -#define GC__CREATE 0x00000001UL -#define GC__FREE 0x00000002UL -#define GC__GETATTR 0x00000004UL -#define GC__SETATTR 0x00000008UL -#define SECCLASS_FONT 4 -#define FONT__LOAD 0x00000001UL -#define FONT__FREE 0x00000002UL -#define FONT__GETATTR 0x00000004UL -#define FONT__USE 0x00000008UL -#define SECCLASS_COLORMAP 5 -#define COLORMAP__CREATE 0x00000001UL -#define COLORMAP__FREE 0x00000002UL -#define COLORMAP__INSTALL 0x00000004UL -#define COLORMAP__UNINSTALL 0x00000008UL -#define COLORMAP__LIST 0x00000010UL -#define COLORMAP__READ 0x00000020UL -#define COLORMAP__STORE 0x00000040UL -#define COLORMAP__GETATTR 0x00000080UL -#define COLORMAP__SETATTR 0x00000100UL -#define SECCLASS_PROPERTY 6 -#define PROPERTY__CREATE 0x00000001UL -#define PROPERTY__FREE 0x00000002UL -#define PROPERTY__READ 0x00000004UL -#define PROPERTY__WRITE 0x00000008UL -#define SECCLASS_CURSOR 7 -#define CURSOR__CREATE 0x00000001UL -#define CURSOR__CREATEGLYPH 0x00000002UL -#define CURSOR__FREE 0x00000004UL -#define CURSOR__ASSIGN 0x00000008UL -#define CURSOR__SETATTR 0x00000010UL -#define SECCLASS_XCLIENT 8 -#define XCLIENT__KILL 0x00000001UL -#define SECCLASS_XINPUT 9 -#define XINPUT__LOOKUP 0x00000001UL -#define XINPUT__GETATTR 0x00000002UL -#define XINPUT__SETATTR 0x00000004UL -#define XINPUT__SETFOCUS 0x00000008UL -#define XINPUT__WARPPOINTER 0x00000010UL -#define XINPUT__ACTIVEGRAB 0x00000020UL -#define XINPUT__PASSIVEGRAB 0x00000040UL -#define XINPUT__UNGRAB 0x00000080UL -#define XINPUT__BELL 0x00000100UL -#define XINPUT__MOUSEMOTION 0x00000200UL -#define XINPUT__RELABELINPUT 0x00000400UL -#define SECCLASS_XSERVER 10 -#define XSERVER__SCREENSAVER 0x00000001UL -#define XSERVER__GETHOSTLIST 0x00000002UL -#define XSERVER__SETHOSTLIST 0x00000004UL -#define XSERVER__GETFONTPATH 0x00000008UL -#define XSERVER__SETFONTPATH 0x00000010UL -#define XSERVER__GETATTR 0x00000020UL -#define XSERVER__GRAB 0x00000040UL -#define XSERVER__UNGRAB 0x00000080UL -#define SECCLASS_XEXTENSION 11 -#define XEXTENSION__QUERY 0x00000001UL -#define XEXTENSION__USE 0x00000002UL +#define SECCLASS_X_DRAWABLE 1 +#define SECCLASS_X_SCREEN 2 +#define SECCLASS_X_GC 3 +#define SECCLASS_X_FONT 4 +#define SECCLASS_X_COLORMAP 5 +#define SECCLASS_X_PROPERTY 6 +#define SECCLASS_X_SELECTION 7 +#define SECCLASS_X_CURSOR 8 +#define SECCLASS_X_CLIENT 9 +#define SECCLASS_X_DEVICE 10 +#define SECCLASS_X_SERVER 11 +#define SECCLASS_X_EXTENSION 12 +#define SECCLASS_X_RESOURCE 13 #endif /* _XSELINUX_H */ diff --git a/configure.ac b/configure.ac index e73e250bd..8901faec3 100644 --- a/configure.ac +++ b/configure.ac @@ -511,7 +511,7 @@ AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinera AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) -AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (TEMPORARILY DISABLED)]), [XSELINUX=no], [XSELINUX=no]) +AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no]) AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (TEMPORARILY DISABLED)]), [XCSECURITY=no], [XCSECURITY=no]) AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index fb75092c7..191b3ef89 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -130,7 +130,6 @@ extern void XaceExtensionInit(INITARGS); #endif #ifdef XSELINUX -extern void XSELinuxExtensionSetup(INITARGS); extern void XSELinuxExtensionInit(INITARGS); #endif diff --git a/mi/miinitext.c b/mi/miinitext.c index 964ef3e0e..2540975ac 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -324,7 +324,6 @@ extern void XaceExtensionInit(INITARGS); extern void SecurityExtensionInit(INITARGS); #endif #ifdef XSELINUX -extern void XSELinuxExtensionSetup(INITARGS); extern void XSELinuxExtensionInit(INITARGS); #endif #ifdef XPRINT @@ -537,9 +536,6 @@ InitExtensions(argc, argv) int argc; char *argv[]; { -#ifdef XSELINUX - XSELinuxExtensionSetup(); -#endif #ifdef PANORAMIX # if !defined(PRINT_ONLY_SERVER) && !defined(NO_PANORAMIX) if (!noPanoramiXExtension) PanoramiXExtensionInit(); @@ -718,7 +714,7 @@ static ExtensionModule staticExtensions[] = { { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, #endif #ifdef XSELINUX - { XSELinuxExtensionInit, XSELINUX_EXTENSION_NAME, NULL, XSELinuxExtensionSetup, NULL }, + { XSELinuxExtensionInit, XSELINUX_EXTENSION_NAME, NULL, NULL, NULL }, #endif #ifdef XPRINT { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL }, From af4dde0ac19ecec1d0ad988eb25b15401e7c6b36 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 17 Oct 2007 14:13:02 -0400 Subject: [PATCH 172/552] xselinux: Remove config file, this has been moved to the policy. --- Xext/Makefile.am | 3 - Xext/XSELinuxConfig | 133 -------------------------------------------- 2 files changed, 136 deletions(-) delete mode 100644 Xext/XSELinuxConfig diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 2423c8396..6fe1c3488 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -80,9 +80,6 @@ endif XSELINUX_SRCS = xselinux.c xselinux.h if XSELINUX BUILTIN_SRCS += $(XSELINUX_SRCS) - -SERVERCONFIG_DATA += XSELinuxConfig -AM_CFLAGS += -DXSELINUXCONFIGFILE=\"$(SERVERCONFIGdir)/XSELinuxConfig\" endif # Security extension: multi-level security to protect clients from each other diff --git a/Xext/XSELinuxConfig b/Xext/XSELinuxConfig deleted file mode 100644 index 66f93c56d..000000000 --- a/Xext/XSELinuxConfig +++ /dev/null @@ -1,133 +0,0 @@ -# -# Config file for XSELinux extension -# - -# -# The default client rule defines a context to be used for all clients -# connecting to the server from a remote host. -# -client * system_u:object_r:remote_xclient_t:s0 - -# -# Property rules map a property name to a context. A default property -# rule indicated by an asterisk should follow all other property rules. -# -# Properties set by typical clients: WM, _NET_WM, etc. -property WM_NAME system_u:object_r:client_xproperty_t:s0 -property WM_CLASS system_u:object_r:client_xproperty_t:s0 -property WM_ICON_NAME system_u:object_r:client_xproperty_t:s0 -property WM_HINTS system_u:object_r:client_xproperty_t:s0 -property WM_NORMAL_HINTS system_u:object_r:client_xproperty_t:s0 -property WM_COMMAND system_u:object_r:client_xproperty_t:s0 -property WM_CLIENT_MACHINE system_u:object_r:client_xproperty_t:s0 -property WM_LOCALE_NAME system_u:object_r:client_xproperty_t:s0 -property WM_CLIENT_LEADER system_u:object_r:client_xproperty_t:s0 -property WM_STATE system_u:object_r:client_xproperty_t:s0 -property WM_PROTOCOLS system_u:object_r:client_xproperty_t:s0 -property WM_WINDOW_ROLE system_u:object_r:client_xproperty_t:s0 -property WM_TRANSIENT_FOR system_u:object_r:client_xproperty_t:s0 -property _NET_WM_NAME system_u:object_r:client_xproperty_t:s0 -property _NET_WM_ICON system_u:object_r:client_xproperty_t:s0 -property _NET_WM_ICON_NAME system_u:object_r:client_xproperty_t:s0 -property _NET_WM_PID system_u:object_r:client_xproperty_t:s0 -property _NET_WM_STATE system_u:object_r:client_xproperty_t:s0 -property _NET_WM_DESKTOP system_u:object_r:client_xproperty_t:s0 -property _NET_WM_SYNC_REQUEST_COUNTER system_u:object_r:client_xproperty_t:s0 -property _NET_WM_WINDOW_TYPE system_u:object_r:client_xproperty_t:s0 -property _NET_WM_USER_TIME system_u:object_r:client_xproperty_t:s0 -property _MOTIF_DRAG_RECEIVER_INFO system_u:object_r:client_xproperty_t:s0 -property XdndAware system_u:object_r:client_xproperty_t:s0 - -# Properties written by xrdb -property RESOURCE_MANAGER system_u:object_r:rm_xproperty_t:s0 -property SCREEN_RESOURCES system_u:object_r:rm_xproperty_t:s0 - -# Properties written by window managers -property _MIT_PRIORITY_COLORS system_u:object_r:wm_xproperty_t:s0 - -# Properties used for security labeling -property _SELINUX_CLIENT_CONTEXT system_u:object_r:seclabel_xproperty_t:s0 - -# Properties used to communicate screen information -property XFree86_VT system_u:object_r:info_xproperty_t:s0 -property XFree86_DDC_EDID1_RAWDATA system_u:object_r:info_xproperty_t:s0 - -# Clipboard and selection properties -property CUT_BUFFER0 system_u:object_r:clipboard_xproperty_t:s0 -property CUT_BUFFER1 system_u:object_r:clipboard_xproperty_t:s0 -property CUT_BUFFER2 system_u:object_r:clipboard_xproperty_t:s0 -property CUT_BUFFER3 system_u:object_r:clipboard_xproperty_t:s0 -property CUT_BUFFER4 system_u:object_r:clipboard_xproperty_t:s0 -property CUT_BUFFER5 system_u:object_r:clipboard_xproperty_t:s0 -property CUT_BUFFER6 system_u:object_r:clipboard_xproperty_t:s0 -property CUT_BUFFER7 system_u:object_r:clipboard_xproperty_t:s0 -property _XT_SELECTION_0 system_u:object_r:clipboard_xproperty_t:s0 - -# Default fallback type -property * system_u:object_r:unknown_xproperty_t:s0 - -# -# Extension rules map an extension name to a context. A default extension -# rule indicated by an asterisk should follow all other extension rules. -# -# Standard extensions -extension BIG-REQUESTS system_u:object_r:std_xext_t:s0 -extension DOUBLE-BUFFER system_u:object_r:std_xext_t:s0 -extension Extended-Visual-Information system_u:object_r:std_xext_t:s0 -extension MIT-SUNDRY-NONSTANDARD system_u:object_r:std_xext_t:s0 -extension SHAPE system_u:object_r:std_xext_t:s0 -extension SYNC system_u:object_r:std_xext_t:s0 -extension XC-MISC system_u:object_r:std_xext_t:s0 -extension XFIXES system_u:object_r:std_xext_t:s0 -extension XFree86-Misc system_u:object_r:std_xext_t:s0 -extension XpExtension system_u:object_r:std_xext_t:s0 - -# Screen management and multihead extensions -extension RANDR system_u:object_r:output_xext_t:s0 -extension XINERAMA system_u:object_r:std_xext_t:s0 - -# Input extensions -extension XInputExtension system_u:object_r:input_xext_t:s0 -extension XKEYBOARD system_u:object_r:input_xext_t:s0 - -# Screensaver, power management extensions -extension DPMS system_u:object_r:screensaver_xext_t:s0 -extension MIT-SCREEN-SAVER system_u:object_r:screensaver_xext_t:s0 - -# Fonting extensions -extension FontCache system_u:object_r:font_xext_t:s0 -extension XFree86-Bigfont system_u:object_r:font_xext_t:s0 - -# Shared memory extensions -extension MIT-SHM system_u:object_r:shmem_xext_t:s0 - -# Accelerated graphics, OpenGL, direct rendering extensions -extension DAMAGE system_u:object_r:accelgraphics_xext_t:s0 -extension GLX system_u:object_r:accelgraphics_xext_t:s0 -extension NV-CONTROL system_u:object_r:accelgraphics_xext_t:s0 -extension NV-GLX system_u:object_r:accelgraphics_xext_t:s0 -extension NVIDIA-GLX system_u:object_r:accelgraphics_xext_t:s0 -extension RENDER system_u:object_r:std_xext_t:s0 -extension XFree86-DGA system_u:object_r:accelgraphics_xext_t:s0 - -# Debugging, testing, and recording extensions -extension RECORD system_u:object_r:debug_xext_t:s0 -extension X-Resource system_u:object_r:debug_xext_t:s0 -extension XTEST system_u:object_r:debug_xext_t:s0 - -# Extensions just for window managers -extension TOG-CUP system_u:object_r:windowmgr_xext_t:s0 - -# Security-related extensions -extension SECURITY system_u:object_r:security_xext_t:s0 -extension SELinux system_u:object_r:security_xext_t:s0 -extension XAccessControlExtension system_u:object_r:security_xext_t:s0 -extension XC-APPGROUP system_u:object_r:security_xext_t:s0 - -# Video extensions -extension XFree86-VidModeExtension system_u:object_r:video_xext_t:s0 -extension XVideo system_u:object_r:video_xext_t:s0 -extension XVideo-MotionCompensation system_u:object_r:video_xext_t:s0 - -# Default fallback type -extension * system_u:object_r:unknown_xext_t:s0 From 50b27e1ad2a98d36728dc8157492ef5c59c132cd Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 17 Oct 2007 16:09:40 -0400 Subject: [PATCH 173/552] devPrivates rework: update new GL/glxext code. Need to merge so this type of thing stops happening. --- GL/glx/glxext.c | 9 ++++----- GL/glx/glxscreens.c | 20 +++++--------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c index 4d6bfd7c6..55463c7cf 100644 --- a/GL/glx/glxext.c +++ b/GL/glx/glxext.c @@ -27,6 +27,7 @@ #include "glxserver.h" #include #include +#include "privates.h" #include #include "g_disptab.h" #include "unpack.h" @@ -53,7 +54,7 @@ RESTYPE __glXSwapBarrierRes; */ xGLXSingleReply __glXReply; -static int glxClientPrivateIndex; +static DevPrivateKey glxClientPrivateKey = &glxClientPrivateKey; /* ** Client that called into GLX dispatch. @@ -218,7 +219,7 @@ int __glXError(int error) __GLXclientState * glxGetClient(ClientPtr pClient) { - return (__GLXclientState *) pClient->devPrivates[glxClientPrivateIndex].ptr; + return dixLookupPrivate(&pClient->devPrivates, glxClientPrivateKey); } static void @@ -288,9 +289,7 @@ void GlxExtensionInit(void) __glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone); __glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone); - glxClientPrivateIndex = AllocateClientPrivateIndex (); - if (!AllocateClientPrivate (glxClientPrivateIndex, - sizeof (__GLXclientState))) + if (!dixRequestPrivate(glxClientPrivateKey, sizeof (__GLXclientState))) return; if (!AddCallback (&ClientStateCallback, glxClientCallback, 0)) return; diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c index c6f060b3d..6e4d497f5 100644 --- a/GL/glx/glxscreens.c +++ b/GL/glx/glxscreens.c @@ -41,11 +41,12 @@ #include #include +#include "privates.h" #include "glxserver.h" #include "glxutil.h" #include "glxext.h" -static int glxScreenPrivateIndex; +static DevPrivateKey glxScreenPrivateKey = &glxScreenPrivateKey; const char GLServerVersion[] = "1.4"; static const char GLServerExtensions[] = @@ -278,22 +279,11 @@ glxCloseScreen (int index, ScreenPtr pScreen) __GLXscreen * glxGetScreen(ScreenPtr pScreen) { - return (__GLXscreen *) pScreen->devPrivates[glxScreenPrivateIndex].ptr; + return dixLookupPrivate(&pScreen->devPrivates, glxScreenPrivateKey); } void __glXScreenInit(__GLXscreen *glxScreen, ScreenPtr pScreen) { - static int glxGeneration; - - if (glxGeneration != serverGeneration) - { - glxScreenPrivateIndex = AllocateScreenPrivateIndex (); - if (glxScreenPrivateIndex == -1) - return; - - glxGeneration = serverGeneration; - } - glxScreen->pScreen = pScreen; glxScreen->GLextensions = xstrdup(GLServerExtensions); glxScreen->GLXvendor = xstrdup(GLXServerVendorName); @@ -308,9 +298,9 @@ void __glXScreenInit(__GLXscreen *glxScreen, ScreenPtr pScreen) __glXScreenInitVisuals(glxScreen); - pScreen->devPrivates[glxScreenPrivateIndex].ptr = (pointer) glxScreen; + dixSetPrivate(&pScreen->devPrivates, glxScreenPrivateKey, glxScreen); } - + void __glXScreenDestroy(__GLXscreen *screen) { xfree(screen->GLXvendor); From 503f918f55d0cb29585d83b022bbb8dc29f446c5 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 17 Oct 2007 19:14:15 -0400 Subject: [PATCH 174/552] xselinux: Move functions around; add some more comments. --- Xext/xselinux.c | 267 +++++++++++++++++++++++++++--------------------- 1 file changed, 150 insertions(+), 117 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 9ff055484..fc91ae384 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -50,6 +50,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "modinit.h" + +/* + * Globals + */ + /* private state record */ static DevPrivateKey stateKey = &stateKey; @@ -108,6 +113,14 @@ static struct security_class_mapping map[] = { { NULL } }; +/* forward declarations */ +static void SELinuxScreen(CallbackListPtr *, pointer, pointer); + + +/* + * Support Routines + */ + /* * Returns the object class corresponding to the given resource type. */ @@ -150,7 +163,6 @@ SELinuxTypeToClass(RESTYPE type) knownTypes[type] = SECCLASS_X_FONT; } -// ErrorF("Returning a class of %d for a type of %d\n", knownTypes[type], type); return knownTypes[type]; } @@ -163,8 +175,6 @@ SELinuxDoCheck(ClientPtr client, SELinuxStateRec *obj, security_class_t class, { SELinuxStateRec *subj; -// ErrorF("SuperCheck: client=%d, class=%d, access_mode=%x\n", client->index, class, access_mode); - /* serverClient requests OK */ if (client->index == 0) return Success; @@ -185,11 +195,101 @@ SELinuxDoCheck(ClientPtr client, SELinuxStateRec *obj, security_class_t class, return Success; } -//static void -//SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) -//{ -// XaceSelectionAccessRec *rec = calldata; -//} +/* + * Labels initial server objects. + */ +static void +SELinuxFixupLabels(void) +{ + int i; + XaceScreenAccessRec srec; + SELinuxStateRec *state; + security_context_t ctx; + pointer unused; + + /* Do the serverClient */ + state = dixLookupPrivate(&serverClient->devPrivates, stateKey); + sidput(state->sid); + + /* Use the context of the X server process for the serverClient */ + if (getcon(&ctx) < 0) + FatalError("Couldn't get context of X server process\n"); + + /* Get a SID from the context */ + if (avc_context_to_sid(ctx, &state->sid) < 0) + FatalError("serverClient: context_to_sid(%s) failed\n", ctx); + + freecon(ctx); + + srec.client = serverClient; + srec.access_mode = DixCreateAccess; + srec.status = Success; + + for (i = 0; i < screenInfo.numScreens; i++) { + /* Do the screen object */ + srec.screen = screenInfo.screens[i]; + SELinuxScreen(NULL, NULL, &srec); + + /* Do the default colormap */ + dixLookupResource(&unused, screenInfo.screens[i]->defColormap, + RT_COLORMAP, serverClient, DixCreateAccess); + } +} + + +/* + * Libselinux Callbacks + */ + +static int +SELinuxAudit(void *auditdata, + security_class_t class, + char *msgbuf, + size_t msgbufsize) +{ + SELinuxAuditRec *audit = auditdata; + ClientPtr client = audit->client; + char idNum[16], *propertyName; + int major = 0, minor = 0; + REQUEST(xReq); + + if (audit->id) + snprintf(idNum, 16, "%x", audit->id); + if (stuff) { + major = stuff->reqType; + minor = (major < 128) ? 0 : MinorOpcodeOfRequest(client); + } + + propertyName = audit->property ? NameForAtom(audit->property) : NULL; + + return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s", + stuff ? "request=" : "", + stuff ? LookupRequestName(major, minor) : "", + audit->client_path ? " comm=" : "", + audit->client_path ? audit->client_path : "", + audit->id ? " resid=" : "", + audit->id ? idNum : "", + audit->restype ? " restype=" : "", + audit->restype ? LookupResourceName(audit->restype) : "", + audit->property ? " property=" : "", + audit->property ? propertyName : "", + audit->extension ? " extension=" : "", + audit->extension ? audit->extension : ""); +} + +static int +SELinuxLog(int type, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + VErrorF(fmt, ap); + va_end(ap); + return 0; +} + +/* + * XACE Callbacks + */ static void SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) @@ -418,30 +518,10 @@ SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) rec->status = rc; } -/* Extension callbacks */ -static void -SELinuxStateInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) -{ - PrivateCallbackRec *rec = calldata; - SELinuxStateRec *state = *rec->value; - sidget(unlabeled_sid); - state->sid = unlabeled_sid; - - avc_entry_ref_init(&state->aeref); -} - -static void -SELinuxStateFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) -{ - PrivateCallbackRec *rec = calldata; - SELinuxStateRec *state = *rec->value; - - xfree(state->client_path); - - if (avc_active) - sidput(state->sid); -} +/* + * DIX Callbacks + */ static void SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) @@ -506,7 +586,6 @@ finish: freecon(ctx); } -/* Labeling callbacks */ static void SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { @@ -553,13 +632,51 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) FatalError("XSELinux: Unexpected unlabeled window found\n"); } -/* Extension dispatch functions */ + +/* + * DevPrivates Callbacks + */ + +static void +SELinuxStateInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + PrivateCallbackRec *rec = calldata; + SELinuxStateRec *state = *rec->value; + + sidget(unlabeled_sid); + state->sid = unlabeled_sid; + + avc_entry_ref_init(&state->aeref); +} + +static void +SELinuxStateFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + PrivateCallbackRec *rec = calldata; + SELinuxStateRec *state = *rec->value; + + xfree(state->client_path); + + if (avc_active) + sidput(state->sid); +} + + +/* + * Extension Dispatch + */ + static int ProcSELinuxDispatch(ClientPtr client) { return BadRequest; } + +/* + * Extension Setup / Teardown + */ + static void SELinuxResetProc(ExtensionEntry *extEntry) { @@ -578,90 +695,6 @@ SELinuxResetProc(ExtensionEntry *extEntry) numKnownTypes = 0; } -static int -SELinuxAudit(void *auditdata, - security_class_t class, - char *msgbuf, - size_t msgbufsize) -{ - SELinuxAuditRec *audit = auditdata; - ClientPtr client = audit->client; - char idNum[16], *propertyName; - int major = 0, minor = 0; - REQUEST(xReq); - - if (audit->id) - snprintf(idNum, 16, "%x", audit->id); - if (stuff) { - major = stuff->reqType; - minor = (major < 128) ? 0 : MinorOpcodeOfRequest(client); - } - - propertyName = audit->property ? NameForAtom(audit->property) : NULL; - - return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s", - stuff ? "request=" : "", - stuff ? LookupRequestName(major, minor) : "", - audit->client_path ? " client=" : "", - audit->client_path ? audit->client_path : "", - audit->id ? " resid=" : "", - audit->id ? idNum : "", - audit->restype ? " restype=" : "", - audit->restype ? LookupResourceName(audit->restype) : "", - audit->property ? " property=" : "", - audit->property ? propertyName : "", - audit->extension ? " extension=" : "", - audit->extension ? audit->extension : ""); -} - -static int -SELinuxLog(int type, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - VErrorF(fmt, ap); - va_end(ap); - return 0; -} - -static void -SELinuxFixupLabels(void) -{ - int i; - XaceScreenAccessRec srec; - SELinuxStateRec *state; - security_context_t ctx; - pointer unused; - - /* Do the serverClient */ - state = dixLookupPrivate(&serverClient->devPrivates, stateKey); - sidput(state->sid); - - /* Use the context of the X server process for the serverClient */ - if (getcon(&ctx) < 0) - FatalError("Couldn't get context of X server process\n"); - - /* Get a SID from the context */ - if (avc_context_to_sid(ctx, &state->sid) < 0) - FatalError("serverClient: context_to_sid(%s) failed\n", ctx); - - freecon(ctx); - - srec.client = serverClient; - srec.access_mode = DixCreateAccess; - srec.status = Success; - - for (i = 0; i < screenInfo.numScreens; i++) { - /* Do the screen object */ - srec.screen = screenInfo.screens[i]; - SELinuxScreen(NULL, NULL, &srec); - - /* Do the default colormap */ - dixLookupResource(&unused, screenInfo.screens[i]->defColormap, - RT_COLORMAP, serverClient, DixCreateAccess); - } -} - void XSELinuxExtensionInit(INITARGS) { From aa340b2c7cbe9ddab53cff08c8ba165558209187 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 17 Oct 2007 19:27:16 -0400 Subject: [PATCH 175/552] xselinux: add hook for device acceses. --- Xext/xselinux.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index fc91ae384..8bafa1fec 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -291,6 +291,36 @@ SELinuxLog(int type, const char *fmt, ...) * XACE Callbacks */ +static void +SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceDeviceAccessRec *rec = calldata; + SELinuxStateRec *subj, *obj; + SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); + + /* If this is a new object that needs labeling, do it now */ + if (rec->access_mode & DixCreateAccess) { + sidput(obj->sid); + + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_DEVICE, + &obj->sid) < 0) { + ErrorF("XSELinux: a compute_create call failed!\n"); + rec->status = BadValue; + return; + } + } + + rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_DEVICE, + rec->access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} + static void SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) { @@ -755,7 +785,7 @@ XSELinuxExtensionInit(INITARGS) ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, 0); ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, 0); -// ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, 0); + ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, 0); ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, 0); // ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, 0); // ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, 0); From e3fd90ae9c3ddfc5d78e62614e311b73505d7ead Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 18 Oct 2007 10:29:10 -0400 Subject: [PATCH 176/552] registry: Add "X11:" prefix to core protocol names. --- dix/registry.c | 347 +++++++++++++++++++++++++------------------------ 1 file changed, 174 insertions(+), 173 deletions(-) diff --git a/dix/registry.c b/dix/registry.c index 7b521b55d..48e1b5dae 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -29,6 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "registry.h" #define BASE_SIZE 16 +#define CORE "X11:" static const char ***requests, **events, **errors, **resources; static unsigned nmajor, *nminor, nevent, nerror, nresource; @@ -195,181 +196,181 @@ dixResetRegistry(void) RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); /* Add the core protocol */ - RegisterRequestName(X_CreateWindow, 0, "CreateWindow"); - RegisterRequestName(X_ChangeWindowAttributes, 0, "ChangeWindowAttributes"); - RegisterRequestName(X_GetWindowAttributes, 0, "GetWindowAttributes"); - RegisterRequestName(X_DestroyWindow, 0, "DestroyWindow"); - RegisterRequestName(X_DestroySubwindows, 0, "DestroySubwindows"); - RegisterRequestName(X_ChangeSaveSet, 0, "ChangeSaveSet"); - RegisterRequestName(X_ReparentWindow, 0, "ReparentWindow"); - RegisterRequestName(X_MapWindow, 0, "MapWindow"); - RegisterRequestName(X_MapSubwindows, 0, "MapSubwindows"); - RegisterRequestName(X_UnmapWindow, 0, "UnmapWindow"); - RegisterRequestName(X_UnmapSubwindows, 0, "UnmapSubwindows"); - RegisterRequestName(X_ConfigureWindow, 0, "ConfigureWindow"); - RegisterRequestName(X_CirculateWindow, 0, "CirculateWindow"); - RegisterRequestName(X_GetGeometry, 0, "GetGeometry"); - RegisterRequestName(X_QueryTree, 0, "QueryTree"); - RegisterRequestName(X_InternAtom, 0, "InternAtom"); - RegisterRequestName(X_GetAtomName, 0, "GetAtomName"); - RegisterRequestName(X_ChangeProperty, 0, "ChangeProperty"); - RegisterRequestName(X_DeleteProperty, 0, "DeleteProperty"); - RegisterRequestName(X_GetProperty, 0, "GetProperty"); - RegisterRequestName(X_ListProperties, 0, "ListProperties"); - RegisterRequestName(X_SetSelectionOwner, 0, "SetSelectionOwner"); - RegisterRequestName(X_GetSelectionOwner, 0, "GetSelectionOwner"); - RegisterRequestName(X_ConvertSelection, 0, "ConvertSelection"); - RegisterRequestName(X_SendEvent, 0, "SendEvent"); - RegisterRequestName(X_GrabPointer, 0, "GrabPointer"); - RegisterRequestName(X_UngrabPointer, 0, "UngrabPointer"); - RegisterRequestName(X_GrabButton, 0, "GrabButton"); - RegisterRequestName(X_UngrabButton, 0, "UngrabButton"); - RegisterRequestName(X_ChangeActivePointerGrab, 0, "ChangeActivePointerGrab"); - RegisterRequestName(X_GrabKeyboard, 0, "GrabKeyboard"); - RegisterRequestName(X_UngrabKeyboard, 0, "UngrabKeyboard"); - RegisterRequestName(X_GrabKey, 0, "GrabKey"); - RegisterRequestName(X_UngrabKey, 0, "UngrabKey"); - RegisterRequestName(X_AllowEvents, 0, "AllowEvents"); - RegisterRequestName(X_GrabServer, 0, "GrabServer"); - RegisterRequestName(X_UngrabServer, 0, "UngrabServer"); - RegisterRequestName(X_QueryPointer, 0, "QueryPointer"); - RegisterRequestName(X_GetMotionEvents, 0, "GetMotionEvents"); - RegisterRequestName(X_TranslateCoords, 0, "TranslateCoords"); - RegisterRequestName(X_WarpPointer, 0, "WarpPointer"); - RegisterRequestName(X_SetInputFocus, 0, "SetInputFocus"); - RegisterRequestName(X_GetInputFocus, 0, "GetInputFocus"); - RegisterRequestName(X_QueryKeymap, 0, "QueryKeymap"); - RegisterRequestName(X_OpenFont, 0, "OpenFont"); - RegisterRequestName(X_CloseFont, 0, "CloseFont"); - RegisterRequestName(X_QueryFont, 0, "QueryFont"); - RegisterRequestName(X_QueryTextExtents, 0, "QueryTextExtents"); - RegisterRequestName(X_ListFonts, 0, "ListFonts"); - RegisterRequestName(X_ListFontsWithInfo, 0, "ListFontsWithInfo"); - RegisterRequestName(X_SetFontPath, 0, "SetFontPath"); - RegisterRequestName(X_GetFontPath, 0, "GetFontPath"); - RegisterRequestName(X_CreatePixmap, 0, "CreatePixmap"); - RegisterRequestName(X_FreePixmap, 0, "FreePixmap"); - RegisterRequestName(X_CreateGC, 0, "CreateGC"); - RegisterRequestName(X_ChangeGC, 0, "ChangeGC"); - RegisterRequestName(X_CopyGC, 0, "CopyGC"); - RegisterRequestName(X_SetDashes, 0, "SetDashes"); - RegisterRequestName(X_SetClipRectangles, 0, "SetClipRectangles"); - RegisterRequestName(X_FreeGC, 0, "FreeGC"); - RegisterRequestName(X_ClearArea, 0, "ClearArea"); - RegisterRequestName(X_CopyArea, 0, "CopyArea"); - RegisterRequestName(X_CopyPlane, 0, "CopyPlane"); - RegisterRequestName(X_PolyPoint, 0, "PolyPoint"); - RegisterRequestName(X_PolyLine, 0, "PolyLine"); - RegisterRequestName(X_PolySegment, 0, "PolySegment"); - RegisterRequestName(X_PolyRectangle, 0, "PolyRectangle"); - RegisterRequestName(X_PolyArc, 0, "PolyArc"); - RegisterRequestName(X_FillPoly, 0, "FillPoly"); - RegisterRequestName(X_PolyFillRectangle, 0, "PolyFillRectangle"); - RegisterRequestName(X_PolyFillArc, 0, "PolyFillArc"); - RegisterRequestName(X_PutImage, 0, "PutImage"); - RegisterRequestName(X_GetImage, 0, "GetImage"); - RegisterRequestName(X_PolyText8, 0, "PolyText8"); - RegisterRequestName(X_PolyText16, 0, "PolyText16"); - RegisterRequestName(X_ImageText8, 0, "ImageText8"); - RegisterRequestName(X_ImageText16, 0, "ImageText16"); - RegisterRequestName(X_CreateColormap, 0, "CreateColormap"); - RegisterRequestName(X_FreeColormap, 0, "FreeColormap"); - RegisterRequestName(X_CopyColormapAndFree, 0, "CopyColormapAndFree"); - RegisterRequestName(X_InstallColormap, 0, "InstallColormap"); - RegisterRequestName(X_UninstallColormap, 0, "UninstallColormap"); - RegisterRequestName(X_ListInstalledColormaps, 0, "ListInstalledColormaps"); - RegisterRequestName(X_AllocColor, 0, "AllocColor"); - RegisterRequestName(X_AllocNamedColor, 0, "AllocNamedColor"); - RegisterRequestName(X_AllocColorCells, 0, "AllocColorCells"); - RegisterRequestName(X_AllocColorPlanes, 0, "AllocColorPlanes"); - RegisterRequestName(X_FreeColors, 0, "FreeColors"); - RegisterRequestName(X_StoreColors, 0, "StoreColors"); - RegisterRequestName(X_StoreNamedColor, 0, "StoreNamedColor"); - RegisterRequestName(X_QueryColors, 0, "QueryColors"); - RegisterRequestName(X_LookupColor, 0, "LookupColor"); - RegisterRequestName(X_CreateCursor, 0, "CreateCursor"); - RegisterRequestName(X_CreateGlyphCursor, 0, "CreateGlyphCursor"); - RegisterRequestName(X_FreeCursor, 0, "FreeCursor"); - RegisterRequestName(X_RecolorCursor, 0, "RecolorCursor"); - RegisterRequestName(X_QueryBestSize, 0, "QueryBestSize"); - RegisterRequestName(X_QueryExtension, 0, "QueryExtension"); - RegisterRequestName(X_ListExtensions, 0, "ListExtensions"); - RegisterRequestName(X_ChangeKeyboardMapping, 0, "ChangeKeyboardMapping"); - RegisterRequestName(X_GetKeyboardMapping, 0, "GetKeyboardMapping"); - RegisterRequestName(X_ChangeKeyboardControl, 0, "ChangeKeyboardControl"); - RegisterRequestName(X_GetKeyboardControl, 0, "GetKeyboardControl"); - RegisterRequestName(X_Bell, 0, "Bell"); - RegisterRequestName(X_ChangePointerControl, 0, "ChangePointerControl"); - RegisterRequestName(X_GetPointerControl, 0, "GetPointerControl"); - RegisterRequestName(X_SetScreenSaver, 0, "SetScreenSaver"); - RegisterRequestName(X_GetScreenSaver, 0, "GetScreenSaver"); - RegisterRequestName(X_ChangeHosts, 0, "ChangeHosts"); - RegisterRequestName(X_ListHosts, 0, "ListHosts"); - RegisterRequestName(X_SetAccessControl, 0, "SetAccessControl"); - RegisterRequestName(X_SetCloseDownMode, 0, "SetCloseDownMode"); - RegisterRequestName(X_KillClient, 0, "KillClient"); - RegisterRequestName(X_RotateProperties, 0, "RotateProperties"); - RegisterRequestName(X_ForceScreenSaver, 0, "ForceScreenSaver"); - RegisterRequestName(X_SetPointerMapping, 0, "SetPointerMapping"); - RegisterRequestName(X_GetPointerMapping, 0, "GetPointerMapping"); - RegisterRequestName(X_SetModifierMapping, 0, "SetModifierMapping"); - RegisterRequestName(X_GetModifierMapping, 0, "GetModifierMapping"); - RegisterRequestName(X_NoOperation, 0, "NoOperation"); + RegisterRequestName(X_CreateWindow, 0, CORE "CreateWindow"); + RegisterRequestName(X_ChangeWindowAttributes, 0, CORE "ChangeWindowAttributes"); + RegisterRequestName(X_GetWindowAttributes, 0, CORE "GetWindowAttributes"); + RegisterRequestName(X_DestroyWindow, 0, CORE "DestroyWindow"); + RegisterRequestName(X_DestroySubwindows, 0, CORE "DestroySubwindows"); + RegisterRequestName(X_ChangeSaveSet, 0, CORE "ChangeSaveSet"); + RegisterRequestName(X_ReparentWindow, 0, CORE "ReparentWindow"); + RegisterRequestName(X_MapWindow, 0, CORE "MapWindow"); + RegisterRequestName(X_MapSubwindows, 0, CORE "MapSubwindows"); + RegisterRequestName(X_UnmapWindow, 0, CORE "UnmapWindow"); + RegisterRequestName(X_UnmapSubwindows, 0, CORE "UnmapSubwindows"); + RegisterRequestName(X_ConfigureWindow, 0, CORE "ConfigureWindow"); + RegisterRequestName(X_CirculateWindow, 0, CORE "CirculateWindow"); + RegisterRequestName(X_GetGeometry, 0, CORE "GetGeometry"); + RegisterRequestName(X_QueryTree, 0, CORE "QueryTree"); + RegisterRequestName(X_InternAtom, 0, CORE "InternAtom"); + RegisterRequestName(X_GetAtomName, 0, CORE "GetAtomName"); + RegisterRequestName(X_ChangeProperty, 0, CORE "ChangeProperty"); + RegisterRequestName(X_DeleteProperty, 0, CORE "DeleteProperty"); + RegisterRequestName(X_GetProperty, 0, CORE "GetProperty"); + RegisterRequestName(X_ListProperties, 0, CORE "ListProperties"); + RegisterRequestName(X_SetSelectionOwner, 0, CORE "SetSelectionOwner"); + RegisterRequestName(X_GetSelectionOwner, 0, CORE "GetSelectionOwner"); + RegisterRequestName(X_ConvertSelection, 0, CORE "ConvertSelection"); + RegisterRequestName(X_SendEvent, 0, CORE "SendEvent"); + RegisterRequestName(X_GrabPointer, 0, CORE "GrabPointer"); + RegisterRequestName(X_UngrabPointer, 0, CORE "UngrabPointer"); + RegisterRequestName(X_GrabButton, 0, CORE "GrabButton"); + RegisterRequestName(X_UngrabButton, 0, CORE "UngrabButton"); + RegisterRequestName(X_ChangeActivePointerGrab, 0, CORE "ChangeActivePointerGrab"); + RegisterRequestName(X_GrabKeyboard, 0, CORE "GrabKeyboard"); + RegisterRequestName(X_UngrabKeyboard, 0, CORE "UngrabKeyboard"); + RegisterRequestName(X_GrabKey, 0, CORE "GrabKey"); + RegisterRequestName(X_UngrabKey, 0, CORE "UngrabKey"); + RegisterRequestName(X_AllowEvents, 0, CORE "AllowEvents"); + RegisterRequestName(X_GrabServer, 0, CORE "GrabServer"); + RegisterRequestName(X_UngrabServer, 0, CORE "UngrabServer"); + RegisterRequestName(X_QueryPointer, 0, CORE "QueryPointer"); + RegisterRequestName(X_GetMotionEvents, 0, CORE "GetMotionEvents"); + RegisterRequestName(X_TranslateCoords, 0, CORE "TranslateCoords"); + RegisterRequestName(X_WarpPointer, 0, CORE "WarpPointer"); + RegisterRequestName(X_SetInputFocus, 0, CORE "SetInputFocus"); + RegisterRequestName(X_GetInputFocus, 0, CORE "GetInputFocus"); + RegisterRequestName(X_QueryKeymap, 0, CORE "QueryKeymap"); + RegisterRequestName(X_OpenFont, 0, CORE "OpenFont"); + RegisterRequestName(X_CloseFont, 0, CORE "CloseFont"); + RegisterRequestName(X_QueryFont, 0, CORE "QueryFont"); + RegisterRequestName(X_QueryTextExtents, 0, CORE "QueryTextExtents"); + RegisterRequestName(X_ListFonts, 0, CORE "ListFonts"); + RegisterRequestName(X_ListFontsWithInfo, 0, CORE "ListFontsWithInfo"); + RegisterRequestName(X_SetFontPath, 0, CORE "SetFontPath"); + RegisterRequestName(X_GetFontPath, 0, CORE "GetFontPath"); + RegisterRequestName(X_CreatePixmap, 0, CORE "CreatePixmap"); + RegisterRequestName(X_FreePixmap, 0, CORE "FreePixmap"); + RegisterRequestName(X_CreateGC, 0, CORE "CreateGC"); + RegisterRequestName(X_ChangeGC, 0, CORE "ChangeGC"); + RegisterRequestName(X_CopyGC, 0, CORE "CopyGC"); + RegisterRequestName(X_SetDashes, 0, CORE "SetDashes"); + RegisterRequestName(X_SetClipRectangles, 0, CORE "SetClipRectangles"); + RegisterRequestName(X_FreeGC, 0, CORE "FreeGC"); + RegisterRequestName(X_ClearArea, 0, CORE "ClearArea"); + RegisterRequestName(X_CopyArea, 0, CORE "CopyArea"); + RegisterRequestName(X_CopyPlane, 0, CORE "CopyPlane"); + RegisterRequestName(X_PolyPoint, 0, CORE "PolyPoint"); + RegisterRequestName(X_PolyLine, 0, CORE "PolyLine"); + RegisterRequestName(X_PolySegment, 0, CORE "PolySegment"); + RegisterRequestName(X_PolyRectangle, 0, CORE "PolyRectangle"); + RegisterRequestName(X_PolyArc, 0, CORE "PolyArc"); + RegisterRequestName(X_FillPoly, 0, CORE "FillPoly"); + RegisterRequestName(X_PolyFillRectangle, 0, CORE "PolyFillRectangle"); + RegisterRequestName(X_PolyFillArc, 0, CORE "PolyFillArc"); + RegisterRequestName(X_PutImage, 0, CORE "PutImage"); + RegisterRequestName(X_GetImage, 0, CORE "GetImage"); + RegisterRequestName(X_PolyText8, 0, CORE "PolyText8"); + RegisterRequestName(X_PolyText16, 0, CORE "PolyText16"); + RegisterRequestName(X_ImageText8, 0, CORE "ImageText8"); + RegisterRequestName(X_ImageText16, 0, CORE "ImageText16"); + RegisterRequestName(X_CreateColormap, 0, CORE "CreateColormap"); + RegisterRequestName(X_FreeColormap, 0, CORE "FreeColormap"); + RegisterRequestName(X_CopyColormapAndFree, 0, CORE "CopyColormapAndFree"); + RegisterRequestName(X_InstallColormap, 0, CORE "InstallColormap"); + RegisterRequestName(X_UninstallColormap, 0, CORE "UninstallColormap"); + RegisterRequestName(X_ListInstalledColormaps, 0, CORE "ListInstalledColormaps"); + RegisterRequestName(X_AllocColor, 0, CORE "AllocColor"); + RegisterRequestName(X_AllocNamedColor, 0, CORE "AllocNamedColor"); + RegisterRequestName(X_AllocColorCells, 0, CORE "AllocColorCells"); + RegisterRequestName(X_AllocColorPlanes, 0, CORE "AllocColorPlanes"); + RegisterRequestName(X_FreeColors, 0, CORE "FreeColors"); + RegisterRequestName(X_StoreColors, 0, CORE "StoreColors"); + RegisterRequestName(X_StoreNamedColor, 0, CORE "StoreNamedColor"); + RegisterRequestName(X_QueryColors, 0, CORE "QueryColors"); + RegisterRequestName(X_LookupColor, 0, CORE "LookupColor"); + RegisterRequestName(X_CreateCursor, 0, CORE "CreateCursor"); + RegisterRequestName(X_CreateGlyphCursor, 0, CORE "CreateGlyphCursor"); + RegisterRequestName(X_FreeCursor, 0, CORE "FreeCursor"); + RegisterRequestName(X_RecolorCursor, 0, CORE "RecolorCursor"); + RegisterRequestName(X_QueryBestSize, 0, CORE "QueryBestSize"); + RegisterRequestName(X_QueryExtension, 0, CORE "QueryExtension"); + RegisterRequestName(X_ListExtensions, 0, CORE "ListExtensions"); + RegisterRequestName(X_ChangeKeyboardMapping, 0, CORE "ChangeKeyboardMapping"); + RegisterRequestName(X_GetKeyboardMapping, 0, CORE "GetKeyboardMapping"); + RegisterRequestName(X_ChangeKeyboardControl, 0, CORE "ChangeKeyboardControl"); + RegisterRequestName(X_GetKeyboardControl, 0, CORE "GetKeyboardControl"); + RegisterRequestName(X_Bell, 0, CORE "Bell"); + RegisterRequestName(X_ChangePointerControl, 0, CORE "ChangePointerControl"); + RegisterRequestName(X_GetPointerControl, 0, CORE "GetPointerControl"); + RegisterRequestName(X_SetScreenSaver, 0, CORE "SetScreenSaver"); + RegisterRequestName(X_GetScreenSaver, 0, CORE "GetScreenSaver"); + RegisterRequestName(X_ChangeHosts, 0, CORE "ChangeHosts"); + RegisterRequestName(X_ListHosts, 0, CORE "ListHosts"); + RegisterRequestName(X_SetAccessControl, 0, CORE "SetAccessControl"); + RegisterRequestName(X_SetCloseDownMode, 0, CORE "SetCloseDownMode"); + RegisterRequestName(X_KillClient, 0, CORE "KillClient"); + RegisterRequestName(X_RotateProperties, 0, CORE "RotateProperties"); + RegisterRequestName(X_ForceScreenSaver, 0, CORE "ForceScreenSaver"); + RegisterRequestName(X_SetPointerMapping, 0, CORE "SetPointerMapping"); + RegisterRequestName(X_GetPointerMapping, 0, CORE "GetPointerMapping"); + RegisterRequestName(X_SetModifierMapping, 0, CORE "SetModifierMapping"); + RegisterRequestName(X_GetModifierMapping, 0, CORE "GetModifierMapping"); + RegisterRequestName(X_NoOperation, 0, CORE "NoOperation"); - RegisterErrorName(Success, "Success"); - RegisterErrorName(BadRequest, "BadRequest"); - RegisterErrorName(BadValue, "BadValue"); - RegisterErrorName(BadWindow, "BadWindow"); - RegisterErrorName(BadPixmap, "BadPixmap"); - RegisterErrorName(BadAtom, "BadAtom"); - RegisterErrorName(BadCursor, "BadCursor"); - RegisterErrorName(BadFont, "BadFont"); - RegisterErrorName(BadMatch, "BadMatch"); - RegisterErrorName(BadDrawable, "BadDrawable"); - RegisterErrorName(BadAccess, "BadAccess"); - RegisterErrorName(BadAlloc, "BadAlloc"); - RegisterErrorName(BadColor, "BadColor"); - RegisterErrorName(BadGC, "BadGC"); - RegisterErrorName(BadIDChoice, "BadIDChoice"); - RegisterErrorName(BadName, "BadName"); - RegisterErrorName(BadLength, "BadLength"); - RegisterErrorName(BadImplementation, "BadImplementation"); + RegisterErrorName(Success, CORE "Success"); + RegisterErrorName(BadRequest, CORE "BadRequest"); + RegisterErrorName(BadValue, CORE "BadValue"); + RegisterErrorName(BadWindow, CORE "BadWindow"); + RegisterErrorName(BadPixmap, CORE "BadPixmap"); + RegisterErrorName(BadAtom, CORE "BadAtom"); + RegisterErrorName(BadCursor, CORE "BadCursor"); + RegisterErrorName(BadFont, CORE "BadFont"); + RegisterErrorName(BadMatch, CORE "BadMatch"); + RegisterErrorName(BadDrawable, CORE "BadDrawable"); + RegisterErrorName(BadAccess, CORE "BadAccess"); + RegisterErrorName(BadAlloc, CORE "BadAlloc"); + RegisterErrorName(BadColor, CORE "BadColor"); + RegisterErrorName(BadGC, CORE "BadGC"); + RegisterErrorName(BadIDChoice, CORE "BadIDChoice"); + RegisterErrorName(BadName, CORE "BadName"); + RegisterErrorName(BadLength, CORE "BadLength"); + RegisterErrorName(BadImplementation, CORE "BadImplementation"); - RegisterEventName(X_Error, "Error"); - RegisterEventName(X_Reply, "Reply"); - RegisterEventName(KeyPress, "KeyPress"); - RegisterEventName(KeyRelease, "KeyRelease"); - RegisterEventName(ButtonPress, "ButtonPress"); - RegisterEventName(ButtonRelease, "ButtonRelease"); - RegisterEventName(MotionNotify, "MotionNotify"); - RegisterEventName(EnterNotify, "EnterNotify"); - RegisterEventName(LeaveNotify, "LeaveNotify"); - RegisterEventName(FocusIn, "FocusIn"); - RegisterEventName(FocusOut, "FocusOut"); - RegisterEventName(KeymapNotify, "KeymapNotify"); - RegisterEventName(Expose, "Expose"); - RegisterEventName(GraphicsExpose, "GraphicsExpose"); - RegisterEventName(NoExpose, "NoExpose"); - RegisterEventName(VisibilityNotify, "VisibilityNotify"); - RegisterEventName(CreateNotify, "CreateNotify"); - RegisterEventName(DestroyNotify, "DestroyNotify"); - RegisterEventName(UnmapNotify, "UnmapNotify"); - RegisterEventName(MapNotify, "MapNotify"); - RegisterEventName(MapRequest, "MapRequest"); - RegisterEventName(ReparentNotify, "ReparentNotify"); - RegisterEventName(ConfigureNotify, "ConfigureNotify"); - RegisterEventName(ConfigureRequest, "ConfigureRequest"); - RegisterEventName(GravityNotify, "GravityNotify"); - RegisterEventName(ResizeRequest, "ResizeRequest"); - RegisterEventName(CirculateNotify, "CirculateNotify"); - RegisterEventName(CirculateRequest, "CirculateRequest"); - RegisterEventName(PropertyNotify, "PropertyNotify"); - RegisterEventName(SelectionClear, "SelectionClear"); - RegisterEventName(SelectionRequest, "SelectionRequest"); - RegisterEventName(SelectionNotify, "SelectionNotify"); - RegisterEventName(ColormapNotify, "ColormapNotify"); - RegisterEventName(ClientMessage, "ClientMessage"); - RegisterEventName(MappingNotify, "MappingNotify"); + RegisterEventName(X_Error, CORE "Error"); + RegisterEventName(X_Reply, CORE "Reply"); + RegisterEventName(KeyPress, CORE "KeyPress"); + RegisterEventName(KeyRelease, CORE "KeyRelease"); + RegisterEventName(ButtonPress, CORE "ButtonPress"); + RegisterEventName(ButtonRelease, CORE "ButtonRelease"); + RegisterEventName(MotionNotify, CORE "MotionNotify"); + RegisterEventName(EnterNotify, CORE "EnterNotify"); + RegisterEventName(LeaveNotify, CORE "LeaveNotify"); + RegisterEventName(FocusIn, CORE "FocusIn"); + RegisterEventName(FocusOut, CORE "FocusOut"); + RegisterEventName(KeymapNotify, CORE "KeymapNotify"); + RegisterEventName(Expose, CORE "Expose"); + RegisterEventName(GraphicsExpose, CORE "GraphicsExpose"); + RegisterEventName(NoExpose, CORE "NoExpose"); + RegisterEventName(VisibilityNotify, CORE "VisibilityNotify"); + RegisterEventName(CreateNotify, CORE "CreateNotify"); + RegisterEventName(DestroyNotify, CORE "DestroyNotify"); + RegisterEventName(UnmapNotify, CORE "UnmapNotify"); + RegisterEventName(MapNotify, CORE "MapNotify"); + RegisterEventName(MapRequest, CORE "MapRequest"); + RegisterEventName(ReparentNotify, CORE "ReparentNotify"); + RegisterEventName(ConfigureNotify, CORE "ConfigureNotify"); + RegisterEventName(ConfigureRequest, CORE "ConfigureRequest"); + RegisterEventName(GravityNotify, CORE "GravityNotify"); + RegisterEventName(ResizeRequest, CORE "ResizeRequest"); + RegisterEventName(CirculateNotify, CORE "CirculateNotify"); + RegisterEventName(CirculateRequest, CORE "CirculateRequest"); + RegisterEventName(PropertyNotify, CORE "PropertyNotify"); + RegisterEventName(SelectionClear, CORE "SelectionClear"); + RegisterEventName(SelectionRequest, CORE "SelectionRequest"); + RegisterEventName(SelectionNotify, CORE "SelectionNotify"); + RegisterEventName(ColormapNotify, CORE "ColormapNotify"); + RegisterEventName(ClientMessage, CORE "ClientMessage"); + RegisterEventName(MappingNotify, CORE "MappingNotify"); } #endif /* XREGISTRY */ From 31110d6837ee52fd654729d9e5c4b0c5395abab0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 18 Oct 2007 10:30:44 -0400 Subject: [PATCH 177/552] registry: special case minor number when looking up core requests. --- dix/registry.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/registry.c b/dix/registry.c index 48e1b5dae..01818582e 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -123,6 +123,8 @@ RegisterResourceName(RESTYPE resource, const char *name) const char * LookupRequestName(int major, int minor) { + if (major < 128) + minor = 0; if (major >= nmajor) return XREGISTRY_UNKNOWN; if (minor >= nminor[major]) From 6107a245035366fe762756b6aa05ac0e3a5482bb Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 18 Oct 2007 12:24:55 -0400 Subject: [PATCH 178/552] dix: Add client parameter to AddPassiveGrabsToList(). --- Xi/exevents.c | 4 ++-- dix/events.c | 4 ++-- dix/grabs.c | 5 ++--- include/dixgrabs.h | 1 + 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 9a179500b..7a54c08d2 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -566,7 +566,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, DeviceButtonPress, button, confineTo, cursor); if (!grab) return BadAlloc; - return AddPassiveGrabToList(grab); + return AddPassiveGrabToList(client, grab); } int @@ -621,7 +621,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, NullWindow, NullCursor); if (!grab) return BadAlloc; - return AddPassiveGrabToList(grab); + return AddPassiveGrabToList(client, grab); } int diff --git a/dix/events.c b/dix/events.c index bb5b9507b..246220f59 100644 --- a/dix/events.c +++ b/dix/events.c @@ -4727,7 +4727,7 @@ ProcGrabKey(ClientPtr client) NullWindow, NullCursor); if (!grab) return BadAlloc; - return AddPassiveGrabToList(grab); + return AddPassiveGrabToList(client, grab); } @@ -4815,7 +4815,7 @@ ProcGrabButton(ClientPtr client) stuff->button, confineTo, cursor); if (!grab) return BadAlloc; - return AddPassiveGrabToList(grab); + return AddPassiveGrabToList(client, grab); } /** diff --git a/dix/grabs.c b/dix/grabs.c index b8d0df88d..229329699 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -307,7 +307,7 @@ GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab) * @return Success or X error code on failure. */ int -AddPassiveGrabToList(GrabPtr pGrab) +AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab) { GrabPtr grab; Mask access_mode = DixGrabAccess; @@ -327,8 +327,7 @@ AddPassiveGrabToList(GrabPtr pGrab) if (grab->keyboardMode == GrabModeSync || grab->pointerMode == GrabModeSync) access_mode |= DixFreezeAccess; - rc = XaceHook(XACE_DEVICE_ACCESS, clients[CLIENT_ID(grab->resource)], - grab->device, access_mode); + rc = XaceHook(XACE_DEVICE_ACCESS, client, grab->device, access_mode); if (rc != Success) return rc; diff --git a/include/dixgrabs.h b/include/dixgrabs.h index 2d66d6ba1..f93e99957 100644 --- a/include/dixgrabs.h +++ b/include/dixgrabs.h @@ -50,6 +50,7 @@ extern Bool GrabMatchesSecond( GrabPtr /* pSecondGrab */); extern int AddPassiveGrabToList( + ClientPtr /* client */, GrabPtr /* pGrab */); extern Bool DeletePassiveGrabFromList( From 06eb830169afd0631a31e8846c7d2533c49ea378 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 18 Oct 2007 12:31:14 -0400 Subject: [PATCH 179/552] xace: Fix bug in AddPassiveGrabToList(), was using wrong GrabPtr. --- dix/grabs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dix/grabs.c b/dix/grabs.c index 229329699..a42a46f10 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -325,9 +325,9 @@ AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab) } } - if (grab->keyboardMode == GrabModeSync || grab->pointerMode == GrabModeSync) + if (pGrab->keyboardMode == GrabModeSync||pGrab->pointerMode == GrabModeSync) access_mode |= DixFreezeAccess; - rc = XaceHook(XACE_DEVICE_ACCESS, client, grab->device, access_mode); + rc = XaceHook(XACE_DEVICE_ACCESS, client, pGrab->device, access_mode); if (rc != Success) return rc; From e974bc1233608ec09fbd40b12217925e4d2205aa Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 18 Oct 2007 12:33:39 -0400 Subject: [PATCH 180/552] xselinux: add hooks for send and receive access. --- Xext/xselinux.c | 130 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 86 insertions(+), 44 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 8bafa1fec..2e36622b2 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -62,7 +62,7 @@ static DevPrivateKey stateKey = &stateKey; typedef struct { security_id_t sid; struct avc_entry_ref aeref; - char *client_path; + char *command; } SELinuxStateRec; /* audit file descriptor */ @@ -71,7 +71,7 @@ static int audit_fd; /* structure passed to auditing callback */ typedef struct { ClientPtr client; /* client */ - char *client_path; /* client's executable path */ + char *command; /* client's executable path */ unsigned id; /* resource id, if any */ int restype; /* resource type, if any */ Atom property; /* property name, if any */ @@ -170,21 +170,17 @@ SELinuxTypeToClass(RESTYPE type) * Performs an SELinux permission check. */ static int -SELinuxDoCheck(ClientPtr client, SELinuxStateRec *obj, security_class_t class, - Mask access_mode, SELinuxAuditRec *auditdata) +SELinuxDoCheck(int clientIndex, SELinuxStateRec *subj, SELinuxStateRec *obj, + security_class_t class, Mask mode, SELinuxAuditRec *auditdata) { - SELinuxStateRec *subj; - /* serverClient requests OK */ - if (client->index == 0) + if (clientIndex == 0) return Success; - subj = dixLookupPrivate(&client->devPrivates, stateKey); - auditdata->client = client; - auditdata->client_path = subj->client_path; + auditdata->command = subj->command; errno = 0; - if (avc_has_perm(subj->sid, obj->sid, class, access_mode, &subj->aeref, + if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref, auditdata) < 0) { if (errno == EACCES) return BadAccess; @@ -250,23 +246,25 @@ SELinuxAudit(void *auditdata, SELinuxAuditRec *audit = auditdata; ClientPtr client = audit->client; char idNum[16], *propertyName; - int major = 0, minor = 0; - REQUEST(xReq); + int major = -1, minor = -1; + if (client) { + REQUEST(xReq); + if (stuff) { + major = stuff->reqType; + minor = MinorOpcodeOfRequest(client); + } + } if (audit->id) snprintf(idNum, 16, "%x", audit->id); - if (stuff) { - major = stuff->reqType; - minor = (major < 128) ? 0 : MinorOpcodeOfRequest(client); - } propertyName = audit->property ? NameForAtom(audit->property) : NULL; return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s", - stuff ? "request=" : "", - stuff ? LookupRequestName(major, minor) : "", - audit->client_path ? " comm=" : "", - audit->client_path ? audit->client_path : "", + (major >= 0) ? "request=" : "", + (major >= 0) ? LookupRequestName(major, minor) : "", + audit->command ? " comm=" : "", + audit->command ? audit->command : "", audit->id ? " resid=" : "", audit->id ? idNum : "", audit->restype ? " restype=" : "", @@ -296,7 +294,7 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceDeviceAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -315,18 +313,59 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) } } - rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_DEVICE, + rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_DEVICE, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; } +static void +SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceSendAccessRec *rec = calldata; + SELinuxStateRec *subj, *obj; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + int clientIndex, rc; + + if (rec->dev) { + subj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); + clientIndex = -1; /* some nonzero value */ + } else { + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + clientIndex = rec->client->index; + } + + obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); + + rc = SELinuxDoCheck(clientIndex, subj, obj, SECCLASS_X_DRAWABLE, + DixSendAccess, &auditdata); + if (rc != Success) + rec->status = rc; +} + +static void +SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceReceiveAccessRec *rec = calldata; + SELinuxStateRec *subj, *obj; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); + + rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_DRAWABLE, + DixReceiveAccess, &auditdata); + if (rc != Success) + rec->status = rc; +} + static void SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceExtAccessRec *rec = calldata; SELinuxStateRec *subj, *obj, *serv; - SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -369,7 +408,7 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Perform the security check */ auditdata.extension = rec->ext->name; - rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_EXTENSION, + rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_EXTENSION, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; @@ -380,7 +419,7 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XacePropertyAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -421,7 +460,7 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Perform the security check */ auditdata.property = rec->pProp->propertyName; - rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_PROPERTY, + rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_PROPERTY, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; @@ -432,7 +471,7 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceResourceAccessRec *rec = calldata; SELinuxStateRec *subj, *obj, *pobj; - SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; PrivateRec **privatePtr; security_class_t class; int rc, offset; @@ -477,7 +516,8 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Perform the security check */ auditdata.restype = rec->rtype; auditdata.id = rec->id; - rc = SELinuxDoCheck(rec->client, obj, class, rec->access_mode, &auditdata); + rc = SELinuxDoCheck(rec->client->index, subj, obj, class, + rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; } @@ -487,7 +527,7 @@ SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) { XaceScreenAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; Mask access_mode = rec->access_mode; int rc; @@ -510,7 +550,7 @@ SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) if (is_saver) access_mode <<= 2; - rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_SCREEN, + rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_SCREEN, access_mode, &auditdata); if (rc != Success) rec->status = rc; @@ -520,13 +560,14 @@ static void SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceClientAccessRec *rec = calldata; - SELinuxStateRec *obj; - SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + SELinuxStateRec *subj, *obj; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; int rc; + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); - rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_CLIENT, + rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_CLIENT, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; @@ -536,13 +577,14 @@ static void SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceServerAccessRec *rec = calldata; - SELinuxStateRec *obj; - SELinuxAuditRec auditdata = { NULL, NULL, 0, 0, 0, NULL }; + SELinuxStateRec *subj, *obj; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; int rc; + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); - rc = SELinuxDoCheck(rec->client, obj, SECCLASS_X_SERVER, + rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_SERVER, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; @@ -595,12 +637,12 @@ SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (bytes <= 0) goto finish; - state->client_path = xalloc(bytes); - if (!state->client_path) + state->command = xalloc(bytes); + if (!state->command) goto finish; - memcpy(state->client_path, path, bytes); - state->client_path[bytes - 1] = 0; + memcpy(state->command, path, bytes); + state->command[bytes - 1] = 0; } else /* For remote clients, need to use a default context */ if (selabel_lookup(label_hnd, &ctx, NULL, SELABEL_X_CLIENT) < 0) @@ -685,7 +727,7 @@ SELinuxStateFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) PrivateCallbackRec *rec = calldata; SELinuxStateRec *state = *rec->value; - xfree(state->client_path); + xfree(state->command); if (avc_active) sidput(state->sid); @@ -787,8 +829,8 @@ XSELinuxExtensionInit(INITARGS) ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, 0); ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, 0); ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, 0); -// ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, 0); -// ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, 0); + ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, 0); + ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, 0); ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, 0); ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, 0); ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, 0); From 55a96aa6b0995fda6660b7e78c85b955a62b9735 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 18 Oct 2007 14:11:11 -0400 Subject: [PATCH 181/552] xselinux: add basic event labeling. --- Xext/xselinux.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++--- Xext/xselinux.h | 3 +- 2 files changed, 88 insertions(+), 5 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 2e36622b2..8b1898dac 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -95,6 +95,10 @@ static security_id_t unlabeled_sid; static security_class_t *knownTypes; static unsigned numKnownTypes; +/* Array of event SIDs indexed by event type */ +static security_id_t *knownEvents; +static unsigned numKnownEvents; + /* dynamically allocated security classes and permissions */ static struct security_class_mapping map[] = { { "x_drawable", { "read", "write", "destroy", "create", "getattr", "setattr", "list_property", "get_property", "set_property", "", "", "list_child", "add_child", "remove_child", "hide", "show", "blend", "override", "", "", "", "", "send", "receive", "", "manage", NULL }}, @@ -109,6 +113,7 @@ static struct security_class_mapping map[] = { { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "", "manage", "", "bell", NULL }}, { "x_server", { "record", "", "", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "grab", "", "", "", "", "", "", "", "manage", "debug", NULL }}, { "x_extension", { "", "", "", "", "query", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, + { "x_event", { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "send", "receive", NULL }}, { "x_resource", { "read", "write", "write", "write", "read", "write", "read", "read", "write", "read", "write", "read", "write", "write", "write", "read", "read", "write", "write", "write", "write", "write", "write", "read", "read", "write", "read", "write", NULL }}, { NULL } }; @@ -121,6 +126,43 @@ static void SELinuxScreen(CallbackListPtr *, pointer, pointer); * Support Routines */ +/* + * Looks up the SID corresponding to the given event type + */ +static int +SELinuxEventToSID(int type, SELinuxStateRec *sid_return) +{ + const char *name = LookupEventName(type); + security_context_t con; + + if (type >= numKnownEvents) { + /* Need to increase size of classes array */ + unsigned size = sizeof(security_id_t); + knownEvents = xrealloc(knownEvents, (type + 1) * size); + if (!knownEvents) + return BadAlloc; + memset(knownEvents + numKnownEvents, 0, + (type - numKnownEvents + 1) * size); + } + + if (!knownEvents[type]) { + /* Look in the mappings of property names to contexts */ + if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EVENT) < 0) { + ErrorF("XSELinux: an event label lookup failed!\n"); + return BadValue; + } + /* Get a SID for context */ + if (avc_context_to_sid(con, knownEvents + type) < 0) { + ErrorF("XSELinux: a context_to_SID call failed!\n"); + return BadAlloc; + } + freecon(con); + } + + sid_return->sid = knownEvents[type]; + return Success; +} + /* * Returns the object class corresponding to the given resource type. */ @@ -325,7 +367,7 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceSendAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; - int clientIndex, rc; + int rc, i, clientIndex; if (rec->dev) { subj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); @@ -337,10 +379,28 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); + /* Check send permission on window */ rc = SELinuxDoCheck(clientIndex, subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess, &auditdata); if (rc != Success) - rec->status = rc; + goto err; + + /* Check send permission on specific event types */ + for (i = 0; i < rec->count; i++) { + SELinuxStateRec ev_sid; + + rc = SELinuxEventToSID(rec->events[i].u.u.type, &ev_sid); + if (rc != Success) + goto err; + + rc = SELinuxDoCheck(clientIndex, subj, &ev_sid, SECCLASS_X_EVENT, + DixSendAccess, &auditdata); + if (rc != Success) + goto err; + } + return; +err: + rec->status = rc; } static void @@ -349,15 +409,33 @@ SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceReceiveAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; - int rc; + int rc, i; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); + /* Check receive permission on window */ rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess, &auditdata); if (rc != Success) - rec->status = rc; + goto err; + + /* Check receive permission on specific event types */ + for (i = 0; i < rec->count; i++) { + SELinuxStateRec ev_sid; + + rc = SELinuxEventToSID(rec->events[i].u.u.type, &ev_sid); + if (rc != Success) + goto err; + + rc = SELinuxDoCheck(rec->client->index, subj, &ev_sid, SECCLASS_X_EVENT, + DixReceiveAccess, &auditdata); + if (rc != Success) + goto err; + } + return; +err: + rec->status = rc; } static void @@ -762,6 +840,10 @@ SELinuxResetProc(ExtensionEntry *extEntry) avc_destroy(); avc_active = 0; + xfree(knownEvents); + knownEvents = NULL; + numKnownEvents = 0; + xfree(knownTypes); knownTypes = NULL; numKnownTypes = 0; diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 02ec86bf3..407b81f93 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -42,6 +42,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define SECCLASS_X_DEVICE 10 #define SECCLASS_X_SERVER 11 #define SECCLASS_X_EXTENSION 12 -#define SECCLASS_X_RESOURCE 13 +#define SECCLASS_X_EVENT 13 +#define SECCLASS_X_RESOURCE 14 #endif /* _XSELINUX_H */ From 12e889d202ac9849f534c51167cbfed91c32027a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 19 Oct 2007 18:43:38 -0400 Subject: [PATCH 182/552] xace: Bug fixes, name changes to selection access hooks and fields. --- dix/dispatch.c | 25 ++++++++++++------------- include/selection.h | 4 ++-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 50384db30..2cfeb2df9 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1024,7 +1024,7 @@ ProcSetSelectionOwner(ClientPtr client) return Success; rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - CurrentSelections[i], DixSetAttrAccess); + CurrentSelections + i, DixSetAttrAccess); if (rc != Success) return rc; @@ -1058,17 +1058,15 @@ ProcSetSelectionOwner(ClientPtr client) CurrentSelections = newsels; CurrentSelections[i].selection = stuff->selection; CurrentSelections[i].devPrivates = NULL; - rc = XaceHook(XACE_SELECTION_ACCESS, stuff->selection, - CurrentSelections[i], DixSetAttrAccess); + rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, + CurrentSelections + i, DixSetAttrAccess); if (rc != Success) return rc; } CurrentSelections[i].lastTimeChanged = time; CurrentSelections[i].window = stuff->window; - CurrentSelections[i].destwindow = stuff->window; CurrentSelections[i].pWin = pWin; CurrentSelections[i].client = (pWin ? client : NullClient); - CurrentSelections[i].destclient = (pWin ? client : NullClient); if (SelectionCallback) { SelectionInfoRec info; @@ -1100,19 +1098,20 @@ ProcGetSelectionOwner(ClientPtr client) i = 0; while ((i < NumCurrentSelections) && CurrentSelections[i].selection != stuff->id) i++; + + rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->id, + CurrentSelections + i, DixGetAttrAccess); + if (rc != Success) + return rc; + reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; if (i < NumCurrentSelections) - reply.owner = CurrentSelections[i].destwindow; + reply.owner = CurrentSelections[i].window; else reply.owner = None; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->id, NULL, - DixGetAttrAccess); - if (rc != Success) - return rc; - WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply); return(client->noClientException); } @@ -1150,7 +1149,7 @@ ProcConvertSelection(ClientPtr client) if ((i < NumCurrentSelections) && (CurrentSelections[i].window != None) && XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - &CurrentSelections[i], DixReadAccess) == Success) + CurrentSelections + i, DixReadAccess) == Success) { event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; @@ -1160,7 +1159,7 @@ ProcConvertSelection(ClientPtr client) event.u.selectionRequest.target = stuff->target; event.u.selectionRequest.property = stuff->property; if (TryClientEvents( - CurrentSelections[i].destclient, &event, 1, NoEventMask, + CurrentSelections[i].client, &event, 1, NoEventMask, NoEventMask /* CantBeFiltered */, NullGrab)) return (client->noClientException); } diff --git a/include/selection.h b/include/selection.h index 93473767a..859b6a3b5 100644 --- a/include/selection.h +++ b/include/selection.h @@ -62,8 +62,8 @@ typedef struct _Selection { Window window; WindowPtr pWin; ClientPtr client; - ClientPtr destclient; /* support for redirection */ - Window destwindow; /* support for redirection */ + ClientPtr alt_client; /* support for redirection */ + Window alt_window; /* support for redirection */ PrivateRec *devPrivates; } Selection; From ce7f6fe1268fef4f89aa21c7b44d73ecd98efe24 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 19 Oct 2007 19:40:04 -0400 Subject: [PATCH 183/552] xselinux: properly update sizes when dynamic arrays are resized... --- Xext/xselinux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 8b1898dac..14a2270e2 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -143,6 +143,7 @@ SELinuxEventToSID(int type, SELinuxStateRec *sid_return) return BadAlloc; memset(knownEvents + numKnownEvents, 0, (type - numKnownEvents + 1) * size); + numKnownEvents = type + 1; } if (!knownEvents[type]) { @@ -180,6 +181,7 @@ SELinuxTypeToClass(RESTYPE type) return 0; memset(knownTypes + numKnownTypes, 0, (type - numKnownTypes + 1) * size); + numKnownTypes = type + 1; } if (!knownTypes[type]) { From 9e0a468af19d8e46330bcff37c9adc5e11d3aee7 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 23 Oct 2007 13:35:30 -0400 Subject: [PATCH 184/552] xace: try to pretend events were sent when a denial occurs. Probably need to redo the error return paths in these functions at some point. --- dix/events.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dix/events.c b/dix/events.c index 246220f59..24de94767 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1754,7 +1754,7 @@ DeliverEventsToWindow(WindowPtr pWin, xEvent *pEvents, int count, !((wOtherEventMasks(pWin)|pWin->eventMask) & filter)) return 0; if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) - nondeliveries--; + /* do nothing */; else if ( (attempt = TryClientEvents(wClient(pWin), pEvents, count, pWin->eventMask, filter, grab)) ) { @@ -1785,7 +1785,7 @@ DeliverEventsToWindow(WindowPtr pWin, xEvent *pEvents, int count, { if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents, count)) - nondeliveries--; + /* do nothing */; else if ( (attempt = TryClientEvents(rClient(other), pEvents, count, other->mask[mskidx], filter, grab)) ) { @@ -1884,7 +1884,7 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, wClient(pWin), NullGrab, pWin->eventMask, filter); #endif if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) - return 0; + return 1; /* don't send, but pretend we did */ return TryClientEvents(wClient(pWin), pEvents, count, pWin->eventMask, filter, NullGrab); } @@ -1901,7 +1901,7 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, #endif if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents, count)) - return 0; + return 1; /* don't send, but pretend we did */ return TryClientEvents(rClient(other), pEvents, count, other->mask, filter, NullGrab); } @@ -2896,9 +2896,9 @@ DeliverFocusedEvent(DeviceIntPtr keybd, xEvent *xE, WindowPtr window, int count) if (DeliverDeviceEvents(window, xE, NullGrab, focus, keybd, count)) return; } - /* just deliver it to the focus window */ if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count)) return; + /* just deliver it to the focus window */ FixUpEventFromWindow(xE, focus, None, FALSE); if (xE->u.u.type & EXTENSION_EVENT_BASE) mskidx = keybd->id; @@ -2947,9 +2947,11 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, if (!deliveries) { FixUpEventFromWindow(xE, grab->window, None, TRUE); - if (!XaceHook(XACE_SEND_ACCESS, 0, thisDev, grab->window, xE, count) && - !XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), grab->window, xE, - count)) + if (XaceHook(XACE_SEND_ACCESS, 0, thisDev, grab->window, xE, count) || + XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), grab->window, xE, + count)) + deliveries = 1; /* don't send, but pretend we did */ + else deliveries = TryClientEvents(rClient(grab), xE, count, (Mask)grab->eventMask, filters[xE->u.u.type], grab); From d7db549db41a27aef28cff9bfb7973bc741f88b2 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 23 Oct 2007 14:08:54 -0400 Subject: [PATCH 185/552] xselinux: Unregister callbacks on server reset. --- Xext/xselinux.c | 50 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 14a2270e2..183a047dc 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -121,6 +121,9 @@ static struct security_class_mapping map[] = { /* forward declarations */ static void SELinuxScreen(CallbackListPtr *, pointer, pointer); +/* "true" pointer value for use as callback data */ +static pointer truep = (pointer)1; + /* * Support Routines @@ -832,8 +835,24 @@ ProcSELinuxDispatch(ClientPtr client) static void SELinuxResetProc(ExtensionEntry *extEntry) { - /* XXX unregister all callbacks here */ + /* Unregister callbacks */ + DeleteCallback(&ClientStateCallback, SELinuxClientState, NULL); + DeleteCallback(&ResourceStateCallback, SELinuxResourceState, NULL); + XaceDeleteCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL); + XaceDeleteCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL); + XaceDeleteCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL); + XaceDeleteCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL); + XaceDeleteCallback(XACE_SEND_ACCESS, SELinuxSend, NULL); + XaceDeleteCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL); + XaceDeleteCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL); + XaceDeleteCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL); + XaceDeleteCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL); +// XaceDeleteCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); + XaceDeleteCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); + XaceDeleteCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); + + /* Tear down SELinux stuff */ selabel_close(label_hnd); label_hnd = NULL; @@ -842,6 +861,7 @@ SELinuxResetProc(ExtensionEntry *extEntry) avc_destroy(); avc_active = 0; + /* Free local state */ xfree(knownEvents); knownEvents = NULL; numKnownEvents = 0; @@ -906,21 +926,21 @@ XSELinuxExtensionInit(INITARGS) ret &= dixRegisterPrivateInitFunc(stateKey, SELinuxStateInit, NULL); ret &= dixRegisterPrivateDeleteFunc(stateKey, SELinuxStateFree, NULL); - ret &= AddCallback(&ClientStateCallback, SELinuxClientState, 0); - ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, 0); + ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL); + ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL); - ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, 0); - ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, 0); - ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, 0); - ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, 0); - ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, 0); - ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, 0); - ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, 0); - ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, 0); - ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, 0); -// ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, 0); - ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, 0); - ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, &ret); + ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL); + ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL); + ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL); + ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL); + ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, NULL); + ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL); + ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL); + ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL); + ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL); +// ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); + ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); + ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); if (!ret) FatalError("XSELinux: Failed to register one or more callbacks\n"); From 660557593ea961948722298ea8ffba83891c9914 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 23 Oct 2007 14:46:37 -0400 Subject: [PATCH 186/552] xselinux: Remove synthetic bit when looking up event type. --- Xext/xselinux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 183a047dc..ef5be571f 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -133,10 +133,11 @@ static pointer truep = (pointer)1; * Looks up the SID corresponding to the given event type */ static int -SELinuxEventToSID(int type, SELinuxStateRec *sid_return) +SELinuxEventToSID(unsigned type, SELinuxStateRec *sid_return) { const char *name = LookupEventName(type); security_context_t con; + type &= 127; if (type >= numKnownEvents) { /* Need to increase size of classes array */ From 825f09dffd94cfcd0562a01c5181998503851461 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 23 Oct 2007 17:12:57 -0400 Subject: [PATCH 187/552] xace: Still more changes to selection code. Removed the SelectionPtr from the hook - the hook only needs the Atom to control access to the selection object. Upgraded the SelectionCallback to take a client argument and additional type codes so that it can be used for redirection. --- Xext/xace.c | 1 - Xext/xacestr.h | 1 - dix/dispatch.c | 58 +++++++++++++++++++++++++++++--------------------- include/dix.h | 3 +++ 4 files changed, 37 insertions(+), 26 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index b12666159..7b27ecd6a 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -177,7 +177,6 @@ int XaceHook(int hook, ...) XaceSelectionAccessRec rec = { va_arg(ap, ClientPtr), va_arg(ap, Atom), - va_arg(ap, Selection*), va_arg(ap, Mask), Success /* default allow */ }; diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 1c615433b..045f8364f 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -112,7 +112,6 @@ typedef struct { typedef struct { ClientPtr client; Atom name; - Selection *selection; Mask access_mode; int status; } XaceSelectionAccessRec; diff --git a/dix/dispatch.c b/dix/dispatch.c index 2cfeb2df9..814c2a853 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1005,6 +1005,11 @@ ProcSetSelectionOwner(ClientPtr client) { int i = 0; + rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, + DixSetAttrAccess); + if (rc != Success) + return rc; + /* * First, see if the selection is already set... */ @@ -1022,12 +1027,6 @@ ProcSetSelectionOwner(ClientPtr client) if (CompareTimeStamps(time, CurrentSelections[i].lastTimeChanged) == EARLIER) return Success; - - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - CurrentSelections + i, DixSetAttrAccess); - if (rc != Success) - return rc; - if (CurrentSelections[i].client && (!pWin || (CurrentSelections[i].client != client))) { @@ -1058,10 +1057,6 @@ ProcSetSelectionOwner(ClientPtr client) CurrentSelections = newsels; CurrentSelections[i].selection = stuff->selection; CurrentSelections[i].devPrivates = NULL; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - CurrentSelections + i, DixSetAttrAccess); - if (rc != Success) - return rc; } CurrentSelections[i].lastTimeChanged = time; CurrentSelections[i].window = stuff->window; @@ -1072,6 +1067,7 @@ ProcSetSelectionOwner(ClientPtr client) SelectionInfoRec info; info.selection = &CurrentSelections[i]; + info.client = client; info.kind= SelectionSetOwner; CallCallbacks(&SelectionCallback, &info); } @@ -1095,23 +1091,29 @@ ProcGetSelectionOwner(ClientPtr client) int rc, i; xGetSelectionOwnerReply reply; - i = 0; - while ((i < NumCurrentSelections) && - CurrentSelections[i].selection != stuff->id) i++; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->id, - CurrentSelections + i, DixGetAttrAccess); + DixGetAttrAccess); if (rc != Success) return rc; + i = 0; + while ((i < NumCurrentSelections) && + CurrentSelections[i].selection != stuff->id) i++; reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; - if (i < NumCurrentSelections) - reply.owner = CurrentSelections[i].window; - else - reply.owner = None; + if (i < NumCurrentSelections) { + if (SelectionCallback) { + SelectionInfoRec info; + info.selection = &CurrentSelections[i]; + info.client = client; + info.kind= SelectionGetOwner; + CallCallbacks(&SelectionCallback, &info); + } + reply.owner = CurrentSelections[i].window; + } else + reply.owner = None; WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply); return(client->noClientException); } @@ -1135,6 +1137,10 @@ ProcConvertSelection(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess); if (rc != Success) return rc; + rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, + DixReadAccess); + if (rc != Success) + return rc; paramsOkay = (ValidAtom(stuff->selection) && ValidAtom(stuff->target)); if (stuff->property != None) @@ -1146,11 +1152,15 @@ ProcConvertSelection(ClientPtr client) i = 0; while ((i < NumCurrentSelections) && CurrentSelections[i].selection != stuff->selection) i++; - if ((i < NumCurrentSelections) && - (CurrentSelections[i].window != None) && - XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - CurrentSelections + i, DixReadAccess) == Success) - { + if (i < NumCurrentSelections && CurrentSelections[i].window != None) { + if (SelectionCallback) { + SelectionInfoRec info; + + info.selection = &CurrentSelections[i]; + info.client = client; + info.kind= SelectionConvertSelection; + CallCallbacks(&SelectionCallback, &info); + } event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; event.u.selectionRequest.owner = CurrentSelections[i].window; diff --git a/include/dix.h b/include/dix.h index 09ed6d944..30fdc45b1 100644 --- a/include/dix.h +++ b/include/dix.h @@ -594,12 +594,15 @@ extern CallbackListPtr SelectionCallback; typedef enum { SelectionSetOwner, + SelectionGetOwner, + SelectionConvertSelection, SelectionWindowDestroy, SelectionClientClose } SelectionCallbackKind; typedef struct { struct _Selection *selection; + ClientPtr client; SelectionCallbackKind kind; } SelectionInfoRec; From 46521f529841e032e198e5df87974088548a68de Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 23 Oct 2007 20:58:48 -0400 Subject: [PATCH 188/552] xselinux: Add basic support for selection access control and redirection. Probably not fully baked yet. It's difficult to test since so few apps actually follow the ICCCM with respect to cut & paste. --- Xext/xselinux.c | 371 ++++++++++++++++++++++++++++++++++++++++-------- Xext/xselinux.h | 37 +++++ 2 files changed, 348 insertions(+), 60 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index ef5be571f..f11bc1aaa 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -65,6 +65,15 @@ typedef struct { char *command; } SELinuxStateRec; +/* selection manager */ +typedef struct { + Atom selection; + security_id_t sid; +} SELinuxSelectionRec; + +static ClientPtr selectionManager; +static Window selectionWindow; + /* audit file descriptor */ static int audit_fd; @@ -99,6 +108,10 @@ static unsigned numKnownTypes; static security_id_t *knownEvents; static unsigned numKnownEvents; +/* Array of selection SID structures */ +static SELinuxSelectionRec *knownSelections; +static unsigned numKnownSelections; + /* dynamically allocated security classes and permissions */ static struct security_class_mapping map[] = { { "x_drawable", { "read", "write", "destroy", "create", "getattr", "setattr", "list_property", "get_property", "set_property", "", "", "list_child", "add_child", "remove_child", "hide", "show", "blend", "override", "", "", "", "", "send", "receive", "", "manage", NULL }}, @@ -129,6 +142,52 @@ static pointer truep = (pointer)1; * Support Routines */ +/* + * Looks up the SID corresponding to the given selection atom + */ +static int +SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return) +{ + const char *name; + unsigned i, size; + + for (i = 0; i < numKnownSelections; i++) + if (knownSelections[i].selection == selection) { + sid_return->sid = knownSelections[i].sid; + return Success; + } + + /* Need to increase size of array */ + i = numKnownSelections; + size = (i + 1) * sizeof(SELinuxSelectionRec); + knownSelections = xrealloc(knownSelections, size); + if (!knownSelections) + return BadAlloc; + knownSelections[i].selection = selection; + + /* Look in the mappings of selection names to contexts */ + name = NameForAtom(selection); + if (name) { + security_context_t con; + security_id_t sid; + + if (selabel_lookup(label_hnd, &con, name, SELABEL_X_SELN) < 0) { + ErrorF("XSELinux: a selection label lookup failed!\n"); + return BadValue; + } + /* Get a SID for context */ + if (avc_context_to_sid(con, &sid) < 0) { + ErrorF("XSELinux: a context_to_SID call failed!\n"); + return BadAlloc; + } + freecon(con); + knownSelections[i].sid = sid_return->sid = sid; + } else + knownSelections[i].sid = sid_return->sid = unlabeled_sid; + + return Success; +} + /* * Looks up the SID corresponding to the given event type */ @@ -239,11 +298,72 @@ SELinuxDoCheck(int clientIndex, SELinuxStateRec *subj, SELinuxStateRec *obj, return Success; } +/* + * Labels a newly connected client. + */ +static void +SELinuxLabelClient(ClientPtr client) +{ + XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; + SELinuxStateRec *state; + security_context_t ctx; + + state = dixLookupPrivate(&client->devPrivates, stateKey); + sidput(state->sid); + + if (_XSERVTransIsLocal(ci)) { + int fd = _XSERVTransGetConnectionNumber(ci); + struct ucred creds; + socklen_t len = sizeof(creds); + char path[PATH_MAX + 1]; + size_t bytes; + + /* For local clients, can get context from the socket */ + if (getpeercon(fd, &ctx) < 0) + FatalError("Client %d: couldn't get context from socket\n", + client->index); + + /* Try and determine the client's executable name */ + memset(&creds, 0, sizeof(creds)); + if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &creds, &len) < 0) + goto finish; + + snprintf(path, PATH_MAX + 1, "/proc/%d/cmdline", creds.pid); + fd = open(path, O_RDONLY); + if (fd < 0) + goto finish; + + bytes = read(fd, path, PATH_MAX + 1); + close(fd); + if (bytes <= 0) + goto finish; + + state->command = xalloc(bytes); + if (!state->command) + goto finish; + + memcpy(state->command, path, bytes); + state->command[bytes - 1] = 0; + } else + /* For remote clients, need to use a default context */ + if (selabel_lookup(label_hnd, &ctx, NULL, SELABEL_X_CLIENT) < 0) + FatalError("Client %d: couldn't get default remote context\n", + client->index); + +finish: + /* Get a SID from the context */ + if (avc_context_to_sid(ctx, &state->sid) < 0) + FatalError("Client %d: context_to_sid(%s) failed\n", + client->index, ctx); + + freecon(ctx); +} + /* * Labels initial server objects. */ static void -SELinuxFixupLabels(void) +SELinuxLabelInitial(void) { int i; XaceScreenAccessRec srec; @@ -674,6 +794,28 @@ SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) rec->status = rc; } +static void +SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceSelectionAccessRec *rec = (XaceSelectionAccessRec *)calldata; + SELinuxStateRec *subj, sel_sid; + SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + int rc; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + + rc = SELinuxSelectionToSID(rec->name, &sel_sid); + if (rc != Success) { + rec->status = rc; + return; + } + + rc = SELinuxDoCheck(rec->client->index, subj, &sel_sid, + SECCLASS_X_SELECTION, rec->access_mode, &auditdata); + if (rc != Success) + rec->status = rc; +} + /* * DIX Callbacks @@ -683,63 +825,23 @@ static void SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { NewClientInfoRec *pci = calldata; - ClientPtr client = pci->client; - XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; - SELinuxStateRec *state; - security_context_t ctx; - if (client->clientState != ClientStateInitial) - return; + switch (pci->client->clientState) { + case ClientStateInitial: + SELinuxLabelClient(pci->client); + break; - state = dixLookupPrivate(&client->devPrivates, stateKey); - sidput(state->sid); + case ClientStateRetained: + case ClientStateGone: + if (pci->client == selectionManager) { + selectionManager = NULL; + selectionWindow = 0; + } + break; - if (_XSERVTransIsLocal(ci)) { - int fd = _XSERVTransGetConnectionNumber(ci); - struct ucred creds; - socklen_t len = sizeof(creds); - char path[PATH_MAX + 1]; - size_t bytes; - - /* For local clients, can get context from the socket */ - if (getpeercon(fd, &ctx) < 0) - FatalError("Client %d: couldn't get context from socket\n", - client->index); - - /* Try and determine the client's executable name */ - memset(&creds, 0, sizeof(creds)); - if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &creds, &len) < 0) - goto finish; - - snprintf(path, PATH_MAX + 1, "/proc/%d/cmdline", creds.pid); - fd = open(path, O_RDONLY); - if (fd < 0) - goto finish; - - bytes = read(fd, path, PATH_MAX + 1); - close(fd); - if (bytes <= 0) - goto finish; - - state->command = xalloc(bytes); - if (!state->command) - goto finish; - - memcpy(state->command, path, bytes); - state->command[bytes - 1] = 0; - } else - /* For remote clients, need to use a default context */ - if (selabel_lookup(label_hnd, &ctx, NULL, SELABEL_X_CLIENT) < 0) - FatalError("Client %d: couldn't get default remote context\n", - client->index); - -finish: - /* Get a SID from the context */ - if (avc_context_to_sid(ctx, &state->sid) < 0) - FatalError("Client %d: context_to_sid(%s) failed\n", - client->index, ctx); - - freecon(ctx); + default: + break; + } } static void @@ -788,6 +890,50 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) FatalError("XSELinux: Unexpected unlabeled window found\n"); } +static void +SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + SelectionInfoRec *rec = calldata; + SELinuxStateRec *subj, *obj; + + switch (rec->kind) { + case SelectionSetOwner: + /* save off the "real" owner of the selection */ + rec->selection->alt_client = rec->selection->client; + rec->selection->alt_window = rec->selection->window; + + /* figure out the new label for the content */ + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->selection->devPrivates, stateKey); + sidput(obj->sid); + + if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SELECTION, + &obj->sid) < 0) { + ErrorF("XSELinux: a compute_create call failed!\n"); + obj->sid = unlabeled_sid; + } + break; + + case SelectionGetOwner: + /* restore the real owner */ + rec->selection->window = rec->selection->alt_window; + break; + + case SelectionConvertSelection: + /* redirect the convert request if necessary */ + if (selectionManager && selectionManager != rec->client) { + rec->selection->client = selectionManager; + rec->selection->window = selectionWindow; + } else { + rec->selection->client = rec->selection->alt_client; + rec->selection->window = rec->selection->alt_window; + } + break; + default: + break; + } +} + /* * DevPrivates Callbacks @@ -822,10 +968,109 @@ SELinuxStateFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) * Extension Dispatch */ +static int +ProcSELinuxQueryVersion(ClientPtr client) +{ + SELinuxQueryVersionReply rep; + /* + REQUEST(SELinuxQueryVersionReq); + REQUEST_SIZE_MATCH (SELinuxQueryVersionReq); + */ + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.server_major = XSELINUX_MAJOR_VERSION; + rep.server_minor = XSELINUX_MINOR_VERSION; + if (client->swapped) { + int n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.server_major, n); + swaps(&rep.server_minor, n); + } + WriteToClient(client, sizeof(rep), (char *)&rep); + return (client->noClientException); +} + +static int +ProcSELinuxSetSelectionManager(ClientPtr client) +{ + REQUEST(SELinuxSetSelectionManagerReq); + WindowPtr pWin; + int rc; + + REQUEST_SIZE_MATCH(SELinuxSetSelectionManagerReq); + + if (stuff->window == None) { + selectionManager = NULL; + selectionWindow = None; + } else { + rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, + client, DixGetAttrAccess); + if (rc != Success) + return rc; + + selectionManager = client; + selectionWindow = stuff->window; + } + + return Success; +} + static int ProcSELinuxDispatch(ClientPtr client) { - return BadRequest; + REQUEST(xReq); + switch (stuff->data) { + case X_SELinuxQueryVersion: + return ProcSELinuxQueryVersion(client); + case X_SELinuxSetSelectionManager: + return ProcSELinuxSetSelectionManager(client); + default: + return BadRequest; + } +} + +static int +SProcSELinuxQueryVersion(ClientPtr client) +{ + REQUEST(SELinuxQueryVersionReq); + int n; + + REQUEST_SIZE_MATCH (SELinuxQueryVersionReq); + swaps(&stuff->client_major,n); + swaps(&stuff->client_minor,n); + return ProcSELinuxQueryVersion(client); +} + +static int +SProcSELinuxSetSelectionManager(ClientPtr client) +{ + REQUEST(SELinuxSetSelectionManagerReq); + int n; + + REQUEST_SIZE_MATCH (SELinuxSetSelectionManagerReq); + swapl(&stuff->window,n); + return ProcSELinuxSetSelectionManager(client); +} + +static int +SProcSELinuxDispatch(ClientPtr client) +{ + REQUEST(xReq); + int n; + + swaps(&stuff->length, n); + + switch (stuff->data) { + case X_SELinuxQueryVersion: + return SProcSELinuxQueryVersion(client); + case X_SELinuxSetSelectionManager: + return SProcSELinuxSetSelectionManager(client); + default: + return BadRequest; + } } @@ -839,6 +1084,7 @@ SELinuxResetProc(ExtensionEntry *extEntry) /* Unregister callbacks */ DeleteCallback(&ClientStateCallback, SELinuxClientState, NULL); DeleteCallback(&ResourceStateCallback, SELinuxResourceState, NULL); + DeleteCallback(&SelectionCallback, SELinuxSelectionState, NULL); XaceDeleteCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL); XaceDeleteCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL); @@ -849,7 +1095,7 @@ SELinuxResetProc(ExtensionEntry *extEntry) XaceDeleteCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL); XaceDeleteCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL); XaceDeleteCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL); -// XaceDeleteCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); + XaceDeleteCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); XaceDeleteCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); XaceDeleteCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); @@ -863,6 +1109,10 @@ SELinuxResetProc(ExtensionEntry *extEntry) avc_active = 0; /* Free local state */ + xfree(knownSelections); + knownSelections = NULL; + numKnownSelections = 0; + xfree(knownEvents); knownEvents = NULL; numKnownEvents = 0; @@ -929,6 +1179,7 @@ XSELinuxExtensionInit(INITARGS) ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL); ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL); + ret &= AddCallback(&SelectionCallback, SELinuxSelectionState, NULL); ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL); ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL); @@ -939,7 +1190,7 @@ XSELinuxExtensionInit(INITARGS) ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL); ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL); ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL); -// ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); + ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); if (!ret) @@ -948,9 +1199,9 @@ XSELinuxExtensionInit(INITARGS) /* Add extension to server */ extEntry = AddExtension(XSELINUX_EXTENSION_NAME, XSELinuxNumberEvents, XSELinuxNumberErrors, - ProcSELinuxDispatch, ProcSELinuxDispatch, + ProcSELinuxDispatch, SProcSELinuxDispatch, SELinuxResetProc, StandardMinorOpcode); /* Label objects that were created before we could register ourself */ - SELinuxFixupLabels(); + SELinuxLabelInitial(); } diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 407b81f93..691154d1d 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -29,6 +29,43 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XSELinuxNumberEvents 0 #define XSELinuxNumberErrors 0 +/* Extension protocol */ +#define X_SELinuxQueryVersion 0 +#define X_SELinuxSetSelectionManager 1 + +typedef struct _SELinuxQueryVersion { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD8 client_major; + CARD8 client_minor; + CARD16 unused; +} SELinuxQueryVersionReq; +#define sz_SELinuxQueryVersionReq 8 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD16 server_major; + CARD16 server_minor; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} SELinuxQueryVersionReply; +#define sz_SELinuxQueryVersionReply 32 + +typedef struct _SELinuxSetSelectionManager { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD32 window; +} SELinuxSetSelectionManagerReq; +#define sz_SELinuxSetSelectionManagerReq 8 + /* Private Flask definitions */ #define SECCLASS_X_DRAWABLE 1 #define SECCLASS_X_SCREEN 2 From 0388a59a6ef212c497cc3f64d677b1ca5b410982 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 23 Oct 2007 20:59:21 -0400 Subject: [PATCH 189/552] Revert "registry: special case minor number when looking up core requests." This reverts commit 31110d6837ee52fd654729d9e5c4b0c5395abab0. This is handled properly by StandardMinorOpcode(). --- dix/registry.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dix/registry.c b/dix/registry.c index 01818582e..48e1b5dae 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -123,8 +123,6 @@ RegisterResourceName(RESTYPE resource, const char *name) const char * LookupRequestName(int major, int minor) { - if (major < 128) - minor = 0; if (major >= nmajor) return XREGISTRY_UNKNOWN; if (minor >= nminor[major]) From 0d2ef187e77b12713d2a9661932fa01dba58a945 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 24 Oct 2007 18:23:31 -0400 Subject: [PATCH 190/552] xselinux: Add audit message fields for selection and event names. --- Xext/xselinux.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index f11bc1aaa..83610119a 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -83,7 +83,9 @@ typedef struct { char *command; /* client's executable path */ unsigned id; /* resource id, if any */ int restype; /* resource type, if any */ + int event; /* event type, if any */ Atom property; /* property name, if any */ + Atom selection; /* selection name, if any */ char *extension; /* extension name, if any */ } SELinuxAuditRec; @@ -413,7 +415,7 @@ SELinuxAudit(void *auditdata, { SELinuxAuditRec *audit = auditdata; ClientPtr client = audit->client; - char idNum[16], *propertyName; + char idNum[16], *propertyName, *selectionName; int major = -1, minor = -1; if (client) { @@ -427,8 +429,9 @@ SELinuxAudit(void *auditdata, snprintf(idNum, 16, "%x", audit->id); propertyName = audit->property ? NameForAtom(audit->property) : NULL; + selectionName = audit->selection ? NameForAtom(audit->selection) : NULL; - return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s", + return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", (major >= 0) ? "request=" : "", (major >= 0) ? LookupRequestName(major, minor) : "", audit->command ? " comm=" : "", @@ -437,8 +440,12 @@ SELinuxAudit(void *auditdata, audit->id ? idNum : "", audit->restype ? " restype=" : "", audit->restype ? LookupResourceName(audit->restype) : "", + audit->event ? " event=" : "", + audit->event ? LookupEventName(audit->event & 127) : "", audit->property ? " property=" : "", audit->property ? propertyName : "", + audit->selection ? " selection=" : "", + audit->selection ? selectionName : "", audit->extension ? " extension=" : "", audit->extension ? audit->extension : ""); } @@ -462,7 +469,7 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceDeviceAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -492,7 +499,7 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceSendAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; int rc, i, clientIndex; if (rec->dev) { @@ -519,6 +526,7 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (rc != Success) goto err; + auditdata.event = rec->events[i].u.u.type; rc = SELinuxDoCheck(clientIndex, subj, &ev_sid, SECCLASS_X_EVENT, DixSendAccess, &auditdata); if (rc != Success) @@ -534,7 +542,7 @@ SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceReceiveAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; int rc, i; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -554,6 +562,7 @@ SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (rc != Success) goto err; + auditdata.event = rec->events[i].u.u.type; rc = SELinuxDoCheck(rec->client->index, subj, &ev_sid, SECCLASS_X_EVENT, DixReceiveAccess, &auditdata); if (rc != Success) @@ -569,7 +578,7 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceExtAccessRec *rec = calldata; SELinuxStateRec *subj, *obj, *serv; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -623,7 +632,7 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XacePropertyAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -675,7 +684,7 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceResourceAccessRec *rec = calldata; SELinuxStateRec *subj, *obj, *pobj; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; PrivateRec **privatePtr; security_class_t class; int rc, offset; @@ -731,7 +740,7 @@ SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) { XaceScreenAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; Mask access_mode = rec->access_mode; int rc; @@ -765,7 +774,7 @@ SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceClientAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -782,7 +791,7 @@ SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceServerAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -799,7 +808,7 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceSelectionAccessRec *rec = (XaceSelectionAccessRec *)calldata; SELinuxStateRec *subj, sel_sid; - SELinuxAuditRec auditdata = { rec->client, NULL, 0, 0, 0, NULL }; + SELinuxAuditRec auditdata = { .client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); @@ -810,6 +819,7 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) return; } + auditdata.selection = rec->name; rc = SELinuxDoCheck(rec->client->index, subj, &sel_sid, SECCLASS_X_SELECTION, rec->access_mode, &auditdata); if (rc != Success) From 4b05f19cb9e42d8c8eff5ca4e463f5bc2a05433d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 24 Oct 2007 19:59:58 -0400 Subject: [PATCH 191/552] xselinux: Introduce a type transition when labeling events. --- Xext/xselinux.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 83610119a..cb62cb941 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -194,7 +194,8 @@ SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return) * Looks up the SID corresponding to the given event type */ static int -SELinuxEventToSID(unsigned type, SELinuxStateRec *sid_return) +SELinuxEventToSID(unsigned type, security_id_t sid_of_window, + SELinuxStateRec *sid_return) { const char *name = LookupEventName(type); security_context_t con; @@ -212,7 +213,7 @@ SELinuxEventToSID(unsigned type, SELinuxStateRec *sid_return) } if (!knownEvents[type]) { - /* Look in the mappings of property names to contexts */ + /* Look in the mappings of event names to contexts */ if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EVENT) < 0) { ErrorF("XSELinux: an event label lookup failed!\n"); return BadValue; @@ -225,7 +226,13 @@ SELinuxEventToSID(unsigned type, SELinuxStateRec *sid_return) freecon(con); } - sid_return->sid = knownEvents[type]; + /* Perform a transition to obtain the final SID */ + if (avc_compute_create(sid_of_window, knownEvents[type], SECCLASS_X_EVENT, + &sid_return->sid) < 0) { + ErrorF("XSELinux: a compute_create call failed!\n"); + return BadValue; + } + return Success; } @@ -522,7 +529,7 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) for (i = 0; i < rec->count; i++) { SELinuxStateRec ev_sid; - rc = SELinuxEventToSID(rec->events[i].u.u.type, &ev_sid); + rc = SELinuxEventToSID(rec->events[i].u.u.type, obj->sid, &ev_sid); if (rc != Success) goto err; @@ -558,7 +565,7 @@ SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) for (i = 0; i < rec->count; i++) { SELinuxStateRec ev_sid; - rc = SELinuxEventToSID(rec->events[i].u.u.type, &ev_sid); + rc = SELinuxEventToSID(rec->events[i].u.u.type, obj->sid, &ev_sid); if (rc != Success) goto err; From 40de9fcf18930811dd5ae355c83275af887a9f83 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 25 Oct 2007 12:35:01 -0400 Subject: [PATCH 192/552] xselinux: Label the default device directly with the process context. --- Xext/xselinux.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index cb62cb941..b78017090 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -486,13 +486,9 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (rec->access_mode & DixCreateAccess) { sidput(obj->sid); - /* Perform a transition to obtain the final SID */ - if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_DEVICE, - &obj->sid) < 0) { - ErrorF("XSELinux: a compute_create call failed!\n"); - rec->status = BadValue; - return; - } + /* Label the device directly with the process SID */ + sidget(subj->sid); + obj->sid = subj->sid; } rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_DEVICE, From 7d14ca59c5b942c09feaa2429c394cde9d8d3fd1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 25 Oct 2007 19:00:50 -0400 Subject: [PATCH 193/552] xselinux: Don't include the client in the receive hook audit messages. --- Xext/xselinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index b78017090..bacbe6ef5 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -545,7 +545,7 @@ SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceReceiveAccessRec *rec = calldata; SELinuxStateRec *subj, *obj; - SELinuxAuditRec auditdata = { .client = rec->client }; + SELinuxAuditRec auditdata = { .client = NULL }; int rc, i; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); From 8c6923018c7d71cd15d9cf4ef9e8528ef5ec7c2e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 25 Oct 2007 19:01:29 -0400 Subject: [PATCH 194/552] xace: Add a "manage" access check when setting the Redirect event bits. --- dix/events.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dix/events.c b/dix/events.c index 24de94767..e13e290f4 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3330,6 +3330,8 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) #define AtMostOneClient \ (SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask) +#define ManagerMask \ + (SubstructureRedirectMask | ResizeRedirectMask) /** * Recalculate which events may be deliverable for the given window. @@ -3418,12 +3420,20 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) { Mask check; OtherClients * others; + int rc; if (mask & ~AllEventMasks) { client->errorValue = mask; return BadValue; } + check = (mask & ManagerMask); + if (check) { + rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, + RT_WINDOW, pWin, RT_NONE, NULL, DixManageAccess); + if (rc != Success) + return rc; + } check = (mask & AtMostOneClient); if (check & (pWin->eventMask|wOtherEventMasks(pWin))) { /* It is illegal for two different From 5f9095f0d29bac0190d82c87a09cf32d6a34c17c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 25 Oct 2007 19:02:03 -0400 Subject: [PATCH 195/552] registry: Remove synthetic bit from event types in lookup function. --- dix/registry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/registry.c b/dix/registry.c index 48e1b5dae..1cf7fa59e 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -134,6 +134,7 @@ LookupRequestName(int major, int minor) const char * LookupEventName(int event) { + event &= 127; if (event >= nevent) return XREGISTRY_UNKNOWN; @@ -153,7 +154,6 @@ const char * LookupResourceName(RESTYPE resource) { resource &= TypeMask; - if (resource >= nresource) return XREGISTRY_UNKNOWN; From 3b7af72fe315c7c26c89838c0c5dacbe58765d0f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 26 Oct 2007 20:32:10 -0400 Subject: [PATCH 196/552] xselinux: Add a SetDeviceContext request and stubs for more requests. --- Xext/xselinux.c | 190 ++++++++++++++++++++++++++++++++++++++++++++++-- Xext/xselinux.h | 121 ++++++++++++++++++++++++++++-- 2 files changed, 298 insertions(+), 13 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index bacbe6ef5..946e5b944 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -985,10 +985,6 @@ static int ProcSELinuxQueryVersion(ClientPtr client) { SELinuxQueryVersionReply rep; - /* - REQUEST(SELinuxQueryVersionReq); - REQUEST_SIZE_MATCH (SELinuxQueryVersionReq); - */ rep.type = X_Reply; rep.length = 0; @@ -1009,10 +1005,10 @@ ProcSELinuxQueryVersion(ClientPtr client) static int ProcSELinuxSetSelectionManager(ClientPtr client) { - REQUEST(SELinuxSetSelectionManagerReq); WindowPtr pWin; int rc; + REQUEST(SELinuxSetSelectionManagerReq); REQUEST_SIZE_MATCH(SELinuxSetSelectionManagerReq); if (stuff->window == None) { @@ -1031,6 +1027,98 @@ ProcSELinuxSetSelectionManager(ClientPtr client) return Success; } +static int +ProcSELinuxGetSelectionManager(ClientPtr client) +{ + SELinuxGetSelectionManagerReply rep; + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.window = selectionWindow; + if (client->swapped) { + int n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.window, n); + } + WriteToClient(client, sizeof(rep), (char *)&rep); + return (client->noClientException); +} + +static int +ProcSELinuxSetDeviceContext(ClientPtr client) +{ + char *ctx; + security_id_t sid; + DeviceIntPtr dev; + SELinuxStateRec *state; + int rc; + + REQUEST(SELinuxSetContextReq); + REQUEST_FIXED_SIZE(SELinuxSetContextReq, stuff->context_len); + + ctx = (char *)(stuff + 1); + if (ctx[stuff->context_len - 1]) + return BadLength; + + rc = dixLookupDevice(&dev, stuff->id, client, DixManageAccess); + if (rc != Success) + return rc; + + rc = avc_context_to_sid(ctx, &sid); + if (rc != Success) + return BadValue; + + state = dixLookupPrivate(&dev->devPrivates, stateKey); + sidput(state->sid); + state->sid = sid; + ErrorF("I really, actually did relabel a device to %s\n", ctx); + return Success; +} + +static int +ProcSELinuxGetDeviceContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxSetPropertyCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetPropertyCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetPropertyContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxSetWindowCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetWindowCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetWindowContext(ClientPtr client) +{ + return Success; +} + static int ProcSELinuxDispatch(ClientPtr client) { @@ -1040,6 +1128,24 @@ ProcSELinuxDispatch(ClientPtr client) return ProcSELinuxQueryVersion(client); case X_SELinuxSetSelectionManager: return ProcSELinuxSetSelectionManager(client); + case X_SELinuxGetSelectionManager: + return ProcSELinuxGetSelectionManager(client); + case X_SELinuxSetDeviceContext: + return ProcSELinuxSetDeviceContext(client); + case X_SELinuxGetDeviceContext: + return ProcSELinuxGetDeviceContext(client); + case X_SELinuxSetPropertyCreateContext: + return ProcSELinuxSetPropertyCreateContext(client); + case X_SELinuxGetPropertyCreateContext: + return ProcSELinuxGetPropertyCreateContext(client); + case X_SELinuxGetPropertyContext: + return ProcSELinuxGetPropertyContext(client); + case X_SELinuxSetWindowCreateContext: + return ProcSELinuxSetWindowCreateContext(client); + case X_SELinuxGetWindowCreateContext: + return ProcSELinuxGetWindowCreateContext(client); + case X_SELinuxGetWindowContext: + return ProcSELinuxGetWindowContext(client); default: return BadRequest; } @@ -1068,6 +1174,60 @@ SProcSELinuxSetSelectionManager(ClientPtr client) return ProcSELinuxSetSelectionManager(client); } +static int +SProcSELinuxGetSelectionManager(ClientPtr client) +{ + return ProcSELinuxGetSelectionManager(client); +} + +static int +SProcSELinuxSetDeviceContext(ClientPtr client) +{ + return ProcSELinuxSetDeviceContext(client); +} + +static int +SProcSELinuxGetDeviceContext(ClientPtr client) +{ + return ProcSELinuxGetDeviceContext(client); +} + +static int +SProcSELinuxSetPropertyCreateContext(ClientPtr client) +{ + return ProcSELinuxSetPropertyCreateContext(client); +} + +static int +SProcSELinuxGetPropertyCreateContext(ClientPtr client) +{ + return ProcSELinuxGetPropertyCreateContext(client); +} + +static int +SProcSELinuxGetPropertyContext(ClientPtr client) +{ + return ProcSELinuxGetPropertyContext(client); +} + +static int +SProcSELinuxSetWindowCreateContext(ClientPtr client) +{ + return ProcSELinuxSetWindowCreateContext(client); +} + +static int +SProcSELinuxGetWindowCreateContext(ClientPtr client) +{ + return ProcSELinuxGetWindowCreateContext(client); +} + +static int +SProcSELinuxGetWindowContext(ClientPtr client) +{ + return ProcSELinuxGetWindowContext(client); +} + static int SProcSELinuxDispatch(ClientPtr client) { @@ -1080,7 +1240,25 @@ SProcSELinuxDispatch(ClientPtr client) case X_SELinuxQueryVersion: return SProcSELinuxQueryVersion(client); case X_SELinuxSetSelectionManager: - return SProcSELinuxSetSelectionManager(client); + return SProcSELinuxSetSelectionManager(client); + case X_SELinuxGetSelectionManager: + return SProcSELinuxGetSelectionManager(client); + case X_SELinuxSetDeviceContext: + return SProcSELinuxSetDeviceContext(client); + case X_SELinuxGetDeviceContext: + return SProcSELinuxGetDeviceContext(client); + case X_SELinuxSetPropertyCreateContext: + return SProcSELinuxSetPropertyCreateContext(client); + case X_SELinuxGetPropertyCreateContext: + return SProcSELinuxGetPropertyCreateContext(client); + case X_SELinuxGetPropertyContext: + return SProcSELinuxGetPropertyContext(client); + case X_SELinuxSetWindowCreateContext: + return SProcSELinuxSetWindowCreateContext(client); + case X_SELinuxGetWindowCreateContext: + return SProcSELinuxGetWindowCreateContext(client); + case X_SELinuxGetWindowContext: + return SProcSELinuxGetWindowContext(client); default: return BadRequest; } diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 691154d1d..50838d754 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -30,10 +30,19 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XSELinuxNumberErrors 0 /* Extension protocol */ -#define X_SELinuxQueryVersion 0 -#define X_SELinuxSetSelectionManager 1 +#define X_SELinuxQueryVersion 0 +#define X_SELinuxSetSelectionManager 1 +#define X_SELinuxGetSelectionManager 2 +#define X_SELinuxSetDeviceContext 3 +#define X_SELinuxGetDeviceContext 4 +#define X_SELinuxSetPropertyCreateContext 5 +#define X_SELinuxGetPropertyCreateContext 6 +#define X_SELinuxGetPropertyContext 7 +#define X_SELinuxSetWindowCreateContext 8 +#define X_SELinuxGetWindowCreateContext 9 +#define X_SELinuxGetWindowContext 10 -typedef struct _SELinuxQueryVersion { +typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; @@ -41,7 +50,6 @@ typedef struct _SELinuxQueryVersion { CARD8 client_minor; CARD16 unused; } SELinuxQueryVersionReq; -#define sz_SELinuxQueryVersionReq 8 typedef struct { CARD8 type; @@ -56,15 +64,114 @@ typedef struct { CARD32 pad5; CARD32 pad6; } SELinuxQueryVersionReply; -#define sz_SELinuxQueryVersionReply 32 -typedef struct _SELinuxSetSelectionManager { +typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; CARD32 window; } SELinuxSetSelectionManagerReq; -#define sz_SELinuxSetSelectionManagerReq 8 + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; +} SELinuxGetSelectionManagerReq; + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD32 window; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} SELinuxGetSelectionManagerReply; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD8 permanent; + CARD8 unused; + CARD16 context_len; +} SELinuxSetCreateContextReq; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; +} SELinuxGetCreateContextReq; + +typedef struct { + CARD8 type; + CARD8 permanent; + CARD16 sequenceNumber; + CARD32 length; + CARD16 context_len; + CARD16 pad1; + CARD32 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; +} SELinuxGetCreateContextReply; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD32 id; + CARD16 unused; + CARD16 context_len; +} SELinuxSetContextReq; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD32 id; +} SELinuxGetContextReq; + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD16 context_len; + CARD16 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; + CARD32 pad7; +} SELinuxGetContextReply; + +typedef struct { + CARD8 reqType; + CARD8 SELinuxReqType; + CARD16 length; + CARD32 window; + CARD32 property; +} SELinuxGetPropertyContextReq; + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber; + CARD32 length; + CARD16 context_len; + CARD16 pad2; + CARD32 pad3; + CARD32 pad4; + CARD32 pad5; + CARD32 pad6; + CARD32 pad7; +} SELinuxGetPropertyContextReply; + /* Private Flask definitions */ #define SECCLASS_X_DRAWABLE 1 From c7e18beb3c87eb1ada9b21c4ffacd11c1939c087 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 5 Nov 2007 15:01:13 -0500 Subject: [PATCH 197/552] xselinux: Register SELinux extension protocol names. --- Xext/xselinux.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 946e5b944..f6d1dcd4b 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1395,4 +1395,28 @@ XSELinuxExtensionInit(INITARGS) /* Label objects that were created before we could register ourself */ SELinuxLabelInitial(); + + /* Add names to registry */ + RegisterRequestName(X_SELinuxQueryVersion, 0, + XSELINUX_EXTENSION_NAME ":SELinuxQueryVersion"); + RegisterRequestName(X_SELinuxSetSelectionManager, 0, + XSELINUX_EXTENSION_NAME ":SELinuxSetSelectionManager"); + RegisterRequestName(X_SELinuxGetSelectionManager, 0, + XSELINUX_EXTENSION_NAME ":SELinuxGetSelectionManager"); + RegisterRequestName(X_SELinuxSetDeviceContext, 0, + XSELINUX_EXTENSION_NAME ":SELinuxSetDeviceContext"); + RegisterRequestName(X_SELinuxGetDeviceContext, 0, + XSELINUX_EXTENSION_NAME ":SELinuxGetDeviceContext"); + RegisterRequestName(X_SELinuxSetPropertyCreateContext, 0, + XSELINUX_EXTENSION_NAME ":SELinuxSetPropertyCreateContext"); + RegisterRequestName(X_SELinuxGetPropertyCreateContext, 0, + XSELINUX_EXTENSION_NAME ":SELinuxGetPropertyCreateContext"); + RegisterRequestName(X_SELinuxGetPropertyContext, 0, + XSELINUX_EXTENSION_NAME ":SELinuxGetPropertyContext"); + RegisterRequestName(X_SELinuxSetWindowCreateContext, 0, + XSELINUX_EXTENSION_NAME ":SELinuxSetWindowCreateContext"); + RegisterRequestName(X_SELinuxGetWindowCreateContext, 0, + XSELINUX_EXTENSION_NAME ":SELinuxGetWindowCreateContext"); + RegisterRequestName(X_SELinuxGetWindowContext, 0, + XSELINUX_EXTENSION_NAME ":SELinuxGetWindowContext"); } From 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Nov 2007 16:32:42 -0500 Subject: [PATCH 198/552] Rework of the XC-SECURITY extension. The gen-auth protocol has not changed, but the XC-QUERY-SECURITY-1 authorization method and the SecurityPolicy configuration file have been removed. The semantics of the trusted vs. untrusted split have been changed. This will be documented in a future commit. --- Xext/security.c | 1350 ++++++++++---------------------------------- Xext/securitysrv.h | 4 - os/utils.c | 12 - 3 files changed, 312 insertions(+), 1054 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index ec414a0c3..6aab3a342 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -31,53 +31,47 @@ in this Software without prior written authorization from The Open Group. #include "scrnintstr.h" #include "colormapst.h" #include "privates.h" +#include "registry.h" #include "xacestr.h" #include "securitysrv.h" #include -#include -#include #ifdef XAPPGROUP #include "appgroup.h" #endif -#include /* for file reading operations */ -#include /* for XA_STRING */ - -#ifndef DEFAULTPOLICYFILE -# define DEFAULTPOLICYFILE NULL -#endif -#if defined(WIN32) || defined(__CYGWIN__) -#include -#undef index -#endif - #include "modinit.h" +/* Extension stuff */ static int SecurityErrorBase; /* first Security error number */ static int SecurityEventBase; /* first Security event number */ -static const DevPrivateKey stateKey = &stateKey; -/* this is what we store as client security state */ +RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */ +static RESTYPE RTEventClient; + +static CallbackListPtr SecurityValidateGroupCallback = NULL; + +/* Private state record */ +static DevPrivateKey stateKey = &stateKey; + +/* This is what we store as client security state */ typedef struct { int haveState; unsigned int trustLevel; XID authId; -} SecurityClientStateRec; +} SecurityStateRec; -#define HAVESTATE(client) (((SecurityClientStateRec *) \ - dixLookupPrivate(DEVPRIV_PTR(client), stateKey))->haveState) -#define TRUSTLEVEL(client) (((SecurityClientStateRec *) \ - dixLookupPrivate(DEVPRIV_PTR(client), stateKey))->trustLevel) -#define AUTHID(client)(((SecurityClientStateRec *) \ - dixLookupPrivate(DEVPRIV_PTR(client), stateKey))->authId) +/* Extensions that untrusted clients shouldn't have access to */ +static char *SecurityUntrustedExtensions[] = { + "RandR", + "SECURITY", + "XFree86-DGA", + NULL +}; -static CallbackListPtr SecurityValidateGroupCallback = NULL; +/* Access modes that untrusted clients can do to trusted stuff */ +static const Mask SecurityAllowedMask = + DixGetAttrAccess | DixListPropAccess | DixGetPropAccess | + DixGetFocusAccess | DixListAccess | DixReceiveAccess; -static char **SecurityTrustedExtensions = NULL; -static int nSecurityTrustedExtensions = 0; - -RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */ - -static RESTYPE RTEventClient; /* SecurityAudit * @@ -103,6 +97,51 @@ SecurityAudit(char *format, ...) va_end(args); } /* SecurityAudit */ +/* + * Performs a Security permission check. + */ +static int +SecurityDoCheck(SecurityStateRec *subj, SecurityStateRec *obj, + Mask requested, Mask allowed) +{ + if (!subj->haveState || !obj->haveState) + return Success; + if (subj->trustLevel == XSecurityClientTrusted) + return Success; + if (obj->trustLevel != XSecurityClientTrusted) + return Success; + if ((requested | allowed) == allowed) + return Success; + + return BadAccess; +} + +/* + * Labels initial server objects. + */ +static void +SecurityLabelInitial(void) +{ + SecurityStateRec *state; + + /* Do the serverClient */ + state = dixLookupPrivate(&serverClient->devPrivates, stateKey); + state->trustLevel = XSecurityClientTrusted; + state->haveState = TRUE; +} + +/* + * Looks up a request name + */ +static _X_INLINE const char * +SecurityLookupRequestName(ClientPtr client) +{ + int major = ((xReq *)client->requestBuffer)->reqType; + int minor = MinorOpcodeOfRequest(client); + return LookupRequestName(major, minor); +} + + #define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) /* SecurityDeleteAuthorization @@ -163,10 +202,12 @@ SecurityDeleteAuthorization( /* kill all clients using this auth */ for (i = 1; iid)) - CloseDownClient(clients[i]); - } + if (clients[i]) { + SecurityStateRec *state; + state = dixLookupPrivate(&clients[i]->devPrivates, stateKey); + if (state->haveState && state->authId == pAuth->id) + CloseDownClient(clients[i]); + } SecurityAudit("revoked authorization ID %d\n", pAuth->id); xfree(pAuth); @@ -315,12 +356,6 @@ ProcSecurityQueryVersion( /* REQUEST(xSecurityQueryVersionReq); */ xSecurityQueryVersionReply rep; - /* paranoia: this "can't happen" because this extension is hidden - * from untrusted clients, but just in case... - */ - if (TRUSTLEVEL(client) != XSecurityClientTrusted) - return BadRequest; - REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); rep.type = X_Reply; rep.sequenceNumber = client->sequence; @@ -401,12 +436,6 @@ ProcSecurityGenerateAuthorization( char *pAuthdata; /* generated auth data */ Mask eventMask; /* what events on this auth does client want */ - /* paranoia: this "can't happen" because this extension is hidden - * from untrusted clients, but just in case... - */ - if (TRUSTLEVEL(client) != XSecurityClientTrusted) - return BadRequest; - /* check request length */ REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); @@ -584,12 +613,6 @@ ProcSecurityRevokeAuthorization( REQUEST(xSecurityRevokeAuthorizationReq); SecurityAuthorizationPtr pAuth; - /* paranoia: this "can't happen" because this extension is hidden - * from untrusted clients, but just in case... - */ - if (TRUSTLEVEL(client) != XSecurityClientTrusted) - return BadRequest; - REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client, @@ -703,59 +726,6 @@ SwapSecurityAuthorizationRevokedEvent( cpswapl(from->authId, to->authId); } -/* SecurityDetermineEventPropogationLimits - * - * This is a helper function for SecurityCheckDeviceAccess. - * - * Arguments: - * dev is the device for which the starting and stopping windows for - * event propogation should be determined. - * The values pointed to by ppWin and ppStopWin are not used. - * - * Returns: - * ppWin is filled in with a pointer to the window at which event - * propogation for the given device should start given the current - * state of the server (pointer position, window layout, etc.) - * ppStopWin is filled in with the window at which event propogation - * should stop; events should not go to ppStopWin. - * - * Side Effects: none. - */ - -static void -SecurityDetermineEventPropogationLimits( - DeviceIntPtr dev, - WindowPtr *ppWin, - WindowPtr *ppStopWin) -{ - WindowPtr pFocusWin = dev->focus ? dev->focus->win : NoneWin; - - if (pFocusWin == NoneWin) - { /* no focus -- events don't go anywhere */ - *ppWin = *ppStopWin = NULL; - return; - } - - if (pFocusWin == PointerRootWin) - { /* focus follows the pointer */ - *ppWin = GetSpriteWindow(); - *ppStopWin = NULL; /* propogate all the way to the root */ - } - else - { /* a real window is set for the focus */ - WindowPtr pSpriteWin = GetSpriteWindow(); - *ppStopWin = pFocusWin->parent; /* don't go past the focus window */ - - /* if the pointer is in a subwindow of the focus window, start - * at that subwindow, else start at the focus window itself - */ - if (IsParent(pFocusWin, pSpriteWin)) - *ppWin = pSpriteWin; - else *ppWin = pFocusWin; - } -} /* SecurityDetermineEventPropogationLimits */ - - /* SecurityCheckDeviceAccess * * Arguments: @@ -773,163 +743,25 @@ SecurityDetermineEventPropogationLimits( */ static void -SecurityCheckDeviceAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) +SecurityDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - XaceDeviceAccessRec *rec = (XaceDeviceAccessRec*)calldata; - ClientPtr client = rec->client; - DeviceIntPtr dev = rec->dev; - Bool fromRequest = rec->fromRequest; - WindowPtr pWin, pStopWin; - Bool untrusted_got_event; - Bool found_event_window; - Mask eventmask; - int reqtype = 0; + XaceDeviceAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + Mask requested = rec->access_mode; + Mask allowed = SecurityAllowedMask; - /* trusted clients always allowed to do anything */ - if (TRUSTLEVEL(client) == XSecurityClientTrusted) - return; + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); - /* device security other than keyboard is not implemented yet */ - if (dev != inputInfo.keyboard) - return; - - /* some untrusted client wants access */ - - if (fromRequest) - { - reqtype = ((xReq *)client->requestBuffer)->reqType; - switch (reqtype) - { - /* never allow these */ - case X_ChangeKeyboardMapping: - case X_ChangeKeyboardControl: - case X_SetModifierMapping: - SecurityAudit("client %d attempted request %d\n", - client->index, reqtype); - rec->status = BadAccess; - return; - default: - break; - } - } - - untrusted_got_event = FALSE; - found_event_window = FALSE; - - if (dev->grab) - { - untrusted_got_event = - (TRUSTLEVEL(rClient(dev->grab)) != XSecurityClientTrusted); - } - else - { - SecurityDetermineEventPropogationLimits(dev, &pWin, &pStopWin); - - eventmask = KeyPressMask | KeyReleaseMask; - while ( (pWin != pStopWin) && !found_event_window) - { - OtherClients *other; - - if (pWin->eventMask & eventmask) - { - found_event_window = TRUE; - client = wClient(pWin); - if (TRUSTLEVEL(client) != XSecurityClientTrusted) - { - untrusted_got_event = TRUE; - } - } - if (wOtherEventMasks(pWin) & eventmask) - { - found_event_window = TRUE; - for (other = wOtherClients(pWin); other; other = other->next) - { - if (other->mask & eventmask) - { - client = rClient(other); - if (TRUSTLEVEL(client) != XSecurityClientTrusted) - { - untrusted_got_event = TRUE; - break; - } - } - } - } - if (wDontPropagateMask(pWin) & eventmask) - break; - pWin = pWin->parent; - } /* while propogating the event */ - } - - /* allow access by untrusted clients only if an event would have gone - * to an untrusted client - */ - - if (!untrusted_got_event) - { - char *devname = dev->name; - if (!devname) devname = "unnamed"; - if (fromRequest) - SecurityAudit("client %d attempted request %d device %d (%s)\n", - client->index, reqtype, dev->id, devname); - else - SecurityAudit("client %d attempted to access device %d (%s)\n", - client->index, dev->id, devname); + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { + SecurityAudit("Security denied client %d keyboard access on request " + "%s\n", rec->client->index, + SecurityLookupRequestName(rec->client)); rec->status = BadAccess; } - return; -} /* SecurityCheckDeviceAccess */ +} - - -/* SecurityAuditResourceIDAccess - * - * Arguments: - * client is the client doing the resource access. - * id is the resource id. - * - * Returns: NULL - * - * Side Effects: - * An audit message is generated with details of the denied - * resource access. - */ - -static pointer -SecurityAuditResourceIDAccess( - ClientPtr client, - XID id) -{ - int cid = CLIENT_ID(id); - int reqtype = ((xReq *)client->requestBuffer)->reqType; - switch (reqtype) - { - case X_ChangeProperty: - case X_DeleteProperty: - case X_GetProperty: - { - xChangePropertyReq *req = - (xChangePropertyReq *)client->requestBuffer; - int propertyatom = req->property; - char *propertyname = NameForAtom(propertyatom); - - SecurityAudit("client %d attempted request %d with window 0x%x property %s of client %d\n", - client->index, reqtype, id, propertyname, cid); - break; - } - default: - { - SecurityAudit("client %d attempted request %d with resource 0x%x of client %d\n", - client->index, reqtype, id, cid); - break; - } - } - return NULL; -} /* SecurityAuditResourceIDAccess */ - - -/* SecurityCheckResourceIDAccess +/* SecurityResource * * This function gets plugged into client->CheckAccess and is called from * SecurityLookupIDByType/Class to determine if the client can access the @@ -951,144 +783,174 @@ SecurityAuditResourceIDAccess( */ static void -SecurityCheckResourceIDAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) +SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata; - ClientPtr client = rec->client; - XID id = rec->id; - RESTYPE rtype = rec->rtype; - Mask access_mode = rec->access_mode; - pointer rval = rec->res; - int cid, reqtype; + XaceResourceAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + int cid = CLIENT_ID(rec->id); + Mask requested = rec->access_mode; + Mask allowed = SecurityAllowedMask; - if (TRUSTLEVEL(client) == XSecurityClientTrusted || - DixUnknownAccess == access_mode) - return; /* for compatibility, we have to allow access */ + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey); - cid = CLIENT_ID(id); - reqtype = ((xReq *)client->requestBuffer)->reqType; - switch (reqtype) - { /* these are always allowed */ - case X_QueryTree: - case X_TranslateCoords: - case X_GetGeometry: - /* property access is controlled in SecurityCheckPropertyAccess */ - case X_GetProperty: - case X_ChangeProperty: - case X_DeleteProperty: - case X_RotateProperties: - case X_ListProperties: - return; - default: - break; + /* special checks for server-owned resources */ + if (cid == 0) { + if (rec->rtype & RC_DRAWABLE) + /* additional operations allowed on root windows */ + allowed |= DixReadAccess|DixSendAccess; + + else if (rec->rtype == RT_COLORMAP) + /* allow access to default colormaps */ + allowed = requested; } - if (cid != 0) - { /* not a server-owned resource */ - /* - * The following 'if' restricts clients to only access resources at - * the same trustLevel. Since there are currently only two trust levels, - * and trusted clients never call this function, this degenerates into - * saying that untrusted clients can only access resources of other - * untrusted clients. One way to add the notion of groups would be to - * allow values other than Trusted (0) and Untrusted (1) for this field. - * Clients at the same trust level would be able to use each other's - * resources, but not those of clients at other trust levels. I haven't - * tried it, but this probably mostly works already. The obvious - * competing alternative for grouping clients for security purposes is to - * use app groups. dpw - */ - if (TRUSTLEVEL(client) == TRUSTLEVEL(clients[cid]) + if (SecurityDoCheck(subj, obj, requested, allowed) == Success) + return; + #ifdef XAPPGROUP - || (RT_COLORMAP == rtype && - XagDefaultColormap (client) == (Colormap) id) + if (rec->id == XagDefaultColormap(rec->client)) + return; #endif - ) - return; - else - goto deny; - } - else /* server-owned resource - probably a default colormap or root window */ - { - if (RT_WINDOW == rtype || RC_DRAWABLE == rtype) - { - switch (reqtype) - { /* the following operations are allowed on root windows */ - case X_CreatePixmap: - case X_CreateGC: - case X_CreateWindow: - case X_CreateColormap: - case X_ListProperties: - case X_GrabPointer: - case X_UngrabButton: - case X_QueryBestSize: - case X_GetWindowAttributes: - break; - case X_SendEvent: - { /* see if it is an event specified by the ICCCM */ - xSendEventReq *req = (xSendEventReq *) - (client->requestBuffer); - if (req->propagate == xTrue - || - (req->eventMask != ColormapChangeMask && - req->eventMask != StructureNotifyMask && - req->eventMask != - (SubstructureRedirectMask|SubstructureNotifyMask) - ) - || - (req->event.u.u.type != UnmapNotify && - req->event.u.u.type != ConfigureRequest && - req->event.u.u.type != ClientMessage - ) - ) - { /* not an ICCCM event */ - goto deny; - } - break; - } /* case X_SendEvent on root */ - case X_ChangeWindowAttributes: - { /* Allow selection of PropertyNotify and StructureNotify - * events on the root. - */ - xChangeWindowAttributesReq *req = - (xChangeWindowAttributesReq *)(client->requestBuffer); - if (req->valueMask == CWEventMask) - { - CARD32 value = *((CARD32 *)(req + 1)); - if ( (value & - ~(PropertyChangeMask|StructureNotifyMask)) == 0) - break; - } - goto deny; - } /* case X_ChangeWindowAttributes on root */ - - default: - { - /* others not allowed */ - goto deny; - } - } - } /* end server-owned window or drawable */ - else if (SecurityAuthorizationResType == rtype) - { - SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)rval; - if (pAuth->trustLevel != TRUSTLEVEL(client)) - goto deny; - } - else if (RT_COLORMAP != rtype) - { /* don't allow anything else besides colormaps */ - goto deny; - } - } - return; - deny: - SecurityAuditResourceIDAccess(client, id); + SecurityAudit("Security: denied client %d access to resource 0x%x " + "of client %d on request %s\n", rec->client->index, rec->id, + cid, SecurityLookupRequestName(rec->client)); rec->status = BadAccess; /* deny access */ -} /* SecurityCheckResourceIDAccess */ +} +static void +SecurityExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceExtAccessRec *rec = calldata; + SecurityStateRec *subj; + int i = 0; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + + if (subj->haveState && subj->trustLevel != XSecurityClientTrusted) + while (SecurityUntrustedExtensions[i]) + if (!strcmp(SecurityUntrustedExtensions[i++], rec->ext->name)) { + SecurityAudit("Security: denied client %d access to extension " + "%s on request %s\n", + rec->client->index, rec->ext->name, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; + return; + } +} + +static void +SecurityServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceServerAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + Mask requested = rec->access_mode; + Mask allowed = SecurityAllowedMask; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { + SecurityAudit("Security: denied client %d access to server " + "configuration request %s\n", rec->client->index, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; + } +} + +static void +SecurityClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceClientAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + Mask requested = rec->access_mode; + Mask allowed = SecurityAllowedMask; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { + SecurityAudit("Security: denied client %d access to client %d on " + "request %s\n", rec->client->index, rec->target->index, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; + } +} + +static void +SecurityProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XacePropertyAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + ATOM name = rec->pProp->propertyName; + Mask requested = rec->access_mode; + Mask allowed = SecurityAllowedMask | DixReadAccess; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { + SecurityAudit("Security: denied client %d access to property %s " + "(atom 0x%x) window 0x%x of client %d on request %s\n", + rec->client->index, NameForAtom(name), name, + rec->pWin->drawable.id, wClient(rec->pWin)->index, + SecurityLookupRequestName(rec->client)); + rec->status = BadAccess; + } +} + +static void +SecuritySend(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceSendAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + + if (rec->client) { + int i; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, DixSendAccess, 0) == Success) + return; + + for (i = 0; i < rec->count; i++) + if (rec->events[i].u.u.type != UnmapNotify && + rec->events[i].u.u.type != ConfigureRequest && + rec->events[i].u.u.type != ClientMessage) { + + SecurityAudit("Security: denied client %d from sending event " + "of type %s to window 0x%x of client %d\n", + rec->client->index, rec->pWin->drawable.id, + wClient(rec->pWin)->index, + LookupEventName(rec->events[i].u.u.type)); + rec->status = BadAccess; + return; + } + } +} + +static void +SecurityReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + XaceReceiveAccessRec *rec = calldata; + SecurityStateRec *subj, *obj; + + subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); + + if (SecurityDoCheck(subj, obj, DixReceiveAccess, 0) == Success) + return; + + SecurityAudit("Security: denied client %d from receiving an event " + "sent to window 0x%x of client %d\n", + rec->client->index, rec->pWin->drawable.id, + wClient(rec->pWin)->index); + rec->status = BadAccess; +} + /* SecurityClientStateCallback * * Arguments: @@ -1112,643 +974,55 @@ SecurityCheckResourceIDAccess(CallbackListPtr *pcbl, pointer unused, */ static void -SecurityClientStateCallback(CallbackListPtr *pcbl, pointer unused, - pointer calldata) +SecurityClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { - NewClientInfoRec *pci = (NewClientInfoRec *)calldata; - ClientPtr client = pci->client; + NewClientInfoRec *pci = calldata; + SecurityStateRec *state; + SecurityAuthorizationPtr pAuth; + int rc; - switch (client->clientState) - { + state = dixLookupPrivate(&pci->client->devPrivates, stateKey); + + switch (pci->client->clientState) { case ClientStateInitial: - TRUSTLEVEL(client) = XSecurityClientTrusted; - AUTHID(client) = None; + state->trustLevel = XSecurityClientTrusted; + state->authId = None; + state->haveState = TRUE; break; case ClientStateRunning: - { - XID authId = AuthorizationIDOfClient(client); - SecurityAuthorizationPtr pAuth; + state->authId = AuthorizationIDOfClient(pci->client); + rc = dixLookupResource((pointer *)&pAuth, state->authId, + SecurityAuthorizationResType, serverClient, + DixGetAttrAccess); + if (rc == Success) { + /* it is a generated authorization */ + pAuth->refcnt++; + if (pAuth->refcnt == 1 && pAuth->timer) + TimerCancel(pAuth->timer); - TRUSTLEVEL(client) = XSecurityClientTrusted; - AUTHID(client) = authId; - pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId, - SecurityAuthorizationResType); - if (pAuth) - { /* it is a generated authorization */ - pAuth->refcnt++; - if (pAuth->refcnt == 1) - { - if (pAuth->timer) TimerCancel(pAuth->timer); - } - TRUSTLEVEL(client) = pAuth->trustLevel; - } - break; + state->trustLevel = pAuth->trustLevel; } + break; + case ClientStateGone: - case ClientStateRetained: /* client disconnected */ - { - SecurityAuthorizationPtr pAuth; - - /* client may not have any state (bad authorization) */ - if (!HAVESTATE(client)) - break; - - pAuth = (SecurityAuthorizationPtr)LookupIDByType(AUTHID(client), - SecurityAuthorizationResType); - if (pAuth) - { /* it is a generated authorization */ - pAuth->refcnt--; - if (pAuth->refcnt == 0) - { - SecurityStartAuthorizationTimer(pAuth); - } - } - break; + case ClientStateRetained: + rc = dixLookupResource((pointer *)&pAuth, state->authId, + SecurityAuthorizationResType, serverClient, + DixGetAttrAccess); + if (rc == Success) { + /* it is a generated authorization */ + pAuth->refcnt--; + if (pAuth->refcnt == 0) + SecurityStartAuthorizationTimer(pAuth); } - default: break; - } -} /* SecurityClientStateCallback */ + break; -static void -SecurityCheckDrawableAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) -{ - XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata; - - if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) - rec->status = BadAccess; -} - -static void -SecurityCheckMapAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) -{ - XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata; - WindowPtr pWin = rec->pWin; - - if (HAVESTATE(rec->client) && - (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && - (pWin->drawable.class == InputOnly) && - pWin->parent && pWin->parent->parent && - (TRUSTLEVEL(wClient(pWin->parent)) == XSecurityClientTrusted)) - - rec->status = BadAccess; -} - -static void -SecurityCheckExtAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) -{ - XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata; - int i, trusted = 0; - - for (i = 0; i < nSecurityTrustedExtensions; i++) - if (!strcmp(SecurityTrustedExtensions[i], rec->ext->name)) - trusted = 1; - - if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) && !trusted) - rec->status = BadAccess; -} - -static void -SecurityCheckServerAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) -{ - XaceServerAccessRec *rec = (XaceServerAccessRec*)calldata; - - if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted) - { - rec->status = BadAccess; - if (rec->access_mode == DixWriteAccess) - SecurityAudit("client %d attempted to change host access\n", - rec->client->index); - else - SecurityAudit("client %d attempted to list hosts\n", - rec->client->index); + default: + break; } } -/**********************************************************************/ - -typedef struct _PropertyAccessRec { - ATOM name; - ATOM mustHaveProperty; - char *mustHaveValue; - char windowRestriction; -#define SecurityAnyWindow 0 -#define SecurityRootWindow 1 -#define SecurityWindowWithProperty 2 - int readAction; - int writeAction; - int destroyAction; - struct _PropertyAccessRec *next; -} PropertyAccessRec, *PropertyAccessPtr; - -static PropertyAccessPtr PropertyAccessList = NULL; -static int SecurityDefaultAction = BadAtom; -static char *SecurityPolicyFile = DEFAULTPOLICYFILE; -static ATOM SecurityMaxPropertyName = 0; - -static char *SecurityKeywords[] = { -#define SecurityKeywordComment 0 - "#", -#define SecurityKeywordProperty 1 - "property", -#define SecurityKeywordSitePolicy 2 - "sitepolicy", -#define SecurityKeywordRoot 3 - "root", -#define SecurityKeywordAny 4 - "any", -#define SecurityKeywordExtension 5 - "trust extension", -}; - -#define NUMKEYWORDS (sizeof(SecurityKeywords) / sizeof(char *)) - -static void -SecurityFreePropertyAccessList(void) -{ - while (PropertyAccessList) - { - PropertyAccessPtr freeit = PropertyAccessList; - PropertyAccessList = PropertyAccessList->next; - xfree(freeit); - } -} /* SecurityFreePropertyAccessList */ - -#define SecurityIsWhitespace(c) ( (c == ' ') || (c == '\t') || (c == '\n') ) - -static char * -SecuritySkipWhitespace( - char *p) -{ - while (SecurityIsWhitespace(*p)) - p++; - return p; -} /* SecuritySkipWhitespace */ - - -static char * -SecurityParseString( - char **rest) -{ - char *startOfString; - char *s = *rest; - char endChar = 0; - - s = SecuritySkipWhitespace(s); - - if (*s == '"' || *s == '\'') - { - endChar = *s++; - startOfString = s; - while (*s && (*s != endChar)) - s++; - } - else - { - startOfString = s; - while (*s && !SecurityIsWhitespace(*s)) - s++; - } - if (*s) - { - *s = '\0'; - *rest = s + 1; - return startOfString; - } - else - { - *rest = s; - return (endChar) ? NULL : startOfString; - } -} /* SecurityParseString */ - - -static int -SecurityParseKeyword( - char **p) -{ - int i; - char *s = *p; - s = SecuritySkipWhitespace(s); - for (i = 0; i < NUMKEYWORDS; i++) - { - int len = strlen(SecurityKeywords[i]); - if (strncmp(s, SecurityKeywords[i], len) == 0) - { - *p = s + len; - return (i); - } - } - *p = s; - return -1; -} /* SecurityParseKeyword */ - - -static Bool -SecurityParsePropertyAccessRule( - char *p) -{ - char *propname; - char c; - int action = SecurityDefaultAction; - int readAction, writeAction, destroyAction; - PropertyAccessPtr pacl, prev, cur; - char *mustHaveProperty = NULL; - char *mustHaveValue = NULL; - Bool invalid; - char windowRestriction; - int size; - int keyword; - - /* get property name */ - propname = SecurityParseString(&p); - if (!propname || (strlen(propname) == 0)) - return FALSE; - - /* get window on which property must reside for rule to apply */ - - keyword = SecurityParseKeyword(&p); - if (keyword == SecurityKeywordRoot) - windowRestriction = SecurityRootWindow; - else if (keyword == SecurityKeywordAny) - windowRestriction = SecurityAnyWindow; - else /* not root or any, must be a property name */ - { - mustHaveProperty = SecurityParseString(&p); - if (!mustHaveProperty || (strlen(mustHaveProperty) == 0)) - return FALSE; - windowRestriction = SecurityWindowWithProperty; - p = SecuritySkipWhitespace(p); - if (*p == '=') - { /* property value is specified too */ - p++; /* skip over '=' */ - mustHaveValue = SecurityParseString(&p); - if (!mustHaveValue) - return FALSE; - } - } - - /* get operations and actions */ - - invalid = FALSE; - readAction = writeAction = destroyAction = SecurityDefaultAction; - while ( (c = *p++) && !invalid) - { - switch (c) - { - case 'i': action = XaceIgnoreError; break; - case 'a': action = Success; break; - case 'e': action = BadAtom; break; - - case 'r': readAction = action; break; - case 'w': writeAction = action; break; - case 'd': destroyAction = action; break; - - default : - if (!SecurityIsWhitespace(c)) - invalid = TRUE; - break; - } - } - if (invalid) - return FALSE; - - /* We've successfully collected all the information needed for this - * property access rule. Now record it in a PropertyAccessRec. - */ - size = sizeof(PropertyAccessRec); - - /* If there is a property value string, allocate space for it - * right after the PropertyAccessRec. - */ - if (mustHaveValue) - size += strlen(mustHaveValue) + 1; - pacl = (PropertyAccessPtr)Xalloc(size); - if (!pacl) - return FALSE; - - pacl->name = MakeAtom(propname, strlen(propname), TRUE); - if (pacl->name == BAD_RESOURCE) - { - Xfree(pacl); - return FALSE; - } - if (mustHaveProperty) - { - pacl->mustHaveProperty = MakeAtom(mustHaveProperty, - strlen(mustHaveProperty), TRUE); - if (pacl->mustHaveProperty == BAD_RESOURCE) - { - Xfree(pacl); - return FALSE; - } - } - else - pacl->mustHaveProperty = 0; - - if (mustHaveValue) - { - pacl->mustHaveValue = (char *)(pacl + 1); - strcpy(pacl->mustHaveValue, mustHaveValue); - } - else - pacl->mustHaveValue = NULL; - - SecurityMaxPropertyName = max(SecurityMaxPropertyName, pacl->name); - - pacl->windowRestriction = windowRestriction; - pacl->readAction = readAction; - pacl->writeAction = writeAction; - pacl->destroyAction = destroyAction; - - /* link the new rule into the list of rules in order of increasing - * property name (atom) value to make searching easier - */ - - for (prev = NULL, cur = PropertyAccessList; - cur && cur->name <= pacl->name; - prev = cur, cur = cur->next) - ; - if (!prev) - { - pacl->next = cur; - PropertyAccessList = pacl; - } - else - { - prev->next = pacl; - pacl->next = cur; - } - return TRUE; -} /* SecurityParsePropertyAccessRule */ - -static Bool -SecurityParseExtensionRule( - char *p) -{ - char *extName = SecurityParseString(&p); - char *copyExtName; - char **newStrings; - - if (!extName) - return FALSE; - - copyExtName = (char *)Xalloc(strlen(extName) + 1); - if (!copyExtName) - return TRUE; - strcpy(copyExtName, extName); - newStrings = (char **)Xrealloc(SecurityTrustedExtensions, - sizeof (char *) * (nSecurityTrustedExtensions + 1)); - if (!newStrings) - { - Xfree(copyExtName); - return TRUE; - } - - SecurityTrustedExtensions = newStrings; - SecurityTrustedExtensions[nSecurityTrustedExtensions++] = copyExtName; - - return TRUE; - -} /* SecurityParseExtensionRule */ - -static void -SecurityFreeTrustedExtensionStrings(void) -{ - if (SecurityTrustedExtensions) - { - assert(nSecurityTrustedExtensions); - while (nSecurityTrustedExtensions--) - { - Xfree(SecurityTrustedExtensions[nSecurityTrustedExtensions]); - } - Xfree(SecurityTrustedExtensions); - SecurityTrustedExtensions = NULL; - nSecurityTrustedExtensions = 0; - } -} /* SecurityFreeSiteTrustedExtensions */ - -static void -SecurityLoadPropertyAccessList(void) -{ - FILE *f; - int lineNumber = 0; - - SecurityMaxPropertyName = 0; - - if (!SecurityPolicyFile) - return; - - f = fopen(SecurityPolicyFile, "r"); - if (!f) - { - ErrorF("error opening security policy file %s\n", - SecurityPolicyFile); - return; - } - - while (!feof(f)) - { - char buf[200]; - Bool validLine; - char *p; - - if (!(p = fgets(buf, sizeof(buf), f))) - break; - lineNumber++; - - /* if first line, check version number */ - if (lineNumber == 1) - { - char *v = SecurityParseString(&p); - if (strcmp(v, SECURITY_POLICY_FILE_VERSION) != 0) - { - ErrorF("%s: invalid security policy file version, ignoring file\n", - SecurityPolicyFile); - break; - } - validLine = TRUE; - } - else - { - switch (SecurityParseKeyword(&p)) - { - case SecurityKeywordComment: - case SecurityKeywordSitePolicy: - validLine = TRUE; - break; - - case SecurityKeywordProperty: - validLine = SecurityParsePropertyAccessRule(p); - break; - - case SecurityKeywordExtension: - validLine = SecurityParseExtensionRule(p); - break; - - default: - validLine = (*p == '\0'); /* blank lines OK, others not */ - break; - } - } - - if (!validLine) - ErrorF("Line %d of %s invalid, ignoring\n", - lineNumber, SecurityPolicyFile); - } /* end while more input */ - - fclose(f); -} /* SecurityLoadPropertyAccessList */ - - -static Bool -SecurityMatchString( - char *ws, - char *cs) -{ - while (*ws && *cs) - { - if (*ws == '*') - { - Bool match = FALSE; - ws++; - while (!(match = SecurityMatchString(ws, cs)) && *cs) - { - cs++; - } - return match; - } - else if (*ws == *cs) - { - ws++; - cs++; - } - else break; - } - return ( ( (*ws == '\0') || ((*ws == '*') && *(ws+1) == '\0') ) - && (*cs == '\0') ); -} /* SecurityMatchString */ - - -static void -SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused, - pointer calldata) -{ - XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata; - ClientPtr client = rec->client; - WindowPtr pWin = rec->pWin; - ATOM propertyName = rec->pProp->propertyName; - Mask access_mode = rec->access_mode; - PropertyAccessPtr pacl; - int action = SecurityDefaultAction; - - /* if client trusted or window untrusted, allow operation */ - - if ((TRUSTLEVEL(client) == XSecurityClientTrusted) || - (TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) ) - return; - - /* If the property atom is bigger than any atoms on the list, - * we know we won't find it, so don't even bother looking. - */ - if (propertyName <= SecurityMaxPropertyName) - { - /* untrusted client operating on trusted window; see if it's allowed */ - - for (pacl = PropertyAccessList; pacl; pacl = pacl->next) - { - if (pacl->name < propertyName) - continue; - if (pacl->name > propertyName) - break; - - /* pacl->name == propertyName, so see if it applies to this window */ - - switch (pacl->windowRestriction) - { - case SecurityAnyWindow: /* always applies */ - break; - - case SecurityRootWindow: - { - /* if not a root window, this rule doesn't apply */ - if (pWin->parent) - continue; - } - break; - - case SecurityWindowWithProperty: - { - PropertyPtr pProp = wUserProps (pWin); - Bool match = FALSE; - char *p; - char *pEndData; - - while (pProp) - { - if (pProp->propertyName == pacl->mustHaveProperty) - break; - pProp = pProp->next; - } - if (!pProp) - continue; - if (!pacl->mustHaveValue) - break; - if (pProp->type != XA_STRING || pProp->format != 8) - continue; - - p = pProp->data; - pEndData = ((char *)pProp->data) + pProp->size; - while (!match && p < pEndData) - { - if (SecurityMatchString(pacl->mustHaveValue, p)) - match = TRUE; - else - { /* skip to the next string */ - while (*p++ && p < pEndData) - ; - } - } - if (!match) - continue; - } - break; /* end case SecurityWindowWithProperty */ - } /* end switch on windowRestriction */ - - /* If we get here, the property access rule pacl applies. - * If pacl doesn't apply, something above should have - * executed a continue, which will skip the follwing code. - */ - action = Success; - if (access_mode & DixReadAccess) - action = max(action, pacl->readAction); - if (access_mode & DixWriteAccess) - action = max(action, pacl->writeAction); - if (access_mode & DixDestroyAccess) - action = max(action, pacl->destroyAction); - break; - } /* end for each pacl */ - } /* end if propertyName <= SecurityMaxPropertyName */ - - if (action != Success) - { /* audit the access violation */ - int cid = CLIENT_ID(pWin->drawable.id); - int reqtype = ((xReq *)client->requestBuffer)->reqType; - char *actionstr = (XaceIgnoreError == action) ? "ignored" : "error"; - SecurityAudit("client %d attempted request %d with window 0x%x property %s (atom 0x%x) of client %d, %s\n", - client->index, reqtype, pWin->drawable.id, - NameForAtom(propertyName), propertyName, cid, actionstr); - } - /* return codes increase with strictness */ - if (action != Success) - rec->status = action; -} /* SecurityCheckPropertyAccess */ - - /* SecurityResetProc * * Arguments: @@ -1764,25 +1038,19 @@ static void SecurityResetProc( ExtensionEntry *extEntry) { - SecurityFreePropertyAccessList(); - SecurityFreeTrustedExtensionStrings(); -} /* SecurityResetProc */ + /* Unregister callbacks */ + DeleteCallback(&ClientStateCallback, SecurityClientState, NULL); - -int -XSecurityOptions(argc, argv, i) - int argc; - char **argv; - int i; -{ - if (strcmp(argv[i], "-sp") == 0) - { - if (i < argc) - SecurityPolicyFile = argv[++i]; - return (i + 1); - } - return (i); -} /* XSecurityOptions */ + XaceDeleteCallback(XACE_EXT_DISPATCH, SecurityExtension, NULL); + XaceDeleteCallback(XACE_RESOURCE_ACCESS, SecurityResource, NULL); + XaceDeleteCallback(XACE_DEVICE_ACCESS, SecurityDevice, NULL); + XaceDeleteCallback(XACE_PROPERTY_ACCESS, SecurityProperty, NULL); + XaceDeleteCallback(XACE_SEND_ACCESS, SecuritySend, NULL); + XaceDeleteCallback(XACE_RECEIVE_ACCESS, SecurityReceive, NULL); + XaceDeleteCallback(XACE_CLIENT_ACCESS, SecurityClient, NULL); + XaceDeleteCallback(XACE_EXT_ACCESS, SecurityExtension, NULL); + XaceDeleteCallback(XACE_SERVER_ACCESS, SecurityServer, NULL); +} /* SecurityExtensionInit @@ -1799,6 +1067,7 @@ void SecurityExtensionInit(INITARGS) { ExtensionEntry *extEntry; + int ret = TRUE; SecurityAuthorizationResType = CreateNewResourceType(SecurityDeleteAuthorization); @@ -1812,12 +1081,26 @@ SecurityExtensionInit(INITARGS) RTEventClient |= RC_NEVERRETAIN; /* Allocate the private storage */ - if (!dixRequestPrivate(stateKey, sizeof(SecurityClientStateRec))) + if (!dixRequestPrivate(stateKey, sizeof(SecurityStateRec))) FatalError("SecurityExtensionSetup: Can't allocate client private.\n"); - if (!AddCallback(&ClientStateCallback, SecurityClientStateCallback, NULL)) - return; + /* Register callbacks */ + ret &= AddCallback(&ClientStateCallback, SecurityClientState, NULL); + ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SecurityExtension, NULL); + ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SecurityResource, NULL); + ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SecurityDevice, NULL); + ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SecurityProperty, NULL); + ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SecuritySend, NULL); + ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SecurityReceive, NULL); + ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SecurityClient, NULL); + ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SecurityExtension, NULL); + ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SecurityServer, NULL); + + if (!ret) + FatalError("SecurityExtensionSetup: Failed to register callbacks\n"); + + /* Add extension to server */ extEntry = AddExtension(SECURITY_EXTENSION_NAME, XSecurityNumberEvents, XSecurityNumberErrors, ProcSecurityDispatch, SProcSecurityDispatch, @@ -1829,15 +1112,6 @@ SecurityExtensionInit(INITARGS) EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] = (EventSwapPtr)SwapSecurityAuthorizationRevokedEvent; - SecurityLoadPropertyAccessList(); - - /* register callbacks */ -#define XaceRC XaceRegisterCallback - XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL); - XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL); - XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL); - XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL); - XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL); - XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL); - XaceRC(XACE_SERVER_ACCESS, SecurityCheckServerAccess, NULL); -} /* SecurityExtensionInit */ + /* Label objects that were created before we could register ourself */ + SecurityLabelInitial(); +} diff --git a/Xext/securitysrv.h b/Xext/securitysrv.h index 7320ab7da..f4f3e32ae 100644 --- a/Xext/securitysrv.h +++ b/Xext/securitysrv.h @@ -77,11 +77,7 @@ typedef struct { Bool valid; /* did anyone recognize it? if so, set to TRUE */ } SecurityValidateGroupInfoRec; -extern int XSecurityOptions(int argc, char **argv, int i); - /* Give this value or higher to the -audit option to get security messages */ #define SECURITY_AUDIT_LEVEL 4 -#define SECURITY_POLICY_FILE_VERSION "version-1" - #endif /* _SECURITY_SRV_H */ diff --git a/os/utils.c b/os/utils.c index 322814669..d69936df7 100644 --- a/os/utils.c +++ b/os/utils.c @@ -123,9 +123,6 @@ OR PERFORMANCE OF THIS SOFTWARE. #ifdef XKB #include #endif -#ifdef XCSECURITY -#include "securitysrv.h" -#endif #ifdef RENDER #include "picture.h" @@ -621,9 +618,6 @@ void UseMsg(void) ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); #endif ErrorF("-s # screen-saver timeout (minutes)\n"); -#ifdef XCSECURITY - ErrorF("-sp file security policy file\n"); -#endif #ifdef XPRINT PrinterUseMsg(); #endif @@ -1040,12 +1034,6 @@ ProcessCommandLine(int argc, char *argv[]) i = skip - 1; } #endif -#ifdef XCSECURITY - else if ((skip = XSecurityOptions(argc, argv, i)) != i) - { - i = skip - 1; - } -#endif #ifdef AIXV3 else if ( strcmp( argv[i], "-timeout") == 0) { From 9d03cad1446c27b397c198cf6247e71e46bc9e6d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Nov 2007 16:41:47 -0500 Subject: [PATCH 199/552] Remove SecurityPolicy file and associated references in the manpages. --- .gitignore | 2 - Xext/Makefile.am | 7 - Xext/SecurityPolicy | 86 ------------- doc/Makefile.am | 2 +- doc/SecurityPolicy.man.pre | 258 ------------------------------------- doc/Xserver.man.pre | 13 -- 6 files changed, 1 insertion(+), 367 deletions(-) delete mode 100644 Xext/SecurityPolicy delete mode 100644 doc/SecurityPolicy.man.pre diff --git a/.gitignore b/.gitignore index 27132c0f9..1213d9993 100644 --- a/.gitignore +++ b/.gitignore @@ -92,8 +92,6 @@ cfb32/cfbzerarcG.c cfb32/cfbzerarcX.c doc/Xserver.1x doc/Xserver.man -doc/SecurityPolicy.5 -doc/SecurityPolicy.man hw/dmx/Xdmx hw/dmx/Xdmx.1x hw/dmx/config/dmxtodmx diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 6fe1c3488..f57e59910 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -33,9 +33,6 @@ MODULE_SRCS = \ sync.c \ xcmisc.c -# Extra configuration files ship with some extensions -SERVERCONFIG_DATA = - # Optional sources included if extension enabled by configure.ac rules # MIT Shared Memory extension @@ -86,9 +83,6 @@ endif XCSECURITY_SRCS = security.c securitysrv.h if XCSECURITY BUILTIN_SRCS += $(XCSECURITY_SRCS) - -SERVERCONFIG_DATA += SecurityPolicy -AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\" endif XCALIBRATE_SRCS = xcalibrate.c @@ -166,7 +160,6 @@ libXextmodule_la_SOURCES = $(MODULE_SRCS) endif EXTRA_DIST = \ - $(SERVERCONFIG_DATA) \ $(MITSHM_SRCS) \ $(XV_SRCS) \ $(RES_SRCS) \ diff --git a/Xext/SecurityPolicy b/Xext/SecurityPolicy deleted file mode 100644 index 04dfb0e6b..000000000 --- a/Xext/SecurityPolicy +++ /dev/null @@ -1,86 +0,0 @@ -version-1 - -# $Xorg: SecurityPolicy,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ - -# Property access rules: -# property -# ::= any | root | -# ::= | = -# :== [ | | ]* -# :== r | w | d -# r read -# w write -# d delete -# :== a | i | e -# a allow -# i ignore -# e error - -# Allow reading of application resources, but not writing. -property RESOURCE_MANAGER root ar iw -property SCREEN_RESOURCES root ar iw - -# Ignore attempts to use cut buffers. Giving errors causes apps to crash, -# and allowing access may give away too much information. -property CUT_BUFFER0 root irw -property CUT_BUFFER1 root irw -property CUT_BUFFER2 root irw -property CUT_BUFFER3 root irw -property CUT_BUFFER4 root irw -property CUT_BUFFER5 root irw -property CUT_BUFFER6 root irw -property CUT_BUFFER7 root irw - -# If you are using Motif, you probably want these. -property _MOTIF_DEFAULT_BINDINGS root ar iw -property _MOTIF_DRAG_WINDOW root ar iw -property _MOTIF_DRAG_TARGETS any ar iw -property _MOTIF_DRAG_ATOMS any ar iw -property _MOTIF_DRAG_ATOM_PAIRS any ar iw - -# If you are running CDE you also need these -property _MOTIF_WM_INFO root arw -property TT_SESSION root irw -property WM_ICON_SIZE root irw -property "SDT Pixel Set" any irw - -# The next two rules let xwininfo -tree work when untrusted. -property WM_NAME any ar - -# Allow read of WM_CLASS, but only for windows with WM_NAME. -# This might be more restrictive than necessary, but demonstrates -# the facility, and is also an attempt to -# say "top level windows only." -property WM_CLASS WM_NAME ar - -# These next three let xlsclients work untrusted. Think carefully -# before including these; giving away the client machine name and command -# may be exposing too much. -property WM_STATE WM_NAME ar -property WM_CLIENT_MACHINE WM_NAME ar -property WM_COMMAND WM_NAME ar - -# To let untrusted clients use the standard colormaps created by -# xstdcmap, include these lines. -property RGB_DEFAULT_MAP root ar -property RGB_BEST_MAP root ar -property RGB_RED_MAP root ar -property RGB_GREEN_MAP root ar -property RGB_BLUE_MAP root ar -property RGB_GRAY_MAP root ar - -# To let untrusted clients use the color management database created -# by xcmsdb, include these lines. -property XDCCC_LINEAR_RGB_CORRECTION root ar -property XDCCC_LINEAR_RGB_MATRICES root ar -property XDCCC_GRAY_SCREENWHITEPOINT root ar -property XDCCC_GRAY_CORRECTION root ar - -# To let untrusted clients use the overlay visuals that many vendors -# support, include this line. -property SERVER_OVERLAY_VISUALS root ar - -# Only trusted extensions can be used by untrusted clients -trust extension XC-MISC -trust extension BIG-REQUESTS -trust extension XpExtension diff --git a/doc/Makefile.am b/doc/Makefile.am index ce1979d4f..d3911c9bf 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -5,7 +5,7 @@ filemandir = $(FILE_MAN_DIR) # (i.e. those handled in the os/utils.c options processing instead of in # the DDX-level options processing) appman_PRE = Xserver.man.pre -fileman_PRE = SecurityPolicy.man.pre +fileman_PRE = appman_PROCESSED = $(appman_PRE:man.pre=man) fileman_PROCESSED = $(fileman_PRE:man.pre=man) diff --git a/doc/SecurityPolicy.man.pre b/doc/SecurityPolicy.man.pre deleted file mode 100644 index f5aff0c6c..000000000 --- a/doc/SecurityPolicy.man.pre +++ /dev/null @@ -1,258 +0,0 @@ -.\" Split out of Xserver.man, which was covered by this notice: -.\" Copyright 1984 - 1991, 1993, 1994, 1998 The Open Group -.\" -.\" Permission to use, copy, modify, distribute, and sell this software and its -.\" documentation for any purpose is hereby granted without fee, provided that -.\" the above copyright notice appear in all copies and that both that -.\" copyright notice and this permission notice appear in supporting -.\" documentation. -.\" -.\" The above copyright notice and this permission notice 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 NONINFRINGEMENT. -.\" IN NO EVENT SHALL THE OPEN GROUP 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. -.\" -.\" Except as contained in this notice, the name of The Open Group shall -.\" not be used in advertising or otherwise to promote the sale, use or -.\" other dealings in this Software without prior written authorization -.\" from The Open Group. -.\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.31 2004/01/10 22:27:46 dawes Exp $ -.\" shorthand for double quote that works everywhere. -.ds q \N'34' -.TH SecurityPolicy __filemansuffix__ __xorgversion__ -.SH NAME -SecurityPolicy \- X Window System SECURITY Extension Policy file format -.SH DESCRIPTION -The SECURITY extension to the X Window System uses a policy file to determine -which operations should be allowed or denied. The default location for this -file is -.IR __projectroot__/lib/xserver/SecurityPolicy . -.PP -The syntax of the security policy file is as follows. -Notation: "*" means zero or more occurrences of the preceding element, -and "+" means one or more occurrences. To interpret , ignore -the text after the /; it is used to distinguish between instances of - in the next section. -.PP -.nf - ::= * - - ::= '\en' - - ::= | | | - - ::= # * '\en' - - ::= '\en' - - ::= sitepolicy '\en' - - ::= property '\en' - - ::= - - ::= any | root | - - ::= | - - ::= = - - ::= [ | | ]* - - ::= r | w | d - - ::= a | i | e - - ::= | | - - ::= " * " - - ::= ' * ' - - ::= + - - ::= [ ' ' | '\et' ]* - -Character sets: - - ::= any character except '\en' - ::= any character except " - ::= any character except ' - ::= any character except those in -.fi -.PP -The semantics associated with the above syntax are as follows. -.PP -, the first line in the file, specifies the file format -version. If the server does not recognize the version , it -ignores the rest of the file. The version string for the file format -described here is "version-1" . -.PP -Once past the , lines that do not match the above syntax -are ignored. -.PP - lines are ignored. -.PP - lines are currently ignored. They are intended to -specify the site policies used by the XC-QUERY-SECURITY-1 -authorization method. -.PP - lines specify how the server should react to untrusted -client requests that affect the X Window property named . -The rest of this section describes the interpretation of an -. -.PP -For an to apply to a given instance of , - must be on a window that is in the set of windows -specified by . If is any, the rule applies to - on any window. If is root, the rule applies to - only on root windows. -.PP -If is , the following apply. If is a , the rule applies when the window also -has that , regardless of its value. If is a , must also have -the value specified by . In this case, the property must -have type STRING and format 8, and should contain one or more -null-terminated strings. If any of the strings match , the -rule applies. -.PP -The definition of string matching is simple case-sensitive string -comparison with one elaboration: the occurrence of the character '*' in - is a wildcard meaning "any string." A can -contain multiple wildcards anywhere in the string. For example, "x*" -matches strings that begin with x, "*x" matches strings that end with -x, "*x*" matches strings containing x, and "x*y*" matches strings that -start with x and subsequently contain y. -.PP -There may be multiple lines for a given . -The rules are tested in the order that they appear in the file. The -first rule that applies is used. -.PP - specify operations that untrusted clients may attempt, and -the actions that the server should take in response to those operations. -.PP - can be r (read), w (write), or d (delete). The following -table shows how X Protocol property requests map to these operations -in the X.Org server implementation. -.PP -.nf -GetProperty r, or r and d if delete = True -ChangeProperty w -RotateProperties r and w -DeleteProperty d -ListProperties none, untrusted clients can always list all properties -.fi -.PP - can be a (allow), i (ignore), or e (error). Allow means -execute the request as if it had been issued by a trusted client. -Ignore means treat the request as a no-op. In the case of -GetProperty, ignore means return an empty property value if the -property exists, regardless of its actual value. Error means do not -execute the request and return a BadAtom error with the atom set to -the property name. Error is the default action for all properties, -including those not listed in the security policy file. -.PP -An applies to all s that follow it, until the next - is encountered. Thus, irwad means ignore read and write, -allow delete. -.PP -GetProperty and RotateProperties may do multiple operations (r and d, -or r and w). If different actions apply to the operations, the most -severe action is applied to the whole request; there is no partial -request execution. The severity ordering is: allow < ignore < error. -Thus, if the for a property are ired (ignore read, error -delete), and an untrusted client attempts GetProperty on that property -with delete = True, an error is returned, but the property value is -not. Similarly, if any of the properties in a RotateProperties do not -allow both read and write, an error is returned without changing any -property values. -.PP -Here is an example security policy file. -.PP -.ta 3i 4i -.nf -version-1 - -XCOMM Allow reading of application resources, but not writing. -property RESOURCE_MANAGER root ar iw -property SCREEN_RESOURCES root ar iw - -XCOMM Ignore attempts to use cut buffers. Giving errors causes apps to crash, -XCOMM and allowing access may give away too much information. -property CUT_BUFFER0 root irw -property CUT_BUFFER1 root irw -property CUT_BUFFER2 root irw -property CUT_BUFFER3 root irw -property CUT_BUFFER4 root irw -property CUT_BUFFER5 root irw -property CUT_BUFFER6 root irw -property CUT_BUFFER7 root irw - -XCOMM If you are using Motif, you probably want these. -property _MOTIF_DEFAULT_BINDINGS root ar iw -property _MOTIF_DRAG_WINDOW root ar iw -property _MOTIF_DRAG_TARGETS any ar iw -property _MOTIF_DRAG_ATOMS any ar iw -property _MOTIF_DRAG_ATOM_PAIRS any ar iw - -XCOMM The next two rules let xwininfo -tree work when untrusted. -property WM_NAME any ar - -XCOMM Allow read of WM_CLASS, but only for windows with WM_NAME. -XCOMM This might be more restrictive than necessary, but demonstrates -XCOMM the facility, and is also an attempt to -XCOMM say "top level windows only." -property WM_CLASS WM_NAME ar - -XCOMM These next three let xlsclients work untrusted. Think carefully -XCOMM before including these; giving away the client machine name and command -XCOMM may be exposing too much. -property WM_STATE WM_NAME ar -property WM_CLIENT_MACHINE WM_NAME ar -property WM_COMMAND WM_NAME ar - -XCOMM To let untrusted clients use the standard colormaps created by -XCOMM xstdcmap, include these lines. -property RGB_DEFAULT_MAP root ar -property RGB_BEST_MAP root ar -property RGB_RED_MAP root ar -property RGB_GREEN_MAP root ar -property RGB_BLUE_MAP root ar -property RGB_GRAY_MAP root ar - -XCOMM To let untrusted clients use the color management database created -XCOMM by xcmsdb, include these lines. -property XDCCC_LINEAR_RGB_CORRECTION root ar -property XDCCC_LINEAR_RGB_MATRICES root ar -property XDCCC_GRAY_SCREENWHITEPOINT root ar -property XDCCC_GRAY_CORRECTION root ar - -XCOMM To let untrusted clients use the overlay visuals that many vendors -XCOMM support, include this line. -property SERVER_OVERLAY_VISUALS root ar - -XCOMM Dumb examples to show other capabilities. - -XCOMM oddball property names and explicit specification of error conditions -property "property with spaces" 'property with "' aw er ed - -XCOMM Allow deletion of Woo-Hoo if window also has property OhBoy with value -XCOMM ending in "son". Reads and writes will cause an error. -property Woo-Hoo OhBoy = "*son" ad - -.fi -.SH FILES -.TP 30 -.I __projectroot__/lib/xserver/SecurityPolicy -Default X server security policy -.SH "SEE ALSO" -.PP -\fIXserver\fp(__appmansuffix__), -.I "Security Extension Specification" diff --git a/doc/Xserver.man.pre b/doc/Xserver.man.pre index c9ee019c6..c47a3966b 100644 --- a/doc/Xserver.man.pre +++ b/doc/Xserver.man.pre @@ -407,15 +407,6 @@ elapse between autorepeat-generated keystrokes). .TP 8 .B \-xkbmap \fIfilename\fP loads keyboard description in \fIfilename\fP on server startup. -.SH SECURITY EXTENSION OPTIONS -X servers that support the SECURITY extension accept the following option: -.TP 8 -.B \-sp \fIfilename\fP -causes the server to attempt to read and interpret filename as a security -policy file with the format described below. The file is read at server -startup and reread at each server reset. -The syntax of the security policy file is described in -\fISecurityPolicy\fP(__filemansuffix__). .SH "NETWORK CONNECTIONS" The X server supports client connections via a platform-dependent subset of the following transport types: TCP\/IP, Unix Domain sockets, DECnet, @@ -580,9 +571,6 @@ Error log file for display number \fBn\fP if run from \fIinit\fP(__adminmansuffi .TP 30 .I __projectroot__/lib/X11/xdm/xdm-errors Default error log file if the server is run from \fIxdm\fP(1) -.TP 30 -.I __projectroot__/lib/xserver/SecurityPolicy -Default X server security policy .SH "SEE ALSO" General information: \fIX\fP(__miscmansuffix__) .PP @@ -597,7 +585,6 @@ Fonts: \fIbdftopcf\fP(1), \fImkfontdir\fP(1), \fImkfontscale\fP(1), .PP Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1), \fIxdm\fP(1), \fIxhost\fP(1), \fIxfwp\fP(1), -\fISecurityPolicy\fP(__filemansuffix__), .I "Security Extension Specification" .PP Starting the server: \fIxdm\fP(1), \fIxinit\fP(1) From 1c6cb353f77747c101ce47716ff1fa055fbf85a4 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Nov 2007 16:46:49 -0500 Subject: [PATCH 200/552] Restore the XC-SECURITY option in configure.ac, but disabled by default. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 278dcacd4..84b24cf1f 100644 --- a/configure.ac +++ b/configure.ac @@ -514,8 +514,8 @@ AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF8 AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no]) -AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (TEMPORARILY DISABLED)]), [XCSECURITY=no], [XCSECURITY=no]) -AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) +AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no]) +AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: disabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes]) From b092856baba5bd43b23950f23236b5cc3ce78c1e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 9 Nov 2007 14:45:02 -0500 Subject: [PATCH 201/552] registry: Register XC-SECURITY extension protocol names. --- Xext/security.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Xext/security.c b/Xext/security.c index 6aab3a342..eef4f693c 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1114,4 +1114,20 @@ SecurityExtensionInit(INITARGS) /* Label objects that were created before we could register ourself */ SecurityLabelInitial(); + + /* Register protocol names */ + RegisterRequestName(extEntry->base, X_SecurityQueryVersion, + SECURITY_EXTENSION_NAME ":QueryVersion"); + RegisterRequestName(extEntry->base, X_SecurityGenerateAuthorization, + SECURITY_EXTENSION_NAME ":GenerateAuthorization"); + RegisterRequestName(extEntry->base, X_SecurityRevokeAuthorization, + SECURITY_EXTENSION_NAME ":RevokeAuthorization"); + + RegisterEventName(SecurityEventBase + XSecurityAuthorizationRevoked, + SECURITY_EXTENSION_NAME ":AuthorizationRevoked"); + + RegisterErrorName(SecurityErrorBase + XSecurityBadAuthorization, + SECURITY_EXTENSION_NAME ":BadAuthorization"); + RegisterErrorName(SecurityErrorBase + XSecurityBadAuthorizationProtocol, + SECURITY_EXTENSION_NAME ":BadAuthorizationProtocol"); } From 45f884d79c0eebaa1eb24d7db76c1177f6b710c9 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 9 Nov 2007 14:45:27 -0500 Subject: [PATCH 202/552] xselinux: add new synthetic_event security class, and fix registry code. --- Xext/xselinux.c | 36 +++++++++++++++++++----------------- Xext/xselinux.h | 3 ++- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index f6d1dcd4b..eed78f4fe 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -129,6 +129,7 @@ static struct security_class_mapping map[] = { { "x_server", { "record", "", "", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "grab", "", "", "", "", "", "", "", "manage", "debug", NULL }}, { "x_extension", { "", "", "", "", "query", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_event", { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "send", "receive", NULL }}, + { "x_synthetic_event", { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "send", "receive", NULL }}, { "x_resource", { "read", "write", "write", "write", "read", "write", "read", "read", "write", "read", "write", "read", "write", "write", "write", "read", "read", "write", "write", "write", "write", "write", "write", "read", "read", "write", "read", "write", NULL }}, { NULL } }; @@ -501,9 +502,10 @@ static void SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceSendAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxStateRec *subj, *obj, ev_sid; SELinuxAuditRec auditdata = { .client = rec->client }; - int rc, i, clientIndex; + security_class_t class; + int rc, i, type, clientIndex; if (rec->dev) { subj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); @@ -523,14 +525,15 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Check send permission on specific event types */ for (i = 0; i < rec->count; i++) { - SELinuxStateRec ev_sid; + type = rec->events[i].u.u.type; + class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT; - rc = SELinuxEventToSID(rec->events[i].u.u.type, obj->sid, &ev_sid); + rc = SELinuxEventToSID(type, obj->sid, &ev_sid); if (rc != Success) goto err; auditdata.event = rec->events[i].u.u.type; - rc = SELinuxDoCheck(clientIndex, subj, &ev_sid, SECCLASS_X_EVENT, + rc = SELinuxDoCheck(clientIndex, subj, &ev_sid, class, DixSendAccess, &auditdata); if (rc != Success) goto err; @@ -1073,7 +1076,6 @@ ProcSELinuxSetDeviceContext(ClientPtr client) state = dixLookupPrivate(&dev->devPrivates, stateKey); sidput(state->sid); state->sid = sid; - ErrorF("I really, actually did relabel a device to %s\n", ctx); return Success; } @@ -1397,26 +1399,26 @@ XSELinuxExtensionInit(INITARGS) SELinuxLabelInitial(); /* Add names to registry */ - RegisterRequestName(X_SELinuxQueryVersion, 0, + RegisterRequestName(extEntry->base, X_SELinuxQueryVersion, XSELINUX_EXTENSION_NAME ":SELinuxQueryVersion"); - RegisterRequestName(X_SELinuxSetSelectionManager, 0, + RegisterRequestName(extEntry->base, X_SELinuxSetSelectionManager, XSELINUX_EXTENSION_NAME ":SELinuxSetSelectionManager"); - RegisterRequestName(X_SELinuxGetSelectionManager, 0, + RegisterRequestName(extEntry->base, X_SELinuxGetSelectionManager, XSELINUX_EXTENSION_NAME ":SELinuxGetSelectionManager"); - RegisterRequestName(X_SELinuxSetDeviceContext, 0, + RegisterRequestName(extEntry->base, X_SELinuxSetDeviceContext, XSELINUX_EXTENSION_NAME ":SELinuxSetDeviceContext"); - RegisterRequestName(X_SELinuxGetDeviceContext, 0, + RegisterRequestName(extEntry->base, X_SELinuxGetDeviceContext, XSELINUX_EXTENSION_NAME ":SELinuxGetDeviceContext"); - RegisterRequestName(X_SELinuxSetPropertyCreateContext, 0, + RegisterRequestName(extEntry->base, X_SELinuxSetPropertyCreateContext, XSELINUX_EXTENSION_NAME ":SELinuxSetPropertyCreateContext"); - RegisterRequestName(X_SELinuxGetPropertyCreateContext, 0, + RegisterRequestName(extEntry->base, X_SELinuxGetPropertyCreateContext, XSELINUX_EXTENSION_NAME ":SELinuxGetPropertyCreateContext"); - RegisterRequestName(X_SELinuxGetPropertyContext, 0, + RegisterRequestName(extEntry->base, X_SELinuxGetPropertyContext, XSELINUX_EXTENSION_NAME ":SELinuxGetPropertyContext"); - RegisterRequestName(X_SELinuxSetWindowCreateContext, 0, + RegisterRequestName(extEntry->base, X_SELinuxSetWindowCreateContext, XSELINUX_EXTENSION_NAME ":SELinuxSetWindowCreateContext"); - RegisterRequestName(X_SELinuxGetWindowCreateContext, 0, + RegisterRequestName(extEntry->base, X_SELinuxGetWindowCreateContext, XSELINUX_EXTENSION_NAME ":SELinuxGetWindowCreateContext"); - RegisterRequestName(X_SELinuxGetWindowContext, 0, + RegisterRequestName(extEntry->base, X_SELinuxGetWindowContext, XSELINUX_EXTENSION_NAME ":SELinuxGetWindowContext"); } diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 50838d754..ea8d9e440 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -187,6 +187,7 @@ typedef struct { #define SECCLASS_X_SERVER 11 #define SECCLASS_X_EXTENSION 12 #define SECCLASS_X_EVENT 13 -#define SECCLASS_X_RESOURCE 14 +#define SECCLASS_X_FAKEEVENT 14 +#define SECCLASS_X_RESOURCE 15 #endif /* _XSELINUX_H */ From f207e69d62bc04c7f254347b03e6d8fa8b569d66 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 14 Nov 2007 12:23:29 -0500 Subject: [PATCH 203/552] xselinux: adjust receive hook to use new synthetic_event class. --- Xext/xselinux.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index eed78f4fe..cefde9d37 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -532,7 +532,7 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (rc != Success) goto err; - auditdata.event = rec->events[i].u.u.type; + auditdata.event = type; rc = SELinuxDoCheck(clientIndex, subj, &ev_sid, class, DixSendAccess, &auditdata); if (rc != Success) @@ -547,9 +547,10 @@ static void SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceReceiveAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxStateRec *subj, *obj, ev_sid; SELinuxAuditRec auditdata = { .client = NULL }; - int rc, i; + security_class_t class; + int rc, i, type; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); @@ -562,14 +563,15 @@ SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Check receive permission on specific event types */ for (i = 0; i < rec->count; i++) { - SELinuxStateRec ev_sid; + type = rec->events[i].u.u.type; + class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT; - rc = SELinuxEventToSID(rec->events[i].u.u.type, obj->sid, &ev_sid); + rc = SELinuxEventToSID(type, obj->sid, &ev_sid); if (rc != Success) goto err; - auditdata.event = rec->events[i].u.u.type; - rc = SELinuxDoCheck(rec->client->index, subj, &ev_sid, SECCLASS_X_EVENT, + auditdata.event = type; + rc = SELinuxDoCheck(rec->client->index, subj, &ev_sid, class, DixReceiveAccess, &auditdata); if (rc != Success) goto err; From a95bb52b4366d85fc049130c60af5c9e727c565b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 19 Nov 2007 16:34:38 -0500 Subject: [PATCH 204/552] devPrivates rework: add missing include of dix/privates.h --- mi/miline.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mi/miline.h b/mi/miline.h index ffa4b2743..036c2b5df 100644 --- a/mi/miline.h +++ b/mi/miline.h @@ -28,6 +28,7 @@ in this Software without prior written authorization from The Open Group. #ifndef MILINE_H #include "screenint.h" +#include "privates.h" /* * Public definitions used for configuring basic pixelization aspects From 60be452c2e88342f92a76ba5ec7d90b5b0211aaf Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 19 Nov 2007 16:55:09 -0500 Subject: [PATCH 205/552] xace: restore the old SaveScreens function and introduce new API, since the old version is called from drivers... --- Xext/saver.c | 4 ++-- Xext/xtest.c | 2 +- dix/dispatch.c | 2 +- dix/main.c | 4 ++-- dix/window.c | 8 +++++++- hw/darwin/darwinEvents.c | 2 +- hw/dmx/dmxdpms.c | 2 +- hw/xfree86/common/xf86DPMS.c | 2 +- hw/xfree86/common/xf86Events.c | 4 ++-- hw/xfree86/common/xf86PM.c | 2 +- hw/xfree86/loader/dixsym.c | 1 + include/window.h | 6 +++++- mi/mieq.c | 2 +- os/WaitFor.c | 2 +- 14 files changed, 27 insertions(+), 16 deletions(-) diff --git a/Xext/saver.c b/Xext/saver.c index 6905fc678..43dd3e2de 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -468,8 +468,8 @@ ScreenSaverFreeAttr (value, id) pPriv->attr = NULL; if (pPriv->hasWindow) { - SaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); - SaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverActive); + dixSaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + dixSaveScreens (serverClient, SCREEN_SAVER_FORCER, ScreenSaverActive); } CheckScreenPrivate (pScreen); return TRUE; diff --git a/Xext/xtest.c b/Xext/xtest.c index 3895a0073..effa3b904 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -459,7 +459,7 @@ ProcXTestFakeInput(client) break; } if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); ev->u.keyButtonPointer.time = currentTime.milliseconds; (*dev->public.processInputProc)(ev, dev, nev); return client->noClientException; diff --git a/dix/dispatch.c b/dix/dispatch.c index f7196fde7..0c8e6b133 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3582,7 +3582,7 @@ int ProcForceScreenSaver(ClientPtr client) client->errorValue = stuff->mode; return BadValue; } - rc = SaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode); + rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode); if (rc != Success) return rc; return client->noClientException; diff --git a/dix/main.c b/dix/main.c index 543e94c86..bc00ac5e5 100644 --- a/dix/main.c +++ b/dix/main.c @@ -425,7 +425,7 @@ main(int argc, char *argv[], char *envp[]) for (i = 0; i < screenInfo.numScreens; i++) InitRootWindow(WindowTable[i]); DefineInitialRootWindow(WindowTable[0]); - SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); #ifdef PANORAMIX if (!noPanoramiXExtension) { @@ -446,7 +446,7 @@ main(int argc, char *argv[], char *envp[]) /* Now free up whatever must be freed */ if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); FreeScreenSaverTimer(); CloseDownExtensions(); diff --git a/dix/window.c b/dix/window.c index f183aa3b7..f12c82b08 100644 --- a/dix/window.c +++ b/dix/window.c @@ -3337,7 +3337,7 @@ static void DrawLogo( #endif _X_EXPORT int -SaveScreens(ClientPtr client, int on, int mode) +dixSaveScreens(ClientPtr client, int on, int mode) { int rc, i, what, type; @@ -3455,6 +3455,12 @@ SaveScreens(ClientPtr client, int on, int mode) return Success; } +_X_EXPORT int +SaveScreens(int on, int mode) +{ + return dixSaveScreens(serverClient, on, mode); +} + static Bool TileScreenSaver(int i, int kind) { diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 97ad8577e..4980cf271 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -276,7 +276,7 @@ void ProcessInputEvents(void) { while (darwinEventQueue.head != darwinEventQueue.tail) { if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); e = &darwinEventQueue.events[darwinEventQueue.head]; xe = e->event; diff --git a/hw/dmx/dmxdpms.c b/hw/dmx/dmxdpms.c index 8c745a6aa..2af160556 100644 --- a/hw/dmx/dmxdpms.c +++ b/hw/dmx/dmxdpms.c @@ -175,7 +175,7 @@ void dmxDPMSTerm(DMXScreenInfo *dmxScreen) void dmxDPMSWakeup(void) { if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); #ifdef DPMSExtension if (DPMSPowerLevel) DPMSSet(serverClient, 0); #endif diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index 536d38e8f..43efb8ed4 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -153,7 +153,7 @@ DPMSSet(ClientPtr client, int level) return Success; if (level != DPMSModeOn) { - rc = SaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive); + rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive); if (rc != Success) return rc; } diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index bc2fe0912..2b7cb121d 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -906,7 +906,7 @@ xf86VTSwitch() (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE); } } - SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { @@ -970,7 +970,7 @@ xf86VTSwitch() } /* Turn screen saver off when switching back */ - SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c index 278a51474..7c8320dee 100644 --- a/hw/xfree86/common/xf86PM.c +++ b/hw/xfree86/common/xf86PM.c @@ -116,7 +116,7 @@ resume(pmEvent event, Bool undo) if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE); } - SaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { EnableDevice(pInfo->dev); diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 139e23c6e..1a259f5e8 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -319,6 +319,7 @@ _X_HIDDEN void *dixLookupTab[] = { SYMFUNC(NotClippedByChildren) SYMFUNC(ResizeChildrenWinSize) SYMFUNC(SaveScreens) + SYMFUNC(dixSaveScreens) SYMFUNC(SendVisibilityNotify) SYMFUNC(SetWinSize) SYMFUNC(SetBorderSize) diff --git a/include/window.h b/include/window.h index f85eceb2d..9943f903c 100644 --- a/include/window.h +++ b/include/window.h @@ -204,11 +204,15 @@ extern RegionPtr NotClippedByChildren( extern void SendVisibilityNotify( WindowPtr /*pWin*/); -extern int SaveScreens( +extern int dixSaveScreens( ClientPtr client, int on, int mode); +extern int SaveScreens( + int on, + int mode); + extern WindowPtr FindWindowWithOptional( WindowPtr /*w*/); diff --git a/mi/mieq.c b/mi/mieq.c index 5093023c7..d946e7d04 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -200,7 +200,7 @@ mieqProcessInputEvents(void) while (miEventQueue.head != miEventQueue.tail) { if (screenIsSaved == SCREEN_SAVER_ON) - SaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); + dixSaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); #ifdef DPMSExtension else if (DPMSPowerLevel != DPMSModeOn) SetScreenSaverTimer(); diff --git a/os/WaitFor.c b/os/WaitFor.c index 9281ba8ea..cfba251b0 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -647,7 +647,7 @@ ScreenSaverTimeoutExpire(OsTimerPtr timer,CARD32 now,pointer arg) } ResetOsBuffers(); /* not ideal, but better than nothing */ - SaveScreens(serverClient, SCREEN_SAVER_ON, ScreenSaverActive); + dixSaveScreens(serverClient, SCREEN_SAVER_ON, ScreenSaverActive); if (ScreenSaverInterval > 0) { From 5b0dfb73ca4699cc4b33720f10416de7440081b7 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 19 Nov 2007 21:01:22 -0500 Subject: [PATCH 206/552] devPrivates rework: put back a comment that was mistakenly removed during merge conflict resolution. --- cfb/cfb.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cfb/cfb.h b/cfb/cfb.h index e80a427ec..aece13341 100644 --- a/cfb/cfb.h +++ b/cfb/cfb.h @@ -81,6 +81,8 @@ typedef struct { CfbBits xor, and; } cfbRRopRec, *cfbRRopPtr; +/* cfb8bit.c */ + extern int cfbSetStipple( int /*alu*/, CfbBits /*fg*/, From 709c1a70c8c6a9e132bf0d92f78a12be72beee51 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 15:18:02 -0500 Subject: [PATCH 207/552] Remove some duplicate include statements. --- Xext/xres.c | 1 - dix/main.c | 1 - fb/fb.h | 1 - 3 files changed, 3 deletions(-) diff --git a/Xext/xres.c b/Xext/xres.c index 281ba20cd..efa6c49c7 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -23,7 +23,6 @@ #include "windowstr.h" #include "gcstruct.h" #include "modinit.h" -#include "registry.h" static int ProcXResQueryVersion (ClientPtr client) diff --git a/dix/main.c b/dix/main.c index bc00ac5e5..335706b70 100644 --- a/dix/main.c +++ b/dix/main.c @@ -87,7 +87,6 @@ Equipment Corporation. #include "os.h" #include "windowstr.h" #include "resource.h" -#include "privates.h" #include "dixstruct.h" #include "gcstruct.h" #include "extension.h" diff --git a/fb/fb.h b/fb/fb.h index af2b4a1f0..5b56d96a2 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -41,7 +41,6 @@ #include "mi.h" #include "migc.h" #include "mibstore.h" -#include "privates.h" #ifdef RENDER #include "picturestr.h" #else From fae39db7957c0ebdc7af36f8d8f484473beb6d38 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 15:21:31 -0500 Subject: [PATCH 208/552] devPrivates rework: put back some changes that were mistakenly removed during merge conflict resolution. --- mfb/mfbbitblt.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/mfb/mfbbitblt.c b/mfb/mfbbitblt.c index 0c23ba750..344c655ee 100644 --- a/mfb/mfbbitblt.c +++ b/mfb/mfbbitblt.c @@ -399,22 +399,20 @@ int dstx, dsty; static DevPrivateKey copyPlaneScreenKey = ©PlaneScreenKey; -typedef RegionPtr (*CopyPlaneFuncPtr)( - DrawablePtr /* pSrcDrawable */, - DrawablePtr /* pDstDrawable */, - GCPtr /* pGC */, - int /* srcx */, - int /* srcy */, - int /* width */, - int /* height */, - int /* dstx */, - int /* dsty */, - unsigned long /* bitPlane */); - Bool mfbRegisterCopyPlaneProc (pScreen, proc) ScreenPtr pScreen; - CopyPlaneFuncPtr proc; + RegionPtr (*proc)( + DrawablePtr /* pSrcDrawable */, + DrawablePtr /* pDstDrawable */, + GCPtr /* pGC */, + int /* srcx */, + int /* srcy */, + int /* width */, + int /* height */, + int /* dstx */, + int /* dsty */, + unsigned long /* bitPlane */); { dixSetPrivate(&pScreen->devPrivates, copyPlaneScreenKey, proc); return TRUE; @@ -461,10 +459,8 @@ unsigned long plane; if (pSrcDrawable->depth != 1) { - if ((copyPlane = (CopyPlaneFuncPtr) - dixLookupPrivate(&pSrcDrawable->pScreen->devPrivates, - copyPlaneScreenKey)) - ) + if ((copyPlane = dixLookupPrivate(&pSrcDrawable->pScreen->devPrivates, + copyPlaneScreenKey))) { return (*copyPlane) (pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, plane); From 26586a7ad5e999b34996d147fb43998deea89178 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:27:37 -0500 Subject: [PATCH 209/552] Revert "registry: Register composite extension protocol names." This reverts commit 166ef972febc00c665e1d5aeb68e75d7bbcf9879. Moving all the names into dix/registry.c --- composite/compext.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/composite/compext.c b/composite/compext.c index 98adabbaa..2918556f8 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -46,7 +46,6 @@ #include "compint.h" #include "xace.h" -#include "registry.h" #define SERVER_COMPOSITE_MAJOR 0 #define SERVER_COMPOSITE_MINOR 4 @@ -755,23 +754,4 @@ CompositeExtensionInit (void) /* Initialization succeeded */ noCompositeExtension = FALSE; - - RegisterRequestName(CompositeReqCode, X_CompositeQueryVersion, - COMPOSITE_NAME ":CompositeQueryVersion"); - RegisterRequestName(CompositeReqCode, X_CompositeRedirectWindow, - COMPOSITE_NAME ":CompositeRedirectWindow"); - RegisterRequestName(CompositeReqCode, X_CompositeRedirectSubwindows, - COMPOSITE_NAME ":CompositeRedirectSubwindows"); - RegisterRequestName(CompositeReqCode, X_CompositeUnredirectWindow, - COMPOSITE_NAME ":CompositeUnredirectWindow"); - RegisterRequestName(CompositeReqCode, X_CompositeUnredirectSubwindows, - COMPOSITE_NAME ":CompositeUnredirectSubwindows"); - RegisterRequestName(CompositeReqCode, X_CompositeCreateRegionFromBorderClip, - COMPOSITE_NAME ":CompositeCreateRegionFromBorderClip"); - RegisterRequestName(CompositeReqCode, X_CompositeNameWindowPixmap, - COMPOSITE_NAME ":CompositeNameWindowPixmap"); - RegisterRequestName(CompositeReqCode, X_CompositeGetOverlayWindow, - COMPOSITE_NAME ":CompositeGetOverlayWindow"); - RegisterRequestName(CompositeReqCode, X_CompositeReleaseOverlayWindow, - COMPOSITE_NAME ":CompositeReleaseOverlayWindow"); } From b9ab6f300a46aa8879b11eac51857357cc379c2f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:31:00 -0500 Subject: [PATCH 210/552] Revert "registry: Register DAMAGE extension protocol names." This reverts commit 20db50b4c44a14f7eeac2b1de17ada68482521da. Moving all the names into dix/registry.c --- damageext/damageext.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/damageext/damageext.c b/damageext/damageext.c index ac2198b0b..517c72dac 100755 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -25,7 +25,6 @@ #endif #include "damageextint.h" -#include "registry.h" static unsigned char DamageReqCode; static int DamageEventBase; @@ -527,23 +526,5 @@ DamageExtensionInit(void) DamageErrorBase = extEntry->errorBase; EventSwapVector[DamageEventBase + XDamageNotify] = (EventSwapPtr) SDamageNotifyEvent; - } else - return; - - RegisterRequestName(DamageReqCode, X_DamageQueryVersion, - DAMAGE_NAME ":QueryVersion"); - RegisterRequestName(DamageReqCode, X_DamageCreate, - DAMAGE_NAME ":Create"); - RegisterRequestName(DamageReqCode, X_DamageDestroy, - DAMAGE_NAME ":Destroy"); - RegisterRequestName(DamageReqCode, X_DamageSubtract, - DAMAGE_NAME ":Subtract"); - RegisterRequestName(DamageReqCode, X_DamageAdd, - DAMAGE_NAME ":Add"); - - RegisterEventName(DamageEventBase + XDamageNotify, - DAMAGE_NAME ":Notify"); - - RegisterErrorName(extEntry->errorBase + BadDamage, - DAMAGE_NAME ":BadDamage"); + } } From c934e1af27189571c1e7dd838872e380c3580eeb Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:32:35 -0500 Subject: [PATCH 211/552] Revert "registry: Register DBE extension protocol names." This reverts commit 2e1e5be1d9067816525aa13a1d818e8ca6899599. Moving all the names into dix/registry.c --- dbe/dbe.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/dbe/dbe.c b/dbe/dbe.c index a872544e7..8175a352f 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -51,7 +51,6 @@ #include "extnsionst.h" #include "gcstruct.h" #include "dixstruct.h" -#include "registry.h" #define NEED_DBE_PROTOCOL #include "dbestruct.h" #include "midbe.h" @@ -1748,25 +1747,5 @@ DbeExtensionInit(void) dbeErrorBase = extEntry->errorBase; - RegisterRequestName(extEntry->base, X_DbeGetVersion, - DBE_PROTOCOL_NAME ":GetVersion"); - RegisterRequestName(extEntry->base, X_DbeAllocateBackBufferName, - DBE_PROTOCOL_NAME ":AllocateBackBufferName"); - RegisterRequestName(extEntry->base, X_DbeDeallocateBackBufferName, - DBE_PROTOCOL_NAME ":DeallocateBackBufferName"); - RegisterRequestName(extEntry->base, X_DbeSwapBuffers, - DBE_PROTOCOL_NAME ":SwapBuffers"); - RegisterRequestName(extEntry->base, X_DbeBeginIdiom, - DBE_PROTOCOL_NAME ":BeginIdiom"); - RegisterRequestName(extEntry->base, X_DbeEndIdiom, - DBE_PROTOCOL_NAME ":EndIdiom"); - RegisterRequestName(extEntry->base, X_DbeGetVisualInfo, - DBE_PROTOCOL_NAME ":GetVisualInfo"); - RegisterRequestName(extEntry->base, X_DbeGetBackBufferAttributes, - DBE_PROTOCOL_NAME ":GetBackBufferAttributes"); - - RegisterErrorName(dbeErrorBase + DbeBadBuffer, - DBE_PROTOCOL_NAME ":BadBuffer"); - } /* DbeExtensionInit() */ From fd2d83d5bf5b35c8a2b05f725486be166783921e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:34:48 -0500 Subject: [PATCH 212/552] Revert "registry: Register APPLEWM extension protocol names." This reverts commit eee46b4681ec55297604b0425705f2b18381f7ca. Moving all the names into dix/registry.c --- hw/darwin/quartz/applewm.c | 41 +------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index fecafe8fb..308c51074 100644 --- a/hw/darwin/quartz/applewm.c +++ b/hw/darwin/quartz/applewm.c @@ -42,7 +42,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "servermd.h" #include "swaprep.h" #include "propertyst.h" -#include "registry.h" #include #include "darwin.h" #define _APPLEWM_SERVER_ @@ -128,45 +127,7 @@ AppleWMExtensionInit( WMEventBase = extEntry->eventBase; EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; appleWMProcs = procsPtr; - } else - return; - - RegisterRequestName(WMReqCode, X_AppleWMQueryVersion, - APPLEWMNAME ":QueryVersion"); - RegisterRequestName(WMReqCode, X_AppleWMFrameGetRect, - APPLEWMNAME ":FrameGetRect"); - RegisterRequestName(WMReqCode, X_AppleWMFrameHitTest, - APPLEWMNAME ":FrameHitTest"); - RegisterRequestName(WMReqCode, X_AppleWMFrameDraw, - APPLEWMNAME ":FrameDraw"); - RegisterRequestName(WMReqCode, X_AppleWMDisableUpdate, - APPLEWMNAME ":DisableUpdate"); - RegisterRequestName(WMReqCode, X_AppleWMReenableUpdate, - APPLEWMNAME ":ReenableUpdate"); - RegisterRequestName(WMReqCode, X_AppleWMSelectInput, - APPLEWMNAME ":SelectInput"); - RegisterRequestName(WMReqCode, X_AppleWMSetWindowMenuCheck, - APPLEWMNAME ":SetWindowMenuCheck"); - RegisterRequestName(WMReqCode, X_AppleWMSetFrontProcess, - APPLEWMNAME ":SetFrontProcess"); - RegisterRequestName(WMReqCode, X_AppleWMSetWindowLevel, - APPLEWMNAME ":SetWindowLevel"); - RegisterRequestName(WMReqCode, X_AppleWMSetCanQuit, - APPLEWMNAME ":SetCanQuit"); - RegisterRequestName(WMReqCode, X_AppleWMSetWindowMenu, - APPLEWMNAME ":SetWindowMenu"); - - RegisterEventName(WMEventBase + AppleWMControllerNotify, - APPLEWMNAME ":ControllerNotify"); - RegisterEventName(WMEventBase + AppleWMActivationNotify, - APPLEWMNAME ":ActivationNotify"); - RegisterEventName(WMEventBase + AppleWMPasteboardNotify, - APPLEWMNAME ":PasteboardNotify"); - - RegisterErrorName(WMErrorBase + AppleWMClientNotLocal, - APPLEWMNAME ":ClientNotLocal"); - RegisterErrorName(WMErrorBase + AppleWMOperationNotSupported, - APPLEWMNAME ":OperationNotSupported"); + } } /*ARGSUSED*/ From 546d46224e355d4f00232da5538548e3c8853e40 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:37:48 -0500 Subject: [PATCH 213/552] Revert "registry: Register XINERAMA extension protocol names." This reverts commit b9f5ab98c8dea36dcce1ad15fd2e059a77e77c39. Moving all the names into dix/registry.c --- Xext/panoramiX.c | 14 -------------- hw/darwin/quartz/pseudoramiX.c | 14 -------------- randr/rrxinerama.c | 26 +++++--------------------- 3 files changed, 5 insertions(+), 49 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 1ba0c4dd2..26c280990 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -53,7 +53,6 @@ Equipment Corporation. #include "globals.h" #include "servermd.h" #include "resource.h" -#include "registry.h" #ifdef RENDER #include "picturestr.h" #endif @@ -590,19 +589,6 @@ void PanoramiXExtensionInit(int argc, char *argv[]) #ifdef RENDER PanoramiXRenderInit (); #endif - - RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, - PANORAMIX_PROTOCOL_NAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_PanoramiXGetState, - PANORAMIX_PROTOCOL_NAME ":GetState"); - RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, - PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); - RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, - PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); - RegisterRequestName(extEntry->base, X_XineramaIsActive, - PANORAMIX_PROTOCOL_NAME ":IsActive"); - RegisterRequestName(extEntry->base, X_XineramaQueryScreens, - PANORAMIX_PROTOCOL_NAME ":QueryScreens"); } extern Bool CreateConnectionBlock(void); diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index cdd4fffff..787601b5d 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -42,7 +42,6 @@ Equipment Corporation. #include "window.h" #include #include "globals.h" -#include "registry.h" extern int noPseudoramiXExtension; extern int noPanoramiXExtension; @@ -148,19 +147,6 @@ void PseudoramiXExtensionInit(int argc, char *argv[]) PANORAMIX_PROTOCOL_NAME); return; } - - RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, - PANORAMIX_PROTOCOL_NAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_PanoramiXGetState, - PANORAMIX_PROTOCOL_NAME ":GetState"); - RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, - PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); - RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, - PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); - RegisterRequestName(extEntry->base, X_XineramaIsActive, - PANORAMIX_PROTOCOL_NAME ":IsActive"); - RegisterRequestName(extEntry->base, X_XineramaQueryScreens, - PANORAMIX_PROTOCOL_NAME ":QueryScreens"); } diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c index c49980256..896f61fb5 100644 --- a/randr/rrxinerama.c +++ b/randr/rrxinerama.c @@ -71,7 +71,6 @@ #include "randrstr.h" #include "swaprep.h" #include -#include "registry.h" #define RR_XINERAMA_MAJOR_VERSION 1 #define RR_XINERAMA_MINOR_VERSION 1 @@ -424,8 +423,6 @@ RRXineramaResetProc(ExtensionEntry* extEntry) void RRXineramaExtensionInit(void) { - ExtensionEntry *extEntry; - #ifdef PANORAMIX if(!noPanoramiXExtension) return; @@ -439,22 +436,9 @@ RRXineramaExtensionInit(void) if (screenInfo.numScreens > 1) return; - extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, - ProcRRXineramaDispatch, - SProcRRXineramaDispatch, - RRXineramaResetProc, - StandardMinorOpcode); - - RegisterRequestName(extEntry->base, X_PanoramiXQueryVersion, - PANORAMIX_PROTOCOL_NAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_PanoramiXGetState, - PANORAMIX_PROTOCOL_NAME ":GetState"); - RegisterRequestName(extEntry->base, X_PanoramiXGetScreenCount, - PANORAMIX_PROTOCOL_NAME ":GetScreenCount"); - RegisterRequestName(extEntry->base, X_PanoramiXGetScreenSize, - PANORAMIX_PROTOCOL_NAME ":GetScreenSize"); - RegisterRequestName(extEntry->base, X_XineramaIsActive, - PANORAMIX_PROTOCOL_NAME ":IsActive"); - RegisterRequestName(extEntry->base, X_XineramaQueryScreens, - PANORAMIX_PROTOCOL_NAME ":QueryScreens"); + (void) AddExtension(PANORAMIX_PROTOCOL_NAME, 0,0, + ProcRRXineramaDispatch, + SProcRRXineramaDispatch, + RRXineramaResetProc, + StandardMinorOpcode); } From 2d3e0cdf4bd7ab069bad7244ede7c2d489e92b17 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:39:56 -0500 Subject: [PATCH 214/552] Revert "registry: Register APPLEDRI extension protocol names." This reverts commit 3464b419230c6d17e940d967b567c5d2cb22d232. Moving all the names into dix/registry.c --- hw/darwin/quartz/xpr/appledri.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c index d9690fdb1..70b740077 100644 --- a/hw/darwin/quartz/xpr/appledri.c +++ b/hw/darwin/quartz/xpr/appledri.c @@ -53,7 +53,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "swaprep.h" #include "dri.h" #include "dristruct.h" -#include "registry.h" static int DRIErrorBase = 0; @@ -93,33 +92,7 @@ AppleDRIExtensionInit(void) DRIErrorBase = extEntry->errorBase; DRIEventBase = extEntry->eventBase; EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent; - } else - return; - - RegisterRequestName(DRIReqCode, X_AppleDRIQueryVersion, - APPLEDRINAME ":QueryVersion"); - RegisterRequestName(DRIReqCode, X_AppleDRIQueryDirectRenderingCapable, - APPLEDRINAME ":QueryDirectRenderingCapable"); - RegisterRequestName(DRIReqCode, X_AppleDRICreateSurface, - APPLEDRINAME ":CreateSurface"); - RegisterRequestName(DRIReqCode, X_AppleDRIDestroySurface, - APPLEDRINAME ":DestroySurface"); - RegisterRequestName(DRIReqCode, X_AppleDRIAuthConnection, - APPLEDRINAME ":AuthConnection"); - - RegisterEventName(DRIEventBase + AppleDRIObsoleteEvent1, - APPLEDRINAME ":ObsoleteEvent1"); - RegisterEventName(DRIEventBase + AppleDRIObsoleteEvent2, - APPLEDRINAME ":ObsoleteEvent2"); - RegisterEventName(DRIEventBase + AppleDRIObsoleteEvent3, - APPLEDRINAME ":ObsoleteEvent3"); - RegisterEventName(DRIEventBase + AppleDRISurfaceNotify, - APPLEDRINAME ":SurfaceNotify"); - - RegisterErrorName(DRIEventBase + AppleDRIClientNotLocal, - APPLEDRINAME ":ClientNotLocal"); - RegisterErrorName(DRIEventBase + AppleDRIOperationNotSupported, - APPLEDRINAME ":OperationNotSupported"); + } } /*ARGSUSED*/ From de93c1e9df14577e158b6dc3ccec7ee48f592386 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:40:57 -0500 Subject: [PATCH 215/552] Revert "registry: Register DMX extension protocol names." This reverts commit 32f3f5a1e7654f8bb43ea16b9227b3994e616739. Moving all the names into dix/registry.c --- hw/dmx/dmx.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c index 840356f02..5f1fc0546 100644 --- a/hw/dmx/dmx.c +++ b/hw/dmx/dmx.c @@ -54,7 +54,6 @@ #define EXTENSION_PROC_ARGS void * #include "extnsionst.h" #include "opaque.h" -#include "registry.h" #include "dmxextension.h" #include @@ -127,45 +126,6 @@ void DMXExtensionInit(void) ProcDMXDispatch, SProcDMXDispatch, DMXResetProc, StandardMinorOpcode))) DMXCode = extEntry->base; - else - return; - - RegisterRequestName(DMXCode, X_DMXQueryVersion, - DMX_EXTENSION_NAME ":DMXQueryVersion"); - RegisterRequestName(DMXCode, X_DMXGetScreenCount, - DMX_EXTENSION_NAME ":DMXGetScreenCount"); - RegisterRequestName(DMXCode, X_DMXGetScreenInformationDEPRECATED, - DMX_EXTENSION_NAME ":DMXGetScreenInfoDEPRECATED"); - RegisterRequestName(DMXCode, X_DMXGetWindowAttributes, - DMX_EXTENSION_NAME ":DMXGetWindowAttributes"); - RegisterRequestName(DMXCode, X_DMXGetInputCount, - DMX_EXTENSION_NAME ":DMXGetInputCount"); - RegisterRequestName(DMXCode, X_DMXGetInputAttributes, - DMX_EXTENSION_NAME ":DMXGetInputAttributes"); - RegisterRequestName(DMXCode, X_DMXForceWindowCreationDEPRECATED, - DMX_EXTENSION_NAME ":DMXForceWindowCreationDEPRECATED"); - RegisterRequestName(DMXCode, X_DMXReconfigureScreenDEPRECATED, - DMX_EXTENSION_NAME ":DMXReconfigureScreenDEPRECATED"); - RegisterRequestName(DMXCode, X_DMXSync, - DMX_EXTENSION_NAME ":DMXSync"); - RegisterRequestName(DMXCode, X_DMXForceWindowCreation, - DMX_EXTENSION_NAME ":DMXForceWindowCreation"); - RegisterRequestName(DMXCode, X_DMXGetScreenAttributes, - DMX_EXTENSION_NAME ":DMXGetScreenAttributes"); - RegisterRequestName(DMXCode, X_DMXChangeScreensAttributes, - DMX_EXTENSION_NAME ":DMXChangeScreensAttributes"); - RegisterRequestName(DMXCode, X_DMXAddScreen, - DMX_EXTENSION_NAME ":DMXAddScreen"); - RegisterRequestName(DMXCode, X_DMXRemoveScreen, - DMX_EXTENSION_NAME ":DMXRemoveScreen"); - RegisterRequestName(DMXCode, X_DMXGetDesktopAttributes, - DMX_EXTENSION_NAME ":DMXGetDesktopAttributes"); - RegisterRequestName(DMXCode, X_DMXChangeDesktopAttributes, - DMX_EXTENSION_NAME ":DMXChangeDesktopAttributes"); - RegisterRequestName(DMXCode, X_DMXAddInput, - DMX_EXTENSION_NAME ":DMXAddInput"); - RegisterRequestName(DMXCode, X_DMXRemoveInput, - DMX_EXTENSION_NAME ":DMXRemoveInput"); } static void dmxSetScreenAttribute(int bit, DMXScreenAttributesPtr attr, From 0356153a58cef87d655bccacd8e2cf03d577bd19 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:43:18 -0500 Subject: [PATCH 216/552] Revert "registry: Register XF86DGA extension protocol names." This reverts commit 3815284e899b61731b6a63c4ba14c5d773e24eb6. Moving all the names into dix/registry.c --- hw/xfree86/dixmods/extmod/xf86dga2.c | 68 +--------------------------- 1 file changed, 1 insertion(+), 67 deletions(-) diff --git a/hw/xfree86/dixmods/extmod/xf86dga2.c b/hw/xfree86/dixmods/extmod/xf86dga2.c index 3b866c798..295e05e9e 100644 --- a/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -22,7 +22,6 @@ #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" -#include "registry.h" #define _XF86DGA_SERVER_ #include #include @@ -100,72 +99,7 @@ XFree86DGAExtensionInit(INITARGS) DGAEventBase = extEntry->eventBase; for (i = KeyPress; i <= MotionNotify; i++) SetCriticalEvent (DGAEventBase + i); - } else - return; - - RegisterRequestName(DGAReqCode, X_XF86DGAQueryVersion, - XF86DGANAME ":QueryVersion"); - RegisterRequestName(DGAReqCode, X_XF86DGAGetVideoLL, - XF86DGANAME ":GetVideoLL"); - RegisterRequestName(DGAReqCode, X_XF86DGADirectVideo, - XF86DGANAME ":DirectVideo"); - RegisterRequestName(DGAReqCode, X_XF86DGAGetViewPortSize, - XF86DGANAME ":GetViewPortSize"); - RegisterRequestName(DGAReqCode, X_XF86DGASetViewPort, - XF86DGANAME ":SetViewPort"); - RegisterRequestName(DGAReqCode, X_XF86DGAGetVidPage, - XF86DGANAME ":GetVidPage"); - RegisterRequestName(DGAReqCode, X_XF86DGASetVidPage, - XF86DGANAME ":SetVidPage"); - RegisterRequestName(DGAReqCode, X_XF86DGAInstallColormap, - XF86DGANAME ":InstallColormap"); - RegisterRequestName(DGAReqCode, X_XF86DGAQueryDirectVideo, - XF86DGANAME ":QueryDirectVideo"); - RegisterRequestName(DGAReqCode, X_XF86DGAViewPortChanged, - XF86DGANAME ":ViewPortChanged"); - RegisterRequestName(DGAReqCode, X_XDGAQueryModes, - XF86DGANAME ":QueryModes"); - RegisterRequestName(DGAReqCode, X_XDGASetMode, - XF86DGANAME ":SetMode"); - RegisterRequestName(DGAReqCode, X_XDGASetViewport, - XF86DGANAME ":SetViewport"); - RegisterRequestName(DGAReqCode, X_XDGAInstallColormap, - XF86DGANAME ":InstallColormap"); - RegisterRequestName(DGAReqCode, X_XDGASelectInput, - XF86DGANAME ":SelectInput"); - RegisterRequestName(DGAReqCode, X_XDGAFillRectangle, - XF86DGANAME ":FillRectangle"); - RegisterRequestName(DGAReqCode, X_XDGACopyArea, - XF86DGANAME ":CopyArea"); - RegisterRequestName(DGAReqCode, X_XDGACopyTransparentArea, - XF86DGANAME ":CopyTransparentArea"); - RegisterRequestName(DGAReqCode, X_XDGAGetViewportStatus, - XF86DGANAME ":GetViewportStatus"); - RegisterRequestName(DGAReqCode, X_XDGASync, - XF86DGANAME ":Sync"); - RegisterRequestName(DGAReqCode, X_XDGAOpenFramebuffer, - XF86DGANAME ":OpenFramebuffer"); - RegisterRequestName(DGAReqCode, X_XDGACloseFramebuffer, - XF86DGANAME ":CloseFramebuffer"); - RegisterRequestName(DGAReqCode, X_XDGASetClientVersion, - XF86DGANAME ":SetClientVersion"); - RegisterRequestName(DGAReqCode, X_XDGAChangePixmapMode, - XF86DGANAME ":ChangePixmapMode"); - RegisterRequestName(DGAReqCode, X_XDGACreateColormap, - XF86DGANAME ":CreateColormap"); - - /* 7 Events: Don't know where they are defined. EFW */ - - RegisterErrorName(extEntry->errorBase + XF86DGAClientNotLocal, - XF86DGANAME ":ClientNotLocal"); - RegisterErrorName(extEntry->errorBase + XF86DGANoDirectVideoMode, - XF86DGANAME ":NoDirectVideoMode"); - RegisterErrorName(extEntry->errorBase + XF86DGAScreenNotActive, - XF86DGANAME ":ScreenNotActive"); - RegisterErrorName(extEntry->errorBase + XF86DGADirectNotActivated, - XF86DGANAME ":DirectNotActivated"); - RegisterErrorName(extEntry->errorBase + XF86DGAOperationNotSupported, - XF86DGANAME ":OperationNotSupported"); + } } From 8e2cd7a804664bbd2d03789dcd5c93223122e929 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:45:30 -0500 Subject: [PATCH 217/552] Revert "registry: Register XF86Misc extension protocol names." This reverts commit 2cd1b32b77e0ceeaccb3f01c4ac13a97c557668c. Moving all the names into dix/registry.c --- hw/xfree86/dixmods/extmod/xf86misc.c | 46 +--------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c index 274b1d3f1..66278a298 100644 --- a/hw/xfree86/dixmods/extmod/xf86misc.c +++ b/hw/xfree86/dixmods/extmod/xf86misc.c @@ -19,7 +19,6 @@ #include "scrnintstr.h" #include "inputstr.h" #include "servermd.h" -#include "registry.h" #define _XF86MISC_SERVER_ #undef _XF86MISC_SAVER_COMPAT_ #include @@ -138,50 +137,7 @@ XFree86MiscExtensionInit(void) XF86MiscReqCode = (unsigned char)extEntry->base; #endif miscErrorBase = extEntry->errorBase; - } else - return; - - RegisterRequestName(extEntry->base, X_XF86MiscQueryVersion, - XF86MISCNAME ":QueryVersion"); -#ifdef _XF86MISC_SAVER_COMPAT_ - RegisterRequestName(extEntry->base, X_XF86MiscGetSaver, - XF86MISCNAME ":GetSaver"); - RegisterRequestName(extEntry->base, X_XF86MiscSetSaver, - XF86MISCNAME ":SetSaver"); -#endif - RegisterRequestName(extEntry->base, X_XF86MiscGetMouseSettings, - XF86MISCNAME ":GetMouseSettings"); - RegisterRequestName(extEntry->base, X_XF86MiscGetKbdSettings, - XF86MISCNAME ":GetKbdSettings"); - RegisterRequestName(extEntry->base, X_XF86MiscSetMouseSettings, - XF86MISCNAME ":SetMouseSettings"); - RegisterRequestName(extEntry->base, X_XF86MiscSetKbdSettings, - XF86MISCNAME ":SetKbdSettings"); - RegisterRequestName(extEntry->base, X_XF86MiscSetGrabKeysState, - XF86MISCNAME ":SetGrabKeysState"); - RegisterRequestName(extEntry->base, X_XF86MiscSetClientVersion, - XF86MISCNAME ":SetClientVersion"); - RegisterRequestName(extEntry->base, X_XF86MiscGetFilePaths, - XF86MISCNAME ":GetFilePaths"); - RegisterRequestName(extEntry->base, X_XF86MiscPassMessage, - XF86MISCNAME ":PassMessage"); - - RegisterErrorName(extEntry->errorBase + XF86MiscBadMouseProtocol, - XF86MISCNAME ":BadMouseProtocol"); - RegisterErrorName(extEntry->errorBase + XF86MiscBadMouseBaudRate, - XF86MISCNAME ":BadMouseBaudRate"); - RegisterErrorName(extEntry->errorBase + XF86MiscBadMouseFlags, - XF86MISCNAME ":BadMouseFlags"); - RegisterErrorName(extEntry->errorBase + XF86MiscBadMouseCombo, - XF86MISCNAME ":BadMouseCombo"); - RegisterErrorName(extEntry->errorBase + XF86MiscBadKbdType, - XF86MISCNAME ":BadKbdType"); - RegisterErrorName(extEntry->errorBase + XF86MiscModInDevDisabled, - XF86MISCNAME ":ModInDevDisabled"); - RegisterErrorName(extEntry->errorBase + XF86MiscModInDevClientNotLocal, - XF86MISCNAME ":ModInDevClientNotLocal"); - RegisterErrorName(extEntry->errorBase + XF86MiscNoModule, - XF86MISCNAME ":NoModule"); + } } /*ARGSUSED*/ From 6b73c215c9d612534af290230b2e914d42d819cd Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:47:30 -0500 Subject: [PATCH 218/552] Revert "registry: Register XF86VidMode extension protocol names." This reverts commit 960677e876c068400fb45e1764bb5470cd8c389f. Moving all the names into dix/registry.c --- hw/xfree86/dixmods/extmod/xf86vmode.c | 67 +-------------------------- 1 file changed, 1 insertion(+), 66 deletions(-) diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c index 17ba44aba..718d40fbd 100644 --- a/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -43,7 +43,6 @@ from Kaleb S. KEITHLEY #include "extnsionst.h" #include "scrnintstr.h" #include "servermd.h" -#include "registry.h" #define _XF86VIDMODE_SERVER_ #include #include "swaprep.h" @@ -210,71 +209,7 @@ XFree86VidModeExtensionInit(void) XF86VidModeEventBase = extEntry->eventBase; EventSwapVector[XF86VidModeEventBase] = (EventSwapPtr)SXF86VidModeNotifyEvent; #endif - } else - return; - - RegisterRequestName(extEntry->base, X_XF86VidModeQueryVersion, - XF86VIDMODENAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetModeLine, - XF86VIDMODENAME ":GetModeLine"); - RegisterRequestName(extEntry->base, X_XF86VidModeModModeLine, - XF86VIDMODENAME ":ModModeLine"); - RegisterRequestName(extEntry->base, X_XF86VidModeSwitchMode, - XF86VIDMODENAME ":SwitchMode"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetMonitor, - XF86VIDMODENAME ":GetMonitor"); - RegisterRequestName(extEntry->base, X_XF86VidModeLockModeSwitch, - XF86VIDMODENAME ":LockModeSwitch"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetAllModeLines, - XF86VIDMODENAME ":GetAllModeLines"); - RegisterRequestName(extEntry->base, X_XF86VidModeAddModeLine, - XF86VIDMODENAME ":AddModeLine"); - RegisterRequestName(extEntry->base, X_XF86VidModeDeleteModeLine, - XF86VIDMODENAME ":DeleteModeLine"); - RegisterRequestName(extEntry->base, X_XF86VidModeValidateModeLine, - XF86VIDMODENAME ":ValidateModeLine"); - RegisterRequestName(extEntry->base, X_XF86VidModeSwitchToMode, - XF86VIDMODENAME ":SwitchToMode"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetViewPort, - XF86VIDMODENAME ":GetViewPort"); - RegisterRequestName(extEntry->base, X_XF86VidModeSetViewPort, - XF86VIDMODENAME ":SetViewPort"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetDotClocks, - XF86VIDMODENAME ":GetDotClocks"); - RegisterRequestName(extEntry->base, X_XF86VidModeSetClientVersion, - XF86VIDMODENAME ":SetClientVersion"); - RegisterRequestName(extEntry->base, X_XF86VidModeSetGamma, - XF86VIDMODENAME ":SetGamma"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetGamma, - XF86VIDMODENAME ":GetGamma"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetGammaRamp, - XF86VIDMODENAME ":GetGammaRamp"); - RegisterRequestName(extEntry->base, X_XF86VidModeSetGammaRamp, - XF86VIDMODENAME ":SetGammaRamp"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetGammaRampSize, - XF86VIDMODENAME ":GetGammaRampSize"); - RegisterRequestName(extEntry->base, X_XF86VidModeGetPermissions, - XF86VIDMODENAME ":GetPermissions"); - -#ifdef XF86VIDMODE_EVENTS - RegisterEventName(extEntry->eventBase + XF86VidModeNotify, - XF86VIDMODENAME ":Notify"); -#endif - - RegisterErrorName(extEntry->errorBase + XF86VidModeBadClock, - XF86VIDMODENAME ":BadClock"); - RegisterErrorName(extEntry->errorBase + XF86VidModeBadHTimings, - XF86VIDMODENAME ":BadHTimings"); - RegisterErrorName(extEntry->errorBase + XF86VidModeBadVTimings, - XF86VIDMODENAME ":BadVTimings"); - RegisterErrorName(extEntry->errorBase + XF86VidModeModeUnsuitable, - XF86VIDMODENAME ":ModeUnsuitable"); - RegisterErrorName(extEntry->errorBase + XF86VidModeExtensionDisabled, - XF86VIDMODENAME ":ExtensionDisabled"); - RegisterErrorName(extEntry->errorBase + XF86VidModeClientNotLocal, - XF86VIDMODENAME ":ClientNotLocal"); - RegisterErrorName(extEntry->errorBase + XF86VidModeZoomLocked, - XF86VIDMODENAME ":ZoomLocked"); + } } /*ARGSUSED*/ From 993595430bd0580ab4d936be6b70fb91b8bb1d16 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:48:46 -0500 Subject: [PATCH 219/552] Revert "registry: Register XF86DRI extension protocol names." This reverts commit b7786724080fd3928ef7b8c294346661d7ffd90b. Moving all the names into dix/registry.c --- hw/xfree86/dri/xf86dri.c | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c index d16910f33..ea11b38ee 100644 --- a/hw/xfree86/dri/xf86dri.c +++ b/hw/xfree86/dri/xf86dri.c @@ -53,7 +53,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" -#include "registry.h" #define _XF86DRI_SERVER_ #include "xf86dristr.h" #include "swaprep.h" @@ -113,42 +112,7 @@ XFree86DRIExtensionInit(void) StandardMinorOpcode))) { DRIReqCode = (unsigned char)extEntry->base; DRIErrorBase = extEntry->errorBase; - } else - return; - - RegisterRequestName(DRIReqCode, X_XF86DRIQueryVersion, - XF86DRINAME ":QueryVersion"); - RegisterRequestName(DRIReqCode, X_XF86DRIQueryDirectRenderingCapable, - XF86DRINAME ":QueryDirectRenderingCapable"); - RegisterRequestName(DRIReqCode, X_XF86DRIOpenConnection, - XF86DRINAME ":OpenConnection"); - RegisterRequestName(DRIReqCode, X_XF86DRICloseConnection, - XF86DRINAME ":CloseConnection"); - RegisterRequestName(DRIReqCode, X_XF86DRIGetClientDriverName, - XF86DRINAME ":GetClientDriverName"); - RegisterRequestName(DRIReqCode, X_XF86DRICreateContext, - XF86DRINAME ":CreateContext"); - RegisterRequestName(DRIReqCode, X_XF86DRIDestroyContext, - XF86DRINAME ":DestroyContext"); - RegisterRequestName(DRIReqCode, X_XF86DRICreateDrawable, - XF86DRINAME ":CreateDrawable"); - RegisterRequestName(DRIReqCode, X_XF86DRIDestroyDrawable, - XF86DRINAME ":DestroyDrawable"); - RegisterRequestName(DRIReqCode, X_XF86DRIGetDrawableInfo, - XF86DRINAME ":GetDrawableInfo"); - RegisterRequestName(DRIReqCode, X_XF86DRIGetDeviceInfo, - XF86DRINAME ":GetDeviceInfo"); - RegisterRequestName(DRIReqCode, X_XF86DRIAuthConnection, - XF86DRINAME ":AuthConnection"); - RegisterRequestName(DRIReqCode, X_XF86DRIOpenFullScreen, - XF86DRINAME ":OpenFullScreen"); - RegisterRequestName(DRIReqCode, X_XF86DRICloseFullScreen, - XF86DRINAME ":CloseFullScreen"); - - RegisterErrorName(DRIErrorBase + XF86DRIClientNotLocal, - XF86DRINAME ":ClientNotLocal"); - RegisterErrorName(DRIErrorBase + XF86DRIOperationNotSupported, - XF86DRINAME ":OperationNotSupported"); + } } /*ARGSUSED*/ From a541e826c9310d3051e53834833c6c3a08654148 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:50:26 -0500 Subject: [PATCH 220/552] Revert "registry: Register WINDOWSWM extension protocol names." This reverts commit 4c3285c883cc50a91bc5262bbc9d073d816f860a. Moving all the names into dix/registry.c --- hw/xwin/winwindowswm.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index 1356465d9..e1994de84 100755 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -41,7 +41,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "scrnintstr.h" #include "servermd.h" #include "swaprep.h" -#include "registry.h" #define _WINDOWSWM_SERVER_ #include "windowswmstr.h" @@ -106,35 +105,7 @@ winWindowsWMExtensionInit () WMErrorBase = extEntry->errorBase; WMEventBase = extEntry->eventBase; EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; - } else - return; - - RegisterRequestName(WMReqCode, X_WindowsWMQueryVersion, - WINDOWSWMNAME ":QueryVersion"); - RegisterRequestName(WMReqCode, X_WindowsWMFrameGetRect, - WINDOWSWMNAME ":FrameGetRect"); - RegisterRequestName(WMReqCode, X_WindowsWMFrameDraw, - WINDOWSWMNAME ":FrameDraw"); - RegisterRequestName(WMReqCode, X_WindowsWMFrameSetTitle, - WINDOWSWMNAME ":FrameSetTitle"); - RegisterRequestName(WMReqCode, X_WindowsWMDisableUpdate, - WINDOWSWMNAME ":DisableUpdate"); - RegisterRequestName(WMReqCode, X_WindowsWMReenableUpdate, - WINDOWSWMNAME ":ReenableUpdate"); - RegisterRequestName(WMReqCode, X_WindowsWMSelectInput, - WINDOWSWMNAME ":SelectInput"); - RegisterRequestName(WMReqCode, X_WindowsWMSetFrontProcess, - WINDOWSWMNAME ":SetFrontProcess"); - - RegisterEventName(WMEventBase + WindowsWMControllerNotify, - WINDOWSWMNAME ":ControllerNotify"); - RegisterEventName(WMEventBase + WindowsWMActivationNotify, - WINDOWSWMNAME ":ActivationNotify"); - - RegisterErrorName(WMErrorBase + WindowsWMClientNotLocal, - WINDOWSWMNAME ":ClientNotLocal"); - RegisterErrorName(WMErrorBase + WindowsWMOperationNotSupported, - WINDOWSWMNAME ":OperationNotSupported"); + } } /*ARGSUSED*/ From d4577e485367468227e031eb434b739eff7b5e9a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:51:27 -0500 Subject: [PATCH 221/552] Revert "registry: Register RANDR extension protocol names." This reverts commit c827db57e4d9ca14c82b099dcfc9b7a0c0b5ba0a. Moving all the names into dix/registry.c --- randr/randr.c | 68 --------------------------------------------------- 1 file changed, 68 deletions(-) diff --git a/randr/randr.c b/randr/randr.c index d5b9819f1..bc2b995d2 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -32,7 +32,6 @@ #endif #include "randrstr.h" -#include "registry.h" /* From render.h */ #ifndef SubPixelUnknown @@ -352,73 +351,6 @@ RRExtensionInit (void) #ifdef PANORAMIX RRXineramaExtensionInit(); #endif - - RegisterRequestName(extEntry->base, X_RRQueryVersion, - RANDR_NAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_RROldGetScreenInfo, - RANDR_NAME ":OldGetScreenInfo"); - RegisterRequestName(extEntry->base, X_RR1_0SetScreenConfig, - RANDR_NAME ":1_0SetScreenConfig"); - RegisterRequestName(extEntry->base, X_RRSetScreenConfig, - RANDR_NAME ":SetScreenConfig"); - RegisterRequestName(extEntry->base, X_RROldScreenChangeSelectInput, - RANDR_NAME ":OldScreenChangeSelectInput"); - RegisterRequestName(extEntry->base, X_RRSelectInput, - RANDR_NAME ":SelectInput"); - RegisterRequestName(extEntry->base, X_RRGetScreenInfo, - RANDR_NAME ":GetScreenInfo"); - /* V1.2 additions */ - RegisterRequestName(extEntry->base, X_RRGetScreenSizeRange, - RANDR_NAME ":GetScreenSizeRange"); - RegisterRequestName(extEntry->base, X_RRSetScreenSize, - RANDR_NAME ":SetScreenSize"); - RegisterRequestName(extEntry->base, X_RRGetScreenResources, - RANDR_NAME ":GetScreenResources"); - RegisterRequestName(extEntry->base, X_RRGetOutputInfo, - RANDR_NAME ":GetOutputInfo"); - RegisterRequestName(extEntry->base, X_RRListOutputProperties, - RANDR_NAME ":ListOutputProperties"); - RegisterRequestName(extEntry->base, X_RRQueryOutputProperty, - RANDR_NAME ":QueryOutputProperty"); - RegisterRequestName(extEntry->base, X_RRConfigureOutputProperty, - RANDR_NAME ":ConfigureOutputProperty"); - RegisterRequestName(extEntry->base, X_RRChangeOutputProperty, - RANDR_NAME ":ChangeOutputProperty"); - RegisterRequestName(extEntry->base, X_RRDeleteOutputProperty, - RANDR_NAME ":DeleteOutputProperty"); - RegisterRequestName(extEntry->base, X_RRGetOutputProperty, - RANDR_NAME ":GetOutputProperty"); - RegisterRequestName(extEntry->base, X_RRCreateMode, - RANDR_NAME ":CreateMode"); - RegisterRequestName(extEntry->base, X_RRDestroyMode, - RANDR_NAME ":DestroyMode"); - RegisterRequestName(extEntry->base, X_RRAddOutputMode, - RANDR_NAME ":AddOutputMode"); - RegisterRequestName(extEntry->base, X_RRDeleteOutputMode, - RANDR_NAME ":DeleteOutputMode"); - RegisterRequestName(extEntry->base, X_RRGetCrtcInfo, - RANDR_NAME ":GetCrtcInfo"); - RegisterRequestName(extEntry->base, X_RRSetCrtcConfig, - RANDR_NAME ":SetCrtcConfig"); - RegisterRequestName(extEntry->base, X_RRGetCrtcGammaSize, - RANDR_NAME ":GetCrtcGammaSize"); - RegisterRequestName(extEntry->base, X_RRGetCrtcGamma, - RANDR_NAME ":GetCrtcGamma"); - RegisterRequestName(extEntry->base, X_RRSetCrtcGamma, - RANDR_NAME ":SetCrtcGamma"); - - RegisterEventName(RREventBase + RRScreenChangeNotify, - RANDR_NAME ":ScreenChangeNotify"); - /* V1.2 additions */ - RegisterEventName(RREventBase + RRNotify, - RANDR_NAME ":Notify"); - - RegisterErrorName(RRErrorBase + BadRROutput, - RANDR_NAME ":BadRROutput"); - RegisterErrorName(RRErrorBase + BadRRCrtc, - RANDR_NAME ":BadRRCrtc"); - RegisterErrorName(RRErrorBase + BadRRMode, - RANDR_NAME ":BadRRMode"); } static int From e585a2ddb495b50a53e15cccc368ca0858fc9d23 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:55:47 -0500 Subject: [PATCH 222/552] Revert "registry: Register Record extension protocol names." This reverts commit ea09c9acc8f0d5577f54c864ff88b7f03d93b2f4. Moving all the names into dix/registry.c --- record/record.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/record/record.c b/record/record.c index 2ca37822b..debe3c472 100644 --- a/record/record.c +++ b/record/record.c @@ -43,7 +43,6 @@ and Jim Haggerty of Metheus. #include #include "set.h" #include "swaprep.h" -#include "registry.h" #include #include @@ -2966,24 +2965,5 @@ RecordExtensionInit(void) } RecordErrorBase = extentry->errorBase; - RegisterRequestName(extentry->base, X_RecordQueryVersion, - RECORD_NAME ":QueryVersion"); - RegisterRequestName(extentry->base, X_RecordCreateContext, - RECORD_NAME ":CreateContext"); - RegisterRequestName(extentry->base, X_RecordRegisterClients, - RECORD_NAME ":RegisterClients"); - RegisterRequestName(extentry->base, X_RecordUnregisterClients, - RECORD_NAME ":UnregisterClients"); - RegisterRequestName(extentry->base, X_RecordGetContext, - RECORD_NAME ":GetContext"); - RegisterRequestName(extentry->base, X_RecordEnableContext, - RECORD_NAME ":EnableContext"); - RegisterRequestName(extentry->base, X_RecordDisableContext, - RECORD_NAME ":DisableContext"); - RegisterRequestName(extentry->base, X_RecordFreeContext, - RECORD_NAME ":FreeContext"); - - RegisterErrorName(RecordErrorBase + XRecordBadContext, - RECORD_NAME ":BadContext"); } /* RecordExtensionInit */ From 5aff37d1d69be493727856a29628bd782d50b90f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:57:06 -0500 Subject: [PATCH 223/552] Revert "registry: Register RENDER extension protocol names." This reverts commit 8964c6d8e14ae47798762191e359b2bf138ca32e. Moving all the names into dix/registry.c --- render/render.c | 90 ------------------------------------------------- 1 file changed, 90 deletions(-) diff --git a/render/render.c b/render/render.c index 5fc91a948..db9168ba2 100644 --- a/render/render.c +++ b/render/render.c @@ -40,7 +40,6 @@ #include "colormapst.h" #include "extnsionst.h" #include "servermd.h" -#include "registry.h" #include #include #include "picturestr.h" @@ -263,95 +262,6 @@ RenderExtensionInit (void) RenderReqCode = (CARD8) extEntry->base; #endif RenderErrBase = extEntry->errorBase; - - RegisterRequestName(extEntry->base, X_RenderQueryVersion, - RENDER_NAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_RenderQueryPictFormats, - RENDER_NAME ":QueryPictFormats"); - RegisterRequestName(extEntry->base, X_RenderQueryPictIndexValues, - RENDER_NAME ":QueryPictIndexValues"); - RegisterRequestName(extEntry->base, X_RenderQueryDithers, - RENDER_NAME ":QueryDithers"); - RegisterRequestName(extEntry->base, X_RenderCreatePicture, - RENDER_NAME ":CreatePicture"); - RegisterRequestName(extEntry->base, X_RenderChangePicture, - RENDER_NAME ":ChangePicture"); - RegisterRequestName(extEntry->base, X_RenderSetPictureClipRectangles, - RENDER_NAME ":SetPictureClipRectangles"); - RegisterRequestName(extEntry->base, X_RenderFreePicture, - RENDER_NAME ":FreePicture"); - RegisterRequestName(extEntry->base, X_RenderComposite, - RENDER_NAME ":Composite"); - RegisterRequestName(extEntry->base, X_RenderScale, - RENDER_NAME ":Scale"); - RegisterRequestName(extEntry->base, X_RenderTrapezoids, - RENDER_NAME ":Trapezoids"); - RegisterRequestName(extEntry->base, X_RenderTriangles, - RENDER_NAME ":Triangles"); - RegisterRequestName(extEntry->base, X_RenderTriStrip, - RENDER_NAME ":TriStrip"); - RegisterRequestName(extEntry->base, X_RenderTriFan, - RENDER_NAME ":TriFan"); - RegisterRequestName(extEntry->base, X_RenderColorTrapezoids, - RENDER_NAME ":ColorTrapezoids"); - RegisterRequestName(extEntry->base, X_RenderColorTriangles, - RENDER_NAME ":ColorTriangles"); - RegisterRequestName(extEntry->base, X_RenderCreateGlyphSet, - RENDER_NAME ":CreateGlyphSet"); - RegisterRequestName(extEntry->base, X_RenderReferenceGlyphSet, - RENDER_NAME ":ReferenceGlyphSet"); - RegisterRequestName(extEntry->base, X_RenderFreeGlyphSet, - RENDER_NAME ":FreeGlyphSet"); - RegisterRequestName(extEntry->base, X_RenderAddGlyphs, - RENDER_NAME ":AddGlyphs"); - RegisterRequestName(extEntry->base, X_RenderAddGlyphsFromPicture, - RENDER_NAME ":AddGlyphsFromPicture"); - RegisterRequestName(extEntry->base, X_RenderFreeGlyphs, - RENDER_NAME ":FreeGlyphs"); - RegisterRequestName(extEntry->base, X_RenderCompositeGlyphs8, - RENDER_NAME ":CompositeGlyphs8"); - RegisterRequestName(extEntry->base, X_RenderCompositeGlyphs16, - RENDER_NAME ":CompositeGlyphs16"); - RegisterRequestName(extEntry->base, X_RenderCompositeGlyphs32, - RENDER_NAME ":CompositeGlyphs32"); - RegisterRequestName(extEntry->base, X_RenderFillRectangles, - RENDER_NAME ":FillRectangles"); - /* 0.5 */ - RegisterRequestName(extEntry->base, X_RenderCreateCursor, - RENDER_NAME ":CreateCursor"); - /* 0.6 */ - RegisterRequestName(extEntry->base, X_RenderSetPictureTransform, - RENDER_NAME ":SetPictureTransform"); - RegisterRequestName(extEntry->base, X_RenderQueryFilters, - RENDER_NAME ":QueryFilters"); - RegisterRequestName(extEntry->base, X_RenderSetPictureFilter, - RENDER_NAME ":SetPictureFilter"); - /* 0.8 */ - RegisterRequestName(extEntry->base, X_RenderCreateAnimCursor, - RENDER_NAME ":CreateAnimCursor"); - /* 0.9 */ - RegisterRequestName(extEntry->base, X_RenderAddTraps, - RENDER_NAME ":AddTraps"); - /* 0.10 */ - RegisterRequestName(extEntry->base, X_RenderCreateSolidFill, - RENDER_NAME ":CreateSolidFill"); - RegisterRequestName(extEntry->base, X_RenderCreateLinearGradient, - RENDER_NAME ":CreateLinearGradient"); - RegisterRequestName(extEntry->base, X_RenderCreateRadialGradient, - RENDER_NAME ":CreateRadialGradient"); - RegisterRequestName(extEntry->base, X_RenderCreateConicalGradient, - RENDER_NAME ":CreateConicalGradient"); - - RegisterErrorName(RenderErrBase + BadPictFormat, - RENDER_NAME ":BadPictFormat"); - RegisterErrorName(RenderErrBase + BadPicture, - RENDER_NAME ":BadPicture"); - RegisterErrorName(RenderErrBase + BadPictOp, - RENDER_NAME ":BadPictOp"); - RegisterErrorName(RenderErrBase + BadGlyphSet, - RENDER_NAME ":BadGlyphSet"); - RegisterErrorName(RenderErrBase + BadGlyph, - RENDER_NAME ":BadGlyph"); } static void From 0756d1271209e6ae14cc641dddca095271b43150 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 17:59:40 -0500 Subject: [PATCH 224/552] Revert "registry: Register APPGROUP extension protocol names." This reverts commit b504678ba5407a6fd8d47d051305f7c3d5606dfe. Moving all the names into dix/registry.c --- Xext/appgroup.c | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/Xext/appgroup.c b/Xext/appgroup.c index 4fb402066..c40782df5 100644 --- a/Xext/appgroup.c +++ b/Xext/appgroup.c @@ -39,7 +39,6 @@ from The Open Group. #include "windowstr.h" #include "colormapst.h" #include "servermd.h" -#include "registry.h" #define _XAG_SERVER_ #include #include "xacestr.h" @@ -763,35 +762,14 @@ static void XagCallClientStateChange( void XagExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - - if ((extEntry = AddExtension (XAGNAME, - 0, - XagNumberErrors, - ProcXagDispatch, - SProcXagDispatch, - XagResetProc, - StandardMinorOpcode))) { + if (AddExtension (XAGNAME, + 0, + XagNumberErrors, + ProcXagDispatch, + SProcXagDispatch, + XagResetProc, + StandardMinorOpcode)) { RT_APPGROUP = CreateNewResourceType (XagAppGroupFree); XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL); - } else - return; - - RegisterRequestName(extEntry->base, X_XagQueryVersion, - XAGNAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_XagCreate, - XAGNAME ":Create"); - RegisterRequestName(extEntry->base, X_XagDestroy, - XAGNAME ":Destroy"); - RegisterRequestName(extEntry->base, X_XagGetAttr, - XAGNAME ":GetAttr"); - RegisterRequestName(extEntry->base, X_XagQuery, - XAGNAME ":Query"); - RegisterRequestName(extEntry->base, X_XagCreateAssoc, - XAGNAME ":CreateAssoc"); - RegisterRequestName(extEntry->base, X_XagDestroyAssoc, - XAGNAME ":DestroyAssoc"); - - RegisterErrorName(extEntry->errorBase + XagBadAppGroup, - XAGNAME ":BadAppGroup"); + } } From ce93c5772da52ab88faef7e5b661b681d5b60b1e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:03:57 -0500 Subject: [PATCH 225/552] registry: Remove registry code from BigRequests extension. Moving all the names into dix/registry.c --- Xext/bigreq.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Xext/bigreq.c b/Xext/bigreq.c index 6303f388e..fd8bcb89b 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -37,7 +37,6 @@ from The Open Group. #include "os.h" #include "dixstruct.h" #include "extnsionst.h" -#include "registry.h" #include #include "opaque.h" #include "modinit.h" @@ -51,15 +50,9 @@ static DISPATCH_PROC(ProcBigReqDispatch); void BigReqExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - - if (!(extEntry = AddExtension(XBigReqExtensionName, 0, 0, - ProcBigReqDispatch, ProcBigReqDispatch, - BigReqResetProc, StandardMinorOpcode))) - return; - - RegisterRequestName(extEntry->base, X_BigReqEnable, - XBigReqExtensionName ":Enable"); + AddExtension(XBigReqExtensionName, 0, 0, + ProcBigReqDispatch, ProcBigReqDispatch, + BigReqResetProc, StandardMinorOpcode))) } /*ARGSUSED*/ From 76e89d45b497d4afa4e60e1d0ec50b62f54f6b88 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:06:40 -0500 Subject: [PATCH 226/552] registry: Remove registry code from TOG-CUP extension. Moving all the names into dix/registry.c --- Xext/cup.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Xext/cup.c b/Xext/cup.c index 4adfc6116..44c96643d 100644 --- a/Xext/cup.c +++ b/Xext/cup.c @@ -39,7 +39,6 @@ in this Software without prior written authorization from The Open Group. #include "scrnintstr.h" #include "servermd.h" #include "swapreq.h" -#include "registry.h" #define _XCUP_SERVER_ #include #include @@ -136,13 +135,6 @@ XcupExtensionInit (INITARGS) return; /* PC servers initialize the desktop colors (citems) here! */ - - RegisterRequestName(extEntry->base, X_XcupQueryVersion, - XCUPNAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_XcupGetReservedColormapEntries, - XCUPNAME ":GetReservedColormapEntries"); - RegisterRequestName(extEntry->base, X_XcupStoreColors, - XCUPNAME ":StoreColors"); } /*ARGSUSED*/ From 460c43032f05aad3f0f552901a52d199f61c7f4f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:08:18 -0500 Subject: [PATCH 227/552] registry: Remove registry code from DPMS extension. Moving all the names into dix/registry.c --- Xext/dpms.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/Xext/dpms.c b/Xext/dpms.c index 613493aae..d518a16cc 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -44,7 +44,6 @@ Equipment Corporation. #include "dixstruct.h" #include "extnsionst.h" #include "opaque.h" -#include "registry.h" #define DPMS_SERVER #include #include @@ -74,29 +73,9 @@ static void DPMSResetProc(ExtensionEntry* extEntry); void DPMSExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - - if (!(extEntry = AddExtension(DPMSExtensionName, 0, 0, - ProcDPMSDispatch, SProcDPMSDispatch, - DPMSResetProc, StandardMinorOpcode))) - return; - - RegisterRequestName(extEntry->base, X_DPMSGetVersion, - DPMSExtensionName ":GetVersion"); - RegisterRequestName(extEntry->base, X_DPMSCapable, - DPMSExtensionName ":Capable"); - RegisterRequestName(extEntry->base, X_DPMSGetTimeouts, - DPMSExtensionName ":GetTimeouts"); - RegisterRequestName(extEntry->base, X_DPMSSetTimeouts, - DPMSExtensionName ":SetTimeouts"); - RegisterRequestName(extEntry->base, X_DPMSEnable, - DPMSExtensionName ":Enable"); - RegisterRequestName(extEntry->base, X_DPMSDisable, - DPMSExtensionName ":Disable"); - RegisterRequestName(extEntry->base, X_DPMSForceLevel, - DPMSExtensionName ":ForceLevel"); - RegisterRequestName(extEntry->base, X_DPMSInfo, - DPMSExtensionName ":Info"); + AddExtension(DPMSExtensionName, 0, 0, + ProcDPMSDispatch, SProcDPMSDispatch, + DPMSResetProc, StandardMinorOpcode))) } /*ARGSUSED*/ From 46412baf60ed639ddc1d5fb601f73a75e39737f7 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:11:06 -0500 Subject: [PATCH 228/552] registry: Remove registry code from EVI extension. Moving all the names into dix/registry.c --- Xext/EVI.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Xext/EVI.c b/Xext/EVI.c index b6752c083..6abd50824 100644 --- a/Xext/EVI.c +++ b/Xext/EVI.c @@ -30,7 +30,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "dixstruct.h" #include "extnsionst.h" #include "dix.h" -#include "registry.h" #define _XEVI_SERVER_ #include #include "EVIstruct.h" @@ -189,9 +188,4 @@ EVIExtensionInit(INITARGS) return; eviPriv = eviDDXInit(); - - RegisterRequestName(extEntry->base, X_EVIQueryVersion, - EVINAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_EVIGetVisualInfo, - EVINAME ":GetVisualInfo"); } From 40a0da044e911ea51de003f3621331ffbe2842bc Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:13:43 -0500 Subject: [PATCH 229/552] registry: Remove registry code from Fontcache extension. Moving all the names into dix/registry.c --- Xext/fontcache.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/Xext/fontcache.c b/Xext/fontcache.c index 9fae2d70b..06b0c854b 100644 --- a/Xext/fontcache.c +++ b/Xext/fontcache.c @@ -42,7 +42,6 @@ #include "scrnintstr.h" #include "inputstr.h" #include "servermd.h" -#include "registry.h" #define _FONTCACHE_SERVER_ #include #include @@ -71,31 +70,9 @@ static DISPATCH_PROC(SProcFontCacheChangeCacheSettings); void FontCacheExtensionInit(INITARGS) { - ExtensionEntry* extEntry; - - if (! - (extEntry = AddExtension(FONTCACHENAME, - FontCacheNumberEvents, - FontCacheNumberErrors, - ProcFontCacheDispatch, - SProcFontCacheDispatch, - FontCacheResetProc, - StandardMinorOpcode))) - return; - - RegisterRequestName(extEntry->base, X_FontCacheQueryVersion, - FONTCACHENAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_FontCacheGetCacheSettings, - FONTCACHENAME ":GetCacheSettings"); - RegisterRequestName(extEntry->base, X_FontCacheChangeCacheSettings, - FONTCACHENAME ":ChangeCacheSettings"); - RegisterRequestName(extEntry->base, X_FontCacheGetCacheStatistics, - FONTCACHENAME ":GetCacheStatistics"); - - RegisterErrorName(extEntry->errorBase + FontCacheBadProtocol, - FONTCACHENAME ":BadProtocol"); - RegisterErrorName(extEntry->errorBase + FontCacheCannotAllocMemory, - FONTCACHENAME ":CannotAllocMemory"); + AddExtension(FONTCACHENAME, FontCacheNumberEvents, FontCacheNumberErrors, + ProcFontCacheDispatch, SProcFontCacheDispatch, + FontCacheResetProc, StandardMinorOpcode))) } /*ARGSUSED*/ From 816e6e612e4bc3cea1e67e7ea79d5b640458011f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:15:37 -0500 Subject: [PATCH 230/552] Revert "registry: Register Multibuffer extension protocol names." This reverts commit 3877faf7d9fe00ed634077e38a198ae4b91a2bb4. Moving all the names into dix/registry.c --- Xext/mbuf.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/Xext/mbuf.c b/Xext/mbuf.c index ba99f3fbc..9f17c86e3 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -43,7 +43,6 @@ in this Software without prior written authorization from The Open Group. #include "resource.h" #include "opaque.h" #include "sleepuntil.h" -#include "registry.h" #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #include @@ -255,39 +254,7 @@ MultibufferExtensionInit() MultibufferErrorBase = extEntry->errorBase; EventSwapVector[MultibufferEventBase + MultibufferClobberNotify] = (EventSwapPtr) SClobberNotifyEvent; EventSwapVector[MultibufferEventBase + MultibufferUpdateNotify] = (EventSwapPtr) SUpdateNotifyEvent; - } else - return; - - RegisterRequestName(extEntry->base, X_MbufGetBufferVersion, - MULTIBUFFER_PROTOCOL_NAME ":GetBufferVersion"); - RegisterRequestName(extEntry->base, X_MbufCreateImageBuffers, - MULTIBUFFER_PROTOCOL_NAME ":CreateImageBuffers"); - RegisterRequestName(extEntry->base, X_MbufDestroyImageBuffers, - MULTIBUFFER_PROTOCOL_NAME ":DestroyImageBuffers"); - RegisterRequestName(extEntry->base, X_MbufDisplayImageBuffers, - MULTIBUFFER_PROTOCOL_NAME ":DisplayImageBuffers"); - RegisterRequestName(extEntry->base, X_MbufSetMBufferAttributes, - MULTIBUFFER_PROTOCOL_NAME ":SetMBufferAttributes"); - RegisterRequestName(extEntry->base, X_MbufGetMBufferAttributes, - MULTIBUFFER_PROTOCOL_NAME ":GetMBufferAttributes"); - RegisterRequestName(extEntry->base, X_MbufSetBufferAttributes, - MULTIBUFFER_PROTOCOL_NAME ":SetBufferAttributes"); - RegisterRequestName(extEntry->base, X_MbufGetBufferAttributes, - MULTIBUFFER_PROTOCOL_NAME ":GetBufferAttributes"); - RegisterRequestName(extEntry->base, X_MbufGetBufferInfo, - MULTIBUFFER_PROTOCOL_NAME ":GetBufferInfo"); - RegisterRequestName(extEntry->base, X_MbufCreateStereoWindow, - MULTIBUFFER_PROTOCOL_NAME ":CreateStereoWindow"); - RegisterRequestName(extEntry->base, X_MbufClearImageBufferArea, - MULTIBUFFER_PROTOCOL_NAME ":ClearImageBufferArea"); - - RegisterEventName(MultibufferEventBase + MultibufferClobberNotify, - MULTIBUFFER_PROTOCOL_NAME ":ClobberNotify"); - RegisterEventName(MultibufferEventBase + MultibufferUpdateNotify, - MULTIBUFFER_PROTOCOL_NAME ":UpdateNotify"); - - RegisterErrorName(MultibufferErrorBase + BadBuffer, - MULTIBUFFER_PROTOCOL_NAME ":BadBuffer"); + } } /*ARGSUSED*/ From 36ef45928c783292cef18acfdd83ae057826c989 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:18:01 -0500 Subject: [PATCH 231/552] registry: Remove registry code from MIT-MISC extension. Moving all the names to dix/registry.c --- Xext/mitmisc.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c index 0b231529b..a5f3b0f6d 100644 --- a/Xext/mitmisc.c +++ b/Xext/mitmisc.c @@ -38,7 +38,6 @@ in this Software without prior written authorization from The Open Group. #include "os.h" #include "dixstruct.h" #include "extnsionst.h" -#include "registry.h" #define _MITMISC_SERVER_ #include #include "modinit.h" @@ -57,17 +56,9 @@ static DISPATCH_PROC(SProcMITSetBugMode); void MITMiscExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - - if (!(extEntry = AddExtension(MITMISCNAME, 0, 0, - ProcMITDispatch, SProcMITDispatch, - MITResetProc, StandardMinorOpcode))) - return; - - RegisterRequestName(extEntry->base, X_MITSetBugMode, - MITMISCNAME ":SetBugMode"); - RegisterRequestName(extEntry->base, X_MITGetBugMode, - MITMISCNAME ":GetBugMode"); + AddExtension(MITMISCNAME, 0, 0, + ProcMITDispatch, SProcMITDispatch, + MITResetProc, StandardMinorOpcode))) } /*ARGSUSED*/ From 55744d8e5d7bf1ff27cd25de54e14e799dd1a70a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:19:44 -0500 Subject: [PATCH 232/552] Revert "registry: Register MIT-SCREEN-SAVER extension protocol names." This reverts commit 58c3240fcbec23aad122e1c340f6bb6d3b18f779. Moving all the names into dix/registry.c --- Xext/saver.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/Xext/saver.c b/Xext/saver.c index 43dd3e2de..20dbc924d 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -49,7 +49,6 @@ in this Software without prior written authorization from the X Consortium. #include "cursorstr.h" #include "colormapst.h" #include "xace.h" -#include "registry.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" @@ -63,6 +62,9 @@ in this Software without prior written authorization from the X Consortium. #include "modinit.h" +#if 0 +static unsigned char ScreenSaverReqCode = 0; +#endif static int ScreenSaverEventBase = 0; static DISPATCH_PROC(ProcScreenSaverQueryInfo); @@ -272,26 +274,12 @@ ScreenSaverExtensionInit(INITARGS) ProcScreenSaverDispatch, SProcScreenSaverDispatch, ScreenSaverResetProc, StandardMinorOpcode))) { +#if 0 + ScreenSaverReqCode = (unsigned char)extEntry->base; +#endif ScreenSaverEventBase = extEntry->eventBase; EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent; - } else - return; - - RegisterRequestName(extEntry->base, X_ScreenSaverQueryVersion, - ScreenSaverName ":QueryVersion"); - RegisterRequestName(extEntry->base, X_ScreenSaverQueryInfo, - ScreenSaverName ":QueryInfo"); - RegisterRequestName(extEntry->base, X_ScreenSaverSelectInput, - ScreenSaverName ":SelectInput"); - RegisterRequestName(extEntry->base, X_ScreenSaverSetAttributes, - ScreenSaverName ":SetAttributes"); - RegisterRequestName(extEntry->base, X_ScreenSaverUnsetAttributes, - ScreenSaverName ":UnsetAttributes"); - RegisterRequestName(extEntry->base, X_ScreenSaverSuspend, - ScreenSaverName ":Suspend"); - - RegisterEventName(ScreenSaverEventBase + ScreenSaverNotify, - ScreenSaverName ":Notify"); + } } /*ARGSUSED*/ From 8583bf78ad056ffe2d83b54e5c9a0a217e425a7b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:21:09 -0500 Subject: [PATCH 233/552] registry: Remove registry code from XC-SECURITY extension. Moving all the names to dix/registry.c --- Xext/security.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index eef4f693c..6aab3a342 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1114,20 +1114,4 @@ SecurityExtensionInit(INITARGS) /* Label objects that were created before we could register ourself */ SecurityLabelInitial(); - - /* Register protocol names */ - RegisterRequestName(extEntry->base, X_SecurityQueryVersion, - SECURITY_EXTENSION_NAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_SecurityGenerateAuthorization, - SECURITY_EXTENSION_NAME ":GenerateAuthorization"); - RegisterRequestName(extEntry->base, X_SecurityRevokeAuthorization, - SECURITY_EXTENSION_NAME ":RevokeAuthorization"); - - RegisterEventName(SecurityEventBase + XSecurityAuthorizationRevoked, - SECURITY_EXTENSION_NAME ":AuthorizationRevoked"); - - RegisterErrorName(SecurityErrorBase + XSecurityBadAuthorization, - SECURITY_EXTENSION_NAME ":BadAuthorization"); - RegisterErrorName(SecurityErrorBase + XSecurityBadAuthorizationProtocol, - SECURITY_EXTENSION_NAME ":BadAuthorizationProtocol"); } From 67e82e306f67a215c6c89868cc1d3649747bd93d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:22:59 -0500 Subject: [PATCH 234/552] Revert "registry: Register SHAPE extension protocol names." This reverts commit 4e274e90e16b1d954391e1af3e2074fb10f70ee7. Moving all the names to dix/registry.c --- Xext/shape.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/Xext/shape.c b/Xext/shape.c index 567737c13..e84eb34da 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -43,7 +43,6 @@ in this Software without prior written authorization from The Open Group. #include "dixstruct.h" #include "resource.h" #include "opaque.h" -#include "registry.h" #define _SHAPE_SERVER_ /* don't want Xlib structures */ #include #include "regionstr.h" @@ -112,6 +111,9 @@ static DISPATCH_PROC(SProcShapeSelectInput); #include "panoramiXsrv.h" #endif +#if 0 +static unsigned char ShapeReqCode = 0; +#endif static int ShapeEventBase = 0; static RESTYPE ClientType, EventType; /* resource types for event masks */ @@ -152,32 +154,12 @@ ShapeExtensionInit(void) ProcShapeDispatch, SProcShapeDispatch, ShapeResetProc, StandardMinorOpcode))) { +#if 0 + ShapeReqCode = (unsigned char)extEntry->base; +#endif ShapeEventBase = extEntry->eventBase; EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent; - } else - return; - - RegisterRequestName(extEntry->base, X_ShapeQueryVersion, - SHAPENAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_ShapeRectangles, - SHAPENAME ":Rectangles"); - RegisterRequestName(extEntry->base, X_ShapeMask, - SHAPENAME ":Mask"); - RegisterRequestName(extEntry->base, X_ShapeCombine, - SHAPENAME ":Combine"); - RegisterRequestName(extEntry->base, X_ShapeOffset, - SHAPENAME ":Offset"); - RegisterRequestName(extEntry->base, X_ShapeQueryExtents, - SHAPENAME ":QueryExtents"); - RegisterRequestName(extEntry->base, X_ShapeSelectInput, - SHAPENAME ":SelectInput"); - RegisterRequestName(extEntry->base, X_ShapeInputSelected, - SHAPENAME ":InputSelected"); - RegisterRequestName(extEntry->base, X_ShapeGetRectangles, - SHAPENAME ":GetRectangles"); - - RegisterEventName(ShapeEventBase + ShapeNotify, - SHAPENAME ":Notify"); + } } /*ARGSUSED*/ From 4c7cf5aa4c802dcde895c723879a80a87620c0f7 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:23:57 -0500 Subject: [PATCH 235/552] Revert "registry: Register SHM extension protocol names." This reverts commit 2c9646ad4e65bb061d910c9e2b1a8a978f21fa17. Moving all the names to dix/registry.c --- Xext/shm.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/Xext/shm.c b/Xext/shm.c index dfe759fbe..e3d7a23ff 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -59,7 +59,6 @@ in this Software without prior written authorization from The Open Group. #include "servermd.h" #include "shmint.h" #include "xace.h" -#include "registry.h" #define _XSHM_SERVER_ #include #include @@ -274,27 +273,7 @@ ShmExtensionInit(INITARGS) ShmCompletionCode = extEntry->eventBase; BadShmSegCode = extEntry->errorBase; EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent; - } else - return; - - RegisterRequestName(ShmReqCode, X_ShmQueryVersion, - SHMNAME ":QueryVersion"); - RegisterRequestName(ShmReqCode, X_ShmAttach, - SHMNAME ":Attach"); - RegisterRequestName(ShmReqCode, X_ShmDetach, - SHMNAME ":Detach"); - RegisterRequestName(ShmReqCode, X_ShmPutImage, - SHMNAME ":PutImage"); - RegisterRequestName(ShmReqCode, X_ShmGetImage, - SHMNAME ":GetImage"); - RegisterRequestName(ShmReqCode, X_ShmCreatePixmap, - SHMNAME ":CreatePixmap"); - - RegisterEventName(extEntry->eventBase + ShmCompletion, - SHMNAME ":Completion"); - - RegisterErrorName(extEntry->errorBase + BadShmSeg, - SHMNAME ":BadShmSeg"); + } } /*ARGSUSED*/ From 4b0274e8f712e51b18618a2a0bdbe03b17b9736b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:25:15 -0500 Subject: [PATCH 236/552] Revert "registry: Register SYNC extension protocol names." This reverts commit 9f597f6c87e0b14cc382d8e5929e42f822db4329. Moving all the names into dix/registry.c --- Xext/sync.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/Xext/sync.c b/Xext/sync.c index 729014721..10d448106 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -67,7 +67,6 @@ PERFORMANCE OF THIS SOFTWARE. #include "dixstruct.h" #include "resource.h" #include "opaque.h" -#include "registry.h" #define _SYNC_SERVER #include #include @@ -2412,45 +2411,6 @@ SyncExtensionInit(INITARGS) fprintf(stderr, "Sync Extension %d.%d\n", SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION); #endif - - RegisterRequestName(extEntry->base, X_SyncInitialize, - SYNC_NAME ":Initialize"); - RegisterRequestName(extEntry->base, X_SyncListSystemCounters, - SYNC_NAME ":ListSystemCounters"); - RegisterRequestName(extEntry->base, X_SyncCreateCounter, - SYNC_NAME ":CreateCounter"); - RegisterRequestName(extEntry->base, X_SyncSetCounter, - SYNC_NAME ":SetCounter"); - RegisterRequestName(extEntry->base, X_SyncChangeCounter, - SYNC_NAME ":ChangeCounter"); - RegisterRequestName(extEntry->base, X_SyncQueryCounter, - SYNC_NAME ":QueryCounter"); - RegisterRequestName(extEntry->base, X_SyncDestroyCounter, - SYNC_NAME ":DestroyCounter"); - RegisterRequestName(extEntry->base, X_SyncAwait, - SYNC_NAME ":Await"); - RegisterRequestName(extEntry->base, X_SyncCreateAlarm, - SYNC_NAME ":CreateAlarm"); - RegisterRequestName(extEntry->base, X_SyncChangeAlarm, - SYNC_NAME ":ChangeAlarm"); - RegisterRequestName(extEntry->base, X_SyncQueryAlarm, - SYNC_NAME ":QueryAlarm"); - RegisterRequestName(extEntry->base, X_SyncDestroyAlarm, - SYNC_NAME ":DestroyAlarm"); - RegisterRequestName(extEntry->base, X_SyncSetPriority, - SYNC_NAME ":SetPriority"); - RegisterRequestName(extEntry->base, X_SyncGetPriority, - SYNC_NAME ":GetPriority"); - - RegisterEventName(SyncEventBase + XSyncCounterNotify, - SYNC_NAME ":CounterNotify"); - RegisterEventName(SyncEventBase + XSyncAlarmNotify, - SYNC_NAME ":AlarmNotify"); - - RegisterErrorName(SyncErrorBase + XSyncBadCounter, - SYNC_NAME ":BadCounter"); - RegisterErrorName(SyncErrorBase + XSyncBadAlarm, - SYNC_NAME ":BadAlarm"); } From 687427179420b18a55a1a02b8a9f2a32ea8eac8d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:32:54 -0500 Subject: [PATCH 237/552] registry: Remove registry code from XC-MISC extension. Moving all the names into dix/registry.c --- Xext/xcmisc.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index ba0402c76..44d2b19a6 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -39,7 +39,6 @@ from The Open Group. #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" -#include "registry.h" #include #include "modinit.h" @@ -65,19 +64,9 @@ static DISPATCH_PROC(SProcXCMiscGetXIDRange); void XCMiscExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - - if (!(extEntry = AddExtension(XCMiscExtensionName, 0, 0, - ProcXCMiscDispatch, SProcXCMiscDispatch, - XCMiscResetProc, StandardMinorOpcode))) - return; - - RegisterRequestName(extEntry->base, X_XCMiscGetVersion, - XCMiscExtensionName ":GetVersion"); - RegisterRequestName(extEntry->base, X_XCMiscGetXIDRange, - XCMiscExtensionName ":GetXIDRange"); - RegisterRequestName(extEntry->base, X_XCMiscGetXIDList, - XCMiscExtensionName ":GetXIDList"); + AddExtension(XCMiscExtensionName, 0, 0, + ProcXCMiscDispatch, SProcXCMiscDispatch, + XCMiscResetProc, StandardMinorOpcode)) } /*ARGSUSED*/ From bf27edd365ffd275e5453f44d130eeacbfe0ecd9 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:34:14 -0500 Subject: [PATCH 238/552] Revert "registry: Register EVIE extension protocol names." This reverts commit 48891d5696f56711f23743cb03be39cf6b26c522. Moving all the names into dix/registry.c --- Xext/xevie.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/Xext/xevie.c b/Xext/xevie.c index 8dc167814..7dd67bbf6 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -45,7 +45,6 @@ of the copyright holder. #include "colormapst.h" #include "scrnintstr.h" #include "servermd.h" -#include "registry.h" #define _XEVIE_SERVER_ #include #include @@ -147,21 +146,9 @@ XevieExtensionInit (void) StandardMinorOpcode))) { ReqCode = (unsigned char)extEntry->base; ErrorBase = extEntry->errorBase; - } else - return; + } /* PC servers initialize the desktop colors (citems) here! */ - - RegisterRequestName(ReqCode, X_XevieQueryVersion, - XEVIENAME ":QueryVersion"); - RegisterRequestName(ReqCode, X_XevieStart, - XEVIENAME ":Start"); - RegisterRequestName(ReqCode, X_XevieEnd, - XEVIENAME ":End"); - RegisterRequestName(ReqCode, X_XevieSend, - XEVIENAME ":Send"); - RegisterRequestName(ReqCode, X_XevieSelectInput, - XEVIENAME ":SelectInput"); } /*ARGSUSED*/ From 277345fb7065d74c3b0d076382affb78cbe67569 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:35:57 -0500 Subject: [PATCH 239/552] registry: Remove registry code from XF86Bigfont extension. Moving all the names into dix/registry.c --- Xext/xf86bigfont.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index e2f589040..33627421d 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -71,7 +71,6 @@ #include "gcstruct.h" #include "dixfontstr.h" #include "extnsionst.h" -#include "registry.h" #define _XF86BIGFONT_SERVER_ #include @@ -186,13 +185,7 @@ XFree86BigfontExtensionInit() # endif #endif #endif - } else - return; - - RegisterRequestName(extEntry->base, X_XF86BigfontQueryVersion, - XF86BIGFONTNAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_XF86BigfontQueryFont, - XF86BIGFONTNAME ":QueryFont"); + } } From e6023e0208fae8f19c566f9df1a8aa20494f40ab Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:36:49 -0500 Subject: [PATCH 240/552] Revert "registry: Register XPrint extension protocol names." This reverts commit f077578e42eee424b0e534774574c84af9d6f85b. Moving all the names into dix/registry.c --- Xext/xprint.c | 64 --------------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/Xext/xprint.c b/Xext/xprint.c index 48559dd44..ef5111837 100644 --- a/Xext/xprint.c +++ b/Xext/xprint.c @@ -80,7 +80,6 @@ copyright holders. #include "pixmapstr.h" #include "extnsionst.h" #include "dixstruct.h" -#include "registry.h" #include #include #include @@ -311,69 +310,6 @@ XpExtensionInit(INITARGS) screenInfo.screens[i]->CloseScreen = XpCloseScreen; } } - - RegisterRequestName(XpReqCode, X_PrintQueryVersion, - XP_PRINTNAME ":QueryVersion"); - RegisterRequestName(XpReqCode, X_PrintGetPrinterList, - XP_PRINTNAME ":GetPrinterList"); - RegisterRequestName(XpReqCode, X_PrintCreateContext, - XP_PRINTNAME ":CreateContext"); - RegisterRequestName(XpReqCode, X_PrintSetContext, - XP_PRINTNAME ":SetContext"); - RegisterRequestName(XpReqCode, X_PrintGetContext, - XP_PRINTNAME ":GetContext"); - RegisterRequestName(XpReqCode, X_PrintDestroyContext, - XP_PRINTNAME ":DestroyContext"); - RegisterRequestName(XpReqCode, X_PrintGetContextScreen, - XP_PRINTNAME ":GetContextScreen"); - RegisterRequestName(XpReqCode, X_PrintStartJob, - XP_PRINTNAME ":StartJob"); - RegisterRequestName(XpReqCode, X_PrintEndJob, - XP_PRINTNAME ":EndJob"); - RegisterRequestName(XpReqCode, X_PrintStartDoc, - XP_PRINTNAME ":StartDoc"); - RegisterRequestName(XpReqCode, X_PrintEndDoc, - XP_PRINTNAME ":EndDoc"); - RegisterRequestName(XpReqCode, X_PrintPutDocumentData, - XP_PRINTNAME ":PutDocumentData"); - RegisterRequestName(XpReqCode, X_PrintGetDocumentData, - XP_PRINTNAME ":GetDocumentData"); - RegisterRequestName(XpReqCode, X_PrintStartPage, - XP_PRINTNAME ":StartPage"); - RegisterRequestName(XpReqCode, X_PrintEndPage, - XP_PRINTNAME ":EndPage"); - RegisterRequestName(XpReqCode, X_PrintSelectInput, - XP_PRINTNAME ":SelectInput"); - RegisterRequestName(XpReqCode, X_PrintInputSelected, - XP_PRINTNAME ":InputSelected"); - RegisterRequestName(XpReqCode, X_PrintGetAttributes, - XP_PRINTNAME ":GetAttributes"); - RegisterRequestName(XpReqCode, X_PrintSetAttributes, - XP_PRINTNAME ":SetAttributes"); - RegisterRequestName(XpReqCode, X_PrintGetOneAttribute, - XP_PRINTNAME ":GetOneAttribute"); - RegisterRequestName(XpReqCode, X_PrintRehashPrinterList, - XP_PRINTNAME ":RehashPrinterList"); - RegisterRequestName(XpReqCode, X_PrintGetPageDimensions, - XP_PRINTNAME ":GetPageDimensions"); - RegisterRequestName(XpReqCode, X_PrintQueryScreens, - XP_PRINTNAME ":QueryScreens"); - RegisterRequestName(XpReqCode, X_PrintSetImageResolution, - XP_PRINTNAME ":SetImageResolution"); - RegisterRequestName(XpReqCode, X_PrintGetImageResolution, - XP_PRINTNAME ":GetImageResolution"); - - RegisterEventName(XpEventBase + XPPrintNotify, - XP_PRINTNAME ":PrintNotify"); - RegisterEventName(XpEventBase + XPAttributeNotify, - XP_PRINTNAME ":AttributeNotify"); - - RegisterErrorName(XpErrorBase + XPBadContext, - XP_PRINTNAME ":BadContext"); - RegisterErrorName(XpErrorBase + XPBadSequence, - XP_PRINTNAME ":BadSequence"); - RegisterErrorName(XpErrorBase + XPBadResourceID, - XP_PRINTNAME ":BadResourceID"); } static void From 9a8af33718d085656a672e4c27df200485c84154 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:38:24 -0500 Subject: [PATCH 241/552] Revert "registry: Register Resource extension protocol names." This reverts commit 5c8b1a91726817816d20faefad21c7a68ab634cc. Moving all the names into dix/registry.c --- Xext/xres.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Xext/xres.c b/Xext/xres.c index efa6c49c7..243460c12 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -17,7 +17,6 @@ #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" -#include "registry.h" #include #include "pixmapstr.h" #include "windowstr.h" @@ -388,18 +387,7 @@ SProcResDispatch (ClientPtr client) void ResExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - - extEntry = AddExtension(XRES_NAME, 0, 0, + (void) AddExtension(XRES_NAME, 0, 0, ProcResDispatch, SProcResDispatch, ResResetProc, StandardMinorOpcode); - - RegisterRequestName(extEntry->base, X_XResQueryVersion, - XRES_NAME ":QueryVersion"); - RegisterRequestName(extEntry->base, X_XResQueryClients, - XRES_NAME ":QueryClients"); - RegisterRequestName(extEntry->base, X_XResQueryClientResources, - XRES_NAME ":QueryClientResources"); - RegisterRequestName(extEntry->base, X_XResQueryClientPixmapBytes, - XRES_NAME ":QueryClientPixmapBytes"); } From 5fea1ed50f37691a5273bf2897479781de808ff5 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:39:48 -0500 Subject: [PATCH 242/552] registry: Remove registry code from SELinux extension. Moving all the names into dix/registry.c --- Xext/xselinux.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index cefde9d37..8f52c1e7d 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1399,28 +1399,4 @@ XSELinuxExtensionInit(INITARGS) /* Label objects that were created before we could register ourself */ SELinuxLabelInitial(); - - /* Add names to registry */ - RegisterRequestName(extEntry->base, X_SELinuxQueryVersion, - XSELINUX_EXTENSION_NAME ":SELinuxQueryVersion"); - RegisterRequestName(extEntry->base, X_SELinuxSetSelectionManager, - XSELINUX_EXTENSION_NAME ":SELinuxSetSelectionManager"); - RegisterRequestName(extEntry->base, X_SELinuxGetSelectionManager, - XSELINUX_EXTENSION_NAME ":SELinuxGetSelectionManager"); - RegisterRequestName(extEntry->base, X_SELinuxSetDeviceContext, - XSELINUX_EXTENSION_NAME ":SELinuxSetDeviceContext"); - RegisterRequestName(extEntry->base, X_SELinuxGetDeviceContext, - XSELINUX_EXTENSION_NAME ":SELinuxGetDeviceContext"); - RegisterRequestName(extEntry->base, X_SELinuxSetPropertyCreateContext, - XSELINUX_EXTENSION_NAME ":SELinuxSetPropertyCreateContext"); - RegisterRequestName(extEntry->base, X_SELinuxGetPropertyCreateContext, - XSELINUX_EXTENSION_NAME ":SELinuxGetPropertyCreateContext"); - RegisterRequestName(extEntry->base, X_SELinuxGetPropertyContext, - XSELINUX_EXTENSION_NAME ":SELinuxGetPropertyContext"); - RegisterRequestName(extEntry->base, X_SELinuxSetWindowCreateContext, - XSELINUX_EXTENSION_NAME ":SELinuxSetWindowCreateContext"); - RegisterRequestName(extEntry->base, X_SELinuxGetWindowCreateContext, - XSELINUX_EXTENSION_NAME ":SELinuxGetWindowCreateContext"); - RegisterRequestName(extEntry->base, X_SELinuxGetWindowContext, - XSELINUX_EXTENSION_NAME ":SELinuxGetWindowContext"); } From edcf490cdb965e2a5bfc0169c01732d2924da3ae Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:41:10 -0500 Subject: [PATCH 243/552] registry: Remove registry code from XTest extension. Moving all the names into dix/registry.c --- Xext/xtest.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index effa3b904..8e1732cd2 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -42,7 +42,6 @@ from The Open Group. #include "scrnintstr.h" #include "dixevents.h" #include "sleepuntil.h" -#include "registry.h" #define _XTEST_SERVER_ #include #include @@ -85,21 +84,9 @@ static DISPATCH_PROC(SProcXTestGrabControl); void XTestExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - - if (!(extEntry = AddExtension(XTestExtensionName, 0, 0, - ProcXTestDispatch, SProcXTestDispatch, - XTestResetProc, StandardMinorOpcode))) - return; - - RegisterRequestName(extEntry->base, X_XTestGetVersion, - XTestExtensionName ":GetVersion"); - RegisterRequestName(extEntry->base, X_XTestCompareCursor, - XTestExtensionName ":CompareCursor"); - RegisterRequestName(extEntry->base, X_XTestFakeInput, - XTestExtensionName ":FakeInput"); - RegisterRequestName(extEntry->base, X_XTestGrabControl, - XTestExtensionName ":GrabControl"); + AddExtension(XTestExtensionName, 0, 0, + ProcXTestDispatch, SProcXTestDispatch, + XTestResetProc, StandardMinorOpcode)) } /*ARGSUSED*/ From 03a86c8d5e20a6e47f3c294f0087f205cf2a72dd Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:42:19 -0500 Subject: [PATCH 244/552] Revert "registry: Register Xv extension protocol names." This reverts commit 12766c5b5ffdab95255a63b2c8421ee773fd43b5. Moving all the names into dix/registry.c --- Xext/xvmain.c | 53 --------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/Xext/xvmain.c b/Xext/xvmain.c index b3449b4a5..a2fc10802 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -92,7 +92,6 @@ SOFTWARE. #include "resource.h" #include "opaque.h" #include "input.h" -#include "registry.h" #define GLOBAL @@ -196,58 +195,6 @@ XvExtensionInit(void) (void)MakeAtom(XvName, strlen(XvName), xTrue); - RegisterRequestName(XvReqCode, xv_QueryExtension, - XvName ":QueryExtension"); - RegisterRequestName(XvReqCode, xv_QueryAdaptors, - XvName ":QueryAdaptors"); - RegisterRequestName(XvReqCode, xv_QueryEncodings, - XvName ":QueryEncodings"); - RegisterRequestName(XvReqCode, xv_GrabPort, - XvName ":GrabPort"); - RegisterRequestName(XvReqCode, xv_UngrabPort, - XvName ":UngrabPort"); - RegisterRequestName(XvReqCode, xv_PutVideo, - XvName ":PutVideo"); - RegisterRequestName(XvReqCode, xv_PutStill, - XvName ":PutStill"); - RegisterRequestName(XvReqCode, xv_GetVideo, - XvName ":GetVideo"); - RegisterRequestName(XvReqCode, xv_GetStill, - XvName ":GetStill"); - RegisterRequestName(XvReqCode, xv_StopVideo, - XvName ":StopVideo"); - RegisterRequestName(XvReqCode, xv_SelectVideoNotify, - XvName ":SelectVideoNotify"); - RegisterRequestName(XvReqCode, xv_SelectPortNotify, - XvName ":SelectPortNotify"); - RegisterRequestName(XvReqCode, xv_QueryBestSize, - XvName ":QueryBestSize"); - RegisterRequestName(XvReqCode, xv_SetPortAttribute, - XvName ":SetPortAttribute"); - RegisterRequestName(XvReqCode, xv_GetPortAttribute, - XvName ":GetPortAttribute"); - RegisterRequestName(XvReqCode, xv_QueryPortAttributes, - XvName ":QueryPortAttributes"); - RegisterRequestName(XvReqCode, xv_ListImageFormats, - XvName ":ListImageFormats"); - RegisterRequestName(XvReqCode, xv_QueryImageAttributes, - XvName ":QueryImageAttributes"); - RegisterRequestName(XvReqCode, xv_PutImage, - XvName ":PutImage"); - RegisterRequestName(XvReqCode, xv_ShmPutImage, - XvName ":ShmPutImage"); - - RegisterEventName(XvEventBase + XvVideoNotify, - XvName ":VideoNotify"); - RegisterEventName(XvEventBase + XvPortNotify, - XvName ":PortNotify"); - - RegisterErrorName(XvErrorBase + XvBadPort, - XvName ":BadPort"); - RegisterErrorName(XvErrorBase + XvBadEncoding, - XvName ":BadEncoding"); - RegisterErrorName(XvErrorBase + XvBadControl, - XvName ":BadControl"); } } From 5269da2bde3cf4feb12fa2bd87bff6ee6d8730a1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:43:38 -0500 Subject: [PATCH 245/552] Revert "registry: Register XvMC extension protocol names." This reverts commit 853ea337bdad17f8f6ec7d940de14ce2cbbbf93e. Moving all the names into dix/registry.c --- Xext/xvmc.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/Xext/xvmc.c b/Xext/xvmc.c index a1e0ed186..7ae8cc0da 100644 --- a/Xext/xvmc.c +++ b/Xext/xvmc.c @@ -16,7 +16,6 @@ #include "scrnintstr.h" #include "extnsionst.h" #include "servermd.h" -#include "registry.h" #include #include "xvdix.h" #include @@ -701,34 +700,6 @@ XvMCExtensionInit(void) XvMCReqCode = extEntry->base; XvMCEventBase = extEntry->eventBase; XvMCErrorBase = extEntry->errorBase; - - RegisterRequestName(XvMCReqCode, xvmc_QueryVersion, - XvMCName ":QueryVersion"); - RegisterRequestName(XvMCReqCode, xvmc_ListSurfaceTypes, - XvMCName ":ListSurfaceTypes"); - RegisterRequestName(XvMCReqCode, xvmc_CreateContext, - XvMCName ":CreateContext"); - RegisterRequestName(XvMCReqCode, xvmc_DestroyContext, - XvMCName ":DestroyContext"); - RegisterRequestName(XvMCReqCode, xvmc_CreateSurface, - XvMCName ":CreateSurface"); - RegisterRequestName(XvMCReqCode, xvmc_DestroySurface, - XvMCName ":DestroySurface"); - RegisterRequestName(XvMCReqCode, xvmc_CreateSubpicture, - XvMCName ":CreateSubpicture"); - RegisterRequestName(XvMCReqCode, xvmc_DestroySubpicture, - XvMCName ":DestroySubpicture"); - RegisterRequestName(XvMCReqCode, xvmc_ListSubpictureTypes, - XvMCName ":ListSubpictureTypes"); - RegisterRequestName(XvMCReqCode, xvmc_GetDRInfo, - XvMCName ":GetDRInfo"); - - RegisterErrorName(XvMCErrorBase + XvMCBadContext, - XvMCName ":BadContext"); - RegisterErrorName(XvMCErrorBase + XvMCBadSurface, - XvMCName ":BadSurface"); - RegisterErrorName(XvMCErrorBase + XvMCBadSubpicture, - XvMCName ":BadSubpicture"); } static Bool From e86852aff62a861823b8e419434e0401b8cdc8e0 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:44:56 -0500 Subject: [PATCH 246/552] Revert "registry: Register XFixes extension protocol names." This reverts commit 106758893b68033f14f69c4ee6591fb6a149ba37. Moving all the names into dix/registry.c --- xfixes/xfixes.c | 78 +------------------------------------------------ 1 file changed, 1 insertion(+), 77 deletions(-) diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c index ccce7b9fd..0db49895e 100755 --- a/xfixes/xfixes.c +++ b/xfixes/xfixes.c @@ -45,7 +45,6 @@ #endif #include "xfixesint.h" -#include "registry.h" /* * Must use these instead of the constants from xfixeswire.h. They advertise @@ -258,80 +257,5 @@ XFixesExtensionInit(void) (EventSwapPtr) SXFixesSelectionNotifyEvent; EventSwapVector[XFixesEventBase + XFixesCursorNotify] = (EventSwapPtr) SXFixesCursorNotifyEvent; - } else - return; - - RegisterRequestName(XFixesReqCode, X_XFixesQueryVersion, - XFIXES_NAME ":QueryVersion"); - RegisterRequestName(XFixesReqCode, X_XFixesChangeSaveSet, - XFIXES_NAME ":ChangeSaveSet"); - RegisterRequestName(XFixesReqCode, X_XFixesSelectSelectionInput, - XFIXES_NAME ":SelectSelectionInput"); - RegisterRequestName(XFixesReqCode, X_XFixesSelectCursorInput, - XFIXES_NAME ":SelectCursorInput"); - RegisterRequestName(XFixesReqCode, X_XFixesGetCursorImage, - XFIXES_NAME ":GetCursorImage"); - /*************** Version 2 ******************/ - RegisterRequestName(XFixesReqCode, X_XFixesCreateRegion, - XFIXES_NAME ":CreateRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesCreateRegionFromBitmap, - XFIXES_NAME ":CreateRegionFromBitmap"); - RegisterRequestName(XFixesReqCode, X_XFixesCreateRegionFromWindow, - XFIXES_NAME ":CreateRegionFromWindow"); - RegisterRequestName(XFixesReqCode, X_XFixesCreateRegionFromGC, - XFIXES_NAME ":CreateRegionFromGC"); - RegisterRequestName(XFixesReqCode, X_XFixesCreateRegionFromPicture, - XFIXES_NAME ":CreateRegionFromPicture"); - RegisterRequestName(XFixesReqCode, X_XFixesDestroyRegion, - XFIXES_NAME ":DestroyRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesSetRegion, - XFIXES_NAME ":SetRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesCopyRegion, - XFIXES_NAME ":CopyRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesUnionRegion, - XFIXES_NAME ":UnionRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesIntersectRegion, - XFIXES_NAME ":IntersectRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesSubtractRegion, - XFIXES_NAME ":SubtractRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesInvertRegion, - XFIXES_NAME ":InvertRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesTranslateRegion, - XFIXES_NAME ":TranslateRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesRegionExtents, - XFIXES_NAME ":RegionExtents"); - RegisterRequestName(XFixesReqCode, X_XFixesFetchRegion, - XFIXES_NAME ":FetchRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesSetGCClipRegion, - XFIXES_NAME ":SetGCClipRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesSetWindowShapeRegion, - XFIXES_NAME ":SetWindowShapeRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesSetPictureClipRegion, - XFIXES_NAME ":SetPictureClipRegion"); - RegisterRequestName(XFixesReqCode, X_XFixesSetCursorName, - XFIXES_NAME ":SetCursorName"); - RegisterRequestName(XFixesReqCode, X_XFixesGetCursorName, - XFIXES_NAME ":GetCursorName"); - RegisterRequestName(XFixesReqCode, X_XFixesGetCursorImageAndName, - XFIXES_NAME ":GetCursorImageAndName"); - RegisterRequestName(XFixesReqCode, X_XFixesChangeCursor, - XFIXES_NAME ":ChangeCursor"); - RegisterRequestName(XFixesReqCode, X_XFixesChangeCursorByName, - XFIXES_NAME ":ChangeCursorByName"); - /*************** Version 3 ******************/ - RegisterRequestName(XFixesReqCode, X_XFixesExpandRegion, - XFIXES_NAME ":ExpandRegion"); - /*************** Version 4 ******************/ - RegisterRequestName(XFixesReqCode, X_XFixesHideCursor, - XFIXES_NAME ":HideCursor"); - RegisterRequestName(XFixesReqCode, X_XFixesShowCursor, - XFIXES_NAME ":ShowCursor"); - - RegisterEventName(XFixesEventBase + XFixesSelectionNotify, - XFIXES_NAME ":SelectionNotify"); - RegisterEventName(XFixesEventBase + XFixesCursorNotify, - XFIXES_NAME ":CursorNotify"); - - RegisterErrorName(XFixesErrorBase + BadRegion, - XFIXES_NAME ":BadRegion"); + } } From 17b0c729b553e2f0f8f82497698b282a47db3326 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:46:43 -0500 Subject: [PATCH 247/552] registry: Remove registry code from XInput extension. Moving all the names into dix/registry.c --- Xi/extinit.c | 115 --------------------------------------------------- 1 file changed, 115 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index bf5ebd221..2ffdafbc1 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -959,119 +959,4 @@ XInputExtensionInit(void) } else { FatalError("IExtensionInit: AddExtensions failed\n"); } - - RegisterRequestName(IReqCode, X_GetExtensionVersion, - INAME ":GetExtensionVersion"); - RegisterRequestName(IReqCode, X_ListInputDevices, - INAME ":ListInputDevices"); - RegisterRequestName(IReqCode, X_OpenDevice, - INAME ":OpenDevice"); - RegisterRequestName(IReqCode, X_CloseDevice, - INAME ":CloseDevice"); - RegisterRequestName(IReqCode, X_SetDeviceMode, - INAME ":SetDeviceMode"); - RegisterRequestName(IReqCode, X_SelectExtensionEvent, - INAME ":SelectExtensionEvent"); - RegisterRequestName(IReqCode, X_GetSelectedExtensionEvents, - INAME ":GetSelectedExtensionEvents"); - RegisterRequestName(IReqCode, X_ChangeDeviceDontPropagateList, - INAME ":ChangeDeviceDontPropagateList"); - RegisterRequestName(IReqCode, X_GetDeviceDontPropagateList, - INAME ":GetDeviceDontPropagageList"); - RegisterRequestName(IReqCode, X_GetDeviceMotionEvents, - INAME ":GetDeviceMotionEvents"); - RegisterRequestName(IReqCode, X_ChangeKeyboardDevice, - INAME ":ChangeKeyboardDevice"); - RegisterRequestName(IReqCode, X_ChangePointerDevice, - INAME ":ChangePointerDevice"); - RegisterRequestName(IReqCode, X_GrabDevice, - INAME ":GrabDevice"); - RegisterRequestName(IReqCode, X_UngrabDevice, - INAME ":UngrabDevice"); - RegisterRequestName(IReqCode, X_GrabDeviceKey, - INAME ":GrabDeviceKey"); - RegisterRequestName(IReqCode, X_UngrabDeviceKey, - INAME ":UngrabDeviceKey"); - RegisterRequestName(IReqCode, X_GrabDeviceButton, - INAME ":GrabDeviceButton"); - RegisterRequestName(IReqCode, X_UngrabDeviceButton, - INAME ":UngrabDeviceButton"); - RegisterRequestName(IReqCode, X_AllowDeviceEvents, - INAME ":AllowDeviceEvents"); - RegisterRequestName(IReqCode, X_GetDeviceFocus, - INAME ":GetDeviceFocus"); - RegisterRequestName(IReqCode, X_SetDeviceFocus, - INAME ":SetDeviceFocus"); - RegisterRequestName(IReqCode, X_GetFeedbackControl, - INAME ":GetFeedbackControl"); - RegisterRequestName(IReqCode, X_ChangeFeedbackControl, - INAME ":ChangeFeedbackControl"); - RegisterRequestName(IReqCode, X_GetDeviceKeyMapping, - INAME ":GetDeviceKeyMapping"); - RegisterRequestName(IReqCode, X_ChangeDeviceKeyMapping, - INAME ":ChangeDeviceKeyMapping"); - RegisterRequestName(IReqCode, X_GetDeviceModifierMapping, - INAME ":GetDeviceModifierMapping"); - RegisterRequestName(IReqCode, X_SetDeviceModifierMapping, - INAME ":SetDeviceModifierMapping"); - RegisterRequestName(IReqCode, X_GetDeviceButtonMapping, - INAME ":GetDeviceButtonMapping"); - RegisterRequestName(IReqCode, X_SetDeviceButtonMapping, - INAME ":SetDeviceButtonMapping"); - RegisterRequestName(IReqCode, X_QueryDeviceState, - INAME ":QueryDeviceState"); - RegisterRequestName(IReqCode, X_SendExtensionEvent, - INAME ":SendExtensionEvent"); - RegisterRequestName(IReqCode, X_DeviceBell, - INAME ":DeviceBell"); - RegisterRequestName(IReqCode, X_SetDeviceValuators, - INAME ":SetDeviceValuators"); - RegisterRequestName(IReqCode, X_GetDeviceControl, - INAME ":GetDeviceControl"); - RegisterRequestName(IReqCode, X_ChangeDeviceControl, - INAME ":ChangeDeviceControl"); - - RegisterEventName(extEntry->eventBase + XI_DeviceValuator, - INAME ":DeviceValuator"); - RegisterEventName(extEntry->eventBase + XI_DeviceKeyPress, - INAME ":DeviceKeyPress"); - RegisterEventName(extEntry->eventBase + XI_DeviceKeyRelease, - INAME ":DeviceKeyRelease"); - RegisterEventName(extEntry->eventBase + XI_DeviceButtonPress, - INAME ":DeviceButtonPress"); - RegisterEventName(extEntry->eventBase + XI_DeviceButtonRelease, - INAME ":DeviceButtonRelease"); - RegisterEventName(extEntry->eventBase + XI_DeviceMotionNotify, - INAME ":DeviceMotionNotify"); - RegisterEventName(extEntry->eventBase + XI_DeviceFocusIn, - INAME ":DeviceFocusIn"); - RegisterEventName(extEntry->eventBase + XI_DeviceFocusOut, - INAME ":DeviceFocusOut"); - RegisterEventName(extEntry->eventBase + XI_ProximityIn, - INAME ":ProximityIn"); - RegisterEventName(extEntry->eventBase + XI_ProximityOut, - INAME ":ProximityOut"); - RegisterEventName(extEntry->eventBase + XI_DeviceStateNotify, - INAME ":DeviceStateNotify"); - RegisterEventName(extEntry->eventBase + XI_DeviceMappingNotify, - INAME ":DeviceMappingNotify"); - RegisterEventName(extEntry->eventBase + XI_ChangeDeviceNotify, - INAME ":ChangeDeviceNotify"); - RegisterEventName(extEntry->eventBase + XI_DeviceKeystateNotify, - INAME ":DeviceKeystateNotify"); - RegisterEventName(extEntry->eventBase + XI_DeviceButtonstateNotify, - INAME ":DeviceButtonstateNotify"); - RegisterEventName(extEntry->eventBase + XI_DevicePresenceNotify, - INAME ":DevicePresenceNotify"); - - RegisterErrorName(extEntry->errorBase + XI_BadDevice, - INAME ":BadDevice"); - RegisterErrorName(extEntry->errorBase + XI_BadEvent, - INAME ":BadEvent"); - RegisterErrorName(extEntry->errorBase + XI_BadMode, - INAME ":BadMode"); - RegisterErrorName(extEntry->errorBase + XI_DeviceBusy, - INAME ":DeviceBusy"); - RegisterErrorName(extEntry->errorBase + XI_BadClass, - INAME ":BadClass"); } From ed8a39c48ab9dac085fcf58b9641364b5608f3f4 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:47:52 -0500 Subject: [PATCH 248/552] Revert "registry: Register XKB extension protocol names." This reverts commit a5cf3f21f712e46dbf9bca289e67be75f2b531d3. Moving all the names into dix/registry.c --- xkb/xkb.c | 63 ++++--------------------------------------------------- 1 file changed, 4 insertions(+), 59 deletions(-) diff --git a/xkb/xkb.c b/xkb/xkb.c index 49c63faa6..23e1dc76f 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -35,7 +35,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "misc.h" #include "inputstr.h" -#include "registry.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "extnsionst.h" @@ -6227,62 +6226,8 @@ XkbExtensionInit(void) XkbErrorBase = (unsigned char)extEntry->errorBase; XkbKeyboardErrorCode = XkbErrorBase+XkbKeyboard; RT_XKBCLIENT = CreateNewResourceType(XkbClientGone); - } else - return; - - RegisterRequestName(XkbReqCode, X_kbUseExtension, - XkbName ":UseExtension"); - RegisterRequestName(XkbReqCode, X_kbSelectEvents, - XkbName ":SelectEvents"); - RegisterRequestName(XkbReqCode, X_kbBell, - XkbName ":Bell"); - RegisterRequestName(XkbReqCode, X_kbGetState, - XkbName ":GetState"); - RegisterRequestName(XkbReqCode, X_kbLatchLockState, - XkbName ":LatchLockState"); - RegisterRequestName(XkbReqCode, X_kbGetControls, - XkbName ":GetControls"); - RegisterRequestName(XkbReqCode, X_kbSetControls, - XkbName ":SetControls"); - RegisterRequestName(XkbReqCode, X_kbGetMap, - XkbName ":GetMap"); - RegisterRequestName(XkbReqCode, X_kbSetMap, - XkbName ":SetMap"); - RegisterRequestName(XkbReqCode, X_kbGetCompatMap, - XkbName ":GetCompatMap"); - RegisterRequestName(XkbReqCode, X_kbSetCompatMap, - XkbName ":SetCompatMap"); - RegisterRequestName(XkbReqCode, X_kbGetIndicatorState, - XkbName ":GetIndicatorState"); - RegisterRequestName(XkbReqCode, X_kbGetIndicatorMap, - XkbName ":GetIndicatorMap"); - RegisterRequestName(XkbReqCode, X_kbSetIndicatorMap, - XkbName ":SetIndicatorMap"); - RegisterRequestName(XkbReqCode, X_kbGetNamedIndicator, - XkbName ":GetNamedIndicator"); - RegisterRequestName(XkbReqCode, X_kbSetNamedIndicator, - XkbName ":SetNamedIndicator"); - RegisterRequestName(XkbReqCode, X_kbGetNames, - XkbName ":GetNames"); - RegisterRequestName(XkbReqCode, X_kbSetNames, - XkbName ":SetNames"); - RegisterRequestName(XkbReqCode, X_kbGetGeometry, - XkbName ":GetGeometry"); - RegisterRequestName(XkbReqCode, X_kbSetGeometry, - XkbName ":SetGeometry"); - RegisterRequestName(XkbReqCode, X_kbPerClientFlags, - XkbName ":PerClientFlags"); - RegisterRequestName(XkbReqCode, X_kbListComponents, - XkbName ":ListComponents"); - RegisterRequestName(XkbReqCode, X_kbGetKbdByName, - XkbName ":GetKbdByName"); - RegisterRequestName(XkbReqCode, X_kbGetDeviceInfo, - XkbName ":GetDeviceInfo"); - RegisterRequestName(XkbReqCode, X_kbSetDeviceInfo, - XkbName ":SetDeviceInfo"); - RegisterRequestName(XkbReqCode, X_kbSetDebuggingFlags, - XkbName ":SetDebuggingFlags"); - - RegisterEventName(extEntry->eventBase, XkbName ":EventCode"); - RegisterErrorName(extEntry->errorBase, XkbName ":Keyboard"); + } + return; } + + From 140a4660aca1c283613d5b62f51668b44b45baf6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:49:30 -0500 Subject: [PATCH 249/552] Revert "registry: Register XTrap extension protocol names." This reverts commit b38a91993364aa80cfd99721e319e1458d9fb760. Moving all the names into dix/registry.c --- XTrap/xtrapdi.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c index 15a38eafc..7dd9584a0 100644 --- a/XTrap/xtrapdi.c +++ b/XTrap/xtrapdi.c @@ -62,7 +62,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "misc.h" /* Server swapping macros */ #include "dixstruct.h" /* Server ClientRec definitions */ #include "resource.h" /* Used with the MakeAtom call */ -#include "registry.h" #ifdef PC # include "scrintst.h" /* Screen struct */ # include "extnsist.h" @@ -464,41 +463,6 @@ void DEC_XTRAPInit() XETrap_avail.data.xtrap_revision); #endif - RegisterRequestName(extEntry->base, XETrap_Reset, - XTrapExtName ":Reset"); - RegisterRequestName(extEntry->base, XETrap_GetAvailable, - XTrapExtName ":GetAvailable"); - RegisterRequestName(extEntry->base, XETrap_Config, - XTrapExtName ":Config"); - RegisterRequestName(extEntry->base, XETrap_StartTrap, - XTrapExtName ":StartTrap"); - RegisterRequestName(extEntry->base, XETrap_StopTrap, - XTrapExtName ":StopTrap"); - RegisterRequestName(extEntry->base, XETrap_GetCurrent, - XTrapExtName ":GetCurrent"); - RegisterRequestName(extEntry->base, XETrap_GetStatistics, - XTrapExtName ":GetStatistics"); -#ifndef _XINPUT - RegisterRequestName(extEntry->base, XETrap_SimulateXEvent, - XTrapExtName ":SimulateXEvent"); -#endif - RegisterRequestName(extEntry->base, XETrap_GetVersion, - XTrapExtName ":GetVersion"); - RegisterRequestName(extEntry->base, XETrap_GetLastInpTime, - XTrapExtName ":GetLastInpTime"); - - RegisterEventName(extEntry->eventBase, XTrapExtName ":Event"); - - RegisterErrorName(extEntry->errorBase + BadIO, - XTrapExtName ":BadIO"); - RegisterErrorName(extEntry->errorBase + BadStatistics, - XTrapExtName ":BadStatistics"); - RegisterErrorName(extEntry->errorBase + BadDevices, - XTrapExtName ":BadDevices"); - RegisterErrorName(extEntry->errorBase + BadScreen, - XTrapExtName ":BadScreen"); - RegisterErrorName(extEntry->errorBase + BadSwapReq, - XTrapExtName ":BadSwapReq"); return; } From 4363d70c6b420648b501126d1fbdebfafc7ae09f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 18:58:55 -0500 Subject: [PATCH 250/552] registry: Fix some mistakes in the reversion of prior commits. --- Xext/bigreq.c | 2 +- Xext/dpms.c | 2 +- Xext/fontcache.c | 2 +- Xext/mitmisc.c | 2 +- Xext/xcmisc.c | 2 +- Xext/xres.c | 1 + Xext/xtest.c | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Xext/bigreq.c b/Xext/bigreq.c index fd8bcb89b..4f0724bc1 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -52,7 +52,7 @@ BigReqExtensionInit(INITARGS) { AddExtension(XBigReqExtensionName, 0, 0, ProcBigReqDispatch, ProcBigReqDispatch, - BigReqResetProc, StandardMinorOpcode))) + BigReqResetProc, StandardMinorOpcode); } /*ARGSUSED*/ diff --git a/Xext/dpms.c b/Xext/dpms.c index d518a16cc..6f01fa348 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -75,7 +75,7 @@ DPMSExtensionInit(INITARGS) { AddExtension(DPMSExtensionName, 0, 0, ProcDPMSDispatch, SProcDPMSDispatch, - DPMSResetProc, StandardMinorOpcode))) + DPMSResetProc, StandardMinorOpcode); } /*ARGSUSED*/ diff --git a/Xext/fontcache.c b/Xext/fontcache.c index 06b0c854b..eca730965 100644 --- a/Xext/fontcache.c +++ b/Xext/fontcache.c @@ -72,7 +72,7 @@ FontCacheExtensionInit(INITARGS) { AddExtension(FONTCACHENAME, FontCacheNumberEvents, FontCacheNumberErrors, ProcFontCacheDispatch, SProcFontCacheDispatch, - FontCacheResetProc, StandardMinorOpcode))) + FontCacheResetProc, StandardMinorOpcode); } /*ARGSUSED*/ diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c index a5f3b0f6d..e793d4dc1 100644 --- a/Xext/mitmisc.c +++ b/Xext/mitmisc.c @@ -58,7 +58,7 @@ MITMiscExtensionInit(INITARGS) { AddExtension(MITMISCNAME, 0, 0, ProcMITDispatch, SProcMITDispatch, - MITResetProc, StandardMinorOpcode))) + MITResetProc, StandardMinorOpcode); } /*ARGSUSED*/ diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 44d2b19a6..a42d2e210 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -66,7 +66,7 @@ XCMiscExtensionInit(INITARGS) { AddExtension(XCMiscExtensionName, 0, 0, ProcXCMiscDispatch, SProcXCMiscDispatch, - XCMiscResetProc, StandardMinorOpcode)) + XCMiscResetProc, StandardMinorOpcode); } /*ARGSUSED*/ diff --git a/Xext/xres.c b/Xext/xres.c index 243460c12..feadad27e 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -17,6 +17,7 @@ #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" +#include "registry.h" #include #include "pixmapstr.h" #include "windowstr.h" diff --git a/Xext/xtest.c b/Xext/xtest.c index 8e1732cd2..db6d54543 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -86,7 +86,7 @@ XTestExtensionInit(INITARGS) { AddExtension(XTestExtensionName, 0, 0, ProcXTestDispatch, SProcXTestDispatch, - XTestResetProc, StandardMinorOpcode)) + XTestResetProc, StandardMinorOpcode); } /*ARGSUSED*/ From c0f9e204baf0218466973868c5ea6ed0f78e6b8b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 26 Nov 2007 15:24:15 -0500 Subject: [PATCH 251/552] registry: rename the SERVERCONFIGdir and relocate it to /usr/lib/xorg by default. --- configure.ac | 7 ++++--- include/dix-config.h.in | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 477058cfb..d78bc1c33 100644 --- a/configure.ac +++ b/configure.ac @@ -460,9 +460,10 @@ AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XK AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), [ XKBOUTPUT="$withval" ], [ XKBOUTPUT="compiled" ]) -AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], [Path to server config (default: ${libdir}/xserver)]), +AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], + [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]), [ SERVERCONFIG="$withval" ], - [ SERVERCONFIG="${libdir}/xserver" ]) + [ SERVERCONFIG="${libdir}/xorg" ]) APPLE_APPLICATIONS_DIR="${bindir}/Applications" AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: ${bindir}/Applications)]), [ APPLE_APPLICATIONS_DIR="${withval}" ]. @@ -1024,7 +1025,7 @@ fi AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path]) -AC_DEFINE_DIR(SERVERCONFIGdir, SERVERCONFIG, [Server config path]) +AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path]) AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path]) AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path]) AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name]) diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 8ceeb8ddc..c4429628e 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -21,6 +21,9 @@ /* Default font path */ #undef COMPILEDDEFAULTFONTPATH +/* Miscellaneous server configuration files path */ +#undef SERVER_MISC_CONFIG_PATH + /* Support Composite Extension */ #undef COMPOSITE From 9b0e72c8d960d056276f5fa93f3cc2872825711e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 26 Nov 2007 15:26:04 -0500 Subject: [PATCH 252/552] registry: Add a great big list of protocol names, like the XErrorDB that ships with Xlib. This is considered temporary, until server-side XCB can solve the problem programmatically. --- dix/Makefile.am | 4 + dix/protocol.txt | 1054 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1058 insertions(+) create mode 100644 dix/protocol.txt diff --git a/dix/Makefile.am b/dix/Makefile.am index 65c387c31..2cf90142f 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -42,6 +42,10 @@ INCLUDES = -I$(top_srcdir)/Xprint EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in +# Install list of protocol names +miscconfigdir = $(SERVER_MISC_CONFIG_PATH) +dist_miscconfig_DATA = protocol.txt + if XSERVER_DTRACE # Generate dtrace header file for C sources to include BUILT_SOURCES = Xserver-dtrace.h diff --git a/dix/protocol.txt b/dix/protocol.txt new file mode 100644 index 000000000..f4cdf7bbb --- /dev/null +++ b/dix/protocol.txt @@ -0,0 +1,1054 @@ +# Registry of protocol names used by X Server +# This will eventually be replaced by server-side XCB +# +# Format is Xnnn : +# R=Request, V=Event, E=Error +# +# This is a security-sensitive file, please set permissions as appropriate. +# +R001 Adobe-DPS-Extension:Init +R002 Adobe-DPS-Extension:CreateContext +R003 Adobe-DPS-Extension:CreateSpace +R004 Adobe-DPS-Extension:GiveInput +R005 Adobe-DPS-Extension:GetStatus +R006 Adobe-DPS-Extension:DestroySpace +R007 Adobe-DPS-Extension:Reset +R008 Adobe-DPS-Extension:NotifyContext +R009 Adobe-DPS-Extension:CreateContextFromID +R010 Adobe-DPS-Extension:XIDFromContext +R011 Adobe-DPS-Extension:ContextFromXID +R012 Adobe-DPS-Extension:SetStatusMask +R013 Adobe-DPS-Extension:CreateSecureContext +R014 Adobe-DPS-Extension:NotifyWhenReady +R000 Apple-DRI:QueryVersion +R001 Apple-DRI:QueryDirectRenderingCapable +R002 Apple-DRI:CreateSurface +R003 Apple-DRI:DestroySurface +R004 Apple-DRI:AuthConnection +V000 Apple-DRI:ObsoleteEvent1 +V001 Apple-DRI:ObsoleteEvent2 +V002 Apple-DRI:ObsoleteEvent3 +V003 Apple-DRI:SurfaceNotify +E000 Apple-DRI:ClientNotLocal +E001 Apple-DRI:OperationNotSupported +R000 Apple-WM:QueryVersion +R001 Apple-WM:FrameGetRect +R002 Apple-WM:FrameHitTest +R003 Apple-WM:FrameDraw +R004 Apple-WM:DisableUpdate +R005 Apple-WM:ReenableUpdate +R006 Apple-WM:SelectInput +R007 Apple-WM:SetWindowMenuCheck +R008 Apple-WM:SetFrontProcess +R009 Apple-WM:SetWindowLevel +R010 Apple-WM:SetCanQuit +R011 Apple-WM:SetWindowMenu +V000 Apple-WM:ControllerNotify +V001 Apple-WM:ActivationNotify +V002 Apple-WM:PasteboardNotify +E000 Apple-WM:ClientNotLocal +E001 Apple-WM:OperationNotSupported +R000 BIG-REQUESTS:Enable +R000 Composite:CompositeQueryVersion +R001 Composite:CompositeRedirectWindow +R002 Composite:CompositeRedirectSubwindows +R003 Composite:CompositeUnredirectWindow +R004 Composite:CompositeUnredirectSubwindows +R005 Composite:CompositeCreateRegionFromBorderClip +R006 Composite:CompositeNameWindowPixmap +R007 Composite:CompositeGetOverlayWindow +R008 Composite:CompositeReleaseOverlayWindow +R000 DAMAGE:QueryVersion +R001 DAMAGE:Create +R002 DAMAGE:Destroy +R003 DAMAGE:Subtract +R004 DAMAGE:Add +V000 DAMAGE:Notify +E000 DAMAGE:BadDamage +R000 DEC-XTRAP:Reset +R001 DEC-XTRAP:GetAvailable +R002 DEC-XTRAP:Config +R003 DEC-XTRAP:StartTrap +R004 DEC-XTRAP:StopTrap +R005 DEC-XTRAP:GetCurrent +R006 DEC-XTRAP:GetStatistics +R007 DEC-XTRAP:SimulateXEvent +R008 DEC-XTRAP:GetVersion +R009 DEC-XTRAP:GetLastInpTime +V000 DEC-XTRAP:Event +E002 DEC-XTRAP:BadIO +E004 DEC-XTRAP:BadStatistics +E005 DEC-XTRAP:BadDevices +E007 DEC-XTRAP:BadScreen +E008 DEC-XTRAP:BadSwapReq +R000 DMX:DMXQueryVersion +R001 DMX:DMXGetScreenCount +R002 DMX:DMXGetScreenInfoDEPRECATED +R003 DMX:DMXGetWindowAttributes +R004 DMX:DMXGetInputCount +R005 DMX:DMXGetInputAttributes +R006 DMX:DMXForceWindowCreationDEPRECATED +R007 DMX:DMXReconfigureScreenDEPRECATED +R008 DMX:DMXSync +R009 DMX:DMXForceWindowCreation +R010 DMX:DMXGetScreenAttributes +R011 DMX:DMXChangeScreensAttributes +R012 DMX:DMXAddScreen +R013 DMX:DMXRemoveScreen +R014 DMX:DMXGetDesktopAttributes +R015 DMX:DMXChangeDesktopAttributes +R016 DMX:DMXAddInput +R017 DMX:DMXRemoveInput +R000 DOUBLE-BUFFER:GetVersion +R001 DOUBLE-BUFFER:AllocateBackBufferName +R002 DOUBLE-BUFFER:DeallocateBackBufferName +R003 DOUBLE-BUFFER:SwapBuffers +R004 DOUBLE-BUFFER:BeginIdiom +R005 DOUBLE-BUFFER:EndIdiom +R006 DOUBLE-BUFFER:GetVisualInfo +R007 DOUBLE-BUFFER:GetBackBufferAttributes +E000 DOUBLE-BUFFER:BadBuffer +R000 DPMS:GetVersion +R001 DPMS:Capable +R002 DPMS:GetTimeouts +R003 DPMS:SetTimeouts +R004 DPMS:Enable +R005 DPMS:Disable +R006 DPMS:ForceLevel +R007 DPMS:Info +R000 Extended-Visual-Information:QueryVersion +R001 Extended-Visual-Information:GetVisualInfo +R000 FontCache:QueryVersion +R001 FontCache:GetCacheSettings +R002 FontCache:ChangeCacheSettings +R003 FontCache:GetCacheStatistics +E000 FontCache:BadProtocol +E001 FontCache:CannotAllocMemory +R001 GLX: +R002 GLX:Large +R003 GLX:CreateContext +R004 GLX:DestroyContext +R005 GLX:MakeCurrent +R006 GLX:IsDirect +R007 GLX:QueryVersion +R008 GLX:WaitGL +R009 GLX:WaitX +R010 GLX:CopyContext +R011 GLX:SwapBuffers +R012 GLX:UseXFont +R013 GLX:CreateGLXPixmap +R014 GLX:GetVisualConfigs +R015 GLX:DestroyGLXPixmap +R016 GLX:VendorPrivate +R017 GLX:VendorPrivateWithReply +R018 GLX:QueryExtensionsString +R019 GLX:QueryServerString +R020 GLX:ClientInfo +R101 GLX:NewList +R102 GLX:EndList +R103 GLX:DeleteLists +R104 GLX:GenLists +R105 GLX:FeedbackBuffer +R106 GLX:SelectBuffer +R107 GLX:Mode +R108 GLX:Finish +R109 GLX:PixelStoref +R110 GLX:PixelStorei +R111 GLX:ReadPixels +R112 GLX:GetBooleanv +R113 GLX:GetClipPlane +R114 GLX:GetDoublev +R115 GLX:GetError +R116 GLX:GetFloatv +R117 GLX:GetIntegerv +R118 GLX:GetLightfv +R119 GLX:GetLightiv +R120 GLX:GetMapdv +R121 GLX:GetMapfv +R122 GLX:GetMapiv +R123 GLX:GetMaterialfv +R124 GLX:GetMaterialiv +R125 GLX:GetPixelfv +R126 GLX:GetPixelMapuiv +R127 GLX:GetPixelMapusv +R128 GLX:GetPolygonStipple +R129 GLX:GetString +R130 GLX:GetTexEnvfv +R131 GLX:GetTexEnviv +R132 GLX:GetTexGendv +R133 GLX:GetTexGenfv +R134 GLX:GetTexGeniv +R135 GLX:GetTexImage +R136 GLX:GetTexParameterfv +R137 GLX:GetTexParameteriv +R138 GLX:GetTexLevelParameterfv +R139 GLX:GetTexLevelParameteriv +R140 GLX:IsEnabled +R141 GLX:IsList +R142 GLX:Flush +E000 GLX:BadContext +E001 GLX:BadContextState +E002 GLX:BadDrawable +E003 GLX:BadPixmap +E004 GLX:BadContextTag +E005 GLX:BadCurrentWindow +E006 GLX:BadRenderRequest +E007 GLX:BadLargeRequest +E008 GLX:UnsupportedPrivateRequest +R000 LBX:QueryVersion +R001 LBX:StartProxy +R002 LBX:StopProxy +R003 LBX:Switch +R004 LBX:NewClient +R005 LBX:CloseClient +R006 LBX:ModifySequence +R007 LBX:AllowMotion +R008 LBX:IncrementPixel +R009 LBX:Delta +R010 LBX:GetModifierMapping +R011 LBX:QueryTag +R012 LBX:InvalidateTag +R013 LBX:PolyPoint +R014 LBX:PolyLine +R015 LBX:PolySegment +R016 LBX:PolyRectangle +R017 LBX:PolyArc +R018 LBX:FillPoly +R019 LBX:PolyFillRectangle +R020 LBX:PolyFillArc +R021 LBX:GetKeyboardMapping +R022 LBX:QueryFont +R023 LBX:ChangeProperty +R024 LBX:GetProperty +R025 LBX:TagData +R026 LBX:CopyArea +R027 LBX:CopyPlane +R028 LBX:PolyText8 +R029 LBX:PolyText16 +R030 LBX:ImageText8 +R031 LBX:ImageText16 +R032 LBX:QueryExtension +R033 LBX:PutImage +R034 LBX:GetImage +R035 LBX:BeginLargeRequest +R036 LBX:LargeRequestData +R037 LBX:EndLargeRequest +R038 LBX:InternAtoms +R039 LBX:GetWinAttrAndGeom +R040 LBX:GrabCmap +R041 LBX:ReleaseCmap +R042 LBX:AllocColor +R043 LBX:Sync +E000 LBX:BadLbxClient +R000 MIT-SCREEN-SAVER:QueryVersion +R001 MIT-SCREEN-SAVER:QueryInfo +R002 MIT-SCREEN-SAVER:SelectInput +R003 MIT-SCREEN-SAVER:SetAttributes +R004 MIT-SCREEN-SAVER:UnsetAttributes +R005 MIT-SCREEN-SAVER:Suspend +V000 MIT-SCREEN-SAVER:Notify +R000 MIT-SHM:QueryVersion +R001 MIT-SHM:Attach +R002 MIT-SHM:Detach +R003 MIT-SHM:PutImage +R004 MIT-SHM:GetImage +R005 MIT-SHM:CreatePixmap +V000 MIT-SHM:Completion +E000 MIT-SHM:BadShmSeg +R000 MIT-SUNDRY-NONSTANDARD:SetBugMode +R001 MIT-SUNDRY-NONSTANDARD:GetBugMode +R000 Multi-Buffering:GetBufferVersion +R001 Multi-Buffering:CreateImageBuffers +R002 Multi-Buffering:DestroyImageBuffers +R003 Multi-Buffering:DisplayImageBuffers +R004 Multi-Buffering:SetMBufferAttributes +R005 Multi-Buffering:GetMBufferAttributes +R006 Multi-Buffering:SetBufferAttributes +R007 Multi-Buffering:GetBufferAttributes +R008 Multi-Buffering:GetBufferInfo +R009 Multi-Buffering:CreateStereoWindow +R010 Multi-Buffering:ClearImageBufferArea +V000 Multi-Buffering:ClobberNotify +V001 Multi-Buffering:UpdateNotify +E000 Multi-Buffering:BadBuffer +R000 RANDR:QueryVersion +R001 RANDR:OldGetScreenInfo +R002 RANDR:SetScreenConfig +R003 RANDR:OldScreenChangeSelectInput +R004 RANDR:SelectInput +R005 RANDR:GetScreenInfo +R006 RANDR:GetScreenSizeRange +R007 RANDR:SetScreenSize +R008 RANDR:GetScreenResources +R009 RANDR:GetOutputInfo +R010 RANDR:ListOutputProperties +R011 RANDR:QueryOutputProperty +R012 RANDR:ConfigureOutputProperty +R013 RANDR:ChangeOutputProperty +R014 RANDR:DeleteOutputProperty +R015 RANDR:GetOutputProperty +R016 RANDR:CreateMode +R017 RANDR:DestroyMode +R018 RANDR:AddOutputMode +R019 RANDR:DeleteOutputMode +R020 RANDR:GetCrtcInfo +R021 RANDR:SetCrtcConfig +R022 RANDR:GetCrtcGammaSize +R023 RANDR:GetCrtcGamma +R024 RANDR:SetCrtcGamma +V000 RANDR:ScreenChangeNotify +V001 RANDR:Notify +E000 RANDR:BadRROutput +E001 RANDR:BadRRCrtc +E002 RANDR:BadRRMode +R000 RECORD:QueryVersion +R001 RECORD:CreateContext +R002 RECORD:RegisterClients +R003 RECORD:UnregisterClients +R004 RECORD:GetContext +R005 RECORD:EnableContext +R006 RECORD:DisableContext +R007 RECORD:FreeContext +E000 RECORD:BadContext +R000 RENDER:QueryVersion +R001 RENDER:QueryPictFormats +R002 RENDER:QueryPictIndexValues +R003 RENDER:QueryDithers +R004 RENDER:CreatePicture +R005 RENDER:ChangePicture +R006 RENDER:SetPictureClipRectangles +R007 RENDER:FreePicture +R008 RENDER:Composite +R009 RENDER:Scale +R010 RENDER:Trapezoids +R011 RENDER:Triangles +R012 RENDER:TriStrip +R013 RENDER:TriFan +R014 RENDER:ColorTrapezoids +R015 RENDER:ColorTriangles +R016 RENDER:Transform +R017 RENDER:CreateGlyphSet +R018 RENDER:ReferenceGlyphSet +R019 RENDER:FreeGlyphSet +R020 RENDER:AddGlyphs +R021 RENDER:AddGlyphsFromPicture +R022 RENDER:FreeGlyphs +R023 RENDER:CompositeGlyphs8 +R024 RENDER:CompositeGlyphs16 +R025 RENDER:CompositeGlyphs32 +R026 RENDER:FillRectangles +R027 RENDER:CreateCursor +R028 RENDER:SetPictureTransform +R029 RENDER:QueryFilters +R030 RENDER:SetPictureFilter +R031 RENDER:CreateAnimCursor +R032 RENDER:AddTraps +R033 RENDER:CreateSolidFill +R034 RENDER:CreateLinearGradient +R035 RENDER:CreateRadialGradient +R036 RENDER:CreateConicalGradient +E000 RENDER:BadPictFormat +E001 RENDER:BadPicture +E002 RENDER:BadPictOp +E003 RENDER:BadGlyphSet +E004 RENDER:BadGlyph +R000 SECURITY:QueryVersion +R001 SECURITY:GenerateAuthorization +R002 SECURITY:RevokeAuthorization +V000 SECURITY:AuthorizationRevoked +E000 SECURITY:BadAuthorization +E001 SECURITY:BadAuthorizationProtocol +R000 SELinux:SELinuxQueryVersion +R001 SELinux:SELinuxSetSelectionManager +R002 SELinux:SELinuxGetSelectionManager +R003 SELinux:SELinuxSetDeviceContext +R004 SELinux:SELinuxGetDeviceContext +R005 SELinux:SELinuxSetPropertyCreateContext +R006 SELinux:SELinuxGetPropertyCreateContext +R007 SELinux:SELinuxGetPropertyContext +R008 SELinux:SELinuxSetWindowCreateContext +R009 SELinux:SELinuxGetWindowCreateContext +R010 SELinux:SELinuxGetWindowContext +R000 SHAPE:QueryVersion +R001 SHAPE:Rectangles +R002 SHAPE:Mask +R003 SHAPE:Combine +R004 SHAPE:Offset +R005 SHAPE:QueryExtents +R006 SHAPE:SelectInput +R007 SHAPE:InputSelected +R008 SHAPE:GetRectangles +V000 SHAPE:Notify +R000 SYNC:Initialize +R001 SYNC:ListSystemCounters +R002 SYNC:CreateCounter +R003 SYNC:SetCounter +R004 SYNC:ChangeCounter +R005 SYNC:QueryCounter +R006 SYNC:DestroyCounter +R007 SYNC:Await +R008 SYNC:CreateAlarm +R009 SYNC:ChangeAlarm +R010 SYNC:QueryAlarm +R011 SYNC:DestroyAlarm +R012 SYNC:SetPriority +R013 SYNC:GetPriority +V000 SYNC:CounterNotify +V001 SYNC:AlarmNotify +E000 SYNC:BadCounter +E001 SYNC:BadAlarm +R000 TOG-CUP:QueryVersion +R001 TOG-CUP:GetReservedColormapEntries +R002 TOG-CUP:StoreColors +R000 Windows-WM:QueryVersion +R001 Windows-WM:FrameGetRect +R002 Windows-WM:FrameDraw +R003 Windows-WM:FrameSetTitle +R004 Windows-WM:DisableUpdate +R005 Windows-WM:ReenableUpdate +R006 Windows-WM:SelectInput +R007 Windows-WM:SetFrontProcess +V000 Windows-WM:ControllerNotify +V001 Windows-WM:ActivationNotify +E000 Windows-WM:ClientNotLocal +E001 Windows-WM:OperationNotSupported +R000 X-Resource:QueryVersion +R001 X-Resource:QueryClients +R002 X-Resource:QueryClientResources +R003 X-Resource:QueryClientPixmapBytes +R001 X11:CreateWindow +R002 X11:ChangeWindowAttributes +R003 X11:GetWindowAttributes +R004 X11:DestroyWindow +R005 X11:DestroySubwindows +R006 X11:ChangeSaveSet +R007 X11:ReparentWindow +R008 X11:MapWindow +R009 X11:MapSubwindows +R010 X11:UnmapWindow +R011 X11:UnmapSubwindows +R012 X11:ConfigureWindow +R013 X11:CirculateWindow +R014 X11:GetGeometry +R015 X11:QueryTree +R016 X11:InternAtom +R017 X11:GetAtomName +R018 X11:ChangeProperty +R019 X11:DeleteProperty +R020 X11:GetProperty +R021 X11:ListProperties +R022 X11:SetSelectionOwner +R023 X11:GetSelectionOwner +R024 X11:ConvertSelection +R025 X11:SendEvent +R026 X11:GrabPointer +R027 X11:UngrabPointer +R028 X11:GrabButton +R029 X11:UngrabButton +R030 X11:ChangeActivePointerGrab +R031 X11:GrabKeyboard +R032 X11:UngrabKeyboard +R033 X11:GrabKey +R034 X11:UngrabKey +R035 X11:AllowEvents +R036 X11:GrabServer +R037 X11:UngrabServer +R038 X11:QueryPointer +R039 X11:GetMotionEvents +R040 X11:TranslateCoords +R041 X11:WarpPointer +R042 X11:SetInputFocus +R043 X11:GetInputFocus +R044 X11:QueryKeymap +R045 X11:OpenFont +R046 X11:CloseFont +R047 X11:QueryFont +R048 X11:QueryTextExtents +R049 X11:ListFonts +R050 X11:ListFontsWithInfo +R051 X11:SetFontPath +R052 X11:GetFontPath +R053 X11:CreatePixmap +R054 X11:FreePixmap +R055 X11:CreateGC +R056 X11:ChangeGC +R057 X11:CopyGC +R058 X11:SetDashes +R059 X11:SetClipRectangles +R060 X11:FreeGC +R061 X11:ClearArea +R062 X11:CopyArea +R063 X11:CopyPlane +R064 X11:PolyPoint +R065 X11:PolyLine +R066 X11:PolySegment +R067 X11:PolyRectangle +R068 X11:PolyArc +R069 X11:FillPoly +R070 X11:PolyFillRectangle +R071 X11:PolyFillArc +R072 X11:PutImage +R073 X11:GetImage +R074 X11:PolyText8 +R075 X11:PolyText16 +R076 X11:ImageText8 +R077 X11:ImageText16 +R078 X11:CreateColormap +R079 X11:FreeColormap +R080 X11:CopyColormapAndFree +R081 X11:InstallColormap +R082 X11:UninstallColormap +R083 X11:ListInstalledColormaps +R084 X11:AllocColor +R085 X11:AllocNamedColor +R086 X11:AllocColorCells +R087 X11:AllocColorPlanes +R088 X11:FreeColors +R089 X11:StoreColors +R090 X11:StoreNamedColor +R091 X11:QueryColors +R092 X11:LookupColor +R093 X11:CreateCursor +R094 X11:CreateGlyphCursor +R095 X11:FreeCursor +R096 X11:RecolorCursor +R097 X11:QueryBestSize +R098 X11:QueryExtension +R099 X11:ListExtensions +R100 X11:ChangeKeyboardMapping +R101 X11:GetKeyboardMapping +R102 X11:ChangeKeyboardControl +R103 X11:GetKeyboardControl +R104 X11:Bell +R105 X11:ChangePointerControl +R106 X11:GetPointerControl +R107 X11:SetScreenSaver +R108 X11:GetScreenSaver +R109 X11:ChangeHosts +R110 X11:ListHosts +R111 X11:SetAccessControl +R112 X11:SetCloseDownMode +R113 X11:KillClient +R114 X11:RotateProperties +R115 X11:ForceScreenSaver +R116 X11:SetPointerMapping +R117 X11:GetPointerMapping +R118 X11:SetModifierMapping +R119 X11:GetModifierMapping +R127 X11:NoOperation +V000 X11:X_Error +V001 X11:X_Reply +V002 X11:KeyPress +V003 X11:KeyRelease +V004 X11:ButtonPress +V005 X11:ButtonRelease +V006 X11:MotionNotify +V007 X11:EnterNotify +V008 X11:LeaveNotify +V009 X11:FocusIn +V010 X11:FocusOut +V011 X11:KeymapNotify +V012 X11:Expose +V013 X11:GraphicsExpose +V014 X11:NoExpose +V015 X11:VisibilityNotify +V016 X11:CreateNotify +V017 X11:DestroyNotify +V018 X11:UnmapNotify +V019 X11:MapNotify +V020 X11:MapRequest +V021 X11:ReparentNotify +V022 X11:ConfigureNotify +V023 X11:ConfigureRequest +V024 X11:GravityNotify +V025 X11:ResizeRequest +V026 X11:CirculateNotify +V027 X11:CirculateRequest +V028 X11:PropertyNotify +V029 X11:SelectionClear +V030 X11:SelectionRequest +V031 X11:SelectionNotify +V032 X11:ColormapNotify +V033 X11:ClientMessage +V034 X11:MappingNotify +E000 X11:Success +E001 X11:BadRequest +E002 X11:BadValue +E003 X11:BadWindow +E004 X11:BadPixmap +E005 X11:BadAtom +E006 X11:BadCursor +E007 X11:BadFont +E008 X11:BadMatch +E009 X11:BadDrawable +E010 X11:BadAccess +E011 X11:BadAlloc +E012 X11:BadColor +E013 X11:BadGC +E014 X11:BadIDChoice +E015 X11:BadName +E016 X11:BadLength +E017 X11:BadImplementation +R001 X3D-PEX:GetExtensionInfo +R002 X3D-PEX:GetEnumeratedTypeInfo +R003 X3D-PEX:GetImpDepConstants +R004 X3D-PEX:CreateLookupTable +R005 X3D-PEX:CopyLookupTable +R006 X3D-PEX:FreeLookupTable +R007 X3D-PEX:GetTableInfo +R008 X3D-PEX:GetPredefinedEntries +R009 X3D-PEX:GetDefinedIndices +R010 X3D-PEX:GetTableEntry +R011 X3D-PEX:GetTableEntries +R012 X3D-PEX:SetTableEntries +R013 X3D-PEX:DeleteTableEntries +R014 X3D-PEX:CreatePipelineContext +R015 X3D-PEX:CopyPipelineContext +R016 X3D-PEX:FreePipelineContext +R017 X3D-PEX:GetPipelineContext +R018 X3D-PEX:ChangePipelineContext +R019 X3D-PEX:CreateRenderer +R020 X3D-PEX:FreeRenderer +R021 X3D-PEX:ChangeRenderer +R022 X3D-PEX:GetRendererAttributes +R023 X3D-PEX:GetRendererDynamics +R024 X3D-PEX:BeginRendering +R025 X3D-PEX:EndRendering +R026 X3D-PEX:BeginStructure +R027 X3D-PEX:EndStructure +R028 X3D-PEX:OutputCommands +R029 X3D-PEX:Network +R030 X3D-PEX:CreateStructure +R031 X3D-PEX:CopyStructure +R032 X3D-PEX:DestroyStructures +R033 X3D-PEX:GetStructureInfo +R034 X3D-PEX:GetElementInfo +R035 X3D-PEX:GetStructuresInNetwork +R036 X3D-PEX:GetAncestors +R037 X3D-PEX:GetDescendants +R038 X3D-PEX:FetchElements +R039 X3D-PEX:SetEditingMode +R040 X3D-PEX:SetElementPointer +R041 X3D-PEX:SetElementPointerAtLabel +R042 X3D-PEX:ElementSearch +R043 X3D-PEX:StoreElements +R044 X3D-PEX:DeleteElements +R045 X3D-PEX:DeleteElementsToLabel +R046 X3D-PEX:DeleteBetweenLabels +R047 X3D-PEX:CopyElements +R048 X3D-PEX:ChangeStructureRefs +R049 X3D-PEX:CreateNameSet +R050 X3D-PEX:CopyNameSet +R051 X3D-PEX:FreeNameSet +R052 X3D-PEX:GetNameSet +R053 X3D-PEX:ChangeNameSet +R054 X3D-PEX:CreateSearchContext +R055 X3D-PEX:CopySearchContext +R056 X3D-PEX:FreeSearchContext +R057 X3D-PEX:GetSearchContext +R058 X3D-PEX:ChangeSearchContext +R059 X3D-PEX:SearchNetwork +R060 X3D-PEX:CreatePhigsWks +R061 X3D-PEX:FreePhigsWks +R062 X3D-PEX:GetWksInfo +R063 X3D-PEX:GetDynamics +R064 X3D-PEX:GetViewRep +R065 X3D-PEX:RedrawAllStructures +R066 X3D-PEX:UpdateWorkstation +R067 X3D-PEX:RedrawClipRegion +R068 X3D-PEX:ExecuteDeferredActions +R069 X3D-PEX:SetViewPriority +R070 X3D-PEX:SetDisplayUpdateMode +R071 X3D-PEX:MapDCtoWC +R072 X3D-PEX:MapWCtoDC +R073 X3D-PEX:SetViewRep +R074 X3D-PEX:SetWksWindow +R075 X3D-PEX:SetWksViewport +R076 X3D-PEX:SetHlhsrMode +R077 X3D-PEX:SetWksBufferMode +R078 X3D-PEX:PostStructure +R079 X3D-PEX:UnpostStructure +R080 X3D-PEX:UnpostAllStructures +R081 X3D-PEX:GetWksPostings +R082 X3D-PEX:GetPickDevice +R083 X3D-PEX:ChangePickDevice +R084 X3D-PEX:CreatePickMeasure +R085 X3D-PEX:FreePickMeasure +R086 X3D-PEX:GetPickMeasure +R087 X3D-PEX:UpdatePickMeasure +R088 X3D-PEX:OpenFont +R089 X3D-PEX:CloseFont +R090 X3D-PEX:QueryFont +R091 X3D-PEX:ListFonts +R092 X3D-PEX:ListFontsWithInfo +R093 X3D-PEX:QueryTextExtents +R094 X3D-PEX:MatchRenderingTargets +R095 X3D-PEX:Escape +R096 X3D-PEX:EscapeWithReply +R097 X3D-PEX:Elements +R098 X3D-PEX:AccumulateState +R099 X3D-PEX:BeginPickOne +R100 X3D-PEX:EndPickOne +R101 X3D-PEX:PickOne +R102 X3D-PEX:BeginPickAll +R103 X3D-PEX:EndPickAll +R104 X3D-PEX:PickAll +E000 X3D-PEX:ColorTypeError +E001 X3D-PEX:erStateError +E002 X3D-PEX:FloatingPointFormatError +E003 X3D-PEX:LabelError +E004 X3D-PEX:LookupTableError +E005 X3D-PEX:NameSetError +E006 X3D-PEX:PathError +E007 X3D-PEX:FontError +E008 X3D-PEX:PhigsWksError +E009 X3D-PEX:PickMeasureError +E010 X3D-PEX:PipelineContextError +E011 X3D-PEX:erError +E012 X3D-PEX:SearchContextError +E013 X3D-PEX:StructureError +E014 X3D-PEX:OutputCommandError +R000 XC-APPGROUP:QueryVersion +R001 XC-APPGROUP:Create +R002 XC-APPGROUP:Destroy +R003 XC-APPGROUP:GetAttr +R004 XC-APPGROUP:Query +R005 XC-APPGROUP:CreateAssoc +R006 XC-APPGROUP:DestroyAssoc +E000 XC-APPGROUP:BadAppGroup +R000 XC-MISC:GetVersion +R001 XC-MISC:GetXIDRange +R002 XC-MISC:GetXIDList +R000 XEVIE:QueryVersion +R001 XEVIE:Start +R002 XEVIE:End +R003 XEVIE:Send +R004 XEVIE:SelectInput +R000 XFIXES:QueryVersion +R001 XFIXES:ChangeSaveSet +R002 XFIXES:SelectSelectionInput +R003 XFIXES:SelectCursorInput +R004 XFIXES:GetCursorImage +R005 XFIXES:CreateRegion +R006 XFIXES:CreateRegionFromBitmap +R007 XFIXES:CreateRegionFromWindow +R008 XFIXES:CreateRegionFromGC +R009 XFIXES:CreateRegionFromPicture +R010 XFIXES:DestroyRegion +R011 XFIXES:SetRegion +R012 XFIXES:CopyRegion +R013 XFIXES:UnionRegion +R014 XFIXES:IntersectRegion +R015 XFIXES:SubtractRegion +R016 XFIXES:InvertRegion +R017 XFIXES:TranslateRegion +R018 XFIXES:RegionExtents +R019 XFIXES:FetchRegion +R020 XFIXES:SetGCClipRegion +R021 XFIXES:SetWindowShapeRegion +R022 XFIXES:SetPictureClipRegion +R023 XFIXES:SetCursorName +R024 XFIXES:GetCursorName +R025 XFIXES:GetCursorImageAndName +R026 XFIXES:ChangeCursor +R027 XFIXES:ChangeCursorByName +R028 XFIXES:ExpandRegion +R029 XFIXES:HideCursor +R030 XFIXES:ShowCursor +V000 XFIXES:SelectionNotify +V001 XFIXES:CursorNotify +E000 XFIXES:BadRegion +R000 XFree86-Bigfont:QueryVersion +R001 XFree86-Bigfont:QueryFont +R000 XFree86-DGA:QueryVersion +R001 XFree86-DGA:GetVideoLL +R002 XFree86-DGA:DirectVideo +R003 XFree86-DGA:GetViewPortSize +R004 XFree86-DGA:SetViewPort +R005 XFree86-DGA:GetVidPage +R006 XFree86-DGA:SetVidPage +R007 XFree86-DGA:InstallColormap +R008 XFree86-DGA:QueryDirectVideo +R009 XFree86-DGA:ViewPortChanged +R010 XFree86-DGA:Obsolete1 +R011 XFree86-DGA:Obsolete2 +R012 XFree86-DGA:QueryModes +R013 XFree86-DGA:SetMode +R014 XFree86-DGA:SetViewport +R015 XFree86-DGA:InstallColormap +R016 XFree86-DGA:SelectInput +R017 XFree86-DGA:FillRectangle +R018 XFree86-DGA:CopyArea +R019 XFree86-DGA:CopyTransparentArea +R020 XFree86-DGA:GetViewportStatus +R021 XFree86-DGA:Sync +R022 XFree86-DGA:OpenFramebuffer +R023 XFree86-DGA:CloseFramebuffer +R024 XFree86-DGA:SetClientVersion +R025 XFree86-DGA:ChangePixmapMode +R026 XFree86-DGA:CreateColormap +E000 XFree86-DGA:ClientNotLocal +E001 XFree86-DGA:NoDirectVideoMode +E002 XFree86-DGA:ScreenNotActive +E003 XFree86-DGA:DirectNotActivated +E004 XFree86-DGA:OperationNotSupported +R000 XFree86-DRI:QueryVersion +R001 XFree86-DRI:QueryDirectRenderingCapable +R002 XFree86-DRI:OpenConnection +R003 XFree86-DRI:CloseConnection +R004 XFree86-DRI:GetClientDriverName +R005 XFree86-DRI:CreateContext +R006 XFree86-DRI:DestroyContext +R007 XFree86-DRI:CreateDrawable +R008 XFree86-DRI:DestroyDrawable +R009 XFree86-DRI:GetDrawableInfo +R010 XFree86-DRI:GetDeviceInfo +R011 XFree86-DRI:AuthConnection +R012 XFree86-DRI:OpenFullScreen +R013 XFree86-DRI:CloseFullScreen +E000 XFree86-DRI:ClientNotLocal +E001 XFree86-DRI:OperationNotSupported +R000 XFree86-Misc:QueryVersion +R001 XFree86-Misc:GetSaver +R002 XFree86-Misc:SetSaver +R003 XFree86-Misc:GetMouseSettings +R004 XFree86-Misc:GetKbdSettings +R005 XFree86-Misc:SetMouseSettings +R006 XFree86-Misc:SetKbdSettings +R007 XFree86-Misc:SetGrabKeysState +R008 XFree86-Misc:SetClientVersion +R009 XFree86-Misc:GetFilePaths +R010 XFree86-Misc:PassMessage +E000 XFree86-Misc:BadMouseProtocol +E001 XFree86-Misc:BadMouseBaudRate +E002 XFree86-Misc:BadMouseFlags +E003 XFree86-Misc:BadMouseCombo +E004 XFree86-Misc:BadKbdType +E005 XFree86-Misc:ModInDevDisabled +E006 XFree86-Misc:ModInDevClientNotLocal +E007 XFree86-Misc:NoModule +R000 XFree86-VidModeExtension:QueryVersion +R001 XFree86-VidModeExtension:GetModeLine +R002 XFree86-VidModeExtension:ModModeLine +R003 XFree86-VidModeExtension:SwitchMode +R004 XFree86-VidModeExtension:GetMonitor +R005 XFree86-VidModeExtension:LockModeSwitch +R006 XFree86-VidModeExtension:GetAllModeLines +R007 XFree86-VidModeExtension:AddModeLine +R008 XFree86-VidModeExtension:DeleteModeLine +R009 XFree86-VidModeExtension:ValidateModeLine +R010 XFree86-VidModeExtension:SwitchToMode +R011 XFree86-VidModeExtension:GetViewPort +R012 XFree86-VidModeExtension:SetViewPort +R013 XFree86-VidModeExtension:GetDotClocks +R014 XFree86-VidModeExtension:SetClientVersion +R015 XFree86-VidModeExtension:SetGamma +R016 XFree86-VidModeExtension:GetGamma +R017 XFree86-VidModeExtension:GetGammaRamp +R018 XFree86-VidModeExtension:SetGammaRamp +R019 XFree86-VidModeExtension:GetGammaRampSize +R020 XFree86-VidModeExtension:GetPermissions +V000 XFree86-VidModeExtension:Notify +E000 XFree86-VidModeExtension:BadClock +E001 XFree86-VidModeExtension:BadHTimings +E002 XFree86-VidModeExtension:BadVTimings +E003 XFree86-VidModeExtension:ModeUnsuitable +E004 XFree86-VidModeExtension:ExtensionDisabled +E005 XFree86-VidModeExtension:ClientNotLocal +E006 XFree86-VidModeExtension:ZoomLocked +R001 XIE:QueryImageExtension +R002 XIE:QueryTechniques +R003 XIE:CreateColorList +R004 XIE:DestroyColorList +R005 XIE:PurgeColorList +R006 XIE:QueryColorList +R007 XIE:CreateLUT +R008 XIE:DestroyLUT +R009 XIE:CreatePhotomap +R010 XIE:DestroyPhotomap +R011 XIE:QueryPhotomap +R012 XIE:CreateROI +R013 XIE:DestroyROI +R014 XIE:CreatePhotospace +R015 XIE:DestroyPhotospace +R016 XIE:ExecuteImmediate +R017 XIE:CreatePhotoflo +R018 XIE:DestroyPhotoflo +R019 XIE:ExecutePhotoflo +R020 XIE:ModifyPhotoflo +R021 XIE:RedefinePhotoflo +R022 XIE:PutClientData +R023 XIE:GetClientData +R024 XIE:QueryPhotoflo +R025 XIE:Await +R026 XIE:Abort +E000 XIE:ColorListError +E001 XIE:LUTError +E002 XIE:PhotofloError +E003 XIE:PhotomapError +E004 XIE:PhotospaceError +E005 XIE:ROIError +E006 XIE:FloError +R000 XINERAMA:QueryVersion +R001 XINERAMA:GetState +R002 XINERAMA:GetScreenCount +R003 XINERAMA:GetScreenSize +R004 XINERAMA:IsActive +R005 XINERAMA:QueryScreens +R001 XInputExtension:GetExtensionVersion +R002 XInputExtension:ListInputDevices +R003 XInputExtension:OpenDevice +R004 XInputExtension:CloseDevice +R005 XInputExtension:SetDeviceMode +R006 XInputExtension:SelectExtensionEvent +R007 XInputExtension:GetSelectedExtensionEvents +R008 XInputExtension:ChangeDeviceDontPropagateList +R009 XInputExtension:GetDeviceDontPropagageList +R010 XInputExtension:GetDeviceMotionEvents +R011 XInputExtension:ChangeKeyboardDevice +R012 XInputExtension:ChangePointerDevice +R013 XInputExtension:GrabDevice +R014 XInputExtension:UngrabDevice +R015 XInputExtension:GrabDeviceKey +R016 XInputExtension:UngrabDeviceKey +R017 XInputExtension:GrabDeviceButton +R018 XInputExtension:UngrabDeviceButton +R019 XInputExtension:AllowDeviceEvents +R020 XInputExtension:GetDeviceFocus +R021 XInputExtension:SetDeviceFocus +R022 XInputExtension:GetFeedbackControl +R023 XInputExtension:ChangeFeedbackControl +R024 XInputExtension:GetDeviceKeyMapping +R025 XInputExtension:ChangeDeviceKeyMapping +R026 XInputExtension:GetDeviceModifierMapping +R027 XInputExtension:SetDeviceModifierMapping +R028 XInputExtension:GetDeviceButtonMapping +R029 XInputExtension:SetDeviceButtonMapping +R030 XInputExtension:QueryDeviceState +R031 XInputExtension:SendExtensionEvent +R032 XInputExtension:DeviceBell +R033 XInputExtension:SetDeviceValuators +R034 XInputExtension:GetDeviceControl +R035 XInputExtension:ChangeDeviceControl +V000 XInputExtension:DeviceValuator +V001 XInputExtension:DeviceKeyPress +V002 XInputExtension:DeviceKeyRelease +V003 XInputExtension:DeviceButtonPress +V004 XInputExtension:DeviceButtonRelease +V005 XInputExtension:DeviceMotionNotify +V006 XInputExtension:DeviceFocusIn +V007 XInputExtension:DeviceFocusOut +V008 XInputExtension:ProximityIn +V009 XInputExtension:ProximityOut +V010 XInputExtension:DeviceStateNotify +V011 XInputExtension:DeviceMappingNotify +V012 XInputExtension:ChangeDeviceNotify +V013 XInputExtension:DeviceKeystateNotify +V014 XInputExtension:DeviceButtonstateNotify +V015 XInputExtension:DevicePresenceNotify +E000 XInputExtension:BadDevice +E001 XInputExtension:BadEvent +E002 XInputExtension:BadMode +E003 XInputExtension:DeviceBusy +E004 XInputExtension:BadClass +R000 XKEYBOARD:UseExtension +R001 XKEYBOARD:SelectEvents +R002 XKEYBOARD:Obsolete +R003 XKEYBOARD:Bell +R004 XKEYBOARD:GetState +R005 XKEYBOARD:LatchLockState +R006 XKEYBOARD:GetControls +R007 XKEYBOARD:SetControls +R008 XKEYBOARD:GetMap +R009 XKEYBOARD:SetMap +R010 XKEYBOARD:GetCompatMap +R011 XKEYBOARD:SetCompatMap +R012 XKEYBOARD:GetIndicatorState +R013 XKEYBOARD:GetIndicatorMap +R014 XKEYBOARD:SetIndicatorMap +R015 XKEYBOARD:GetNamedIndicator +R016 XKEYBOARD:SetNamedIndicator +R017 XKEYBOARD:GetNames +R018 XKEYBOARD:SetNames +R019 XKEYBOARD:GetGeometry +R020 XKEYBOARD:SetGeometry +R021 XKEYBOARD:PerClientFlags +R022 XKEYBOARD:ListComponents +R023 XKEYBOARD:GetKbdByName +R024 XKEYBOARD:GetDeviceInfo +R025 XKEYBOARD:SetDeviceInfo +R101 XKEYBOARD:SetDebuggingFlags +V000 XKEYBOARD:EventCode +E000 XKEYBOARD:BadKeyboard +R000 XTEST:GetVersion +R001 XTEST:CompareCursor +R002 XTEST:FakeInput +R003 XTEST:GrabControl +R000 XVideo:QueryExtension +R001 XVideo:QueryAdaptors +R002 XVideo:QueryEncodings +R003 XVideo:GrabPort +R004 XVideo:UngrabPort +R005 XVideo:PutVideo +R006 XVideo:PutStill +R007 XVideo:GetVideo +R008 XVideo:GetStill +R009 XVideo:StopVideo +R010 XVideo:SelectVideoNotify +R011 XVideo:SelectPortNotify +R012 XVideo:QueryBestSize +R013 XVideo:SetPortAttribute +R014 XVideo:GetPortAttribute +R015 XVideo:QueryPortAttributes +R016 XVideo:ListImageFormats +R017 XVideo:QueryImageAttributes +R018 XVideo:PutImage +R019 XVideo:ShmPutImage +V000 XVideo:VideoNotify +V001 XVideo:PortNotify +E000 XVideo:BadPort +E001 XVideo:BadEncoding +E002 XVideo:BadControl +R000 XVideo-MotionCompensation:QueryVersion +R001 XVideo-MotionCompensation:ListSurfaceTypes +R002 XVideo-MotionCompensation:CreateContext +R003 XVideo-MotionCompensation:DestroyContext +R004 XVideo-MotionCompensation:CreateSurface +R005 XVideo-MotionCompensation:DestroySurface +R006 XVideo-MotionCompensation:CreateSubpicture +R007 XVideo-MotionCompensation:DestroySubpicture +R008 XVideo-MotionCompensation:ListSubpictureTypes +R009 XVideo-MotionCompensation:GetDRInfo +E000 XVideo-MotionCompensation:BadContext +E001 XVideo-MotionCompensation:BadSurface +E002 XVideo-MotionCompensation:BadSubpicture +R000 XpExtension:QueryVersion +R001 XpExtension:GetPrinterList +R002 XpExtension:CreateContext +R003 XpExtension:SetContext +R004 XpExtension:GetContext +R005 XpExtension:DestroyContext +R006 XpExtension:GetContextScreen +R007 XpExtension:StartJob +R008 XpExtension:EndJob +R009 XpExtension:StartDoc +R010 XpExtension:EndDoc +R011 XpExtension:PutDocumentData +R012 XpExtension:GetDocumentData +R013 XpExtension:StartPage +R014 XpExtension:EndPage +R015 XpExtension:SelectInput +R016 XpExtension:InputSelected +R017 XpExtension:GetAttributes +R018 XpExtension:SetAttributes +R019 XpExtension:GetOneAttribute +R020 XpExtension:RehashPrinterList +R021 XpExtension:GetPageDimensions +R022 XpExtension:QueryScreens +R023 XpExtension:SetImageResolution +R024 XpExtension:GetImageResolution +V000 XpExtension:PrintNotify +V001 XpExtension:AttributeNotify +E000 XpExtension:BadContext +E001 XpExtension:BadSequence +E002 XpExtension:BadResourceID From decd5a7c605e42c99b6a4523c8e1833b859d9b24 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 26 Nov 2007 15:26:49 -0500 Subject: [PATCH 253/552] registry: Rebase registry to use the server config file of protocol names. --- dix/extension.c | 2 + dix/registry.c | 323 +++++++++++++++---------------------- hw/xfree86/loader/dixsym.c | 3 - include/registry.h | 13 +- 4 files changed, 135 insertions(+), 206 deletions(-) diff --git a/dix/extension.c b/dix/extension.c index 0e97976db..42fdc125f 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -60,6 +60,7 @@ SOFTWARE. #include "scrnintstr.h" #include "dispatch.h" #include "privates.h" +#include "registry.h" #include "xace.h" #define EXTENSION_BASE 128 @@ -143,6 +144,7 @@ AddExtension(char *name, int NumEvents, int NumErrors, ext->errorLast = 0; } + RegisterExtensionNames(ext); return(ext); } diff --git a/dix/registry.c b/dix/registry.c index 1cf7fa59e..02b42d46a 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -23,17 +23,30 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef XREGISTRY +#include +#include #include #include #include "resource.h" #include "registry.h" #define BASE_SIZE 16 -#define CORE "X11:" +#define CORE "X11" +#define FILENAME SERVER_MISC_CONFIG_PATH "/protocol.txt" -static const char ***requests, **events, **errors, **resources; +#define PROT_COMMENT '#' +#define PROT_REQUEST 'R' +#define PROT_EVENT 'V' +#define PROT_ERROR 'E' + +static FILE *fh; + +static char ***requests, **events, **errors, **resources; static unsigned nmajor, *nminor, nevent, nerror, nresource; +/* + * File parsing routines + */ static int double_size(void *p, unsigned n, unsigned size) { char **ptr = (char **)p; @@ -57,58 +70,131 @@ static int double_size(void *p, unsigned n, unsigned size) return TRUE; } -/* - * Registration functions - */ - -void -RegisterRequestName(unsigned major, unsigned minor, const char *name) +static void +RegisterRequestName(unsigned major, unsigned minor, char *name) { while (major >= nmajor) { - if (!double_size(&requests, nmajor, sizeof(const char **))) + if (!double_size(&requests, nmajor, sizeof(char **))) return; if (!double_size(&nminor, nmajor, sizeof(unsigned))) return; nmajor = nmajor ? nmajor * 2 : BASE_SIZE; } while (minor >= nminor[major]) { - if (!double_size(requests+major, nminor[major], sizeof(const char *))) + if (!double_size(requests+major, nminor[major], sizeof(char *))) return; nminor[major] = nminor[major] ? nminor[major] * 2 : BASE_SIZE; } + free(requests[major][minor]); requests[major][minor] = name; } -void -RegisterEventName(unsigned event, const char *name) { +static void +RegisterEventName(unsigned event, char *name) { while (event >= nevent) { - if (!double_size(&events, nevent, sizeof(const char *))) + if (!double_size(&events, nevent, sizeof(char *))) return; nevent = nevent ? nevent * 2 : BASE_SIZE; } + free(events[event]); events[event] = name; } -void -RegisterErrorName(unsigned error, const char *name) { +static void +RegisterErrorName(unsigned error, char *name) { while (error >= nerror) { - if (!double_size(&errors, nerror, sizeof(const char *))) + if (!double_size(&errors, nerror, sizeof(char *))) return; nerror = nerror ? nerror * 2 : BASE_SIZE; } + free(errors[error]); errors[error] = name; } void -RegisterResourceName(RESTYPE resource, const char *name) +RegisterExtensionNames(ExtensionEntry *extEntry) +{ + char buf[256], *lineobj, *ptr; + unsigned offset; + + if (fh == NULL) + return; + + rewind(fh); + + while (fgets(buf, sizeof(buf), fh)) { + ptr = strchr(buf, '\n'); + if (ptr) + *ptr = 0; + + switch (buf[0]) { + case PROT_REQUEST: + case PROT_EVENT: + case PROT_ERROR: + break; + case PROT_COMMENT: + case '\0': + continue; + default: + continue; + } + + ptr = strchr(buf, ' '); + if (!ptr || ptr != buf + 4) { + LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n"); + continue; + } + lineobj = strdup(ptr + 1); + if (!lineobj) + continue; + + ptr = strchr(buf, ':'); + if (!ptr) { + LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n"); + continue; + } + *ptr = 0; + + if (strcmp(buf + 5, extEntry->name)) + continue; + + offset = strtol(buf + 1, &ptr, 10); + if (offset == 0 && ptr == buf + 1) { + LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n"); + continue; + } + + switch(buf[0]) { + case PROT_REQUEST: + if (extEntry->base) + RegisterRequestName(extEntry->base, offset, lineobj); + else + RegisterRequestName(offset, 0, lineobj); + break; + case PROT_EVENT: + RegisterEventName(extEntry->eventBase + offset, lineobj); + break; + case PROT_ERROR: + RegisterErrorName(extEntry->errorBase + offset, lineobj); + break; + } + } +} + +/* + * Registration functions + */ + +void +RegisterResourceName(RESTYPE resource, char *name) { resource &= TypeMask; while (resource >= nresource) { - if (!double_size(&resources, nresource, sizeof(const char *))) + if (!double_size(&resources, nresource, sizeof(char *))) return; nresource = nresource ? nresource * 2 : BASE_SIZE; } @@ -166,13 +252,25 @@ LookupResourceName(RESTYPE resource) void dixResetRegistry(void) { + ExtensionEntry extEntry; + /* Free all memory */ - while (nmajor) - xfree(requests[--nmajor]); + while (nmajor--) { + while (nminor[nmajor]) + free(requests[nmajor][--nminor[nmajor]]); + xfree(requests[nmajor]); + } xfree(requests); xfree(nminor); + + while (nevent--) + free(events[nevent]); xfree(events); + + while (nerror--) + free(errors[nerror]); xfree(errors); + xfree(resources); requests = NULL; @@ -183,6 +281,13 @@ dixResetRegistry(void) nmajor = nevent = nerror = nresource = 0; + /* Open the protocol file */ + if (fh) + fclose(fh); + fh = fopen(FILENAME, "r"); + if (!fh) + LogMessage(X_WARNING, "Failed to open protocol names file " FILENAME); + /* Add built-in resources */ RegisterResourceName(RT_NONE, "NONE"); RegisterResourceName(RT_WINDOW, "WINDOW"); @@ -196,181 +301,9 @@ dixResetRegistry(void) RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); /* Add the core protocol */ - RegisterRequestName(X_CreateWindow, 0, CORE "CreateWindow"); - RegisterRequestName(X_ChangeWindowAttributes, 0, CORE "ChangeWindowAttributes"); - RegisterRequestName(X_GetWindowAttributes, 0, CORE "GetWindowAttributes"); - RegisterRequestName(X_DestroyWindow, 0, CORE "DestroyWindow"); - RegisterRequestName(X_DestroySubwindows, 0, CORE "DestroySubwindows"); - RegisterRequestName(X_ChangeSaveSet, 0, CORE "ChangeSaveSet"); - RegisterRequestName(X_ReparentWindow, 0, CORE "ReparentWindow"); - RegisterRequestName(X_MapWindow, 0, CORE "MapWindow"); - RegisterRequestName(X_MapSubwindows, 0, CORE "MapSubwindows"); - RegisterRequestName(X_UnmapWindow, 0, CORE "UnmapWindow"); - RegisterRequestName(X_UnmapSubwindows, 0, CORE "UnmapSubwindows"); - RegisterRequestName(X_ConfigureWindow, 0, CORE "ConfigureWindow"); - RegisterRequestName(X_CirculateWindow, 0, CORE "CirculateWindow"); - RegisterRequestName(X_GetGeometry, 0, CORE "GetGeometry"); - RegisterRequestName(X_QueryTree, 0, CORE "QueryTree"); - RegisterRequestName(X_InternAtom, 0, CORE "InternAtom"); - RegisterRequestName(X_GetAtomName, 0, CORE "GetAtomName"); - RegisterRequestName(X_ChangeProperty, 0, CORE "ChangeProperty"); - RegisterRequestName(X_DeleteProperty, 0, CORE "DeleteProperty"); - RegisterRequestName(X_GetProperty, 0, CORE "GetProperty"); - RegisterRequestName(X_ListProperties, 0, CORE "ListProperties"); - RegisterRequestName(X_SetSelectionOwner, 0, CORE "SetSelectionOwner"); - RegisterRequestName(X_GetSelectionOwner, 0, CORE "GetSelectionOwner"); - RegisterRequestName(X_ConvertSelection, 0, CORE "ConvertSelection"); - RegisterRequestName(X_SendEvent, 0, CORE "SendEvent"); - RegisterRequestName(X_GrabPointer, 0, CORE "GrabPointer"); - RegisterRequestName(X_UngrabPointer, 0, CORE "UngrabPointer"); - RegisterRequestName(X_GrabButton, 0, CORE "GrabButton"); - RegisterRequestName(X_UngrabButton, 0, CORE "UngrabButton"); - RegisterRequestName(X_ChangeActivePointerGrab, 0, CORE "ChangeActivePointerGrab"); - RegisterRequestName(X_GrabKeyboard, 0, CORE "GrabKeyboard"); - RegisterRequestName(X_UngrabKeyboard, 0, CORE "UngrabKeyboard"); - RegisterRequestName(X_GrabKey, 0, CORE "GrabKey"); - RegisterRequestName(X_UngrabKey, 0, CORE "UngrabKey"); - RegisterRequestName(X_AllowEvents, 0, CORE "AllowEvents"); - RegisterRequestName(X_GrabServer, 0, CORE "GrabServer"); - RegisterRequestName(X_UngrabServer, 0, CORE "UngrabServer"); - RegisterRequestName(X_QueryPointer, 0, CORE "QueryPointer"); - RegisterRequestName(X_GetMotionEvents, 0, CORE "GetMotionEvents"); - RegisterRequestName(X_TranslateCoords, 0, CORE "TranslateCoords"); - RegisterRequestName(X_WarpPointer, 0, CORE "WarpPointer"); - RegisterRequestName(X_SetInputFocus, 0, CORE "SetInputFocus"); - RegisterRequestName(X_GetInputFocus, 0, CORE "GetInputFocus"); - RegisterRequestName(X_QueryKeymap, 0, CORE "QueryKeymap"); - RegisterRequestName(X_OpenFont, 0, CORE "OpenFont"); - RegisterRequestName(X_CloseFont, 0, CORE "CloseFont"); - RegisterRequestName(X_QueryFont, 0, CORE "QueryFont"); - RegisterRequestName(X_QueryTextExtents, 0, CORE "QueryTextExtents"); - RegisterRequestName(X_ListFonts, 0, CORE "ListFonts"); - RegisterRequestName(X_ListFontsWithInfo, 0, CORE "ListFontsWithInfo"); - RegisterRequestName(X_SetFontPath, 0, CORE "SetFontPath"); - RegisterRequestName(X_GetFontPath, 0, CORE "GetFontPath"); - RegisterRequestName(X_CreatePixmap, 0, CORE "CreatePixmap"); - RegisterRequestName(X_FreePixmap, 0, CORE "FreePixmap"); - RegisterRequestName(X_CreateGC, 0, CORE "CreateGC"); - RegisterRequestName(X_ChangeGC, 0, CORE "ChangeGC"); - RegisterRequestName(X_CopyGC, 0, CORE "CopyGC"); - RegisterRequestName(X_SetDashes, 0, CORE "SetDashes"); - RegisterRequestName(X_SetClipRectangles, 0, CORE "SetClipRectangles"); - RegisterRequestName(X_FreeGC, 0, CORE "FreeGC"); - RegisterRequestName(X_ClearArea, 0, CORE "ClearArea"); - RegisterRequestName(X_CopyArea, 0, CORE "CopyArea"); - RegisterRequestName(X_CopyPlane, 0, CORE "CopyPlane"); - RegisterRequestName(X_PolyPoint, 0, CORE "PolyPoint"); - RegisterRequestName(X_PolyLine, 0, CORE "PolyLine"); - RegisterRequestName(X_PolySegment, 0, CORE "PolySegment"); - RegisterRequestName(X_PolyRectangle, 0, CORE "PolyRectangle"); - RegisterRequestName(X_PolyArc, 0, CORE "PolyArc"); - RegisterRequestName(X_FillPoly, 0, CORE "FillPoly"); - RegisterRequestName(X_PolyFillRectangle, 0, CORE "PolyFillRectangle"); - RegisterRequestName(X_PolyFillArc, 0, CORE "PolyFillArc"); - RegisterRequestName(X_PutImage, 0, CORE "PutImage"); - RegisterRequestName(X_GetImage, 0, CORE "GetImage"); - RegisterRequestName(X_PolyText8, 0, CORE "PolyText8"); - RegisterRequestName(X_PolyText16, 0, CORE "PolyText16"); - RegisterRequestName(X_ImageText8, 0, CORE "ImageText8"); - RegisterRequestName(X_ImageText16, 0, CORE "ImageText16"); - RegisterRequestName(X_CreateColormap, 0, CORE "CreateColormap"); - RegisterRequestName(X_FreeColormap, 0, CORE "FreeColormap"); - RegisterRequestName(X_CopyColormapAndFree, 0, CORE "CopyColormapAndFree"); - RegisterRequestName(X_InstallColormap, 0, CORE "InstallColormap"); - RegisterRequestName(X_UninstallColormap, 0, CORE "UninstallColormap"); - RegisterRequestName(X_ListInstalledColormaps, 0, CORE "ListInstalledColormaps"); - RegisterRequestName(X_AllocColor, 0, CORE "AllocColor"); - RegisterRequestName(X_AllocNamedColor, 0, CORE "AllocNamedColor"); - RegisterRequestName(X_AllocColorCells, 0, CORE "AllocColorCells"); - RegisterRequestName(X_AllocColorPlanes, 0, CORE "AllocColorPlanes"); - RegisterRequestName(X_FreeColors, 0, CORE "FreeColors"); - RegisterRequestName(X_StoreColors, 0, CORE "StoreColors"); - RegisterRequestName(X_StoreNamedColor, 0, CORE "StoreNamedColor"); - RegisterRequestName(X_QueryColors, 0, CORE "QueryColors"); - RegisterRequestName(X_LookupColor, 0, CORE "LookupColor"); - RegisterRequestName(X_CreateCursor, 0, CORE "CreateCursor"); - RegisterRequestName(X_CreateGlyphCursor, 0, CORE "CreateGlyphCursor"); - RegisterRequestName(X_FreeCursor, 0, CORE "FreeCursor"); - RegisterRequestName(X_RecolorCursor, 0, CORE "RecolorCursor"); - RegisterRequestName(X_QueryBestSize, 0, CORE "QueryBestSize"); - RegisterRequestName(X_QueryExtension, 0, CORE "QueryExtension"); - RegisterRequestName(X_ListExtensions, 0, CORE "ListExtensions"); - RegisterRequestName(X_ChangeKeyboardMapping, 0, CORE "ChangeKeyboardMapping"); - RegisterRequestName(X_GetKeyboardMapping, 0, CORE "GetKeyboardMapping"); - RegisterRequestName(X_ChangeKeyboardControl, 0, CORE "ChangeKeyboardControl"); - RegisterRequestName(X_GetKeyboardControl, 0, CORE "GetKeyboardControl"); - RegisterRequestName(X_Bell, 0, CORE "Bell"); - RegisterRequestName(X_ChangePointerControl, 0, CORE "ChangePointerControl"); - RegisterRequestName(X_GetPointerControl, 0, CORE "GetPointerControl"); - RegisterRequestName(X_SetScreenSaver, 0, CORE "SetScreenSaver"); - RegisterRequestName(X_GetScreenSaver, 0, CORE "GetScreenSaver"); - RegisterRequestName(X_ChangeHosts, 0, CORE "ChangeHosts"); - RegisterRequestName(X_ListHosts, 0, CORE "ListHosts"); - RegisterRequestName(X_SetAccessControl, 0, CORE "SetAccessControl"); - RegisterRequestName(X_SetCloseDownMode, 0, CORE "SetCloseDownMode"); - RegisterRequestName(X_KillClient, 0, CORE "KillClient"); - RegisterRequestName(X_RotateProperties, 0, CORE "RotateProperties"); - RegisterRequestName(X_ForceScreenSaver, 0, CORE "ForceScreenSaver"); - RegisterRequestName(X_SetPointerMapping, 0, CORE "SetPointerMapping"); - RegisterRequestName(X_GetPointerMapping, 0, CORE "GetPointerMapping"); - RegisterRequestName(X_SetModifierMapping, 0, CORE "SetModifierMapping"); - RegisterRequestName(X_GetModifierMapping, 0, CORE "GetModifierMapping"); - RegisterRequestName(X_NoOperation, 0, CORE "NoOperation"); - - RegisterErrorName(Success, CORE "Success"); - RegisterErrorName(BadRequest, CORE "BadRequest"); - RegisterErrorName(BadValue, CORE "BadValue"); - RegisterErrorName(BadWindow, CORE "BadWindow"); - RegisterErrorName(BadPixmap, CORE "BadPixmap"); - RegisterErrorName(BadAtom, CORE "BadAtom"); - RegisterErrorName(BadCursor, CORE "BadCursor"); - RegisterErrorName(BadFont, CORE "BadFont"); - RegisterErrorName(BadMatch, CORE "BadMatch"); - RegisterErrorName(BadDrawable, CORE "BadDrawable"); - RegisterErrorName(BadAccess, CORE "BadAccess"); - RegisterErrorName(BadAlloc, CORE "BadAlloc"); - RegisterErrorName(BadColor, CORE "BadColor"); - RegisterErrorName(BadGC, CORE "BadGC"); - RegisterErrorName(BadIDChoice, CORE "BadIDChoice"); - RegisterErrorName(BadName, CORE "BadName"); - RegisterErrorName(BadLength, CORE "BadLength"); - RegisterErrorName(BadImplementation, CORE "BadImplementation"); - - RegisterEventName(X_Error, CORE "Error"); - RegisterEventName(X_Reply, CORE "Reply"); - RegisterEventName(KeyPress, CORE "KeyPress"); - RegisterEventName(KeyRelease, CORE "KeyRelease"); - RegisterEventName(ButtonPress, CORE "ButtonPress"); - RegisterEventName(ButtonRelease, CORE "ButtonRelease"); - RegisterEventName(MotionNotify, CORE "MotionNotify"); - RegisterEventName(EnterNotify, CORE "EnterNotify"); - RegisterEventName(LeaveNotify, CORE "LeaveNotify"); - RegisterEventName(FocusIn, CORE "FocusIn"); - RegisterEventName(FocusOut, CORE "FocusOut"); - RegisterEventName(KeymapNotify, CORE "KeymapNotify"); - RegisterEventName(Expose, CORE "Expose"); - RegisterEventName(GraphicsExpose, CORE "GraphicsExpose"); - RegisterEventName(NoExpose, CORE "NoExpose"); - RegisterEventName(VisibilityNotify, CORE "VisibilityNotify"); - RegisterEventName(CreateNotify, CORE "CreateNotify"); - RegisterEventName(DestroyNotify, CORE "DestroyNotify"); - RegisterEventName(UnmapNotify, CORE "UnmapNotify"); - RegisterEventName(MapNotify, CORE "MapNotify"); - RegisterEventName(MapRequest, CORE "MapRequest"); - RegisterEventName(ReparentNotify, CORE "ReparentNotify"); - RegisterEventName(ConfigureNotify, CORE "ConfigureNotify"); - RegisterEventName(ConfigureRequest, CORE "ConfigureRequest"); - RegisterEventName(GravityNotify, CORE "GravityNotify"); - RegisterEventName(ResizeRequest, CORE "ResizeRequest"); - RegisterEventName(CirculateNotify, CORE "CirculateNotify"); - RegisterEventName(CirculateRequest, CORE "CirculateRequest"); - RegisterEventName(PropertyNotify, CORE "PropertyNotify"); - RegisterEventName(SelectionClear, CORE "SelectionClear"); - RegisterEventName(SelectionRequest, CORE "SelectionRequest"); - RegisterEventName(SelectionNotify, CORE "SelectionNotify"); - RegisterEventName(ColormapNotify, CORE "ColormapNotify"); - RegisterEventName(ClientMessage, CORE "ClientMessage"); - RegisterEventName(MappingNotify, CORE "MappingNotify"); + memset(&extEntry, 0, sizeof(extEntry)); + extEntry.name = CORE; + RegisterExtensionNames(&extEntry); } #endif /* XREGISTRY */ diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 1a259f5e8..79cc6e79e 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -288,9 +288,6 @@ _X_HIDDEN void *dixLookupTab[] = { SYMVAR(ResourceStateCallback) /* registry.c */ #ifdef XREGISTRY - SYMFUNC(RegisterRequestName) - SYMFUNC(RegisterEventName) - SYMFUNC(RegisterErrorName) SYMFUNC(RegisterResourceName) #endif /* swaprep.c */ diff --git a/include/registry.h b/include/registry.h index d57f32d2d..90c3de367 100644 --- a/include/registry.h +++ b/include/registry.h @@ -15,6 +15,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef XREGISTRY #include "resource.h" +#include "extnsionst.h" /* Internal string registry - for auditing, debugging, security, etc. */ @@ -22,13 +23,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Registration functions. The name string is not copied, so it must * not be a stack variable. */ -void RegisterRequestName(unsigned major, unsigned minor, const char *name); -void RegisterEventName(unsigned event, const char *name); -void RegisterErrorName(unsigned error, const char *name); -void RegisterResourceName(RESTYPE type, const char *name); +void RegisterResourceName(RESTYPE type, char *name); +void RegisterExtensionNames(ExtensionEntry *ext); /* - * Lookup functions. The returned string must not be modified. + * Lookup functions. The returned string must not be modified or freed. */ const char *LookupRequestName(int major, int minor); const char *LookupEventName(int event); @@ -49,10 +48,8 @@ void dixResetRegistry(void); /* Define calls away when the registry is not being built. */ -#define RegisterRequestName(a, b, c) { ; } -#define RegisterEventName(a, b) { ; } -#define RegisterErrorName(a, b) { ; } #define RegisterResourceName(a, b) { ; } +#define RegisterExtensionNames(a) { ; } #define LookupRequestName(a, b) XREGISTRY_UNKNOWN #define LookupEventName(a) XREGISTRY_UNKNOWN From 54cb729ecc2d366c1af836cb3d2ffc8e864e9b79 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 26 Nov 2007 15:59:01 -0500 Subject: [PATCH 254/552] registry: Add a call for DTRACE compatibility. --- dix/registry.c | 19 +++++++++++++++++++ hw/xfree86/loader/dixsym.c | 5 +++++ include/registry.h | 2 ++ 3 files changed, 26 insertions(+) diff --git a/dix/registry.c b/dix/registry.c index 02b42d46a..10fa21f84 100644 --- a/dix/registry.c +++ b/dix/registry.c @@ -217,6 +217,25 @@ LookupRequestName(int major, int minor) return requests[major][minor] ? requests[major][minor] : XREGISTRY_UNKNOWN; } +const char * +LookupMajorName(int major) +{ + if (major < 128) { + const char *retval; + + if (major >= nmajor) + return XREGISTRY_UNKNOWN; + if (0 >= nminor[major]) + return XREGISTRY_UNKNOWN; + + retval = requests[major][0]; + return retval ? retval + sizeof(CORE) : XREGISTRY_UNKNOWN; + } else { + ExtensionEntry *extEntry = GetExtensionEntry(major); + return extEntry ? extEntry->name : XREGISTRY_UNKNOWN; + } +} + const char * LookupEventName(int event) { diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c index 79cc6e79e..49c7d271b 100644 --- a/hw/xfree86/loader/dixsym.c +++ b/hw/xfree86/loader/dixsym.c @@ -289,6 +289,11 @@ _X_HIDDEN void *dixLookupTab[] = { /* registry.c */ #ifdef XREGISTRY SYMFUNC(RegisterResourceName) + SYMFUNC(LookupMajorName) + SYMFUNC(LookupRequestName) + SYMFUNC(LookupEventName) + SYMFUNC(LookupErrorName) + SYMFUNC(LookupResourceName) #endif /* swaprep.c */ SYMFUNC(CopySwap32Write) diff --git a/include/registry.h b/include/registry.h index 90c3de367..edd6ef9a7 100644 --- a/include/registry.h +++ b/include/registry.h @@ -29,6 +29,7 @@ void RegisterExtensionNames(ExtensionEntry *ext); /* * Lookup functions. The returned string must not be modified or freed. */ +const char *LookupMajorName(int major); const char *LookupRequestName(int major, int minor); const char *LookupEventName(int event); const char *LookupErrorName(int error); @@ -51,6 +52,7 @@ void dixResetRegistry(void); #define RegisterResourceName(a, b) { ; } #define RegisterExtensionNames(a) { ; } +#define LookupMajorName(a) XREGISTRY_UNKNOWN #define LookupRequestName(a, b) XREGISTRY_UNKNOWN #define LookupEventName(a) XREGISTRY_UNKNOWN #define LookupErrorName(a) XREGISTRY_UNKNOWN From 996b621bec1bbc4fb21970c75eaec62053bc6ccb Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 26 Nov 2007 15:59:44 -0500 Subject: [PATCH 255/552] registry: swap out the DTRACE XErrorDB stuff for the new registry call. --- configure.ac | 7 ---- dix/dispatch.c | 75 ++--------------------------------------- dix/extension.c | 14 -------- include/dix-config.h.in | 3 -- 4 files changed, 2 insertions(+), 97 deletions(-) diff --git a/configure.ac b/configure.ac index d78bc1c33..042cfdd4e 100644 --- a/configure.ac +++ b/configure.ac @@ -90,13 +90,6 @@ if test "x$WDTRACE" != "xno" ; then fi AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"]) -# DTrace support uses XErrorDB to get request names -AC_ARG_WITH(xerrordb, - AS_HELP_STRING([--with-xerrordb=PATH], [Path to XErrorDB file (default: ${datadir}/X11/XErrorDB)]), - [ XERRORDB_PATH="$withval" ], - [ XERRORDB_PATH="${datadir}/X11/XErrorDB" ]) -AC_DEFINE_DIR(XERRORDB_PATH, XERRORDB_PATH, [Path to XErrorDB file]) - AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) diff --git a/dix/dispatch.c b/dix/dispatch.c index dcd4b530f..919bcda50 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -148,14 +148,7 @@ int ProcInitialConnection(); #endif #ifdef XSERVER_DTRACE -#include -typedef const char *string; #include "Xserver-dtrace.h" - -char *RequestNames[256]; -static void LoadRequestNames(void); -static void FreeRequestNames(void); -#define GetRequestName(i) (RequestNames[i]) #endif #define mskcnt ((MAXCLIENTS + 31) / 32) @@ -383,10 +376,6 @@ Dispatch(void) if (!clientReady) return; -#ifdef XSERVER_DTRACE - LoadRequestNames(); -#endif - while (!dispatchException) { if (*icheck[0] != *icheck[1]) @@ -464,7 +453,7 @@ Dispatch(void) client->requestLogIndex++; #endif #ifdef XSERVER_DTRACE - XSERVER_REQUEST_START(GetRequestName(MAJOROP), MAJOROP, + XSERVER_REQUEST_START(LookupMajorName(MAJOROP), MAJOROP, ((xReq *)client->requestBuffer)->length, client->index, client->requestBuffer); #endif @@ -476,7 +465,7 @@ Dispatch(void) XaceHookAuditEnd(client, result); } #ifdef XSERVER_DTRACE - XSERVER_REQUEST_DONE(GetRequestName(MAJOROP), MAJOROP, + XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP, client->sequence, client->index, result); #endif @@ -510,9 +499,6 @@ Dispatch(void) KillAllClients(); xfree(clientReady); dispatchException &= ~DE_RESET; -#ifdef XSERVER_DTRACE - FreeRequestNames(); -#endif } #undef MAJOROP @@ -4045,60 +4031,3 @@ MarkClientException(ClientPtr client) { client->noClientException = -1; } - -#ifdef XSERVER_DTRACE -#include - -/* Load table of request names for dtrace probes */ -static void LoadRequestNames(void) -{ - int i; - FILE *xedb; - extern void LoadExtensionNames(char **RequestNames); - - bzero(RequestNames, 256 * sizeof(char *)); - - xedb = fopen(XERRORDB_PATH, "r"); - if (xedb != NULL) { - char buf[256]; - while (fgets(buf, sizeof(buf), xedb)) { - if ((strncmp("XRequest.", buf, 9) == 0) && (isdigit(buf[9]))) { - char *name; - i = strtol(buf + 9, &name, 10); - if (RequestNames[i] == 0) { - char *end = strchr(name, '\n'); - if (end) { *end = '\0'; } - RequestNames[i] = strdup(name + 1); - } - } - } - fclose(xedb); - } - - LoadExtensionNames(RequestNames); - - for (i = 0; i < 256; i++) { - if (RequestNames[i] == 0) { -#define RN_SIZE 12 /* "Request#' + up to 3 digits + \0 */ - RequestNames[i] = xalloc(RN_SIZE); - if (RequestNames[i]) { - snprintf(RequestNames[i], RN_SIZE, "Request#%d", i); - } - } - /* fprintf(stderr, "%d: %s\n", i, RequestNames[i]); */ - } -} - -static void FreeRequestNames(void) -{ - int i; - - for (i = 0; i < 256; i++) { - if (RequestNames[i] != 0) { - free(RequestNames[i]); - RequestNames[i] = 0; - } - } -} - -#endif diff --git a/dix/extension.c b/dix/extension.c index 42fdc125f..9740c1b50 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -354,17 +354,3 @@ ProcListExtensions(ClientPtr client) } return(client->noClientException); } - -#ifdef XSERVER_DTRACE -void LoadExtensionNames(char **RequestNames) { - int i; - - for (i=0; ibase; - - if (RequestNames[r] == NULL) { - RequestNames[r] = strdup(extensions[i]->name); - } - } -} -#endif diff --git a/include/dix-config.h.in b/include/dix-config.h.in index c4429628e..2af994f4f 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -500,9 +500,6 @@ /* Define to 1 if the DTrace Xserver provider probes should be built in */ #undef XSERVER_DTRACE -/* Path to XErrorDB file */ -#undef XERRORDB_PATH - /* Define to 16-bit byteswap macro */ #undef bswap_16 From 8503072e1c2b89dca786d4afb72aa60a170d2fbd Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 26 Nov 2007 16:52:41 -0500 Subject: [PATCH 256/552] registry: add missing include statement. --- dix/dispatch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dix/dispatch.c b/dix/dispatch.c index 919bcda50..577e17cf0 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -148,6 +148,7 @@ int ProcInitialConnection(); #endif #ifdef XSERVER_DTRACE +#include "registry.h" #include "Xserver-dtrace.h" #endif From b84f2833a681585162b8dabfb02ff62e7e0ef4d6 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 3 Dec 2007 14:52:17 -0800 Subject: [PATCH 257/552] xf86getpagesize() -> getpagesize() in os-support/solaris/sun_bios.c --- hw/xfree86/os-support/solaris/sun_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/solaris/sun_bios.c b/hw/xfree86/os-support/solaris/sun_bios.c index 1fae9759c..a27a5a5a7 100644 --- a/hw/xfree86/os-support/solaris/sun_bios.c +++ b/hw/xfree86/os-support/solaris/sun_bios.c @@ -62,7 +62,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, * * Use /dev/xsvc for everything. */ - psize = xf86getpagesize(); + psize = getpagesize(); Offset += Base & (psize - 1); Base &= ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1); From fe25f897c62bb324660217e15dbd3091c808dbba Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 3 Dec 2007 18:34:40 -0500 Subject: [PATCH 258/552] xf86getpagesize -> getpagesize elsewhere in os-support/ --- hw/xfree86/os-support/bsd/alpha_video.c | 2 +- hw/xfree86/os-support/bsd/arm_video.c | 2 +- hw/xfree86/os-support/bsd/i386_video.c | 2 +- hw/xfree86/os-support/bus/Sbus.c | 2 +- hw/xfree86/os-support/bus/sparcPci.c | 2 +- hw/xfree86/os-support/bus/zx1PCI.c | 2 +- hw/xfree86/os-support/shared/bios_mmap.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/xfree86/os-support/bsd/alpha_video.c b/hw/xfree86/os-support/bsd/alpha_video.c index a1b19d0f6..523c4488e 100644 --- a/hw/xfree86/os-support/bsd/alpha_video.c +++ b/hw/xfree86/os-support/bsd/alpha_video.c @@ -368,7 +368,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, return(-1); } - psize = xf86getpagesize(); + psize = getpagesize(); Offset += Base & (psize - 1); Base &= ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1); diff --git a/hw/xfree86/os-support/bsd/arm_video.c b/hw/xfree86/os-support/bsd/arm_video.c index b556563d3..23948b5d6 100644 --- a/hw/xfree86/os-support/bsd/arm_video.c +++ b/hw/xfree86/os-support/bsd/arm_video.c @@ -246,7 +246,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, return(-1); } - psize = xf86getpagesize(); + psize = getpagesize(); Offset += Base & (psize - 1); Base &= ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1); diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c index e7db6c10e..42b905483 100644 --- a/hw/xfree86/os-support/bsd/i386_video.c +++ b/hw/xfree86/os-support/bsd/i386_video.c @@ -301,7 +301,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, return(-1); } - psize = xf86getpagesize(); + psize = getpagesize(); Offset += Base & (psize - 1); Base &= ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1); diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c index c864e3385..2f0043f4c 100644 --- a/hw/xfree86/os-support/bus/Sbus.c +++ b/hw/xfree86/os-support/bus/Sbus.c @@ -559,7 +559,7 @@ _X_EXPORT pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) { pointer ret; - unsigned long pagemask = xf86getpagesize() - 1; + unsigned long pagemask = getpagesize() - 1; unsigned long off = offset & ~pagemask; unsigned long len = ((offset + size + pagemask) & ~pagemask) - off; diff --git a/hw/xfree86/os-support/bus/sparcPci.c b/hw/xfree86/os-support/bus/sparcPci.c index 6f7113f15..2d8039c29 100644 --- a/hw/xfree86/os-support/bus/sparcPci.c +++ b/hw/xfree86/os-support/bus/sparcPci.c @@ -270,7 +270,7 @@ sparcPciInit(void) } sparcPromInit(); - pagemask = xf86getpagesize() - 1; + pagemask = getpagesize() - 1; for (node = promGetChild(promRootNode); node; diff --git a/hw/xfree86/os-support/bus/zx1PCI.c b/hw/xfree86/os-support/bus/zx1PCI.c index 561fbd9f7..d78e0c434 100644 --- a/hw/xfree86/os-support/bus/zx1PCI.c +++ b/hw/xfree86/os-support/bus/zx1PCI.c @@ -469,7 +469,7 @@ void xf86PreScanZX1(void) { resRange range; - unsigned long mapSize = xf86getpagesize(); + unsigned long mapSize = getpagesize(); unsigned long tmp, base, ioaaddr; unsigned long flagsd, based, lastd, maskd, routed; unsigned long flags0, base0, last0, mask0, route0; diff --git a/hw/xfree86/os-support/shared/bios_mmap.c b/hw/xfree86/os-support/shared/bios_mmap.c index 51d429948..8bac87ebe 100644 --- a/hw/xfree86/os-support/shared/bios_mmap.c +++ b/hw/xfree86/os-support/shared/bios_mmap.c @@ -137,7 +137,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, return(-1); } - psize = xf86getpagesize(); + psize = getpagesize(); Offset += Base & (psize - 1); Base &= ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1); From a9df4bb555fd91707a68794c2dce24fb06e6cf64 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 4 Dec 2007 12:17:29 +1100 Subject: [PATCH 259/552] xf86Crtc: pass correct parameter. quite how this has worked I've no idea. --- hw/xfree86/modes/xf86Crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index fc80f5202..a237a4c24 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2186,7 +2186,7 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus) xf86MonPtr mon; mon = xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus); - xf86DDCApplyQuirks (scrn->scrnIndex, pDDCBus); + xf86DDCApplyQuirks (scrn->scrnIndex, mon); return mon; } From 678f786715d76e972f8a77807c9caf3e90c24418 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 4 Dec 2007 12:24:47 +1100 Subject: [PATCH 260/552] xf86crtc: oh mon could be NULL, so check before quirks --- hw/xfree86/modes/xf86Crtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index a237a4c24..e00fdf3f3 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2186,7 +2186,8 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus) xf86MonPtr mon; mon = xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus); - xf86DDCApplyQuirks (scrn->scrnIndex, mon); + if (mon) + xf86DDCApplyQuirks (scrn->scrnIndex, mon); return mon; } From f8d7729df388c142624def36ba6d8c3b15922018 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 3 Dec 2007 20:20:05 -0800 Subject: [PATCH 261/552] Darwin: Combine launcher and server X11.app This should hopefully eliminate confusion some people have over which X11.app is which. Now BOTH are in /A/U/X11.app and we intelligently determine whether to execute our app_to_run or launch the server. If arguments are given, we launch the server. Otherwise if we can connect to an X DISPLAY, we execute app_to_run. Otherwise, we launch the server. (cherry picked from commit e7026216ccaa8e4fb073800ba947c9909d4faada) --- configure.ac | 1 - hw/darwin/Makefile.am | 2 +- hw/darwin/apple/Makefile.am | 7 +- hw/darwin/apple/X11.xcodeproj/project.pbxproj | 9 +- hw/darwin/apple/bundle-main.c | 922 +----------------- .../bundle-main.c => apple/launcher-main.c} | 2 +- hw/darwin/apple/org.x.X11.plist | 25 + hw/darwin/apple/server-main.c | 904 +++++++++++++++++ hw/darwin/launcher/Info.plist | 30 - hw/darwin/launcher/Makefile.am | 18 - hw/darwin/launcher/X11.icns | Bin 65908 -> 0 bytes .../launcher/X11.xcodeproj/project.pbxproj | 290 ------ 12 files changed, 995 insertions(+), 1215 deletions(-) rename hw/darwin/{launcher/bundle-main.c => apple/launcher-main.c} (98%) create mode 100644 hw/darwin/apple/org.x.X11.plist create mode 100644 hw/darwin/apple/server-main.c delete mode 100644 hw/darwin/launcher/Info.plist delete mode 100644 hw/darwin/launcher/Makefile.am delete mode 100644 hw/darwin/launcher/X11.icns delete mode 100644 hw/darwin/launcher/X11.xcodeproj/project.pbxproj diff --git a/configure.ac b/configure.ac index 618a9c4ed..5b21e69da 100644 --- a/configure.ac +++ b/configure.ac @@ -2172,7 +2172,6 @@ hw/xnest/Makefile hw/xwin/Makefile hw/darwin/Makefile hw/darwin/apple/Makefile -hw/darwin/launcher/Makefile hw/darwin/quartz/Makefile hw/darwin/quartz/xpr/Makefile hw/kdrive/Makefile diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index 1faedcbef..136c41a0a 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -6,7 +6,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/miext/rootless if X11APP -X11APP_SUBDIRS = apple launcher +X11APP_SUBDIRS = apple endif SUBDIRS = quartz utils $(X11APP_SUBDIRS) diff --git a/hw/darwin/apple/Makefile.am b/hw/darwin/apple/Makefile.am index 02a2c25b1..a6e2dfbf9 100644 --- a/hw/darwin/apple/Makefile.am +++ b/hw/darwin/apple/Makefile.am @@ -6,15 +6,20 @@ x11app: xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)" install-data-hook: - xcodebuild install DSTROOT=$(DESTDIR) INSTALL_PATH=$(prefix) DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" + xcodebuild install DSTROOT="/$(DESTDIR)" INSTALL_PATH="$(APPLE_APPLICATIONS_DIR)" DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" + $(MKDIR_P) "$(DESTDIR)/System/Library/LaunchAgents/" + $(INSTALL) org.x.X11.plist "$(DESTDIR)/System/Library/LaunchAgents/" clean-local: rm -rf build EXTRA_DIST = \ + org.x.X11.plist \ Info.plist \ X11.icns \ bundle-main.c \ + launcher-main.c \ + server-main.c \ English.lproj/InfoPlist.strings \ English.lproj/Localizable.strings \ English.lproj/main.nib/classes.nib \ diff --git a/hw/darwin/apple/X11.xcodeproj/project.pbxproj b/hw/darwin/apple/X11.xcodeproj/project.pbxproj index 217f07e52..225f371c5 100644 --- a/hw/darwin/apple/X11.xcodeproj/project.pbxproj +++ b/hw/darwin/apple/X11.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 3F5E1BE00D04BF110020CA24 /* launcher-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 3F5E1BDE0D04BF110020CA24 /* launcher-main.c */; }; + 3F5E1BE10D04BF110020CA24 /* server-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 3F5E1BDF0D04BF110020CA24 /* server-main.c */; }; 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; }; 527F241A0B5D938C007840A7 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; }; 527F241B0B5D938C007840A7 /* X11.icns in Resources */ = {isa = PBXBuildFile; fileRef = 50459C5F038587C60ECA21EC /* X11.icns */; }; @@ -20,6 +22,8 @@ /* Begin PBXFileReference section */ 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = ""; }; + 3F5E1BDE0D04BF110020CA24 /* launcher-main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "launcher-main.c"; sourceTree = ""; }; + 3F5E1BDF0D04BF110020CA24 /* server-main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "server-main.c"; sourceTree = ""; }; 50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = ""; }; 50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = ""; }; 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; @@ -65,6 +69,8 @@ 20286C2AFDCF999611CA2CEA /* Sources */ = { isa = PBXGroup; children = ( + 3F5E1BDE0D04BF110020CA24 /* launcher-main.c */, + 3F5E1BDF0D04BF110020CA24 /* server-main.c */, 50EE2AB703849F0B0ECA21EC /* bundle-main.c */, ); name = Sources; @@ -133,7 +139,6 @@ mainGroup = 20286C29FDCF999611CA2CEA /* X11 */; projectDirPath = ""; projectRoot = ""; - shouldCheckCompatibility = 1; targets = ( 527F24160B5D938C007840A7 /* X11 */, ); @@ -171,6 +176,8 @@ buildActionMask = 2147483647; files = ( 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */, + 3F5E1BE00D04BF110020CA24 /* launcher-main.c in Sources */, + 3F5E1BE10D04BF110020CA24 /* server-main.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/hw/darwin/apple/bundle-main.c b/hw/darwin/apple/bundle-main.c index 10d2f2041..c436d51bb 100644 --- a/hw/darwin/apple/bundle-main.c +++ b/hw/darwin/apple/bundle-main.c @@ -1,6 +1,7 @@ -/* bundle-main.c -- X server launcher +/* main.c -- X application launcher - Copyright (c) 2002-2007 Apple Inc. All rights reserved. + Copyright (c) 2007 Jeremy Huddleston + Copyright (c) 2007 Apple Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files @@ -25,880 +26,57 @@ Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without - prior written authorization. - - Parts of this file are derived from xdm, which has this copyright: - - Copyright 1988, 1998 The Open Group - - Permission to use, copy, modify, distribute, and sell this software - and its documentation for any purpose is hereby granted without fee, - provided that the above copyright notice appear in all copies and - that both that copyright notice and this permission notice appear in - supporting documentation. - - The above copyright notice and this permission notice 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 - NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP 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. - - Except as contained in this notice, the name of The Open Group shall - not be used in advertising or otherwise to promote the sale, use or - other dealings in this Software without prior written authorization - from The Open Group. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + prior written authorization. */ #include -#include -#include +#include +#include +#include -#include -#include +int launcher_main(int argc, char **argv); +int server_main(int argc, char **argv); -#define X_SERVER "/usr/X11/bin/Xquartz" -#define XTERM_PATH "/usr/X11/bin/xterm" -#define WM_PATH "/usr/bin/quartz-wm" -#define DEFAULT_XINITRC "/usr/X11/lib/X11/xinit/xinitrc" -#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin" - -/* what xinit does */ -#ifndef SHELL -# define SHELL "sh" -#endif - -#undef FALSE -#define FALSE 0 -#undef TRUE -#define TRUE 1 - -#define MAX_DISPLAYS 64 - -static int server_pid = -1, client_pid = -1; -static int xinit_kills_server = FALSE; -static jmp_buf exit_continuation; -static const char *server_name = NULL; -static Display *server_dpy; - -static char *auth_file; - -typedef struct addr_list_struct addr_list; - -struct addr_list_struct { - addr_list *next; - Xauth auth; -}; - -static addr_list *addresses; - - -/* Utility functions. */ - -/* Return the current host name. Matches what Xlib does. */ -static char * -host_name (void) -{ -#ifdef NEED_UTSNAME - static struct utsname name; - - uname(&name); - - return name.nodename; -#else - static char buf[100]; - - gethostname(buf, sizeof(buf)); - - return buf; -#endif -} - -static int -read_boolean_pref (CFStringRef name, int default_) -{ - int value; - Boolean ok; - - value = CFPreferencesGetAppBooleanValue (name, - CFSTR ("com.apple.x11"), &ok); - return ok ? value : default_; -} - -static inline int -binary_equal (const void *a, const void *b, int length) -{ - return memcmp (a, b, length) == 0; -} - -static inline void * -binary_dup (const void *a, int length) -{ - void *b = malloc (length); - if (b != NULL) - memcpy (b, a, length); - return b; -} - -static inline void -binary_free (void *data, int length) -{ - if (data != NULL) - free (data); -} - - -/* Functions for managing the authentication entries. */ - -/* Returns true if something matching AUTH is in our list of auth items */ -static int -check_auth_item (Xauth *auth) -{ - addr_list *a; - - for (a = addresses; a != NULL; a = a->next) - { - if (a->auth.family == auth->family - && a->auth.address_length == auth->address_length - && binary_equal (a->auth.address, auth->address, auth->address_length) - && a->auth.number_length == auth->number_length - && binary_equal (a->auth.number, auth->number, auth->number_length) - && a->auth.name_length == auth->name_length - && binary_equal (a->auth.name, auth->name, auth->name_length)) - { - return TRUE; - } +int main(int argc, char **argv) { + Display *display; + + fprintf(stderr, "X11.app: main(): argc=%d\n", argc); + int i; + for(i=0; i < argc; i++) { + fprintf(stderr, "\targv[%d] = %s\n", i, argv[i]); } - - return FALSE; -} - -/* Add one item to our list of auth items. */ -static void -add_auth_item (Xauth *auth) -{ - addr_list *a = malloc (sizeof (addr_list)); - - a->auth.family = auth->family; - a->auth.address_length = auth->address_length; - a->auth.address = binary_dup (auth->address, auth->address_length); - a->auth.number_length = auth->number_length; - a->auth.number = binary_dup (auth->number, auth->number_length); - a->auth.name_length = auth->name_length; - a->auth.name = binary_dup (auth->name, auth->name_length); - a->auth.data_length = auth->data_length; - a->auth.data = binary_dup (auth->data, auth->data_length); - - a->next = addresses; - addresses = a; -} - -/* Free all allocated auth items. */ -static void -free_auth_items (void) -{ - addr_list *a; - - while ((a = addresses) != NULL) - { - addresses = a->next; - - binary_free (a->auth.address, a->auth.address_length); - binary_free (a->auth.number, a->auth.number_length); - binary_free (a->auth.name, a->auth.name_length); - binary_free (a->auth.data, a->auth.data_length); - free (a); - } -} - -/* Add the unix domain auth item. */ -static void -define_local (Xauth *auth) -{ - char *host = host_name (); - -#ifdef DEBUG - fprintf (stderr, "x11: hostname is %s\n", host); -#endif - - auth->family = FamilyLocal; - auth->address_length = strlen (host); - auth->address = host; - - add_auth_item (auth); -} - -/* Add the tcp auth item. */ -static void -define_named (Xauth *auth, const char *name) -{ - struct ifaddrs *addrs, *ptr; - - if (getifaddrs (&addrs) != 0) - return; - - for (ptr = addrs; ptr != NULL; ptr = ptr->ifa_next) - { - if (ptr->ifa_addr->sa_family != AF_INET) - continue; - - auth->family = FamilyInternet; - auth->address_length = sizeof (struct in_addr); - auth->address = (char *) &(((struct sockaddr_in *) ptr->ifa_addr)->sin_addr); - -#ifdef DEBUG - fprintf (stderr, "x11: ipaddr is %d.%d.%d.%d\n", - (unsigned char) auth->address[0], - (unsigned char) auth->address[1], - (unsigned char) auth->address[2], - (unsigned char) auth->address[3]); -#endif - - add_auth_item (auth); - } - - freeifaddrs (addrs); -} - -/* Parse the display number from NAME and add it to AUTH. */ -static void -set_auth_number (Xauth *auth, const char *name) -{ - char *colon; - char *dot, *number; - - colon = strrchr(name, ':'); - if (colon != NULL) - { - colon++; - dot = strchr(colon, '.'); - - if (dot != NULL) - auth->number_length = dot - colon; - else - auth->number_length = strlen (colon); - - number = malloc (auth->number_length + 1); - if (number != NULL) - { - strncpy (number, colon, auth->number_length); - number[auth->number_length] = '\0'; - } - else - { - auth->number_length = 0; - } - - auth->number = number; - } -} - -/* Put 128 bits of random data into DATA. If possible, it will be "high - quality" */ -static int -generate_mit_magic_cookie (char data[16]) -{ - int fd, ret, i; - long *ldata = (long *) data; - - fd = open ("/dev/random", O_RDONLY); - if (fd > 0) { - ret = read (fd, data, 16); - close (fd); - if (ret == 16) return TRUE; - } - - /* fall back to the usual crappy rng */ - - srand48 (getpid () ^ time (NULL)); - - for (i = 0; i < 4; i++) - ldata[i] = lrand48 (); - - return TRUE; -} - -/* Create the keys we'll be using for the display named NAME. */ -static int -make_auth_keys (const char *name) -{ - Xauth auth; - char key[16]; - - if (auth_file == NULL) - return FALSE; - - auth.name = "MIT-MAGIC-COOKIE-1"; - auth.name_length = strlen (auth.name); - - if (!generate_mit_magic_cookie (key)) - { - auth_file = NULL; - return FALSE; - } - - auth.data = key; - auth.data_length = 16; - - set_auth_number (&auth, name); - - define_named (&auth, host_name ()); - define_local (&auth); - - free (auth.number); - - return TRUE; -} - -/* If ADD-ENTRIES is true, merge our auth entries into the existing - Xauthority file. If ADD-ENTRIES is false, remove our entries. */ -static int -write_auth_file (int add_entries) -{ - char *home, newname[1024]; - int fd, ret; - FILE *new_fh, *old_fh; - addr_list *addr; - Xauth *auth; - - if (auth_file == NULL) - return FALSE; - - home = getenv ("HOME"); - if (home == NULL) - { - auth_file = NULL; - return FALSE; - } - - snprintf (newname, sizeof (newname), "%s/.XauthorityXXXXXX", home); - mktemp (newname); - - if (XauLockAuth (auth_file, 1, 2, 10) != LOCK_SUCCESS) - { - /* FIXME: do something here? */ - - auth_file = NULL; - return FALSE; - } - - fd = open (newname, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (fd >= 0) - { - new_fh = fdopen (fd, "w"); - if (new_fh != NULL) - { - if (add_entries) - { - for (addr = addresses; addr != NULL; addr = addr->next) - { - XauWriteAuth (new_fh, &addr->auth); - } - } - - old_fh = fopen (auth_file, "r"); - if (old_fh != NULL) - { - while ((auth = XauReadAuth (old_fh)) != NULL) - { - if (!check_auth_item (auth)) - XauWriteAuth (new_fh, auth); - XauDisposeAuth (auth); - } - fclose (old_fh); - } - - fclose (new_fh); - unlink (auth_file); - - ret = rename (newname, auth_file); - - if (ret != 0) - auth_file = NULL; - - XauUnlockAuth (auth_file); - return ret == 0; - } - - close (fd); - } - - XauUnlockAuth (auth_file); - auth_file = NULL; - return FALSE; -} - - -/* Subprocess management functions. */ - -static int -start_server (char **xargv) -{ - int child; - - child = fork (); - - switch (child) - { - case -1: /* error */ - perror ("fork"); - return FALSE; - - case 0: /* child */ - execv (X_SERVER, xargv); - perror ("Couldn't exec " X_SERVER); - _exit (1); - - default: /* parent */ - server_pid = child; - return TRUE; - } -} - -static int -wait_for_server (void) -{ - int count = 100; - - while (count-- > 0) - { - int status; - - server_dpy = XOpenDisplay (server_name); - if (server_dpy != NULL) - return TRUE; - - if (waitpid (server_pid, &status, WNOHANG) == server_pid) - return FALSE; - - sleep (1); - } - - return FALSE; -} - -static int -start_client (void) -{ - int child; - - child = fork(); - - switch (child) { - char *temp, buf[1024]; - - case -1: /* error */ - perror("fork"); - return FALSE; - - case 0: /* child */ - /* Setup environment */ - temp = getenv("DISPLAY"); - if (temp != NULL && temp[0] != 0) - setenv("DISPLAY", server_name, TRUE); - - temp = getenv("PATH"); - if (temp == NULL || temp[0] == 0) - setenv ("PATH", DEFAULT_PATH, TRUE); - else if (strnstr(temp, "/usr/X11/bin", sizeof(temp)) == NULL) { - snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", temp); - setenv("PATH", buf, TRUE); - } - - /* First try value of $XINITRC, if set. */ - temp = getenv("XINITRC"); - if (temp != NULL && temp[0] != 0 && access(temp, R_OK) == 0) - execlp (SHELL, SHELL, temp, NULL); - - /* Then look for .xinitrc in user's home directory. */ - temp = getenv("HOME"); - if (temp != NULL && temp[0] != 0) { - chdir(temp); - snprintf (buf, sizeof (buf), "%s/.xinitrc", temp); - if (access(buf, R_OK) == 0) - execlp(SHELL, SHELL, buf, NULL); - } - - /* Then try the default xinitrc in the lib directory. */ - - if (access(DEFAULT_XINITRC, R_OK) == 0) - execlp(SHELL, SHELL, DEFAULT_XINITRC, NULL); - - /* Then fallback to hardcoding an xterm and the window manager. */ - - // system(XTERM_PATH " &"); - execl(WM_PATH, WM_PATH, NULL); - - perror("exec"); - _exit(1); - - default: /* parent */ - client_pid = child; - return TRUE; - } -} - -static void -sigchld_handler (int sig) -{ - int pid, status; - - again: - pid = waitpid (WAIT_ANY, &status, WNOHANG); - - if (pid > 0) - { - if (pid == server_pid) - { - server_pid = -1; - - if (client_pid >= 0) - kill (client_pid, SIGTERM); - } - else if (pid == client_pid) - { - client_pid = -1; - - if (server_pid >= 0 && xinit_kills_server) - kill (server_pid, SIGTERM); - } - goto again; - } - - if (server_pid == -1 && client_pid == -1) - longjmp (exit_continuation, 1); - - signal (SIGCHLD, sigchld_handler); -} - - -/* Server utilities. */ - -static Boolean -display_exists_p (int number) -{ - char buf[64]; - xcb_connection_t *conn; - char *fullname = NULL; - int idisplay, iscreen; - char *conn_auth_name, *conn_auth_data; - int conn_auth_namelen, conn_auth_datalen; - // extern void *_X11TransConnectDisplay (); - // extern void _XDisconnectDisplay (); - - /* Since connecting to the display waits for a few seconds if the - display doesn't exist, check for trivial non-existence - if the - socket in /tmp exists or not.. (note: if the socket exists, the - server may still not, so we need to try to connect in that case..) */ - - sprintf (buf, "/tmp/.X11-unix/X%d", number); - if (access (buf, F_OK) != 0) - return FALSE; - - sprintf (buf, ":%d", number); - conn = xcb_connect(buf, NULL); - if (xcb_connection_has_error(conn)) return FALSE; - - xcb_disconnect(conn); - return TRUE; -} - - -/* Monitoring when the system's ip addresses change. */ - -static Boolean pending_timer; - -static void -timer_callback (CFRunLoopTimerRef timer, void *info) -{ - pending_timer = FALSE; - - /* Update authentication names. Need to write .Xauthority file first - without the existing entries, then again with the new entries.. */ - - write_auth_file (FALSE); - - free_auth_items (); - make_auth_keys (server_name); - - write_auth_file (TRUE); -} - -/* This function is called when the system's ip addresses may have changed. */ -static void -ipaddr_callback (SCDynamicStoreRef store, CFArrayRef changed_keys, void *info) -{ -#if DEBUG - if (changed_keys != NULL) { - fprintf (stderr, "x11: changed sc keys: "); - CFShow (changed_keys); - } -#endif - - if (auth_file != NULL && !pending_timer) - { - CFRunLoopTimerRef timer; - - timer = CFRunLoopTimerCreate (NULL, CFAbsoluteTimeGetCurrent () + 1.0, - 0.0, 0, 0, timer_callback, NULL); - CFRunLoopAddTimer (CFRunLoopGetCurrent (), timer, - kCFRunLoopDefaultMode); - CFRelease (timer); - - pending_timer = TRUE; - } -} - -/* This code adapted from "Living in a Dynamic TCP/IP Environment" technote. */ -static Boolean -install_ipaddr_source (void) -{ - CFRunLoopSourceRef source = NULL; - - SCDynamicStoreContext context = {0}; - SCDynamicStoreRef ref; - - ref = SCDynamicStoreCreate (NULL, - CFSTR ("AddIPAddressListChangeCallbackSCF"), - ipaddr_callback, &context); - - if (ref != NULL) - { - const void *keys[4], *patterns[2]; - int i; - - keys[0] = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); - keys[1] = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv6); - keys[2] = SCDynamicStoreKeyCreateComputerName (NULL); - keys[3] = SCDynamicStoreKeyCreateHostNames (NULL); - - patterns[0] = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv4); - patterns[1] = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv6); - - if (keys[0] != NULL && keys[1] != NULL && keys[2] != NULL - && keys[3] != NULL && patterns[0] != NULL && patterns[1] != NULL) - { - CFArrayRef key_array, pattern_array; - - key_array = CFArrayCreate (NULL, keys, 4, &kCFTypeArrayCallBacks); - pattern_array = CFArrayCreate (NULL, patterns, 2, &kCFTypeArrayCallBacks); - - if (key_array != NULL || pattern_array != NULL) - { - SCDynamicStoreSetNotificationKeys (ref, key_array, pattern_array); - source = SCDynamicStoreCreateRunLoopSource (NULL, ref, 0); - } - - if (key_array != NULL) - CFRelease (key_array); - if (pattern_array != NULL) - CFRelease (pattern_array); - } - - - for (i = 0; i < 4; i++) - if (keys[i] != NULL) - CFRelease (keys[i]); - for (i = 0; i < 2; i++) - if (patterns[i] != NULL) - CFRelease (patterns[i]); - - CFRelease (ref); - } - - if (source != NULL) - { - CFRunLoopAddSource (CFRunLoopGetCurrent (), - source, kCFRunLoopDefaultMode); - CFRelease (source); - } - - return source != NULL; -} - - -/* Entrypoint. */ - -void -termination_signal_handler (int unused_sig) -{ - signal (SIGTERM, SIG_DFL); - signal (SIGHUP, SIG_DFL); - signal (SIGINT, SIG_DFL); - signal (SIGQUIT, SIG_DFL); - - longjmp (exit_continuation, 1); -} - -int -main (int argc, char **argv) -{ - char **xargv; - int i, j; - int fd; - - xargv = alloca (sizeof (char *) * (argc + 32)); - - if (!read_boolean_pref (CFSTR ("no_auth"), FALSE)) - auth_file = XauFileName (); - - /* The standard X11 behaviour is for the server to quit when the first - client exits. But it can be useful for debugging (and to mimic our - behaviour in the beta releases) to not do that. */ - - xinit_kills_server = read_boolean_pref (CFSTR ("xinit_kills_server"), TRUE); - - for (i = 1; i < argc; i++) - { - if (argv[i][0] == ':') - server_name = argv[i]; - } - - if (server_name == NULL) - { - static char name[8]; - - /* No display number specified, so search for the first unused. - - There's a big old race condition here if two servers start at - the same time, but that's fairly unlikely. We could create - lockfiles or something, but that's seems more likely to cause - problems than the race condition itself.. */ - - for (i = 0; i < MAX_DISPLAYS; i++) - { - if (!display_exists_p (i)) - break; - } - - if (i == MAX_DISPLAYS) - { - fprintf (stderr, "%s: couldn't allocate a display number", argv[0]); - exit (1); - } - - sprintf (name, ":%d", i); - server_name = name; - } - - if (auth_file != NULL) - { - /* Create new Xauth keys and add them to the .Xauthority file */ - - make_auth_keys (server_name); - write_auth_file (TRUE); - } - - /* Construct our new argv */ - - i = j = 0; - - xargv[i++] = argv[j++]; - - if (auth_file != NULL) - { - xargv[i++] = "-auth"; - xargv[i++] = auth_file; - } - - /* By default, don't listen on tcp sockets if Xauth is disabled. */ - - if (read_boolean_pref (CFSTR ("nolisten_tcp"), auth_file == NULL)) - { - xargv[i++] = "-nolisten"; - xargv[i++] = "tcp"; - } - - while (j < argc) - { - if (argv[j++][0] != ':') - xargv[i++] = argv[j-1]; - } - - xargv[i++] = (char *) server_name; - xargv[i++] = NULL; - - /* Detach from any controlling terminal and connect stdin to /dev/null */ - -#ifdef TIOCNOTTY - fd = open ("/dev/tty", O_RDONLY); - if (fd != -1) - { - ioctl (fd, TIOCNOTTY, 0); - close (fd); - } -#endif - - fd = open ("/dev/null", O_RDWR, 0); - if (fd >= 0) - { - dup2 (fd, 0); - if (fd > 0) - close (fd); - } - - if (!start_server (xargv)) - return 1; - - if (!wait_for_server ()) - { - kill (server_pid, SIGTERM); - return 1; - } - - if (!start_client ()) - { - kill (server_pid, SIGTERM); - return 1; - } - - signal (SIGCHLD, sigchld_handler); - - signal (SIGTERM, termination_signal_handler); - signal (SIGHUP, termination_signal_handler); - signal (SIGINT, termination_signal_handler); - signal (SIGQUIT, termination_signal_handler); - - if (setjmp (exit_continuation) == 0) - { - if (install_ipaddr_source ()) - CFRunLoopRun (); - else - while (1) pause (); - } - - signal (SIGCHLD, SIG_IGN); - - if (client_pid >= 0) kill (client_pid, SIGTERM); - if (server_pid >= 0) kill (server_pid, SIGTERM); - - if (auth_file != NULL) - { - /* Remove our Xauth keys */ - - write_auth_file (FALSE); - } - - free_auth_items (); - - return 0; + /* First check if launchd started us */ + if(argc == 2 && !strncmp(argv[1], "--launchd", 9)) { + argc--; + argv[1] = argv[0]; + argv++; + fprintf(stderr, "X11.app: main(): launchd called us, running server_main()"); + return server_main(argc, argv); + } + + /* If we have a process serial number and it's our only arg, act as if + * the user double clicked the app bundle: launch app_to_run if possible + */ + if(argc == 1 || (argc == 2 && !strncmp(argv[1], "-psn_", 5))) { + /* Now, try to open a display, if so, run the launcher */ + display = XOpenDisplay(NULL); + if(display) { + fprintf(stderr, "X11.app: main(): closing the display"); + /* Could open the display, start the launcher */ + XCloseDisplay(display); + + /* Give 2 seconds for the server to start... + * TODO: *Really* fix this race condition + */ + usleep(2000); + fprintf(stderr, "X11.app: main(): running launcher_main()"); + return launcher_main(argc, argv); + } + } + + /* Couldn't open the display or we were called with arguments, + * just want to start a server. + */ + fprintf(stderr, "X11.app: main(): running server_main()"); + return server_main(argc, argv); } diff --git a/hw/darwin/launcher/bundle-main.c b/hw/darwin/apple/launcher-main.c similarity index 98% rename from hw/darwin/launcher/bundle-main.c rename to hw/darwin/apple/launcher-main.c index ca6255307..60a1624b9 100644 --- a/hw/darwin/launcher/bundle-main.c +++ b/hw/darwin/apple/launcher-main.c @@ -35,7 +35,7 @@ #define DEFAULT_APP "/usr/X11/bin/xterm" -int main (int argc, char **argv) { +int launcher_main (int argc, char **argv) { char *command = DEFAULT_APP; const char *newargv[7]; int child; diff --git a/hw/darwin/apple/org.x.X11.plist b/hw/darwin/apple/org.x.X11.plist new file mode 100644 index 000000000..6c6be91ab --- /dev/null +++ b/hw/darwin/apple/org.x.X11.plist @@ -0,0 +1,25 @@ + + + + + Label + org.x.X11 + Program + /Applications/Utilities/X11.app/Contents/MacOS/X11 + ProgramArguments + + /Applications/Utilities/X11.app/Contents/MacOS/X11 + --launchd + + Sockets + + :0 + + SecureSocketWithKey + DISPLAY + + + ServiceIPC + + + diff --git a/hw/darwin/apple/server-main.c b/hw/darwin/apple/server-main.c new file mode 100644 index 000000000..26fcbb0ab --- /dev/null +++ b/hw/darwin/apple/server-main.c @@ -0,0 +1,904 @@ +/* bundle-main.c -- X server launcher + + Copyright (c) 2002-2007 Apple Inc. 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, sublicense, 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 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 + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) 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. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. + + Parts of this file are derived from xdm, which has this copyright: + + Copyright 1988, 1998 The Open Group + + Permission to use, copy, modify, distribute, and sell this software + and its documentation for any purpose is hereby granted without fee, + provided that the above copyright notice appear in all copies and + that both that copyright notice and this permission notice appear in + supporting documentation. + + The above copyright notice and this permission notice 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 + NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP 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. + + Except as contained in this notice, the name of The Open Group shall + not be used in advertising or otherwise to promote the sale, use or + other dealings in this Software without prior written authorization + from The Open Group. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#define X_SERVER "/usr/X11/bin/Xquartz" +#define XTERM_PATH "/usr/X11/bin/xterm" +#define WM_PATH "/usr/bin/quartz-wm" +#define DEFAULT_XINITRC "/usr/X11/lib/X11/xinit/xinitrc" +#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin" + +/* what xinit does */ +#ifndef SHELL +# define SHELL "sh" +#endif + +#undef FALSE +#define FALSE 0 +#undef TRUE +#define TRUE 1 + +#define MAX_DISPLAYS 64 + +static int server_pid = -1, client_pid = -1; +static int xinit_kills_server = FALSE; +static jmp_buf exit_continuation; +static const char *server_name = NULL; +static Display *server_dpy; + +static char *auth_file; + +typedef struct addr_list_struct addr_list; + +struct addr_list_struct { + addr_list *next; + Xauth auth; +}; + +static addr_list *addresses; + + +/* Utility functions. */ + +/* Return the current host name. Matches what Xlib does. */ +static char * +host_name (void) +{ +#ifdef NEED_UTSNAME + static struct utsname name; + + uname(&name); + + return name.nodename; +#else + static char buf[100]; + + gethostname(buf, sizeof(buf)); + + return buf; +#endif +} + +static int +read_boolean_pref (CFStringRef name, int default_) +{ + int value; + Boolean ok; + + value = CFPreferencesGetAppBooleanValue (name, + CFSTR ("com.apple.x11"), &ok); + return ok ? value : default_; +} + +static inline int +binary_equal (const void *a, const void *b, int length) +{ + return memcmp (a, b, length) == 0; +} + +static inline void * +binary_dup (const void *a, int length) +{ + void *b = malloc (length); + if (b != NULL) + memcpy (b, a, length); + return b; +} + +static inline void +binary_free (void *data, int length) +{ + if (data != NULL) + free (data); +} + + +/* Functions for managing the authentication entries. */ + +/* Returns true if something matching AUTH is in our list of auth items */ +static int +check_auth_item (Xauth *auth) +{ + addr_list *a; + + for (a = addresses; a != NULL; a = a->next) + { + if (a->auth.family == auth->family + && a->auth.address_length == auth->address_length + && binary_equal (a->auth.address, auth->address, auth->address_length) + && a->auth.number_length == auth->number_length + && binary_equal (a->auth.number, auth->number, auth->number_length) + && a->auth.name_length == auth->name_length + && binary_equal (a->auth.name, auth->name, auth->name_length)) + { + return TRUE; + } + } + + return FALSE; +} + +/* Add one item to our list of auth items. */ +static void +add_auth_item (Xauth *auth) +{ + addr_list *a = malloc (sizeof (addr_list)); + + a->auth.family = auth->family; + a->auth.address_length = auth->address_length; + a->auth.address = binary_dup (auth->address, auth->address_length); + a->auth.number_length = auth->number_length; + a->auth.number = binary_dup (auth->number, auth->number_length); + a->auth.name_length = auth->name_length; + a->auth.name = binary_dup (auth->name, auth->name_length); + a->auth.data_length = auth->data_length; + a->auth.data = binary_dup (auth->data, auth->data_length); + + a->next = addresses; + addresses = a; +} + +/* Free all allocated auth items. */ +static void +free_auth_items (void) +{ + addr_list *a; + + while ((a = addresses) != NULL) + { + addresses = a->next; + + binary_free (a->auth.address, a->auth.address_length); + binary_free (a->auth.number, a->auth.number_length); + binary_free (a->auth.name, a->auth.name_length); + binary_free (a->auth.data, a->auth.data_length); + free (a); + } +} + +/* Add the unix domain auth item. */ +static void +define_local (Xauth *auth) +{ + char *host = host_name (); + +#ifdef DEBUG + fprintf (stderr, "x11: hostname is %s\n", host); +#endif + + auth->family = FamilyLocal; + auth->address_length = strlen (host); + auth->address = host; + + add_auth_item (auth); +} + +/* Add the tcp auth item. */ +static void +define_named (Xauth *auth, const char *name) +{ + struct ifaddrs *addrs, *ptr; + + if (getifaddrs (&addrs) != 0) + return; + + for (ptr = addrs; ptr != NULL; ptr = ptr->ifa_next) + { + if (ptr->ifa_addr->sa_family != AF_INET) + continue; + + auth->family = FamilyInternet; + auth->address_length = sizeof (struct in_addr); + auth->address = (char *) &(((struct sockaddr_in *) ptr->ifa_addr)->sin_addr); + +#ifdef DEBUG + fprintf (stderr, "x11: ipaddr is %d.%d.%d.%d\n", + (unsigned char) auth->address[0], + (unsigned char) auth->address[1], + (unsigned char) auth->address[2], + (unsigned char) auth->address[3]); +#endif + + add_auth_item (auth); + } + + freeifaddrs (addrs); +} + +/* Parse the display number from NAME and add it to AUTH. */ +static void +set_auth_number (Xauth *auth, const char *name) +{ + char *colon; + char *dot, *number; + + colon = strrchr(name, ':'); + if (colon != NULL) + { + colon++; + dot = strchr(colon, '.'); + + if (dot != NULL) + auth->number_length = dot - colon; + else + auth->number_length = strlen (colon); + + number = malloc (auth->number_length + 1); + if (number != NULL) + { + strncpy (number, colon, auth->number_length); + number[auth->number_length] = '\0'; + } + else + { + auth->number_length = 0; + } + + auth->number = number; + } +} + +/* Put 128 bits of random data into DATA. If possible, it will be "high + quality" */ +static int +generate_mit_magic_cookie (char data[16]) +{ + int fd, ret, i; + long *ldata = (long *) data; + + fd = open ("/dev/random", O_RDONLY); + if (fd > 0) { + ret = read (fd, data, 16); + close (fd); + if (ret == 16) return TRUE; + } + + /* fall back to the usual crappy rng */ + + srand48 (getpid () ^ time (NULL)); + + for (i = 0; i < 4; i++) + ldata[i] = lrand48 (); + + return TRUE; +} + +/* Create the keys we'll be using for the display named NAME. */ +static int +make_auth_keys (const char *name) +{ + Xauth auth; + char key[16]; + + if (auth_file == NULL) + return FALSE; + + auth.name = "MIT-MAGIC-COOKIE-1"; + auth.name_length = strlen (auth.name); + + if (!generate_mit_magic_cookie (key)) + { + auth_file = NULL; + return FALSE; + } + + auth.data = key; + auth.data_length = 16; + + set_auth_number (&auth, name); + + define_named (&auth, host_name ()); + define_local (&auth); + + free (auth.number); + + return TRUE; +} + +/* If ADD-ENTRIES is true, merge our auth entries into the existing + Xauthority file. If ADD-ENTRIES is false, remove our entries. */ +static int +write_auth_file (int add_entries) +{ + char *home, newname[1024]; + int fd, ret; + FILE *new_fh, *old_fh; + addr_list *addr; + Xauth *auth; + + if (auth_file == NULL) + return FALSE; + + home = getenv ("HOME"); + if (home == NULL) + { + auth_file = NULL; + return FALSE; + } + + snprintf (newname, sizeof (newname), "%s/.XauthorityXXXXXX", home); + mktemp (newname); + + if (XauLockAuth (auth_file, 1, 2, 10) != LOCK_SUCCESS) + { + /* FIXME: do something here? */ + + auth_file = NULL; + return FALSE; + } + + fd = open (newname, O_WRONLY | O_CREAT | O_TRUNC, 0600); + if (fd >= 0) + { + new_fh = fdopen (fd, "w"); + if (new_fh != NULL) + { + if (add_entries) + { + for (addr = addresses; addr != NULL; addr = addr->next) + { + XauWriteAuth (new_fh, &addr->auth); + } + } + + old_fh = fopen (auth_file, "r"); + if (old_fh != NULL) + { + while ((auth = XauReadAuth (old_fh)) != NULL) + { + if (!check_auth_item (auth)) + XauWriteAuth (new_fh, auth); + XauDisposeAuth (auth); + } + fclose (old_fh); + } + + fclose (new_fh); + unlink (auth_file); + + ret = rename (newname, auth_file); + + if (ret != 0) + auth_file = NULL; + + XauUnlockAuth (auth_file); + return ret == 0; + } + + close (fd); + } + + XauUnlockAuth (auth_file); + auth_file = NULL; + return FALSE; +} + + +/* Subprocess management functions. */ + +static int +start_server (char **xargv) +{ + int child; + + child = fork (); + + switch (child) + { + case -1: /* error */ + perror ("fork"); + return FALSE; + + case 0: /* child */ + execv (X_SERVER, xargv); + perror ("Couldn't exec " X_SERVER); + _exit (1); + + default: /* parent */ + server_pid = child; + return TRUE; + } +} + +static int +wait_for_server (void) +{ + int count = 100; + + while (count-- > 0) + { + int status; + + server_dpy = XOpenDisplay (server_name); + if (server_dpy != NULL) + return TRUE; + + if (waitpid (server_pid, &status, WNOHANG) == server_pid) + return FALSE; + + sleep (1); + } + + return FALSE; +} + +static int +start_client (void) +{ + int child; + + child = fork(); + + switch (child) { + char *temp, buf[1024]; + + case -1: /* error */ + perror("fork"); + return FALSE; + + case 0: /* child */ + /* Setup environment */ + temp = getenv("DISPLAY"); +// if (temp == NULL && temp[0] != 0) + setenv("DISPLAY", server_name, TRUE); + + temp = getenv("PATH"); + if (temp == NULL || temp[0] == 0) + setenv ("PATH", DEFAULT_PATH, TRUE); + else if (strnstr(temp, "/usr/X11/bin", sizeof(temp)) == NULL) { + snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", temp); + setenv("PATH", buf, TRUE); + } + + /* First try value of $XINITRC, if set. */ + temp = getenv("XINITRC"); + if (temp != NULL && temp[0] != 0 && access(temp, R_OK) == 0) + execlp (SHELL, SHELL, temp, NULL); + + /* Then look for .xinitrc in user's home directory. */ + temp = getenv("HOME"); + if (temp != NULL && temp[0] != 0) { + chdir(temp); + snprintf (buf, sizeof (buf), "%s/.xinitrc", temp); + if (access(buf, R_OK) == 0) + execlp(SHELL, SHELL, buf, NULL); + } + + /* Then try the default xinitrc in the lib directory. */ + + if (access(DEFAULT_XINITRC, R_OK) == 0) + execlp(SHELL, SHELL, DEFAULT_XINITRC, NULL); + + /* Then fallback to hardcoding an xterm and the window manager. */ + + // system(XTERM_PATH " &"); + execl(WM_PATH, WM_PATH, NULL); + + perror("exec"); + _exit(1); + + default: /* parent */ + client_pid = child; + return TRUE; + } +} + +static void +sigchld_handler (int sig) +{ + int pid, status; + + again: + pid = waitpid (WAIT_ANY, &status, WNOHANG); + + if (pid > 0) + { + if (pid == server_pid) + { + server_pid = -1; + + if (client_pid >= 0) + kill (client_pid, SIGTERM); + } + else if (pid == client_pid) + { + client_pid = -1; + + if (server_pid >= 0 && xinit_kills_server) + kill (server_pid, SIGTERM); + } + goto again; + } + + if (server_pid == -1 && client_pid == -1) + longjmp (exit_continuation, 1); + + signal (SIGCHLD, sigchld_handler); +} + + +/* Server utilities. */ + +static Boolean +display_exists_p (int number) +{ + char buf[64]; + xcb_connection_t *conn; + char *fullname = NULL; + int idisplay, iscreen; + char *conn_auth_name, *conn_auth_data; + int conn_auth_namelen, conn_auth_datalen; + + // extern void *_X11TransConnectDisplay (); + // extern void _XDisconnectDisplay (); + + /* Since connecting to the display waits for a few seconds if the + display doesn't exist, check for trivial non-existence - if the + socket in /tmp exists or not.. (note: if the socket exists, the + server may still not, so we need to try to connect in that case..) */ + + sprintf (buf, "/tmp/.X11-unix/X%d", number); + if (access (buf, F_OK) != 0) + return FALSE; + + sprintf (buf, ":%d", number); + conn = xcb_connect(buf, NULL); + if (xcb_connection_has_error(conn)) return FALSE; + + xcb_disconnect(conn); + return TRUE; +} + + +/* Monitoring when the system's ip addresses change. */ + +static Boolean pending_timer; + +static void +timer_callback (CFRunLoopTimerRef timer, void *info) +{ + pending_timer = FALSE; + + /* Update authentication names. Need to write .Xauthority file first + without the existing entries, then again with the new entries.. */ + + write_auth_file (FALSE); + + free_auth_items (); + make_auth_keys (server_name); + + write_auth_file (TRUE); +} + +/* This function is called when the system's ip addresses may have changed. */ +static void +ipaddr_callback (SCDynamicStoreRef store, CFArrayRef changed_keys, void *info) +{ +#if DEBUG + if (changed_keys != NULL) { + fprintf (stderr, "x11: changed sc keys: "); + CFShow (changed_keys); + } +#endif + + if (auth_file != NULL && !pending_timer) + { + CFRunLoopTimerRef timer; + + timer = CFRunLoopTimerCreate (NULL, CFAbsoluteTimeGetCurrent () + 1.0, + 0.0, 0, 0, timer_callback, NULL); + CFRunLoopAddTimer (CFRunLoopGetCurrent (), timer, + kCFRunLoopDefaultMode); + CFRelease (timer); + + pending_timer = TRUE; + } +} + +/* This code adapted from "Living in a Dynamic TCP/IP Environment" technote. */ +static Boolean +install_ipaddr_source (void) +{ + CFRunLoopSourceRef source = NULL; + + SCDynamicStoreContext context = {0}; + SCDynamicStoreRef ref; + + ref = SCDynamicStoreCreate (NULL, + CFSTR ("AddIPAddressListChangeCallbackSCF"), + ipaddr_callback, &context); + + if (ref != NULL) + { + const void *keys[4], *patterns[2]; + int i; + + keys[0] = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); + keys[1] = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv6); + keys[2] = SCDynamicStoreKeyCreateComputerName (NULL); + keys[3] = SCDynamicStoreKeyCreateHostNames (NULL); + + patterns[0] = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv4); + patterns[1] = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv6); + + if (keys[0] != NULL && keys[1] != NULL && keys[2] != NULL + && keys[3] != NULL && patterns[0] != NULL && patterns[1] != NULL) + { + CFArrayRef key_array, pattern_array; + + key_array = CFArrayCreate (NULL, keys, 4, &kCFTypeArrayCallBacks); + pattern_array = CFArrayCreate (NULL, patterns, 2, &kCFTypeArrayCallBacks); + + if (key_array != NULL || pattern_array != NULL) + { + SCDynamicStoreSetNotificationKeys (ref, key_array, pattern_array); + source = SCDynamicStoreCreateRunLoopSource (NULL, ref, 0); + } + + if (key_array != NULL) + CFRelease (key_array); + if (pattern_array != NULL) + CFRelease (pattern_array); + } + + + for (i = 0; i < 4; i++) + if (keys[i] != NULL) + CFRelease (keys[i]); + for (i = 0; i < 2; i++) + if (patterns[i] != NULL) + CFRelease (patterns[i]); + + CFRelease (ref); + } + + if (source != NULL) + { + CFRunLoopAddSource (CFRunLoopGetCurrent (), + source, kCFRunLoopDefaultMode); + CFRelease (source); + } + + return source != NULL; +} + + +/* Entrypoint. */ + +void +termination_signal_handler (int unused_sig) +{ + signal (SIGTERM, SIG_DFL); + signal (SIGHUP, SIG_DFL); + signal (SIGINT, SIG_DFL); + signal (SIGQUIT, SIG_DFL); + + longjmp (exit_continuation, 1); +} + +int +server_main (int argc, char **argv) +{ + char **xargv; + int i, j; + int fd; + + xargv = alloca (sizeof (char *) * (argc + 32)); + + if (!read_boolean_pref (CFSTR ("no_auth"), FALSE)) + auth_file = XauFileName (); + + /* The standard X11 behaviour is for the server to quit when the first + client exits. But it can be useful for debugging (and to mimic our + behaviour in the beta releases) to not do that. */ + + xinit_kills_server = read_boolean_pref (CFSTR ("xinit_kills_server"), TRUE); + + for (i = 1; i < argc; i++) + { + if (argv[i][0] == ':') + server_name = argv[i]; + } + + if (server_name == NULL) + { + static char name[8]; + + /* No display number specified, so search for the first unused. + + There's a big old race condition here if two servers start at + the same time, but that's fairly unlikely. We could create + lockfiles or something, but that's seems more likely to cause + problems than the race condition itself.. */ + + for (i = 0; i < MAX_DISPLAYS; i++) + { + if (!display_exists_p (i)) + break; + } + + if (i == MAX_DISPLAYS) + { + fprintf (stderr, "%s: couldn't allocate a display number", argv[0]); + exit (1); + } + + sprintf (name, ":%d", i); + server_name = name; + } + + if (auth_file != NULL) + { + /* Create new Xauth keys and add them to the .Xauthority file */ + + make_auth_keys (server_name); + write_auth_file (TRUE); + } + + /* Construct our new argv */ + + i = j = 0; + + xargv[i++] = argv[j++]; + + if (auth_file != NULL) + { + xargv[i++] = "-auth"; + xargv[i++] = auth_file; + } + + /* By default, don't listen on tcp sockets if Xauth is disabled. */ + + if (read_boolean_pref (CFSTR ("nolisten_tcp"), auth_file == NULL)) + { + xargv[i++] = "-nolisten"; + xargv[i++] = "tcp"; + } + + while (j < argc) + { + if (argv[j++][0] != ':') + xargv[i++] = argv[j-1]; + } + + xargv[i++] = (char *) server_name; + xargv[i++] = NULL; + + /* Detach from any controlling terminal and connect stdin to /dev/null */ + +#ifdef TIOCNOTTY + fd = open ("/dev/tty", O_RDONLY); + if (fd != -1) + { + ioctl (fd, TIOCNOTTY, 0); + close (fd); + } +#endif + + fd = open ("/dev/null", O_RDWR, 0); + if (fd >= 0) + { + dup2 (fd, 0); + if (fd > 0) + close (fd); + } + + if (!start_server (xargv)) + return 1; + + if (!wait_for_server ()) + { + kill (server_pid, SIGTERM); + return 1; + } + + if (!start_client ()) + { + kill (server_pid, SIGTERM); + return 1; + } + + signal (SIGCHLD, sigchld_handler); + + signal (SIGTERM, termination_signal_handler); + signal (SIGHUP, termination_signal_handler); + signal (SIGINT, termination_signal_handler); + signal (SIGQUIT, termination_signal_handler); + + if (setjmp (exit_continuation) == 0) + { + if (install_ipaddr_source ()) + CFRunLoopRun (); + else + while (1) pause (); + } + + signal (SIGCHLD, SIG_IGN); + + if (client_pid >= 0) kill (client_pid, SIGTERM); + if (server_pid >= 0) kill (server_pid, SIGTERM); + + if (auth_file != NULL) + { + /* Remove our Xauth keys */ + + write_auth_file (FALSE); + } + + free_auth_items (); + + return 0; +} diff --git a/hw/darwin/launcher/Info.plist b/hw/darwin/launcher/Info.plist deleted file mode 100644 index b5385b61a..000000000 --- a/hw/darwin/launcher/Info.plist +++ /dev/null @@ -1,30 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - X11 - CFBundleGetInfoString - 2.0, Copyright © 2003-2007, Apple Inc. - CFBundleIconFile - X11.icns - CFBundleIdentifier - org.x.X11_launcher - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - X11 - CFBundlePackageType - APPL - CFBundleShortVersionString - 2.0 - CFBundleSignature - x11l - LSUIElement - 1 - NSHumanReadableCopyright - Copyright © 2007, Apple Inc. - - diff --git a/hw/darwin/launcher/Makefile.am b/hw/darwin/launcher/Makefile.am deleted file mode 100644 index c291731d1..000000000 --- a/hw/darwin/launcher/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -bin_SCRIPTS = x11launcher - -.PHONY: x11launcher - -x11launcher: - xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)" - -install-data-hook: - xcodebuild install DSTROOT=$(DESTDIR) INSTALL_PATH=$(APPLE_APPLICATIONS_DIR) DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" - -clean-local: - rm -rf build - -EXTRA_DIST = \ - bundle-main.c \ - Info.plist \ - X11.icns \ - X11.xcodeproj/project.pbxproj diff --git a/hw/darwin/launcher/X11.icns b/hw/darwin/launcher/X11.icns deleted file mode 100644 index d770e617ddb455d8a499550e712f93a06a69f871..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65908 zcmeFa1z1&E*FU<0?h--ijty)=kPeYnLb{|xBq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9!+!k$fuJCKwWJUfk|awa7rcwq-G#EJepRa}U{Akpz>{vzd4xd+#=glE1^IRg zvruIkLrGFY`k*4~{*WrYe&cIP#RdPlof9$S=?YH-D}9215_u6Y|l;mePniFk&xd zQ>)@T8kO|pFGm@eaPXEgid;NgUI8aT0x#r5AZr*fteSRGH)%(`mgmhni5rhYC|n1U z!;^Gik!;A*?3MQ)4KrjJ6r8I zvqd#5G$z)#NzqTedIvljE`B!sA^FlA3TJ%1IQ>^>!EDs+Lf6{n6TQ99vA~ezz3V91 z(Evga>gdlm8O6rFro-`LXxWoms~=aW?oK>4-zEAl9cptpcXH`;D*dkLY}np4)lLJB zxa6B?UoEpNj9TY))6B$Dpl+og8$w$3C0YdI7{fe_HWGzL*4-o9ZrGW@_TL1U?le^O zfc2ubP9rb|GA?MW`Ig<3)ZVjDJx|KG&dO$^1pYstawna)`5K1gDGbd2 E014<25dZ)H diff --git a/hw/darwin/launcher/X11.xcodeproj/project.pbxproj b/hw/darwin/launcher/X11.xcodeproj/project.pbxproj deleted file mode 100644 index 34b76dafb..000000000 --- a/hw/darwin/launcher/X11.xcodeproj/project.pbxproj +++ /dev/null @@ -1,290 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 42; - objects = { - -/* Begin PBXBuildFile section */ - 527F241B0B5D938C007840A7 /* X11.icns in Resources */ = {isa = PBXBuildFile; fileRef = 50459C5F038587C60ECA21EC /* X11.icns */; }; - 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 50EE2AB703849F0B0ECA21EC /* bundle-main.c */; }; - 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */; }; - 527F24370B5D9D89007840A7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527F24260B5D938C007840A7 /* Info.plist */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = ""; }; - 50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = ""; }; - 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; - 527F24260B5D938C007840A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = ""; }; - 527F24270B5D938C007840A7 /* X11.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = X11.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 527F241E0B5D938C007840A7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 195DF8CFFE9D517E11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 527F24270B5D938C007840A7 /* X11.app */, - ); - name = Products; - sourceTree = ""; - }; - 20286C29FDCF999611CA2CEA /* X11 */ = { - isa = PBXGroup; - children = ( - 20286C2AFDCF999611CA2CEA /* Sources */, - 20286C2CFDCF999611CA2CEA /* Resources */, - 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */, - 195DF8CFFE9D517E11CA2CBB /* Products */, - 527F24260B5D938C007840A7 /* Info.plist */, - ); - name = X11; - sourceTree = ""; - }; - 20286C2AFDCF999611CA2CEA /* Sources */ = { - isa = PBXGroup; - children = ( - 50EE2AB703849F0B0ECA21EC /* bundle-main.c */, - ); - name = Sources; - sourceTree = ""; - }; - 20286C2CFDCF999611CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 50459C5F038587C60ECA21EC /* X11.icns */, - ); - name = Resources; - sourceTree = ""; - }; - 20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = { - isa = PBXGroup; - children = ( - 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */, - ); - name = "External Frameworks and Libraries"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 527F24170B5D938C007840A7 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 527F24160B5D938C007840A7 /* X11 */ = { - isa = PBXNativeTarget; - buildConfigurationList = 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */; - buildPhases = ( - 527F24170B5D938C007840A7 /* Headers */, - 527F24180B5D938C007840A7 /* Resources */, - 527F241C0B5D938C007840A7 /* Sources */, - 527F241E0B5D938C007840A7 /* Frameworks */, - 527F24210B5D938C007840A7 /* Rez */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = X11; - productName = X11; - productReference = 527F24270B5D938C007840A7 /* X11.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 20286C28FDCF999611CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */; - compatibilityVersion = "Xcode 2.4"; - hasScannedForEncodings = 1; - mainGroup = 20286C29FDCF999611CA2CEA /* X11 */; - projectDirPath = ""; - projectRoot = ""; - shouldCheckCompatibility = 1; - targets = ( - 527F24160B5D938C007840A7 /* X11 */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 527F24180B5D938C007840A7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 527F24370B5D9D89007840A7 /* Info.plist in Resources */, - 527F241B0B5D938C007840A7 /* X11.icns in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXRezBuildPhase section */ - 527F24210B5D938C007840A7 /* Rez */ = { - isa = PBXRezBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXRezBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 527F241C0B5D938C007840A7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 527F24090B5D8FFC007840A7 /* Development */ = { - isa = XCBuildConfiguration; - buildSettings = { - INSTALL_MODE_FLAG = "a+rX"; - }; - name = Development; - }; - 527F240A0B5D8FFC007840A7 /* Deployment */ = { - isa = XCBuildConfiguration; - buildSettings = { - INSTALL_MODE_FLAG = "a+rX"; - }; - name = Deployment; - }; - 527F240B0B5D8FFC007840A7 /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - INSTALL_MODE_FLAG = "a+rX"; - }; - name = Default; - }; - 527F24230B5D938C007840A7 /* Development */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - FRAMEWORK_SEARCH_PATHS = ""; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = /usr/X11/include; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = $DSTROOT/Applications/Utilties; - LIBRARY_SEARCH_PATHS = /usr/X11/lib; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ( - "-lXau", - "-lxcb", - "-lX11", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = X11; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - }; - name = Development; - }; - 527F24240B5D938C007840A7 /* Deployment */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - FRAMEWORK_SEARCH_PATHS = ""; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = /usr/X11/include; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = /Applications/Utilties; - LIBRARY_SEARCH_PATHS = /usr/X11/lib; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = X11; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - }; - name = Deployment; - }; - 527F24250B5D938C007840A7 /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ""; - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = /usr/X11/include; - INFOPLIST_FILE = Info.plist; - INSTALL_PATH = /Applications/Utilties; - LIBRARY_SEARCH_PATHS = /usr/X11/lib; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ( - "-lXau", - "-lxcb", - "-lX11", - ); - OTHER_REZFLAGS = ""; - PRODUCT_NAME = X11; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = ( - "-Wmost", - "-Wno-four-char-constants", - "-Wno-unknown-pragmas", - ); - WRAPPER_EXTENSION = app; - }; - name = Default; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 527F24090B5D8FFC007840A7 /* Development */, - 527F240A0B5D8FFC007840A7 /* Deployment */, - 527F240B0B5D8FFC007840A7 /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; - 527F24220B5D938C007840A7 /* Build configuration list for PBXNativeTarget "X11" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 527F24230B5D938C007840A7 /* Development */, - 527F24240B5D938C007840A7 /* Deployment */, - 527F24250B5D938C007840A7 /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; -/* End XCConfigurationList section */ - }; - rootObject = 20286C28FDCF999611CA2CEA /* Project object */; -} From 13af2d1efcc83d1412a4c727afddd97577b00f32 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 4 Dec 2007 17:36:21 -0500 Subject: [PATCH 262/552] Restore xf86getsecs() as not having an ANSI equivalent. --- hw/xfree86/common/xf86.h | 1 + hw/xfree86/common/xf86Helper.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 064107428..64449482f 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -339,6 +339,7 @@ Bool xf86IsUnblank(int mode); void xf86AddModuleInfo(ModuleInfoPtr info, pointer module); void xf86DeleteModuleInfo(int idx); +void xf86getsecs(long *, long *); /* xf86Debug.c */ #ifdef BUILDDEBUG diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index d37875c35..ec524e63c 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -2957,3 +2957,17 @@ xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, { return GetMotionHistory(pDev, buff, start, stop, pScreen); } + +_X_EXPORT void +xf86getsecs(long * secs, long * usecs) +{ + struct timeval tv; + + X_GETTIMEOFDAY(&tv); + if (secs) + *secs = tv.tv_sec; + if (usecs) + *usecs= tv.tv_usec; + + return; +} From cc98a8e2415f12c7a90fd846d1ec858068e8c796 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 3 Dec 2007 23:59:19 -0800 Subject: [PATCH 263/552] Darwin: RIP dumpkeymap, cr, and fullscreen Taking out the trash. We don't need dumpkeymap since we'll be getting keymaps straight from the OS. .Xmodmap should be sufficient for any user-needed changes. If this is not the case, please let us know, so we can address any problems you have. fullscreen never worked AFAIK cr isn't being used and xpr is much better. (cherry picked from commit e41af2967e885466c4d194fa4c3b358e6be37c30) --- hw/darwin/Makefile.am | 4 +- hw/darwin/quartz/cr/XView.h | 41 - hw/darwin/quartz/cr/XView.m | 77 -- hw/darwin/quartz/cr/cr.h | 60 - hw/darwin/quartz/cr/crAppleWM.m | 159 --- hw/darwin/quartz/cr/crFrame.m | 440 ------ hw/darwin/quartz/cr/crScreen.m | 382 ----- hw/darwin/quartz/fullscreen/fullscreen.c | 571 -------- hw/darwin/quartz/fullscreen/quartzCursor.c | 654 --------- hw/darwin/quartz/fullscreen/quartzCursor.h | 42 - hw/darwin/utils/Makefile.am | 11 - hw/darwin/utils/README.txt | 107 -- hw/darwin/utils/dumpkeymap.c | 1453 -------------------- hw/darwin/utils/dumpkeymap.man | 1002 -------------- 14 files changed, 2 insertions(+), 5001 deletions(-) delete mode 100644 hw/darwin/quartz/cr/XView.h delete mode 100644 hw/darwin/quartz/cr/XView.m delete mode 100644 hw/darwin/quartz/cr/cr.h delete mode 100644 hw/darwin/quartz/cr/crAppleWM.m delete mode 100644 hw/darwin/quartz/cr/crFrame.m delete mode 100644 hw/darwin/quartz/cr/crScreen.m delete mode 100644 hw/darwin/quartz/fullscreen/fullscreen.c delete mode 100644 hw/darwin/quartz/fullscreen/quartzCursor.c delete mode 100644 hw/darwin/quartz/fullscreen/quartzCursor.h delete mode 100644 hw/darwin/utils/Makefile.am delete mode 100644 hw/darwin/utils/README.txt delete mode 100644 hw/darwin/utils/dumpkeymap.c delete mode 100644 hw/darwin/utils/dumpkeymap.man diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index 136c41a0a..f5b9e752d 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -9,8 +9,8 @@ if X11APP X11APP_SUBDIRS = apple endif -SUBDIRS = quartz utils $(X11APP_SUBDIRS) -DIST_SUBDIRS = quartz utils apple launcher +SUBDIRS = quartz $(X11APP_SUBDIRS) +DIST_SUBDIRS = quartz apple bin_PROGRAMS = Xquartz man1_MANS = Xquartz.man diff --git a/hw/darwin/quartz/cr/XView.h b/hw/darwin/quartz/cr/XView.h deleted file mode 100644 index 26f789da2..000000000 --- a/hw/darwin/quartz/cr/XView.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * NSView subclass for Mac OS X rootless X server - * - * Copyright (c) 2001 Greg Parker. 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#import - -@interface XView : NSQuickDrawView - -- (BOOL)isFlipped; -- (BOOL)isOpaque; -- (BOOL)acceptsFirstResponder; -- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent; -- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent; - -- (void)mouseDown:(NSEvent *)anEvent; - -@end diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m deleted file mode 100644 index 130b15f59..000000000 --- a/hw/darwin/quartz/cr/XView.m +++ /dev/null @@ -1,77 +0,0 @@ -/* - * NSView subclass for Mac OS X rootless X server - * - * Each rootless window contains an instance of this class. - * This class handles events while drawing is handled by Carbon - * code in the rootless Aqua implementation. - * - * Copyright (c) 2001 Greg Parker. 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#import "XView.h" - - -@implementation XView - -- (BOOL)isFlipped -{ - return NO; -} - -- (BOOL)isOpaque -{ - return YES; -} - -- (BOOL)acceptsFirstResponder -{ - return YES; -} - -- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent -{ - return YES; -} - -- (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent *)theEvent -{ - return YES; -} - -- (void)mouseDown:(NSEvent *)anEvent -{ - // Only X is allowed to restack windows. - [NSApp preventWindowOrdering]; - if (! [NSApp isActive]) { - [NSApp activateIgnoringOtherApps:YES]; - } - [[self nextResponder] mouseDown:anEvent]; -} - -@end diff --git a/hw/darwin/quartz/cr/cr.h b/hw/darwin/quartz/cr/cr.h deleted file mode 100644 index 0ebad5da0..000000000 --- a/hw/darwin/quartz/cr/cr.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Internal definitions of the Cocoa rootless implementation - * - * Copyright (c) 2003 Torrey T. Lyons. 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#ifndef _CR_H -#define _CR_H - -#ifdef __OBJC__ -#import -#import "XView.h" -#else -typedef struct OpaqueNSWindow NSWindow; -typedef struct OpaqueXView XView; -#endif - -#undef BOOL -#define BOOL xBOOL -#include "screenint.h" -#include "window.h" -#undef BOOL - -// Predefined style for the window which is about to be framed -extern WindowPtr nextWindowToFrame; -extern unsigned int nextWindowStyle; - -typedef struct { - NSWindow *window; - XView *view; - GrafPtr port; - CGContextRef context; -} CRWindowRec, *CRWindowPtr; - -Bool CRInit(ScreenPtr pScreen); -void CRAppleWMInit(void); - -#endif /* _CR_H */ diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m deleted file mode 100644 index 246f52170..000000000 --- a/hw/darwin/quartz/cr/crAppleWM.m +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Cocoa rootless implementation functions for AppleWM extension - * - * Copyright (c) 2003 Torrey T. Lyons. 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "quartz/quartzCommon.h" -#include "quartz/cr/cr.h" - -#undef BOOL -#define BOOL xBOOL -#include "rootless.h" -#include "X11/X.h" -#define _APPLEWM_SERVER_ -#include "X11/extensions/applewm.h" -#include "quartz/applewmExt.h" -#undef BOOL - -#define StdDocumentStyleMask (NSTitledWindowMask | \ - NSClosableWindowMask | \ - NSMiniaturizableWindowMask | \ - NSResizableWindowMask) - -static int -CRDisableUpdate(void) -{ - return Success; -} - - -static int -CREnableUpdate(void) -{ - return Success; -} - - -static int CRSetWindowLevel( - WindowPtr pWin, - int level) -{ - CRWindowPtr crWinPtr; - - crWinPtr = (CRWindowPtr) RootlessFrameForWindow(pWin, TRUE); - if (crWinPtr == 0) - return BadWindow; - - RootlessStopDrawing(pWin, FALSE); - - [crWinPtr->window setLevel:level]; - - return Success; -} - - -static int CRFrameGetRect( - int type, - int class, - const BoxRec *outer, - const BoxRec *inner, - BoxRec *ret) -{ - return Success; -} - - -static int CRFrameHitTest( - int class, - int x, - int y, - const BoxRec *outer, - const BoxRec *inner, - int *ret) -{ - return 0; -} - - -static int CRFrameDraw( - WindowPtr pWin, - int class, - unsigned int attr, - const BoxRec *outer, - const BoxRec *inner, - unsigned int title_len, - const unsigned char *title_bytes) -{ - CRWindowPtr crWinPtr; - NSWindow *window; - Bool hasResizeIndicator; - - /* We assume the window has not yet been framed so - RootlessFrameForWindow() will cause it to be. Record the window - style so that the appropriate one will be used when it is framed. - If the window is already framed, we can't change the window - style and the following will have no effect. */ - - nextWindowToFrame = pWin; - if (class == AppleWMFrameClassDocument) - nextWindowStyle = StdDocumentStyleMask; - else - nextWindowStyle = NSBorderlessWindowMask; - - crWinPtr = (CRWindowPtr) RootlessFrameForWindow(pWin, TRUE); - if (crWinPtr == 0) - return BadWindow; - - window = crWinPtr->window; - - [window setTitle:[NSString stringWithCString:title_bytes - length:title_len]]; - - hasResizeIndicator = (attr & AppleWMFrameGrowBox) ? YES : NO; - [window setShowsResizeIndicator:hasResizeIndicator]; - - return Success; -} - - -static AppleWMProcsRec crAppleWMProcs = { - CRDisableUpdate, - CREnableUpdate, - CRSetWindowLevel, - CRFrameGetRect, - CRFrameHitTest, - CRFrameDraw -}; - - -void CRAppleWMInit(void) -{ - AppleWMExtensionInit(&crAppleWMProcs); -} diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m deleted file mode 100644 index 86c75d2e4..000000000 --- a/hw/darwin/quartz/cr/crFrame.m +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Cocoa rootless implementation frame functions - * - * Copyright (c) 2001 Greg Parker. All Rights Reserved. - * Copyright (c) 2002-2003 Torrey T. Lyons. 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "quartz/quartzCommon.h" -#include "quartz/cr/cr.h" - -#undef BOOL -#define BOOL xBOOL -#include "rootless.h" -#include "quartz/applewmExt.h" -#include "windowstr.h" -#undef BOOL - -WindowPtr nextWindowToFrame = NULL; -unsigned int nextWindowStyle = 0; - -static void CRReshapeFrame(RootlessFrameID wid, RegionPtr pShape); - - -/* - * CRCreateFrame - * Create a new physical window. - * Rootless windows must not autodisplay! Autodisplay can cause a deadlock. - * Event thread - autodisplay: locks view hierarchy, then window - * X Server thread - window resize: locks window, then view hierarchy - * Deadlock occurs if each thread gets one lock and waits for the other. - */ -static Bool -CRCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, - int newX, int newY, RegionPtr pShape) -{ - CRWindowPtr crWinPtr; - NSRect bounds; - NSWindow *theWindow; - XView *theView; - unsigned int theStyleMask = NSBorderlessWindowMask; - - crWinPtr = (CRWindowPtr) xalloc(sizeof(CRWindowRec)); - - bounds = NSMakeRect(newX, - NSHeight([[NSScreen mainScreen] frame]) - - newY - pFrame->height, - pFrame->width, pFrame->height); - - // Check if AppleWM has specified a style for this window - if (pFrame->win == nextWindowToFrame) { - theStyleMask = nextWindowStyle; - } - nextWindowToFrame = NULL; - - // Create an NSWindow for the new X11 window - theWindow = [[NSWindow alloc] initWithContentRect:bounds - styleMask:theStyleMask - backing:NSBackingStoreBuffered -#ifdef DEFER_NSWINDOW - defer:YES]; -#else - defer:NO]; -#endif - - if (!theWindow) return FALSE; - - [theWindow setBackgroundColor:[NSColor clearColor]]; // erase transparent - [theWindow setAlphaValue:1.0]; // draw opaque - [theWindow setOpaque:YES]; // changed when window is shaped - - [theWindow useOptimizedDrawing:YES]; // Has no overlapping sub-views - [theWindow setAutodisplay:NO]; // See comment above - [theWindow disableFlushWindow]; // We do all the flushing manually - [theWindow setHasShadow:YES]; // All windows have shadows - [theWindow setReleasedWhenClosed:YES]; // Default, but we want to be sure - - theView = [[XView alloc] initWithFrame:bounds]; - [theWindow setContentView:theView]; - [theWindow setInitialFirstResponder:theView]; - -#ifdef DEFER_NSWINDOW - // We need the NSWindow to actually be created now. - // If we had to defer creating it, we have to order it - // onto the screen to force it to be created. - - if (pFrame->win->prevSib) { - CRWindowPtr crWinPtr = (CRWindowPtr) RootlessFrameForWindow( - pFrame->win->prevSib, FALSE); - int upperNum = [crWinPtr->window windowNumber]; - [theWindow orderWindow:NSWindowBelow relativeTo:upperNum]; - } else { - [theWindow orderFront:nil]; - } -#endif - - [theWindow setAcceptsMouseMovedEvents:YES]; - - crWinPtr->window = theWindow; - crWinPtr->view = theView; - - [theView lockFocus]; - // Fill the window with white to make sure alpha channel is set - NSEraseRect(bounds); - crWinPtr->port = [theView qdPort]; - crWinPtr->context = [[NSGraphicsContext currentContext] graphicsPort]; - // CreateCGContextForPort(crWinPtr->port, &crWinPtr->context); - [theView unlockFocus]; - - // Store the implementation private frame ID - pFrame->wid = (RootlessFrameID) crWinPtr; - - // Reshape the frame if it was created shaped. - if (pShape != NULL) - CRReshapeFrame(pFrame->wid, pShape); - - return TRUE; -} - - -/* - * CRDestroyFrame - * Destroy a frame. - */ -static void -CRDestroyFrame(RootlessFrameID wid) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - - [crWinPtr->window orderOut:nil]; - [crWinPtr->window close]; - [crWinPtr->view release]; - free(crWinPtr); -} - - -/* - * CRMoveFrame - * Move a frame on screen. - */ -static void -CRMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - NSPoint topLeft; - - topLeft = NSMakePoint(newX, - NSHeight([[NSScreen mainScreen] frame]) - newY); - - [crWinPtr->window setFrameTopLeftPoint:topLeft]; -} - - -/* - * CRResizeFrame - * Move and resize a frame. - */ -static void -CRResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, - int newX, int newY, unsigned int newW, unsigned int newH, - unsigned int gravity) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - NSRect bounds = NSMakeRect(newX, NSHeight([[NSScreen mainScreen] frame]) - - newY - newH, newW, newH); - - [crWinPtr->window setFrame:bounds display:NO]; -} - - -/* - * CRRestackFrame - * Change the frame order. Put the frame behind nextWid or on top if - * it is NULL. Unmapped frames are mapped by restacking them. - */ -static void -CRRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - CRWindowPtr crNextWinPtr = (CRWindowPtr) nextWid; - - if (crNextWinPtr) { - int upperNum = [crNextWinPtr->window windowNumber]; - - [crWinPtr->window orderWindow:NSWindowBelow relativeTo:upperNum]; - } else { - [crWinPtr->window makeKeyAndOrderFront:nil]; - } -} - - -/* - * CRReshapeFrame - * Set the shape of a frame. - */ -static void -CRReshapeFrame(RootlessFrameID wid, RegionPtr pShape) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - NSRect bounds = [crWinPtr->view frame]; - int winHeight = NSHeight(bounds); - BoxRec localBox = {0, 0, NSWidth(bounds), winHeight}; - - [crWinPtr->view lockFocus]; - - if (pShape != NULL) { - // Calculate the region outside the new shape. - miInverse(pShape, pShape, &localBox); - } - - // If window is currently shaped we need to undo the previous shape. - if (![crWinPtr->window isOpaque]) { - [[NSColor whiteColor] set]; - NSRectFillUsingOperation(bounds, NSCompositeDestinationAtop); - } - - if (pShape != NULL) { - int count = REGION_NUM_RECTS(pShape); - BoxRec *extRects = REGION_RECTS(pShape); - BoxRec *rects, *end; - - // Make transparent if window is now shaped. - [crWinPtr->window setOpaque:NO]; - - // Clear the areas outside the window shape - [[NSColor clearColor] set]; - for (rects = extRects, end = extRects+count; rects < end; rects++) { - int rectHeight = rects->y2 - rects->y1; - NSRectFill( NSMakeRect(rects->x1, - winHeight - rects->y1 - rectHeight, - rects->x2 - rects->x1, rectHeight) ); - } - [[NSGraphicsContext currentContext] flushGraphics]; - - // force update of window shadow - [crWinPtr->window setHasShadow:NO]; - [crWinPtr->window setHasShadow:YES]; - - } else { - [crWinPtr->window setOpaque:YES]; - [[NSGraphicsContext currentContext] flushGraphics]; - } - - [crWinPtr->view unlockFocus]; -} - - -/* - * CRUnmapFrame - * Unmap a frame. - */ -static void -CRUnmapFrame(RootlessFrameID wid) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - - [crWinPtr->window orderOut:nil]; -} - - -/* - * CRStartDrawing - * When a window's buffer is not being drawn to, the CoreGraphics - * window server may compress or move it. Call this routine - * to lock down the buffer during direct drawing. It returns - * a pointer to the backing buffer. - */ -static void -CRStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - PixMapHandle pix; - - [crWinPtr->view lockFocus]; - crWinPtr->port = [crWinPtr->view qdPort]; - LockPortBits(crWinPtr->port); - [crWinPtr->view unlockFocus]; - pix = GetPortPixMap(crWinPtr->port); - - *pixelData = GetPixBaseAddr(pix); - *bytesPerRow = GetPixRowBytes(pix) & 0x3fff; // fixme is mask needed? -} - - -/* - * CRStopDrawing - * When direct access to a window's buffer is no longer needed, this - * routine should be called to allow CoreGraphics to compress or - * move it. - */ -static void -CRStopDrawing(RootlessFrameID wid, Bool flush) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - - UnlockPortBits(crWinPtr->port); - - if (flush) { - QDFlushPortBuffer(crWinPtr->port, NULL); - } -} - - -/* - * CRUpdateRegion - * Flush a region from a window's backing buffer to the screen. - */ -static void -CRUpdateRegion(RootlessFrameID wid, RegionPtr pDamage) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - -#ifdef ROOTLESS_TRACK_DAMAGE - int count = REGION_NUM_RECTS(pDamage); - BoxRec *rects = REGION_RECTS(pDamage); - BoxRec *end; - - static RgnHandle rgn = NULL; - static RgnHandle box = NULL; - - if (!rgn) rgn = NewRgn(); - if (!box) box = NewRgn(); - - for (end = rects+count; rects < end; rects++) { - Rect qdRect; - qdRect.left = rects->x1; - qdRect.top = rects->y1; - qdRect.right = rects->x2; - qdRect.bottom = rects->y2; - - RectRgn(box, &qdRect); - UnionRgn(rgn, box, rgn); - } - - QDFlushPortBuffer(crWinPtr->port, rgn); - - SetEmptyRgn(rgn); - SetEmptyRgn(box); - -#else /* !ROOTLESS_TRACK_DAMAGE */ - QDFlushPortBuffer(crWinPtr->port, NULL); -#endif -} - - -/* - * CRDamageRects - * Mark damaged rectangles as requiring redisplay to screen. - */ -static void -CRDamageRects(RootlessFrameID wid, int count, const BoxRec *rects, - int shift_x, int shift_y) -{ - CRWindowPtr crWinPtr = (CRWindowPtr) wid; - const BoxRec *end; - - for (end = rects + count; rects < end; rects++) { - Rect qdRect; - qdRect.left = rects->x1 + shift_x; - qdRect.top = rects->y1 + shift_y; - qdRect.right = rects->x2 + shift_x; - qdRect.bottom = rects->y2 + shift_y; - - QDAddRectToDirtyRegion(crWinPtr->port, &qdRect); - } -} - - -/* - * Called to check if the frame should be reordered when it is restacked. - */ -Bool CRDoReorderWindow(RootlessWindowPtr pFrame) -{ - WindowPtr pWin = pFrame->win; - - return AppleWMDoReorderWindow(pWin); -} - - -static RootlessFrameProcsRec CRRootlessProcs = { - CRCreateFrame, - CRDestroyFrame, - CRMoveFrame, - CRResizeFrame, - CRRestackFrame, - CRReshapeFrame, - CRUnmapFrame, - CRStartDrawing, - CRStopDrawing, - CRUpdateRegion, - CRDamageRects, - NULL, - CRDoReorderWindow, - NULL, - NULL, - NULL, - NULL -}; - - -/* - * Initialize CR implementation - */ -Bool -CRInit(ScreenPtr pScreen) -{ - RootlessInit(pScreen, &CRRootlessProcs); - - rootless_CopyBytes_threshold = 0; - rootless_FillBytes_threshold = 0; - rootless_CompositePixels_threshold = 0; - rootless_CopyWindow_threshold = 0; - - return TRUE; -} diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m deleted file mode 100644 index cc82afbd1..000000000 --- a/hw/darwin/quartz/cr/crScreen.m +++ /dev/null @@ -1,382 +0,0 @@ -/* - * Cocoa rootless implementation initialization - * - * Copyright (c) 2001 Greg Parker. All Rights Reserved. - * Copyright (c) 2002-2004 Torrey T. Lyons. 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "quartz/quartzCommon.h" -#include "quartz/cr/cr.h" - -#undef BOOL -#define BOOL xBOOL -#include "darwin.h" -#include "quartz/quartz.h" -#include "quartz/quartzCursor.h" -#include "rootless.h" -#include "safeAlpha/safeAlpha.h" -#include "quartz/pseudoramiX.h" -#include "quartz/applewmExt.h" - -#include "regionstr.h" -#include "scrnintstr.h" -#include "picturestr.h" -#include "globals.h" -#ifdef DAMAGE -# include "damage.h" -#endif -#undef BOOL - -// Name of GLX bundle using AGL framework -static const char *crOpenGLBundle = "glxAGL.bundle"; - -static Class classXView = nil; - - -/* - * CRDisplayInit - * Find all screens. - * - * Multihead note: When rootless mode uses PseudoramiX, the - * X server only sees one screen; only PseudoramiX itself knows - * about all of the screens. - */ -static void -CRDisplayInit(void) -{ - ErrorF("Display mode: Rootless Quartz -- Cocoa implementation\n"); - - if (noPseudoramiXExtension) { - darwinScreensFound = [[NSScreen screens] count]; - } else { - darwinScreensFound = 1; // only PseudoramiX knows about the rest - } - - CRAppleWMInit(); -} - - -/* - * CRAddPseudoramiXScreens - * Add a single virtual screen encompassing all the physical screens - * with PseudoramiX. - */ -static void -CRAddPseudoramiXScreens(int *x, int *y, int *width, int *height) -{ - int i; - NSRect unionRect = NSMakeRect(0, 0, 0, 0); - NSArray *screens = [NSScreen screens]; - - // Get the union of all screens (minus the menu bar on main screen) - for (i = 0; i < [screens count]; i++) { - NSScreen *screen = [screens objectAtIndex:i]; - NSRect frame = [screen frame]; - frame.origin.y = [[NSScreen mainScreen] frame].size.height - - frame.size.height - frame.origin.y; - if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { - frame.origin.y += aquaMenuBarHeight; - frame.size.height -= aquaMenuBarHeight; - } - unionRect = NSUnionRect(unionRect, frame); - } - - // Use unionRect as the screen size for the X server. - *x = unionRect.origin.x; - *y = unionRect.origin.y; - *width = unionRect.size.width; - *height = unionRect.size.height; - - // Tell PseudoramiX about the real screens. - // InitOutput() will move the big screen to (0,0), - // so compensate for that here. - for (i = 0; i < [screens count]; i++) { - NSScreen *screen = [screens objectAtIndex:i]; - NSRect frame = [screen frame]; - int j; - - // Skip this screen if it's a mirrored copy of an earlier screen. - for (j = 0; j < i; j++) { - if (NSEqualRects(frame, [[screens objectAtIndex:j] frame])) { - ErrorF("PseudoramiX screen %d is a mirror of screen %d.\n", - i, j); - break; - } - } - if (j < i) continue; // this screen is a mirrored copy - - frame.origin.y = [[NSScreen mainScreen] frame].size.height - - frame.size.height - frame.origin.y; - - if (NSEqualRects([screen frame], [[NSScreen mainScreen] frame])) { - frame.origin.y += aquaMenuBarHeight; - frame.size.height -= aquaMenuBarHeight; - } - - ErrorF("PseudoramiX screen %d added: %dx%d @ (%d,%d).\n", i, - (int)frame.size.width, (int)frame.size.height, - (int)frame.origin.x, (int)frame.origin.y); - - frame.origin.x -= unionRect.origin.x; - frame.origin.y -= unionRect.origin.y; - - ErrorF("PseudoramiX screen %d placed at X11 coordinate (%d,%d).\n", - i, (int)frame.origin.x, (int)frame.origin.y); - - PseudoramiXAddScreen(frame.origin.x, frame.origin.y, - frame.size.width, frame.size.height); - } -} - - -/* - * CRScreenParams - * Set the basic screen parameters. - */ -static void -CRScreenParams(int index, DarwinFramebufferPtr dfb) -{ - dfb->bitsPerComponent = CGDisplayBitsPerSample(kCGDirectMainDisplay); - dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); - dfb->colorBitsPerPixel = 3 * dfb->bitsPerComponent; - - if (noPseudoramiXExtension) { - NSScreen *screen = [[NSScreen screens] objectAtIndex:index]; - NSRect frame = [screen frame]; - - // set x, y so (0,0) is top left of main screen - dfb->x = NSMinX(frame); - dfb->y = NSHeight([[NSScreen mainScreen] frame]) - - NSHeight(frame) - NSMinY(frame); - - dfb->width = NSWidth(frame); - dfb->height = NSHeight(frame); - - // Shift the usable part of main screen down to avoid the menu bar. - if (NSEqualRects(frame, [[NSScreen mainScreen] frame])) { - dfb->y += aquaMenuBarHeight; - dfb->height -= aquaMenuBarHeight; - } - - } else { - CRAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height); - } -} - - -/* - * CRAddScreen - * Init the framebuffer and record pixmap parameters for the screen. - */ -static Bool -CRAddScreen(int index, ScreenPtr pScreen) -{ - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); - CGRect cgRect; - CGDisplayCount numDisplays; - CGDisplayCount allocatedDisplays = 0; - CGDirectDisplayID *displays = NULL; - CGDisplayErr cgErr; - - CRScreenParams(index, dfb); - - dfb->colorType = TrueColor; - - /* Passing zero width (pitch) makes miCreateScreenResources set the - screen pixmap to the framebuffer pointer, i.e. NULL. The generic - rootless code takes care of making this work. */ - dfb->pitch = 0; - dfb->framebuffer = NULL; - - // Get all CoreGraphics displays covered by this X11 display. - cgRect = CGRectMake(dfb->x, dfb->y, dfb->width, dfb->height); - do { - cgErr = CGGetDisplaysWithRect(cgRect, 0, NULL, &numDisplays); - if (cgErr) break; - allocatedDisplays = numDisplays; - displays = xrealloc(displays, - numDisplays * sizeof(CGDirectDisplayID)); - cgErr = CGGetDisplaysWithRect(cgRect, allocatedDisplays, displays, - &numDisplays); - if (cgErr != CGDisplayNoErr) break; - } while (numDisplays > allocatedDisplays); - - if (cgErr != CGDisplayNoErr || numDisplays == 0) { - ErrorF("Could not find CGDirectDisplayID(s) for X11 screen %d: %dx%d @ %d,%d.\n", - index, dfb->width, dfb->height, dfb->x, dfb->y); - return FALSE; - } - - // This X11 screen covers all CoreGraphics displays we just found. - // If there's more than one CG display, then video mirroring is on - // or PseudoramiX is on. - displayInfo->displayCount = allocatedDisplays; - displayInfo->displayIDs = displays; - - return TRUE; -} - - -/* - * CRSetupScreen - * Setup the screen for rootless access. - */ -static Bool -CRSetupScreen(int index, ScreenPtr pScreen) -{ - // Add alpha protecting replacements for fb screen functions - pScreen->PaintWindowBackground = SafeAlphaPaintWindow; - pScreen->PaintWindowBorder = SafeAlphaPaintWindow; - -#ifdef RENDER - { - PictureScreenPtr ps = GetPictureScreen(pScreen); - ps->Composite = SafeAlphaComposite; - } -#endif /* RENDER */ - - // Initialize accelerated rootless drawing - // Note that this must be done before DamageSetup(). - RootlessAccelInit(pScreen); - -#ifdef DAMAGE - // The Damage extension needs to wrap underneath the - // generic rootless layer, so do it now. - if (!DamageSetup(pScreen)) - return FALSE; -#endif - - // Initialize generic rootless code - return CRInit(pScreen); -} - - -/* - * CRScreenChanged - * Configuration of displays has changed. - */ -static void -CRScreenChanged(void) -{ - QuartzMessageServerThread(kXDarwinDisplayChanged, 0); -} - - -/* - * CRUpdateScreen - * Update screen after configuation change. - */ -static void -CRUpdateScreen(ScreenPtr pScreen) -{ - rootlessGlobalOffsetX = darwinMainScreenX; - rootlessGlobalOffsetY = darwinMainScreenY; - - AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]); - - RootlessRepositionWindows(pScreen); - RootlessUpdateScreenPixmap(pScreen); -} - - -/* - * CRInitInput - * Finalize CR specific setup. - */ -static void -CRInitInput(int argc, char **argv) -{ - int i; - - rootlessGlobalOffsetX = darwinMainScreenX; - rootlessGlobalOffsetY = darwinMainScreenY; - - for (i = 0; i < screenInfo.numScreens; i++) - AppleWMSetScreenOrigin(WindowTable[i]); -} - - -/* - * CRIsX11Window - * Returns TRUE if cr is displaying this window. - */ -static Bool -CRIsX11Window(void *nsWindow, int windowNumber) -{ - NSWindow *theWindow = nsWindow; - - if (!theWindow) - return FALSE; - - if ([[theWindow contentView] isKindOfClass:classXView]) - return TRUE; - else - return FALSE; -} - - -/* - * Quartz display mode function list. - */ -static QuartzModeProcsRec crModeProcs = { - CRDisplayInit, - CRAddScreen, - CRSetupScreen, - CRInitInput, - QuartzInitCursor, - QuartzReallySetCursor, - QuartzSuspendXCursor, - QuartzResumeXCursor, - NULL, // No capture or release in rootless mode - NULL, - CRScreenChanged, - CRAddPseudoramiXScreens, - CRUpdateScreen, - CRIsX11Window, - NULL, // Cocoa NSWindows hide themselves - RootlessFrameForWindow, - TopLevelParent, - NULL, // No support for DRI surfaces - NULL -}; - - -/* - * QuartzModeBundleInit - * Initialize the display mode bundle after loading. - */ -Bool -QuartzModeBundleInit(void) -{ - quartzProcs = &crModeProcs; - quartzOpenGLBundle = crOpenGLBundle; - classXView = [XView class]; - return TRUE; -} diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c deleted file mode 100644 index c4a049f8f..000000000 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ /dev/null @@ -1,571 +0,0 @@ -/* - * Screen routines for full screen Quartz mode - * - * Copyright (c) 2002-2003 Torrey T. Lyons. 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * TORREY T. LYONS 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "quartz/quartzCommon.h" -#include "darwin.h" -#include "quartz/quartz.h" -#include "quartz/quartzCursor.h" -#include "colormapst.h" -#include "scrnintstr.h" -#include "micmap.h" -#include "shadow.h" - -// Full screen specific per screen storage structure -typedef struct { - CGDirectDisplayID displayID; - CFDictionaryRef xDisplayMode; - CFDictionaryRef aquaDisplayMode; - CGDirectPaletteRef xPalette; - CGDirectPaletteRef aquaPalette; - unsigned char *framebuffer; - unsigned char *shadowPtr; -} FSScreenRec, *FSScreenPtr; - -#define FULLSCREEN_PRIV(pScreen) \ - ((FSScreenPtr)pScreen->devPrivates[fsScreenIndex].ptr) - -static int fsScreenIndex; -static CGDirectDisplayID *quartzDisplayList = NULL; -static int quartzNumScreens = 0; -static FSScreenPtr quartzScreens[MAXSCREENS]; - -static int darwinCmapPrivateIndex = -1; -static unsigned long darwinCmapGeneration = 0; - -#define CMAP_PRIV(pCmap) \ - ((CGDirectPaletteRef) (pCmap)->devPrivates[darwinCmapPrivateIndex].ptr) - -/* - ============================================================================= - - Colormap handling - - ============================================================================= -*/ - -/* - * FSInitCmapPrivates - * Colormap privates may be allocated after the default colormap has - * already been created for some screens. This initialization procedure - * is called for each default colormap that is found. - */ -static Bool -FSInitCmapPrivates( - ColormapPtr pCmap) -{ - return TRUE; -} - - -/* - * FSCreateColormap - * This is a callback from X after a new colormap is created. - * We allocate a new CoreGraphics pallete for each colormap. - */ -static Bool -FSCreateColormap( - ColormapPtr pCmap) -{ - CGDirectPaletteRef pallete; - - // Allocate private storage for the hardware dependent colormap info. - if (darwinCmapGeneration != serverGeneration) { - if ((darwinCmapPrivateIndex = - AllocateColormapPrivateIndex(FSInitCmapPrivates)) < 0) - { - return FALSE; - } - darwinCmapGeneration = serverGeneration; - } - - pallete = CGPaletteCreateDefaultColorPalette(); - if (!pallete) return FALSE; - - CMAP_PRIV(pCmap) = pallete; - return TRUE; -} - - -/* - * FSDestroyColormap - * This is called by DIX FreeColormap after it has uninstalled a colormap - * and notified all interested parties. We deallocated the corresponding - * CoreGraphics pallete. - */ -static void -FSDestroyColormap( - ColormapPtr pCmap) -{ - CGPaletteRelease( CMAP_PRIV(pCmap) ); -} - - -/* - * FSInstallColormap - * Set the current CoreGraphics pallete to the pallete corresponding - * to the provided colormap. - */ -static void -FSInstallColormap( - ColormapPtr pCmap) -{ - CGDirectPaletteRef palette = CMAP_PRIV(pCmap); - ScreenPtr pScreen = pCmap->pScreen; - FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); - - // Inform all interested parties that the map is being changed. - miInstallColormap(pCmap); - - if (quartzServerVisible) - CGDisplaySetPalette(fsDisplayInfo->displayID, palette); - - fsDisplayInfo->xPalette = palette; -} - - -/* - * FSStoreColors - * This is a callback from X to change the hardware colormap - * when using PsuedoColor in full screen mode. - */ -static void -FSStoreColors( - ColormapPtr pCmap, - int numEntries, - xColorItem *pdefs) -{ - CGDirectPaletteRef palette = CMAP_PRIV(pCmap); - ScreenPtr pScreen = pCmap->pScreen; - FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); - CGDeviceColor color; - int i; - - if (! palette) - return; - - for (i = 0; i < numEntries; i++) { - color.red = pdefs[i].red / 65535.0; - color.green = pdefs[i].green / 65535.0; - color.blue = pdefs[i].blue / 65535.0; - CGPaletteSetColorAtIndex(palette, color, pdefs[i].pixel); - } - - // Update hardware colormap - if (quartzServerVisible) - CGDisplaySetPalette(fsDisplayInfo->displayID, palette); -} - - -/* - ============================================================================= - - Switching between Aqua and X - - ============================================================================= -*/ - -/* - * FSCapture - * Capture the screen so we can draw. Called directly from the main thread - * to synchronize with hiding the menubar. - */ -static void FSCapture(void) -{ - int i; - - if (quartzRootless) return; - - for (i = 0; i < quartzNumScreens; i++) { - FSScreenPtr fsDisplayInfo = quartzScreens[i]; - CGDirectDisplayID cgID = fsDisplayInfo->displayID; - - if (!CGDisplayIsCaptured(cgID)) { - CGDisplayCapture(cgID); - fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID); - if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode) - CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode); - if (fsDisplayInfo->xPalette) - CGDisplaySetPalette(cgID, fsDisplayInfo->xPalette); - } - } -} - - -/* - * FSRelease - * Release the screen so others can draw. - */ -static void FSRelease(void) -{ - int i; - - if (quartzRootless) return; - - for (i = 0; i < quartzNumScreens; i++) { - FSScreenPtr fsDisplayInfo = quartzScreens[i]; - CGDirectDisplayID cgID = fsDisplayInfo->displayID; - - if (CGDisplayIsCaptured(cgID)) { - if (fsDisplayInfo->xDisplayMode != fsDisplayInfo->aquaDisplayMode) - CGDisplaySwitchToMode(cgID, fsDisplayInfo->aquaDisplayMode); - if (fsDisplayInfo->aquaPalette) - CGDisplaySetPalette(cgID, fsDisplayInfo->aquaPalette); - CGDisplayRelease(cgID); - } - } -} - - -/* - * FSSuspendScreen - * Suspend X11 cursor and drawing to the screen. - */ -static void FSSuspendScreen( - ScreenPtr pScreen) -{ - QuartzSuspendXCursor(pScreen); - xf86SetRootClip(pScreen, FALSE); -} - - -/* - * FSResumeScreen - * Resume X11 cursor and drawing to the screen. - */ -static void FSResumeScreen( - ScreenPtr pScreen, - int x, // cursor location - int y ) -{ - QuartzResumeXCursor(pScreen, x, y); - xf86SetRootClip(pScreen, TRUE); -} - - -/* - ============================================================================= - - Screen initialization - - ============================================================================= -*/ - -/* - * FSDisplayInit - * Full screen specific initialization called from InitOutput. - */ -static void FSDisplayInit(void) -{ - static unsigned long generation = 0; - CGDisplayCount quartzDisplayCount = 0; - - ErrorF("Display mode: Full screen Quartz -- Direct Display\n"); - - // Allocate private storage for each screen's mode specific info - if (generation != serverGeneration) { - fsScreenIndex = AllocateScreenPrivateIndex(); - generation = serverGeneration; - } - - // Find all the CoreGraphics displays - CGGetActiveDisplayList(0, NULL, &quartzDisplayCount); - quartzDisplayList = xalloc(quartzDisplayCount * sizeof(CGDirectDisplayID)); - CGGetActiveDisplayList(quartzDisplayCount, quartzDisplayList, - &quartzDisplayCount); - - darwinScreensFound = quartzDisplayCount; - atexit(FSRelease); -} - - -/* - * FSFindDisplayMode - * Find the appropriate display mode to use in full screen mode. - * If display mode is not the same as the current Aqua mode, switch - * to the new mode. - */ -static Bool FSFindDisplayMode( - FSScreenPtr fsDisplayInfo) -{ - CGDirectDisplayID cgID = fsDisplayInfo->displayID; - size_t height, width, bpp; - boolean_t exactMatch; - - fsDisplayInfo->aquaDisplayMode = CGDisplayCurrentMode(cgID); - - // If no user options, use current display mode - if (darwinDesiredWidth == 0 && darwinDesiredDepth == -1 && - darwinDesiredRefresh == -1) - { - fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode; - return TRUE; - } - - // If the user has no choice for size, use current - if (darwinDesiredWidth == 0) { - width = CGDisplayPixelsWide(cgID); - height = CGDisplayPixelsHigh(cgID); - } else { - width = darwinDesiredWidth; - height = darwinDesiredHeight; - } - - switch (darwinDesiredDepth) { - case 0: - bpp = 8; - break; - case 1: - bpp = 16; - break; - case 2: - bpp = 32; - break; - default: - bpp = CGDisplayBitsPerPixel(cgID); - } - - if (darwinDesiredRefresh == -1) { - fsDisplayInfo->xDisplayMode = - CGDisplayBestModeForParameters(cgID, bpp, width, height, - &exactMatch); - } else { - fsDisplayInfo->xDisplayMode = - CGDisplayBestModeForParametersAndRefreshRate(cgID, bpp, - width, height, darwinDesiredRefresh, &exactMatch); - } - if (!exactMatch) { - fsDisplayInfo->xDisplayMode = fsDisplayInfo->aquaDisplayMode; - return FALSE; - } - - // Switch to the new display mode - CGDisplaySwitchToMode(cgID, fsDisplayInfo->xDisplayMode); - return TRUE; -} - - -/* - * FSAddScreen - * Do initialization of each screen for Quartz in full screen mode. - */ -static Bool FSAddScreen( - int index, - ScreenPtr pScreen) -{ - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - QuartzScreenPtr displayInfo = QUARTZ_PRIV(pScreen); - CGDirectDisplayID cgID = quartzDisplayList[index]; - CGRect bounds; - FSScreenPtr fsDisplayInfo; - - // Allocate space for private per screen fullscreen specific storage. - fsDisplayInfo = xalloc(sizeof(FSScreenRec)); - FULLSCREEN_PRIV(pScreen) = fsDisplayInfo; - - displayInfo->displayCount = 1; - displayInfo->displayIDs = xrealloc(displayInfo->displayIDs, - 1 * sizeof(CGDirectDisplayID)); - displayInfo->displayIDs[0] = cgID; - - fsDisplayInfo->displayID = cgID; - fsDisplayInfo->xDisplayMode = 0; - fsDisplayInfo->aquaDisplayMode = 0; - fsDisplayInfo->xPalette = 0; - fsDisplayInfo->aquaPalette = 0; - - // Capture full screen because X doesn't like read-only framebuffer. - // We need to do this before we (potentially) switch the display mode. - CGDisplayCapture(cgID); - - if (! FSFindDisplayMode(fsDisplayInfo)) { - ErrorF("Could not support specified display mode on screen %i.\n", - index); - xfree(fsDisplayInfo); - return FALSE; - } - - // Don't need to flip y-coordinate as CoreGraphics treats (0, 0) - // as the top left of main screen. - bounds = CGDisplayBounds(cgID); - dfb->x = bounds.origin.x; - dfb->y = bounds.origin.y; - dfb->width = bounds.size.width; - dfb->height = bounds.size.height; - dfb->pitch = CGDisplayBytesPerRow(cgID); - dfb->bitsPerPixel = CGDisplayBitsPerPixel(cgID); - - if (dfb->bitsPerPixel == 8) { - if (CGDisplayCanSetPalette(cgID)) { - dfb->colorType = PseudoColor; - } else { - dfb->colorType = StaticColor; - } - dfb->bitsPerComponent = 8; - dfb->colorBitsPerPixel = 8; - } else { - dfb->colorType = TrueColor; - dfb->bitsPerComponent = CGDisplayBitsPerSample(cgID); - dfb->colorBitsPerPixel = CGDisplaySamplesPerPixel(cgID) * - dfb->bitsPerComponent; - } - - fsDisplayInfo->framebuffer = CGDisplayBaseAddress(cgID); - - // allocate shadow framebuffer - fsDisplayInfo->shadowPtr = xalloc(dfb->pitch * dfb->height); - dfb->framebuffer = fsDisplayInfo->shadowPtr; - - return TRUE; -} - - -/* - * FSShadowUpdate - * Update the damaged regions of the shadow framebuffer on the display. - */ -static void FSShadowUpdate( - ScreenPtr pScreen, - shadowBufPtr pBuf) -{ - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); - RegionPtr damage = &pBuf->damage; - int numBox = REGION_NUM_RECTS(damage); - BoxPtr pBox = REGION_RECTS(damage); - int pitch = dfb->pitch; - int bpp = dfb->bitsPerPixel/8; - - // Don't update if the X server is not visible - if (!quartzServerVisible) - return; - - // Loop through all the damaged boxes - while (numBox--) { - int width, height, offset; - unsigned char *src, *dst; - - width = (pBox->x2 - pBox->x1) * bpp; - height = pBox->y2 - pBox->y1; - offset = (pBox->y1 * pitch) + (pBox->x1 * bpp); - src = fsDisplayInfo->shadowPtr + offset; - dst = fsDisplayInfo->framebuffer + offset; - - while (height--) { - memcpy(dst, src, width); - dst += pitch; - src += pitch; - } - - // Get the next box - pBox++; - } -} - - -/* - * FSSetupScreen - * Finalize full screen specific setup of each screen. - */ -static Bool FSSetupScreen( - int index, - ScreenPtr pScreen) -{ - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - FSScreenPtr fsDisplayInfo = FULLSCREEN_PRIV(pScreen); - CGDirectDisplayID cgID = fsDisplayInfo->displayID; - - // Initialize shadow framebuffer support - if (! shadowInit(pScreen, FSShadowUpdate, NULL)) { - ErrorF("Failed to initalize shadow framebuffer for screen %i.\n", - index); - return FALSE; - } - - if (dfb->colorType == PseudoColor) { - // Initialize colormap handling - size_t aquaBpp; - - // If Aqua is using 8 bits we need to keep track of its pallete. - CFNumberGetValue(CFDictionaryGetValue(fsDisplayInfo->aquaDisplayMode, - kCGDisplayBitsPerPixel), kCFNumberLongType, &aquaBpp); - if (aquaBpp <= 8) - fsDisplayInfo->aquaPalette = CGPaletteCreateWithDisplay(cgID); - - pScreen->CreateColormap = FSCreateColormap; - pScreen->DestroyColormap = FSDestroyColormap; - pScreen->InstallColormap = FSInstallColormap; - pScreen->StoreColors = FSStoreColors; - - } - - quartzScreens[quartzNumScreens++] = fsDisplayInfo; - return TRUE; -} - - -/* - * Quartz display mode function list. - */ -static QuartzModeProcsRec fsModeProcs = { - FSDisplayInit, - FSAddScreen, - FSSetupScreen, - NULL, // Not needed - QuartzInitCursor, - QuartzReallySetCursor, - FSSuspendScreen, - FSResumeScreen, - FSCapture, - FSRelease, - NULL, // No dynamic screen change support - NULL, - NULL, - NULL, // No rootless code in fullscreen - NULL, - NULL, - NULL, - NULL, // No support for DRI surfaces - NULL -}; - - -/* - * QuartzModeBundleInit - * Initialize the display mode bundle after loading. - */ -Bool -QuartzModeBundleInit(void) -{ - quartzProcs = &fsModeProcs; - quartzOpenGLBundle = NULL; // Only Mesa support for now - return TRUE; -} diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c deleted file mode 100644 index 3ffa1c3d8..000000000 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ /dev/null @@ -1,654 +0,0 @@ -/************************************************************** - * - * Support for using the Quartz Window Manager cursor - * - * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker. - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "quartz/quartzCommon.h" -#include "quartz/quartzCursor.h" -#include "darwin.h" - -#include - -#include "mi.h" -#include "scrnintstr.h" -#include "cursorstr.h" -#include "mipointrst.h" -#include "globals.h" - -// Size of the QuickDraw cursor -#define CURSORWIDTH 16 -#define CURSORHEIGHT 16 - -typedef struct { - int qdCursorMode; - int qdCursorVisible; - int useQDCursor; - QueryBestSizeProcPtr QueryBestSize; - miPointerSpriteFuncPtr spriteFuncs; -} QuartzCursorScreenRec, *QuartzCursorScreenPtr; - -static int darwinCursorScreenIndex = -1; -static unsigned long darwinCursorGeneration = 0; -static CursorPtr quartzLatentCursor = NULL; -static QD_Cursor gQDArrow; // QuickDraw arrow cursor - -// Cursor for the main thread to set (NULL = arrow cursor). -static CCrsrHandle currentCursor = NULL; -static pthread_mutex_t cursorMutex; -static pthread_cond_t cursorCondition; - -#define CURSOR_PRIV(pScreen) \ - ((QuartzCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) - -#define HIDE_QD_CURSOR(pScreen, visible) \ - if (visible) { \ - int ix; \ - for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ - CGDisplayHideCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ - } \ - visible = FALSE; \ - } ((void)0) - -#define SHOW_QD_CURSOR(pScreen, visible) \ - { \ - int ix; \ - for (ix = 0; ix < QUARTZ_PRIV(pScreen)->displayCount; ix++) { \ - CGDisplayShowCursor(QUARTZ_PRIV(pScreen)->displayIDs[ix]); \ - } \ - visible = TRUE; \ - } ((void)0) - -#define CHANGE_QD_CURSOR(cursorH) \ - if (!quartzServerQuitting) { \ - /* Acquire lock and tell the main thread to change cursor */ \ - pthread_mutex_lock(&cursorMutex); \ - currentCursor = (CCrsrHandle) (cursorH); \ - QuartzMessageMainThread(kQuartzCursorUpdate, NULL, 0); \ - \ - /* Wait for the main thread to change the cursor */ \ - pthread_cond_wait(&cursorCondition, &cursorMutex); \ - pthread_mutex_unlock(&cursorMutex); \ - } ((void)0) - - -/* - * MakeQDCursor helpers: CTAB_ENTER, interleave - */ - -// Add a color entry to a ctab -#define CTAB_ENTER(ctab, index, r, g, b) \ - ctab->ctTable[index].value = index; \ - ctab->ctTable[index].rgb.red = r; \ - ctab->ctTable[index].rgb.green = g; \ - ctab->ctTable[index].rgb.blue = b - -// Make an unsigned short by interleaving the bits of bytes c1 and c2. -// High bit of c1 is first; low bit of c2 is last. -// Interleave is a built-in INTERCAL operator. -static unsigned short -interleave( - unsigned char c1, - unsigned char c2 ) -{ - return - ((c1 & 0x80) << 8) | ((c2 & 0x80) << 7) | - ((c1 & 0x40) << 7) | ((c2 & 0x40) << 6) | - ((c1 & 0x20) << 6) | ((c2 & 0x20) << 5) | - ((c1 & 0x10) << 5) | ((c2 & 0x10) << 4) | - ((c1 & 0x08) << 4) | ((c2 & 0x08) << 3) | - ((c1 & 0x04) << 3) | ((c2 & 0x04) << 2) | - ((c1 & 0x02) << 2) | ((c2 & 0x02) << 1) | - ((c1 & 0x01) << 1) | ((c2 & 0x01) << 0) ; -} - -/* - * MakeQDCursor - * Make a QuickDraw color cursor from the given X11 cursor. - * Warning: This code is nasty. Color cursors were meant to be read - * from resources; constructing the structures programmatically is messy. - */ -/* - QuickDraw cursor representation: - Our color cursor is a 2 bit per pixel pixmap. - Each pixel's bits are (source<<1 | mask) from the original X cursor pixel. - The cursor's color table maps the colors like this: - (2-bit value | X result | colortable | Mac result) - 00 | transparent | white | transparent (white outside mask) - 01 | back color | back color | back color - 10 | undefined | black | invert background (just for fun) - 11 | fore color | fore color | fore color -*/ -static CCrsrHandle -MakeQDCursor( - CursorPtr pCursor ) -{ - CCrsrHandle result; - CCrsrPtr curs; - int i, w, h; - unsigned short rowMask; - PixMap *pix; - ColorTable *ctab; - unsigned short *image; - - result = (CCrsrHandle) NewHandleClear(sizeof(CCrsr)); - if (!result) return NULL; - HLock((Handle)result); - curs = *result; - - // Initialize CCrsr - curs->crsrType = 0x8001; // 0x8000 = b&w, 0x8001 = color - curs->crsrMap = (PixMapHandle) NewHandleClear(sizeof(PixMap)); - if (!curs->crsrMap) goto pixAllocFailed; - HLock((Handle)curs->crsrMap); - pix = *curs->crsrMap; - curs->crsrData = NULL; // raw cursor image data (set below) - curs->crsrXData = NULL; // QD's processed data - curs->crsrXValid = 0; // zero means QD must re-process cursor data - curs->crsrXHandle = NULL; // reserved - memset(curs->crsr1Data, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w data - memset(curs->crsrMask, 0, CURSORWIDTH*CURSORHEIGHT/8); // b&w & color mask - curs->crsrHotSpot.h = min(CURSORWIDTH, pCursor->bits->xhot); // hot spot - curs->crsrHotSpot.v = min(CURSORHEIGHT, pCursor->bits->yhot); // hot spot - curs->crsrXTable = 0; // reserved - curs->crsrID = GetCTSeed(); // unique ID from Color Manager - - // Set the b&w data and mask - w = min(pCursor->bits->width, CURSORWIDTH); - h = min(pCursor->bits->height, CURSORHEIGHT); - rowMask = ~((1 << (CURSORWIDTH - w)) - 1); - for (i = 0; i < h; i++) { - curs->crsr1Data[i] = rowMask & - ((pCursor->bits->source[i*4]<<8) | pCursor->bits->source[i*4+1]); - curs->crsrMask[i] = rowMask & - ((pCursor->bits->mask[i*4]<<8) | pCursor->bits->mask[i*4+1]); - } - - // Set the color data and mask - // crsrMap: defines bit depth and size and colortable only - pix->rowBytes = (CURSORWIDTH * 2 / 8) | 0x8000; // last bit on means PixMap - SetRect(&pix->bounds, 0, 0, CURSORWIDTH, CURSORHEIGHT); // see TN 1020 - pix->pixelSize = 2; - pix->cmpCount = 1; - pix->cmpSize = 2; - // pix->pmTable set below - - // crsrData is the pixel data. crsrMap's baseAddr is not used. - curs->crsrData = NewHandleClear(CURSORWIDTH*CURSORHEIGHT * 2 / 8); - if (!curs->crsrData) goto imageAllocFailed; - HLock((Handle)curs->crsrData); - image = (unsigned short *) *curs->crsrData; - // Pixel data is just 1-bit data and mask interleaved (see above) - for (i = 0; i < h; i++) { - unsigned char s, m; - s = pCursor->bits->source[i*4] & (rowMask >> 8); - m = pCursor->bits->mask[i*4] & (rowMask >> 8); - image[2*i] = interleave(s, m); - s = pCursor->bits->source[i*4+1] & (rowMask & 0x00ff); - m = pCursor->bits->mask[i*4+1] & (rowMask & 0x00ff); - image[2*i+1] = interleave(s, m); - } - - // Build the color table (entries described above) - // NewPixMap allocates a color table handle. - pix->pmTable = (CTabHandle) NewHandleClear(sizeof(ColorTable) + 3 - * sizeof(ColorSpec)); - if (!pix->pmTable) goto ctabAllocFailed; - HLock((Handle)pix->pmTable); - ctab = *pix->pmTable; - ctab->ctSeed = GetCTSeed(); - ctab->ctFlags = 0; - ctab->ctSize = 3; // color count - 1 - CTAB_ENTER(ctab, 0, 0xffff, 0xffff, 0xffff); - CTAB_ENTER(ctab, 1, pCursor->backRed, pCursor->backGreen, - pCursor->backBlue); - CTAB_ENTER(ctab, 2, 0x0000, 0x0000, 0x0000); - CTAB_ENTER(ctab, 3, pCursor->foreRed, pCursor->foreGreen, - pCursor->foreBlue); - - HUnlock((Handle)pix->pmTable); // ctab - HUnlock((Handle)curs->crsrData); // image data - HUnlock((Handle)curs->crsrMap); // pix - HUnlock((Handle)result); // cursor - - return result; - - // "What we have here is a failure to allocate" -ctabAllocFailed: - HUnlock((Handle)curs->crsrData); - DisposeHandle((Handle)curs->crsrData); -imageAllocFailed: - HUnlock((Handle)curs->crsrMap); - DisposeHandle((Handle)curs->crsrMap); -pixAllocFailed: - HUnlock((Handle)result); - DisposeHandle((Handle)result); - return NULL; -} - - -/* - * FreeQDCursor - * Destroy a QuickDraw color cursor created with MakeQDCursor(). - * The cursor must not currently be on screen. - */ -static void FreeQDCursor(CCrsrHandle cursHandle) -{ - CCrsrPtr curs; - PixMap *pix; - - HLock((Handle)cursHandle); - curs = *cursHandle; - HLock((Handle)curs->crsrMap); - pix = *curs->crsrMap; - DisposeHandle((Handle)pix->pmTable); - HUnlock((Handle)curs->crsrMap); - DisposeHandle((Handle)curs->crsrMap); - DisposeHandle((Handle)curs->crsrData); - HUnlock((Handle)cursHandle); - DisposeHandle((Handle)cursHandle); -} - - -/* -=========================================================================== - - Pointer sprite functions - -=========================================================================== -*/ - -/* - * QuartzRealizeCursor - * Convert the X cursor representation to QuickDraw format if possible. - */ -Bool -QuartzRealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor ) -{ - CCrsrHandle qdCursor; - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - if(!pCursor || !pCursor->bits) - return FALSE; - - // if the cursor is too big we use a software cursor - if ((pCursor->bits->height > CURSORHEIGHT) || - (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor) - { - if (quartzRootless) { - // rootless can't use a software cursor - return TRUE; - } else { - return (*ScreenPriv->spriteFuncs->RealizeCursor) - (pScreen, pCursor); - } - } - - // make new cursor image - qdCursor = MakeQDCursor(pCursor); - if (!qdCursor) return FALSE; - - // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) qdCursor; - - return TRUE; -} - - -/* - * QuartzUnrealizeCursor - * Free the storage space associated with a realized cursor. - */ -Bool -QuartzUnrealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor ) -{ - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - if ((pCursor->bits->height > CURSORHEIGHT) || - (pCursor->bits->width > CURSORWIDTH) || !ScreenPriv->useQDCursor) - { - if (quartzRootless) { - return TRUE; - } else { - return (*ScreenPriv->spriteFuncs->UnrealizeCursor) - (pScreen, pCursor); - } - } else { - CCrsrHandle oldCursor = (CCrsrHandle) pCursor->devPriv[pScreen->myNum]; - - if (currentCursor != oldCursor) { - // This should only fail when quitting, in which case we just leak. - FreeQDCursor(oldCursor); - } - pCursor->devPriv[pScreen->myNum] = NULL; - return TRUE; - } -} - - -/* - * QuartzSetCursor - * Set the cursor sprite and position. - * Use QuickDraw cursor if possible. - */ -static void -QuartzSetCursor( - ScreenPtr pScreen, - CursorPtr pCursor, - int x, - int y) -{ - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - quartzLatentCursor = pCursor; - - // Don't touch Mac OS cursor if X is hidden! - if (!quartzServerVisible) - return; - - if (!pCursor) { - // Remove the cursor completely. - HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); - if (! ScreenPriv->qdCursorMode) - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); - } - else if ((pCursor->bits->height <= CURSORHEIGHT) && - (pCursor->bits->width <= CURSORWIDTH) && ScreenPriv->useQDCursor) - { - // Cursor is small enough to use QuickDraw directly. - if (! ScreenPriv->qdCursorMode) // remove the X cursor - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); - ScreenPriv->qdCursorMode = TRUE; - - CHANGE_QD_CURSOR(pCursor->devPriv[pScreen->myNum]); - SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); - } - else if (quartzRootless) { - // Rootless can't use a software cursor, so we just use Mac OS arrow. - CHANGE_QD_CURSOR(NULL); - SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); - } - else { - // Cursor is too big for QuickDraw. Use X software cursor. - HIDE_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); - ScreenPriv->qdCursorMode = FALSE; - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); - } -} - - -/* - * QuartzReallySetCursor - * Set the QuickDraw cursor. Called from the main thread since changing the - * cursor with QuickDraw is not thread safe on dual processor machines. - */ -void -QuartzReallySetCursor() -{ - pthread_mutex_lock(&cursorMutex); - - if (currentCursor) { - SetCCursor(currentCursor); - } else { - SetCursor(&gQDArrow); - } - - pthread_cond_signal(&cursorCondition); - pthread_mutex_unlock(&cursorMutex); -} - - -/* - * QuartzMoveCursor - * Move the cursor. This is a noop for QuickDraw. - */ -static void -QuartzMoveCursor( - ScreenPtr pScreen, - int x, - int y) -{ - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - // only the X cursor needs to be explicitly moved - if (!ScreenPriv->qdCursorMode) - (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); -} - - -static miPointerSpriteFuncRec quartzSpriteFuncsRec = { - QuartzRealizeCursor, - QuartzUnrealizeCursor, - QuartzSetCursor, - QuartzMoveCursor -}; - - -/* -=========================================================================== - - Pointer screen functions - -=========================================================================== -*/ - -/* - * QuartzCursorOffScreen - */ -static Bool QuartzCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) -{ - return FALSE; -} - - -/* - * QuartzCrossScreen - */ -static void QuartzCrossScreen(ScreenPtr pScreen, Bool entering) -{ - return; -} - - -/* - * QuartzWarpCursor - * Change the cursor position without generating an event or motion history. - * The input coordinates (x,y) are in pScreen-local X11 coordinates. - * - */ -static void -QuartzWarpCursor( - ScreenPtr pScreen, - int x, - int y) -{ - static int neverMoved = TRUE; - - if (neverMoved) { - // Don't move the cursor the first time. This is the jump-to-center - // initialization, and it's annoying because we may still be in MacOS. - neverMoved = FALSE; - return; - } - - if (quartzServerVisible) { - CGDisplayErr cgErr; - CGPoint cgPoint; - // Only need to do this for one display. Any display will do. - CGDirectDisplayID cgID = QUARTZ_PRIV(pScreen)->displayIDs[0]; - CGRect cgRect = CGDisplayBounds(cgID); - - // Convert (x,y) to CoreGraphics screen-local CG coordinates. - // This is necessary because the X11 screen and CG screen may not - // coincide. (e.g. X11 screen may be moved to dodge the menu bar) - - // Make point in X11 global coordinates - cgPoint = CGPointMake(x + dixScreenOrigins[pScreen->myNum].x, - y + dixScreenOrigins[pScreen->myNum].y); - // Shift to CoreGraphics global screen coordinates - cgPoint.x += darwinMainScreenX; - cgPoint.y += darwinMainScreenY; - // Shift to CoreGraphics screen-local coordinates - cgPoint.x -= cgRect.origin.x; - cgPoint.y -= cgRect.origin.y; - - cgErr = CGDisplayMoveCursorToPoint(cgID, cgPoint); - if (cgErr != CGDisplayNoErr) { - ErrorF("Could not set cursor position with error code 0x%x.\n", - cgErr); - } - } - - miPointerWarpCursor(pScreen, x, y); - miPointerUpdate(); -} - - -static miPointerScreenFuncRec quartzScreenFuncsRec = { - QuartzCursorOffScreen, - QuartzCrossScreen, - QuartzWarpCursor, - DarwinEQPointerPost, - DarwinEQSwitchScreen -}; - - -/* -=========================================================================== - - Other screen functions - -=========================================================================== -*/ - -/* - * QuartzCursorQueryBestSize - * Handle queries for best cursor size - */ -static void -QuartzCursorQueryBestSize( - int class, - unsigned short *width, - unsigned short *height, - ScreenPtr pScreen) -{ - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - if (class == CursorShape) { - *width = CURSORWIDTH; - *height = CURSORHEIGHT; - } else { - (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); - } -} - - -/* - * QuartzInitCursor - * Initialize cursor support - */ -Bool -QuartzInitCursor( - ScreenPtr pScreen ) -{ - QuartzCursorScreenPtr ScreenPriv; - miPointerScreenPtr PointPriv; - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - - // initialize software cursor handling (always needed as backup) - if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) { - return FALSE; - } - - // allocate private storage for this screen's QuickDraw cursor info - if (darwinCursorGeneration != serverGeneration) { - if ((darwinCursorScreenIndex = AllocateScreenPrivateIndex()) < 0) - return FALSE; - darwinCursorGeneration = serverGeneration; - } - - ScreenPriv = xcalloc( 1, sizeof(QuartzCursorScreenRec) ); - if (!ScreenPriv) return FALSE; - - CURSOR_PRIV(pScreen) = ScreenPriv; - - // override some screen procedures - ScreenPriv->QueryBestSize = pScreen->QueryBestSize; - pScreen->QueryBestSize = QuartzCursorQueryBestSize; - - // initialize QuickDraw cursor handling - GetQDGlobalsArrow(&gQDArrow); - PointPriv = (miPointerScreenPtr) - pScreen->devPrivates[miPointerScreenIndex].ptr; - - ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; - PointPriv->spriteFuncs = &quartzSpriteFuncsRec; - - if (!quartzRootless) - ScreenPriv->useQDCursor = QuartzFSUseQDCursor(dfb->colorBitsPerPixel); - else - ScreenPriv->useQDCursor = TRUE; - ScreenPriv->qdCursorMode = TRUE; - ScreenPriv->qdCursorVisible = TRUE; - - // initialize cursor mutex lock - pthread_mutex_init(&cursorMutex, NULL); - - // initialize condition for waiting - pthread_cond_init(&cursorCondition, NULL); - - return TRUE; -} - - -// X server is hiding. Restore the Aqua cursor. -void QuartzSuspendXCursor( - ScreenPtr pScreen ) -{ - QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - CHANGE_QD_CURSOR(NULL); - SHOW_QD_CURSOR(pScreen, ScreenPriv->qdCursorVisible); -} - - -// X server is showing. Restore the X cursor. -void QuartzResumeXCursor( - ScreenPtr pScreen, - int x, - int y ) -{ - QuartzSetCursor(pScreen, quartzLatentCursor, x, y); -} diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.h b/hw/darwin/quartz/fullscreen/quartzCursor.h deleted file mode 100644 index 56a02098d..000000000 --- a/hw/darwin/quartz/fullscreen/quartzCursor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * quartzCursor.h - * - * External interface for Quartz hardware cursor - * - * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. - */ - -#ifndef QUARTZCURSOR_H -#define QUARTZCURSOR_H - -#include "screenint.h" - -Bool QuartzInitCursor(ScreenPtr pScreen); -void QuartzReallySetCursor(void); -void QuartzSuspendXCursor(ScreenPtr pScreen); -void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y); - -#endif diff --git a/hw/darwin/utils/Makefile.am b/hw/darwin/utils/Makefile.am deleted file mode 100644 index 911e14d53..000000000 --- a/hw/darwin/utils/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -bin_PROGRAMS = dumpkeymap - -dumpkeymap_SOURCES = dumpkeymap.c - -dumpkeymap_LDFLAGS = -Wl,-framework,IOKit - -man1_MANS = dumpkeymap.man - -EXTRA_DIST = \ - README.txt \ - dumpkeymap.man diff --git a/hw/darwin/utils/README.txt b/hw/darwin/utils/README.txt deleted file mode 100644 index 1dd64794e..000000000 --- a/hw/darwin/utils/README.txt +++ /dev/null @@ -1,107 +0,0 @@ -dumpkeymap - Diagnostic dump and detailed description of .keymapping files -Version 4 - -Copyright (C)1999,2000 by Eric Sunshine -Eric Sunshine, 1 December 2000 - -OVERVIEW -======== -This package contains the diagnostic utility dumpkeymap, as well as highly -detailed documentation describing the internal layout of the Apple/NeXT -.keymapping file. - -The dumpkeymap utility displays detailed information about each .keymapping -file mentioned on the command-line. On Apple and NeXT platforms, if no -.keymapping files are mentioned on the command-line, then it will instead -dissect the key mapping currently in use by the WindowServer and AppKit. - -Documentation includes a thorough and detailed description of the internal -layout of the .keymapping file, as well as an explanation of how to interpret -the output of dumpkeymap. - -The complete set of documentation is available for perusal via dumpkeymap's -manual page (dumpkeymap.1), as well as via the command-line options described -below. - - --help - Usage summary. - --help-keymapping - Detailed discussion of the internal format of a .keymapping file. - --help-output - Explanation of dumpkeymap's output. - --help-files - List of key mapping-related files and directories. - --help-diagnostics - Explanation of diagnostic messages. - -Once the manual page is been installed, documentation can also be accessed -with the Unix `man' command: - - % man dumpkeymap - - -COMPILATION -=========== -MacOS/X, Darwin - - cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit - -MacOS/X DP4 (Developer Preview 4) - - cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit - -MacOS/X Server, OpenStep, NextStep - - cc -Wall -o dumpkeymap dumpkeymap.c - -By default, dumpkeymap is configured to interface with the HID driver (Apple) -or event-status driver (NeXT), thus allowing it to dump the key mapping which -is currently in use by the WindowServer and AppKit. However, these facilities -are specific to Apple/NeXT. In order to build dumpkeymap for non-Apple/NeXT -platforms, you must define the DUMPKEYMAP_FILE_ONLY flag when compiling the -program. This flag inhibits use of the HID and event-status drivers and -configures dumpkeymap to work strictly with raw key mapping files. - -For example, to compile for Linux: - - gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c - - -INSTALLATION -============ -Install the dumpkeymap executable image in a location mentioned in the PATH -environment variable. Typicall locations for executable files are: - - /usr/local/bin - $(HOME)/bin - -Install the manual page, dumpkeymap.1, in the `man1' subdirectory one of the -standard manual page locations or in any other location mentioned by the -MANPATH environment variable. - -Typical locations for manual pages on most Unix platforms are: - - /usr/local/man/man1 - -Typical locations for manual pages on MacOS/X, Darwin, and MacOS/X Server are: - - /usr/local/man/man1 - /Local/Documentation/ManPages/man1 - /Network/Documentation/ManPages/man1 - -Typical locations for manual pages on OpenStep and NextStep are: - - /usr/local/man/man1 - /LocalLibrary/Documentation/ManPages/man1 - /LocalDeveloper/Documentation/ManPages/man1 - - -CONCLUSION -========== -This program and its accompanying documentation were written by Eric Sunshine -and are copyright (C)1999,2000 by Eric Sunshine . - -The implementation of dumpkeymap is based upon information gathered on -September 3, 1997 by Eric Sunshine and Paul S. -McCarthy during an effort to reverse engineer the format -of the NeXT .keymapping file. diff --git a/hw/darwin/utils/dumpkeymap.c b/hw/darwin/utils/dumpkeymap.c deleted file mode 100644 index 0c8bdcd01..000000000 --- a/hw/darwin/utils/dumpkeymap.c +++ /dev/null @@ -1,1453 +0,0 @@ -//============================================================================= -// -// Copyright (C) 1999,2000 by Eric Sunshine -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -// NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -//============================================================================= -//----------------------------------------------------------------------------- -// dumpkeymap.c -// -// Prints a textual representation of each Apple/NeXT .keymapping file -// mentioned on the command-line. If no files are mentioned and if the -// local machine is an Apple or NeXT installation, then the key mapping -// currently in use by the WindowServer and the AppKit is printed -// instead. -// -// Invoke dumpkeymap with one of the options listed below in order to -// view detailed documentation about .keymapping files and the use of -// this program. -// -// --help: Usage summary. -// --help-keymapping: Detailed discussion of the internal format of a -// .keymapping file. -// --help-output: Explanation of dumpkeymap's output. -// --help-files: List of key mapping-related files and directories. -// --help-diagnostics: Explanation of diagnostic messages. -// -// COMPILATION INSTRUCTIONS -// -// MacOS/X, Darwin -// cc -Wall -o dumpkeymap dumpkeymap.c -framework IOKit -// -// MacOS/X DP4 (Developer Preview 4) -// cc -Wall -o dumpkeymap dumpkeymap.c -FKernel -framework IOKit -// -// MacOS/X Server, OpenStep, NextStep -// cc -Wall -o dumpkeymap dumpkeymap.c -// -// By default, dumpkeymap is configured to interface with the HID driver -// (Apple) or event-status driver (NeXT), thus allowing it to dump the -// key mapping which is currently in use by the WindowServer and AppKit. -// However, these facilities are specific to Apple/NeXT. In order to -// build dumpkeymap for non-Apple/NeXT platforms, you must define the -// DUMPKEYMAP_FILE_ONLY flag when compiling the program. This flag -// inhibits use of the HID and event-status drivers and configures -// dumpkeymap to work strictly with raw key mapping files. -// -// For example, to compile for Linux: -// gcc -Wall -DDUMPKEYMAP_FILE_ONLY -o dumpkeymap dumpkeymap.c -// -// CONCLUSION -// -// This program and its accompanying documentation were written by Eric -// Sunshine and are copyright (C)1999,2000 by Eric Sunshine -// . -// -// The implementation of dumpkeymap is based upon information gathered -// on September 3, 1997 by Eric Sunshine and -// Paul S. McCarthy during an effort to reverse -// engineer the format of the NeXT .keymapping file. -// -// HISTORY -// -// v4 2000/12/01 Eric Sunshine -// Updated manual page to work with `rman', the `man' to `HTML' -// translator. Unfortunately, however, rman is missing important -// roff features such as diversions, indentation, and tab stops, -// and is also hideously buggy, so getting the manual to work with -// rman required quite a few work-arounds. -// The manual page has now been tested with nroff (plain text), troff -// (PostScript, etc.), groff (PostScript), and rman (HTML, etc.) -// -// v3 2000/11/28 Eric Sunshine -// Considerably expanded the documentation. -// Augmented the existing description of .keymapping internals. -// Added these new documentation topics: -// - Output: Very important section describing how to interpret -// the output of dumpkeymap. -// - Files: Lists files and directories related to key mappings. -// - Diagnostics: Explains diagnostic messages issued by -// dumpkeymap. -// Created a manual page (dumpkeymap.1) which contains the complete -// set of documentation for key mapping files and dumpkeymap. -// Added command-line options (--help, --help-keymapping, -// --help-output, --help-files, --help-diagnostics) which allow -// access to all key mapping documentation. Previously the -// description of the internal layout of a .keymapping file was -// only available as source code comments. -// Added --version option. -// Ported to non-Apple/NeXT platforms. Defining the pre-processor -// flag DUMPKEYMAP_FILE_ONLY at compilation time inhibits use of -// Apple/NeXT-specific API. -// Added a README file. -// -// v2 2000/11/13 Eric Sunshine -// Converted from C++ to plain-C. -// Now parses and takes into account the "number-size" flag stored -// with each key map. This flag indicates the size, in bytes, of -// all remaining numeric values in the mapping. Updated all code -// to respect this flag. (Previously, the purpose of this field -// was unknown, and it was thus denoted as -// `KeyMapping::fill[2]'.) -// Updated all documentation; especially the "KEY MAPPING -// DESCRIPTION" section. Added discussion of the "number-size" -// flag and revamped all structure definitions to use the generic -// data type `number' instead of `uchar' or 'byte'. Clarified -// several sections of the documentation and added missing -// discussions about type definitions and the relationship of -// `interface' and `handler_id' to .keymapping and .keyboard -// files. -// Updated compilation instructions to include directions for all -// platforms on which this program might be built. -// Now published under the formal BSD license rather than a -// home-grown license. -// -// v1 1999/09/08 Eric Sunshine -// Created. -//----------------------------------------------------------------------------- -#include -#include -#include -#include -#include -#if !defined(DUMPKEYMAP_FILE_ONLY) -#include -#endif - -#define PROG_NAME "dumpkeymap" -#define PROG_VERSION "4" -#define AUTHOR_NAME "Eric Sunshine" -#define AUTHOR_EMAIL "sunshine@sunshineco.com" -#define AUTHOR_INFO AUTHOR_NAME " <" AUTHOR_EMAIL ">" -#define COPYRIGHT "Copyright (C) 1999,2000 by " AUTHOR_INFO - -typedef unsigned char byte; -typedef unsigned short word; -typedef unsigned int natural; -typedef unsigned long dword; -typedef dword number; - -#define ASCII_SET 0x00 -#define BIND_FUNCTION 0xfe -#define BIND_SPECIAL 0xff - -#define OPT_SWITCH(X) { char const* switched_str__=(X); if (0) { -#define OPT_CASE(X,Y) } else if (strcmp(switched_str__,(#X)) == 0 || \ - strcmp(switched_str__,(#Y)) == 0) { -#define OPT_DEFAULT } else { -#define OPT_SWITCH_END }} - -//----------------------------------------------------------------------------- -// Translation Tables -//----------------------------------------------------------------------------- -static char const* const SPECIAL_CODE[] = - { - "sound-up", - "sound-down", - "brightness-up", - "brightness-down", - "alpha-lock", - "help", - "power", - "secondary-up-arrow", - "secondary-down-arrow" - }; -#define N_SPECIAL_CODE (sizeof(SPECIAL_CODE) / sizeof(SPECIAL_CODE[0])) - -static char const* const MODIFIER_CODE[] = - { - "alpha-lock", - "shift", - "control", - "alternate", - "command", - "keypad", - "help" - }; -#define N_MODIFIER_CODE (sizeof(MODIFIER_CODE) / sizeof(MODIFIER_CODE[0])) - -static char const* const MODIFIER_MASK[] = - { - "-----", // R = carriage-return - "----L", // A = alternate - "---S-", // C = control - "---SL", // S = shift - "--C--", // L = alpha-lock - "--C-L", - "--CS-", - "--CSL", - "-A---", - "-A--L", - "-A-S-", - "-A-SL", - "-AC--", - "-AC-L", - "-ACS-", - "-ACSL", - "R----", - "R---L", - "R--S-", - "R--SL", - "R-C--", - "R-C-L", - "R-CS-", - "R-CSL", - "RA---", - "RA--L", - "RA-S-", - "RA-SL", - "RAC--", - "RAC-L", - "RACS-", - "RACSL", - }; -#define N_MODIFIER_MASK (sizeof(MODIFIER_MASK) / sizeof(MODIFIER_MASK[0])) - -#define FUNCTION_KEY_FIRST 0x20 -static char const* const FUNCTION_KEY[] = - { - "F1", // 0x20 - "F2", // 0x21 - "F3", // 0x22 - "F4", // 0x23 - "F5", // 0x24 - "F6", // 0x25 - "F7", // 0x26 - "F8", // 0x27 - "F9", // 0x28 - "F10", // 0x29 - "F11", // 0x2a - "F12", // 0x2b - "insert", // 0x2c - "delete", // 0x2d - "home", // 0x2e - "end", // 0x2f - "page up", // 0x30 - "page down", // 0x31 - "print screen", // 0x32 - "scroll lock", // 0x33 - "pause", // 0x34 - "sys-request", // 0x35 - "break", // 0x36 - "reset (HIL)", // 0x37 - "stop (HIL)", // 0x38 - "menu (HIL)", // 0x39 - "user (HIL)", // 0x3a - "system (HIL)", // 0x3b - "print (HIL)", // 0x3c - "clear line (HIL)", // 0x3d - "clear display (HIL)", // 0x3e - "insert line (HIL)", // 0x3f - "delete line (HIL)", // 0x40 - "insert char (HIL)", // 0x41 - "delete char (HIL)", // 0x42 - "prev (HIL)", // 0x43 - "next (HIL)", // 0x44 - "select (HIL)", // 0x45 - }; -#define N_FUNCTION_KEY (sizeof(FUNCTION_KEY) / sizeof(FUNCTION_KEY[0])) - - -//----------------------------------------------------------------------------- -// Data Stream Object -// Can be configured to treat embedded "numbers" as being composed of -// either 1, 2, or 4 bytes, apiece. -//----------------------------------------------------------------------------- -typedef struct _DataStream - { - byte const* data; - byte const* data_end; - natural number_size; // Size in bytes of a "number" in the stream. - } DataStream; - -static DataStream* new_data_stream( byte const* data, int size ) - { - DataStream* s = (DataStream*)malloc( sizeof(DataStream) ); - s->data = data; - s->data_end = data + size; - s->number_size = 1; // Default to byte-sized numbers. - return s; - } - -static void destroy_data_stream( DataStream* s ) - { - free(s); - } - -static int end_of_stream( DataStream* s ) - { - return (s->data >= s->data_end); - } - -static void expect_nbytes( DataStream* s, int nbytes ) - { - if (s->data + nbytes > s->data_end) - { - fputs( "Insufficient data in keymapping data stream.\n", stderr ); - exit(-1); - } - } - -static byte get_byte( DataStream* s ) - { - expect_nbytes( s, 1 ); - return *s->data++; - } - -static word get_word( DataStream* s ) - { - word hi, lo; - expect_nbytes( s, 2 ); - hi = *s->data++; - lo = *s->data++; - return ((hi << 8) | lo); - } - -static dword get_dword( DataStream* s ) - { - dword b1, b2, b3, b4; - expect_nbytes( s, 4 ); - b4 = *s->data++; - b3 = *s->data++; - b2 = *s->data++; - b1 = *s->data++; - return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); - } - -static number get_number( DataStream* s ) - { - switch (s->number_size) - { - case 4: return get_dword(s); - case 2: return get_word(s); - default: return get_byte(s); - } - } - - -//----------------------------------------------------------------------------- -// Translation Utility Functions -//----------------------------------------------------------------------------- -static char const* special_code_desc( number n ) - { - if (n < N_SPECIAL_CODE) - return SPECIAL_CODE[n]; - else - return "invalid"; - } - -static char const* modifier_code_desc( number n ) - { - if (n < N_MODIFIER_CODE) - return MODIFIER_CODE[n]; - else - return "invalid"; - } - -static char const* modifier_mask_desc( number n ) - { - if (n < N_MODIFIER_MASK) - return MODIFIER_MASK[n]; - else - return "?????"; - } - -static char const* function_key_desc( number n ) - { - if (n >= FUNCTION_KEY_FIRST && n < N_FUNCTION_KEY + FUNCTION_KEY_FIRST) - return FUNCTION_KEY[ n - FUNCTION_KEY_FIRST ]; - else - return "unknown"; - } - -static number bits_set( number mask ) - { - number n = 0; - for ( ; mask != 0; mask >>= 1) - if ((mask & 0x01) != 0) - n++; - return n; - } - - -//----------------------------------------------------------------------------- -// Unparse a list of Modifier records. -//----------------------------------------------------------------------------- -static void unparse_modifiers( DataStream* s ) - { - number nmod = get_number(s); // Modifier count - printf( "MODIFIERS [%lu]\n", nmod ); - while (nmod-- > 0) - { - number nscan; - number const code = get_number(s); - printf( "%s:", modifier_code_desc(code) ); - nscan = get_number(s); - while (nscan-- > 0) - printf( " 0x%02x", (natural)get_number(s) ); - putchar( '\n' ); - } - putchar( '\n' ); - } - - -//----------------------------------------------------------------------------- -// Unparse a list of Character records. -//----------------------------------------------------------------------------- -typedef void (*UnparseSpecialFunc)( number code ); - -static void unparse_char_codes( - DataStream* s, number ncodes, UnparseSpecialFunc unparse_special ) - { - if (ncodes != 0) - { - while (ncodes-- > 0) - { - number const char_set = get_number(s); - number const code = get_number(s); - putchar(' '); - switch (char_set) - { - case ASCII_SET: - { - int const c = (int)code; - if (isprint(c)) - printf( "\"%c\"", c ); - else if (code < ' ') - printf( "\"^%c\"", c + '@' ); - else - printf( "%02x", c ); - break; - } - case BIND_FUNCTION: - printf( "[%s]", function_key_desc(code) ); - break; - case BIND_SPECIAL: - unparse_special( code ); - break; - default: - printf( "%02x/%02x", (natural)char_set, (natural)code ); - break; - } - } - } - } - - -//----------------------------------------------------------------------------- -// Unparse a list of scan code bindings. -//----------------------------------------------------------------------------- -static void unparse_key_special( number code ) - { - printf( "{seq#%lu}", code ); - } - -static void unparse_characters( DataStream* s ) - { - number const NOT_BOUND = 0xff; - number const nscans = get_number(s); - number scan; - printf( "CHARACTERS [%lu]\n", nscans ); - for (scan = 0; scan < nscans; scan++) - { - number const mask = get_number(s); - printf( "scan 0x%02x: ", (natural)scan ); - if (mask == NOT_BOUND) - fputs( "not-bound\n", stdout ); - else - { - number const bits = bits_set( mask ); - number const codes = 1 << bits; - printf( "%s ", modifier_mask_desc(mask) ); - unparse_char_codes( s, codes, unparse_key_special ); - putchar( '\n' ); - } - } - putchar( '\n' ); - } - - -//----------------------------------------------------------------------------- -// Unparse a list of key sequences. -//----------------------------------------------------------------------------- -static void unparse_sequence_special( number code ) - { - printf( "{%s}", (code == 0 ? "unmodify" : modifier_code_desc(code)) ); - } - -static void unparse_sequences( DataStream* s ) - { - number const nseqs = get_number(s); - number seq; - printf( "SEQUENCES [%lu]\n", nseqs ); - for (seq = 0; seq < nseqs; seq++) - { - number const nchars = get_number(s); - printf( "sequence %lu:", seq ); - unparse_char_codes( s, nchars, unparse_sequence_special ); - putchar( '\n' ); - } - putchar( '\n' ); - } - - -//----------------------------------------------------------------------------- -// Unparse a list of special keys. -//----------------------------------------------------------------------------- -static void unparse_specials( DataStream* s ) - { - number nspecials = get_number(s); - printf( "SPECIALS [%lu]\n", nspecials ); - while (nspecials-- > 0) - { - number const special = get_number(s); - number const scan = get_number(s); - printf( "%s: 0x%02x\n", special_code_desc(special), (natural)scan ); - } - putchar( '\n' ); - } - - -//----------------------------------------------------------------------------- -// Unparse the number-size flag. -//----------------------------------------------------------------------------- -static void unparse_numeric_size( DataStream* s ) - { - word const numbers_are_shorts = get_word(s); - s->number_size = numbers_are_shorts ? 2 : 1; - } - - -//----------------------------------------------------------------------------- -// Unparse an entire key map. -//----------------------------------------------------------------------------- -static void unparse_keymap_data( DataStream* s ) - { - unparse_numeric_size(s); - unparse_modifiers(s); - unparse_characters(s); - unparse_sequences(s); - unparse_specials(s); - } - - -//----------------------------------------------------------------------------- -// Unparse the active key map. -//----------------------------------------------------------------------------- -#if !defined(DUMPKEYMAP_FILE_ONLY) -static int unparse_active_keymap( void ) - { - int rc = 1; - NXEventHandle const h = NXOpenEventStatus(); - if (h == 0) - fputs( "Unable to open event status driver.\n", stderr ); - else - { - NXKeyMapping km; - km.size = NXKeyMappingLength(h); - if (km.size <= 0) - fprintf( stderr, "Bad key mapping length (%d).\n", km.size ); - else - { - km.mapping = (char*)malloc( km.size ); - if (NXGetKeyMapping( h, &km ) == 0) - fputs( "Unable to get current key mapping.\n", stderr ); - else - { - DataStream* stream = - new_data_stream( (byte const*)km.mapping, km.size ); - fputs( "=============\nACTIVE KEYMAP\n=============\n\n", - stdout); - unparse_keymap_data( stream ); - destroy_data_stream( stream ); - rc = 0; - } - free( km.mapping ); - } - NXCloseEventStatus(h); - } - return rc; - } -#endif - - -//----------------------------------------------------------------------------- -// Unparse one key map from a keymapping file. -//----------------------------------------------------------------------------- -static void unparse_keymap( DataStream* s ) - { - dword const interface = get_dword(s); - dword const handler_id = get_dword(s); - dword const map_size = get_dword(s); - printf( "interface: 0x%02lx\nhandler_id: 0x%02lx\nmap_size: %lu bytes\n\n", - interface, handler_id, map_size ); - unparse_keymap_data(s); - } - - -//----------------------------------------------------------------------------- -// Check the magic number of a keymapping file. -//----------------------------------------------------------------------------- -static int check_magic_number( DataStream* s ) - { - return (get_byte(s) == 'K' && - get_byte(s) == 'Y' && - get_byte(s) == 'M' && - get_byte(s) == '1'); - } - - -//----------------------------------------------------------------------------- -// Unparse all key maps within a keymapping file. -//----------------------------------------------------------------------------- -static int unparse_keymaps( DataStream* s ) - { - int rc = 0; - if (check_magic_number(s)) - { - int n = 1; - while (!end_of_stream(s)) - { - printf( "---------\nKEYMAP #%d\n---------\n", n++ ); - unparse_keymap(s); - } - } - else - { - fputs( "Bad magic number.\n", stderr ); - rc = 1; - } - return rc; - } - - -//----------------------------------------------------------------------------- -// Unparse a keymapping file. -//----------------------------------------------------------------------------- -static int unparse_keymap_file( char const* const path ) - { - int rc = 1; - FILE* file; - printf( "===========\nKEYMAP FILE\n===========\n%s\n\n", path ); - file = fopen( path, "rb" ); - if (file == 0) - perror( "Unable to open key mapping file" ); - else - { - struct stat st; - if (fstat( fileno(file), &st ) != 0) - perror( "Unable to determine key mapping file size" ); - else - { - byte* buffer = (byte*)malloc( st.st_size ); - if (fread( buffer, st.st_size, 1, file ) != 1) - perror( "Unable to read key mapping file" ); - else - { - DataStream* stream = new_data_stream(buffer, (int)st.st_size); - fclose( file ); file = 0; - rc = unparse_keymaps( stream ); - destroy_data_stream( stream ); - } - free( buffer ); - } - if (file != 0) - fclose( file ); - } - return rc; - } - - -//----------------------------------------------------------------------------- -// Handle the case when no documents are mentioned on the command-line. For -// Apple/NeXT platforms, dump the currently active key mapping; else display -// an error message. -//----------------------------------------------------------------------------- -static int handle_empty_document_list( void ) - { -#if !defined(DUMPKEYMAP_FILE_ONLY) - return unparse_active_keymap(); -#else - fputs( "ERROR: Must specify at least one .keymapping file.\n\n", stderr ); - return 1; -#endif - } - - -//----------------------------------------------------------------------------- -// Print a detailed description of the internal layout of a key mapping. -//----------------------------------------------------------------------------- -static void print_internal_layout_info( FILE* f ) - { - fputs( -"What follows is a detailed descriptions of the internal layout of an\n" -"Apple/NeXT .keymapping file.\n" -"\n" -"Types and Data\n" -"--------------\n" -"The following type definitions are employed throughout this discussion:\n" -"\n" -" typedef unsigned char byte;\n" -" typedef unsigned short word;\n" -" typedef unsigned long dword;\n" -"\n" -"Additionally, the type definition `number' is used generically to indicate\n" -"a numeric value. The actual size of the `number' type may be one or two\n" -"bytes depending upon how the data is stored in the key map. Although most\n" -"key maps use byte-sized numeric values, word-sized values are also allowed.\n" -"\n" -"Multi-byte values in a key mapping file are stored in big-endian byte\n" -"order.\n" -"\n" -"Key Mapping File and Device Mapping\n" -"-----------------------------------\n" -"A key mapping file begins with a magic-number and continues with a variable\n" -"number of device-specific key mappings.\n" -"\n" -" struct KeyMappingFile {\n" -" char magic_number[4]; // `KYM1'\n" -" DeviceMapping maps[...]; // Variable number of maps\n" -" };\n" -"\n" -" struct DeviceMapping {\n" -" dword interface; // Interface type\n" -" dword handler_id; // Interface subtype\n" -" dword map_size; // Byte count of `map' (below)\n" -" KeyMapping map;\n" -" };\n" -"\n" -"The value of `interface' represents a family of keyboard device types\n" -"(such as Intel PC, ADB, NeXT, Sun Type5, etc.), and is generally\n" -"specified as one of the constant values NX_EVS_DEVICE_INTERFACE_ADB,\n" -"NX_EVS_DEVICE_INTERFACE_ACE, etc., which are are defined in IOHIDTypes.h on\n" -"MacOS/X and Darwin, and in ev_types.h on MacOS/X Server, OpenStep, and\n" -"NextStep.\n" -"\n" -"The value of `handler_id' represents a specific keyboard layout within the\n" -"much broader `interface' family. For instance, for a 101-key Intel PC\n" -"keyboard (of type NX_EVS_DEVICE_INTERFACE_ACE) the `handler_id' is '0',\n" -"whereas for a 102-key keyboard it is `1'.\n" -"\n" -"Together, `interface' and `handler_id' identify the exact keyboard hardware\n" -"to which this mapping applies. Programs which display a visual\n" -"representation of a keyboard layout, match `interface' and `handler_id'\n" -"from the .keymapping file against the `interface' and `handler_id' values\n" -"found in each .keyboard file.\n" -"\n" -"Key Mapping\n" -"-----------\n" -"A key mapping completely defines the relationship of all scan codes with\n" -"their associated functionality. A KeyMapping structure is embedded within\n" -"the DeviceMapping structure in a KeyMappingFile. The key mapping currently\n" -"in use by the WindowServer and AppKit is also represented by a KeyMapping\n" -"structure, and can be referred to directly by calling NXGetKeyMapping() and\n" -"accessing the `mapping' data member of the returned NXKeyMapping structure.\n" -"\n" -" struct KeyMapping {\n" -" word number_size; // 0=1 byte, non-zero=2 bytes\n" -" number num_modifier_groups; // Modifier groups\n" -" ModifierGroup modifier_groups[...];\n" -" number num_scan_codes; // Scan groups\n" -" ScanGroup scan_table[...];\n" -" number num_sequence_lists; // Sequence lists\n" -" Sequence sequence_lists[...];\n" -" number num_special_keys; // Special keys\n" -" SpecialKey special_key[...];\n" -" };\n" -"\n" -"The `number_size' flag determines the size, in bytes, of all remaining\n" -"numeric values (denoted by the type definition `number') within the key\n" -"mapping. If its value is zero, then numbers are represented by a single\n" -"byte. If it is non-zero, then numbers are represented by a word (two\n" -"bytes).\n" -"\n" -"Modifier Group\n" -"--------------\n" -"A modifier group defines all scan codes which map to a particular type of\n" -"modifier, such as `shift', `control', etc.\n" -"\n" -" enum Modifier {\n" -" ALPHALOCK = 0,\n" -" SHIFT,\n" -" CONTROL,\n" -" ALTERNATE,\n" -" COMMAND,\n" -" KEYPAD,\n" -" HELP\n" -" };\n" -"\n" -" struct ModifierGroup {\n" -" number modifier; // A Modifier constant\n" -" number num_scan_codes;\n" -" number scan_codes[...]; // Variable number of scan codes\n" -" };\n" -"\n" -"The scan_codes[] array contains a list of all scan codes which map to the\n" -"specified modifier. The `shift', `command', and `alternate' modifiers are\n" -"frequently mapped to two different scan codes, apiece, since these\n" -"modifiers often appear on both the left and right sides of the keyboard.\n" -"\n" -"Scan Group\n" -"----------\n" -"There is one ScanGroup for each scan code generated by the given keyboard.\n" -"This number is given by KeyMapping::num_scan_codes. The first scan group\n" -"represents hardware scan code 0, the second represents scan code 1, etc.\n" -"\n" -" enum ModifierMask {\n" -" ALPHALOCK_MASK = 1 << 0,\n" -" SHIFT_MASK = 1 << 1,\n" -" CONTROL_MASK = 1 << 2,\n" -" ALTERNATE_MASK = 1 << 3,\n" -" CARRIAGE_RETURN_MASK = 1 << 4\n" -" };\n" -" #define NOT_BOUND 0xff\n" -"\n" -" struct ScanGroup {\n" -" number mask;\n" -" Character characters[...];\n" -" };\n" -"\n" -"For each scan code, `mask' defines which modifier combinations generate\n" -"characters. If `mask' is NOT_BOUND (0xff) then then this scan code does\n" -"not generate any characters ever, and its characters[] array is zero\n" -"length. Otherwise, the characters[] array contains one Character record\n" -"for each modifier combination.\n" -"\n" -"The number of records in characters[] is determined by computing (1 <<\n" -"bits_set_in_mask). In other words, if mask is zero, then zero bits are\n" -"set, so characters[] contains only one record. If `mask' is (SHIFT_MASK |\n" -"CONTROL_MASK), then two bits are set, so characters[] contains four\n" -"records.\n" -"\n" -"The first record always represents the character which is generated by that\n" -"key when no modifiers are active. The remaining records represent\n" -"characters generated by the various modifier combinations. Using the\n" -"example with the `shift' and `control' masks set, record two would\n" -"represent the character with the `shift' modifier active; record three, the\n" -"`control' modifier active; and record four, both the `shift' and `control'\n" -"modifiers active.\n" -"\n" -"As a special case, ALPHALOCK_MASK implies SHIFT_MASK, though only\n" -"ALPHALOCK_MASK appears in `mask'. In this case the same character is\n" -"generated for both the `shift' and `alpha-lock' modifiers, but only needs\n" -"to appear once in the characters[] array.\n" -"\n" -"CARRIAGE_RETURN_MASK does not actually refer to a modifier key. Instead,\n" -"it is used to distinguish the scan code which is given the special\n" -"pseudo-designation of `carriage return' key. Typically, this mask appears\n" -"solo in a ScanGroup record and only the two Character records for control-M\n" -"and control-C follow. This flag may be a throwback to an earlier time or\n" -"may be specially interpreted by the low-level keyboard driver, but its\n" -"purpose is otherwise enigmatic.\n" -"Character\n" -"---------\n" -"Each Character record indicates the character generated when this key is\n" -"pressed, as well as the character set which contains the character. Well\n" -"known character sets are `ASCII' and `Symbol'. The character set can also\n" -"be one of the meta values FUNCTION_KEY or KEY_SEQUENCE. If it is\n" -"FUNCTION_KEY then `char_code' represents a generally well-known function\n" -"key such as those enumerated by FunctionKey. If the character set is\n" -"KEY_SEQUENCE then `char_code' represents a zero-base index into\n" -"KeyMapping::sequence_lists[].\n" -"\n" -" enum CharacterSet {\n" -" ASCII = 0x00,\n" -" SYMBOL = 0x01,\n" -" ...\n" -" FUNCTION_KEY = 0xfe,\n" -" KEY_SEQUENCE = 0xff\n" -" };\n" -"\n" -" struct Character {\n" -" number set; // CharacterSet of generated character\n" -" number char_code; // Actual character generated\n" -" };\n" -"\n" -" enum FunctionKey {\n" -" F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,\n" -" INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN,\n" -" SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU, USER,\n" -" SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE,\n" -" DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT\n" -" };\n" -"\n" -"Sequence\n" -"--------\n" -"When Character::set contains the meta value KEY_SEQUENCE, the scan code is\n" -"bound to a sequence of keys rather than a single character. A sequence is\n" -"a series of modifiers and characters which are automatically generated when\n" -"the associated key is depressed.\n" -"\n" -" #define MODIFIER_KEY 0xff\n" -"\n" -" struct Sequence {\n" -" number num_chars;\n" -" Character characters[...];\n" -" };\n" -"\n" -"Each generated Character is represented as previously described, with the\n" -"exception that MODIFIER_KEY may appear in place of KEY_SEQUENCE. When the\n" -"value of Character::set is MODIFIER_KEY then Character::char_code\n" -"represents a modifier key rather than an actual character. If the modifier\n" -"represented by `char_code' is non-zero, then it indicates that the\n" -"associated modifier key has been depressed. In this case, the value is one\n" -"of the constants enumerated by Modifier (SHIFT, CONTROL, ALTERNATE, etc.).\n" -"If the value is zero then it means that the modifier keys have been\n" -"released.\n" -"\n" -"Special Key\n" -"-----------\n" -"A special key is one which is scanned directly by the Mach kernel rather\n" -"than by the WindowServer. In general, events are not generated for special\n" -"keys.\n" -"\n" -" enum SpecialKeyType {\n" -" VOLUME_UP = 0,\n" -" VOLUME_DOWN,\n" -" BRIGHTNESS_UP,\n" -" BRIGHTNESS_DOWN,\n" -" ALPHA_LOCK,\n" -" HELP,\n" -" POWER,\n" -" SECONDARY_ARROW_UP,\n" -" SECONDARY_ARROW_DOWN\n" -" };\n" -"\n" -" struct SpecialKey {\n" -" number type; // A SpecialKeyType constant\n" -" number scan_code; // Actual scan code\n" -" };\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print an explanation of the output generated by this program. -//----------------------------------------------------------------------------- -static void print_output_info( FILE* f ) - { - fputs( -"What follows is an explanation and description of the various pieces of\n" -"information emitted by dumpkeymap.\n" -"\n" -"For a more thorough discussion of any particular piece of information\n" -"described here, refer to the detailed description of the internal layout of\n" -"a key mapping given by the --help-layout option.\n" -"\n" -"Conventions\n" -"-----------\n" -"Depending upon context, some numeric values are displayed in decimal\n" -"notation, whereas others are displayed in hexadecimal notation.\n" -"Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'),\n" -"except when explicitly noted otherwise.\n" -"\n" -"Key Mapping Source\n" -"------------------\n" -"The first piece of information presented about a particular key mapping is\n" -"the source from which the data was gleaned. For a .keymapping file, the\n" -"title `KEYMAP FILE' is emitted along with the path and name of the file in\n" -"question. For the key mapping currently in use by the WindowServer and\n" -"AppKit, the title `ACTIVE KEYMAP' is emitted instead.\n" -"\n" -"Device Information\n" -"------------------\n" -"Each .keymapping file may contain one or more raw key mappings. For\n" -"example, a file which maps keys to a Dvorak-style layout might contain raw\n" -"mappings for Intel PC, ADB, NeXT, and Sun Type5 keyboards.\n" -"\n" -"For each raw mapping, the following information is emitted:\n" -"\n" -" o The title `KEYMAP' along with the mapping's relative position in the\n" -" .keymapping file.\n" -" o The `interface' identifier.\n" -" o The `handler_id' sub-identifier.\n" -" o The size of the raw mapping resource counted in bytes.\n" -"\n" -"The `interface' and `handler_id' values, taken together, define a specific\n" -"keyboard device. A .keyboard file, which describes the visual layout of a\n" -"keyboard, also contains `interface' and `handler_id' identifiers. The\n" -".keyboard file corresponding to a particular key mapping can be found by\n" -"matching the `interface' and `handler_id' values from each resource.\n" -"\n" -"Modifiers\n" -"---------\n" -"Each mapping may contain zero or more modifier records which associate\n" -"hardware scan codes with modifier descriptions such as `shift', `control',\n" -"`alternate', etc. The title `MODIFIERS' is printed along with the count of\n" -"modifier records which follow. For each modifier record, the modifier's\n" -"name is printed along with a list of scan codes, in hexadecimal format,\n" -"which generate that modifier value. For example:\n" -"\n" -" MODIFIERS [4]\n" -" alternate: 0x1d 0x60\n" -" control: 0x3a\n" -" keypad: 0x52 0x53 ... 0x63 0x62\n" -" shift: 0x2a 0x36\n" -"\n" -"Characters\n" -"----------\n" -"Each mapping may contain zero or more character records which associate\n" -"hardware scan codes with the actual characters generated by those scan\n" -"codes in the presence or absence of various modifier combinations. The\n" -"title `CHARACTERS' is printed along with the count of character records\n" -"which follow. Here is a highly abbreviated example:\n" -"\n" -" CHARACTERS [9]\n" -" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n" -" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n" -" scan 0x0a: ---S- \"<\" \">\"\n" -" scan 0x13: -ACS- \"2\" \"@\" \"^@\" \"^@\" b2 b3 \"^@\" \"^@\"\n" -" scan 0x24: R---- \"^M\" \"^C\"\n" -" scan 0x3e: ----- [F4]\n" -" scan 0x4a: ----- [page up]\n" -" scan 0x60: ----- {seq#3}\n" -" scan 0x68: not-bound\n" -"\n" -"For each record, the hexadecimal value of the hardware scan code is\n" -"printed, followed by a list of modifier flag combinations and the actual\n" -"characters generated by this scan code with and without modifiers applied.\n" -"\n" -"The modifier flags field is composed of a combination of single letter\n" -"representations of the various modifier types. The letters stand for:\n" -"\n" -" L - alpha-lock\n" -" S - shift\n" -" C - control\n" -" A - alternate\n" -" R - carriage-return\n" -"\n" -"As a special case, the `alpha-lock' flag also implies the `shift' flag, so\n" -"these two flags never appear together in the same record.\n" -"\n" -"The combination of modifier flags determines the meaning and number of\n" -"fields which follow. The first field after the modifier flags always\n" -"represents the character that will be generated if no modifier keys are\n" -"depressed. The remaining fields represent characters generated by the\n" -"various modifier combinations. The order of the fields follows this\n" -"general pattern:\n" -"\n" -" o The character generated by this scan code when no modifiers are in\n" -" effect is listed first.\n" -"\n" -" o If the `L' or `S' flag is active, then the shifted character\n" -" generated by this scan code is listed next.\n" -"\n" -" o If the `C' flag is active, then the control-character generated by\n" -" this scan code is listed next. Furthermore, if the `L' or `S' flag\n" -" is also active, then the shifted control-character is listed after\n" -" that.\n" -"\n" -" o If the `A' flag is active, then the alternate-character generated by\n" -" this scan code is listed next. Furthermore, if the `L' or `S' flag\n" -" is active, then the shifted alternate-character is listed after that.\n" -" If the `C' flag is also active, then the alternate-control-character\n" -" is listed next. Finally, if the `C' and `L' or `C' and `S' flags are\n" -" also active, then the shifted alternate-control-character is listed.\n" -"\n" -"The `R' flag does not actually refer to a modifier key. Instead, it is\n" -"used to distinguish the scan code which is given the special\n" -"pseudo-designation of `carriage return' key. Typically, this mask appears\n" -"solo and only the two fields for control-M and control-C follow. This flag\n" -"may be a throwback to an earlier time or may be specially interpreted by\n" -"the low-level keyboard driver, but its purpose is otherwise enigmatic.\n" -"\n" -"Recalling the example from above, the following fields can be identified:\n" -"\n" -" scan 0x00: -AC-L \"a\" \"A\" \"^A\" \"^A\" ca c7 \"^A\" \"^A\"\n" -"\n" -" o Lower-case `a' is generated when no modifiers are active.\n" -" o Upper-case `A' is generated when `shift' or `alpha-lock' are active.\n" -" o Control-A is generated when `control' is active.\n" -" o Control-A is generated when `control' and `shift' are active.\n" -" o The character represented by the hexadecimal code 0xca is generated\n" -" when `alternate' is active.\n" -" o The character represented by 0xc7 is generated when `alternate' and\n" -" `shift' (or `alpha-lock') are active.\n" -" o Control-A is generated when `alternate' and `control' are active.\n" -" o Control-A is generated when `alternate', `control' and `shift' (or\n" -" `alpha-lock') are active.\n" -"\n" -"The notation used to represent a particular generated character varies.\n" -"\n" -" o Printable ASCII characters are quoted, as in \"x\" or \"X\".\n" -"\n" -" o Control-characters are quoted and prefixed with `^', as in \"^X\".\n" -"\n" -" o Characters with values greater than 127 (0x7f) are displayed as\n" -" hexadecimal values without the `0x' prefix.\n" -"\n" -" o Characters in a non-ASCII character set (such as `Symbol') are\n" -" displayed as two hexadecimal numbers separated by a slash, as in\n" -" `01/4a'. The first number is the character set's identification code\n" -" (such as `01' for the `Symbol' set), and the second number is the\n" -" value of the generated character.\n" -"\n" -" o Non-printing special function characters are displayed with the\n" -" function's common name enclosed in brackets, as in `[page up]' or\n" -" `[F4]'.\n" -"\n" -" o If the binding represents a key sequence rather than a single\n" -" character, then the sequence's identification number is enclosed in\n" -" braces, as in `{seq#3}'.\n" -"\n" -"Recalling a few examples from above, the following interpretations can be\n" -"made:\n" -"\n" -" scan 0x07: -AC-L \"x\" \"X\" \"^X\" \"^X\" 01/b4 01/ce \"^X\" \"^X\"\n" -" scan 0x3e: ----- [F4]\n" -" scan 0x4a: ----- [page up]\n" -" scan 0x60: ----- {seq#3}\n" -"\n" -" o \"x\" and \"X\" are printable ASCII characters.\n" -" o \"^X\" is a control-character.\n" -" o `01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in\n" -" the `Symbol' character set.\n" -" o Scan code 0x3e generates function-key `F4', and scan code 0x4a\n" -" generates function-key `page up'.\n" -" o Scan code 0x60 is bound to key sequence #3.\n" -"\n" -"Finally, if a scan code is not bound to any characters, then it is\n" -"annotated with the label `not-bound', as with example scan code 0x68 from\n" -"above.\n" -"\n" -"Sequences\n" -"---------\n" -"A scan code (modified and unmodified) can be bound to a key sequence rather\n" -"than generating a single character or acting as a modifier. When it is\n" -"bound to a key sequence, a series of character invocations and modifier\n" -"actions are automatically generated rather than a single keystroke.\n" -"\n" -"Each mapping may contain zero or more key sequence records. The title\n" -"`SEQUENCES' is printed along with the count of sequence records which\n" -"follow. For example:\n" -"\n" -" SEQUENCES [3]\n" -" sequence 0: \"f\" \"o\" \"o\"\n" -" sequence 1: {alternate} \"b\" \"a\" \"r\" {unmodify}\n" -" sequence 2: [home] \"b\" \"a\" \"z\"\n" -"\n" -"The notation used to represent the sequence of generated characters is\n" -"identical to the notation already described in the `Characters' section\n" -"above, with the exception that modifier actions may be interposed between\n" -"generated characters. Such modifier actions are represented by the\n" -"modifier's name enclosed in braces. The special name `{unmodify}'\n" -"indicates the release of the modifier keys.\n" -"\n" -"Thus, the sequences in the above example can be interpreted as follows:\n" -"\n" -" o Sequence #0 generates `foo'.\n" -" o Sequence #1 invokes the `alternate' modifier, generates `bar', and\n" -" then releases `alternate'.\n" -" o Sequence #2 invokes the `home' key and then generates `baz'. In a\n" -" text editor, this would probably result in `baz' being prepended to\n" -" the line of text on which the cursor resides.\n" -"\n" -"Special Keys\n" -"------------\n" -"Certain keyboards feature keys which perform some type of special purpose\n" -"function rather than generating a character or acting as a modifier. For\n" -"instance, Apple keyboards often contain a `power' key, and NeXT keyboards\n" -"have historically featured screen brightness and volume control keys.\n" -"\n" -"Each mapping may contain zero or more special-key records which associate\n" -"hardware scan codes with such special purpose functions. The title\n" -"`SPECIALS' is printed along with the count of records which follow. For\n" -"each record, the special function's name is printed along with a list of\n" -"scan codes, in hexadecimal format, which are bound to that function. For\n" -"example:\n" -"\n" -" SPECIALS [6]\n" -" alpha-lock: 0x39\n" -" brightness-down: 0x79\n" -" brightness-up: 0x74\n" -" power: 0x7f\n" -" sound-down: 0x77\n" -" sound-up: 0x73\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print a summary of the various files and directories which are related to -// key mappings. -//----------------------------------------------------------------------------- -static void print_files_info( FILE* f ) - { - fputs( -"This is a summary of the various files and directories which are related to\n" -"key mappings.\n" -"\n" -"*.keymapping\n" -" A key mapping file which precisely defines the relationship of all\n" -" hardware-specific keyboard scan-codes with their associated\n" -" functionality.\n" -"\n" -"*.keyboard\n" -" A file describing the physical layout of keys on a particular type of\n" -" keyboard. Each `key' token in this file defines the position and shape\n" -" of the key on the keyboard, as well as the associated scan code which\n" -" that key generates. A .keymapping file, on the other hand, defines the\n" -" characters which are generated by a particular scan code depending upon\n" -" the state of the various modifier keys (such as shift, control, etc.).\n" -" The `interface' and `handler_id' values from a .keymapping file are\n" -" matched against those in each .keyboard file in order to associate a\n" -" particular .keyboard file with a key mapping. Various GUI programs use\n" -" the .keyboard file to display a visual representation of a keyboard for\n" -" the user. Since these files are just plain text, they can be easily\n" -" viewed and interpreted without the aid of a specialized program, thus\n" -" dumpkeymap leaves these files alone.\n" -"\n" -"/System/Library/Keyboards\n" -"/Network/Library/Keyboards\n" -"/Local/Library/Keyboards\n" -"/Library/Keyboards\n" -" Repositories for .keymapping and .keyboard files for MacOS/X, Darwin,\n" -" and MacOS/X Server.\n" -"\n" -"/NextLibrary/Keyboards\n" -"/LocalLibrary/Keyboards\n" -" Repositories for .keymapping and .keyboard files for OpenStep and\n" -" NextStep.\n" -"\n" -"$(HOME)/Library/Keyboards\n" -" Repository for personal .keymapping and .keyboard files.\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print a list of the various diagnostic messages which may be emitted. -//----------------------------------------------------------------------------- -static void print_diagnostics_info( FILE* f ) - { - fputs( -"The following diagnostic messages may be issued to the standard error\n" -"stream.\n" -"\n" -"Unrecognized option.\n" -" An unrecognized option was specified on the command-line. Invoke\n" -" dumpkeymap with the --help option to view a list of valid options.\n" -"\n" -"Insufficient data in keymapping data stream.\n" -" The key mapping file or data stream is corrupt. Either the file has\n" -" been incorrectly truncated or a field, such as those which indicates\n" -" the number of variable records which follow, contains a corrupt value.\n" -"\n" -"The following diagnostic messages have significance only when trying to\n" -"print .keymapping files mentioned on the command-line.\n" -"\n" -"Bad magic number.\n" -" The mentioned file is not a .keymapping file. The file's content does\n" -" not start with the string `KYM1'.\n" -"\n" -"Unable to open key mapping file.\n" -" The call to fopen() failed; probably because the specified path is\n" -" invalid or dumpkeymap does not have permission to read the file.\n" -"\n" -"Unable to determine key mapping file size.\n" -" The call to fstat() failed, thus memory can not be allocated for\n" -" loading the file.\n" -"\n" -"Unable to read key mapping file.\n" -" The call to fread() failed.\n" -"\n" -"The following diagnostic messages have significance only when trying to\n" -"print the currently active key mapping when no .keymapping files have been\n" -"mentioned on the command-line.\n" -"\n" -"Unable to open event status driver.\n" -" The call to NXOpenEventStatus() failed.\n" -"\n" -"Bad key mapping length.\n" -" The call to NXKeyMappingLength() returned a bogus value.\n" -"\n" -"Unable to get current key mapping.\n" -" The call to NXGetKeyMapping() failed.\n" -"\n" -"The following diagnostic messages have significance only when using\n" -"dumpkeymap on a non-Apple/NeXT platform.\n" -"\n" -"Must specify at least one .keymapping file.\n" -" No .keymapping files were mentioned on the command-line. On\n" -" non-Apple/NeXT platforms, there is no concept of a currently active\n" -" .keymapping file, so at least one file must be mentioned on the\n" -" command-line.\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print warranty. -//----------------------------------------------------------------------------- -static void print_warranty( FILE* f ) - { - fputs( -"This software is provided by the author `AS IS' and any express or implied\n" -"WARRANTIES, including, but not limited to, the implied warranties of\n" -"MERCHANTABILITY and FITNESS FOR A PARTICULAR PURPOSE are DISCLAIMED. In NO\n" -"EVENT shall the author be LIABLE for any DIRECT, INDIRECT, INCIDENTAL,\n" -"SPECIAL, EXEMPLARY, or CONSEQUENTIAL damages (including, but not limited\n" -"to, procurement of substitute goods or services; loss of use, data, or\n" -"profits; or business interruption) however caused and on any theory of\n" -"liability, whether in contract, strict liability, or tort (including\n" -"negligence or otherwise) arising in any way out of the use of this\n" -"software, even if advised of the possibility of such damage.\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print this program's version number. -//----------------------------------------------------------------------------- -static void print_version( FILE* f ) - { - fputs( "Version " PROG_VERSION " (built " __DATE__ ")\n\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print a usage summary. -//----------------------------------------------------------------------------- -static void print_usage( FILE* f ) - { - fputs( -"Usage: dumpkeymap [options] [-] [file ...]\n" -"\n" -"Prints a textual representation of each Apple/NeXT .keymapping file\n" -"mentioned on the command-line. If no files are mentioned and if the local\n" -"machine is an Apple or NeXT installation, then the key mapping currently in\n" -"use by the WindowServer and the AppKit is printed instead.\n" -"\n" -"Options:\n" -" -h --help\n" -" Display general program instructions and option summary.\n" -"\n" -" -k --help-keymapping\n" -" Display a detailed description of the internal layout of a\n" -" .keymapping file.\n" -"\n" -" -o --help-output\n" -" Display an explanation of the output generated by dumpkeymap when\n" -" dissecting a .keymapping file.\n" -"\n" -" -f --help-files\n" -" Display a summary of the various files and directories which are\n" -" related to key mappings.\n" -"\n" -" -d --help-diagnostics\n" -" Display a list of the various diagnostic messages which may be\n" -" emitted by dumpkeymap.\n" -"\n" -" -v --version\n" -" Display the dumpkeymap version number and warranty information.\n" -"\n" -" - --\n" -" Inhibit processing of options at this point in the argument list.\n" -" An occurrence of `-' or `--' in the argument list causes all\n" -" following arguments to be treated as file names even if an argument\n" -" begins with a `-' character.\n" -"\n", f ); - } - - -//----------------------------------------------------------------------------- -// Print an informational banner. -//----------------------------------------------------------------------------- -static void print_banner( FILE* f ) - { - fputs( "\n" PROG_NAME " v" PROG_VERSION " by " AUTHOR_INFO "\n" - COPYRIGHT "\n\n", f ); - } - - -//----------------------------------------------------------------------------- -// Process command-line arguments. Examine options first; collecting files -// along the way. If all is well, process collected file list. -//----------------------------------------------------------------------------- -int main( int const argc, char const* const argv[] ) - { - int rc = 0, i, nfiles = 0, more_options = 1, process_files = 1; - int* files = (int*)calloc( argc - 1, sizeof(int) ); - print_banner( stdout ); - - for (i = 1; i < argc; i++) - { - char const* const s = argv[i]; - if (!more_options || *s != '-') - files[ nfiles++ ] = i; - else - { - OPT_SWITCH(s) - OPT_CASE(-,--) - more_options = 0; - OPT_CASE(-h,--help) - print_usage( stdout ); - process_files = 0; - OPT_CASE(-k,--help-keymapping) - print_internal_layout_info( stdout ); - process_files = 0; - OPT_CASE(-o,--help-output) - print_output_info( stdout ); - process_files = 0; - OPT_CASE(-f,--help-files) - print_files_info( stdout ); - process_files = 0; - OPT_CASE(-d,--help-diagnostics) - print_diagnostics_info( stdout ); - process_files = 0; - OPT_CASE(-v,--version) - print_version( stdout ); - print_warranty( stdout ); - process_files = 0; - OPT_DEFAULT - fprintf( stderr, "ERROR: Unrecognized option: %s\n\n", s ); - process_files = 0; - rc = 1; - OPT_SWITCH_END - } - } - - if (process_files) - { - if (nfiles == 0) - rc = handle_empty_document_list(); - else - for (i = 0; i < nfiles; i++) - rc |= unparse_keymap_file( argv[files[i]] ); - } - - free( files ); - return rc; - } diff --git a/hw/darwin/utils/dumpkeymap.man b/hw/darwin/utils/dumpkeymap.man deleted file mode 100644 index 02b09e6ca..000000000 --- a/hw/darwin/utils/dumpkeymap.man +++ /dev/null @@ -1,1002 +0,0 @@ -.ig -//============================================================================= -// -// Manual page for `dumpkeymap'. -// -// Copyright (C) 1999,2000 by Eric Sunshine -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -//============================================================================= -// -.. -.ig -//----------------------------------------------------------------------------- -// Local identification information. -//----------------------------------------------------------------------------- -.. -.nr VE 4 \" Version number -.TH DUMPKEYMAP 1 "v\n(VE \-\- 1 December 2000" "Version \n(VE" -.de UP -1 December 2000 -.. -.ig -//----------------------------------------------------------------------------- -// Annotation Macros -// ----------------- -// Facilitate creation of annotated, non-filled blocks of text. An -// annotated block is initiated with the `AS' macro. Each annotated, -// non-filled line within the block must be introduced with the `AN' macro -// which takes three arguments. The first argument is the detail text to -// be annotated. The second is a string of spaces used to align the -// annotations by certain (broken) roff interpreters which fail to -// implement the proper set of roff commands (such as diversions, -// indentation, and tab stops). It is assumed that the spaces will be -// used with fixed-point font. The third argument is the annotation -// itself. The block should be terminated with the `AE' macro. For all -// roff interpreters which properly implement diversions, indentation, and -// tab stops, all annotations within the block are automatically aligned at -// the same horizontal position. This position is guaranteed to be just -// to the right of the widest `AN' detail line. For broken roff -// interpreters, such as `rman', the string of spaces from the second -// argument are used to align the annotations. Finally, the `AZ' macro, -// which takes a single argument, can be used to to insert a non-annotated -// line into the block which does not play a part in the calculation of -// the horizontal annotation alignment. -// -// Implementation Notes -// -------------------- -// *1* These macros utilize a diversion (named `AD'). Since the prevailing -// indentation is stored along with the diverted text, we must muck with -// the indentation level in order to prevent the indentation from being -// applied to the text a second time when `AD' is finally emitted. -// -// *2* Unfortunately, `.if' strips leading whitespace from following text, so -// `AN' uses \& to preserve the whitespace. -// -// *3* This manual page has been tested for proper formatting with troff, -// groff, nroff and rman (the `man' to `HTML' converter). Unfortunately, -// rman fails to implement many useful features such as diversions, -// indentation, and tab stops, and is also hideously buggy. Furthermore -// it identifies itself as nroff and fails to provide any further -// identification, so there is no way to create macros which specifically -// work around its limitations. Following is a list of several bugs in -// rman which the implementation of these macros must avoid: -// o Fails with multi-line conditionals within macros. -// o Fails on macro definition within multi-line conditionals. -// o Fails when macro arguments are not delimited by exactly 1 space. -// o String definition `.ds' ignores the value; uses empty "" instead. -// As a consequence of these problems, the following macros are written -// using a series of ugly single-line `.if' conditionals rather than the -// more natural multi-line `.if' and `.ie' conditionals. Also, rman fails -// to understand the common idiom of `.\"' to introduce a comment, which -// is why all comments in this file are wrapped in ignore `.ig' blocks. -//----------------------------------------------------------------------------- -.. -.de AS -.if t .nr AW 0 -.if t .nr AI \\n(.i -.if t .in -\\n(AI -.nf -.. -.de AN -.if t .if \w'\\$1'>\\n(AW .nr AW \w'\\$1' -.if t .da AD -.if t \\&\\$1\\t\\$3 -.if t .da -.if n \\&\\$1 \\$2\\$3 -.. -.de AZ -.if t .da AD -\\$1 -.if t .da -.. -.de AE -.if t .in +\\n(AIu -.if t .if \\n(AW .ta \\n(AWu+\w'\\(em'u -.if t .AD -.if t .DT -.if t .rm AD -.if t .rm AW -.fi -.. -.ig -//----------------------------------------------------------------------------- -// Bulleted list macros -- `BG' begins a bulleted list; `BU' delimits -// bulleted entries; `BE' ends a bulleted list. -//----------------------------------------------------------------------------- -.. -.de BG -.PP -.RS -.. -.de BU -.HP -\\(bu\\ \\c -.. -.de BE -.RE -.PP -.. -.ig -//----------------------------------------------------------------------------- -// Indented paragraph with stylized hanging tag macro. `TG' takes a single -// argument and treats it as the hanging tag of the indented paragraph. -// The tag is italicized in troff but not in nroff. -//----------------------------------------------------------------------------- -.. -.de TG -.TP -.ie t .I "\\$1" -.el \\$1 -.. -.ig -//----------------------------------------------------------------------------- -// Manual page for `dumpkeymap'. -//----------------------------------------------------------------------------- -.. -.SH NAME -dumpkeymap \- Dianostic dump of a .keymapping file -.SH SYNOPSIS -.B dumpkeymap -.RI [ options "] [-] [" file "...]" -.SH DESCRIPTION -.I dumpkeymap -prints a textual representation of each Apple/\c -.SM NeXT -.I .keymapping -file mentioned on the command-line. If no files are mentioned and if the -local machine is an Apple or -.SM NeXT -installation, then the key mapping currently in use by the WindowServer and the -AppKit is printed instead. -.SH OPTIONS -.TP -.B "\-h \-\^\-help" -Display general program instructions and option summary. -.TP -.B "\-k \-\^\-help\-keymapping" -Display a detailed description of the internal layout of a -.I .keymapping -file. This is the same information as that presented in the -.I "Key Mapping Description" -section of this document. -.TP -.B "\-o \-\^\-help\-output" -Display an explanation of the output generated by -.I dumpkeymap -when dissecting a -.I .keymapping -file. This is the same information as that presented in the -.I "Output Description" -section of this document. -.TP -.B "\-f \-\^\-help\-files" -Display a summary of the various files and directories which are related to -key mappings. This is the same information as that presented in the -.I "Files" -section of this document. -.TP -.B "\-d \-\^\-help\-diagnostics" -Display a list of the various diagnostic messages which may be emitted by -.I dumpkeymap. -This is the same information as that presented in the -.I "Diagnostics" -section of this document. -.TP -.B "\-v \-\^\-version" -Display the -.I dumpkeymap -version number and warranty information. -.TP -.B "\- \-\^\-" -Inhibit processing of options at this point in the argument list. An -occurrence of `\-' or `\-\^\-' in the argument list causes all following -arguments to be treated as file names even if an argument begins with a `\-' -character. -.SH "KEY MAPPING DESCRIPTION" -The following sections describe, in complete detail, the format of a raw key -mapping resource, as well as the format of the -.I .keymapping -file which encapsulates one or more raw mappings. -.SH "Types and Data" -The following type definitions are employed throughout this discussion: -.PP -.RS -.AS -.AZ "typedef unsigned char byte;" -.AZ "typedef unsigned short word;" -.AZ "typedef unsigned long dword;" -.AE -.RE -.PP -Additionally, the type definition -.RI ` number ' -is used generically to -indicate a numeric value. The actual size of the -.RI ` number ' -type may be one or two bytes depending upon how the data is stored in the key -map. Although most key maps use byte-sized numeric values, word-sized values -are also allowed. -.PP -Multi-byte values in a key mapping file are stored in big-endian byte order. -.SH "Key Mapping File and Device Mapping" -A key mapping file begins with a magic-number and continues with a -variable number of device-specific key mappings. -.PP -.RS -.AS -.AZ "struct KeyMappingFile {" -.AN " char magic_number[4];" " " "// `KYM1'" -.AN " DeviceMapping maps[...];" "" "// Variable number of maps" -.AZ }; -.AE -.PP -.AS -.AZ "struct DeviceMapping {" -.AN " dword interface;" " " "// Interface type" -.AN " dword handler_id;" "" "// Interface subtype" -.AN " dword map_size;" " " "// Byte count of `map' (below)" -.AN " KeyMapping map;" -.AZ }; -.AE -.RE -.PP -The value of `interface' represents a family of keyboard device types -(such as Intel -.SM "PC, ADB, NeXT," -Sun Type5, etc.), and is generally specified as one of the constant values -.SM "NX_EVS_DEVICE_INTERFACE_ADB, NX_EVS_DEVICE_INTERFACE_ACE," -etc., which are are defined in IOHIDTypes.h on MacOS/X and Darwin, and in -ev_types.h on MacOS/X Server, OpenStep, and NextStep. -.PP -The value of `handler_id' represents a specific keyboard layout within the -much broader `interface' family. For instance, for a 101-key Intel -.SM PC -keyboard (of type -.SM NX_EVS_DEVICE_INTERFACE_ACE\c -) the `handler_id' is '0', whereas for a 102-key keyboard it is `1'. -.PP -Together, `interface' and `handler_id' identify the exact keyboard hardware to -which this mapping applies. Programs which display a visual representation of -a keyboard layout, match `interface' and `handler_id' from the -.I .keymapping -file against the `interface' and `handler_id' values found in each -.I .keyboard -file. -.SH "Key Mapping" -A key mapping completely defines the relationship of all scan codes with their -associated functionality. A -.I KeyMapping -structure is embedded within the -.I DeviceMapping -structure in a -.IR KeyMappingFile . -The key mapping currently in use by the WindowServer and AppKit is also -represented by a -.I KeyMapping -structure, and can be referred to directly by calling NXGetKeyMapping() and -accessing the `mapping' data member of the returned -.I NXKeyMapping -structure. -.PP -.RS -.AS -.AZ "struct KeyMapping {" -.AN " word number_size;" " " "// 0=1 byte, non-zero=2 bytes" -.AN " number num_modifier_groups;" "" "// Modifier groups" -.AZ " ModifierGroup modifier_groups[...];" -.AN " number num_scan_codes;" " " "// Scan groups" -.AN " ScanGroup scan_table[...];" -.AN " number num_sequence_lists;" " " "// Sequence lists" -.AN " Sequence sequence_lists[...];" -.AN " number num_special_keys;" " " "// Special keys" -.AN " SpecialKey special_key[...];" -.AZ }; -.AE -.RE -.PP -The `number_size' flag determines the size, in bytes, of all remaining numeric -values (denoted by the type definition -.RI ` number ') -within the -key mapping. If its value is zero, then numbers are represented by a single -byte. If it is non-zero, then numbers are represented by a word (two bytes). -.SH "Modifier Group" -A modifier group defines all scan codes which map to a particular type of -modifier, such as -.IR shift , -.IR control , -etc. -.PP -.RS -.AS -.AZ "enum Modifier {" -.AZ " ALPHALOCK = 0," -.AZ " SHIFT," -.AZ " CONTROL," -.AZ " ALTERNATE," -.AZ " COMMAND," -.AZ " KEYPAD," -.AZ " HELP" -.AZ }; -.AE -.PP -.AS -.AZ "struct ModifierGroup {" -.AN " number modifier;" " " "// A Modifier constant" -.AN " number num_scan_codes;" -.AN " number scan_codes[...];" "" "// Variable number of scan codes" -.AZ }; -.AE -.RE -.PP -The scan_codes[] array contains a list of all scan codes which map to the -specified modifier. The -.IR shift ", " command ", and " alternate -modifiers are frequently mapped to two different scan codes, apiece, -since these modifiers often appear on both the left and right sides of -the keyboard. -.SH "Scan Group" -There is one -.I ScanGroup -for each scan code generated by the given keyboard. This number is given by -KeyMapping::num_scan_codes. The first scan group represents hardware scan -code 0, the second represents scan code 1, etc. -.PP -.RS -.AS -.AZ "enum ModifierMask {" -.AN " ALPHALOCK_MASK" " " "= 1 << 0," -.AN " SHIFT_MASK" " " "= 1 << 1," -.AN " CONTROL_MASK" " " "= 1 << 2," -.AN " ALTERNATE_MASK" " " "= 1 << 3," -.AN " CARRIAGE_RETURN_MASK" "" "= 1 << 4" -.AZ }; -.AZ "#define NOT_BOUND 0xff" -.AE -.PP -.AS -.AZ "struct ScanGroup {" -.AN " number mask;" -.AN " Character characters[...];" -.AZ }; -.AE -.RE -.PP -For each scan code, `mask' defines which modifier combinations generate -characters. If `mask' is -.SM NOT_BOUND -(0xff) then then this scan code does not generate any characters ever, and its -characters[] array is zero length. Otherwise, the characters[] array contains -one -.I Character -record for each modifier combination. -.PP -The number of records in characters[] is determined by computing (1 << -bits_set_in_mask). In other words, if mask is zero, then zero bits are set, -so characters[] contains only one record. If `mask' is -.SM "(SHIFT_MASK | CONTROL_MASK)," -then two bits are set, so characters[] contains four records. -.PP -The first record always represents the character which is generated by that -key when no modifiers are active. The remaining records represent characters -generated by the various modifier combinations. Using the example with the -.I shift -and -.I control -masks set, record two would represent the character with the -.I shift -modifier active; record three, the -.I control -modifier active; and record four, both the -.I shift -and -.I control -modifiers active. -.PP -As a special case, -.SM ALPHALOCK_MASK -implies -.SM SHIFT_MASK, -though only -.SM ALPHALOCK_MASK -appears in `mask'. In this case the same character is generated for both the -.I shift -and -.I alpha-lock -modifiers, but only needs to appear once in the characters[] array. -.PP -.SM CARRIAGE_RETURN_MASK -does not actually refer to a modifier key. Instead, it is used to -distinguish the scan code which is given the special pseudo-designation of -.I "carriage return" -key. Typically, this mask appears solo in a -.I ScanGroup -record and only the two -.I Character -records for control-M and control-C follow. This flag may be a throwback to -an earlier time or may be specially interpreted by the low-level keyboard -driver, but its purpose is otherwise enigmatic. -.SH Character -Each -.I Character -record indicates the character generated when this key is pressed, as well as -the character set which contains the character. Well known character sets are -.SM `ASCII' -and `Symbol'. The character set can also be one of the meta values -.SM FUNCTION_KEY -or -.SM KEY_SEQUENCE. -If it is -.SM FUNCTION_KEY -then `char_code' represents a generally well-known function key such as those -enumerated by -.I FunctionKey. -If the character set is -.SM KEY_SEQUENCE -then `char_code' represents is a zero-base index into -KeyMapping::sequence_lists[]. -.PP -.RS -.AS -.AZ "enum CharacterSet {" -.AN " ASCII" " " "= 0x00," -.AN " SYMBOL" " " "= 0x01," -.AN " ..." -.AN " FUNCTION_KEY" "" "= 0xfe," -.AN " KEY_SEQUENCE" "" "= 0xff" -.AZ }; -.AE -.PP -.AS -.AZ "struct Character {" -.AN " number set;" " " "// CharacterSet of generated character" -.AN " number char_code;" "" "// Actual character generated" -.AZ }; -.AE -.PP -.AS -.AZ "enum FunctionKey {" -.AZ " F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12," -.AZ " INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN," -.AZ " SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU," -.AZ " USER, SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE," -.AZ " DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT" -.AZ }; -.AE -.RE -.SH Sequence -When Character::set contains the meta value -.SM KEY_SEQUENCE, -the scan code is bound to a sequence of keys rather than a single character. -A sequence is a series of modifiers and characters which are automatically -generated when the associated key is depressed. -.PP -.RS -.AS -.AZ "#define MODIFIER_KEY 0xff" -.AE -.PP -.AS -.AZ "struct Sequence {" -.AN " number num_chars;" -.AN " Character characters[...];" -.AZ }; -.AE -.RE -.PP -Each generated -.I Character -is represented as previously described, with the exception that -.SM MODIFIER_KEY -may appear in place of -.SM KEY_SEQUENCE. -When the value of Character::set is -.SM MODIFIER_KEY -then Character::char_code represents a modifier key rather than an actual -character. If the modifier represented by `char_code' is non-zero, then it -indicates that the associated modifier key has been depressed. In this case, -the value is one of the constants enumerated by -.I Modifier -(\c -.SM "SHIFT, CONTROL, ALTERNATE," -etc.). If the value is zero then it means that the modifier keys have been -released. -.SH "Special Key" -A special key is one which is scanned directly by the Mach kernel rather than -by the WindowServer. In general, events are not generated for special keys. -.PP -.RS -.AS -.AZ "enum SpecialKeyType {" -.AZ " VOLUME_UP = 0," -.AZ " VOLUME_DOWN," -.AZ " BRIGHTNESS_UP," -.AZ " BRIGHTNESS_DOWN," -.AZ " ALPHA_LOCK," -.AZ " HELP," -.AZ " POWER," -.AZ " SECONDARY_ARROW_UP," -.AZ " SECONDARY_ARROW_DOWN" -.AZ }; -.AE -.PP -.AS -.AZ "struct SpecialKey {" -.AN " number type;" " " "// A SpecialKeyType constant" -.AN " number scan_code;" "" "// Actual scan code" -.AZ }; -.AE -.RE -.SH OUTPUT -What follows is an explanation and description of the various pieces of -information emitted by -.I dumpkeymap. -.PP -For a more thorough discussion of any particular piece of information described -here, refer to the detailed description of the internal layout of a key mapping -provided by the -.I "Key Mapping Description" -section above. -.SH Conventions -Depending upon context, some numeric values are displayed in decimal -notation, whereas others are displayed in hexadecimal notation. -Hexadecimal numbers are denoted by a `0x' prefix (for instance, `0x7b'), -except when explicitly noted otherwise. -.SH "Key Mapping Source" -The first piece of information presented about a particular key mapping is the -source from which the data was gleaned. For a -.I .keymapping -file, the title -.SM "`KEYMAP FILE'" -is emitted along with the path and name of the file in question. For the key -mapping currently in use by the WindowServer and AppKit, the title -.SM "`ACTIVE KEYMAP'" -is emitted instead. -.SH "Device Information" -Each -.I .keymapping -file may contain one or more raw key mappings. For example, a file which maps -keys to a Dvorak-style layout might contain raw mappings for Intel -.SM "PC, ADB, NeXT," -and Sun Type5 keyboards. -.PP -For each raw mapping, the following information is emitted: -.BG -.BU -The title -.SM `KEYMAP' -along with the mapping's relative position in the -.I .keymapping -file. -.BU -The `interface' identifier. -.BU -The `handler_id' sub-identifier. -.BU -The size of the raw mapping resource counted in bytes. -.BE -The `interface' and `handler_id' values, taken together, define a specific -keyboard device. A -.I .keyboard -file, which describes the visual layout of a keyboard, also contains -`interface' and `handler_id' identifiers. The -.I .keyboard -file corresponding to a particular key mapping can be found by matching the -`interface' and `handler_id' values from each resource. -.SH Modifiers -Each mapping may contain zero or more modifier records which associate hardware -scan codes with modifier descriptions such as -.I "shift, control, alternate," -etc. The title -.SM `MODIFIERS' -is printed along with the count of modifier records which follow. For each -modifier record, the modifier's name is printed along with a list of scan -codes, in hexadecimal format, which generate that modifier value. For example: -.PP -.RS -.nf -MODIFIERS [4] -alternate: 0x1d 0x60 -control: 0x3a -keypad: 0x52 0x53 ... 0x63 0x62 -shift: 0x2a 0x36 -.fi -.RE -.SH Characters -Each mapping may contain zero or more character records which associate -hardware scan codes with the actual characters generated by those scan -codes in the presence or absence of various modifier combinations. The -title -.SM `CHARACTERS' -is printed along with the count of character records which follow. Here is a -highly abbreviated example: -.PP -.RS -.nf -CHARACTERS [9] -scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A" -scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X" -scan 0x0a: ---S- "<" ">" -scan 0x13: -ACS- "2" "@" "^@" "^@" b2 b3 "^@" "^@" -scan 0x24: R---- "^M" "^C" -scan 0x3e: ----- [F4] -scan 0x4a: ----- [page up] -scan 0x60: ----- {seq#3} -scan 0x68: not-bound -.fi -.RE -.PP -For each record, the hexadecimal value of the hardware scan code is printed, -followed by a list of modifier flag combinations and the actual characters -generated by this scan code with and without modifiers applied. -.PP -The modifier flags field is composed of a combination of single letter -representations of the various modifier types. The letters stand for: -.PP -.RS -.nf -L \- alpha-lock -S \- shift -C \- control -A \- alternate -R \- carriage-return -.fi -.RE -.PP -As a special case, the -.I alpha-lock -flag also implies the -.I shift -flag, so these two flags never appear together in the same record. -.PP -The combination of modifier flags determines the meaning and number of fields -which follow. The first field after the modifier flags always represents the -character that will be generated if no modifier keys are depressed. The -remaining fields represent characters generated by the various modifier -combinations. The order of the fields follows this general pattern: -.BG -.BU -The character generated by this scan code when no modifiers are in effect is -listed first. -.BU -If the `L' or `S' flag is active, then the shifted character generated by this -scan code is listed next. -.BU -If the `C' flag is active, then the control-character generated by this scan -code is listed next. Furthermore, if the `L' or `S' flag is also active, then -the shifted control-character is listed after that. -.BU -If the `A' flag is active, then the alternate-character generated by this scan -code is listed next. Furthermore, if the `L' or `S' flag is active, then the -shifted alternate-character is listed after that. If the `C' flag is also -active, then the alternate-control-character is listed next. Finally, if the -`C' and `L' or `C' and `S' flags are also active, then the shifted -alternate-control-character is listed. -.BE -The `R' flag does not actually refer to a modifier key. Instead, it is used to -distinguish the scan code which is given the special pseudo-designation of -.I "carriage return" -key. Typically, this mask appears solo and only the two fields for control-M -and control-C follow. This flag may be a throwback to an earlier time or may -be specially interpreted by the low-level keyboard driver, but its purpose is -otherwise enigmatic. -.PP -Recalling the example from above, the following fields can be identified: -.PP -.RS -.nf -scan 0x00: -AC-L "a" "A" "^A" "^A" ca c7 "^A" "^A" -.fi -.RE -.BG -.BU -Lower-case `a' is generated when no modifiers are active. -.BU -Upper-case `A' is generated when -.IR shift " or " alpha-lock -are active. -.BU -Control-A is generated when -.I control -is active. -.BU -Control-A is generated when -.IR control " and " shift -are active. -.BU -The character represented by the hexadecimal code 0xca is generated when -.I alternate -is active. -.BU -The character represented by 0xc7 is generated when -.IR alternate " and " shift " (or " alpha-lock ") are active." -.BU -Control-A is generated when -.IR alternate " and " control -are active. -.BU -Control-A is generated when -.IR "alternate, control" " and " shift " (or " alpha-lock ") are active." -.BE -The notation used to represent a particular generated character varies. -.BG -.BU -Printable -.SM ASCII -characters are quoted, as in "x" or "X". -.BU -Control-characters are quoted and prefixed with `^', as in "^X". -.BU -Characters with values greater than 127 (0x7f) are displayed as hexadecimal -values without the `0x' prefix. -.BU -Characters in a non-\c -.SM ASCII -character set (such as `Symbol') are displayed as two hexadecimal numbers -separated by a slash, as in `01/4a'. The first number is the character set's -identification code (such as `01' for the `Symbol' set), and the second number -is the value of the generated character. -.BU -Non-printing special function characters are displayed with the function's -common name enclosed in brackets, as in `[page up]' or `[F4]'. -.BU -If the binding represents a key sequence rather than a single character, then -the sequence's identification number is enclosed in braces, as in `{seq#3}'. -.BE -Recalling a few examples from above, the following interpretations can be made: -.PP -.RS -.nf -scan 0x07: -AC-L "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X" -scan 0x3e: ----- [F4] -scan 0x4a: ----- [page up] -scan 0x60: ----- {seq#3} -.fi -.RE -.BG -.BU -"x" and "X" are printable -.SM ASCII -characters. -.BU -"^X" is a control-character. -.BU -`01/b4' and `01/ce' represent the character codes 0xb4 and 0xce in the `Symbol' -character set. -.BU -Scan code 0x3e generates function-key `F4', and scan code 0x4a generates -function-key `page up'. -.BU -Scan code 0x60 is bound to key sequence #3. -.BE -Finally, if a scan code is not bound to any characters, then it is annotated -with the label `not-bound', as with example scan code 0x68 from above. -.SH Sequences -A scan code (modified and unmodified) can be bound to a key sequence rather -than generating a single character or acting as a modifier. When it is bound -to a key sequence, a series of character invocations and modifier actions are -automatically generated rather than a single keystroke. -.PP -Each mapping may contain zero or more key sequence records. The title -.SM `SEQUENCES' -is printed along with the count of sequence records which follow. For example: -.PP -.RS -.nf -SEQUENCES [3] -sequence 0: "f" "o" "o" -sequence 1: {alternate} "b" "a" "r" {unmodify} -sequence 2: [home] "b" "a" "z" -.fi -.RE -.PP -The notation used to represent the sequence of generated characters is -identical to the notation already described in the -.I Characters -section above, with the exception that modifier actions may be interposed -between generated characters. Such modifier actions are represented by the -modifier's name enclosed in braces. The special name `{unmodify}' indicates -the release of the modifier keys. -.PP -Thus, the sequences in the above example can be interpreted as follows: -.BG -.BU -Sequence\ #0 generates `foo'. -.BU -Sequence\ #1 invokes the -.I alternate -modifier, generates `bar', and then releases -.I alternate. -.BU -Sequence\ #2 invokes the -.I home -key and then generates `baz'. In a text editor, this would probably result in -`baz' being prepended to the line of text on which the cursor resides. -.BE -.SH Special Keys -Certain keyboards feature keys which perform some type of special purpose -function rather than generating a character or acting as a modifier. For -instance, Apple keyboards often contain a -.I power -key, and -.SM NeXT -keyboards have historically featured screen brightness and volume control keys. -.PP -Each mapping may contain zero or more special-key records which associate -hardware scan codes with such special purpose functions. The title -.SM `SPECIALS' -is printed along with the count of records which follow. For each record, the -special function's name is printed along with a list of scan codes, in -hexadecimal format, which are bound to that function. For example: -.PP -.RS -.nf -SPECIALS [6] -alpha-lock: 0x39 -brightness-down: 0x79 -brightness-up: 0x74 -power: 0x7f -sound-down: 0x77 -sound-up: 0x73 -.fi -.RE -.SH FILES -.IP *.keymapping -A key mapping file which precisely defines the relationship of all -hardware-specific keyboard scan-codes with their associated functionality. -.IP *.keyboard -A file describing the physical layout of keys on a particular type of -keyboard. Each `key' token in this file defines the position and shape of the -key on the keyboard, as well as the associated scan code which that key -generates. A -.I .keymapping -file, on the other hand, defines the characters which are generated by a -particular scan code depending upon the state of the various modifier keys -(such as -.I shift, -.I control, -etc.). The `interface' and `handler_id' values from a -.I .keymapping -file are matched against those in each -.I .keyboard -file in order to associate a particular -.I .keyboard -file with a key mapping. Various -.SM GUI -programs use the -.I .keyboard -file to display a visual representation of a keyboard for the user. Since -these files are just plain text, they can be easily viewed and interpreted -without the aid of a specialized program, thus -.I dumpkeymap -leaves these files alone. -.PP -/System/Library/Keyboards -.br -/Network/Library/Keyboards -.br -/Local/Library/Keyboards -.br -/Library/Keyboards -.RS -Repositories for -.I .keymapping -and -.I .keyboard -files for MacOS/X, Darwin, and MacOS/X Server. -.RE -.PP -/NextLibrary/Keyboards -.br -/LocalLibrary/Keyboards -.RS -Repositories for -.I .keymapping -and -.I .keyboard -files for OpenStep and NextStep. -.RE -.IP $(HOME)/Library/Keyboards -Repository for personal -.I .keymapping -and -.I .keyboard -files. -.SH DIGANOSTICS -The following diagnostic messages may be issued to the standard error stream. -.TG "Unrecognized option." -An unrecognized option was specified on the command-line. Invoke -.I dumpkeymap -with the -.B "\-\^\-help" -option to view a list of valid options. -.TG "Insufficient data in keymapping data stream." -The key mapping file or data stream is corrupt. Either the file has been -incorrectly truncated or a field, such as those which indicates the number of -variable records which follow, contains a corrupt value. -.PP -The following diagnostic messages have significance only when trying to print -.I .keymapping -files mentioned on the command-line. -.TG "Bad magic number." -The mentioned file is not a -.I .keymapping -file. The file's content does not start with the string `KYM1'. -.TG "Unable to open key mapping file." -The call to fopen() failed; probably because the specified path is invalid or -.I dumpkeymap -does not have permission to read the file. -.TG "Unable to determine key mapping file size." -The call to fstat() failed, thus memory can not be allocated for loading the -file. -.TG "Unable to read key mapping file." -The call to fread() failed. -.PP -The following diagnostic messages have significance only when trying to print -the currently active key mapping when no -.I .keymapping -files have been mentioned on the command-line. -.TG "Unable to open event status driver." -The call to NXOpenEventStatus() failed. -.TG "Bad key mapping length." -The call to NXKeyMappingLength() returned a bogus value. -.TG "Unable to get current key mapping." -The call to NXGetKeyMapping() failed. -.PP -The following diagnostic messages have significance only when using -.I dumpkeymap -on a non-Apple/\c -.SM NeXT -platform. -.TG "Must specify at least one .keymapping file." -No -.I .keymapping -files were mentioned on the command-line. On non-Apple/\c -.SM NeXT -platforms, there is no concept of a currently active -.I .keymapping -file, so at least one file must be mentioned on the command-line. -.SH AUTHOR -Eric Sunshine wrote -.I dumpkeymap -and this document, the -.I "dumpkeymap user's manual." -Both -.I dumpkeymap -and this document are copyright \(co1999,2000 by Eric Sunshine -. All rights reserved. -.PP -The implementation of -.I dumpkeymap -is based upon information gathered on September 3, 1997 by Eric Sunshine - and Paul S. McCarthy during an -effort to reverse engineer the format of the -.SM NeXT -.I .keymapping -file. -.if n .PP -.if n Version \n(VE \-\- -.if n .UP From 8d0efe4c2a48047680af40e5f6d639f426902e07 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 4 Dec 2007 17:59:13 -0800 Subject: [PATCH 264/552] Darwin: Rework build system to more accurately reveal code infrastructure and facilitate future modularity. (cherry picked from commit e8399fd4d66a2b77b770c277e2fa424229a721b2) --- configure.ac | 2 +- hw/darwin/Makefile.am | 58 ++---------------- hw/darwin/quartz/Makefile.am | 13 +++- hw/darwin/quartz/X11Application.m | 3 +- .../apple/English.lproj/InfoPlist.strings | Bin .../apple/English.lproj/Localizable.strings | Bin .../apple/English.lproj/main.nib/classes.nib | 0 .../apple/English.lproj/main.nib/info.nib | 0 .../English.lproj/main.nib/keyedobjects.nib | Bin hw/darwin/{ => quartz}/apple/Info.plist | 0 hw/darwin/{ => quartz}/apple/Makefile.am | 0 hw/darwin/{ => quartz}/apple/X11.icns | Bin .../apple/X11.xcodeproj/project.pbxproj | 0 hw/darwin/{ => quartz}/apple/bundle-main.c | 0 hw/darwin/{ => quartz}/apple/launcher-main.c | 0 hw/darwin/{ => quartz}/apple/org.x.X11.plist | 0 hw/darwin/{ => quartz}/apple/server-main.c | 0 hw/darwin/quartz/xpr/Makefile.am | 54 ++++++++++++++-- hw/darwin/{ => quartz/xpr}/Xquartz.man | 0 19 files changed, 64 insertions(+), 66 deletions(-) rename hw/darwin/{ => quartz}/apple/English.lproj/InfoPlist.strings (100%) rename hw/darwin/{ => quartz}/apple/English.lproj/Localizable.strings (100%) rename hw/darwin/{ => quartz}/apple/English.lproj/main.nib/classes.nib (100%) rename hw/darwin/{ => quartz}/apple/English.lproj/main.nib/info.nib (100%) rename hw/darwin/{ => quartz}/apple/English.lproj/main.nib/keyedobjects.nib (100%) rename hw/darwin/{ => quartz}/apple/Info.plist (100%) rename hw/darwin/{ => quartz}/apple/Makefile.am (100%) rename hw/darwin/{ => quartz}/apple/X11.icns (100%) rename hw/darwin/{ => quartz}/apple/X11.xcodeproj/project.pbxproj (100%) rename hw/darwin/{ => quartz}/apple/bundle-main.c (100%) rename hw/darwin/{ => quartz}/apple/launcher-main.c (100%) rename hw/darwin/{ => quartz}/apple/org.x.X11.plist (100%) rename hw/darwin/{ => quartz}/apple/server-main.c (100%) rename hw/darwin/{ => quartz/xpr}/Xquartz.man (100%) diff --git a/configure.ac b/configure.ac index 5b21e69da..04ce6f4c7 100644 --- a/configure.ac +++ b/configure.ac @@ -2171,8 +2171,8 @@ hw/xgl/glxext/module/Makefile hw/xnest/Makefile hw/xwin/Makefile hw/darwin/Makefile -hw/darwin/apple/Makefile hw/darwin/quartz/Makefile +hw/darwin/quartz/apple/Makefile hw/darwin/quartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index f5b9e752d..3f29a8174 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -1,21 +1,13 @@ +noinst_LTLIBRARIES = libXdarwin.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ -DINXQUARTZ \ -DUSE_NEW_CLUT \ - -DXFree86Server \ - -I$(top_srcdir)/miext/rootless + -DXFree86Server -if X11APP -X11APP_SUBDIRS = apple -endif +SUBDIRS = . quartz -SUBDIRS = quartz $(X11APP_SUBDIRS) -DIST_SUBDIRS = quartz apple - -bin_PROGRAMS = Xquartz -man1_MANS = Xquartz.man - -Xquartz_SOURCES = \ +libXdarwin_la_SOURCES = \ darwin.c \ darwinEvents.c \ darwinKeyboard.c \ @@ -23,49 +15,7 @@ Xquartz_SOURCES = \ $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c -# We should probably add these once they're working, or are these obsolete and to be removed? -# ./quartz/cr/libcr.a -# ./quartz/fullscreen/libfullscreen.a - -Xquartz_LDADD = \ - ./quartz/libXquartz.a \ - ./quartz/xpr/libxpr.a \ - $(top_builddir)/dix/dixfonts.lo \ - $(top_builddir)/dix/libdix.la \ - $(top_builddir)/os/libos.la \ - $(top_builddir)/dix/libxpstubs.la \ - $(top_builddir)/miext/shadow/libshadow.la \ - $(top_builddir)/fb/libfb.la \ - $(top_builddir)/mi/libmi.la \ - $(top_builddir)/composite/libcomposite.la \ - $(top_builddir)/damageext/libdamageext.la \ - $(top_builddir)/miext/damage/libdamage.la \ - $(top_builddir)/xfixes/libxfixes.la \ - $(top_builddir)/miext/cw/libcw.la \ - $(top_builddir)/Xext/libXext.la \ - $(top_builddir)/xkb/libxkb.la \ - $(top_builddir)/xkb/libxkbstubs.la \ - $(top_builddir)/Xi/libXi.la \ - $(top_builddir)/dbe/libdbe.la \ - $(top_builddir)/record/librecord.la \ - $(top_builddir)/XTrap/libxtrap.la \ - $(top_builddir)/miext/rootless/librootless.la \ - $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ - $(top_builddir)/miext/rootless/accel/librlAccel.la \ - $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin - -Xquartz_LDFLAGS = \ - -XCClinker -Objc \ - -Wl,-u,_miDCInitialize \ - -Wl,-framework,Carbon \ - -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \ - -Wl,-framework,OpenGL \ - -Wl,-framework,Cocoa \ - -Wl,-framework,CoreAudio \ - -Wl,-framework,IOKit - EXTRA_DIST = \ - Xquartz.man \ darwinClut8.h \ darwin.h \ darwinKeyboard.h diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am index f5199dfa2..38f48d0e2 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/darwin/quartz/Makefile.am @@ -1,14 +1,21 @@ -noinst_LIBRARIES = libXQuartz.a +noinst_LTLIBRARIES = libXQuartz.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) + +# TODO: This should not pull in rootless... rootless should all be in xpr AM_CPPFLAGS = \ -I$(srcdir) -I$(srcdir)/.. \ -I$(top_srcdir)/miext/rootless -SUBDIRS = xpr +if X11APP +X11APP_SUBDIRS = apple +endif -libXQuartz_a_SOURCES = \ +SUBDIRS = . xpr $(X11APP_SUBDIRS) +DIST_SUBDIRS = xpr apple + +libXQuartz_la_SOURCES = \ X11Application.m \ X11Controller.m \ applewm.c \ diff --git a/hw/darwin/quartz/X11Application.m b/hw/darwin/quartz/X11Application.m index aef06990d..3e37dd436 100644 --- a/hw/darwin/quartz/X11Application.m +++ b/hw/darwin/quartz/X11Application.m @@ -59,8 +59,7 @@ int X11EnableKeyEquivalents = TRUE; int quartzHasRoot = FALSE, quartzEnableRootless = TRUE; extern int darwinFakeButtons, input_check_flag; -// extern Bool enable_stereo; -Bool enable_stereo; //<-- this needs to go back to being an extern once glxCGL is fixed +extern Bool enable_stereo; extern xEvent *darwinEvents; diff --git a/hw/darwin/apple/English.lproj/InfoPlist.strings b/hw/darwin/quartz/apple/English.lproj/InfoPlist.strings similarity index 100% rename from hw/darwin/apple/English.lproj/InfoPlist.strings rename to hw/darwin/quartz/apple/English.lproj/InfoPlist.strings diff --git a/hw/darwin/apple/English.lproj/Localizable.strings b/hw/darwin/quartz/apple/English.lproj/Localizable.strings similarity index 100% rename from hw/darwin/apple/English.lproj/Localizable.strings rename to hw/darwin/quartz/apple/English.lproj/Localizable.strings diff --git a/hw/darwin/apple/English.lproj/main.nib/classes.nib b/hw/darwin/quartz/apple/English.lproj/main.nib/classes.nib similarity index 100% rename from hw/darwin/apple/English.lproj/main.nib/classes.nib rename to hw/darwin/quartz/apple/English.lproj/main.nib/classes.nib diff --git a/hw/darwin/apple/English.lproj/main.nib/info.nib b/hw/darwin/quartz/apple/English.lproj/main.nib/info.nib similarity index 100% rename from hw/darwin/apple/English.lproj/main.nib/info.nib rename to hw/darwin/quartz/apple/English.lproj/main.nib/info.nib diff --git a/hw/darwin/apple/English.lproj/main.nib/keyedobjects.nib b/hw/darwin/quartz/apple/English.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/darwin/apple/English.lproj/main.nib/keyedobjects.nib rename to hw/darwin/quartz/apple/English.lproj/main.nib/keyedobjects.nib diff --git a/hw/darwin/apple/Info.plist b/hw/darwin/quartz/apple/Info.plist similarity index 100% rename from hw/darwin/apple/Info.plist rename to hw/darwin/quartz/apple/Info.plist diff --git a/hw/darwin/apple/Makefile.am b/hw/darwin/quartz/apple/Makefile.am similarity index 100% rename from hw/darwin/apple/Makefile.am rename to hw/darwin/quartz/apple/Makefile.am diff --git a/hw/darwin/apple/X11.icns b/hw/darwin/quartz/apple/X11.icns similarity index 100% rename from hw/darwin/apple/X11.icns rename to hw/darwin/quartz/apple/X11.icns diff --git a/hw/darwin/apple/X11.xcodeproj/project.pbxproj b/hw/darwin/quartz/apple/X11.xcodeproj/project.pbxproj similarity index 100% rename from hw/darwin/apple/X11.xcodeproj/project.pbxproj rename to hw/darwin/quartz/apple/X11.xcodeproj/project.pbxproj diff --git a/hw/darwin/apple/bundle-main.c b/hw/darwin/quartz/apple/bundle-main.c similarity index 100% rename from hw/darwin/apple/bundle-main.c rename to hw/darwin/quartz/apple/bundle-main.c diff --git a/hw/darwin/apple/launcher-main.c b/hw/darwin/quartz/apple/launcher-main.c similarity index 100% rename from hw/darwin/apple/launcher-main.c rename to hw/darwin/quartz/apple/launcher-main.c diff --git a/hw/darwin/apple/org.x.X11.plist b/hw/darwin/quartz/apple/org.x.X11.plist similarity index 100% rename from hw/darwin/apple/org.x.X11.plist rename to hw/darwin/quartz/apple/org.x.X11.plist diff --git a/hw/darwin/apple/server-main.c b/hw/darwin/quartz/apple/server-main.c similarity index 100% rename from hw/darwin/apple/server-main.c rename to hw/darwin/quartz/apple/server-main.c diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/darwin/quartz/xpr/Makefile.am index 8980ad7d3..769662276 100644 --- a/hw/darwin/quartz/xpr/Makefile.am +++ b/hw/darwin/quartz/xpr/Makefile.am @@ -1,12 +1,16 @@ -noinst_LIBRARIES = libxpr.a +bin_PROGRAMS = Xquartz + +# TODO: This man page needs sed magic and cleanup +man1_MANS = Xquartz.man + AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ - -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ - -I$(top_srcdir)/miext \ - -I$(top_srcdir)/miext/rootless \ - -I$(top_srcdir)/miext/rootless/safeAlpha + -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ + -I$(top_srcdir)/miext \ + -I$(top_srcdir)/miext/rootless \ + -I$(top_srcdir)/miext/rootless/safeAlpha -libxpr_a_SOURCES = \ +Xquartz_SOURCES = \ appledri.c \ dri.c \ xprAppleWM.c \ @@ -17,7 +21,45 @@ libxpr_a_SOURCES = \ x-hook.c \ x-list.c +Xquartz_LDADD = \ + $(top_builddir)/hw/darwin/quartz/libXquartz.la \ + $(top_builddir)/hw/darwin/libXdarwin.la \ + $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/dix/libdix.la \ + $(top_builddir)/os/libos.la \ + $(top_builddir)/dix/libxpstubs.la \ + $(top_builddir)/miext/shadow/libshadow.la \ + $(top_builddir)/fb/libfb.la \ + $(top_builddir)/mi/libmi.la \ + $(top_builddir)/composite/libcomposite.la \ + $(top_builddir)/damageext/libdamageext.la \ + $(top_builddir)/miext/damage/libdamage.la \ + $(top_builddir)/xfixes/libxfixes.la \ + $(top_builddir)/miext/cw/libcw.la \ + $(top_builddir)/Xext/libXext.la \ + $(top_builddir)/xkb/libxkb.la \ + $(top_builddir)/xkb/libxkbstubs.la \ + $(top_builddir)/Xi/libXi.la \ + $(top_builddir)/dbe/libdbe.la \ + $(top_builddir)/record/librecord.la \ + $(top_builddir)/XTrap/libxtrap.la \ + $(top_builddir)/miext/rootless/librootless.la \ + $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ + $(top_builddir)/miext/rootless/accel/librlAccel.la \ + $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin + +Xquartz_LDFLAGS = \ + -XCClinker -Objc \ + -Wl,-u,_miDCInitialize \ + -Wl,-framework,Carbon \ + -L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL \ + -Wl,-framework,OpenGL \ + -Wl,-framework,Cocoa \ + -Wl,-framework,CoreAudio \ + -Wl,-framework,IOKit + EXTRA_DIST = \ + Xquartz.man \ dri.h \ dristruct.h \ appledri.h \ diff --git a/hw/darwin/Xquartz.man b/hw/darwin/quartz/xpr/Xquartz.man similarity index 100% rename from hw/darwin/Xquartz.man rename to hw/darwin/quartz/xpr/Xquartz.man From c6cfcd408df3e44d0094946c0a7d2fa944b4d2d1 Mon Sep 17 00:00:00 2001 From: Hong Liu Date: Wed, 5 Dec 2007 17:48:28 +0100 Subject: [PATCH 265/552] Bug 13308: Verify and reject obviously broken modes. --- hw/xfree86/modes/xf86EdidModes.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index 777ef7e44..a125d8c82 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -328,6 +328,12 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, Mode->VSyncEnd = Mode->VSyncStart + timing->v_sync_width; Mode->VTotal = timing->v_active + timing->v_blanking; + /* perform basic check on the detail timing */ + if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) { + xfree(Mode); + return NULL; + } + xf86SetModeDefaultName(Mode); /* We ignore h/v_size and h/v_border for now. */ From 0fccb24aa978b838cf0fb008e9695837e612c529 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 30 Nov 2007 20:35:26 +0200 Subject: [PATCH 266/552] ProcessOtherEvent: Don't do double translation of button events We already deal with the button mapping in GetPointerEvents, so don't do the remapping again in ProcessOtherEvent. --- Xi/exevents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 377311ec9..7cf0c50a5 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -244,7 +244,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) other->valuator->motionHintWindow = NullWindow; b->buttonsDown++; b->motionMask = DeviceButtonMotionMask; - xE->u.u.detail = b->map[key]; + xE->u.u.detail = key; if (xE->u.u.detail == 0) return; if (xE->u.u.detail <= 5) @@ -266,7 +266,7 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr other, int count) other->valuator->motionHintWindow = NullWindow; if (b->buttonsDown >= 1 && !--b->buttonsDown) b->motionMask = 0; - xE->u.u.detail = b->map[key]; + xE->u.u.detail = key; if (xE->u.u.detail == 0) return; if (xE->u.u.detail <= 5) From 2d723bbd0d36f6d7763b4df3298d40720f97fdd0 Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Mon, 29 Oct 2007 18:05:19 -0400 Subject: [PATCH 267/552] Add missing swaps in panoramiXSwap.c --- Xext/panoramiXSwap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c index cc9f61442..b13c286dd 100644 --- a/Xext/panoramiXSwap.c +++ b/Xext/panoramiXSwap.c @@ -66,6 +66,7 @@ SProcPanoramiXGetState(ClientPtr client) swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); + swapl (&stuff->window, n); return ProcPanoramiXGetState(client); } @@ -77,6 +78,7 @@ SProcPanoramiXGetScreenCount(ClientPtr client) swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); + swapl (&stuff->window, n); return ProcPanoramiXGetScreenCount(client); } @@ -88,6 +90,8 @@ SProcPanoramiXGetScreenSize(ClientPtr client) swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); + swapl (&stuff->window, n); + swapl (&stuff->screen, n); return ProcPanoramiXGetScreenSize(client); } From a8e27a108abeba73b2888da4e0604008f4b02045 Mon Sep 17 00:00:00 2001 From: Kanru Chen Date: Mon, 3 Dec 2007 12:46:45 +0000 Subject: [PATCH 268/552] Config: HAL: Fix XKB option parsing Actually combine the XKB options into a string, rather than just repeatedly writing a comma. --- config/hal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/hal.c b/config/hal.c index 6bb449d5a..4427deb39 100644 --- a/config/hal.c +++ b/config/hal.c @@ -134,10 +134,11 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop) str = ret; for (i = 0; props[i]; i++) { - str = strcpy(str, props[i]); + strcpy(str, props[i]); + str += strlen(props[i]); *str++ = ','; } - *str = '\0'; + *(str-1) = '\0'; libhal_free_string_array(props); } From d8b2cad3771a09860e7be1726f67e684cf7caeec Mon Sep 17 00:00:00 2001 From: Rich Coe Date: Wed, 5 Dec 2007 19:31:07 +0000 Subject: [PATCH 269/552] OS: Connection: Don't shut down disappeared clients (bug #7876) If a client disappears in the middle of CheckConnections (presumably because its appgroup leader disappears), then don't attempt to shut it down a second time, when it's already vanished. --- os/connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os/connection.c b/os/connection.c index 860404f6c..6012a8e81 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1059,7 +1059,8 @@ CheckConnections(void) FD_SET(curclient, &tmask); r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); if (r < 0) - CloseDownClient(clients[ConnectionTranslation[curclient]]); + if (ConnectionTranslation[curclient] > 0) + CloseDownClient(clients[ConnectionTranslation[curclient]]); mask &= ~((fd_mask)1 << curoff); } } From b7f3618f3933a810778093fd47564a1e3bf3fde6 Mon Sep 17 00:00:00 2001 From: Rich Coe Date: Wed, 5 Dec 2007 19:36:37 +0000 Subject: [PATCH 270/552] OS: Connection: Keep trying select while it gets interrupted (bug #9240) If we got interrupted (EINTR or EAGAIN) during select, just try again, rather than shutting clients down on either of these errors. --- os/connection.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/os/connection.c b/os/connection.c index 6012a8e81..be7521f3d 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1057,7 +1057,9 @@ CheckConnections(void) curclient = curoff + (i * (sizeof(fd_mask)*8)); FD_ZERO(&tmask); FD_SET(curclient, &tmask); - r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); + do { + r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); + } while (r < 0 && (errno == EINTR || errno == EAGAIN)); if (r < 0) if (ConnectionTranslation[curclient] > 0) CloseDownClient(clients[ConnectionTranslation[curclient]]); @@ -1071,9 +1073,12 @@ CheckConnections(void) curclient = XFD_FD(&savedAllClients, i); FD_ZERO(&tmask); FD_SET(curclient, &tmask); - r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); - if (r < 0 && GetConnectionTranslation(curclient) > 0) - CloseDownClient(clients[GetConnectionTranslation(curclient)]); + do { + r = Select (curclient + 1, &tmask, NULL, NULL, ¬ime); + } while (r < 0 && (errno == EINTR || errno == EAGAIN)); + if (r < 0) + if (GetConnectionTranslation(curclient) > 0) + CloseDownClient(clients[GetConnectionTranslation(curclient)]); } #endif } From 85dd8efac1bc0715f03c99d261b1c5d0980623e1 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 5 Dec 2007 19:36:59 +0000 Subject: [PATCH 271/552] WaitForSomething: Ignore EAGAIN If select ever returns EAGAIN, don't bother complaining. --- os/WaitFor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/WaitFor.c b/os/WaitFor.c index 71ca53438..e6d45e68e 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -257,7 +257,7 @@ WaitForSomething(int *pClientsReady) FatalError("WaitForSomething(): select: errno=%d\n", selecterr); } - else if (selecterr != EINTR) + else if (selecterr != EINTR && selecterr != EAGAIN) { ErrorF("WaitForSomething(): select: errno=%d\n", selecterr); From 320abd7d1d906807448fa01ad3377daf707f46cc Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 5 Dec 2007 19:37:48 +0000 Subject: [PATCH 272/552] XKB: Actions: Don't run certain actions on the core keyboard Don't run VT switches, terminations, or anything, on the core keyboard: only run actions which affect the keyboard state. If we get an action such as VT switch, just swallow the event. --- hw/xfree86/dixmods/xkbKillSrv.c | 4 +++- xkb/ddxKillSrv.c | 4 +++- xkb/xkbActions.c | 19 +++++++++++++++++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/dixmods/xkbKillSrv.c b/hw/xfree86/dixmods/xkbKillSrv.c index b3399db4a..9074fd390 100644 --- a/hw/xfree86/dixmods/xkbKillSrv.c +++ b/hw/xfree86/dixmods/xkbKillSrv.c @@ -48,6 +48,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. int XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) { - xf86ProcessActionEvent(ACTION_TERMINATE, NULL); + if (dev != inputInfo.keyboard) + xf86ProcessActionEvent(ACTION_TERMINATE, NULL); + return 0; } diff --git a/xkb/ddxKillSrv.c b/xkb/ddxKillSrv.c index a573ecbd8..3b5fd5353 100644 --- a/xkb/ddxKillSrv.c +++ b/xkb/ddxKillSrv.c @@ -41,6 +41,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. int XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) { - GiveUp(1); + if (dev != inputInfo.keyboard) + GiveUp(1); + return 0; } diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 8ddbdba3d..6edac292e 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -561,6 +561,9 @@ _XkbFilterPointerMove( XkbSrvInfoPtr xkbi, int x,y; Bool accel; + if (xkbi->device == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ filter->keycode = keycode; filter->active = 1; @@ -601,6 +604,9 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + if (xkbi->device == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ int button= pAction->btn.button; @@ -980,8 +986,11 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + DeviceIntPtr dev = xkbi->device; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ - DeviceIntPtr dev = xkbi->device; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; @@ -1003,8 +1012,11 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { + DeviceIntPtr dev = xkbi->device; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ - DeviceIntPtr dev = xkbi->device; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; @@ -1029,6 +1041,9 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi, DeviceIntPtr dev; int button; + if (dev == inputInfo.keyboard) + return 0; + if (filter->keycode==0) { /* initial press */ dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL); if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice())) From cb44b6121c4b7b9dd7ff4ff52aaab914c82ff013 Mon Sep 17 00:00:00 2001 From: Andrew Oakley Date: Wed, 5 Dec 2007 20:23:05 -0500 Subject: [PATCH 273/552] =?UTF-8?q?Fix=20commit=20aa0dfb3f42f19bb351ca7f1a?= =?UTF-8?q?9507ff5ec4590e96=20From=20bugzilla=20bug=2013467=C2=B9:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently the xserver fails to build without this (now deleted) file, as the Makefile tries to distribute it. The patch simply removes the reference to modeline2c.pl. 1] http://bugs.freedesktop.org/show_bug.cgi?id=13467 Signed-off-by: James Cloos --- hw/xfree86/common/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index 5499b694e..2f23776a0 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -87,7 +87,6 @@ EXTRA_DIST = \ xf86Date.h \ xf86DefModes.c \ $(MODEDEFSOURCES) \ - modeline2c.pl \ $(DISTKBDSOURCES) if LNXACPI From e00f7061b22001989edf5bd38c2d0cc1566fdd19 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 4 Dec 2007 23:18:37 -0800 Subject: [PATCH 274/552] Darwin: Cleaned up keyboard interface headers (cherry picked from commit 141f69dc3d8d6e7d8ff65607f43700ac11243041) --- hw/darwin/darwin.h | 9 --- hw/darwin/darwinKeyboard.c | 93 ++++++++++------------------ hw/darwin/darwinKeyboard.h | 30 ++++----- hw/darwin/darwinKeyboard_interface.h | 52 ++++++++++++++++ hw/darwin/quartz/quartzKeyboard.c | 18 ++---- 5 files changed, 101 insertions(+), 101 deletions(-) create mode 100644 hw/darwin/darwinKeyboard_interface.h diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index d7d2af44f..0f5f492b6 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -46,7 +46,6 @@ typedef struct { int bitsPerComponent; } DarwinFramebufferRec, *DarwinFramebufferPtr; - // From darwin.c void DarwinPrintBanner(void); int DarwinParseModifierList(const char *constmodifiers); @@ -63,14 +62,6 @@ void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int poin void DarwinSendKeyboardEvents(int ev_type, int keycode); void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y); -// From darwinKeyboard.c -int DarwinModifierNXKeyToNXKeycode(int key, int side); -void DarwinKeyboardInit(DeviceIntPtr pDev); -int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide); -int DarwinModifierNXKeyToNXMask(int key); -int DarwinModifierNXMaskToNXKey(int mask); -int DarwinModifierStringToNXKey(const char *string); - // Mode specific functions Bool DarwinModeAddScreen(int index, ScreenPtr pScreen); Bool DarwinModeSetupScreen(int index, ScreenPtr pScreen); diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index 851a10f11..1c83cbce4 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -179,7 +179,7 @@ static KeySym const next_to_x[256] = { static KeySym const symbol_to_x[] = { XK_Left, XK_Up, XK_Right, XK_Down }; -int const NUM_SYMBOL = sizeof(symbol_to_x) / sizeof(symbol_to_x[0]); +static int const NUM_SYMBOL = sizeof(symbol_to_x) / sizeof(symbol_to_x[0]); #define MIN_FUNCKEY 0x20 static KeySym const funckey_to_x[] = { @@ -190,7 +190,7 @@ static KeySym const funckey_to_x[] = { XK_Page_Up, XK_Page_Down, XK_F13, XK_F14, XK_F15 }; -int const NUM_FUNCKEY = sizeof(funckey_to_x) / sizeof(funckey_to_x[0]); +static int const NUM_FUNCKEY = sizeof(funckey_to_x) / sizeof(funckey_to_x[0]); typedef struct { KeySym normalSym; @@ -216,7 +216,7 @@ static darwinKeyPad_t const normal_to_keypad[] = { { XK_period, XK_KP_Decimal }, { XK_slash, XK_KP_Divide } }; -int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]); +static int const NUM_KEYPAD = sizeof(normal_to_keypad) / sizeof(normal_to_keypad[0]); static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl ) { @@ -232,35 +232,32 @@ static char *inBuffer = NULL; // Can be configured to treat embedded "numbers" as being composed of // either 1, 2, or 4 bytes, apiece. //----------------------------------------------------------------------------- -typedef struct _DataStream -{ +typedef struct _DataStream { unsigned char const *data; unsigned char const *data_end; short number_size; // Size in bytes of a "number" in the stream. } DataStream; -static DataStream* new_data_stream( unsigned char const* data, int size ) -{ +static DataStream* new_data_stream(unsigned char const* data, int size) { DataStream* s = (DataStream*)xalloc( sizeof(DataStream) ); - s->data = data; - s->data_end = data + size; - s->number_size = 1; // Default to byte-sized numbers. + if(s) { + s->data = data; + s->data_end = data + size; + s->number_size = 1; // Default to byte-sized numbers. + } return s; } -static void destroy_data_stream( DataStream* s ) -{ +static void destroy_data_stream(DataStream* s) { xfree(s); } -static unsigned char get_byte( DataStream* s ) -{ +static unsigned char get_byte(DataStream* s) { assert(s->data + 1 <= s->data_end); return *s->data++; } -static short get_word( DataStream* s ) -{ +static short get_word(DataStream* s) { short hi, lo; assert(s->data + 2 <= s->data_end); hi = *s->data++; @@ -268,8 +265,7 @@ static short get_word( DataStream* s ) return ((hi << 8) | lo); } -static int get_dword( DataStream* s ) -{ +static int get_dword(DataStream* s) { int b1, b2, b3, b4; assert(s->data + 4 <= s->data_end); b4 = *s->data++; @@ -279,8 +275,7 @@ static int get_dword( DataStream* s ) return ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); } -static int get_number( DataStream* s ) -{ +static int get_number(DataStream* s) { switch (s->number_size) { case 4: return get_dword(s); case 2: return get_word(s); @@ -296,8 +291,7 @@ static int get_number( DataStream* s ) * bits_set * Calculate number of bits set in the modifier mask. */ -static short bits_set( short mask ) -{ +static short bits_set(short mask) { short n = 0; for ( ; mask != 0; mask >>= 1) @@ -311,10 +305,7 @@ static short bits_set( short mask ) * Read the next character code from the Darwin keymapping * and write it to the X keymap. */ -static void parse_next_char_code( - DataStream *s, - KeySym *k ) -{ +static void parse_next_char_code(DataStream *s, KeySym *k) { const short charSet = get_number(s); const short charCode = get_number(s); @@ -337,9 +328,7 @@ static void parse_next_char_code( * DarwinReadKeymapFile * Read the appropriate keymapping from a keymapping file. */ -Bool DarwinReadKeymapFile( - NXKeyMapping *keyMap) -{ +Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) { struct stat st; NXEventSystemDevice info[20]; int interface = 0, handler_id = 0; @@ -448,9 +437,7 @@ Bool DarwinReadKeymapFile( /* * DarwinParseNXKeyMapping */ -Bool DarwinParseNXKeyMapping( - darwinKeyboardInfo *info) -{ +Bool DarwinParseNXKeyMapping(darwinKeyboardInfo *info) { KeySym *k; int i; short numMods, numKeys, numPadKeys = 0; @@ -649,8 +636,7 @@ Bool DarwinParseNXKeyMapping( * Use the keyMap field of keyboard info structure to populate * the modMap and modifierKeycodes fields. */ -static void -DarwinBuildModifierMaps(darwinKeyboardInfo *info) { +static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) { int i; KeySym *k; @@ -743,12 +729,7 @@ DarwinBuildModifierMaps(darwinKeyboardInfo *info) { * Load the keyboard map from a file or system and convert * it to an equivalent X keyboard map and modifier map. */ -static void -DarwinLoadKeyboardMapping(KeySymsRec *keySyms) -{ - int i; - KeySym *k; - +static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) { memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap)); /* TODO: Clean this up @@ -765,6 +746,8 @@ DarwinLoadKeyboardMapping(KeySymsRec *keySyms) DarwinBuildModifierMaps(&keyInfo); #ifdef DUMP_DARWIN_KEYMAP + int i; + KeySym *k; DEBUG_LOG("Darwin -> X converted keyboard map\n"); for (i = 0, k = keyInfo.keyMap; i < NX_NUMKEYCODES; i++, k += GLYPHS_PER_KEY) @@ -793,9 +776,7 @@ DarwinLoadKeyboardMapping(KeySymsRec *keySyms) * X keyboard map and modifier map. Set the new keyboard * device structure. */ -void DarwinKeyboardInit( - DeviceIntPtr pDev ) -{ +void DarwinKeyboardInit(DeviceIntPtr pDev) { KeySymsRec keySyms; // Open a shared connection to the HID System. @@ -816,9 +797,7 @@ void DarwinKeyboardInit( /* Borrowed from dix/devices.c */ -static Bool -InitModMap(register KeyClassPtr keyc) -{ +static Bool InitModMap(register KeyClassPtr keyc) { int i, j; CARD8 keysPerModifier[8]; CARD8 mask; @@ -863,9 +842,7 @@ InitModMap(register KeyClassPtr keyc) } -void -DarwinKeyboardReload(DeviceIntPtr pDev) -{ +void DarwinKeyboardReload(DeviceIntPtr pDev) { KeySymsRec keySyms; DarwinLoadKeyboardMapping(&keySyms); @@ -898,8 +875,7 @@ DarwinKeyboardReload(DeviceIntPtr pDev) * side = 0 for left or 1 for right. * Returns 0 if key+side is not a known modifier. */ -int DarwinModifierNXKeyToNXKeycode(int key, int side) -{ +int DarwinModifierNXKeyToNXKeycode(int key, int side) { return keyInfo.modifierKeycodes[key][side]; } @@ -908,8 +884,7 @@ int DarwinModifierNXKeyToNXKeycode(int key, int side) * Returns -1 if keycode+side is not a modifier key * outSide may be NULL, else it gets 0 for left and 1 for right. */ -int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) -{ +int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) { int key, side; keycode += MIN_KEYCODE; @@ -928,8 +903,7 @@ int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) * DarwinModifierNXMaskToNXKey * Returns -1 if mask is not a known modifier mask. */ -int DarwinModifierNXMaskToNXKey(int mask) -{ +int DarwinModifierNXMaskToNXKey(int mask) { switch (mask) { case NX_ALPHASHIFTMASK: return NX_MODIFIERKEY_ALPHALOCK; case NX_SHIFTMASK: return NX_MODIFIERKEY_SHIFT; @@ -959,8 +933,7 @@ int DarwinModifierNXMaskToNXKey(int mask) return -1; } -const char *DarwinModifierNXMaskTostring(int mask) -{ +const char *DarwinModifierNXMaskTostring(int mask) { switch (mask) { case NX_ALPHASHIFTMASK: return "NX_ALPHASHIFTMASK"; case NX_SHIFTMASK: return "NX_SHIFTMASK"; @@ -986,8 +959,7 @@ const char *DarwinModifierNXMaskTostring(int mask) * DarwinModifierNXKeyToNXMask * Returns 0 if key is not a known modifier key. */ -int DarwinModifierNXKeyToNXMask(int key) -{ +int DarwinModifierNXKeyToNXMask(int key) { switch (key) { case NX_MODIFIERKEY_ALPHALOCK: return NX_ALPHASHIFTMASK; case NX_MODIFIERKEY_SHIFT: return NX_SHIFTMASK; @@ -1017,8 +989,7 @@ int DarwinModifierNXKeyToNXMask(int key) * DarwinModifierStringToNXKey * Returns -1 if string is not a known modifier. */ -int DarwinModifierStringToNXKey(const char *str) -{ +int DarwinModifierStringToNXKey(const char *str) { if (!strcasecmp(str, "shift")) return NX_MODIFIERKEY_SHIFT; else if (!strcasecmp(str, "control")) return NX_MODIFIERKEY_CONTROL; else if (!strcasecmp(str, "option")) return NX_MODIFIERKEY_ALTERNATE; diff --git a/hw/darwin/darwinKeyboard.h b/hw/darwin/darwinKeyboard.h index 368aee954..12104418e 100644 --- a/hw/darwin/darwinKeyboard.h +++ b/hw/darwin/darwinKeyboard.h @@ -27,25 +27,19 @@ #ifndef DARWIN_KEYBOARD_H #define DARWIN_KEYBOARD_H 1 -#define XK_TECHNICAL // needed to get XK_Escape -#define XK_PUBLISHING -#include "X11/keysym.h" -#include "inputstr.h" - -// Each key can generate 4 glyphs. They are, in order: -// unshifted, shifted, modeswitch unshifted, modeswitch shifted -#define GLYPHS_PER_KEY 4 -#define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better -#define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1 - -typedef struct darwinKeyboardInfo_struct { - CARD8 modMap[MAP_LENGTH]; - KeySym keyMap[MAP_LENGTH * GLYPHS_PER_KEY]; - unsigned char modifierKeycodes[32][2]; -} darwinKeyboardInfo; +#include "darwinKeyboard_interface.h" +/* Provided for darwinEvents.c */ +extern darwinKeyboardInfo keyInfo; void DarwinKeyboardReload(DeviceIntPtr pDev); -unsigned int DarwinModeSystemKeymapSeed(void); -Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info); +void DarwinKeyboardInit(DeviceIntPtr pDev); +int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide); +int DarwinModifierNXKeyToNXKeycode(int key, int side); +int DarwinModifierNXKeyToNXMask(int key); +int DarwinModifierNXMaskToNXKey(int mask); +int DarwinModifierStringToNXKey(const char *string); + +/* Provided for darwin.c */ +void DarwinKeyboardInit(DeviceIntPtr pDev); #endif /* DARWIN_KEYBOARD_H */ diff --git a/hw/darwin/darwinKeyboard_interface.h b/hw/darwin/darwinKeyboard_interface.h new file mode 100644 index 000000000..f41f46318 --- /dev/null +++ b/hw/darwin/darwinKeyboard_interface.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2003-2004 Torrey T. Lyons. 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, sublicense, + * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ + +#ifndef DARWIN_KEYBOARD_INTERFACE_H +#define DARWIN_KEYBOARD_INTERFACE_H 1 + +#define XK_TECHNICAL // needed to get XK_Escape +#define XK_PUBLISHING +#include "X11/keysym.h" +#include "inputstr.h" + +// Each key can generate 4 glyphs. They are, in order: +// unshifted, shifted, modeswitch unshifted, modeswitch shifted +#define GLYPHS_PER_KEY 4 +#define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better +#define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1 + +typedef struct darwinKeyboardInfo_struct { + CARD8 modMap[MAP_LENGTH]; + KeySym keyMap[MAP_LENGTH * GLYPHS_PER_KEY]; + unsigned char modifierKeycodes[32][2]; +} darwinKeyboardInfo; + +/* These functions need to be implemented by XQuartz, XDarwin, etc. */ +void DarwinKeyboardReload(DeviceIntPtr pDev); +Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info); +unsigned int DarwinModeSystemKeymapSeed(void); + +#endif /* DARWIN_KEYBOARD_INTERFACE_H */ diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index ee485b8c5..c69fb9f96 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -40,7 +40,7 @@ #include #include -#include "darwinKeyboard.h" +#include "darwinKeyboard_interface.h" #include "X11/keysym.h" #include "keysym2ucs.h" @@ -146,9 +146,7 @@ const static struct { {UKEYSYM (0x31b), XK_dead_horn}, /* COMBINING HORN */ }; -unsigned int -DarwinModeSystemKeymapSeed (void) -{ +unsigned int DarwinModeSystemKeymapSeed(void) { static unsigned int seed; static KeyboardLayoutRef last_key_layout; KeyboardLayoutRef key_layout; @@ -160,9 +158,7 @@ DarwinModeSystemKeymapSeed (void) return seed; } -static inline UniChar -macroman2ucs (unsigned char c) -{ +static inline UniChar macroman2ucs(unsigned char c) { /* Precalculated table mapping MacRoman-128 to Unicode. Generated by creating single element CFStringRefs then extracting the first character. */ @@ -190,9 +186,7 @@ macroman2ucs (unsigned char c) else return table[c - 128]; } -static KeySym -make_dead_key (KeySym in) -{ +static KeySym make_dead_key(KeySym in) { int i; for (i = 0; i < sizeof (dead_keys) / sizeof (dead_keys[0]); i++) @@ -201,9 +195,7 @@ make_dead_key (KeySym in) return in; } -Bool -DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) -{ +Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info) { KeyboardLayoutRef key_layout; const void *chr_data = NULL; int num_keycodes = NUM_KEYCODES; From bc65a243930e4b02f06a861495420b0a120eae8c Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 5 Dec 2007 19:43:49 -0800 Subject: [PATCH 275/552] Darwin: Flattened quartz into darwin, renamed darwin xquartz Leaving xpr unflattened since we want modularity to replace that with xpc (XPluginComposite) at some point (cherry picked from commit 48e6a75fbdd0fee86e364f02ace83f20b312a2b2) --- configure.ac | 7 ++--- hw/Makefile.am | 4 +-- hw/darwin/Makefile.am | 21 -------------- hw/{darwin/quartz => xquartz}/Makefile.am | 26 ++++++++++++------ .../quartz => xquartz}/X11Application.h | 0 .../quartz => xquartz}/X11Application.m | 0 hw/{darwin/quartz => xquartz}/X11Controller.h | 0 hw/{darwin/quartz => xquartz}/X11Controller.m | 0 hw/{darwin/quartz => xquartz}/applewm.c | 0 hw/{darwin/quartz => xquartz}/applewmExt.h | 0 .../bundle}/English.lproj/InfoPlist.strings | Bin .../bundle}/English.lproj/Localizable.strings | Bin .../English.lproj/main.nib/classes.nib | 0 .../bundle}/English.lproj/main.nib/info.nib | 0 .../English.lproj/main.nib/keyedobjects.nib | Bin .../apple => xquartz/bundle}/Info.plist | 0 .../apple => xquartz/bundle}/Makefile.am | 0 .../quartz/apple => xquartz/bundle}/X11.icns | Bin .../bundle}/X11.xcodeproj/project.pbxproj | 0 .../apple => xquartz/bundle}/bundle-main.c | 0 .../apple => xquartz/bundle}/launcher-main.c | 0 .../apple => xquartz/bundle}/org.x.X11.plist | 0 .../apple => xquartz/bundle}/server-main.c | 0 hw/{darwin => xquartz}/darwin.c | 0 hw/{darwin => xquartz}/darwin.h | 0 hw/{darwin => xquartz}/darwinClut8.h | 0 hw/{darwin => xquartz}/darwinEvents.c | 0 hw/{darwin => xquartz}/darwinKeyboard.c | 0 hw/{darwin => xquartz}/darwinKeyboard.h | 2 +- hw/{darwin => xquartz}/darwinXinput.c | 0 hw/{darwin/quartz => xquartz}/keysym2ucs.c | 0 hw/{darwin/quartz => xquartz}/keysym2ucs.h | 0 hw/{darwin/quartz => xquartz}/pseudoramiX.c | 0 hw/{darwin/quartz => xquartz}/pseudoramiX.h | 0 hw/{darwin/quartz => xquartz}/quartz.c | 0 hw/{darwin/quartz => xquartz}/quartz.h | 0 hw/{darwin/quartz => xquartz}/quartzAudio.c | 0 hw/{darwin/quartz => xquartz}/quartzAudio.h | 0 hw/{darwin/quartz => xquartz}/quartzCocoa.m | 0 hw/{darwin/quartz => xquartz}/quartzCommon.h | 0 hw/{darwin/quartz => xquartz}/quartzCursor.c | 0 hw/{darwin/quartz => xquartz}/quartzCursor.h | 0 .../quartz => xquartz}/quartzKeyboard.c | 2 +- .../quartzKeyboard.h} | 6 ++-- .../quartz => xquartz}/quartzPasteboard.c | 0 .../quartz => xquartz}/quartzPasteboard.h | 0 hw/{darwin/quartz => xquartz}/quartzStartup.c | 0 hw/{darwin/quartz => xquartz}/xpr/Makefile.am | 5 ++-- hw/{darwin/quartz => xquartz}/xpr/Xplugin.h | 0 hw/{darwin/quartz => xquartz}/xpr/Xquartz.man | 0 hw/{darwin/quartz => xquartz}/xpr/appledri.c | 0 hw/{darwin/quartz => xquartz}/xpr/appledri.h | 0 .../quartz => xquartz}/xpr/appledristr.h | 0 hw/{darwin/quartz => xquartz}/xpr/dri.c | 0 hw/{darwin/quartz => xquartz}/xpr/dri.h | 0 hw/{darwin/quartz => xquartz}/xpr/dristruct.h | 0 hw/{darwin/quartz => xquartz}/xpr/x-hash.c | 0 hw/{darwin/quartz => xquartz}/xpr/x-hash.h | 0 hw/{darwin/quartz => xquartz}/xpr/x-hook.c | 0 hw/{darwin/quartz => xquartz}/xpr/x-hook.h | 0 hw/{darwin/quartz => xquartz}/xpr/x-list.c | 0 hw/{darwin/quartz => xquartz}/xpr/x-list.h | 0 hw/{darwin/quartz => xquartz}/xpr/xpr.h | 0 .../quartz => xquartz}/xpr/xprAppleWM.c | 2 +- hw/{darwin/quartz => xquartz}/xpr/xprCursor.c | 2 +- hw/{darwin/quartz => xquartz}/xpr/xprFrame.c | 2 +- hw/{darwin/quartz => xquartz}/xpr/xprScreen.c | 8 +++--- 67 files changed, 36 insertions(+), 51 deletions(-) delete mode 100644 hw/darwin/Makefile.am rename hw/{darwin/quartz => xquartz}/Makefile.am (59%) rename hw/{darwin/quartz => xquartz}/X11Application.h (100%) rename hw/{darwin/quartz => xquartz}/X11Application.m (100%) rename hw/{darwin/quartz => xquartz}/X11Controller.h (100%) rename hw/{darwin/quartz => xquartz}/X11Controller.m (100%) rename hw/{darwin/quartz => xquartz}/applewm.c (100%) rename hw/{darwin/quartz => xquartz}/applewmExt.h (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/English.lproj/InfoPlist.strings (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/English.lproj/Localizable.strings (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/English.lproj/main.nib/classes.nib (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/English.lproj/main.nib/info.nib (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/English.lproj/main.nib/keyedobjects.nib (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/Info.plist (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/Makefile.am (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/X11.icns (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/X11.xcodeproj/project.pbxproj (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/bundle-main.c (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/launcher-main.c (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/org.x.X11.plist (100%) rename hw/{darwin/quartz/apple => xquartz/bundle}/server-main.c (100%) rename hw/{darwin => xquartz}/darwin.c (100%) rename hw/{darwin => xquartz}/darwin.h (100%) rename hw/{darwin => xquartz}/darwinClut8.h (100%) rename hw/{darwin => xquartz}/darwinEvents.c (100%) rename hw/{darwin => xquartz}/darwinKeyboard.c (100%) rename hw/{darwin => xquartz}/darwinKeyboard.h (98%) rename hw/{darwin => xquartz}/darwinXinput.c (100%) rename hw/{darwin/quartz => xquartz}/keysym2ucs.c (100%) rename hw/{darwin/quartz => xquartz}/keysym2ucs.h (100%) rename hw/{darwin/quartz => xquartz}/pseudoramiX.c (100%) rename hw/{darwin/quartz => xquartz}/pseudoramiX.h (100%) rename hw/{darwin/quartz => xquartz}/quartz.c (100%) rename hw/{darwin/quartz => xquartz}/quartz.h (100%) rename hw/{darwin/quartz => xquartz}/quartzAudio.c (100%) rename hw/{darwin/quartz => xquartz}/quartzAudio.h (100%) rename hw/{darwin/quartz => xquartz}/quartzCocoa.m (100%) rename hw/{darwin/quartz => xquartz}/quartzCommon.h (100%) rename hw/{darwin/quartz => xquartz}/quartzCursor.c (100%) rename hw/{darwin/quartz => xquartz}/quartzCursor.h (100%) rename hw/{darwin/quartz => xquartz}/quartzKeyboard.c (99%) rename hw/{darwin/darwinKeyboard_interface.h => xquartz/quartzKeyboard.h} (94%) rename hw/{darwin/quartz => xquartz}/quartzPasteboard.c (100%) rename hw/{darwin/quartz => xquartz}/quartzPasteboard.h (100%) rename hw/{darwin/quartz => xquartz}/quartzStartup.c (100%) rename hw/{darwin/quartz => xquartz}/xpr/Makefile.am (92%) rename hw/{darwin/quartz => xquartz}/xpr/Xplugin.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/Xquartz.man (100%) rename hw/{darwin/quartz => xquartz}/xpr/appledri.c (100%) rename hw/{darwin/quartz => xquartz}/xpr/appledri.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/appledristr.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/dri.c (100%) rename hw/{darwin/quartz => xquartz}/xpr/dri.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/dristruct.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/x-hash.c (100%) rename hw/{darwin/quartz => xquartz}/xpr/x-hash.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/x-hook.c (100%) rename hw/{darwin/quartz => xquartz}/xpr/x-hook.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/x-list.c (100%) rename hw/{darwin/quartz => xquartz}/xpr/x-list.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/xpr.h (100%) rename hw/{darwin/quartz => xquartz}/xpr/xprAppleWM.c (98%) rename hw/{darwin/quartz => xquartz}/xpr/xprCursor.c (99%) rename hw/{darwin/quartz => xquartz}/xpr/xprFrame.c (99%) rename hw/{darwin/quartz => xquartz}/xpr/xprScreen.c (98%) diff --git a/configure.ac b/configure.ac index 04ce6f4c7..5bc3d8032 100644 --- a/configure.ac +++ b/configure.ac @@ -2170,10 +2170,9 @@ hw/xgl/glxext/Makefile hw/xgl/glxext/module/Makefile hw/xnest/Makefile hw/xwin/Makefile -hw/darwin/Makefile -hw/darwin/quartz/Makefile -hw/darwin/quartz/apple/Makefile -hw/darwin/quartz/xpr/Makefile +hw/xquartz/Makefile +hw/xquartz/bundle/Makefile +hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile hw/kdrive/chips/Makefile diff --git a/hw/Makefile.am b/hw/Makefile.am index 0e65f7106..abdeabb01 100644 --- a/hw/Makefile.am +++ b/hw/Makefile.am @@ -31,7 +31,7 @@ XPRINT_SUBDIRS = xprint endif if XQUARTZ -XQUARTZ_SUBDIRS = darwin +XQUARTZ_SUBDIRS = xquartz endif SUBDIRS = \ @@ -45,7 +45,7 @@ SUBDIRS = \ $(KDRIVE_SUBDIRS) \ $(XPRINT_SUBDIRS) -DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl xprint +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint relink: for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am deleted file mode 100644 index 3f29a8174..000000000 --- a/hw/darwin/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -noinst_LTLIBRARIES = libXdarwin.la -AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) -AM_CPPFLAGS = \ - -DINXQUARTZ \ - -DUSE_NEW_CLUT \ - -DXFree86Server - -SUBDIRS = . quartz - -libXdarwin_la_SOURCES = \ - darwin.c \ - darwinEvents.c \ - darwinKeyboard.c \ - darwinXinput.c \ - $(top_srcdir)/fb/fbcmap_mi.c \ - $(top_srcdir)/mi/miinitext.c - -EXTRA_DIST = \ - darwinClut8.h \ - darwin.h \ - darwinKeyboard.h diff --git a/hw/darwin/quartz/Makefile.am b/hw/xquartz/Makefile.am similarity index 59% rename from hw/darwin/quartz/Makefile.am rename to hw/xquartz/Makefile.am index 38f48d0e2..725d20f6c 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -1,24 +1,29 @@ -noinst_LTLIBRARIES = libXQuartz.la - +noinst_LTLIBRARIES = libXquartz.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) -AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) - -# TODO: This should not pull in rootless... rootless should all be in xpr AM_CPPFLAGS = \ - -I$(srcdir) -I$(srcdir)/.. \ + -DBUILD_DATE=\"$(BUILD_DATE)\" \ + -DINXQUARTZ \ + -DUSE_NEW_CLUT \ + -DXFree86Server \ -I$(top_srcdir)/miext/rootless if X11APP -X11APP_SUBDIRS = apple +X11APP_SUBDIRS = bundle endif SUBDIRS = . xpr $(X11APP_SUBDIRS) -DIST_SUBDIRS = xpr apple +DIST_SUBDIRS = xpr bundle -libXQuartz_la_SOURCES = \ +libXquartz_la_SOURCES = \ + $(top_srcdir)/fb/fbcmap.c \ + $(top_srcdir)/mi/miinitext.c \ X11Application.m \ X11Controller.m \ applewm.c \ + darwin.c \ + darwinEvents.c \ + darwinKeyboard.c \ + darwinXinput.c \ keysym2ucs.c \ pseudoramiX.c \ quartz.c \ @@ -32,6 +37,9 @@ EXTRA_DIST = \ X11Application.h \ X11Controller.h \ applewmExt.h \ + darwinClut8.h \ + darwin.h \ + darwinKeyboard.h \ keysym2ucs.h \ pseudoramiX.h \ quartzAudio.h \ diff --git a/hw/darwin/quartz/X11Application.h b/hw/xquartz/X11Application.h similarity index 100% rename from hw/darwin/quartz/X11Application.h rename to hw/xquartz/X11Application.h diff --git a/hw/darwin/quartz/X11Application.m b/hw/xquartz/X11Application.m similarity index 100% rename from hw/darwin/quartz/X11Application.m rename to hw/xquartz/X11Application.m diff --git a/hw/darwin/quartz/X11Controller.h b/hw/xquartz/X11Controller.h similarity index 100% rename from hw/darwin/quartz/X11Controller.h rename to hw/xquartz/X11Controller.h diff --git a/hw/darwin/quartz/X11Controller.m b/hw/xquartz/X11Controller.m similarity index 100% rename from hw/darwin/quartz/X11Controller.m rename to hw/xquartz/X11Controller.m diff --git a/hw/darwin/quartz/applewm.c b/hw/xquartz/applewm.c similarity index 100% rename from hw/darwin/quartz/applewm.c rename to hw/xquartz/applewm.c diff --git a/hw/darwin/quartz/applewmExt.h b/hw/xquartz/applewmExt.h similarity index 100% rename from hw/darwin/quartz/applewmExt.h rename to hw/xquartz/applewmExt.h diff --git a/hw/darwin/quartz/apple/English.lproj/InfoPlist.strings b/hw/xquartz/bundle/English.lproj/InfoPlist.strings similarity index 100% rename from hw/darwin/quartz/apple/English.lproj/InfoPlist.strings rename to hw/xquartz/bundle/English.lproj/InfoPlist.strings diff --git a/hw/darwin/quartz/apple/English.lproj/Localizable.strings b/hw/xquartz/bundle/English.lproj/Localizable.strings similarity index 100% rename from hw/darwin/quartz/apple/English.lproj/Localizable.strings rename to hw/xquartz/bundle/English.lproj/Localizable.strings diff --git a/hw/darwin/quartz/apple/English.lproj/main.nib/classes.nib b/hw/xquartz/bundle/English.lproj/main.nib/classes.nib similarity index 100% rename from hw/darwin/quartz/apple/English.lproj/main.nib/classes.nib rename to hw/xquartz/bundle/English.lproj/main.nib/classes.nib diff --git a/hw/darwin/quartz/apple/English.lproj/main.nib/info.nib b/hw/xquartz/bundle/English.lproj/main.nib/info.nib similarity index 100% rename from hw/darwin/quartz/apple/English.lproj/main.nib/info.nib rename to hw/xquartz/bundle/English.lproj/main.nib/info.nib diff --git a/hw/darwin/quartz/apple/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib similarity index 100% rename from hw/darwin/quartz/apple/English.lproj/main.nib/keyedobjects.nib rename to hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib diff --git a/hw/darwin/quartz/apple/Info.plist b/hw/xquartz/bundle/Info.plist similarity index 100% rename from hw/darwin/quartz/apple/Info.plist rename to hw/xquartz/bundle/Info.plist diff --git a/hw/darwin/quartz/apple/Makefile.am b/hw/xquartz/bundle/Makefile.am similarity index 100% rename from hw/darwin/quartz/apple/Makefile.am rename to hw/xquartz/bundle/Makefile.am diff --git a/hw/darwin/quartz/apple/X11.icns b/hw/xquartz/bundle/X11.icns similarity index 100% rename from hw/darwin/quartz/apple/X11.icns rename to hw/xquartz/bundle/X11.icns diff --git a/hw/darwin/quartz/apple/X11.xcodeproj/project.pbxproj b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj similarity index 100% rename from hw/darwin/quartz/apple/X11.xcodeproj/project.pbxproj rename to hw/xquartz/bundle/X11.xcodeproj/project.pbxproj diff --git a/hw/darwin/quartz/apple/bundle-main.c b/hw/xquartz/bundle/bundle-main.c similarity index 100% rename from hw/darwin/quartz/apple/bundle-main.c rename to hw/xquartz/bundle/bundle-main.c diff --git a/hw/darwin/quartz/apple/launcher-main.c b/hw/xquartz/bundle/launcher-main.c similarity index 100% rename from hw/darwin/quartz/apple/launcher-main.c rename to hw/xquartz/bundle/launcher-main.c diff --git a/hw/darwin/quartz/apple/org.x.X11.plist b/hw/xquartz/bundle/org.x.X11.plist similarity index 100% rename from hw/darwin/quartz/apple/org.x.X11.plist rename to hw/xquartz/bundle/org.x.X11.plist diff --git a/hw/darwin/quartz/apple/server-main.c b/hw/xquartz/bundle/server-main.c similarity index 100% rename from hw/darwin/quartz/apple/server-main.c rename to hw/xquartz/bundle/server-main.c diff --git a/hw/darwin/darwin.c b/hw/xquartz/darwin.c similarity index 100% rename from hw/darwin/darwin.c rename to hw/xquartz/darwin.c diff --git a/hw/darwin/darwin.h b/hw/xquartz/darwin.h similarity index 100% rename from hw/darwin/darwin.h rename to hw/xquartz/darwin.h diff --git a/hw/darwin/darwinClut8.h b/hw/xquartz/darwinClut8.h similarity index 100% rename from hw/darwin/darwinClut8.h rename to hw/xquartz/darwinClut8.h diff --git a/hw/darwin/darwinEvents.c b/hw/xquartz/darwinEvents.c similarity index 100% rename from hw/darwin/darwinEvents.c rename to hw/xquartz/darwinEvents.c diff --git a/hw/darwin/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c similarity index 100% rename from hw/darwin/darwinKeyboard.c rename to hw/xquartz/darwinKeyboard.c diff --git a/hw/darwin/darwinKeyboard.h b/hw/xquartz/darwinKeyboard.h similarity index 98% rename from hw/darwin/darwinKeyboard.h rename to hw/xquartz/darwinKeyboard.h index 12104418e..5cf64c7d1 100644 --- a/hw/darwin/darwinKeyboard.h +++ b/hw/xquartz/darwinKeyboard.h @@ -27,7 +27,7 @@ #ifndef DARWIN_KEYBOARD_H #define DARWIN_KEYBOARD_H 1 -#include "darwinKeyboard_interface.h" +#include "quartzKeyboard.h" /* Provided for darwinEvents.c */ extern darwinKeyboardInfo keyInfo; diff --git a/hw/darwin/darwinXinput.c b/hw/xquartz/darwinXinput.c similarity index 100% rename from hw/darwin/darwinXinput.c rename to hw/xquartz/darwinXinput.c diff --git a/hw/darwin/quartz/keysym2ucs.c b/hw/xquartz/keysym2ucs.c similarity index 100% rename from hw/darwin/quartz/keysym2ucs.c rename to hw/xquartz/keysym2ucs.c diff --git a/hw/darwin/quartz/keysym2ucs.h b/hw/xquartz/keysym2ucs.h similarity index 100% rename from hw/darwin/quartz/keysym2ucs.h rename to hw/xquartz/keysym2ucs.h diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c similarity index 100% rename from hw/darwin/quartz/pseudoramiX.c rename to hw/xquartz/pseudoramiX.c diff --git a/hw/darwin/quartz/pseudoramiX.h b/hw/xquartz/pseudoramiX.h similarity index 100% rename from hw/darwin/quartz/pseudoramiX.h rename to hw/xquartz/pseudoramiX.h diff --git a/hw/darwin/quartz/quartz.c b/hw/xquartz/quartz.c similarity index 100% rename from hw/darwin/quartz/quartz.c rename to hw/xquartz/quartz.c diff --git a/hw/darwin/quartz/quartz.h b/hw/xquartz/quartz.h similarity index 100% rename from hw/darwin/quartz/quartz.h rename to hw/xquartz/quartz.h diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/xquartz/quartzAudio.c similarity index 100% rename from hw/darwin/quartz/quartzAudio.c rename to hw/xquartz/quartzAudio.c diff --git a/hw/darwin/quartz/quartzAudio.h b/hw/xquartz/quartzAudio.h similarity index 100% rename from hw/darwin/quartz/quartzAudio.h rename to hw/xquartz/quartzAudio.h diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/xquartz/quartzCocoa.m similarity index 100% rename from hw/darwin/quartz/quartzCocoa.m rename to hw/xquartz/quartzCocoa.m diff --git a/hw/darwin/quartz/quartzCommon.h b/hw/xquartz/quartzCommon.h similarity index 100% rename from hw/darwin/quartz/quartzCommon.h rename to hw/xquartz/quartzCommon.h diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/xquartz/quartzCursor.c similarity index 100% rename from hw/darwin/quartz/quartzCursor.c rename to hw/xquartz/quartzCursor.c diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/xquartz/quartzCursor.h similarity index 100% rename from hw/darwin/quartz/quartzCursor.h rename to hw/xquartz/quartzCursor.h diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c similarity index 99% rename from hw/darwin/quartz/quartzKeyboard.c rename to hw/xquartz/quartzKeyboard.c index c69fb9f96..0a50d06ac 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/xquartz/quartzKeyboard.c @@ -40,7 +40,7 @@ #include #include -#include "darwinKeyboard_interface.h" +#include "quartzKeyboard.h" #include "X11/keysym.h" #include "keysym2ucs.h" diff --git a/hw/darwin/darwinKeyboard_interface.h b/hw/xquartz/quartzKeyboard.h similarity index 94% rename from hw/darwin/darwinKeyboard_interface.h rename to hw/xquartz/quartzKeyboard.h index f41f46318..f27fcdeac 100644 --- a/hw/darwin/darwinKeyboard_interface.h +++ b/hw/xquartz/quartzKeyboard.h @@ -24,8 +24,8 @@ * use or other dealings in this Software without prior written authorization. */ -#ifndef DARWIN_KEYBOARD_INTERFACE_H -#define DARWIN_KEYBOARD_INTERFACE_H 1 +#ifndef QUARTZ_KEYBOARD_H +#define QUARTZ_KEYBOARD_H 1 #define XK_TECHNICAL // needed to get XK_Escape #define XK_PUBLISHING @@ -49,4 +49,4 @@ void DarwinKeyboardReload(DeviceIntPtr pDev); Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info); unsigned int DarwinModeSystemKeymapSeed(void); -#endif /* DARWIN_KEYBOARD_INTERFACE_H */ +#endif /* QUARTZ_KEYBOARD_H */ diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/xquartz/quartzPasteboard.c similarity index 100% rename from hw/darwin/quartz/quartzPasteboard.c rename to hw/xquartz/quartzPasteboard.c diff --git a/hw/darwin/quartz/quartzPasteboard.h b/hw/xquartz/quartzPasteboard.h similarity index 100% rename from hw/darwin/quartz/quartzPasteboard.h rename to hw/xquartz/quartzPasteboard.h diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/xquartz/quartzStartup.c similarity index 100% rename from hw/darwin/quartz/quartzStartup.c rename to hw/xquartz/quartzStartup.c diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am similarity index 92% rename from hw/darwin/quartz/xpr/Makefile.am rename to hw/xquartz/xpr/Makefile.am index 769662276..3cc2aba12 100644 --- a/hw/darwin/quartz/xpr/Makefile.am +++ b/hw/xquartz/xpr/Makefile.am @@ -5,7 +5,7 @@ man1_MANS = Xquartz.man AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ - -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ + -I$(srcdir) -I$(srcdir)/.. \ -I$(top_srcdir)/miext \ -I$(top_srcdir)/miext/rootless \ -I$(top_srcdir)/miext/rootless/safeAlpha @@ -22,8 +22,7 @@ Xquartz_SOURCES = \ x-list.c Xquartz_LDADD = \ - $(top_builddir)/hw/darwin/quartz/libXquartz.la \ - $(top_builddir)/hw/darwin/libXdarwin.la \ + $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/dix/libdix.la \ $(top_builddir)/os/libos.la \ diff --git a/hw/darwin/quartz/xpr/Xplugin.h b/hw/xquartz/xpr/Xplugin.h similarity index 100% rename from hw/darwin/quartz/xpr/Xplugin.h rename to hw/xquartz/xpr/Xplugin.h diff --git a/hw/darwin/quartz/xpr/Xquartz.man b/hw/xquartz/xpr/Xquartz.man similarity index 100% rename from hw/darwin/quartz/xpr/Xquartz.man rename to hw/xquartz/xpr/Xquartz.man diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c similarity index 100% rename from hw/darwin/quartz/xpr/appledri.c rename to hw/xquartz/xpr/appledri.c diff --git a/hw/darwin/quartz/xpr/appledri.h b/hw/xquartz/xpr/appledri.h similarity index 100% rename from hw/darwin/quartz/xpr/appledri.h rename to hw/xquartz/xpr/appledri.h diff --git a/hw/darwin/quartz/xpr/appledristr.h b/hw/xquartz/xpr/appledristr.h similarity index 100% rename from hw/darwin/quartz/xpr/appledristr.h rename to hw/xquartz/xpr/appledristr.h diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/xquartz/xpr/dri.c similarity index 100% rename from hw/darwin/quartz/xpr/dri.c rename to hw/xquartz/xpr/dri.c diff --git a/hw/darwin/quartz/xpr/dri.h b/hw/xquartz/xpr/dri.h similarity index 100% rename from hw/darwin/quartz/xpr/dri.h rename to hw/xquartz/xpr/dri.h diff --git a/hw/darwin/quartz/xpr/dristruct.h b/hw/xquartz/xpr/dristruct.h similarity index 100% rename from hw/darwin/quartz/xpr/dristruct.h rename to hw/xquartz/xpr/dristruct.h diff --git a/hw/darwin/quartz/xpr/x-hash.c b/hw/xquartz/xpr/x-hash.c similarity index 100% rename from hw/darwin/quartz/xpr/x-hash.c rename to hw/xquartz/xpr/x-hash.c diff --git a/hw/darwin/quartz/xpr/x-hash.h b/hw/xquartz/xpr/x-hash.h similarity index 100% rename from hw/darwin/quartz/xpr/x-hash.h rename to hw/xquartz/xpr/x-hash.h diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/xquartz/xpr/x-hook.c similarity index 100% rename from hw/darwin/quartz/xpr/x-hook.c rename to hw/xquartz/xpr/x-hook.c diff --git a/hw/darwin/quartz/xpr/x-hook.h b/hw/xquartz/xpr/x-hook.h similarity index 100% rename from hw/darwin/quartz/xpr/x-hook.h rename to hw/xquartz/xpr/x-hook.h diff --git a/hw/darwin/quartz/xpr/x-list.c b/hw/xquartz/xpr/x-list.c similarity index 100% rename from hw/darwin/quartz/xpr/x-list.c rename to hw/xquartz/xpr/x-list.c diff --git a/hw/darwin/quartz/xpr/x-list.h b/hw/xquartz/xpr/x-list.h similarity index 100% rename from hw/darwin/quartz/xpr/x-list.h rename to hw/xquartz/xpr/x-list.h diff --git a/hw/darwin/quartz/xpr/xpr.h b/hw/xquartz/xpr/xpr.h similarity index 100% rename from hw/darwin/quartz/xpr/xpr.h rename to hw/xquartz/xpr/xpr.h diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/xquartz/xpr/xprAppleWM.c similarity index 98% rename from hw/darwin/quartz/xpr/xprAppleWM.c rename to hw/xquartz/xpr/xprAppleWM.c index 5539c51cc..bd82df03c 100644 --- a/hw/darwin/quartz/xpr/xprAppleWM.c +++ b/hw/xquartz/xpr/xprAppleWM.c @@ -32,7 +32,7 @@ #endif #include "xpr.h" -#include "quartz/applewmExt.h" +#include "applewmExt.h" #include "rootless.h" #include "Xplugin.h" #include diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c similarity index 99% rename from hw/darwin/quartz/xpr/xprCursor.c rename to hw/xquartz/xpr/xprCursor.c index 160b5d908..db195a8ec 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/xquartz/xpr/xprCursor.c @@ -33,7 +33,7 @@ #include #endif -#include "quartz/quartzCommon.h" +#include "quartzCommon.h" #include "xpr.h" #include "darwin.h" #include "Xplugin.h" diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c similarity index 99% rename from hw/darwin/quartz/xpr/xprFrame.c rename to hw/xquartz/xpr/xprFrame.c index 1b0ba9102..2d97f2754 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/xquartz/xpr/xprFrame.c @@ -36,7 +36,7 @@ #include "Xplugin.h" #include "x-hash.h" #include "x-list.h" -#include "quartz/applewmExt.h" +#include "applewmExt.h" #include "propertyst.h" #include "dix.h" diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c similarity index 98% rename from hw/darwin/quartz/xpr/xprScreen.c rename to hw/xquartz/xpr/xprScreen.c index 28ed159fe..068b7b177 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -31,17 +31,17 @@ #include #endif -#include "quartz/quartzCommon.h" -#include "quartz/quartz.h" +#include "quartzCommon.h" +#include "quartz.h" #include "xpr.h" -#include "quartz/pseudoramiX.h" +#include "pseudoramiX.h" #include "darwin.h" #include "rootless.h" #include "safeAlpha/safeAlpha.h" #include "dri.h" #include "globals.h" #include "Xplugin.h" -#include "quartz/applewmExt.h" +#include "applewmExt.h" // From xprFrame.c WindowPtr xprGetXWindow(xp_window_id wid); From 540439a966cce3fc68a7e4bffdb5bcab1b20725f Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 5 Dec 2007 20:55:06 -0800 Subject: [PATCH 276/552] .gitignore: Added Xcode user files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6abca3b1a..2e60d58b1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ Makefile.in *.o *~ .*.swp +*.pbxuser +*.mode1v3 obj* build* aclocal.m4 From 8a8239f2e21795602fcff5281833b350e6b2a286 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 5 Dec 2007 21:23:36 -0800 Subject: [PATCH 277/552] Darwin: Renamed DarwinModeBlah to QuartzBlah (cherry picked from commit 08ebf86d379b1ddfb08df65d29aea5df66de4327) --- hw/xquartz/X11Application.m | 1 + hw/xquartz/darwin.c | 13 ++++++++----- hw/xquartz/darwin.h | 24 ----------------------- hw/xquartz/darwinEvents.c | 3 ++- hw/xquartz/darwinEvents.h | 39 +++++++++++++++++++++++++++++++++++++ hw/xquartz/darwinKeyboard.c | 4 +++- hw/xquartz/quartz.c | 37 ++++++++++++++++++----------------- hw/xquartz/quartz.h | 7 +++++++ hw/xquartz/quartzAudio.c | 4 ++-- hw/xquartz/quartzKeyboard.h | 1 + hw/xquartz/xpr/xprCursor.c | 1 + 11 files changed, 83 insertions(+), 51 deletions(-) create mode 100644 hw/xquartz/darwinEvents.h diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 3e37dd436..8d4076a0a 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -39,6 +39,7 @@ /* ouch! */ #define BOOL X_BOOL # include "darwin.h" +# include "darwinEvents.h" # include "quartz.h" # define _APPLEWM_SERVER_ # include "X11/extensions/applewm.h" diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index b46b7687e..e091f25ba 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -75,6 +75,9 @@ #endif #include "darwin.h" +#include "darwinEvents.h" +#include "darwinKeyboard.h" +#include "quartz.h" #include "darwinClut8.h" #ifdef ENABLE_DEBUG_LOG @@ -195,7 +198,7 @@ static Bool DarwinAddScreen( pScreen->devPrivates[darwinScreenIndex].ptr = dfb; // setup hardware/mode specific details - ret = DarwinModeAddScreen(foundIndex, pScreen); + ret = QuartzAddScreen(foundIndex, pScreen); foundIndex++; if (! ret) return FALSE; @@ -274,7 +277,7 @@ static Bool DarwinAddScreen( pScreen->SaveScreen = DarwinSaveScreen; // finish mode dependent screen setup including cursor support - if (!DarwinModeSetupScreen(index, pScreen)) { + if (!QuartzSetupScreen(index, pScreen)) { return FALSE; } @@ -539,7 +542,7 @@ void InitInput( int argc, char **argv ) DarwinEQInit( (DevicePtr)darwinKeyboard, (DevicePtr)darwinPointer ); - DarwinModeInitInput(argc, argv); + QuartzInitInput(argc, argv); } @@ -629,7 +632,7 @@ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv ) } // Discover screens and do mode specific initialization - DarwinModeInitOutput(argc, argv); + QuartzInitOutput(argc, argv); // Add screens for (i = 0; i < darwinScreensFound; i++) { @@ -895,7 +898,7 @@ void ddxGiveUp( void ) { ErrorF( "Quitting XQuartz...\n" ); - DarwinModeGiveUp(); + QuartzGiveUp(); } diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index 0f5f492b6..a332229be 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -52,26 +52,6 @@ int DarwinParseModifierList(const char *constmodifiers); void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo); void xf86SetRootClip (ScreenPtr pScreen, BOOL enable); -// From darwinEvents.c -Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr); -void DarwinEQEnqueue(const xEvent *e); -void DarwinEQPointerPost(xEvent *e); -void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX); -void DarwinPokeEQ(void); -void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y); -void DarwinSendKeyboardEvents(int ev_type, int keycode); -void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y); - -// Mode specific functions -Bool DarwinModeAddScreen(int index, ScreenPtr pScreen); -Bool DarwinModeSetupScreen(int index, ScreenPtr pScreen); -void DarwinModeInitOutput(int argc,char **argv); -void DarwinModeInitInput(int argc, char **argv); -void DarwinModeProcessEvent(xEvent *xe); -void DarwinModeGiveUp(void); -void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); - - #undef assert #define assert(x) { if ((x) == 0) \ FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); } @@ -81,10 +61,6 @@ void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); #define SCREEN_PRIV(pScreen) \ ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr) - -#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... - - /* * Global variables from darwin.c */ diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 629fb2c9d..ae82f5b14 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -43,6 +43,7 @@ in this Software without prior written authorization from The Open Group. #include "mipointer.h" #include "darwin.h" +#include "quartz.h" #include "darwinKeyboard.h" #include @@ -361,7 +362,7 @@ void ProcessInputEvents(void) { // fall through default: // Check for mode specific event - DarwinModeProcessEvent(&xe); + QuartzProcessEvent(&xe); } } } diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h new file mode 100644 index 000000000..d6cab2e6c --- /dev/null +++ b/hw/xquartz/darwinEvents.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2001-2004 Torrey T. Lyons. 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, sublicense, + * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ + +#ifndef _DARWIN_EVENTS_H +#define _DARWIN_EVENTS_H + +Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr); +void DarwinEQEnqueue(const xEvent *e); +void DarwinEQPointerPost(xEvent *e); +void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX); +void DarwinPokeEQ(void); +void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y); +void DarwinSendKeyboardEvents(int ev_type, int keycode); +void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y); + +#endif /* _DARWIN_EVENTS_H */ diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c index 1c83cbce4..f6dcfb34a 100644 --- a/hw/xquartz/darwinKeyboard.c +++ b/hw/xquartz/darwinKeyboard.c @@ -73,6 +73,8 @@ #include // For the NXSwap* #include "darwin.h" #include "darwinKeyboard.h" +#include "quartzKeyboard.h" +#include "quartzAudio.h" #ifdef NDEBUG #undef NDEBUG @@ -791,7 +793,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) { DarwinModeSystemKeymapSeed(); assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms, - keyInfo.modMap, DarwinModeBell, + keyInfo.modMap, QuartzBell, DarwinChangeKeyboardControl )); } diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index 2483d12d7..7be91ec6d 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -35,6 +35,7 @@ #include "quartzCommon.h" #include "quartz.h" #include "darwin.h" +#include "darwinEvents.h" #include "quartzAudio.h" #include "pseudoramiX.h" #define _APPLEWM_SERVER_ @@ -74,25 +75,25 @@ QuartzModeProcsPtr quartzProcs = NULL; const char *quartzOpenGLBundle = NULL; #if defined(RANDR) && !defined(FAKE_RANDR) -Bool DarwinModeRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) { +Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) { return FALSE; } -Bool DarwinModeRandRSetConfig (ScreenPtr pScreen, +Bool QuartzRandRSetConfig (ScreenPtr pScreen, Rotation randr, int rate, RRScreenSizePtr pSize) { return FALSE; } -Bool DarwinModeRandRInit (ScreenPtr pScreen) { +Bool QuartzRandRInit (ScreenPtr pScreen) { rrScrPrivPtr pScrPriv; if (!RRScreenInit (pScreen)) return FALSE; pScrPriv = rrGetScrPriv(pScreen); - pScrPriv->rrGetInfo = DarwinModeRandRGetInfo; - pScrPriv->rrSetConfig = DarwinModeRandRSetConfig; + pScrPriv->rrGetInfo = QuartzRandRGetInfo; + pScrPriv->rrSetConfig = QuartzRandRSetConfig; return TRUE; } #endif @@ -106,10 +107,10 @@ Bool DarwinModeRandRInit (ScreenPtr pScreen) { */ /* - * DarwinModeAddScreen + * QuartzAddScreen * Do mode dependent initialization of each screen for Quartz. */ -Bool DarwinModeAddScreen( +Bool QuartzAddScreen( int index, ScreenPtr pScreen) { @@ -125,10 +126,10 @@ Bool DarwinModeAddScreen( /* - * DarwinModeSetupScreen + * QuartzSetupScreen * Finalize mode specific setup of each screen. */ -Bool DarwinModeSetupScreen( +Bool QuartzSetupScreen( int index, ScreenPtr pScreen) { @@ -145,10 +146,10 @@ Bool DarwinModeSetupScreen( /* - * DarwinModeInitOutput + * QuartzInitOutput * Quartz display initialization. */ -void DarwinModeInitOutput( +void QuartzInitOutput( int argc, char **argv ) { @@ -184,10 +185,10 @@ void DarwinModeInitOutput( /* - * DarwinModeInitInput + * QuartzInitInput * Inform the main thread the X server is ready to handle events. */ -void DarwinModeInitInput( +void QuartzInitInput( int argc, char **argv ) { @@ -279,7 +280,7 @@ static void QuartzUpdateScreens(void) pScreen->height = height; #ifndef FAKE_RANDR - if(!DarwinModeRandRInit(pScreen)) + if(!QuartzRandRInit(pScreen)) FatalError("Failed to init RandR extension.\n"); #endif @@ -412,10 +413,10 @@ QuartzMessageServerThread( /* - * DarwinModeProcessEvent + * QuartzProcessEvent * Process Quartz specific events. */ -void DarwinModeProcessEvent( +void QuartzProcessEvent( xEvent *xe) { switch (xe->u.u.type) { @@ -516,11 +517,11 @@ void DarwinModeProcessEvent( /* - * DarwinModeGiveUp + * QuartzGiveUp * Cleanup before X server shutdown * Release the screen and restore the Aqua cursor. */ -void DarwinModeGiveUp(void) +void QuartzGiveUp(void) { #if 0 // Trying to switch cursors when quitting causes deadlock diff --git a/hw/xquartz/quartz.h b/hw/xquartz/quartz.h index e74a1082b..fbe308a92 100644 --- a/hw/xquartz/quartz.h +++ b/hw/xquartz/quartz.h @@ -124,4 +124,11 @@ typedef struct _QuartzModeProcs { extern QuartzModeProcsPtr quartzProcs; extern int quartzHasRoot, quartzEnableRootless; +Bool QuartzAddScreen(int index, ScreenPtr pScreen); +Bool QuartzSetupScreen(int index, ScreenPtr pScreen); +void QuartzInitOutput(int argc,char **argv); +void QuartzInitInput(int argc, char **argv); +void QuartzGiveUp(void); +void QuartzProcessEvent(xEvent *xe); + #endif diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c index 1eb099ba6..86bb20015 100644 --- a/hw/xquartz/quartzAudio.c +++ b/hw/xquartz/quartzAudio.c @@ -246,10 +246,10 @@ static void QuartzCoreAudioBell( /* - * DarwinModeBell + * QuartzBell * Ring the bell */ -void DarwinModeBell( +void QuartzBell( int volume, // volume in percent of max DeviceIntPtr pDevice, pointer ctrl, diff --git a/hw/xquartz/quartzKeyboard.h b/hw/xquartz/quartzKeyboard.h index f27fcdeac..c5f22bf14 100644 --- a/hw/xquartz/quartzKeyboard.h +++ b/hw/xquartz/quartzKeyboard.h @@ -36,6 +36,7 @@ // unshifted, shifted, modeswitch unshifted, modeswitch shifted #define GLYPHS_PER_KEY 4 #define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better +#define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... #define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1 typedef struct darwinKeyboardInfo_struct { diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c index db195a8ec..dc7a73eab 100644 --- a/hw/xquartz/xpr/xprCursor.c +++ b/hw/xquartz/xpr/xprCursor.c @@ -36,6 +36,7 @@ #include "quartzCommon.h" #include "xpr.h" #include "darwin.h" +#include "darwinEvents.h" #include "Xplugin.h" #include "mi.h" From c238ef06a270c0c1d48cdb9175b6d5815c7c2a49 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 5 Dec 2007 21:36:34 -0800 Subject: [PATCH 278/552] Darwin: Dead coded removal Kill off assert macro (cherry picked from commit d6493abedb2caf03b2bc3a6440b637df67eff081) --- hw/xquartz/darwin.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index a332229be..f835ae01e 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -52,12 +52,6 @@ int DarwinParseModifierList(const char *constmodifiers); void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo); void xf86SetRootClip (ScreenPtr pScreen, BOOL enable); -#undef assert -#define assert(x) { if ((x) == 0) \ - FatalError("assert failed on line %d of %s!\n", __LINE__, __FILE__); } -#define kern_assert(x) { if ((x) != KERN_SUCCESS) \ - FatalError("assert failed on line %d of %s with kernel return 0x%x!\n", \ - __LINE__, __FILE__, x); } #define SCREEN_PRIV(pScreen) \ ((DarwinFramebufferPtr)pScreen->devPrivates[darwinScreenIndex].ptr) From 56f5066d477836a975122f4e5748c0f4fb790175 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 6 Dec 2007 20:51:32 -0800 Subject: [PATCH 279/552] ALLOCATE_LOCAL is dangerous on Darwin due to memory layout differences from Linux, so let's define NO_ALLOCA. (cherry picked from commit 7caf51d1a5a86ae884e0087795636222c082962c) --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5bc3d8032..13fe51a52 100644 --- a/configure.ac +++ b/configure.ac @@ -1705,7 +1705,7 @@ if test "x$XQUARTZ" = xyes; then AC_SUBST([DARWIN_LIBS]) AC_CHECK_LIB([Xplugin],[xp_init],[:]) AC_SUBST([APPLE_APPLICATIONS_DIR]) - CFLAGS="${CFLAGS} -D__DARWIN__ -DROOTLESS_WORKAROUND" + CFLAGS="${CFLAGS} -D__DARWIN__ -DROOTLESS_WORKAROUND -DNO_ALLOCA" PLIST_VERSION_STRING=$PACKAGE_VERSION AC_SUBST([PLIST_VERSION_STRING]) PLIST_VENDOR_WEB=$VENDOR_WEB From 67907904f094c803d5faf6fa2ce23c01f9a5a521 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Fri, 7 Dec 2007 01:51:53 -0800 Subject: [PATCH 280/552] fixed pathname in GL/apple/Makefile.am (cherry picked from commit b6357cec6d837226009c0d2b69026027da36656e) --- GL/apple/Makefile.am | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/GL/apple/Makefile.am b/GL/apple/Makefile.am index d3c05ccc7..33ad15714 100644 --- a/GL/apple/Makefile.am +++ b/GL/apple/Makefile.am @@ -4,8 +4,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/GL/glx \ -I$(top_srcdir)/GL/include \ -I$(top_srcdir)/GL/mesa/glapi \ - -I$(top_srcdir)/hw/darwin/quartz \ - -I$(top_srcdir)/hw/darwin/quartz/cr \ + -I$(top_srcdir)/hw/xquartz \ + -I$(top_srcdir)/hw/xquartz/xpr \ -I$(top_srcdir)/miext/damage if HAVE_AGL_FRAMEWORK @@ -17,3 +17,8 @@ libAGLcore_a_SOURCES = aglGlx.c \ $(top_srcdir)/hw/darwin/quartz/xpr/x-hash.h \ $(top_srcdir)/hw/dmx/glxProxy/compsize.c endif + +#noinst_LIBRARIES = libCGLcore.a +#libCGLcore_a_SOURCES = \ +# indirect.c \ +# $(top_srcdir)/hw/dmx/glxProxy/compsize.c From 4fc288a13f825db942c9dcd64f4abd0265652faf Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 7 Dec 2007 17:28:37 -0800 Subject: [PATCH 281/552] Check for as well when determining to enable dtrace probes Avoids auto-detecting dtrace is present on systems with the ISDN trace tool named dtrace installed, but not the dynamic tracing facility named dtrace --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 13fe51a52..d30d3c402 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,8 @@ AC_SYS_LARGEFILE XORG_PROG_RAWCPP dnl Check for dtrace program (needed to build Xserver dtrace probes) +dnl Also checks for , since some Linux distros have an +dnl ISDN trace program named dtrace AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH], [Enable dtrace probes (default: enabled if dtrace found)]), [WDTRACE=$withval], [WDTRACE=auto]) @@ -82,6 +84,11 @@ if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then AC_MSG_FAILURE([dtrace requested but not found]) fi WDTRACE="no" + else + AC_CHECK_HEADER(sys/sdt.h, [HAS_SDT_H="yes"], [HAS_SDT_H="no"]) + if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then + WDTRACE="no" + fi fi fi if test "x$WDTRACE" != "xno" ; then From 85ed0bb44011312dfaa9f2dc31642a0f89ec0bd3 Mon Sep 17 00:00:00 2001 From: Brice Goglin Date: Sat, 8 Dec 2007 02:53:27 +0100 Subject: [PATCH 282/552] Add a missing linebreak after LoadModule: "foo" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=454742 --- hw/xfree86/loader/loadmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 1b5c717fd..584cabfd1 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -859,7 +859,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, char *m = NULL; const char **cim; - xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"", module); + xf86MsgVerb(X_INFO, 3, "LoadModule: \"%s\"\n", module); for (cim = compiled_in_modules; *cim; cim++) if (!strcmp (module, *cim)) From 0ad1c359c5b0be63748f5c630c97be88a8cc92ce Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 7 Dec 2007 18:54:58 -0800 Subject: [PATCH 283/552] Darwin: Use __APPLE__ instead of __DARWIN__ (cherry picked from commit 54654815fa5e59b25cfd1fa72610120b72c10175) --- GL/glx/glxscreens.c | 2 +- configure.ac | 2 +- hw/Makefile.am | 4 ++-- hw/vfb/InitOutput.c | 2 +- hw/xnest/Init.c | 2 +- hw/xprint/attributes.c | 2 +- hw/xprint/ddxInit.c | 2 +- include/cursor.h | 2 +- include/dixfont.h | 2 +- include/resource.h | 2 +- include/window.h | 4 ++-- miext/rootless/rootlessConfig.h | 4 ++-- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c index d6002532d..d57b3a912 100644 --- a/GL/glx/glxscreens.c +++ b/GL/glx/glxscreens.c @@ -174,7 +174,7 @@ static char GLXServerExtensions[] = "GLX_EXT_texture_from_pixmap " "GLX_OML_swap_method " "GLX_SGI_make_current_read " -#ifndef __DARWIN__ +#ifndef __APPLE__ "GLX_SGIS_multisample " "GLX_SGIX_hyperpipe " "GLX_SGIX_swap_barrier " diff --git a/configure.ac b/configure.ac index d30d3c402..5a507afbe 100644 --- a/configure.ac +++ b/configure.ac @@ -1712,7 +1712,7 @@ if test "x$XQUARTZ" = xyes; then AC_SUBST([DARWIN_LIBS]) AC_CHECK_LIB([Xplugin],[xp_init],[:]) AC_SUBST([APPLE_APPLICATIONS_DIR]) - CFLAGS="${CFLAGS} -D__DARWIN__ -DROOTLESS_WORKAROUND -DNO_ALLOCA" + CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA" PLIST_VERSION_STRING=$PACKAGE_VERSION AC_SUBST([PLIST_VERSION_STRING]) PLIST_VENDOR_WEB=$VENDOR_WEB diff --git a/hw/Makefile.am b/hw/Makefile.am index abdeabb01..c2b9571b9 100644 --- a/hw/Makefile.am +++ b/hw/Makefile.am @@ -38,11 +38,11 @@ SUBDIRS = \ $(XORG_SUBDIRS) \ $(XGL_SUBDIRS) \ $(XWIN_SUBDIRS) \ - $(XQUARTZ_SUBDIRS) \ $(XVFB_SUBDIRS) \ $(XNEST_SUBDIRS) \ - $(DMX_SUBDIRS) \ + $(DMX_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ + $(XQUARTZ_SUBDIRS) \ $(XPRINT_SUBDIRS) DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xgl xprint diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 0d4ca57fe..a00f7a5bb 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -220,7 +220,7 @@ AbortDDX() ddxGiveUp(); } -#ifdef __DARWIN__ +#ifdef __APPLE__ void DarwinHandleGUI(int argc, char *argv[]) { diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 4699111b9..d1fd75732 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -124,7 +124,7 @@ void ddxGiveUp() AbortDDX(); } -#ifdef __DARWIN__ +#ifdef __APPLE__ void DarwinHandleGUI(int argc, char *argv[]) { diff --git a/hw/xprint/attributes.c b/hw/xprint/attributes.c index d8ee5adf8..4c6ad46a9 100644 --- a/hw/xprint/attributes.c +++ b/hw/xprint/attributes.c @@ -1378,7 +1378,7 @@ ReplaceAllKeywords( defined(ISC) || \ defined(Lynx) || \ defined(__QNX__) || \ - defined(__DARWIN__) + defined(__APPLE__) #define iswspace(c) (isascii(c) && isspace(toascii(c))) #endif diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c index 1e7652e60..d744121aa 100644 --- a/hw/xprint/ddxInit.c +++ b/hw/xprint/ddxInit.c @@ -205,7 +205,7 @@ ProcessInputEvents(void) { } -#ifdef __DARWIN__ +#ifdef __APPLE__ #include "micmap.h" void GlxExtensionInit(void); diff --git a/include/cursor.h b/include/cursor.h index bdf4fd301..dc0810cd1 100644 --- a/include/cursor.h +++ b/include/cursor.h @@ -70,7 +70,7 @@ extern int FreeCursor( /* Quartz support on Mac OS X pulls in the QuickDraw framework whose AllocCursor function conflicts here. */ -#ifdef __DARWIN__ +#ifdef __APPLE__ #define AllocCursor Darwin_X_AllocCursor #endif extern CursorPtr AllocCursor( diff --git a/include/dixfont.h b/include/dixfont.h index 709da6272..d6d13b40a 100644 --- a/include/dixfont.h +++ b/include/dixfont.h @@ -118,7 +118,7 @@ extern void DeleteClientFontStuff(ClientPtr /*client*/); /* Quartz support on Mac OS X pulls in the QuickDraw framework whose InitFonts function conflicts here. */ -#ifdef __DARWIN__ +#ifdef __APPLE__ #define InitFonts Darwin_X_InitFonts #endif extern void InitFonts(void); diff --git a/include/resource.h b/include/resource.h index 3231e8cd9..6c0d5dc7f 100644 --- a/include/resource.h +++ b/include/resource.h @@ -153,7 +153,7 @@ extern XID FakeClientID( /* Quartz support on Mac OS X uses the CarbonCore framework whose AddResource function conflicts here. */ -#ifdef __DARWIN__ +#ifdef __APPLE__ #define AddResource Darwin_X_AddResource #endif extern Bool AddResource( diff --git a/include/window.h b/include/window.h index 312b75e88..58e2c49b5 100644 --- a/include/window.h +++ b/include/window.h @@ -125,7 +125,7 @@ extern void DestroySubwindows( /* Quartz support on Mac OS X uses the HIToolbox framework whose ChangeWindowAttributes function conflicts here. */ -#ifdef __DARWIN__ +#ifdef __APPLE__ #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes #endif extern int ChangeWindowAttributes( @@ -136,7 +136,7 @@ extern int ChangeWindowAttributes( /* Quartz support on Mac OS X uses the HIToolbox framework whose GetWindowAttributes function conflicts here. */ -#ifdef __DARWIN__ +#ifdef __APPLE__ #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x) extern void Darwin_X_GetWindowAttributes( #else diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h index 3e326bf06..ab0187e83 100644 --- a/miext/rootless/rootlessConfig.h +++ b/miext/rootless/rootlessConfig.h @@ -34,7 +34,7 @@ #ifndef _ROOTLESSCONFIG_H #define _ROOTLESSCONFIG_H -#ifdef __DARWIN__ +#ifdef __APPLE__ # define ROOTLESS_ACCEL TRUE # define ROOTLESS_GLOBAL_COORDS TRUE @@ -48,7 +48,7 @@ alpha for 16bpp. */ # define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0) -#endif /* __DARWIN__ */ +#endif /* __APPLE__ */ #if defined(__CYGWIN__) || defined(WIN32) From 1157cfcc5a4e2a7299a4c48df04a1cc8d5093906 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Fri, 7 Dec 2007 21:55:42 -0800 Subject: [PATCH 284/552] Just a couple of small uninitialized pointer fixes (cherry picked from commit d12b650362da100ceaecb7e859cd4ef1908d4407) --- miext/rootless/rootlessScreen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index 538b698c8..19dba6e5e 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -722,6 +722,8 @@ Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs) pScreen->devPrivates[rootlessScreenPrivateIndex].ptr; s->imp = procs; + s->colormap = NULL; + s->redisplay_expired = FALSE; RootlessWrap(pScreen); From a1b0346853720e98963910b82603c5cda72bb7f9 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 7 Dec 2007 23:26:11 -0800 Subject: [PATCH 285/552] XQuartz: Cleaned up configure, X11.app path in launchd script Don't hardcode X11.app's path in the launchd plist. Only install the launchd plist if we --enable-launchd. (cherry picked from commit 6b74c535dc331d1d621b2541492a3336f69d70a2) --- configure.ac | 130 +++++++++--------- hw/xquartz/bundle/Makefile.am | 2 + hw/xquartz/bundle/bundle-main.c | 2 +- .../{org.x.X11.plist => org.x.X11.plist.in} | 6 +- 4 files changed, 69 insertions(+), 71 deletions(-) rename hw/xquartz/bundle/{org.x.X11.plist => org.x.X11.plist.in} (74%) diff --git a/configure.ac b/configure.ac index 5a507afbe..b56c11583 100644 --- a/configure.ac +++ b/configure.ac @@ -1694,75 +1694,43 @@ fi if test "x$XQUARTZ" = xyes; then AC_DEFINE([XQUARTZ],[1],[Have Quartz]) -# glxAGL / glxCGL don't work yet -# AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[ -# save_LDFLAGS=$LDFLAGS -# LDFLAGS="$LDFLAGS -framework AGL" -# AC_LINK_IFELSE([char aglEnable(); -#int main() { -#aglEnable(); -#return 0;} -# ],[xorg_cv_AGL_framework=yes], -# [xorg_cv_AGL_framework=no]) -# LDFLAGS=$save_LDFLAGS -# ]) - xorg_cv_AGL_framework=no - DARWIN_GLX_LIBS='$(top_builddir)/GL/apple/indirect.o $(top_builddir)/GL/glx/libglx.la' - DARWIN_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB" - AC_SUBST([DARWIN_LIBS]) - AC_CHECK_LIB([Xplugin],[xp_init],[:]) - AC_SUBST([APPLE_APPLICATIONS_DIR]) - CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA" - PLIST_VERSION_STRING=$PACKAGE_VERSION - AC_SUBST([PLIST_VERSION_STRING]) - PLIST_VENDOR_WEB=$VENDOR_WEB - AC_SUBST([PLIST_VENDOR_WEB]) - if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then - AC_MSG_NOTICE([Disabling XF86Misc extension]) - XF86MISC=no - fi - if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then - AC_MSG_NOTICE([Disabling XF86VidMode extension]) - XF86VIDMODE=no - fi - if test "x$XF86BIGFONT" = xyes || test "x$XF86BIGFONT" = xauto; then - AC_MSG_NOTICE([Disabling XF86BigFont extension]) - XF86BIGFONT=no - fi - if test "x$DGA" = xyes || test "x$DGA" = xauto; then - AC_MSG_NOTICE([Disabling DGA extension]) - DGA=no - fi - if test "x$DMX" = xyes || test "x$DMX" = xauto; then - AC_MSG_NOTICE([Disabling DMX DDX]) - DMX=no - fi -fi - -if test "x$X11APP" = xauto; then - AC_MSG_CHECKING([whether to build X11.app]) - if test "x$XQUARTZ" = xyes ; then - X11APP=yes - else - X11APP=no +#glxAGL / glxCGL don't work yet +# AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[ +# save_LDFLAGS=$LDFLAGS +# LDFLAGS="$LDFLAGS -framework AGL" +# AC_LINK_IFELSE( +# [char aglEnable(); int main() { aglEnable(); return 0;}], +# [xorg_cv_AGL_framework=yes], +# [xorg_cv_AGL_framework=no]) +# LDFLAGS=$save_LDFLAGS +# ]) + xorg_cv_AGL_framework=no + DARWIN_GLX_LIBS='$(top_builddir)/GL/apple/indirect.o $(top_builddir)/GL/glx/libglx.la' + DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB" + AC_SUBST([DARWIN_LIBS]) + AC_CHECK_LIB([Xplugin],[xp_init],[:]) + AC_SUBST([APPLE_APPLICATIONS_DIR]) + CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA" + if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then + AC_MSG_NOTICE([Disabling XF86Misc extension]) + XF86MISC=no fi - AC_MSG_RESULT([$X11APP]) -fi - -if test "x$LAUNCHD" = xauto; then - # Do we want to have this default to on for Xquartz builds only or any time we have launchd (like Xnest or Xvfb on OS-X) - #AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) - AC_MSG_CHECKING([whether to support launchd]) - if test "x$XQUARTZ" = xyes ; then - LAUNCHD=yes - else - LAUNCHD=no + if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then + AC_MSG_NOTICE([Disabling XF86VidMode extension]) + XF86VIDMODE=no + fi + if test "x$XF86BIGFONT" = xyes || test "x$XF86BIGFONT" = xauto; then + AC_MSG_NOTICE([Disabling XF86BigFont extension]) + XF86BIGFONT=no + fi + if test "x$DGA" = xyes || test "x$DGA" = xauto; then + AC_MSG_NOTICE([Disabling DGA extension]) + DGA=no + fi + if test "x$DMX" = xyes || test "x$DMX" = xauto; then + AC_MSG_NOTICE([Disabling DMX DDX]) + DMX=no fi - AC_MSG_RESULT([$LAUNCHD]) -fi - -if test "x$LAUNCHD" = xyes ; then - AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) fi # Support for objc in autotools is minimal and not documented. @@ -1779,8 +1747,31 @@ _AM_DEPENDENCIES([OBJC]) AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes]) AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes]) AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes]) + +if test "x$X11APP" = xauto; then + AC_MSG_CHECKING([whether to build X11.app]) + if test "x$XQUARTZ" = xyes ; then + X11APP=yes + else + X11APP=no + fi + AC_MSG_RESULT([$X11APP]) +fi AM_CONDITIONAL(X11APP,[test "X$X11APP" = Xyes]) +if test "x$LAUNCHD" = xauto; then + # Do we want to have this default to on for Xquartz builds only or any time we have launchd (like Xnest or Xvfb on OS-X) + #AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) + AC_MSG_CHECKING([whether to support launchd]) + if test "x$XQUARTZ" = xyes ; then + LAUNCHD=yes + else + LAUNCHD=no + fi + AC_MSG_RESULT([$LAUNCHD]) +fi +AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = xyes]) + dnl DMX DDX AC_MSG_CHECKING([whether to build Xdmx DDX]) @@ -1831,6 +1822,10 @@ dnl Linux sources in DMX require fi AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes]) AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes]) +if test "x$LAUNCHD" = xyes ; then + AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) +fi +AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = xyes]) dnl kdrive DDX @@ -2179,6 +2174,7 @@ hw/xnest/Makefile hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/bundle/Makefile +hw/xquartz/bundle/org.x.X11.plist hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index a6e2dfbf9..e8d5167b7 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -7,8 +7,10 @@ x11app: install-data-hook: xcodebuild install DSTROOT="/$(DESTDIR)" INSTALL_PATH="$(APPLE_APPLICATIONS_DIR)" DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" +if LAUNCHD $(MKDIR_P) "$(DESTDIR)/System/Library/LaunchAgents/" $(INSTALL) org.x.X11.plist "$(DESTDIR)/System/Library/LaunchAgents/" +endif clean-local: rm -rf build diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index c436d51bb..6f9744c2e 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -46,7 +46,7 @@ int main(int argc, char **argv) { } /* First check if launchd started us */ - if(argc == 2 && !strncmp(argv[1], "--launchd", 9)) { + if(argc == 2 && !strncmp(argv[1], "-launchd", 8)) { argc--; argv[1] = argv[0]; argv++; diff --git a/hw/xquartz/bundle/org.x.X11.plist b/hw/xquartz/bundle/org.x.X11.plist.in similarity index 74% rename from hw/xquartz/bundle/org.x.X11.plist rename to hw/xquartz/bundle/org.x.X11.plist.in index 6c6be91ab..36849cf60 100644 --- a/hw/xquartz/bundle/org.x.X11.plist +++ b/hw/xquartz/bundle/org.x.X11.plist.in @@ -5,11 +5,11 @@ Label org.x.X11 Program - /Applications/Utilities/X11.app/Contents/MacOS/X11 + @APPLE_APPLICATIONS_DIR@/X11.app/Contents/MacOS/X11 ProgramArguments - /Applications/Utilities/X11.app/Contents/MacOS/X11 - --launchd + @APPLE_APPLICATIONS_DIR@/X11.app/Contents/MacOS/X11 + -launchd Sockets From 41a0aeaae9b7b2f8cc2468fd1f3ee11287d34828 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 8 Dec 2007 00:13:47 -0800 Subject: [PATCH 286/552] XQuartz: Fixed "Multiple Dock Icons" BAM! (cherry picked from commit d0dca8a88506f50b51f41f99a2f1feb6954c8a31) (cherry picked from commit 0502955a2af487b51bf22916ac02e497c2d96aba) --- hw/xquartz/Makefile.am | 2 ++ hw/xquartz/bundle/Info.plist | 34 ++++++++++++++++++--------------- hw/xquartz/bundle/bundle-main.c | 34 ++++++++++++--------------------- hw/xquartz/darwin.c | 5 +++++ hw/xquartz/quartzStartup.c | 3 +++ 5 files changed, 41 insertions(+), 37 deletions(-) diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 725d20f6c..5814eb79f 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -29,6 +29,7 @@ libXquartz_la_SOURCES = \ quartz.c \ quartzAudio.c \ quartzCocoa.m \ + quartzForeground.c \ quartzKeyboard.c \ quartzPasteboard.c \ quartzStartup.c @@ -46,5 +47,6 @@ EXTRA_DIST = \ quartzCommon.h \ quartzCursor.c \ quartzCursor.h \ + quartzForeground.h \ quartz.h \ quartzPasteboard.h diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist index 66f1f6be1..fce8c964d 100644 --- a/hw/xquartz/bundle/Info.plist +++ b/hw/xquartz/bundle/Info.plist @@ -3,33 +3,37 @@ CFBundleDevelopmentRegion - English + English CFBundleExecutable - X11 + X11 CFBundleGetInfoString - X11 + X11 CFBundleIconFile - X11.icns + X11.icns CFBundleIdentifier - org.x.X11 + org.x.X11 CFBundleInfoDictionaryVersion - 6.0 + 6.0 CFBundleName - X11 + X11 CFBundlePackageType - APPL + APPL CFBundleShortVersionString - 2.0 + 2.2.0 CFBundleSignature - x11a + x11a CSResourcesFileMapped - + NSHumanReadableCopyright - Copyright © 2003-2007, Apple Inc. -Copyright © 2003, XFree86 Project, Inc. + Copyright © 2003-2007, Apple Inc. +Copyright © 2003, XFree86 Project, Inc. +Copyright © 2003-2007, X.org Project, Inc. + NSMainNibFile - main + main NSPrincipalClass - X11Application + X11Application + LSBackgroundOnly + diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index 6f9744c2e..53f60a3e2 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -38,22 +38,13 @@ int server_main(int argc, char **argv); int main(int argc, char **argv) { Display *display; - - fprintf(stderr, "X11.app: main(): argc=%d\n", argc); - int i; - for(i=0; i < argc; i++) { - fprintf(stderr, "\targv[%d] = %s\n", i, argv[i]); - } - - /* First check if launchd started us */ - if(argc == 2 && !strncmp(argv[1], "-launchd", 8)) { - argc--; - argv[1] = argv[0]; - argv++; - fprintf(stderr, "X11.app: main(): launchd called us, running server_main()"); - return server_main(argc, argv); - } + //size_t i; + //fprintf(stderr, "X11.app: main(): argc=%d\n", argc); + //for(i=0; i < argc; i++) { + // fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); + //} + /* If we have a process serial number and it's our only arg, act as if * the user double clicked the app bundle: launch app_to_run if possible */ @@ -64,19 +55,18 @@ int main(int argc, char **argv) { fprintf(stderr, "X11.app: main(): closing the display"); /* Could open the display, start the launcher */ XCloseDisplay(display); - + /* Give 2 seconds for the server to start... * TODO: *Really* fix this race condition */ usleep(2000); - fprintf(stderr, "X11.app: main(): running launcher_main()"); + //fprintf(stderr, "X11.app: main(): running launcher_main()"); return launcher_main(argc, argv); } } - - /* Couldn't open the display or we were called with arguments, - * just want to start a server. - */ - fprintf(stderr, "X11.app: main(): running server_main()"); + + /* Start the server */ + //fprintf(stderr, "X11.app: main(): running server_main()"); return server_main(argc, argv); } + diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index e091f25ba..299d9838d 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -707,6 +707,11 @@ void ddxInitGlobals(void) */ int ddxProcessArgument( int argc, char *argv[], int i ) { + if( !strcmp( argv[i], "-launchd" ) ) { + ErrorF( "Launchd command line argument noticed.\n" ); + return 1; + } + if ( !strcmp( argv[i], "-fullscreen" ) ) { ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" ); return 1; diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c index e20c16b7a..87bcadac8 100644 --- a/hw/xquartz/quartzStartup.c +++ b/hw/xquartz/quartzStartup.c @@ -34,6 +34,7 @@ #include #include #include +#include "quartzForeground.h" #include "quartzCommon.h" #include "darwin.h" #include "quartz.h" @@ -76,6 +77,8 @@ void DarwinHandleGUI( int i; int fd[2]; + QuartzMoveToForeground(); + if (been_here) { return; } From 740cc54f081393d4ffe1a3e91c9e504dfaee3fe9 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 8 Dec 2007 01:24:58 -0800 Subject: [PATCH 287/552] Xquartz: Use org.x.X11 instead of com.apple.X11 for preferences Fixed inconsistency so preferences get read from the correct source. (cherry picked from commit a74c38bd9f28735acd602d359d7ca6357aed1e93) --- hw/xquartz/bundle/server-main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xquartz/bundle/server-main.c b/hw/xquartz/bundle/server-main.c index 26fcbb0ab..205e87c89 100644 --- a/hw/xquartz/bundle/server-main.c +++ b/hw/xquartz/bundle/server-main.c @@ -138,8 +138,7 @@ read_boolean_pref (CFStringRef name, int default_) int value; Boolean ok; - value = CFPreferencesGetAppBooleanValue (name, - CFSTR ("com.apple.x11"), &ok); + value = CFPreferencesGetAppBooleanValue (name, CFSTR ("org.x.x11"), &ok); return ok ? value : default_; } From 02df03667052fa6a4e0405b91a005dc48e9b39c4 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 8 Dec 2007 01:28:26 -0800 Subject: [PATCH 288/552] Xquartz: Actually, it should be org.x.X11 for case-sensitive FS (cherry picked from commit c5ccb98d5d461c8a22fc0f3942a607ac90e1e37e) --- hw/xquartz/bundle/server-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/bundle/server-main.c b/hw/xquartz/bundle/server-main.c index 205e87c89..7e1bd7025 100644 --- a/hw/xquartz/bundle/server-main.c +++ b/hw/xquartz/bundle/server-main.c @@ -138,7 +138,7 @@ read_boolean_pref (CFStringRef name, int default_) int value; Boolean ok; - value = CFPreferencesGetAppBooleanValue (name, CFSTR ("org.x.x11"), &ok); + value = CFPreferencesGetAppBooleanValue (name, CFSTR ("org.x.X11"), &ok); return ok ? value : default_; } From 6bb5dacc1710cdbededb9b28ba89a184ecd0931c Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 8 Dec 2007 01:41:37 -0800 Subject: [PATCH 289/552] Xquartz: Actually add quartzForeground.[hc] Sorry for the commit spam... I'm tired and was overly quick to commit... forgot to include a neccessary file. (cherry picked from commit e564b7aeaab63e4c943445275af680b3b5898a94) --- hw/xquartz/quartzForeground.c | 45 +++++++++++++++++++++++++++++++++++ hw/xquartz/quartzForeground.h | 37 ++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 hw/xquartz/quartzForeground.c create mode 100644 hw/xquartz/quartzForeground.h diff --git a/hw/xquartz/quartzForeground.c b/hw/xquartz/quartzForeground.c new file mode 100644 index 000000000..bfea642d1 --- /dev/null +++ b/hw/xquartz/quartzForeground.c @@ -0,0 +1,45 @@ +/* foreground.c - Push the current process into the foreground. + + This is in a separate file because of Quartz/X type conflicts. + + Copyright (c) 2007 Jeremy Huddleston + + 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, sublicense, 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 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 + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) 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. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#include +#include + +int QuartzMoveToForeground() { + ProcessSerialNumber psn = { 0, kCurrentProcess }; + OSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication); + if( returnCode == 0) { + fprintf(stderr, "TransformProcessType: Success\n"); + SetFrontProcess(&psn); + } else { + fprintf(stderr, "TransformProcessType: Failure\n"); + } + return (int)returnCode; +} diff --git a/hw/xquartz/quartzForeground.h b/hw/xquartz/quartzForeground.h new file mode 100644 index 000000000..4fc21c72f --- /dev/null +++ b/hw/xquartz/quartzForeground.h @@ -0,0 +1,37 @@ +/* foreground.h - Push the current process into the foreground. + + This is in a separate file because of Quartz/X type conflicts. + + Copyright (c) 2007 Jeremy Huddleston + + 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, sublicense, 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 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 + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) 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. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#ifndef _QUARTZ_FOREGROUND_H_ +#define _QUARTZ_FOREGROUND_H_ + +int QuartzMoveToForeground(); + +#endif /* _QUARTZ_FOREGROUND_H_ */ From 5e016fa9b2bf28971ed1794f4706c6538b1d411c Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sat, 8 Dec 2007 06:12:46 -0800 Subject: [PATCH 290/552] Added darwinEvents.h to EXTRA_DIST (cherry picked from commit 45e5247564c423a2bf02cfec1993155858c91a14) --- hw/xquartz/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 5814eb79f..1876e8611 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -40,6 +40,7 @@ EXTRA_DIST = \ applewmExt.h \ darwinClut8.h \ darwin.h \ + darwinEvents.h \ darwinKeyboard.h \ keysym2ucs.h \ pseudoramiX.h \ From 020b0e92b039d6ddaea0bbdb890b6a01037bf9b6 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 8 Dec 2007 11:49:37 -0800 Subject: [PATCH 291/552] Xquartz Added quartzKeyboard.h to EXTRA_DIST (cherry picked from commit 37c9781fdb672229ceab101b080762e15512943f) --- hw/xquartz/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 1876e8611..831ba49f4 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -44,10 +44,11 @@ EXTRA_DIST = \ darwinKeyboard.h \ keysym2ucs.h \ pseudoramiX.h \ + quartz.h \ quartzAudio.h \ quartzCommon.h \ quartzCursor.c \ quartzCursor.h \ quartzForeground.h \ - quartz.h \ + quartzKeyboard.h \ quartzPasteboard.h From cd13c4ba5b7a1bdfb419cb492a96a72dccf2681e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 8 Dec 2007 13:18:17 -0800 Subject: [PATCH 292/552] .gitignore: added hw/xquartz/bundle/org.x.X11.plist --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2e60d58b1..37f35f46f 100644 --- a/.gitignore +++ b/.gitignore @@ -275,6 +275,7 @@ hw/xprint/doc/Xprt.1x hw/xprint/doc/Xprt.man hw/xprint/dpmsstubs-wrapper.c hw/xprint/miinitext-wrapper.c +hw/xquartz/bundle/org.x.X11.plist include/dix-config.h include/kdrive-config.h include/xgl-config.h From 7b573ed43672b1fac7b4e6df85a657942ab4cba6 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 9 Dec 2007 12:02:04 -0800 Subject: [PATCH 293/552] Xquartz: Added missing link to libconfig.a (cherry picked from commit 14ec1cf1cb7ebc183c05e13f9c2b4b4eed679ff3) --- hw/xquartz/xpr/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am index 3cc2aba12..c2419cae6 100644 --- a/hw/xquartz/xpr/Makefile.am +++ b/hw/xquartz/xpr/Makefile.am @@ -24,6 +24,7 @@ Xquartz_SOURCES = \ Xquartz_LDADD = \ $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/dix/dixfonts.lo \ + $(top_builddir)/config/libconfig.a \ $(top_builddir)/dix/libdix.la \ $(top_builddir)/os/libos.la \ $(top_builddir)/dix/libxpstubs.la \ From 8f2eff643bf421bc4233fbaa2409b75d9f80d147 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sat, 8 Dec 2007 23:34:40 -0800 Subject: [PATCH 294/552] remove Xplugin.h, because we should use the one in /usr/include (cherry picked from commit 3e881032f35f774ff9638678d7e3f77c81f62976) --- hw/xquartz/xpr/Xplugin.h | 589 --------------------------------------- 1 file changed, 589 deletions(-) delete mode 100644 hw/xquartz/xpr/Xplugin.h diff --git a/hw/xquartz/xpr/Xplugin.h b/hw/xquartz/xpr/Xplugin.h deleted file mode 100644 index a10b1b8e1..000000000 --- a/hw/xquartz/xpr/Xplugin.h +++ /dev/null @@ -1,589 +0,0 @@ -/* Xplugin.h -- windowing API for rootless X11 server - - Copyright (c) 2002 Apple Computer, Inc. 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, sublicense, 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 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 - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) 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. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. - - Note that these interfaces are provided solely for the use of the - X11 server. Any other uses are unsupported and strongly discouraged. */ - -#ifndef XPLUGIN_H -#define XPLUGIN_H 1 - -#include - -/* By default we use the X server definition of BoxRec to define xp_box, - so that the compiler can silently convert between the two. But if - XP_NO_X_HEADERS is defined, we'll define it ourselves. */ - -#ifndef XP_NO_X_HEADERS -# include "miscstruct.h" - typedef BoxRec xp_box; -#else - struct xp_box_struct { - short x1, y1, x2, y2; - }; - typedef struct xp_box_struct xp_box; -#endif - -typedef unsigned int xp_resource_id; -typedef xp_resource_id xp_window_id; -typedef xp_resource_id xp_surface_id; -typedef unsigned int xp_client_id; -typedef unsigned int xp_request_type; -typedef int xp_error; -typedef int xp_bool; - - -/* Error codes that the functions declared here may return. They all - numerically match their X equivalents, i.e. the XP_ can be dropped - if has been included. */ - -enum xp_error_enum { - XP_Success = 0, - XP_BadRequest = 1, - XP_BadValue = 2, - XP_BadWindow = 3, - XP_BadMatch = 8, - XP_BadAccess = 10, - XP_BadImplementation = 17, -}; - - -/* Event types generated by the plugin. */ - -enum xp_event_type_enum { - /* The global display configuration changed somehow. */ - XP_EVENT_DISPLAY_CHANGED = 1 << 0, - - /* A window changed state. Argument is xp_window_state_event */ - XP_EVENT_WINDOW_STATE_CHANGED = 1 << 1, - - /* An async request encountered an error. Argument is of type - xp_async_error_event */ - XP_EVENT_ASYNC_ERROR = 1 << 2, - - /* Sent when a surface is destroyed as a side effect of destroying - a window. Arg is of type xp_surface_id. */ - XP_EVENT_SURFACE_DESTROYED = 1 << 3, - - /* Sent when any GL contexts pointing at the given surface need to - call xp_update_gl_context () to refresh their state (because the - window moved or was resized. Arg is of type xp_surface_id. */ - XP_EVENT_SURFACE_CHANGED = 1 << 4, - - /* Sent when a window has been moved. Arg is of type xp_window_id. */ - XP_EVENT_WINDOW_MOVED = 1 << 5, -}; - -/* Function type used to receive events. */ - -typedef void (xp_event_fun) (unsigned int type, const void *arg, - unsigned int arg_size, void *user_data); - - -/* Operation types. Used when reporting errors asynchronously. */ - -enum xp_request_type_enum { - XP_REQUEST_NIL = 0, - XP_REQUEST_DESTROY_WINDOW = 1, - XP_REQUEST_CONFIGURE_WINDOW = 2, - XP_REQUEST_FLUSH_WINDOW = 3, - XP_REQUEST_COPY_WINDOW = 4, - XP_REQUEST_UNLOCK_WINDOW = 5, - XP_REQUEST_DISABLE_UPDATE = 6, - XP_REQUEST_REENABLE_UPDATE = 7, - XP_REQUEST_HIDE_CURSOR = 8, - XP_REQUEST_SHOW_CURSOR = 9, - XP_REQUEST_FRAME_DRAW = 10, -}; - -/* Structure used to report an error asynchronously. Passed as the "arg" - of an XP_EVENT_ASYNC_ERROR event. */ - -struct xp_async_error_event_struct { - xp_request_type request_type; - xp_resource_id id; - xp_error error; -}; - -typedef struct xp_async_error_event_struct xp_async_error_event; - - -/* Possible window states. */ - -enum xp_window_state_enum { - /* The window is not in the global list of possibly-visible windows. */ - XP_WINDOW_STATE_OFFSCREEN = 1 << 0, - - /* Parts of the window may be obscured by other windows. */ - XP_WINDOW_STATE_OBSCURED = 1 << 1, -}; - -/* Structure passed as argument of an XP_EVENT_WINDOW_STATE_CHANGED event. */ - -struct xp_window_state_event_struct { - xp_window_id id; - unsigned int state; -}; - -typedef struct xp_window_state_event_struct xp_window_state_event; - - -/* Function type used to supply a colormap for indexed drawables. */ - -typedef xp_error (xp_colormap_fun) (void *data, int first_color, - int n_colors, uint32_t *colors); - - -/* Window attributes structure. Used when creating and configuring windows. - Also used when configuring surfaces attached to windows. Functions that - take one of these structures also take a bit mask defining which - fields are set to meaningful values. */ - -enum xp_window_changes_enum { - XP_ORIGIN = 1 << 0, - XP_SIZE = 1 << 1, - XP_BOUNDS = XP_ORIGIN | XP_SIZE, - XP_SHAPE = 1 << 2, - XP_STACKING = 1 << 3, - XP_DEPTH = 1 << 4, - XP_COLORMAP = 1 << 5, - XP_WINDOW_LEVEL = 1 << 6, -}; - -struct xp_window_changes_struct { - /* XP_ORIGIN */ - int x, y; - - /* XP_SIZE */ - unsigned int width, height; - int bit_gravity; /* how to resize the backing store */ - - /* XP_SHAPE */ - int shape_nrects; /* -1 = remove shape */ - xp_box *shape_rects; - int shape_tx, shape_ty; /* translation for shape */ - - /* XP_STACKING */ - int stack_mode; - xp_window_id sibling; /* may be zero; in ABOVE/BELOW modes - it may specify a relative window */ - /* XP_DEPTH, window-only */ - unsigned int depth; - - /* XP_COLORMAP, window-only */ - xp_colormap_fun *colormap; - void *colormap_data; - - /* XP_WINDOW_LEVEL, window-only */ - int window_level; -}; - -typedef struct xp_window_changes_struct xp_window_changes; - -/* Values for bit_gravity field */ - -enum xp_bit_gravity_enum { - XP_GRAVITY_NONE = 0, /* no gravity, fill everything */ - XP_GRAVITY_NORTH_WEST = 1, /* anchor to top-left corner */ - XP_GRAVITY_NORTH_EAST = 2, /* anchor to top-right corner */ - XP_GRAVITY_SOUTH_EAST = 3, /* anchor to bottom-right corner */ - XP_GRAVITY_SOUTH_WEST = 4, /* anchor to bottom-left corner */ -}; - -/* Values for stack_mode field */ - -enum xp_window_stack_mode_enum { - XP_UNMAPPED = 0, /* remove the window */ - XP_MAPPED_ABOVE = 1, /* display the window on top */ - XP_MAPPED_BELOW = 2, /* display the window at bottom */ -}; - -/* Data formats for depth field and composite functions */ - -enum xp_depth_enum { - XP_DEPTH_NIL = 0, /* null source when compositing */ - XP_DEPTH_ARGB8888, - XP_DEPTH_RGB555, - XP_DEPTH_A8, /* for masks when compositing */ - XP_DEPTH_INDEX8, -}; - -/* Options that may be passed to the xp_init () function. */ - -enum xp_init_options_enum { - /* Don't mark that this process can be in the foreground. */ - XP_IN_BACKGROUND = 1 << 0, - - /* Deliver background pointer events to this process. */ - XP_BACKGROUND_EVENTS = 1 << 1, -}; - - - -/* Miscellaneous functions */ - -/* Initialize the plugin library. Only the copy/fill/composite functions - may be called without having previously called xp_init () */ - -extern xp_error xp_init (unsigned int options); - -/* Sets the current set of requested notifications to MASK. When any of - these arrive, CALLBACK will be invoked with CALLBACK-DATA. Note that - calling this function cancels any previously requested notifications - that aren't set in MASK. */ - -extern xp_error xp_select_events (unsigned int mask, - xp_event_fun *callback, - void *callback_data); - -/* Waits for all initiated operations to complete. */ - -extern xp_error xp_synchronize (void); - -/* Causes any display update initiated through the plugin libary to be - queued until update is reenabled. Note that calls to these functions - nest. */ - -extern xp_error xp_disable_update (void); -extern xp_error xp_reenable_update (void); - - - -/* Cursor functions. */ - -/* Installs the specified cursor. ARGB-DATA should point to 32-bit - premultiplied big-endian ARGB data. The HOT-X,HOT-Y parameters - specify the offset to the cursor's hot spot from its top-left - corner. */ - -extern xp_error xp_set_cursor (unsigned int width, unsigned int height, - unsigned int hot_x, unsigned int hot_y, - const uint32_t *argb_data, - unsigned int rowbytes); - -/* Hide and show the cursor if it's owned by the current process. Calls - to these functions nest. */ - -extern xp_error xp_hide_cursor (void); -extern xp_error xp_show_cursor (void); - - - -/* Window functions. */ - -/* Create a new window as defined by MASK and VALUES. MASK must contain - XP_BOUNDS or an error is raised. The id of the newly created window - is stored in *RET-ID if this function returns XP_Success. */ - -extern xp_error xp_create_window (unsigned int mask, - const xp_window_changes *values, - xp_window_id *ret_id); - -/* Destroys the window identified by ID. */ - -extern xp_error xp_destroy_window (xp_window_id id); - -/* Reconfigures the given window according to MASK and VALUES. */ - -extern xp_error xp_configure_window (xp_window_id id, unsigned int mask, - const xp_window_changes *values); - - -/* Returns true if NATIVE-ID is a window created by the plugin library. - If so and RET-ID is non-null, stores the id of the window in *RET-ID. */ - -extern xp_bool xp_lookup_native_window (unsigned int native_id, - xp_window_id *ret_id); - -/* If ID names a window created by the plugin library, stores it's native - window id in *RET-NATIVE-ID. */ - -extern xp_error xp_get_native_window (xp_window_id id, - unsigned int *ret_native_id); - - -/* Locks the rectangle IN-RECT (or, if null, the entire window) of the - given window's backing store. Any other non-null parameters are filled - in as follows: - - DEPTH = format of returned data. Currently either XP_DEPTH_ARGB8888 - or XP_DEPTH_RGB565 (possibly with 8 bit planar alpha). Data is - always stored in native byte order. - - BITS[0] = pointer to top-left pixel of locked color data - BITS[1] = pointer to top-left of locked alpha data, or null if window - has no alpha. If the alpha data is meshed, then BITS[1] = BITS[0]. - - ROWBYTES[0,1] = size in bytes of each row of color,alpha data - - OUT-RECT = rectangle specifying the current position and size of the - locked region relative to the window origin. - - Note that an error is raised when trying to lock an already locked - window. While the window is locked, the only operations that may - be performed on it are to modify, access or flush its marked region. */ - -extern xp_error xp_lock_window (xp_window_id id, - const xp_box *in_rect, - unsigned int *depth, - void *bits[2], - unsigned int rowbytes[2], - xp_box *out_rect); - -/* Mark that the region specified by SHAPE-NRECTS, SHAPE-RECTS, - SHAPE-TX, and SHAPE-TY in the specified window has been updated, and - will need to subsequently be redisplayed. */ - -extern xp_error xp_mark_window (xp_window_id id, int shape_nrects, - const xp_box *shape_rects, - int shape_tx, int shape_ty); - -/* Unlocks the specified window. If FLUSH is true, then any marked - regions are immediately redisplayed. Note that it's an error to - unlock an already unlocked window. */ - -extern xp_error xp_unlock_window (xp_window_id id, xp_bool flush); - -/* If anything is marked in the given window for redisplay, do it now. */ - -extern xp_error xp_flush_window (xp_window_id id); - -/* Moves the contents of the region DX,DY pixels away from that specified - by DST_RECTS and DST_NRECTS in the window with SRC-ID to the - destination region in the window DST-ID. Note that currently source - and destination windows must be the same. */ - -extern xp_error xp_copy_window (xp_window_id src_id, xp_window_id dst_id, - int dst_nrects, const xp_box *dst_rects, - int dx, int dy); - -/* Returns true if the given window has any regions marked for - redisplay. */ - -extern xp_bool xp_is_window_marked (xp_window_id id); - -/* If successful returns a superset of the region marked for update in - the given window. Use xp_free_region () to release the returned data. */ - -extern xp_error xp_get_marked_shape (xp_window_id id, - int *ret_nrects, xp_box **ret_rects); - -extern void xp_free_shape (int nrects, xp_box *rects); - -/* Searches for the first window below ABOVE-ID containing the point X,Y, - and returns it's window id in *RET-ID. If no window is found, *RET-ID - is set to zero. If ABOVE-ID is zero, finds the topmost window - containing the given point. */ - -extern xp_error xp_find_window (int x, int y, xp_window_id above_id, - xp_window_id *ret_id); - -/* Returns the current origin and size of the window ID in *BOUNDS-RET if - successful. */ -extern xp_error xp_get_window_bounds (xp_window_id id, xp_box *bounds_ret); - - - -/* Window surface functions. */ - -/* Create a new VRAM surface on the specified window. If successful, - returns the identifier of the new surface in *RET-SID. */ - -extern xp_error xp_create_surface (xp_window_id id, xp_surface_id *ret_sid); - -/* Destroys the specified surface. */ - -extern xp_error xp_destroy_surface (xp_surface_id sid); - -/* Reconfigures the specified surface as defined by MASK and VALUES. - Note that specifying XP_DEPTH is an error. */ - -extern xp_error xp_configure_surface (xp_surface_id sid, unsigned int mask, - const xp_window_changes *values); - -/* If successful, places the client identifier of the current process - in *RET-CLIENT. */ - -extern xp_error xp_get_client_id (xp_client_id *ret_client); - -/* Given a valid window,surface combination created by the current - process, attempts to allow the specified external client access - to that surface. If successful, returns two integers in RET-KEY - which the client can use to import the surface into their process. */ - -extern xp_error xp_export_surface (xp_window_id wid, xp_surface_id sid, - xp_client_id client, - unsigned int ret_key[2]); - -/* Given a two integer key returned from xp_export_surface (), tries - to import the surface into the current process. If successful the - local surface identifier is stored in *SID-RET. */ - -extern xp_error xp_import_surface (const unsigned int key[2], - xp_surface_id *sid_ret); - -/* If successful, stores the number of surfaces attached to the - specified window in *RET. */ - -extern xp_error xp_get_window_surface_count (xp_window_id id, - unsigned int *ret); - -/* Attaches the CGLContextObj CGL-CTX to the specified surface. */ - -extern xp_error xp_attach_gl_context (void *cgl_ctx, xp_surface_id sid); - -/* Updates the CGLContextObj CGL-CTX to reflect any recent changes to - the surface it's attached to. */ - -extern xp_error xp_update_gl_context (void *cgl_ctx); - - - -/* Window frame functions. */ - -/* Possible arguments to xp_frame_get_rect (). */ - -enum xp_frame_rect_enum { - XP_FRAME_RECT_TITLEBAR = 1, - XP_FRAME_RECT_TRACKING = 2, - XP_FRAME_RECT_GROWBOX = 3, -}; - -/* Classes of window frame. */ - -enum xp_frame_class_enum { - XP_FRAME_CLASS_DOCUMENT = 1 << 0, - XP_FRAME_CLASS_DIALOG = 1 << 1, - XP_FRAME_CLASS_MODAL_DIALOG = 1 << 2, - XP_FRAME_CLASS_SYSTEM_MODAL_DIALOG = 1 << 3, - XP_FRAME_CLASS_UTILITY = 1 << 4, - XP_FRAME_CLASS_TOOLBAR = 1 << 5, - XP_FRAME_CLASS_MENU = 1 << 6, - XP_FRAME_CLASS_SPLASH = 1 << 7, - XP_FRAME_CLASS_BORDERLESS = 1 << 8, -}; - -/* Attributes of window frames. */ - -enum xp_frame_attr_enum { - XP_FRAME_ACTIVE = 0x0001, - XP_FRAME_URGENT = 0x0002, - XP_FRAME_TITLE = 0x0004, - XP_FRAME_PRELIGHT = 0x0008, - XP_FRAME_SHADED = 0x0010, - XP_FRAME_CLOSE_BOX = 0x0100, - XP_FRAME_COLLAPSE = 0x0200, - XP_FRAME_ZOOM = 0x0400, - XP_FRAME_ANY_BUTTON = 0x0700, - XP_FRAME_CLOSE_BOX_CLICKED = 0x0800, - XP_FRAME_COLLAPSE_BOX_CLICKED = 0x1000, - XP_FRAME_ZOOM_BOX_CLICKED = 0x2000, - XP_FRAME_ANY_CLICKED = 0x3800, - XP_FRAME_GROW_BOX = 0x4000, -}; - -#define XP_FRAME_ATTR_IS_SET(a,b) (((a) & (b)) == (b)) -#define XP_FRAME_ATTR_IS_CLICKED(a,m) ((a) & ((m) << 3)) -#define XP_FRAME_ATTR_SET_CLICKED(a,m) ((a) |= ((m) << 3)) -#define XP_FRAME_ATTR_UNSET_CLICKED(a,m) ((a) &= ~((m) << 3)) - -#define XP_FRAME_POINTER_ATTRS (XP_FRAME_PRELIGHT \ - | XP_FRAME_ANY_BUTTON \ - | XP_FRAME_ANY_CLICKED) - -extern xp_error xp_frame_get_rect (int type, int class, const xp_box *outer, - const xp_box *inner, xp_box *ret); -extern xp_error xp_frame_hit_test (int class, int x, int y, - const xp_box *outer, - const xp_box *inner, int *ret); -extern xp_error xp_frame_draw (xp_window_id wid, int class, unsigned int attr, - const xp_box *outer, const xp_box *inner, - unsigned int title_len, - const unsigned char *title_bytes); - - - -/* Memory manipulation functions. */ - -enum xp_composite_op_enum { - XP_COMPOSITE_SRC = 0, - XP_COMPOSITE_OVER, -}; - -#define XP_COMPOSITE_FUNCTION(op, src_depth, mask_depth, dest_depth) \ - (((op) << 24) | ((src_depth) << 16) \ - | ((mask_depth) << 8) | ((dest_depth) << 0)) - -#define XP_COMPOSITE_FUNCTION_OP(f) (((f) >> 24) & 255) -#define XP_COMPOSITE_FUNCTION_SRC_DEPTH(f) (((f) >> 16) & 255) -#define XP_COMPOSITE_FUNCTION_MASK_DEPTH(f) (((f) >> 8) & 255) -#define XP_COMPOSITE_FUNCTION_DEST_DEPTH(f) (((f) >> 0) & 255) - -/* Composite WIDTH by HEIGHT pixels from source and mask to destination - using a specified function (if source and destination overlap, - undefined behavior results). - - For SRC and DEST, the first element of the array is the color data. If - the second element is non-null it implies that there is alpha data - (which may be meshed or planar). Data without alpha is assumed to be - opaque. - - Passing a null SRC-ROWBYTES pointer implies that the data SRC points - to is a single element. - - Operations that are not supported will return XP_BadImplementation. */ - -extern xp_error xp_composite_pixels (unsigned int width, unsigned int height, - unsigned int function, - void *src[2], unsigned int src_rowbytes[2], - void *mask, unsigned int mask_rowbytes, - void *dest[2], unsigned int dest_rowbytes[2]); - -/* Fill HEIGHT rows of data starting at DST. Each row will have WIDTH - bytes filled with the 32-bit pattern VALUE. Each row is DST-ROWBYTES - wide in total. */ - -extern void xp_fill_bytes (unsigned int width, - unsigned int height, uint32_t value, - void *dst, unsigned int dst_rowbytes); - -/* Copy HEIGHT rows of bytes from SRC to DST. Each row will have WIDTH - bytes copied. SRC and DST may overlap, and the right thing will happen. */ - -extern void xp_copy_bytes (unsigned int width, unsigned int height, - const void *src, unsigned int src_rowbytes, - void *dst, unsigned int dst_rowbytes); - -/* Suggestions for the minimum number of bytes or pixels for which it - makes sense to use some of the xp_ functions */ - -extern unsigned int xp_fill_bytes_threshold, xp_copy_bytes_threshold, - xp_composite_area_threshold, xp_scroll_area_threshold; - - -#endif /* XPLUGIN_H */ From 7d61893b49569a72bccb63f1ae8c9ce4ef4e354f Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 10 Dec 2007 20:33:30 -0800 Subject: [PATCH 295/552] Xquartz: Removed Xplugin.h from EXTRA_DIST (cherry picked from commit a746383eca77c9b9ea2cba0cf1c8fc39c0f7d536) --- hw/xquartz/bundle/Makefile.am | 3 +++ hw/xquartz/bundle/Xquartz.plist | 27 +++++++++++++++++++++++++++ hw/xquartz/bundle/org.x.X11.plist.in | 2 -- hw/xquartz/xpr/Makefile.am | 1 - 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 hw/xquartz/bundle/Xquartz.plist diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index e8d5167b7..573443497 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -15,6 +15,9 @@ endif clean-local: rm -rf build +resourcedir=$(libdir)/X11/xserver +resource_DATA = Xquartz.plist + EXTRA_DIST = \ org.x.X11.plist \ Info.plist \ diff --git a/hw/xquartz/bundle/Xquartz.plist b/hw/xquartz/bundle/Xquartz.plist new file mode 100644 index 000000000..e15704516 --- /dev/null +++ b/hw/xquartz/bundle/Xquartz.plist @@ -0,0 +1,27 @@ + + + + + + + + apps_menu + + + Terminal + xterm + n + + + xman + xman + + + + xlogo + xlogo + + + + + diff --git a/hw/xquartz/bundle/org.x.X11.plist.in b/hw/xquartz/bundle/org.x.X11.plist.in index 36849cf60..26eca968a 100644 --- a/hw/xquartz/bundle/org.x.X11.plist.in +++ b/hw/xquartz/bundle/org.x.X11.plist.in @@ -4,8 +4,6 @@ Label org.x.X11 - Program - @APPLE_APPLICATIONS_DIR@/X11.app/Contents/MacOS/X11 ProgramArguments @APPLE_APPLICATIONS_DIR@/X11.app/Contents/MacOS/X11 diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am index c2419cae6..87ed195e1 100644 --- a/hw/xquartz/xpr/Makefile.am +++ b/hw/xquartz/xpr/Makefile.am @@ -67,5 +67,4 @@ EXTRA_DIST = \ x-hash.h \ x-hook.h \ x-list.h \ - Xplugin.h \ xpr.h From 1ff945a8e43e622b39b360ee49efd6ae3b77be67 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 10 Dec 2007 20:47:48 -0800 Subject: [PATCH 296/552] Xquartz: Make Alt work with Xmodmap again (cherry picked from commit 0e017177dcca7185716ca760dcce9ddedc7bfef9) --- hw/xquartz/darwinEvents.c | 2 +- hw/xquartz/darwinKeyboard.c | 20 +++++++++----------- hw/xquartz/quartzKeyboard.c | 8 ++++---- hw/xquartz/quartzKeyboard.h | 4 ++-- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index ae82f5b14..1d09e0941 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -424,7 +424,7 @@ void DarwinSendKeyboardEvents(int ev_type, int keycode) { static unsigned int last_seed; unsigned int this_seed; - this_seed = DarwinModeSystemKeymapSeed(); + this_seed = QuartzSystemKeymapSeed(); if (this_seed != last_seed) { last_seed = this_seed; DarwinKeyboardReload(darwinKeyboard); diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c index f6dcfb34a..f1b90b76a 100644 --- a/hw/xquartz/darwinKeyboard.c +++ b/hw/xquartz/darwinKeyboard.c @@ -507,8 +507,9 @@ Bool DarwinParseNXKeyMapping(darwinKeyboardInfo *info) { (left ? XK_Control_L : XK_Control_R); break; case NX_MODIFIERKEY_ALTERNATE: - info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Mode_switch; - // (left ? XK_Alt_L : XK_Alt_R); + // info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Mode_switch; + info->keyMap[keyCode * GLYPHS_PER_KEY] = + (left ? XK_Alt_L : XK_Alt_R); break; case NX_MODIFIERKEY_COMMAND: info->keyMap[keyCode * GLYPHS_PER_KEY] = @@ -685,6 +686,7 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) { case XK_Alt_L: info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; info->modMap[MIN_KEYCODE + i] = Mod1Mask; + *k = XK_Mode_switch; // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor. break; case XK_Alt_R: @@ -693,15 +695,11 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) { #else info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; #endif + *k = XK_Mode_switch; // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor. info->modMap[MIN_KEYCODE + i] = Mod1Mask; break; case XK_Mode_switch: - // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor. -#ifdef NX_MODIFIERKEY_RALTERNATE - info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i; -#endif - info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; info->modMap[MIN_KEYCODE + i] = Mod1Mask; break; @@ -735,12 +733,12 @@ static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) { memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap)); /* TODO: Clean this up - * DarwinModeReadSystemKeymap is in quartz/quartzKeyboard.c + * QuartzReadSystemKeymap is in quartz/quartzKeyboard.c * DarwinParseNXKeyMapping is here */ if (!DarwinParseNXKeyMapping(&keyInfo)) { - DEBUG_LOG("DarwinParseNXKeyMapping returned 0... running DarwinModeReadSystemKeymap().\n"); - if (!DarwinModeReadSystemKeymap(&keyInfo)) { + DEBUG_LOG("DarwinParseNXKeyMapping returned 0... running QuartzReadSystemKeymap().\n"); + if (!QuartzReadSystemKeymap(&keyInfo)) { FatalError("Could not build a valid keymap."); } } @@ -790,7 +788,7 @@ void DarwinKeyboardInit(DeviceIntPtr pDev) { // DarwinKeyboardReload(pDev); /* Initialize the seed, so we don't reload the keymap unnecessarily (and possibly overwrite xinitrc changes) */ - DarwinModeSystemKeymapSeed(); + QuartzSystemKeymapSeed(); assert( InitKeyboardDeviceStruct( (DevicePtr)pDev, &keySyms, keyInfo.modMap, QuartzBell, diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c index 0a50d06ac..9b899ca67 100644 --- a/hw/xquartz/quartzKeyboard.c +++ b/hw/xquartz/quartzKeyboard.c @@ -66,11 +66,11 @@ const static struct { {55, XK_Meta_L}, {56, XK_Shift_L}, {57, XK_Caps_Lock}, - {58, XK_Mode_switch}, + {58, XK_Alt_L}, {59, XK_Control_L}, {60, XK_Shift_R}, - {61, XK_Mode_switch}, + {61, XK_Alt_R}, {62, XK_Control_R}, {63, XK_Meta_R}, @@ -146,7 +146,7 @@ const static struct { {UKEYSYM (0x31b), XK_dead_horn}, /* COMBINING HORN */ }; -unsigned int DarwinModeSystemKeymapSeed(void) { +unsigned int QuartzSystemKeymapSeed(void) { static unsigned int seed; static KeyboardLayoutRef last_key_layout; KeyboardLayoutRef key_layout; @@ -195,7 +195,7 @@ static KeySym make_dead_key(KeySym in) { return in; } -Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info) { +Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) { KeyboardLayoutRef key_layout; const void *chr_data = NULL; int num_keycodes = NUM_KEYCODES; diff --git a/hw/xquartz/quartzKeyboard.h b/hw/xquartz/quartzKeyboard.h index c5f22bf14..0c7e70e48 100644 --- a/hw/xquartz/quartzKeyboard.h +++ b/hw/xquartz/quartzKeyboard.h @@ -47,7 +47,7 @@ typedef struct darwinKeyboardInfo_struct { /* These functions need to be implemented by XQuartz, XDarwin, etc. */ void DarwinKeyboardReload(DeviceIntPtr pDev); -Bool DarwinModeReadSystemKeymap(darwinKeyboardInfo *info); -unsigned int DarwinModeSystemKeymapSeed(void); +Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info); +unsigned int QuartzSystemKeymapSeed(void); #endif /* QUARTZ_KEYBOARD_H */ From eab0c4e49015fe96f6d985316f9c5fa28a7eb1fe Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 10 Dec 2007 20:57:24 -0800 Subject: [PATCH 297/552] Xquartz: Pre-process Xquartz man page (cherry picked from commit dec2633c41dd0adf73264afdf251a6522d6ae76a) --- hw/xquartz/xpr/Makefile.am | 16 ++++++++--- .../xpr/{Xquartz.man => Xquartz.man.pre} | 28 +++++++++---------- 2 files changed, 26 insertions(+), 18 deletions(-) rename hw/xquartz/xpr/{Xquartz.man => Xquartz.man.pre} (85%) diff --git a/hw/xquartz/xpr/Makefile.am b/hw/xquartz/xpr/Makefile.am index 87ed195e1..ae1b19297 100644 --- a/hw/xquartz/xpr/Makefile.am +++ b/hw/xquartz/xpr/Makefile.am @@ -1,8 +1,5 @@ bin_PROGRAMS = Xquartz -# TODO: This man page needs sed magic and cleanup -man1_MANS = Xquartz.man - AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ -I$(srcdir) -I$(srcdir)/.. \ @@ -58,8 +55,19 @@ Xquartz_LDFLAGS = \ -Wl,-framework,CoreAudio \ -Wl,-framework,IOKit +appmandir = $(APP_MAN_DIR) +appman_PRE = Xquartz.man.pre +appman_PROCESSED = $(appman_PRE:man.pre=man) +appman_DATA = $(appman_PRE:man.pre=@APP_MAN_SUFFIX@) + +CLEANFILES = $(appman_PROCESSED) $(appman_DATA) + +include $(top_srcdir)/cpprules.in + +.man.$(APP_MAN_SUFFIX): + cp $< $@ + EXTRA_DIST = \ - Xquartz.man \ dri.h \ dristruct.h \ appledri.h \ diff --git a/hw/xquartz/xpr/Xquartz.man b/hw/xquartz/xpr/Xquartz.man.pre similarity index 85% rename from hw/xquartz/xpr/Xquartz.man rename to hw/xquartz/xpr/Xquartz.man.pre index 37a7f1a26..315db1ca4 100644 --- a/hw/xquartz/xpr/Xquartz.man +++ b/hw/xquartz/xpr/Xquartz.man.pre @@ -65,48 +65,48 @@ of the main display. .SH CUSTOMIZATION \fIXquartz\fP can also be customized using the defaults(1) command. The available options are: .TP 8 -.B defaults write com.apple.x11 enable_fake_buttons -boolean true +.B defaults write org.x.X11 enable_fake_buttons -boolean true Equivalent to the \fB-fakebuttons\fP command line option. .TP 8 -.B defaults write com.apple.x11 fake_button2 \fImodifiers\fP +.B defaults write org.x.X11 fake_button2 \fImodifiers\fP Equivalent to the \fB-fakemouse2\fP option. .TP 8 -.B defaults write com.apple.x11 fake_button3 \fImodifiers\fP +.B defaults write org.x.X11 fake_button3 \fImodifiers\fP Equivalent to the \fB-fakemouse3\fP option. .TP 8 -.B defaults write com.apple.x11 swap_alt_meta -boolean true +.B defaults write org.x.X11 swap_alt_meta -boolean true Equivalent to the \fB-swapAltMeta\fP option. .TP 8 -.B defaults write com.apple.x11 keymap_file \fIfilename\fP +.B defaults write org.x.X11 keymap_file \fIfilename\fP Equivalent to the \fB-keymap\fP option. .TP 8 -.B defaults write com.apple.x11 no_quit_alert -boolean true +.B defaults write org.x.X11 no_quit_alert -boolean true Disables the alert dialog displayed when attempting to quit X11. .TP 8 -.B defaults write com.apple.x11 no_auth -boolean true +.B defaults write org.x.X11 no_auth -boolean true Stops the X server requiring that clients authenticate themselves when connecting. See Xsecurity(__miscmansuffix__). .TP 8 -.B defaults write com.apple.x11 nolisten_tcp -boolean true +.B defaults write org.x.X11 nolisten_tcp -boolean true Prevents the X server accepting remote connections. .TP 8 -.B defaults write com.apple.x11 xinit_kills_server -boolean false +.B defaults write org.x.X11 xinit_kills_server -boolean false Stops the X server exiting when the xinitrc script terminates. .TP 8 -.B defaults write com.apple.x11 fullscreen_hotkeys -boolean false +.B defaults write org.x.X11 fullscreen_hotkeys -boolean false Allows system hotkeys to be handled while in X11 fullscreen mode. .TP 8 -.B defaults write com.apple.x11 enable_system_beep -boolean false +.B defaults write org.x.X11 enable_system_beep -boolean false Don't use the standard system beep effect for X11 alerts. .TP 8 -.B defaults write com.apple.x11 enable_key_equivalents -boolean false +.B defaults write org.x.X11 enable_key_equivalents -boolean false Disable menu keyboard equivalents while X11 windows are focused. .TP 8 -.B defaults write com.apple.x11 depth \fIdepth\fP +.B defaults write org.x.X11 depth \fIdepth\fP Equivalent to the \fB-depth\fP option. .SH "SEE ALSO" .PP -X(__miscmansuffix__), XFree86(1), Xserver(1), xdm(1), xinit(1) +X(__miscmansuffix__), Xserver(1), xdm(1), xinit(1) .PP .SH AUTHORS XFree86 was originally ported to Mac OS X Server by John Carmack. Dave From 671592343701d8174a70f1ffb9c818784ea3af7a Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Wed, 12 Dec 2007 10:59:15 -0800 Subject: [PATCH 298/552] Get rid of xf86DefModes.c. It's out of date and not included in the build. Instead, xf86DefModeSet.c is built from vesamodes and extramodes using modeline2c.awk and *that's* what gets built. --- hw/xfree86/common/Makefile.am | 1 - hw/xfree86/common/modeline2c.awk | 2 +- hw/xfree86/common/xf86DefModes.c | 155 ------------------------------- 3 files changed, 1 insertion(+), 157 deletions(-) delete mode 100644 hw/xfree86/common/xf86DefModes.c diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index 2f23776a0..a29101bd5 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -85,7 +85,6 @@ EXTRA_DIST = \ xf86Version.h \ xorgVersion.h \ xf86Date.h \ - xf86DefModes.c \ $(MODEDEFSOURCES) \ $(DISTKBDSOURCES) diff --git a/hw/xfree86/common/modeline2c.awk b/hw/xfree86/common/modeline2c.awk index 7a893300c..d4b9649c8 100644 --- a/hw/xfree86/common/modeline2c.awk +++ b/hw/xfree86/common/modeline2c.awk @@ -29,7 +29,7 @@ # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# Usage: modeline2c.awk < modefile > xf86DefModes.c +# Usage: modeline2c.awk < modefile > xf86DefModeSet.c # BEGIN { diff --git a/hw/xfree86/common/xf86DefModes.c b/hw/xfree86/common/xf86DefModes.c deleted file mode 100644 index bdb64fe8e..000000000 --- a/hw/xfree86/common/xf86DefModes.c +++ /dev/null @@ -1,155 +0,0 @@ -/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at - * modeline2c.pl */ - -/* - * Copyright 1999-2003 by The XFree86 Project, Inc. - * - * Author: Dirk Hohndel - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include "xf86.h" -#include "xf86Config.h" -#include "xf86Priv.h" -#include "xf86_OSlib.h" - -#include "globals.h" - -#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT -#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0 - -DisplayModeRec xf86DefaultModes [] = { -/* 640x350 @ 85Hz (VESA) hsync: 37.9kHz */ - {MODEPREFIX("640x350"),31500, 640,672,736,832,0, 350,382,385,445,0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("320x175"),15750, 320,336,368,416,0, 175,191,192,222,0, V_PHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 640x400 @ 85Hz (VESA) hsync: 37.9kHz */ - {MODEPREFIX("640x400"),31500, 640,672,736,832,0, 400,401,404,445,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("320x200"),15750, 320,336,368,416,0, 200,200,202,222,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 720x400 @ 85Hz (VESA) hsync: 37.9kHz */ - {MODEPREFIX("720x400"),35500, 720,756,828,936,0, 400,401,404,446,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("360x200"),17750, 360,378,414,468,0, 200,200,202,223,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz */ - {MODEPREFIX("640x480"),25200, 640,656,752,800,0, 480,490,492,525,0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("320x240"),12600, 320,328,376,400,0, 240,245,246,262,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 640x480 @ 72Hz (VESA) hsync: 37.9kHz */ - {MODEPREFIX("640x480"),31500, 640,664,704,832,0, 480,489,491,520,0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("320x240"),15750, 320,332,352,416,0, 240,244,245,260,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 640x480 @ 75Hz (VESA) hsync: 37.5kHz */ - {MODEPREFIX("640x480"),31500, 640,656,720,840,0, 480,481,484,500,0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("320x240"),15750, 320,328,360,420,0, 240,240,242,250,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 640x480 @ 85Hz (VESA) hsync: 43.3kHz */ - {MODEPREFIX("640x480"),36000, 640,696,752,832,0, 480,481,484,509,0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("320x240"),18000, 320,348,376,416,0, 240,240,242,254,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 800x600 @ 56Hz (VESA) hsync: 35.2kHz */ - {MODEPREFIX("800x600"),36000, 800,824,896,1024,0, 600,601,603,625,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("400x300"),18000, 400,412,448,512,0, 300,300,301,312,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 800x600 @ 60Hz (VESA) hsync: 37.9kHz */ - {MODEPREFIX("800x600"),40000, 800,840,968,1056,0, 600,601,605,628,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("400x300"),20000, 400,420,484,528,0, 300,300,302,314,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 800x600 @ 72Hz (VESA) hsync: 48.1kHz */ - {MODEPREFIX("800x600"),50000, 800,856,976,1040,0, 600,637,643,666,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("400x300"),25000, 400,428,488,520,0, 300,318,321,333,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 800x600 @ 75Hz (VESA) hsync: 46.9kHz */ - {MODEPREFIX("800x600"),49500, 800,816,896,1056,0, 600,601,604,625,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("400x300"),24750, 400,408,448,528,0, 300,300,302,312,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 800x600 @ 85Hz (VESA) hsync: 53.7kHz */ - {MODEPREFIX("800x600"),56300, 800,832,896,1048,0, 600,601,604,631,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("400x300"),28150, 400,416,448,524,0, 300,300,302,315,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz */ - {MODEPREFIX("1024x768"),44900, 1024,1032,1208,1264,0, 768,768,776,817,0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX}, - {MODEPREFIX("512x384"),22450, 512,516,604,632,0, 384,384,388,408,0, V_PHSYNC | V_PVSYNC | V_INTERLACE | V_DBLSCAN, MODESUFFIX}, -/* 1024x768 @ 60Hz (VESA) hsync: 48.4kHz */ - {MODEPREFIX("1024x768"),65000, 1024,1048,1184,1344,0, 768,771,777,806,0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("512x384"),32500, 512,524,592,672,0, 384,385,388,403,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1024x768 @ 70Hz (VESA) hsync: 56.5kHz */ - {MODEPREFIX("1024x768"),75000, 1024,1048,1184,1328,0, 768,771,777,806,0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("512x384"),37500, 512,524,592,664,0, 384,385,388,403,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1024x768 @ 75Hz (VESA) hsync: 60.0kHz */ - {MODEPREFIX("1024x768"),78800, 1024,1040,1136,1312,0, 768,769,772,800,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("512x384"),39400, 512,520,568,656,0, 384,384,386,400,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1024x768 @ 85Hz (VESA) hsync: 68.7kHz */ - {MODEPREFIX("1024x768"),94500, 1024,1072,1168,1376,0, 768,769,772,808,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("512x384"),47250, 512,536,584,688,0, 384,384,386,404,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1152x864 @ 75Hz (VESA) hsync: 67.5kHz */ - {MODEPREFIX("1152x864"),108000, 1152,1216,1344,1600,0, 864,865,868,900,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("576x432"),54000, 576,608,672,800,0, 432,432,434,450,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1280x960 @ 60Hz (VESA) hsync: 60.0kHz */ - {MODEPREFIX("1280x960"),108000, 1280,1376,1488,1800,0, 960,961,964,1000,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("640x480"),54000, 640,688,744,900,0, 480,480,482,500,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1280x960 @ 85Hz (VESA) hsync: 85.9kHz */ - {MODEPREFIX("1280x960"),148500, 1280,1344,1504,1728,0, 960,961,964,1011,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("640x480"),74250, 640,672,752,864,0, 480,480,482,505,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz */ - {MODEPREFIX("1280x1024"),108000, 1280,1328,1440,1688,0, 1024,1025,1028,1066,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("640x512"),54000, 640,664,720,844,0, 512,512,514,533,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1280x1024 @ 75Hz (VESA) hsync: 80.0kHz */ - {MODEPREFIX("1280x1024"),135000, 1280,1296,1440,1688,0, 1024,1025,1028,1066,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("640x512"),67500, 640,648,720,844,0, 512,512,514,533,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1280x1024 @ 85Hz (VESA) hsync: 91.1kHz */ - {MODEPREFIX("1280x1024"),157500, 1280,1344,1504,1728,0, 1024,1025,1028,1072,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("640x512"),78750, 640,672,752,864,0, 512,512,514,536,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz */ - {MODEPREFIX("1600x1200"),162000, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("800x600"),81000, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz */ - {MODEPREFIX("1600x1200"),175500, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("800x600"),87750, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1600x1200 @ 70Hz (VESA) hsync: 87.5kHz */ - {MODEPREFIX("1600x1200"),189000, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("800x600"),94500, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1600x1200 @ 75Hz (VESA) hsync: 93.8kHz */ - {MODEPREFIX("1600x1200"),202500, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("800x600"),101250, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1600x1200 @ 85Hz (VESA) hsync: 106.3kHz */ - {MODEPREFIX("1600x1200"),229500, 1600,1664,1856,2160,0, 1200,1201,1204,1250,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("800x600"),114750, 800,832,928,1080,0, 600,600,602,625,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz */ - {MODEPREFIX("1792x1344"),204800, 1792,1920,2120,2448,0, 1344,1345,1348,1394,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("896x672"),102400, 896,960,1060,1224,0, 672,672,674,697,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1792x1344 @ 75Hz (VESA) hsync: 106.3kHz */ - {MODEPREFIX("1792x1344"),261000, 1792,1888,2104,2456,0, 1344,1345,1348,1417,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("896x672"),130500, 896,944,1052,1228,0, 672,672,674,708,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz */ - {MODEPREFIX("1856x1392"),218300, 1856,1952,2176,2528,0, 1392,1393,1396,1439,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("928x696"),109150, 928,976,1088,1264,0, 696,696,698,719,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1856x1392 @ 75Hz (VESA) hsync: 112.5kHz */ - {MODEPREFIX("1856x1392"),288000, 1856,1984,2208,2560,0, 1392,1393,1396,1500,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("928x696"),144000, 928,992,1104,1280,0, 696,696,698,750,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz */ - {MODEPREFIX("1920x1440"),234000, 1920,2048,2256,2600,0, 1440,1441,1444,1500,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("960x720"),117000, 960,1024,1128,1300,0, 720,720,722,750,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1920x1440 @ 75Hz (VESA) hsync: 112.5kHz */ - {MODEPREFIX("1920x1440"),297000, 1920,2064,2288,2640,0, 1440,1441,1444,1500,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("960x720"),148500, 960,1032,1144,1320,0, 720,720,722,750,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz */ - {MODEPREFIX("832x624"),57284, 832,864,928,1152,0, 624,625,628,667,0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("416x312"),28642, 416,432,464,576,0, 312,312,314,333,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1152x768 @ 54.8Hz (Titanium PowerBook) hsync: 44.2kHz */ - {MODEPREFIX("1152x768"),64995, 1152,1178,1314,1472,0, 768,771,777,806,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("576x384"),32497, 576,589,657,736,0, 384,385,388,403,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz */ - {MODEPREFIX("1400x1050"),122000, 1400,1488,1640,1880,0, 1050,1052,1064,1082,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("700x525"),61000, 700,744,820,940,0, 525,526,532,541,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz */ - {MODEPREFIX("1400x1050"),155800, 1400,1464,1784,1912,0, 1050,1052,1064,1090,0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("700x525"),77900, 700,732,892,956,0, 525,526,532,545,0, V_PHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1600x1024 @ 60Hz (SGI 1600SW) hsync: 64.0kHz */ - {MODEPREFIX("1600x1024"),106910, 1600,1620,1640,1670,0, 1024,1027,1030,1067,0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, - {MODEPREFIX("800x512"),53455, 800,810,820,835,0, 512,513,515,533,0, V_NHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz */ - {MODEPREFIX("1920x1440"),341350, 1920,2072,2288,2656,0, 1440,1441,1444,1512,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("960x720"),170675, 960,1036,1144,1328,0, 720,720,722,756,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 2048x1536 @ 60Hz (VESA GTF) hsync: 95.3kHz */ - {MODEPREFIX("2048x1536"),266950, 2048,2200,2424,2800,0, 1536,1537,1540,1589,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("1024x768"),133475, 1024,1100,1212,1400,0, 768,768,770,794,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 2048x1536 @ 75Hz (VESA GTF) hsync: 120.2kHz */ - {MODEPREFIX("2048x1536"),340480, 2048,2216,2440,2832,0, 1536,1537,1540,1603,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("1024x768"),170240, 1024,1108,1220,1416,0, 768,768,770,801,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, -/* 2048x1536 @ 85Hz (VESA GTF) hsync: 137.0kHz */ - {MODEPREFIX("2048x1536"),388040, 2048,2216,2440,2832,0, 1536,1537,1540,1612,0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, - {MODEPREFIX("1024x768"),194020, 1024,1108,1220,1416,0, 768,768,770,806,0, V_NHSYNC | V_PVSYNC | V_DBLSCAN, MODESUFFIX}, - {MODEPREFIX(NULL),0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX} -}; From a125ce4a84f5fb5934fefebd7cfb22a83180874d Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Wed, 12 Dec 2007 12:20:54 -0800 Subject: [PATCH 299/552] Fix dist by including modeline2c.awk. This was broken by commit cb44b6121c4b7b9dd7ff4ff52aaab914c82ff013, which removed modeline2c.pl from EXTRA_DIST without adding modeline2c.awk. --- hw/xfree86/common/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index a29101bd5..c060b73f0 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -86,6 +86,7 @@ EXTRA_DIST = \ xorgVersion.h \ xf86Date.h \ $(MODEDEFSOURCES) \ + modeline2c.awk \ $(DISTKBDSOURCES) if LNXACPI From 9a7ce573636e349ee2967991c7cc1407e80ae524 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 12 Dec 2007 20:44:59 -0500 Subject: [PATCH 300/552] xselinux: Add new protocol for setting device create context. --- Xext/xselinux.c | 32 ++++++++++++++++++++++++++++++++ Xext/xselinux.h | 18 ++++++++++-------- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 8f52c1e7d..bbae483a8 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1051,6 +1051,18 @@ ProcSELinuxGetSelectionManager(ClientPtr client) return (client->noClientException); } +static int +ProcSELinuxSetDeviceCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetDeviceCreateContext(ClientPtr client) +{ + return Success; +} + static int ProcSELinuxSetDeviceContext(ClientPtr client) { @@ -1134,6 +1146,10 @@ ProcSELinuxDispatch(ClientPtr client) return ProcSELinuxSetSelectionManager(client); case X_SELinuxGetSelectionManager: return ProcSELinuxGetSelectionManager(client); + case X_SELinuxSetDeviceCreateContext: + return ProcSELinuxSetDeviceCreateContext(client); + case X_SELinuxGetDeviceCreateContext: + return ProcSELinuxGetDeviceCreateContext(client); case X_SELinuxSetDeviceContext: return ProcSELinuxSetDeviceContext(client); case X_SELinuxGetDeviceContext: @@ -1184,6 +1200,18 @@ SProcSELinuxGetSelectionManager(ClientPtr client) return ProcSELinuxGetSelectionManager(client); } +static int +SProcSELinuxSetDeviceCreateContext(ClientPtr client) +{ + return ProcSELinuxSetDeviceCreateContext(client); +} + +static int +SProcSELinuxGetDeviceCreateContext(ClientPtr client) +{ + return ProcSELinuxGetDeviceCreateContext(client); +} + static int SProcSELinuxSetDeviceContext(ClientPtr client) { @@ -1247,6 +1275,10 @@ SProcSELinuxDispatch(ClientPtr client) return SProcSELinuxSetSelectionManager(client); case X_SELinuxGetSelectionManager: return SProcSELinuxGetSelectionManager(client); + case X_SELinuxSetDeviceCreateContext: + return SProcSELinuxSetDeviceCreateContext(client); + case X_SELinuxGetDeviceCreateContext: + return SProcSELinuxGetDeviceCreateContext(client); case X_SELinuxSetDeviceContext: return SProcSELinuxSetDeviceContext(client); case X_SELinuxGetDeviceContext: diff --git a/Xext/xselinux.h b/Xext/xselinux.h index ea8d9e440..ebcc4aae0 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -33,14 +33,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define X_SELinuxQueryVersion 0 #define X_SELinuxSetSelectionManager 1 #define X_SELinuxGetSelectionManager 2 -#define X_SELinuxSetDeviceContext 3 -#define X_SELinuxGetDeviceContext 4 -#define X_SELinuxSetPropertyCreateContext 5 -#define X_SELinuxGetPropertyCreateContext 6 -#define X_SELinuxGetPropertyContext 7 -#define X_SELinuxSetWindowCreateContext 8 -#define X_SELinuxGetWindowCreateContext 9 -#define X_SELinuxGetWindowContext 10 +#define X_SELinuxSetDeviceCreateContext 3 +#define X_SELinuxGetDeviceCreateContext 4 +#define X_SELinuxSetDeviceContext 5 +#define X_SELinuxGetDeviceContext 6 +#define X_SELinuxSetPropertyCreateContext 7 +#define X_SELinuxGetPropertyCreateContext 8 +#define X_SELinuxGetPropertyContext 9 +#define X_SELinuxSetWindowCreateContext 10 +#define X_SELinuxGetWindowCreateContext 11 +#define X_SELinuxGetWindowContext 12 typedef struct { CARD8 reqType; From 8cedbb0a53d47b12f03edb726db9d5879c8a63a4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 13 Dec 2007 10:57:35 -0500 Subject: [PATCH 301/552] Clean up some #if 0. --- hw/xfree86/common/xf86Mode.c | 46 ------------------------------------ 1 file changed, 46 deletions(-) diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index 7fcce10b1..544276bdf 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -368,52 +368,6 @@ xf86HandleBuiltinMode(ScrnInfoPtr scrp, return MODE_OK; } -#if 0 -/** Calculates the horizontal sync rate of a mode */ -_X_EXPORT double -xf86ModeHSync(DisplayModePtr mode) -{ - double hsync = 0.0; - - if (mode->HSync > 0.0) - hsync = mode->HSync; - else if (mode->HTotal > 0) - hsync = (float)mode->Clock / (float)mode->HTotal; - - return hsync; -} - -/** Calculates the vertical refresh rate of a mode */ -_X_EXPORT double -xf86ModeVRefresh(DisplayModePtr mode) -{ - double refresh = 0.0; - - if (mode->VRefresh > 0.0) - refresh = mode->VRefresh; - else if (mode->HTotal > 0 && mode->VTotal > 0) { - refresh = mode->Clock * 1000.0 / mode->HTotal / mode->VTotal; - if (mode->Flags & V_INTERLACE) - refresh *= 2.0; - if (mode->Flags & V_DBLSCAN) - refresh /= 2.0; - if (mode->VScan > 1) - refresh /= (float)(mode->VScan); - } - return refresh; -} - -/** Sets a default mode name of x on a mode. */ -_X_EXPORT void -xf86SetModeDefaultName(DisplayModePtr mode) -{ - if (mode->name != NULL) - xfree(mode->name); - - mode->name = XNFprintf("%dx%d", mode->HDisplay, mode->VDisplay); -} -#endif - /* * xf86LookupMode * From 4359193aaa522599c502d012b9c163e993c01d79 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 13 Dec 2007 10:59:48 -0500 Subject: [PATCH 302/552] Explain a confusing #ifdef. --- hw/xfree86/modes/xf86Modes.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 3879b9103..12ee6e05b 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -38,12 +38,14 @@ extern XF86ConfigPtr xf86configptr; -/** - * @file this file contains symbols from xf86Mode.c and friends that are static - * there but we still want to use. We need to come up with better API here. +/* + * This is the version number where we epoched. These files get copied + * into drivers that want to use this setup infrastructure on pre-1.3 + * servers, so when that happens they need to define these symbols + * themselves. However, _in_ the server, we basically always define them now. */ - #if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(7,2,99,2,0) + /** * Calculates the horizontal sync rate of a mode. * From 1768af38c737f4c14d32f587b51a8ec3d3d6ed5f Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 13 Dec 2007 15:06:18 -0500 Subject: [PATCH 303/552] Add infrastructure for validating modes by memory bandwidth. --- hw/xfree86/common/xf86Mode.c | 2 ++ hw/xfree86/common/xf86str.h | 1 + hw/xfree86/modes/xf86Modes.c | 37 ++++++++++++++++++++++++++++++++++++ hw/xfree86/modes/xf86Modes.h | 5 +++++ 4 files changed, 45 insertions(+) diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index 544276bdf..782f08b8d 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -183,6 +183,8 @@ xf86ModeStatusToString(ModeStatus status) return "all modes must have the same resolution"; case MODE_NO_REDUCED: return "monitor doesn't support reduced blanking"; + case MODE_BANDWIDTH: + return "mode requires too much memory bandwidth"; case MODE_BAD: return "unknown reason"; case MODE_ERROR: diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index af98b4fd5..2e0213597 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -125,6 +125,7 @@ typedef enum { MODE_ONE_HEIGHT, /* only one height is supported */ MODE_ONE_SIZE, /* only one resolution is supported */ MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */ + MODE_BANDWIDTH, /* mode requires too much memory bandwidth */ MODE_BAD = -2, /* unspecified reason */ MODE_ERROR = -1 /* error condition */ } ModeStatus; diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 12ee6e05b..3febd3759 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -118,6 +118,24 @@ xf86ModeHeight (DisplayModePtr mode, Rotation rotation) } } +/** Calculates the memory bandwidth (in MiB/sec) of a mode. */ +_X_EXPORT unsigned int +xf86ModeBandwidth(DisplayModePtr mode, int depth) +{ + float a_active, a_total, active_percent, pixels_per_second; + int bytes_per_pixel = (depth + 7) / 8; + + if (!mode->HTotal || !mode->VTotal || !mode->Clock) + return 0; + + a_active = mode->HDisplay * mode->VDisplay; + a_total = mode->HTotal * mode->VTotal; + active_percent = a_active / a_total; + pixels_per_second = active_percent * mode->Clock * 1000.0; + + return (unsigned int)(pixels_per_second * bytes_per_pixel / (1024 * 1024)); +} + /** Sets a default mode name of x on a mode. */ _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode) @@ -485,6 +503,25 @@ xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList) } +/** + * Marks as bad any modes exceeding the given bandwidth. + * + * \param modeList doubly-linked or circular list of modes. + * \param bandwidth bandwidth in MHz. + * \param depth color depth. + */ +_X_EXPORT void +xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, + unsigned int bandwidth, int depth) +{ + DisplayModePtr mode; + + for (mode = modeList; mode != NULL; mode = mode->next) { + if (xf86ModeBandwidth(mode, depth) > bandwidth) + mode->status = MODE_BANDWIDTH; + } +} + /** * Frees any modes from the list with a status other than MODE_OK. * diff --git a/hw/xfree86/modes/xf86Modes.h b/hw/xfree86/modes/xf86Modes.h index 3722d25a0..9ad5ee653 100644 --- a/hw/xfree86/modes/xf86Modes.h +++ b/hw/xfree86/modes/xf86Modes.h @@ -42,6 +42,7 @@ double xf86ModeHSync(DisplayModePtr mode); double xf86ModeVRefresh(DisplayModePtr mode); +unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth); int xf86ModeWidth (DisplayModePtr mode, Rotation rotation); @@ -78,6 +79,10 @@ void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon); +void +xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, + unsigned int bandwidth, int depth); + void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, Bool verbose); From efcdc0d7010f4e6ec833842cb010a07068edf7ab Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 13 Dec 2007 15:38:41 -0500 Subject: [PATCH 304/552] Correct the documentation comments in xf86Modes.c Most of those functions do not, in fact, work with circular mode lists, and by this point the API isn't really "proposed" anymore. --- hw/xfree86/modes/xf86Modes.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c index 3febd3759..3d222cc73 100644 --- a/hw/xfree86/modes/xf86Modes.c +++ b/hw/xfree86/modes/xf86Modes.c @@ -339,12 +339,10 @@ xf86PrintModeline(int scrnIndex,DisplayModePtr mode) /** * Marks as bad any modes with unsupported flags. * - * \param modeList doubly-linked or circular list of modes. + * \param modeList doubly-linked list of modes. * \param flags flags supported by the driver. * * \bug only V_INTERLACE and V_DBLSCAN are supported. Is that enough? - * - * This is not in xf86Modes.c, but would be part of the proposed new API. */ _X_EXPORT void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, @@ -363,9 +361,7 @@ xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, /** * Marks as bad any modes extending beyond the given max X, Y, or pitch. * - * \param modeList doubly-linked or circular list of modes. - * - * This is not in xf86Modes.c, but would be part of the proposed new API. + * \param modeList doubly-linked list of modes. */ _X_EXPORT void xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, @@ -392,9 +388,7 @@ xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, * Marks as bad any modes that aren't supported by the given monitor's * hsync and vrefresh ranges. * - * \param modeList doubly-linked or circular list of modes. - * - * This is not in xf86Modes.c, but would be part of the proposed new API. + * \param modeList doubly-linked list of modes. */ _X_EXPORT void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, @@ -436,12 +430,10 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, /** * Marks as bad any modes extending beyond outside of the given clock ranges. * - * \param modeList doubly-linked or circular list of modes. + * \param modeList doubly-linked list of modes. * \param min pointer to minimums of clock ranges * \param max pointer to maximums of clock ranges * \param n_ranges number of ranges. - * - * This is not in xf86Modes.c, but would be part of the proposed new API. */ _X_EXPORT void xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, @@ -474,9 +466,7 @@ xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, * * MODE_BAD is used as the rejection flag, for lack of a better flag. * - * \param modeList doubly-linked or circular list of modes. - * - * This is not in xf86Modes.c, but would be part of the proposed new API. + * \param modeList doubly-linked list of modes. */ _X_EXPORT void xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList) @@ -506,7 +496,7 @@ xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList) /** * Marks as bad any modes exceeding the given bandwidth. * - * \param modeList doubly-linked or circular list of modes. + * \param modeList doubly-linked list of modes. * \param bandwidth bandwidth in MHz. * \param depth color depth. */ @@ -528,8 +518,6 @@ xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, * \param modeList pointer to a doubly-linked or circular list of modes. * \param verbose determines whether the reason for mode invalidation is * printed. - * - * This is not in xf86Modes.c, but would be part of the proposed new API. */ _X_EXPORT void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, From 1a5910588a60af0c136595e2457d897d9e54ac88 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 13 Dec 2007 15:55:28 -0800 Subject: [PATCH 305/552] created x11-exec wrapper, which uses LaunchServices to find (and then exec) X11.app (cherry picked from commit fc04c9759b30d062111d4a7f3f411ed0f18cbde4) --- hw/xquartz/Makefile.am | 4 +++ hw/xquartz/x11-exec.c | 74 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 hw/xquartz/x11-exec.c diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 831ba49f4..612a7d81f 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -1,3 +1,7 @@ +libexec_PROGRAMS = x11-exec + +x11_exec_LDFLAGS = -framework ApplicationServices + noinst_LTLIBRARIES = libXquartz.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ diff --git a/hw/xquartz/x11-exec.c b/hw/xquartz/x11-exec.c new file mode 100644 index 000000000..d0b5c491a --- /dev/null +++ b/hw/xquartz/x11-exec.c @@ -0,0 +1,74 @@ +/* x11-exec.c -- Find X11.app by bundle-id and exec it. This is so launchd + can correctly find X11.app, even if the user moved it. + + Copyright (c) 2007 Apple, Inc. + + 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, sublicense, 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 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 + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) 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. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. */ + +#include +#include + +#define kX11AppBundleId "org.x.X11" +#define kX11AppBundlePath "/Contents/MacOS/X11" + +int main(int argc, char **argv) { + char x11_path[PATH_MAX]; + CFURLRef appURL = NULL; + OSStatus osstatus = + LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), + nil, nil, &appURL); + + switch (osstatus) { + case noErr: + if (appURL == NULL) { + fprintf(stderr, "%s: Invalid response from LSFindApplicationForInfo(%s)\n", + argv[0], kX11AppBundleId); + exit(1); + } + if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) { + fprintf(stderr, "%s: Error resolving URL for %s\n", argv[0], kX11AppBundleId); + exit(2); + } + strlcpy(argv[0], "X11", strlen(argv[0])+1); + strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path)); +// fprintf(stderr, "X11.app = %s\n", x11_path); + execv(x11_path, argv); + fprintf(stderr, "Error executing X11.app (%s):", x11_path); + perror(NULL); + exit(3); + break; + case kLSApplicationNotFoundErr: + fprintf(stderr, "%s: Unable to find application for %s\n", argv[0], kX11AppBundleId); + exit(4); + default: + fprintf(stderr, "%s: Unable to find application for %s, error code = %d\n", + argv[0], kX11AppBundleId, osstatus); + exit(5); + } + /* not reached */ +} + + From 82e1aff9fbc1d15e3451707e3ccbf4b13eedda94 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 13 Dec 2007 15:57:39 -0800 Subject: [PATCH 306/552] Modified X11 plist to use x11-exec (cherry picked from commit 7d9a11329e476f45e4d9f9aebcb43469321347c7) --- .gitignore | 1 - hw/xquartz/bundle/{org.x.X11.plist.in => org.x.X11.plist} | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) rename hw/xquartz/bundle/{org.x.X11.plist.in => org.x.X11.plist} (87%) diff --git a/.gitignore b/.gitignore index 37f35f46f..2e60d58b1 100644 --- a/.gitignore +++ b/.gitignore @@ -275,7 +275,6 @@ hw/xprint/doc/Xprt.1x hw/xprint/doc/Xprt.man hw/xprint/dpmsstubs-wrapper.c hw/xprint/miinitext-wrapper.c -hw/xquartz/bundle/org.x.X11.plist include/dix-config.h include/kdrive-config.h include/xgl-config.h diff --git a/hw/xquartz/bundle/org.x.X11.plist.in b/hw/xquartz/bundle/org.x.X11.plist similarity index 87% rename from hw/xquartz/bundle/org.x.X11.plist.in rename to hw/xquartz/bundle/org.x.X11.plist index 26eca968a..1e646ac63 100644 --- a/hw/xquartz/bundle/org.x.X11.plist.in +++ b/hw/xquartz/bundle/org.x.X11.plist @@ -6,7 +6,7 @@ org.x.X11 ProgramArguments - @APPLE_APPLICATIONS_DIR@/X11.app/Contents/MacOS/X11 + /usr/libexec/x11-exec -launchd Sockets From c39212fd7353fc1a07a30bade90f78356c748e2d Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 13 Dec 2007 15:56:31 -0800 Subject: [PATCH 307/552] Xquartz: Don't hardcode LaunchAgents dir (cherry picked from commit 07a12d71fefd78c380078efa835700f2868ab204) --- configure.ac | 78 +++++------------------------------ hw/xquartz/bundle/Makefile.am | 4 +- 2 files changed, 13 insertions(+), 69 deletions(-) diff --git a/configure.ac b/configure.ac index b56c11583..cb3152486 100644 --- a/configure.ac +++ b/configure.ac @@ -478,17 +478,15 @@ AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], [Path to server config (default: ${libdir}/xserver)]), [ SERVERCONFIG="$withval" ], [ SERVERCONFIG="${libdir}/xserver" ]) -APPLE_APPLICATIONS_DIR="/Applications/Utilities" AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: /Applications/Utilities)]), - [ APPLE_APPLICATIONS_DIR="${withval}" ]. + [ APPLE_APPLICATIONS_DIR="${withval}" ], [ APPLE_APPLICATIONS_DIR="/Applications/Utilities" ]) - +AC_SUBST([APPLE_APPLICATIONS_DIR]) AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto]) - -AC_ARG_WITH(pci-txt-ids-dir, AS_HELP_STRING([--with-pci-txt-ids-dir=PATH], -[Path to pci id directory (default: ${datadir}/X11/pci)]), - [ PCI_TXT_IDS_DIR="$withval" ], - [ PCI_TXT_IDS_DIR="${datadir}/X11/pci" ]) +AC_ARG_WITH(launchagents-dir,AS_HELP_STRING([--with-launchagents-dir=PATH], [Path to launchd's LaunchAgents directory (default: /Library/LaunchAgents)]), + [ launchagentsdir="${withval}" ], + [ launchagentsdir="/Library/LaunchAgents" ]) +AC_SUBST([launchagentsdir]) AC_ARG_ENABLE(builddocs, AS_HELP_STRING([--enable-builddocs], [Build docs (default: disabled)]), [BUILDDOCS=$enableval], [BUILDDOCS=no]) @@ -1709,7 +1707,6 @@ if test "x$XQUARTZ" = xyes; then DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB" AC_SUBST([DARWIN_LIBS]) AC_CHECK_LIB([Xplugin],[xp_init],[:]) - AC_SUBST([APPLE_APPLICATIONS_DIR]) CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DNO_ALLOCA" if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then AC_MSG_NOTICE([Disabling XF86Misc extension]) @@ -1759,73 +1756,20 @@ if test "x$X11APP" = xauto; then fi AM_CONDITIONAL(X11APP,[test "X$X11APP" = Xyes]) -if test "x$LAUNCHD" = xauto; then - # Do we want to have this default to on for Xquartz builds only or any time we have launchd (like Xnest or Xvfb on OS-X) - #AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) - AC_MSG_CHECKING([whether to support launchd]) - if test "x$XQUARTZ" = xyes ; then +if test "x$LAUNCHD" = "xauto"; then + if test "x$XQUARTZ" = "xyes" ; then LAUNCHD=yes else - LAUNCHD=no + AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) fi - AC_MSG_RESULT([$LAUNCHD]) -fi -AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = xyes]) - -dnl DMX DDX - -AC_MSG_CHECKING([whether to build Xdmx DDX]) -PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no]) -if test "x$DMX" = xauto; then - DMX="$have_dmx" fi AC_MSG_RESULT([$DMX]) AM_CONDITIONAL(DMX, [test "x$DMX" = xyes]) -if test "x$DMX" = xyes; then - if test "x$have_dmx" = xno; then - AC_MSG_ERROR([Xdmx build explicitly requested, but required - modules not found.]) - fi - DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" - XDMX_CFLAGS="$DMXMODULES_CFLAGS" - XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB" - XDMX_SYS_LIBS="$DMXMODULES_LIBS" - AC_SUBST([XDMX_CFLAGS]) - AC_SUBST([XDMX_LIBS]) - AC_SUBST([XDMX_SYS_LIBS]) - -dnl USB sources in DMX require - AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes", - DMX_BUILD_USB="no") -dnl Linux sources in DMX require - AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes", - DMX_BUILD_LNX="no") - if test "x$GLX" = xyes; then - PKG_CHECK_MODULES([GL], [glproto]) - fi - PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11]) - AC_SUBST(XDMXCONFIG_DEP_CFLAGS) - AC_SUBST(XDMXCONFIG_DEP_LIBS) - PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx xext x11]) - AC_SUBST(DMXEXAMPLES_DEP_LIBS) - PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [dmx xmu xext x11]) - AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS) - PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx xi xext x11]) - AC_SUBST(DMXXIEXAMPLES_DEP_LIBS) - PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [xtst xext x11]) - AC_SUBST(XTSTEXAMPLES_DEP_LIBS) - PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres xext x11]) - AC_SUBST(XRESEXAMPLES_DEP_LIBS) - PKG_CHECK_MODULES([X11EXAMPLES_DEP], [xext x11]) - AC_SUBST(X11EXAMPLES_DEP_LIBS) -fi -AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes]) -AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes]) -if test "x$LAUNCHD" = xyes ; then +if test "x$LAUNCHD" = "xyes" ; then AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) fi -AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = xyes]) +AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) dnl kdrive DDX diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 573443497..8aa23575f 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -7,9 +7,9 @@ x11app: install-data-hook: xcodebuild install DSTROOT="/$(DESTDIR)" INSTALL_PATH="$(APPLE_APPLICATIONS_DIR)" DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" + if LAUNCHD - $(MKDIR_P) "$(DESTDIR)/System/Library/LaunchAgents/" - $(INSTALL) org.x.X11.plist "$(DESTDIR)/System/Library/LaunchAgents/" +launchagents_DATA = org.x.X11.plist endif clean-local: From cb0d7e2c2692a332e2bd5495478ebf9a6cd601d0 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 13 Dec 2007 16:23:46 -0800 Subject: [PATCH 308/552] Xquartz: Don't hardcode libexec dir (cherry picked from commit 67b479ef80cb740a24981335eb8d596744168a62) --- configure.ac | 1 - hw/xquartz/Makefile.am | 10 ++++++---- hw/xquartz/bundle/Makefile.am | 9 ++++++++- .../bundle/{org.x.X11.plist => org.x.X11.plist.pre} | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) rename hw/xquartz/bundle/{org.x.X11.plist => org.x.X11.plist.pre} (91%) diff --git a/configure.ac b/configure.ac index cb3152486..090a0f5cc 100644 --- a/configure.ac +++ b/configure.ac @@ -2118,7 +2118,6 @@ hw/xnest/Makefile hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/bundle/Makefile -hw/xquartz/bundle/org.x.X11.plist hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 612a7d81f..97b8c94e0 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -1,7 +1,3 @@ -libexec_PROGRAMS = x11-exec - -x11_exec_LDFLAGS = -framework ApplicationServices - noinst_LTLIBRARIES = libXquartz.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ @@ -13,6 +9,12 @@ AM_CPPFLAGS = \ if X11APP X11APP_SUBDIRS = bundle + +if LAUNCHD +libexec_PROGRAMS = x11-exec +x11_exec_LDFLAGS = -framework ApplicationServices +endif + endif SUBDIRS = . xpr $(X11APP_SUBDIRS) diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 8aa23575f..775e1aad0 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -9,7 +9,14 @@ install-data-hook: xcodebuild install DSTROOT="/$(DESTDIR)" INSTALL_PATH="$(APPLE_APPLICATIONS_DIR)" DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" if LAUNCHD -launchagents_DATA = org.x.X11.plist +launchagents_PRE = org.x.X11.plist.pre +launchagents_DATA = $(launchagents_PRE:plist.pre=plist) + +CPP_FILES_FLAGS = -D__libexecdir__="${libexecdir}" + +CLEANFILES = $(launchagents_DATA) + +include $(top_srcdir)/cpprules.in endif clean-local: diff --git a/hw/xquartz/bundle/org.x.X11.plist b/hw/xquartz/bundle/org.x.X11.plist.pre similarity index 91% rename from hw/xquartz/bundle/org.x.X11.plist rename to hw/xquartz/bundle/org.x.X11.plist.pre index 1e646ac63..83d8b2f31 100644 --- a/hw/xquartz/bundle/org.x.X11.plist +++ b/hw/xquartz/bundle/org.x.X11.plist.pre @@ -6,7 +6,7 @@ org.x.X11 ProgramArguments - /usr/libexec/x11-exec + __libexecdir__/x11-exec -launchd Sockets From 1c1a4bc970be061484bb8dcccf945eb08144c656 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 13 Dec 2007 19:51:40 -0500 Subject: [PATCH 309/552] devPrivates rework: more cleanup from previous merge operation. --- hw/kdrive/ephyr/ephyrdriext.c | 43 +++++++++-------------------------- hw/kdrive/src/kdrive.c | 15 ++++++------ hw/kdrive/src/kxv.c | 10 +++++--- hw/xquartz/darwin.c | 9 +------- 4 files changed, 26 insertions(+), 51 deletions(-) diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index e3d0cfbb4..b6be47f5e 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -44,6 +44,7 @@ #include #include #include "misc.h" +#include "privates.h" #include "dixstruct.h" #include "extnsionst.h" #include "colormapst.h" @@ -118,14 +119,13 @@ static Bool findWindowPairFromLocal (WindowPtr a_local, static unsigned char DRIReqCode = 0; -static int ephyrDRIGeneration=-1 ; -static int ephyrDRIWindowIndex=-1 ; -static int ephyrDRIScreenIndex=-1 ; +static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKey; +static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKey; -#define GET_EPHYR_DRI_WINDOW_PRIV(win) \ - ((EphyrDRIWindowPrivPtr)((win)->devPrivates[ephyrDRIWindowIndex].ptr)) -#define GET_EPHYR_DRI_SCREEN_PRIV(screen) \ - ((EphyrDRIScreenPrivPtr)((screen)->devPrivates[ephyrDRIScreenIndex].ptr)) +#define GET_EPHYR_DRI_WINDOW_PRIV(win) ((EphyrDRIWindowPrivPtr) \ + dixLookupPrivate(&(win)->devPrivates, ephyrDRIWindowKey)) +#define GET_EPHYR_DRI_SCREEN_PRIV(screen) ((EphyrDRIScreenPrivPtr) \ + dixLookupPrivate(&(screen)->devPrivates, ephyrDRIScreenKey)) Bool @@ -164,28 +164,18 @@ ephyrDRIExtensionInit (ScreenPtr a_screen) EPHYR_LOG_ERROR ("failed to register DRI extension\n") ; goto out ; } - if (ephyrDRIGeneration != serverGeneration) { - ephyrDRIScreenIndex = AllocateScreenPrivateIndex () ; - if (ephyrDRIScreenIndex < 0) { - EPHYR_LOG_ERROR ("failed to allocate screen priv index\n") ; - goto out ; - } - } screen_priv = xcalloc (1, sizeof (EphyrDRIScreenPrivRec)) ; if (!screen_priv) { EPHYR_LOG_ERROR ("failed to allocate screen_priv\n") ; goto out ; } - a_screen->devPrivates[ephyrDRIScreenIndex].ptr = screen_priv; + dixSetPrivate(&a_screen->devPrivates, ephyrDRIScreenKey, screen_priv); if (!ephyrDRIScreenInit (a_screen)) { EPHYR_LOG_ERROR ("ephyrDRIScreenInit() failed\n") ; goto out ; } EphyrMirrorHostVisuals (a_screen) ; - if (ephyrDRIGeneration != serverGeneration) { - ephyrDRIGeneration = serverGeneration ; - } is_ok=TRUE ; out: EPHYR_LOG ("leave\n") ; @@ -203,17 +193,6 @@ ephyrDRIScreenInit (ScreenPtr a_screen) screen_priv=GET_EPHYR_DRI_SCREEN_PRIV (a_screen) ; EPHYR_RETURN_VAL_IF_FAIL (screen_priv, FALSE) ; - if (ephyrDRIGeneration != serverGeneration) { - ephyrDRIWindowIndex = AllocateWindowPrivateIndex () ; - if (ephyrDRIWindowIndex < 0) { - EPHYR_LOG_ERROR ("failed to allocate window priv index\n") ; - goto out ; - } - } - if (!AllocateWindowPrivate (a_screen, ephyrDRIWindowIndex, 0)) { - EPHYR_LOG_ERROR ("failed to allocate window privates\n") ; - goto out ; - } screen_priv->CreateWindow = a_screen->CreateWindow ; screen_priv->DestroyWindow = a_screen->DestroyWindow ; screen_priv->MoveWindow = a_screen->MoveWindow ; @@ -254,7 +233,7 @@ ephyrDRICreateWindow (WindowPtr a_win) screen->CreateWindow = ephyrDRICreateWindow ; if (is_ok) { - a_win->devPrivates[ephyrDRIWindowIndex].ptr = NULL ; + dixSetPrivate(&a_win->devPrivates, ephyrDRIWindowKey, NULL); } return is_ok ; } @@ -285,7 +264,7 @@ ephyrDRIDestroyWindow (WindowPtr a_win) if (win_priv) { destroyHostPeerWindow (a_win) ; xfree (win_priv) ; - a_win->devPrivates[ephyrDRIWindowIndex].ptr = NULL ; + dixSetPrivate(&a_win->devPrivates, ephyrDRIWindowKey, NULL); EPHYR_LOG ("destroyed the remote peer window\n") ; } } @@ -1088,7 +1067,7 @@ ProcXF86DRICreateDrawable (ClientPtr client) EPHYR_LOG_ERROR ("failed to allocate window private\n") ; return BadAlloc ; } - window->devPrivates[ephyrDRIWindowIndex].ptr = win_priv ; + dixSetPrivate(&window->devPrivates, ephyrDRIWindowKey, win_priv); EPHYR_LOG ("paired window '%#x' with remote '%d'\n", (unsigned int)window, remote_win) ; } diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 5376f19db..50148c49c 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -29,6 +29,7 @@ #endif #include #include +#include "privates.h" #ifdef RANDR #include #endif @@ -66,8 +67,8 @@ KdDepths kdDepths[] = { #define KD_DEFAULT_BUTTONS 5 -int kdScreenPrivateIndex; -unsigned long kdGeneration; +DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKey; +unsigned long kdGeneration; Bool kdVideoTest; unsigned long kdVideoTestTime; @@ -751,10 +752,8 @@ KdAllocatePrivates (ScreenPtr pScreen) KdPrivScreenPtr pScreenPriv; if (kdGeneration != serverGeneration) - { - kdScreenPrivateIndex = AllocateScreenPrivateIndex(); - kdGeneration = serverGeneration; - } + kdGeneration = serverGeneration; + pScreenPriv = (KdPrivScreenPtr) xalloc(sizeof (*pScreenPriv)); if (!pScreenPriv) return FALSE; @@ -1401,8 +1400,8 @@ KdInitOutput (ScreenInfo *pScreenInfo, } #ifdef DPMSExtension -void -DPMSSet(int level) +int +DPMSSet(ClientPtr client, int level) { } diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index b6ff4f831..0b8d1c4e0 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -106,9 +106,10 @@ static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int); DevPrivateKey KdXVWindowKey = &KdXVWindowKey; DevPrivateKey KdXvScreenKey = &KdXvScreenKey; +static unsigned long KdXVGeneration = 0; static unsigned long PortResource = 0; -int (*XvGetScreenKeyProc)(void) = XvGetScreenKey; +DevPrivateKey (*XvGetScreenKeyProc)(void) = XvGetScreenKey; unsigned long (*XvGetRTPortProc)(void) = XvGetRTPort; int (*XvScreenInitProc)(ScreenPtr) = XvScreenInit; @@ -191,12 +192,15 @@ KdXVScreenInit( /* fprintf(stderr,"KdXVScreenInit initializing %d adaptors\n",num); */ + if (KdXVGeneration != serverGeneration) + KdXVGeneration = serverGeneration; + if(!XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc) return FALSE; if(Success != (*XvScreenInitProc)(pScreen)) return FALSE; - KdXvScreenIndex = (*XvGetScreenKeyProc)(); + KdXvScreenKey = (*XvGetScreenKeyProc)(); PortResource = (*XvGetRTPortProc)(); pxvs = GET_XV_SCREEN(pScreen); @@ -1106,7 +1110,7 @@ KdXVClipNotify(WindowPtr pWin, int dx, int dy) pPriv->pDraw = NULL; if(!pPrev) - dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv->next); + dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, WinPriv->next); else pPrev->next = WinPriv->next; tmp = WinPriv; diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index ab4dc0dfd..d932bcd74 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -88,7 +88,7 @@ FILE *debug_log_fp = NULL; * X server shared global variables */ int darwinScreensFound = 0; -int darwinScreenIndex = 0; +DevPrivateKey darwinScreenKey = &darwinScreenKey; io_connect_t darwinParamConnect = 0; int darwinEventReadFD = -1; int darwinEventWriteFD = -1; @@ -613,7 +613,6 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv ) { int i; - static unsigned long generation = 0; pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; @@ -625,12 +624,6 @@ void InitOutput( ScreenInfo *pScreenInfo, int argc, char **argv ) for (i = 0; i < NUMFORMATS; i++) pScreenInfo->formats[i] = formats[i]; - // Allocate private storage for each screen's Darwin specific info - if (generation != serverGeneration) { - darwinScreenIndex = AllocateScreenPrivateIndex(); - generation = serverGeneration; - } - // Discover screens and do mode specific initialization QuartzInitOutput(argc, argv); From a2df51f8e95a814c54b806814020155ac8bd177d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 14 Dec 2007 00:53:54 -0500 Subject: [PATCH 310/552] Bump video driver ABI and extension ABI for devPrivates rework. --- hw/xfree86/common/xf86Module.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 852e51f43..240155ca7 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -83,9 +83,9 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(3, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(4, 0) #define ABI_XINPUT_VERSION SET_ABI_VERSION(2, 0) -#define ABI_EXTENSION_VERSION SET_ABI_VERSION(0, 3) +#define ABI_EXTENSION_VERSION SET_ABI_VERSION(1, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 5) #define MODINFOSTRING1 0xef23fdc5 From a14a143832be844b4b890b0160ccb9fc8293c28c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 14 Dec 2007 00:57:16 -0500 Subject: [PATCH 311/552] Bump server version for devPrivates rework / XACE. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 49d57d7df..1d8aa60ae 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.4.99.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +AC_INIT([xorg-server], 1.4.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AM_MAINTAINER_MODE From 5b02a6ca5b31db69d08f2f452494c0f93a6260d9 Mon Sep 17 00:00:00 2001 From: Bartosz Fabianowski Date: Fri, 7 Dec 2007 02:38:14 +0000 Subject: [PATCH 312/552] Input: Fix proximity events with valuators Initialise num_events to 1, so we always send a proximity event, and then optionally valuator events. Also make sure mieq can deal with valuator events sent after proximity events. --- dix/getevents.c | 2 +- mi/mieq.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 08744ae03..40fc7f2a9 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -707,7 +707,7 @@ _X_EXPORT int GetProximityEvents(xEvent *events, DeviceIntPtr pDev, int type, int first_valuator, int num_valuators, int *valuators) { - int num_events = 0; + int num_events = 1; deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) events; /* Sanity checks. */ diff --git a/mi/mieq.c b/mi/mieq.c index d946e7d04..c2f687a6b 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -128,7 +128,9 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) if (oldtail == miEventQueue.head || !(lastkbp->type == DeviceMotionNotify || lastkbp->type == DeviceButtonPress || - lastkbp->type == DeviceButtonRelease) || + lastkbp->type == DeviceButtonRelease || + lastkbp->type == ProximityIn || + lastkbp->type == ProximityOut) || ((lastkbp->deviceid & DEVICE_BITS) != (v->deviceid & DEVICE_BITS))) { ErrorF("mieqEnequeue: out-of-order valuator event; dropping.\n"); From ca59d3f7bdb5f3724ff45ea57912c0b1098a73d6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Miskiewicz Date: Thu, 13 Dec 2007 00:09:08 +0200 Subject: [PATCH 313/552] Xprint: Clean up generated files Remember to clean generated wrapper files. --- hw/xprint/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am index c440473a0..1b8004841 100644 --- a/hw/xprint/Makefile.am +++ b/hw/xprint/Makefile.am @@ -53,3 +53,5 @@ Xprt_SOURCES = \ $(top_srcdir)/fb/fbcmap_mi.c EXTRA_DIST = ValTree.c + +CLEANFILES = miinitext-wrapper.c dpmsstubs-wrapper.c From 863ba390e9fdf0d37cdf03bf5eebe7fdfe6288f5 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 14 Dec 2007 00:03:13 -0200 Subject: [PATCH 314/552] kdrive/fbdev: use operating system input devices --- hw/kdrive/fbdev/fbinit.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c index 5e1c88b2c..de80c79aa 100644 --- a/hw/kdrive/fbdev/fbinit.c +++ b/hw/kdrive/fbdev/fbinit.c @@ -42,17 +42,7 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdKeyboardInfo *ki; - - KdAddKeyboardDriver (&LinuxKeyboardDriver); - KdAddPointerDriver (&LinuxMouseDriver); -#ifdef TSLIB - KdAddPointerDriver (&TsDriver); -#endif - - ki = KdParseKeyboard ("keybd"); - KdAddKeyboard(ki); - + KdOsAddInputDrivers (); KdInitInput (); } From e110255501e2f699709e6978f5e52d3be96333c8 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 14 Dec 2007 08:45:09 -0200 Subject: [PATCH 315/552] kdrive/vesa: use operating system input devices --- hw/kdrive/vesa/vesainit.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hw/kdrive/vesa/vesainit.c b/hw/kdrive/vesa/vesainit.c index 90b168108..a5e216cfd 100644 --- a/hw/kdrive/vesa/vesainit.c +++ b/hw/kdrive/vesa/vesainit.c @@ -70,15 +70,7 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdKeyboardInfo *ki = NULL; - - KdAddPointerDriver(&LinuxMouseDriver); - KdAddKeyboardDriver(&LinuxKeyboardDriver); - ki = KdNewKeyboard(); - if (ki) { - ki->driver = &LinuxKeyboardDriver; - KdAddKeyboard(ki); - } + KdOsAddInputDrivers(); KdInitInput(); } From 86730337001ba4db6d77fe42406695e32784b157 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 14 Dec 2007 08:46:35 -0200 Subject: [PATCH 316/552] kdrive/ati: use operating system input devices --- hw/kdrive/ati/ati_stub.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/kdrive/ati/ati_stub.c b/hw/kdrive/ati/ati_stub.c index 3669fd743..f881b7f7b 100644 --- a/hw/kdrive/ati/ati_stub.c +++ b/hw/kdrive/ati/ati_stub.c @@ -50,14 +50,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput(int argc, char **argv) { - KdKeyboardInfo *ki = NULL; - - KdAddPointerDriver(&LinuxMouseDriver); - ki = KdNewKeyboard(); - if (ki) { - ki->driver = &LinuxKeyboardDriver; - KdAddKeyboard(ki); - } + KdOsAddInputDrivers(); KdInitInput(); } From 95c02adea80a14e18bb51876bc1418eccdade31d Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 14 Dec 2007 15:21:40 -0800 Subject: [PATCH 317/552] Xquartz: Fixed cpprules include --- hw/xquartz/bundle/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 775e1aad0..da297e92e 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -15,9 +15,9 @@ launchagents_DATA = $(launchagents_PRE:plist.pre=plist) CPP_FILES_FLAGS = -D__libexecdir__="${libexecdir}" CLEANFILES = $(launchagents_DATA) +endif include $(top_srcdir)/cpprules.in -endif clean-local: rm -rf build From 062d9234e233fc4c1c617f59093da973c9d3e2ce Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 13 Dec 2007 20:40:27 -0800 Subject: [PATCH 318/552] fixed bug in x11-exec that prevent icon from showing up (cherry picked from commit e1f4a0c20d3a52d98954c4b28d0ec4d44564bc32) --- hw/xquartz/x11-exec.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/hw/xquartz/x11-exec.c b/hw/xquartz/x11-exec.c index d0b5c491a..105fd7202 100644 --- a/hw/xquartz/x11-exec.c +++ b/hw/xquartz/x11-exec.c @@ -28,7 +28,7 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ -#include +#include #include #define kX11AppBundleId "org.x.X11" @@ -36,10 +36,10 @@ int main(int argc, char **argv) { char x11_path[PATH_MAX]; + char** args = NULL; CFURLRef appURL = NULL; - OSStatus osstatus = - LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), - nil, nil, &appURL); + OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), + nil, nil, &appURL); switch (osstatus) { case noErr: @@ -52,10 +52,20 @@ int main(int argc, char **argv) { fprintf(stderr, "%s: Error resolving URL for %s\n", argv[0], kX11AppBundleId); exit(2); } - strlcpy(argv[0], "X11", strlen(argv[0])+1); + + args = (char**)malloc(sizeof (char*) * (argc + 1)); strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path)); -// fprintf(stderr, "X11.app = %s\n", x11_path); - execv(x11_path, argv); + if (args) { + int i; + args[0] = x11_path; + for (i = 1; i < argc; ++i) { + args[i] = argv[i]; + } + args[i] = NULL; + } + + fprintf(stderr, "X11.app = %s\n", x11_path); + execv(x11_path, args); fprintf(stderr, "Error executing X11.app (%s):", x11_path); perror(NULL); exit(3); From e0e59b3bbc4d8e7ac3934a6f6a9e4a15b328c475 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 13 Dec 2007 20:44:33 -0800 Subject: [PATCH 319/552] we need to link against CoreServices, not ApplicationServices (cherry picked from commit ba4d2096e7953ef5b971682f0e28535da968acb1) --- hw/xquartz/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 97b8c94e0..0326f784f 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -12,7 +12,7 @@ X11APP_SUBDIRS = bundle if LAUNCHD libexec_PROGRAMS = x11-exec -x11_exec_LDFLAGS = -framework ApplicationServices +x11_exec_LDFLAGS = -framework CoreServices endif endif From a3f7f7b60e391e6106f5db40b3fe5fbc67ccd836 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 13 Dec 2007 20:45:14 -0800 Subject: [PATCH 320/552] clarified debug message to indicate that we're sleeping (in case we get reports about slow launch times, this will help clarify what's happening) (cherry picked from commit 2eea3483cf893f8f81bacd434b31408dfb38cb06) --- hw/xquartz/bundle/bundle-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index 53f60a3e2..681e1a8cc 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -52,7 +52,7 @@ int main(int argc, char **argv) { /* Now, try to open a display, if so, run the launcher */ display = XOpenDisplay(NULL); if(display) { - fprintf(stderr, "X11.app: main(): closing the display"); + fprintf(stderr, "X11.app: main(): closing the display and sleeping"); /* Could open the display, start the launcher */ XCloseDisplay(display); From ff5abc72fcc459d7eac663e5f8e4d40b28749841 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 14 Dec 2007 17:59:29 -0200 Subject: [PATCH 321/552] registry: XREGISTRY_UNKNOWN needs to be defined even if XREGISTRY isn't enabled In case XREGISTRY isn't enabled, XREGISTRY_UNKNOWN is used but it's not being available. It's now always available. --- include/registry.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/registry.h b/include/registry.h index edd6ef9a7..29e5fdfd3 100644 --- a/include/registry.h +++ b/include/registry.h @@ -12,6 +12,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef DIX_REGISTRY_H #define DIX_REGISTRY_H +/* + * Result returned from any unsuccessful lookup + */ +#define XREGISTRY_UNKNOWN "" + #ifdef XREGISTRY #include "resource.h" @@ -35,11 +40,6 @@ const char *LookupEventName(int event); const char *LookupErrorName(int error); const char *LookupResourceName(RESTYPE rtype); -/* - * Result returned from any unsuccessful lookup - */ -#define XREGISTRY_UNKNOWN "" - /* * Setup and teardown */ From b4ef8885e1697b83a0dcc9f7fe79155f19241798 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 15 Dec 2007 14:00:19 -0800 Subject: [PATCH 322/552] Xquartz: Fixed launchd detection --- configure.ac | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 1d8aa60ae..86338e080 100644 --- a/configure.ac +++ b/configure.ac @@ -1120,10 +1120,6 @@ XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${LIBCRYPTO}" AC_SUBST([XSERVER_LIBS]) AC_SUBST([XSERVER_SYS_LIBS]) -if test "x$HAVE_LAUNCHD" = xyes; then - XSERVER_CFLAGS="$XSERVER_CFLAGS -DHAVE_LAUNCHD" -fi - # The Xorg binary needs to export symbols so that they can be used from modules # Some platforms require extra flags to do this. gcc should set these flags # when -rdynamic is passed to it, other compilers/linkers may need to be added @@ -1772,17 +1768,19 @@ if test "x$LAUNCHD" = "xauto"; then if test "x$XQUARTZ" = "xyes" ; then LAUNCHD=yes else + unset LAUNCHD AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) fi fi -AC_MSG_RESULT([$DMX]) -AM_CONDITIONAL(DMX, [test "x$DMX" = xyes]) if test "x$LAUNCHD" = "xyes" ; then AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) fi AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) +AC_MSG_RESULT([$DMX]) +AM_CONDITIONAL(DMX, [test "x$DMX" = xyes]) + dnl kdrive DDX XEPHYR_LIBS= From 58c2898b62fbf0d8e0f175de7cc208dc29d93788 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 16 Dec 2007 01:21:45 +0100 Subject: [PATCH 323/552] xfree86: permit access to io port 0xffff on the hurd --- hw/xfree86/os-support/hurd/hurd_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/os-support/hurd/hurd_video.c b/hw/xfree86/os-support/hurd/hurd_video.c index 8e6ae8d36..04763ada7 100644 --- a/hw/xfree86/os-support/hurd/hurd_video.c +++ b/hw/xfree86/os-support/hurd/hurd_video.c @@ -126,7 +126,7 @@ extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on); Bool xf86EnableIO() { - if (ioperm(0, 0xffff, 1)) { + if (ioperm(0, 0x10000, 1)) { FatalError("xf86EnableIO: ioperm() failed (%s)\n", strerror(errno)); return FALSE; } @@ -138,7 +138,7 @@ xf86EnableIO() void xf86DisableIO() { - ioperm(0,0xffff,0); + ioperm(0,0x10000,0); return; } From bf20c4374aeb5160a0dc372df9b49f1bbc05f078 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 16 Dec 2007 01:14:32 -0800 Subject: [PATCH 324/552] Xquartz: Removed launchd plist and x11-exec. The relevant code is now in xinit. (cherry picked from commit 767b4c9d9daa5d0ea59ac1f0d70146798da631cb) --- hw/xquartz/Makefile.am | 6 -- hw/xquartz/bundle/Makefile.am | 12 ---- hw/xquartz/bundle/org.x.X11.plist.pre | 23 -------- hw/xquartz/x11-exec.c | 84 --------------------------- 4 files changed, 125 deletions(-) delete mode 100644 hw/xquartz/bundle/org.x.X11.plist.pre delete mode 100644 hw/xquartz/x11-exec.c diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 0326f784f..831ba49f4 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -9,12 +9,6 @@ AM_CPPFLAGS = \ if X11APP X11APP_SUBDIRS = bundle - -if LAUNCHD -libexec_PROGRAMS = x11-exec -x11_exec_LDFLAGS = -framework CoreServices -endif - endif SUBDIRS = . xpr $(X11APP_SUBDIRS) diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index da297e92e..951167002 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -8,17 +8,6 @@ x11app: install-data-hook: xcodebuild install DSTROOT="/$(DESTDIR)" INSTALL_PATH="$(APPLE_APPLICATIONS_DIR)" DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" -if LAUNCHD -launchagents_PRE = org.x.X11.plist.pre -launchagents_DATA = $(launchagents_PRE:plist.pre=plist) - -CPP_FILES_FLAGS = -D__libexecdir__="${libexecdir}" - -CLEANFILES = $(launchagents_DATA) -endif - -include $(top_srcdir)/cpprules.in - clean-local: rm -rf build @@ -26,7 +15,6 @@ resourcedir=$(libdir)/X11/xserver resource_DATA = Xquartz.plist EXTRA_DIST = \ - org.x.X11.plist \ Info.plist \ X11.icns \ bundle-main.c \ diff --git a/hw/xquartz/bundle/org.x.X11.plist.pre b/hw/xquartz/bundle/org.x.X11.plist.pre deleted file mode 100644 index 83d8b2f31..000000000 --- a/hw/xquartz/bundle/org.x.X11.plist.pre +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Label - org.x.X11 - ProgramArguments - - __libexecdir__/x11-exec - -launchd - - Sockets - - :0 - - SecureSocketWithKey - DISPLAY - - - ServiceIPC - - - diff --git a/hw/xquartz/x11-exec.c b/hw/xquartz/x11-exec.c deleted file mode 100644 index 105fd7202..000000000 --- a/hw/xquartz/x11-exec.c +++ /dev/null @@ -1,84 +0,0 @@ -/* x11-exec.c -- Find X11.app by bundle-id and exec it. This is so launchd - can correctly find X11.app, even if the user moved it. - - Copyright (c) 2007 Apple, Inc. - - 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, sublicense, 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 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 - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) 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. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#include -#include - -#define kX11AppBundleId "org.x.X11" -#define kX11AppBundlePath "/Contents/MacOS/X11" - -int main(int argc, char **argv) { - char x11_path[PATH_MAX]; - char** args = NULL; - CFURLRef appURL = NULL; - OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), - nil, nil, &appURL); - - switch (osstatus) { - case noErr: - if (appURL == NULL) { - fprintf(stderr, "%s: Invalid response from LSFindApplicationForInfo(%s)\n", - argv[0], kX11AppBundleId); - exit(1); - } - if (!CFURLGetFileSystemRepresentation(appURL, true, (unsigned char *)x11_path, sizeof(x11_path))) { - fprintf(stderr, "%s: Error resolving URL for %s\n", argv[0], kX11AppBundleId); - exit(2); - } - - args = (char**)malloc(sizeof (char*) * (argc + 1)); - strlcat(x11_path, kX11AppBundlePath, sizeof(x11_path)); - if (args) { - int i; - args[0] = x11_path; - for (i = 1; i < argc; ++i) { - args[i] = argv[i]; - } - args[i] = NULL; - } - - fprintf(stderr, "X11.app = %s\n", x11_path); - execv(x11_path, args); - fprintf(stderr, "Error executing X11.app (%s):", x11_path); - perror(NULL); - exit(3); - break; - case kLSApplicationNotFoundErr: - fprintf(stderr, "%s: Unable to find application for %s\n", argv[0], kX11AppBundleId); - exit(4); - default: - fprintf(stderr, "%s: Unable to find application for %s, error code = %d\n", - argv[0], kX11AppBundleId, osstatus); - exit(5); - } - /* not reached */ -} - - From d096bbd01bf7c7e15b5a2c582718f3333e063ddc Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 17 Dec 2007 13:45:15 +1000 Subject: [PATCH 325/552] Xquartz ate my DMX - thanks --- configure.ac | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/configure.ac b/configure.ac index 86338e080..082ab8671 100644 --- a/configure.ac +++ b/configure.ac @@ -1778,9 +1778,55 @@ if test "x$LAUNCHD" = "xyes" ; then fi AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) +AC_MSG_CHECKING([whether to build Xdmx DDX]) +PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto +if test "x$DMX" = xauto; then + DMX="$have_dmx" +fi AC_MSG_RESULT([$DMX]) AM_CONDITIONAL(DMX, [test "x$DMX" = xyes]) +if test "x$DMX" = xyes; then + if test "x$have_dmx" = xno; then + AC_MSG_ERROR([Xdmx build explicitly requested, but required + modules not found.]) + fi + DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" + XDMX_CFLAGS="$DMXMODULES_CFLAGS" + XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_ + XDMX_SYS_LIBS="$DMXMODULES_LIBS" + AC_SUBST([XDMX_CFLAGS]) + AC_SUBST([XDMX_LIBS]) + AC_SUBST([XDMX_SYS_LIBS]) + +dnl USB sources in DMX require + AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes", + DMX_BUILD_USB="no") +dnl Linux sources in DMX require + AC_CHECK_HEADER([linux/keyboard.h], DMX_BUILD_LNX="yes", + DMX_BUILD_LNX="no") + if test "x$GLX" = xyes; then + PKG_CHECK_MODULES([GL], [glproto]) + fi + PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11]) + AC_SUBST(XDMXCONFIG_DEP_CFLAGS) + AC_SUBST(XDMXCONFIG_DEP_LIBS) + PKG_CHECK_MODULES([DMXEXAMPLES_DEP], [dmx xext x11]) + AC_SUBST(DMXEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([DMXXMUEXAMPLES_DEP], [dmx xmu xext x11]) + AC_SUBST(DMXXMUEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([DMXXIEXAMPLES_DEP], [dmx xi xext x11]) + AC_SUBST(DMXXIEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([XTSTEXAMPLES_DEP], [xtst xext x11]) + AC_SUBST(XTSTEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([XRESEXAMPLES_DEP], [xres xext x11]) + AC_SUBST(XRESEXAMPLES_DEP_LIBS) + PKG_CHECK_MODULES([X11EXAMPLES_DEP], [xext x11]) + AC_SUBST(X11EXAMPLES_DEP_LIBS) +fi +AM_CONDITIONAL([DMX_BUILD_LNX], [test "x$DMX_BUILD_LNX" = xyes]) +AM_CONDITIONAL([DMX_BUILD_USB], [test "x$DMX_BUILD_USB" = xyes]) + dnl kdrive DDX XEPHYR_LIBS= From a18d28a5efbe6021d6c800506cece28a73545aad Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 17 Dec 2007 13:49:16 +1000 Subject: [PATCH 326/552] damn then my cut-n-paste ate my end of lines... --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 082ab8671..0b718c9f5 100644 --- a/configure.ac +++ b/configure.ac @@ -1779,7 +1779,7 @@ fi AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) AC_MSG_CHECKING([whether to build Xdmx DDX]) -PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto +PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no]) if test "x$DMX" = xauto; then DMX="$have_dmx" fi @@ -1793,7 +1793,7 @@ if test "x$DMX" = xyes; then fi DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC" XDMX_CFLAGS="$DMXMODULES_CFLAGS" - XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_ + XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB" XDMX_SYS_LIBS="$DMXMODULES_LIBS" AC_SUBST([XDMX_CFLAGS]) AC_SUBST([XDMX_LIBS]) From 6a5c3e04fa43b98ccffd69ad86dd781602f88d0b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 17 Dec 2007 14:59:12 +1000 Subject: [PATCH 327/552] mi: set the private key to a unique non-zero value --- mi/miscrinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mi/miscrinit.c b/mi/miscrinit.c index a1fb2e2f6..7ca5f5df1 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -301,7 +301,7 @@ miAllocateGCPrivateIndex() return privateKey; } -_X_EXPORT DevPrivateKey miZeroLineScreenKey; +_X_EXPORT DevPrivateKey miZeroLineScreenKey = &miZeroLineScreenKey; _X_EXPORT void miSetZeroLineBias(pScreen, bias) From 97c82ce0510808ea9d8a37a0a121e750f6dd8158 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 17 Dec 2007 23:11:29 -0500 Subject: [PATCH 328/552] XACE: Restore the old background None behavior in response to bug #13683. From the X11 protocol spec: "If background None is specified, the window has no defined background." This means that toolkits and apps cannot rely on the "transparent" nature of the current implementation! At some point before the next release, XACE will switch back to a solid background as the default. --- Xext/xace.h | 6 ++++++ dix/window.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Xext/xace.h b/Xext/xace.h index de0e8fe81..6f92290a0 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -32,6 +32,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XaceNumberEvents 0 #define XaceNumberErrors 0 +/* Default window background */ +#define XaceBackgroundNoneState None + /* security hooks */ /* Constants used to identify the available security hooks */ @@ -94,6 +97,9 @@ extern void XaceCensorImage( #else /* XACE */ +/* Default window background */ +#define XaceBackgroundNoneState None + /* Define calls away when XACE is not being built. */ #ifdef __GNUC__ diff --git a/dix/window.c b/dix/window.c index 0404655d4..33cf76b59 100644 --- a/dix/window.c +++ b/dix/window.c @@ -704,7 +704,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, return NullWindow; } - pWin->backgroundState = BackgroundPixel; + pWin->backgroundState = XaceBackgroundNoneState; pWin->background.pixel = 0; pWin->borderIsPixel = pParent->borderIsPixel; @@ -1016,7 +1016,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) if (!pWin->parent) MakeRootTile(pWin); else { - pWin->backgroundState = BackgroundPixel; + pWin->backgroundState = XaceBackgroundNoneState; pWin->background.pixel = 0; } } From 51fab1eb30691c503f1b4dc98b465f2bc2e1394e Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Tue, 18 Dec 2007 11:38:47 -0800 Subject: [PATCH 329/552] Sun bug 6278039: Xevie checking wrong size in swapped XevieSelectInput requests --- Xext/xevie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xevie.c b/Xext/xevie.c index 7dd67bbf6..ea409f104 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -368,7 +368,7 @@ int SProcSelectInput (ClientPtr client) REQUEST (xXevieSelectInputReq); swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXevieSendReq); + REQUEST_AT_LEAST_SIZE (xXevieSelectInputReq); swapl(&stuff->event_mask, n); return ProcSelectInput (client); } From 7721d3e9217b41aab3a0ee5eaa52f5b53cbb07db Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 18 Dec 2007 19:14:26 -0500 Subject: [PATCH 330/552] Reference cvt and gtf in the xorg.conf man page. --- hw/xfree86/doc/man/xorg.conf.man.pre | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 3c657d0f0..77439a517 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -2144,7 +2144,9 @@ The data therein is not used in this release. General: .BR X (__miscmansuffix__), .BR Xserver (__appmansuffix__), -.BR __xservername__ (__appmansuffix__). +.BR __xservername__ (__appmansuffix__), +.BR cvt (__appmansuffix__), +.BR gtf (__appmansuffix__). .PP .B Not all modules or interfaces are available on all platforms. .PP From bcad2a5a24f30cfdf9eca31915ed5a55ed094285 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 18 Dec 2007 20:19:26 -0500 Subject: [PATCH 331/552] XACE: Too many arguments to selection access hook. --- xfixes/select.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xfixes/select.c b/xfixes/select.c index 2321212ce..415257ec1 100755 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -135,8 +135,7 @@ XFixesSelectSelectionInput (ClientPtr pClient, int rc; SelectionEventPtr *prev, e; - rc = XaceHook(XACE_SELECTION_ACCESS, pClient, selection, NULL, - DixGetAttrAccess); + rc = XaceHook(XACE_SELECTION_ACCESS, pClient, selection, DixGetAttrAccess); if (rc != Success) return rc; From 66b00029e587cec628d0041179a301e888277f8e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 19 Dec 2007 18:10:50 +1030 Subject: [PATCH 332/552] Xext: remove redefinition of Bool. Thanks to Simon Thum. --- Xext/dpmsstubs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/Xext/dpmsstubs.c b/Xext/dpmsstubs.c index fad07bde6..0f59d5160 100644 --- a/Xext/dpmsstubs.c +++ b/Xext/dpmsstubs.c @@ -26,8 +26,6 @@ Equipment Corporation. ******************************************************************/ -typedef int Bool; - #ifdef HAVE_DIX_CONFIG_H #include #endif From d0308b64655360517d83e07e866d103c3f2b389d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 19 Dec 2007 18:18:10 +1030 Subject: [PATCH 333/552] Xi: specify correct struct when calculating size of GetDeviceControl reply. This doesn't change much, as the struct previously given has the same size as the ones now anyway. Still, we should be pendantic. Thanks to Simon Thum for reporting. --- Xi/getdctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Xi/getdctl.c b/Xi/getdctl.c index 6e1e3ef58..c979959e2 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -265,19 +265,19 @@ ProcXGetDeviceControl(ClientPtr client) if (!dev->absolute) return BadMatch; - total_length = sizeof(xDeviceAbsCalibCtl); + total_length = sizeof(xDeviceAbsCalibState); break; case DEVICE_ABS_AREA: if (!dev->absolute) return BadMatch; - total_length = sizeof(xDeviceAbsAreaCtl); + total_length = sizeof(xDeviceAbsAreaState); break; case DEVICE_CORE: - total_length = sizeof(xDeviceCoreCtl); + total_length = sizeof(xDeviceCoreState); break; case DEVICE_ENABLE: - total_length = sizeof(xDeviceEnableCtl); + total_length = sizeof(xDeviceEnableState); break; default: return BadValue; From 50e80c39870adfdc84fdbc00dddf1362117ad443 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 19 Dec 2007 16:20:36 +1030 Subject: [PATCH 334/552] include: never overwrite realInputProc with enqueueInputProc. Bug #13511 In some cases (triggered by a key repeat during a sync grab) XKB unwrapping can overwrite the device's realInputProc with the enqueueInputProc. When the grab is released and the events are replayed, we end up in an infinite loop. Each event is replayed and in replaying pushed to the end of the queue again. This fix is a hack only. It ensures that the realInputProc is never overwritten with the enqueueInputProc. This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511) (cherry picked from commit eace88989c3b65d5c20e9f37ea9b23c7c8e19335) --- include/xkbsrv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 6425e37ae..bf386e72d 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -258,7 +258,8 @@ typedef struct device->public.processInputProc = proc; \ oldprocs->processInputProc = \ oldprocs->realInputProc = device->public.realInputProc; \ - device->public.realInputProc = proc; \ + if (proc != device->public.enqueueInputProc) \ + device->public.realInputProc = proc; \ oldprocs->unwrapProc = device->unwrapProc; \ device->unwrapProc = unwrapproc; From 7ef7727b800fa4715b80a82850d65b88fde5fe6c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 20 Dec 2007 10:11:26 +1000 Subject: [PATCH 335/552] entity sharing: make !shareable entity non-fatal. Just because the entity isn't shareable, we should bring down the server. Just ignore the extra screen and keep going. --- hw/xfree86/common/xf86Bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 599f7a46e..f7ffac85e 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -290,8 +290,10 @@ xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) if (entityIndex == -1) return; if (xf86Entities[entityIndex]->inUse && - !(xf86Entities[entityIndex]->entityProp & IS_SHARED_ACCEL)) - FatalError("Requested Entity already in use!\n"); + !(xf86Entities[entityIndex]->entityProp & IS_SHARED_ACCEL)) { + ErrorF("Requested Entity already in use!\n"); + return; + } pScrn->numEntities++; pScrn->entityList = xnfrealloc(pScrn->entityList, From 42802a8e6b3d3795acc4f8b7597ea5a48619b5cd Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 20 Dec 2007 13:17:30 -0800 Subject: [PATCH 336/552] Xquartz: General Cleanup General code cleanup, whitespace, dead code removal, added missing prototypes. Made Xquartz come to foreground later in startup, so it doesn't appear for Xquartz -version (cherry picked from commit 36922e8ff4316c93843aa3fe959cf8df3c7d5892) --- dix/main.c | 4 +++ hw/xquartz/X11Application.h | 52 +++++++++++++++--------------- hw/xquartz/X11Application.m | 64 ++++++++++++++++++------------------- hw/xquartz/X11Controller.h | 4 --- hw/xquartz/X11Controller.m | 8 +---- hw/xquartz/darwin.c | 19 +++-------- hw/xquartz/quartz.c | 51 ++++++++--------------------- hw/xquartz/quartzCommon.h | 1 - hw/xquartz/quartzStartup.c | 29 +++-------------- hw/xquartz/xpr/xpr.h | 2 +- 10 files changed, 85 insertions(+), 149 deletions(-) diff --git a/dix/main.c b/dix/main.c index 532b32534..9114f00d9 100644 --- a/dix/main.c +++ b/dix/main.c @@ -238,6 +238,10 @@ static int indexForScanlinePad[ 65 ] = { #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #endif +#ifdef __APPLE__ +void DarwinHandleGUI(int argc, char **argv, char **envp); +#endif + int main(int argc, char *argv[], char *envp[]) { diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h index 861565798..c42e6a5a2 100644 --- a/hw/xquartz/X11Application.h +++ b/hw/xquartz/X11Application.h @@ -64,40 +64,38 @@ extern X11Application *X11App; #endif /* __OBJC__ */ -extern void X11ApplicationSetWindowMenu (int nitems, const char **items, +void X11ApplicationSetWindowMenu (int nitems, const char **items, const char *shortcuts); -extern void X11ApplicationSetWindowMenuCheck (int idx); -extern void X11ApplicationSetFrontProcess (void); -extern void X11ApplicationSetCanQuit (int state); -extern void X11ApplicationServerReady (void); -extern void X11ApplicationShowHideMenubar (int state); +void X11ApplicationSetWindowMenuCheck (int idx); +void X11ApplicationSetFrontProcess (void); +void X11ApplicationSetCanQuit (int state); +void X11ApplicationServerReady (void); +void X11ApplicationShowHideMenubar (int state); -extern void X11ApplicationMain (int argc, const char *argv[], - void (*server_thread) (void *), - void *server_arg); +void X11ApplicationMain(int argc, char **argv, void (*server_thread) (void *), void *server_arg); extern int X11EnableKeyEquivalents; extern int quartzHasRoot, quartzEnableRootless; #define APP_PREFS "org.x.X11" -#define PREFS_APPSMENU "apps_menu" -#define PREFS_FAKEBUTTONS "enable_fake_buttons" -#define PREFS_SYSBEEP "enable_system_beep" -#define PREFS_KEYEQUIVS "enable_key_equivalents" -#define PREFS_KEYMAP_FILE "keymap_file" -#define PREFS_SYNC_KEYMAP "sync_keymap" -#define PREFS_DEPTH "depth" -#define PREFS_NO_AUTH "no_auth" -#define PREFS_NO_TCP "nolisten_tcp" -#define PREFS_DONE_XINIT_CHECK "done_xinit_check" -#define PREFS_NO_QUIT_ALERT "no_quit_alert" -#define PREFS_FAKE_BUTTON2 "fake_button2" -#define PREFS_FAKE_BUTTON3 "fake_button3" -#define PREFS_ROOTLESS "rootless" -#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys" -#define PREFS_SWAP_ALT_META "swap_alt_meta" -#define PREFS_XP_OPTIONS "xp_options" -#define PREFS_ENABLE_STEREO "enable_stereo" +#define PREFS_APPSMENU "apps_menu" +#define PREFS_FAKEBUTTONS "enable_fake_buttons" +#define PREFS_SYSBEEP "enable_system_beep" +#define PREFS_KEYEQUIVS "enable_key_equivalents" +#define PREFS_KEYMAP_FILE "keymap_file" +#define PREFS_SYNC_KEYMAP "sync_keymap" +#define PREFS_DEPTH "depth" +#define PREFS_NO_AUTH "no_auth" +#define PREFS_NO_TCP "nolisten_tcp" +#define PREFS_DONE_XINIT_CHECK "done_xinit_check" +#define PREFS_NO_QUIT_ALERT "no_quit_alert" +#define PREFS_FAKE_BUTTON2 "fake_button2" +#define PREFS_FAKE_BUTTON3 "fake_button3" +#define PREFS_ROOTLESS "rootless" +#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys" +#define PREFS_SWAP_ALT_META "swap_alt_meta" +#define PREFS_XP_OPTIONS "xp_options" +#define PREFS_ENABLE_STEREO "enable_stereo" #endif /* X11APPLICATION_H */ diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 8d4076a0a..92a503b45 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -32,6 +32,7 @@ #endif #include "quartzCommon.h" +#include "quartzForeground.h" #import "X11Application.h" #include @@ -82,8 +83,8 @@ static mach_port_t _port; static void send_nsevent (NSEventType type, NSEvent *e); /* Quartz mode initialization routine. This is often dynamically loaded - but is statically linked into this X server. */ -extern Bool QuartzModeBundleInit(void); + but is statically linked into this X server. */ +Bool QuartzModeBundleInit(void); static void init_ports (void) { kern_return_t r; @@ -789,44 +790,43 @@ environment?", @"Startup xinitrc dialog"); [X11App prefs_synchronize]; } -void X11ApplicationMain (int argc, const char *argv[], - void (*server_thread) (void *), void *server_arg) { - NSAutoreleasePool *pool; - +void X11ApplicationMain (int argc, char **argv, void (*server_thread) (void *), void *server_arg) { + NSAutoreleasePool *pool; + #ifdef DEBUG - while (access ("/tmp/x11-block", F_OK) == 0) sleep (1); + while (access ("/tmp/x11-block", F_OK) == 0) sleep (1); #endif - pool = [[NSAutoreleasePool alloc] init]; - X11App = (X11Application *) [X11Application sharedApplication]; - init_ports (); - [NSApp read_defaults]; - [NSBundle loadNibNamed:@"main" owner:NSApp]; - [[NSNotificationCenter defaultCenter] addObserver:NSApp + pool = [[NSAutoreleasePool alloc] init]; + X11App = (X11Application *) [X11Application sharedApplication]; + init_ports (); + [NSApp read_defaults]; + [NSBundle loadNibNamed:@"main" owner:NSApp]; + [[NSNotificationCenter defaultCenter] addObserver:NSApp selector:@selector (became_key:) name:NSWindowDidBecomeKeyNotification object:nil]; - check_xinitrc (); - - /* - * The xpr Quartz mode is statically linked into this server. - * Initialize all the Quartz functions. - */ - QuartzModeBundleInit(); - - /* Calculate the height of the menubar so we can avoid it. */ - aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - + check_xinitrc (); + + /* + * The xpr Quartz mode is statically linked into this server. + * Initialize all the Quartz functions. + */ + QuartzModeBundleInit(); + + /* Calculate the height of the menubar so we can avoid it. */ + aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - NSMaxY([[NSScreen mainScreen] visibleFrame]); - if (!create_thread (server_thread, server_arg)) { - ErrorF("can't create secondary thread\n"); - exit (1); - } - - [NSApp run]; - - /* not reached */ -} + if (!create_thread (server_thread, server_arg)) { + ErrorF("can't create secondary thread\n"); + exit (1); + } + QuartzMoveToForeground(); + + [NSApp run]; + /* not reached */ +} /* event conversion */ diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h index f1399dc49..bfbb04f8a 100644 --- a/hw/xquartz/X11Controller.h +++ b/hw/xquartz/X11Controller.h @@ -78,8 +78,4 @@ #endif /* __OBJC__ */ -extern void X11ControllerMain (int argc, const char *argv[], - void (*server_thread) (void *), - void *server_arg); - #endif /* X11CONTROLLER_H */ diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index 0f64e4571..ecd88abde 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -337,7 +337,7 @@ /* Setup environment */ temp = getenv("DISPLAY"); if (temp == NULL || temp[0] == 0) { - snprintf(buf, sizeof(buf), ":%s", display); + snprintf(buf, sizeof(buf), ":%s", display); setenv("DISPLAY", buf, TRUE); } @@ -741,9 +741,3 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row } @end - -void X11ControllerMain (int argc, const char *argv[], - void (*server_thread) (void *), void *server_arg) -{ - X11ApplicationMain (argc, argv, server_thread, server_arg); -} diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index d932bcd74..06e88bd0d 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -715,16 +715,6 @@ int ddxProcessArgument( int argc, char *argv[], int i ) return 1; } - if ( !strcmp( argv[i], "-quartz" ) ) { - ErrorF( "Running in parallel with Mac OS X Quartz window server.\n" ); - return 1; - } - - // The Mac OS X front end uses this argument, which we just ignore here. - if ( !strcmp( argv[i], "-nostartx" ) ) { - return 1; - } - // This command line arg is passed when launched from the Aqua GUI. if ( !strncmp( argv[i], "-psn_", 5 ) ) { return 1; @@ -876,9 +866,9 @@ void ddxUseMsg( void ) ErrorF("-keymap : read the keymapping from a file instead of the kernel.\n"); ErrorF("-version : show the server version.\n"); ErrorF("\n"); - ErrorF("Quartz modes (Experimental / In Development):\n"); - ErrorF("-fullscreen : run full screen in parallel with Mac OS X window server.\n"); - ErrorF("-rootless : run rootless inside Mac OS X window server.\n"); +// ErrorF("Quartz modes (Experimental / In Development):\n"); +// ErrorF("-fullscreen : run full screen in parallel with Mac OS X window server.\n"); +// ErrorF("-rootless : run rootless inside Mac OS X window server.\n"); ErrorF("\n"); ErrorF("Options ignored in rootless mode:\n"); ErrorF("-size : use a screen resolution of x .\n"); @@ -896,7 +886,8 @@ void ddxGiveUp( void ) { ErrorF( "Quitting XQuartz...\n" ); - QuartzGiveUp(); + //if (!quartzRootless) + // quartzProcs->ReleaseScreens(); } diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index 206330056..75f4e5eb0 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -61,7 +61,6 @@ // Shared global variables for Quartz modes int quartzEventWriteFD = -1; -int quartzStartClients = 1; int quartzRootless = -1; int quartzUseSysBeep = 0; int quartzUseAGL = 1; @@ -408,12 +407,10 @@ QuartzMessageServerThread( * QuartzProcessEvent * Process Quartz specific events. */ -void QuartzProcessEvent( - xEvent *xe) -{ +void QuartzProcessEvent(xEvent *xe) { switch (xe->u.u.type) { case kXDarwinControllerNotify: - DEBUG_LOG("kXDarwinControllerNotify\n"); + DEBUG_LOG("kXDarwinControllerNotify\n"); AppleWMSendEvent(AppleWMControllerNotify, AppleWMControllerNotifyMask, xe->u.clientMessage.u.l.longs0, @@ -421,7 +418,7 @@ void QuartzProcessEvent( break; case kXDarwinPasteboardNotify: - DEBUG_LOG("kXDarwinPasteboardNotify\n"); + DEBUG_LOG("kXDarwinPasteboardNotify\n"); AppleWMSendEvent(AppleWMPasteboardNotify, AppleWMPasteboardNotifyMask, xe->u.clientMessage.u.l.longs0, @@ -429,7 +426,7 @@ void QuartzProcessEvent( break; case kXDarwinActivate: - DEBUG_LOG("kXDarwinActivate\n"); + DEBUG_LOG("kXDarwinActivate\n"); QuartzShow(xe->u.keyButtonPointer.rootX, xe->u.keyButtonPointer.rootY); AppleWMSendEvent(AppleWMActivationNotify, @@ -438,7 +435,7 @@ void QuartzProcessEvent( break; case kXDarwinDeactivate: - DEBUG_LOG("kXDarwinDeactivate\n"); + DEBUG_LOG("kXDarwinDeactivate\n"); AppleWMSendEvent(AppleWMActivationNotify, AppleWMActivationNotifyMask, AppleWMIsInactive, 0); @@ -446,23 +443,23 @@ void QuartzProcessEvent( break; case kXDarwinDisplayChanged: - DEBUG_LOG("kXDarwinDisplayChanged\n"); + DEBUG_LOG("kXDarwinDisplayChanged\n"); QuartzUpdateScreens(); break; case kXDarwinWindowState: - DEBUG_LOG("kXDarwinWindowState\n"); + DEBUG_LOG("kXDarwinWindowState\n"); RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0, xe->u.clientMessage.u.l.longs1); break; case kXDarwinWindowMoved: - DEBUG_LOG("kXDarwinWindowMoved\n"); - RootlessNativeWindowMoved ((WindowPtr)xe->u.clientMessage.u.l.longs0); + DEBUG_LOG("kXDarwinWindowMoved\n"); + RootlessNativeWindowMoved ((WindowPtr)xe->u.clientMessage.u.l.longs0); break; case kXDarwinToggleFullscreen: - DEBUG_LOG("kXDarwinToggleFullscreen\n"); + DEBUG_LOG("kXDarwinToggleFullscreen\n"); #ifdef DARWIN_DDX_MISSING if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot); else if (quartzHasRoot) QuartzHide(); @@ -473,6 +470,7 @@ void QuartzProcessEvent( break; case kXDarwinSetRootless: + DEBUG_LOG("kXDarwinSetRootless\n"); #ifdef DARWIN_DDX_MISSING QuartzSetRootless(xe->u.clientMessage.u.l.longs0); if (!quartzEnableRootless && !quartzHasRoot) QuartzHide(); @@ -498,34 +496,11 @@ void QuartzProcessEvent( break; case kXDarwinBringAllToFront: - DEBUG_LOG("kXDarwinBringAllToFront\n"); - RootlessOrderAllWindows(); + DEBUG_LOG("kXDarwinBringAllToFront\n"); + RootlessOrderAllWindows(); break; default: ErrorF("Unknown application defined event type %d.\n", xe->u.u.type); } } - - -/* - * QuartzGiveUp - * Cleanup before X server shutdown - * Release the screen and restore the Aqua cursor. - */ -void QuartzGiveUp(void) -{ -#if 0 -// Trying to switch cursors when quitting causes deadlock - int i; - - for (i = 0; i < screenInfo.numScreens; i++) { - if (screenInfo.screens[i]) { - QuartzSuspendXCursor(screenInfo.screens[i]); - } - } -#endif - - if (!quartzRootless) - quartzProcs->ReleaseScreens(); -} diff --git a/hw/xquartz/quartzCommon.h b/hw/xquartz/quartzCommon.h index 50b50f610..a0d467389 100644 --- a/hw/xquartz/quartzCommon.h +++ b/hw/xquartz/quartzCommon.h @@ -64,7 +64,6 @@ typedef struct { // Data stored at startup for Cocoa front end extern int quartzEventWriteFD; -extern int quartzStartClients; // User preferences used by Quartz modes extern int quartzRootless; diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c index 87bcadac8..50ce2a63e 100644 --- a/hw/xquartz/quartzStartup.c +++ b/hw/xquartz/quartzStartup.c @@ -34,8 +34,8 @@ #include #include #include -#include "quartzForeground.h" #include "quartzCommon.h" +#include "X11Application.h" #include "darwin.h" #include "quartz.h" #include "opaque.h" @@ -52,9 +52,6 @@ char **envpGlobal; // argcGlobal and argvGlobal // are from dix/globals.c - -void X11ControllerMain(int argc, char *argv[], void (*server_thread) (void *), void *server_arg); - static void server_thread (void *arg) { extern int main(int argc, char **argv, char **envp); exit (main (argcGlobal, argvGlobal, envpGlobal)); @@ -68,22 +65,16 @@ static void server_thread (void *arg) { * server. On the second call this function loads the user * preferences set by the Mac OS X front end. */ -void DarwinHandleGUI( - int argc, - char *argv[], - char *envp[] ) -{ +void DarwinHandleGUI(int argc, char **argv, char **envp) { static Bool been_here = FALSE; int i; int fd[2]; - QuartzMoveToForeground(); - if (been_here) { return; } been_here = TRUE; - + // Make a pipe to pass events assert( pipe(fd) == 0 ); darwinEventReadFD = fd[0]; @@ -95,26 +86,14 @@ void DarwinHandleGUI( argvGlobal = argv; envpGlobal = envp; - quartzStartClients = 1; for (i = 1; i < argc; i++) { // Display version info without starting Mac OS X UI if requested if (!strcmp( argv[i], "-showconfig" ) || !strcmp( argv[i], "-version" )) { DarwinPrintBanner(); exit(0); } - - // Determine if we need to start X clients - // and what display mode to use - if (!strcmp(argv[i], "-nostartx")) { - quartzStartClients = 0; - } else if (!strcmp( argv[i], "-fullscreen")) { - quartzRootless = 0; - } else if (!strcmp( argv[i], "-rootless")) { - quartzRootless = 1; - } } - /* Initially I ran the X server on the main thread, and received events on the second thread. But now we may be using Carbon, that needs to run on the main thread. (Otherwise, when it's @@ -127,6 +106,6 @@ void DarwinHandleGUI( extern void _InitHLTB(void); _InitHLTB(); - X11ControllerMain(argc, argv, server_thread, NULL); + X11ApplicationMain(argc, argv, server_thread, NULL); exit(0); } diff --git a/hw/xquartz/xpr/xpr.h b/hw/xquartz/xpr/xpr.h index ddc6d0cb1..b8c69df0d 100644 --- a/hw/xquartz/xpr/xpr.h +++ b/hw/xquartz/xpr/xpr.h @@ -31,7 +31,7 @@ #include "screenint.h" -extern Bool QuartzModeBundleInit(void); +Bool QuartzModeBundleInit(void); void AppleDRIExtensionInit(void); void xprAppleWMInit(void); From 1393a97ea97b5f7d7b90e3e8c58b5996b600e0c6 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 20 Dec 2007 16:23:35 -0500 Subject: [PATCH 337/552] xselinux: Send AVC messages to audit system instead of log file/stderr. --- Xext/xselinux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index bbae483a8..bbd8d1a46 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -462,8 +462,12 @@ static int SELinuxLog(int type, const char *fmt, ...) { va_list ap; + char buf[MAX_AUDIT_MESSAGE_LENGTH]; + int rc, aut = AUDIT_USER_AVC; + va_start(ap, fmt); - VErrorF(fmt, ap); + vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap); + rc = audit_log_user_avc_message(audit_fd, aut, buf, NULL, NULL, NULL, 0); va_end(ap); return 0; } From 2d15d439f844d4016f169664a338595c11b91b77 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 20 Dec 2007 15:46:40 -0800 Subject: [PATCH 338/552] Xquartz: Use X11ControllerMain() (cherry picked from commit a9ac932543374aa2540f5a12cc85ef82c85b0e0c) --- hw/xquartz/X11Application.h | 2 +- hw/xquartz/X11Application.m | 2 +- hw/xquartz/X11Controller.h | 2 ++ hw/xquartz/X11Controller.m | 4 ++++ hw/xquartz/quartzStartup.c | 4 ++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h index c42e6a5a2..a1be7514a 100644 --- a/hw/xquartz/X11Application.h +++ b/hw/xquartz/X11Application.h @@ -72,7 +72,7 @@ void X11ApplicationSetCanQuit (int state); void X11ApplicationServerReady (void); void X11ApplicationShowHideMenubar (int state); -void X11ApplicationMain(int argc, char **argv, void (*server_thread) (void *), void *server_arg); +void X11ApplicationMain(int argc, const char **argv, void (*server_thread) (void *), void *server_arg); extern int X11EnableKeyEquivalents; extern int quartzHasRoot, quartzEnableRootless; diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 92a503b45..828cd30f2 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -790,7 +790,7 @@ environment?", @"Startup xinitrc dialog"); [X11App prefs_synchronize]; } -void X11ApplicationMain (int argc, char **argv, void (*server_thread) (void *), void *server_arg) { +void X11ApplicationMain (int argc, const char **argv, void (*server_thread) (void *), void *server_arg) { NSAutoreleasePool *pool; #ifdef DEBUG diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h index bfbb04f8a..47f5220e4 100644 --- a/hw/xquartz/X11Controller.h +++ b/hw/xquartz/X11Controller.h @@ -78,4 +78,6 @@ #endif /* __OBJC__ */ +void X11ControllerMain(int argc, const char **argv, void (*server_thread) (void *), void *server_arg); + #endif /* X11CONTROLLER_H */ diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index ecd88abde..6b7c35141 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -741,3 +741,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row } @end + +void X11ControllerMain(int argc, const char **argv, void (*server_thread) (void *), void *server_arg) { + X11ApplicationMain (argc, argv, server_thread, server_arg); +} diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c index 50ce2a63e..8600ec8d9 100644 --- a/hw/xquartz/quartzStartup.c +++ b/hw/xquartz/quartzStartup.c @@ -35,7 +35,7 @@ #include #include #include "quartzCommon.h" -#include "X11Application.h" +#include "X11Controller.h" #include "darwin.h" #include "quartz.h" #include "opaque.h" @@ -106,6 +106,6 @@ void DarwinHandleGUI(int argc, char **argv, char **envp) { extern void _InitHLTB(void); _InitHLTB(); - X11ApplicationMain(argc, argv, server_thread, NULL); + X11ControllerMain(argc, argv, server_thread, NULL); exit(0); } From 1f74bef1ad1399323fc0d2e309b808bf32c622e4 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 20 Dec 2007 17:33:38 -0800 Subject: [PATCH 339/552] XQuartz: Don't fork to exec app_to_run. Plus other housecleaning... (cherry picked from commit ae302db472f127be082d05b418ede332fae8ccc5) --- hw/xquartz/X11Application.m | 2 +- .../bundle/X11.xcodeproj/project.pbxproj | 4 -- hw/xquartz/bundle/bundle-main.c | 59 ++++++++++++++++--- hw/xquartz/darwin.c | 5 +- 4 files changed, 54 insertions(+), 16 deletions(-) diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 828cd30f2..56db2c477 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -153,7 +153,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) { tem = [infoDict objectForKey:@"CFBundleShortVersionString"]; - [dict setObject:[NSString stringWithFormat:@"X11.app %@ - X.org X11R7.3", tem] + [dict setObject:[NSString stringWithFormat:@"XQuartz %@ - (xorg-server %s)", tem, XSERVER_VERSION] forKey:@"ApplicationVersion"]; [self orderFrontStandardAboutPanelWithOptions: dict]; diff --git a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj index 225f371c5..9d5c5d643 100644 --- a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj +++ b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 3F5E1BE00D04BF110020CA24 /* launcher-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 3F5E1BDE0D04BF110020CA24 /* launcher-main.c */; }; 3F5E1BE10D04BF110020CA24 /* server-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 3F5E1BDF0D04BF110020CA24 /* server-main.c */; }; 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; }; 527F241A0B5D938C007840A7 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; }; @@ -22,7 +21,6 @@ /* Begin PBXFileReference section */ 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = ""; }; - 3F5E1BDE0D04BF110020CA24 /* launcher-main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "launcher-main.c"; sourceTree = ""; }; 3F5E1BDF0D04BF110020CA24 /* server-main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "server-main.c"; sourceTree = ""; }; 50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = ""; }; 50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = ""; }; @@ -69,7 +67,6 @@ 20286C2AFDCF999611CA2CEA /* Sources */ = { isa = PBXGroup; children = ( - 3F5E1BDE0D04BF110020CA24 /* launcher-main.c */, 3F5E1BDF0D04BF110020CA24 /* server-main.c */, 50EE2AB703849F0B0ECA21EC /* bundle-main.c */, ); @@ -176,7 +173,6 @@ buildActionMask = 2147483647; files = ( 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */, - 3F5E1BE00D04BF110020CA24 /* launcher-main.c in Sources */, 3F5E1BE10D04BF110020CA24 /* server-main.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index 681e1a8cc..ed41e6884 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -32,18 +32,23 @@ #include #include #include +#include -int launcher_main(int argc, char **argv); +#include + +#define DEFAULT_APP "/usr/X11/bin/xterm" + +static int launcher_main(int argc, char **argv); int server_main(int argc, char **argv); int main(int argc, char **argv) { Display *display; - //size_t i; - //fprintf(stderr, "X11.app: main(): argc=%d\n", argc); - //for(i=0; i < argc; i++) { - // fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); - //} + size_t i; + fprintf(stderr, "X11.app: main(): argc=%d\n", argc); + for(i=0; i < argc; i++) { + fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); + } /* If we have a process serial number and it's our only arg, act as if * the user double clicked the app bundle: launch app_to_run if possible @@ -52,7 +57,7 @@ int main(int argc, char **argv) { /* Now, try to open a display, if so, run the launcher */ display = XOpenDisplay(NULL); if(display) { - fprintf(stderr, "X11.app: main(): closing the display and sleeping"); + fprintf(stderr, "X11.app: closing the display and sleeping for 2s to allow the X server to start up.\n"); /* Could open the display, start the launcher */ XCloseDisplay(display); @@ -60,13 +65,49 @@ int main(int argc, char **argv) { * TODO: *Really* fix this race condition */ usleep(2000); - //fprintf(stderr, "X11.app: main(): running launcher_main()"); return launcher_main(argc, argv); } } /* Start the server */ - //fprintf(stderr, "X11.app: main(): running server_main()"); + fprintf(stderr, "X11.app: main(): running server_main()"); return server_main(argc, argv); } +int launcher_main (int argc, char **argv) { + char *command = DEFAULT_APP; + const char *newargv[7]; + int child; + const char **s; + + CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(CFSTR("app_to_run"), kCFPreferencesCurrentApplication); + + if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { + CFPreferencesSetAppValue(CFSTR("app_to_run"), CFSTR(DEFAULT_APP), kCFPreferencesCurrentApplication); + CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); + } else { + int len = CFStringGetLength((CFStringRef)PlistRef)+1; + command = (char *)malloc(len); + CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); + fprintf(stderr, "command=%s\n", command); + } + + if (PlistRef) CFRelease(PlistRef); + + newargv[0] = "/usr/bin/login"; + newargv[1] = "-fp"; + newargv[2] = getlogin(); + newargv[3] = "/bin/sh"; + newargv[4] = "-c"; + newargv[5] = command; + newargv[6] = NULL; + + fprintf(stderr, "X11.app: Launching X11 Application:\n"); + for(s=newargv; *s; s++) { + fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s); + } + + execvp (newargv[0], (const char **) newargv); + perror ("X11.app: Couldn't exec."); + return(1); +} diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 06e88bd0d..d6eb100ac 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -150,8 +150,9 @@ void DarwinPrintBanner(void) { // this should change depending on which specific server we are building - ErrorF("X11.app starting:\n"); - ErrorF("Xquartz server based on X.org %s, built on %s\n", XORG_RELEASE, BUILD_DATE ); + ErrorF("XQuartz starting:\n"); + ErrorF("X.org Release 7.2\n"); // This is here to help fink until they fix their packages. + ErrorF("X.Org X Server %s\nBuild Date: %s\n", XSERVER_VERSION, BUILD_DATE ); } From 4cf3002b6020024f2fc2ed0cc40a872a066e482d Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 20 Dec 2007 18:08:40 -0800 Subject: [PATCH 340/552] XQuartz: Kill off server-main.c and launcher-main.c Now using xinit (cherry picked from commit 5d6ae3d299f72df714117948b3d31dcbddf6c0bc) --- .../bundle/X11.xcodeproj/project.pbxproj | 4 - hw/xquartz/bundle/bundle-main.c | 69 +- hw/xquartz/bundle/launcher-main.c | 81 -- hw/xquartz/bundle/server-main.c | 903 ------------------ 4 files changed, 47 insertions(+), 1010 deletions(-) delete mode 100644 hw/xquartz/bundle/launcher-main.c delete mode 100644 hw/xquartz/bundle/server-main.c diff --git a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj index 9d5c5d643..ddb6f8364 100644 --- a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj +++ b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 3F5E1BE10D04BF110020CA24 /* server-main.c in Sources */ = {isa = PBXBuildFile; fileRef = 3F5E1BDF0D04BF110020CA24 /* server-main.c */; }; 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; }; 527F241A0B5D938C007840A7 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; }; 527F241B0B5D938C007840A7 /* X11.icns in Resources */ = {isa = PBXBuildFile; fileRef = 50459C5F038587C60ECA21EC /* X11.icns */; }; @@ -21,7 +20,6 @@ /* Begin PBXFileReference section */ 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = ""; }; - 3F5E1BDF0D04BF110020CA24 /* server-main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "server-main.c"; sourceTree = ""; }; 50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = ""; }; 50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = ""; }; 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; @@ -67,7 +65,6 @@ 20286C2AFDCF999611CA2CEA /* Sources */ = { isa = PBXGroup; children = ( - 3F5E1BDF0D04BF110020CA24 /* server-main.c */, 50EE2AB703849F0B0ECA21EC /* bundle-main.c */, ); name = Sources; @@ -173,7 +170,6 @@ buildActionMask = 2147483647; files = ( 527F241D0B5D938C007840A7 /* bundle-main.c in Sources */, - 3F5E1BE10D04BF110020CA24 /* server-main.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index ed41e6884..cd74ceae6 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -36,10 +36,11 @@ #include -#define DEFAULT_APP "/usr/X11/bin/xterm" +#define DEFAULT_CLIENT "/usr/X11/bin/xterm" +#define DEFAULT_STARTX "/usr/X11/bin/startx" static int launcher_main(int argc, char **argv); -int server_main(int argc, char **argv); +static int server_main(int argc, char **argv); int main(int argc, char **argv) { Display *display; @@ -57,7 +58,7 @@ int main(int argc, char **argv) { /* Now, try to open a display, if so, run the launcher */ display = XOpenDisplay(NULL); if(display) { - fprintf(stderr, "X11.app: closing the display and sleeping for 2s to allow the X server to start up.\n"); + fprintf(stderr, "X11.app: Closing the display and sleeping for 2s to allow the X server to start up.\n"); /* Could open the display, start the launcher */ XCloseDisplay(display); @@ -70,29 +71,13 @@ int main(int argc, char **argv) { } /* Start the server */ - fprintf(stderr, "X11.app: main(): running server_main()"); + fprintf(stderr, "X11.app: Could not connect to server. Starting X server."); return server_main(argc, argv); } -int launcher_main (int argc, char **argv) { - char *command = DEFAULT_APP; +static int myexecvp(const char *command) { const char *newargv[7]; - int child; const char **s; - - CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(CFSTR("app_to_run"), kCFPreferencesCurrentApplication); - - if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { - CFPreferencesSetAppValue(CFSTR("app_to_run"), CFSTR(DEFAULT_APP), kCFPreferencesCurrentApplication); - CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); - } else { - int len = CFStringGetLength((CFStringRef)PlistRef)+1; - command = (char *)malloc(len); - CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); - fprintf(stderr, "command=%s\n", command); - } - - if (PlistRef) CFRelease(PlistRef); newargv[0] = "/usr/bin/login"; newargv[1] = "-fp"; @@ -102,7 +87,7 @@ int launcher_main (int argc, char **argv) { newargv[5] = command; newargv[6] = NULL; - fprintf(stderr, "X11.app: Launching X11 Application:\n"); + fprintf(stderr, "X11.app: Launching %s:\n", command); for(s=newargv; *s; s++) { fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s); } @@ -111,3 +96,43 @@ int launcher_main (int argc, char **argv) { perror ("X11.app: Couldn't exec."); return(1); } + +int launcher_main (int argc, char **argv) { + char *command = DEFAULT_CLIENT; + + CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(CFSTR("app_to_run"), kCFPreferencesCurrentApplication); + + if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { + CFPreferencesSetAppValue(CFSTR("app_to_run"), CFSTR(DEFAULT_CLIENT), kCFPreferencesCurrentApplication); + CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); + } else { + int len = CFStringGetLength((CFStringRef)PlistRef)+1; + command = (char *)malloc(len); + CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); + } + + if (PlistRef) + CFRelease(PlistRef); + + return myexecvp(command); +} + +int server_main (int argc, char **argv) { + char *command = DEFAULT_STARTX; + + CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(CFSTR("startx_script"), kCFPreferencesCurrentApplication); + + if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { + CFPreferencesSetAppValue(CFSTR("startx_script"), CFSTR(DEFAULT_STARTX), kCFPreferencesCurrentApplication); + CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); + } else { + int len = CFStringGetLength((CFStringRef)PlistRef)+1; + command = (char *)malloc(len); + CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); + } + + if (PlistRef) + CFRelease(PlistRef); + + return myexecvp(command); +} diff --git a/hw/xquartz/bundle/launcher-main.c b/hw/xquartz/bundle/launcher-main.c deleted file mode 100644 index 60a1624b9..000000000 --- a/hw/xquartz/bundle/launcher-main.c +++ /dev/null @@ -1,81 +0,0 @@ -/* main.c -- X application launcher - - Copyright (c) 2007 Apple Inc. - - 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, sublicense, 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 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 - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) 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. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. */ - -#include -#include -#include - -#include - -#define DEFAULT_APP "/usr/X11/bin/xterm" - -int launcher_main (int argc, char **argv) { - char *command = DEFAULT_APP; - const char *newargv[7]; - int child; - - - CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(CFSTR("app_to_run"), - kCFPreferencesCurrentApplication); - - if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { - CFPreferencesSetAppValue(CFSTR("app_to_run"), CFSTR(DEFAULT_APP), - kCFPreferencesCurrentApplication); - CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); - } else { - int len = CFStringGetLength((CFStringRef)PlistRef)+1; - command = (char *) malloc(len); - CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); - fprintf(stderr, "command=%s\n", command); - } - - if (PlistRef) CFRelease(PlistRef); - - newargv[0] = "/usr/bin/login"; - newargv[1] = "-fp"; - newargv[2] = getlogin(); - newargv[3] = "/bin/sh"; - newargv[4] = "-c"; - newargv[5] = command; - newargv[6] = NULL; - - child = fork(); - - switch (child) { - case -1: /* error */ - perror ("fork"); - return EXIT_FAILURE; - case 0: /* child */ - execvp (newargv[0], (char **const) newargv); - perror ("Couldn't exec"); - _exit (1); - } - - return 0; -} diff --git a/hw/xquartz/bundle/server-main.c b/hw/xquartz/bundle/server-main.c deleted file mode 100644 index 7e1bd7025..000000000 --- a/hw/xquartz/bundle/server-main.c +++ /dev/null @@ -1,903 +0,0 @@ -/* bundle-main.c -- X server launcher - - Copyright (c) 2002-2007 Apple Inc. 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, sublicense, 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 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 - NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT - HOLDER(S) 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. - - Except as contained in this notice, the name(s) of the above - copyright holders shall not be used in advertising or otherwise to - promote the sale, use or other dealings in this Software without - prior written authorization. - - Parts of this file are derived from xdm, which has this copyright: - - Copyright 1988, 1998 The Open Group - - Permission to use, copy, modify, distribute, and sell this software - and its documentation for any purpose is hereby granted without fee, - provided that the above copyright notice appear in all copies and - that both that copyright notice and this permission notice appear in - supporting documentation. - - The above copyright notice and this permission notice 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 - NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP 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. - - Except as contained in this notice, the name of The Open Group shall - not be used in advertising or otherwise to promote the sale, use or - other dealings in this Software without prior written authorization - from The Open Group. */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#define X_SERVER "/usr/X11/bin/Xquartz" -#define XTERM_PATH "/usr/X11/bin/xterm" -#define WM_PATH "/usr/bin/quartz-wm" -#define DEFAULT_XINITRC "/usr/X11/lib/X11/xinit/xinitrc" -#define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin" - -/* what xinit does */ -#ifndef SHELL -# define SHELL "sh" -#endif - -#undef FALSE -#define FALSE 0 -#undef TRUE -#define TRUE 1 - -#define MAX_DISPLAYS 64 - -static int server_pid = -1, client_pid = -1; -static int xinit_kills_server = FALSE; -static jmp_buf exit_continuation; -static const char *server_name = NULL; -static Display *server_dpy; - -static char *auth_file; - -typedef struct addr_list_struct addr_list; - -struct addr_list_struct { - addr_list *next; - Xauth auth; -}; - -static addr_list *addresses; - - -/* Utility functions. */ - -/* Return the current host name. Matches what Xlib does. */ -static char * -host_name (void) -{ -#ifdef NEED_UTSNAME - static struct utsname name; - - uname(&name); - - return name.nodename; -#else - static char buf[100]; - - gethostname(buf, sizeof(buf)); - - return buf; -#endif -} - -static int -read_boolean_pref (CFStringRef name, int default_) -{ - int value; - Boolean ok; - - value = CFPreferencesGetAppBooleanValue (name, CFSTR ("org.x.X11"), &ok); - return ok ? value : default_; -} - -static inline int -binary_equal (const void *a, const void *b, int length) -{ - return memcmp (a, b, length) == 0; -} - -static inline void * -binary_dup (const void *a, int length) -{ - void *b = malloc (length); - if (b != NULL) - memcpy (b, a, length); - return b; -} - -static inline void -binary_free (void *data, int length) -{ - if (data != NULL) - free (data); -} - - -/* Functions for managing the authentication entries. */ - -/* Returns true if something matching AUTH is in our list of auth items */ -static int -check_auth_item (Xauth *auth) -{ - addr_list *a; - - for (a = addresses; a != NULL; a = a->next) - { - if (a->auth.family == auth->family - && a->auth.address_length == auth->address_length - && binary_equal (a->auth.address, auth->address, auth->address_length) - && a->auth.number_length == auth->number_length - && binary_equal (a->auth.number, auth->number, auth->number_length) - && a->auth.name_length == auth->name_length - && binary_equal (a->auth.name, auth->name, auth->name_length)) - { - return TRUE; - } - } - - return FALSE; -} - -/* Add one item to our list of auth items. */ -static void -add_auth_item (Xauth *auth) -{ - addr_list *a = malloc (sizeof (addr_list)); - - a->auth.family = auth->family; - a->auth.address_length = auth->address_length; - a->auth.address = binary_dup (auth->address, auth->address_length); - a->auth.number_length = auth->number_length; - a->auth.number = binary_dup (auth->number, auth->number_length); - a->auth.name_length = auth->name_length; - a->auth.name = binary_dup (auth->name, auth->name_length); - a->auth.data_length = auth->data_length; - a->auth.data = binary_dup (auth->data, auth->data_length); - - a->next = addresses; - addresses = a; -} - -/* Free all allocated auth items. */ -static void -free_auth_items (void) -{ - addr_list *a; - - while ((a = addresses) != NULL) - { - addresses = a->next; - - binary_free (a->auth.address, a->auth.address_length); - binary_free (a->auth.number, a->auth.number_length); - binary_free (a->auth.name, a->auth.name_length); - binary_free (a->auth.data, a->auth.data_length); - free (a); - } -} - -/* Add the unix domain auth item. */ -static void -define_local (Xauth *auth) -{ - char *host = host_name (); - -#ifdef DEBUG - fprintf (stderr, "x11: hostname is %s\n", host); -#endif - - auth->family = FamilyLocal; - auth->address_length = strlen (host); - auth->address = host; - - add_auth_item (auth); -} - -/* Add the tcp auth item. */ -static void -define_named (Xauth *auth, const char *name) -{ - struct ifaddrs *addrs, *ptr; - - if (getifaddrs (&addrs) != 0) - return; - - for (ptr = addrs; ptr != NULL; ptr = ptr->ifa_next) - { - if (ptr->ifa_addr->sa_family != AF_INET) - continue; - - auth->family = FamilyInternet; - auth->address_length = sizeof (struct in_addr); - auth->address = (char *) &(((struct sockaddr_in *) ptr->ifa_addr)->sin_addr); - -#ifdef DEBUG - fprintf (stderr, "x11: ipaddr is %d.%d.%d.%d\n", - (unsigned char) auth->address[0], - (unsigned char) auth->address[1], - (unsigned char) auth->address[2], - (unsigned char) auth->address[3]); -#endif - - add_auth_item (auth); - } - - freeifaddrs (addrs); -} - -/* Parse the display number from NAME and add it to AUTH. */ -static void -set_auth_number (Xauth *auth, const char *name) -{ - char *colon; - char *dot, *number; - - colon = strrchr(name, ':'); - if (colon != NULL) - { - colon++; - dot = strchr(colon, '.'); - - if (dot != NULL) - auth->number_length = dot - colon; - else - auth->number_length = strlen (colon); - - number = malloc (auth->number_length + 1); - if (number != NULL) - { - strncpy (number, colon, auth->number_length); - number[auth->number_length] = '\0'; - } - else - { - auth->number_length = 0; - } - - auth->number = number; - } -} - -/* Put 128 bits of random data into DATA. If possible, it will be "high - quality" */ -static int -generate_mit_magic_cookie (char data[16]) -{ - int fd, ret, i; - long *ldata = (long *) data; - - fd = open ("/dev/random", O_RDONLY); - if (fd > 0) { - ret = read (fd, data, 16); - close (fd); - if (ret == 16) return TRUE; - } - - /* fall back to the usual crappy rng */ - - srand48 (getpid () ^ time (NULL)); - - for (i = 0; i < 4; i++) - ldata[i] = lrand48 (); - - return TRUE; -} - -/* Create the keys we'll be using for the display named NAME. */ -static int -make_auth_keys (const char *name) -{ - Xauth auth; - char key[16]; - - if (auth_file == NULL) - return FALSE; - - auth.name = "MIT-MAGIC-COOKIE-1"; - auth.name_length = strlen (auth.name); - - if (!generate_mit_magic_cookie (key)) - { - auth_file = NULL; - return FALSE; - } - - auth.data = key; - auth.data_length = 16; - - set_auth_number (&auth, name); - - define_named (&auth, host_name ()); - define_local (&auth); - - free (auth.number); - - return TRUE; -} - -/* If ADD-ENTRIES is true, merge our auth entries into the existing - Xauthority file. If ADD-ENTRIES is false, remove our entries. */ -static int -write_auth_file (int add_entries) -{ - char *home, newname[1024]; - int fd, ret; - FILE *new_fh, *old_fh; - addr_list *addr; - Xauth *auth; - - if (auth_file == NULL) - return FALSE; - - home = getenv ("HOME"); - if (home == NULL) - { - auth_file = NULL; - return FALSE; - } - - snprintf (newname, sizeof (newname), "%s/.XauthorityXXXXXX", home); - mktemp (newname); - - if (XauLockAuth (auth_file, 1, 2, 10) != LOCK_SUCCESS) - { - /* FIXME: do something here? */ - - auth_file = NULL; - return FALSE; - } - - fd = open (newname, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (fd >= 0) - { - new_fh = fdopen (fd, "w"); - if (new_fh != NULL) - { - if (add_entries) - { - for (addr = addresses; addr != NULL; addr = addr->next) - { - XauWriteAuth (new_fh, &addr->auth); - } - } - - old_fh = fopen (auth_file, "r"); - if (old_fh != NULL) - { - while ((auth = XauReadAuth (old_fh)) != NULL) - { - if (!check_auth_item (auth)) - XauWriteAuth (new_fh, auth); - XauDisposeAuth (auth); - } - fclose (old_fh); - } - - fclose (new_fh); - unlink (auth_file); - - ret = rename (newname, auth_file); - - if (ret != 0) - auth_file = NULL; - - XauUnlockAuth (auth_file); - return ret == 0; - } - - close (fd); - } - - XauUnlockAuth (auth_file); - auth_file = NULL; - return FALSE; -} - - -/* Subprocess management functions. */ - -static int -start_server (char **xargv) -{ - int child; - - child = fork (); - - switch (child) - { - case -1: /* error */ - perror ("fork"); - return FALSE; - - case 0: /* child */ - execv (X_SERVER, xargv); - perror ("Couldn't exec " X_SERVER); - _exit (1); - - default: /* parent */ - server_pid = child; - return TRUE; - } -} - -static int -wait_for_server (void) -{ - int count = 100; - - while (count-- > 0) - { - int status; - - server_dpy = XOpenDisplay (server_name); - if (server_dpy != NULL) - return TRUE; - - if (waitpid (server_pid, &status, WNOHANG) == server_pid) - return FALSE; - - sleep (1); - } - - return FALSE; -} - -static int -start_client (void) -{ - int child; - - child = fork(); - - switch (child) { - char *temp, buf[1024]; - - case -1: /* error */ - perror("fork"); - return FALSE; - - case 0: /* child */ - /* Setup environment */ - temp = getenv("DISPLAY"); -// if (temp == NULL && temp[0] != 0) - setenv("DISPLAY", server_name, TRUE); - - temp = getenv("PATH"); - if (temp == NULL || temp[0] == 0) - setenv ("PATH", DEFAULT_PATH, TRUE); - else if (strnstr(temp, "/usr/X11/bin", sizeof(temp)) == NULL) { - snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", temp); - setenv("PATH", buf, TRUE); - } - - /* First try value of $XINITRC, if set. */ - temp = getenv("XINITRC"); - if (temp != NULL && temp[0] != 0 && access(temp, R_OK) == 0) - execlp (SHELL, SHELL, temp, NULL); - - /* Then look for .xinitrc in user's home directory. */ - temp = getenv("HOME"); - if (temp != NULL && temp[0] != 0) { - chdir(temp); - snprintf (buf, sizeof (buf), "%s/.xinitrc", temp); - if (access(buf, R_OK) == 0) - execlp(SHELL, SHELL, buf, NULL); - } - - /* Then try the default xinitrc in the lib directory. */ - - if (access(DEFAULT_XINITRC, R_OK) == 0) - execlp(SHELL, SHELL, DEFAULT_XINITRC, NULL); - - /* Then fallback to hardcoding an xterm and the window manager. */ - - // system(XTERM_PATH " &"); - execl(WM_PATH, WM_PATH, NULL); - - perror("exec"); - _exit(1); - - default: /* parent */ - client_pid = child; - return TRUE; - } -} - -static void -sigchld_handler (int sig) -{ - int pid, status; - - again: - pid = waitpid (WAIT_ANY, &status, WNOHANG); - - if (pid > 0) - { - if (pid == server_pid) - { - server_pid = -1; - - if (client_pid >= 0) - kill (client_pid, SIGTERM); - } - else if (pid == client_pid) - { - client_pid = -1; - - if (server_pid >= 0 && xinit_kills_server) - kill (server_pid, SIGTERM); - } - goto again; - } - - if (server_pid == -1 && client_pid == -1) - longjmp (exit_continuation, 1); - - signal (SIGCHLD, sigchld_handler); -} - - -/* Server utilities. */ - -static Boolean -display_exists_p (int number) -{ - char buf[64]; - xcb_connection_t *conn; - char *fullname = NULL; - int idisplay, iscreen; - char *conn_auth_name, *conn_auth_data; - int conn_auth_namelen, conn_auth_datalen; - - // extern void *_X11TransConnectDisplay (); - // extern void _XDisconnectDisplay (); - - /* Since connecting to the display waits for a few seconds if the - display doesn't exist, check for trivial non-existence - if the - socket in /tmp exists or not.. (note: if the socket exists, the - server may still not, so we need to try to connect in that case..) */ - - sprintf (buf, "/tmp/.X11-unix/X%d", number); - if (access (buf, F_OK) != 0) - return FALSE; - - sprintf (buf, ":%d", number); - conn = xcb_connect(buf, NULL); - if (xcb_connection_has_error(conn)) return FALSE; - - xcb_disconnect(conn); - return TRUE; -} - - -/* Monitoring when the system's ip addresses change. */ - -static Boolean pending_timer; - -static void -timer_callback (CFRunLoopTimerRef timer, void *info) -{ - pending_timer = FALSE; - - /* Update authentication names. Need to write .Xauthority file first - without the existing entries, then again with the new entries.. */ - - write_auth_file (FALSE); - - free_auth_items (); - make_auth_keys (server_name); - - write_auth_file (TRUE); -} - -/* This function is called when the system's ip addresses may have changed. */ -static void -ipaddr_callback (SCDynamicStoreRef store, CFArrayRef changed_keys, void *info) -{ -#if DEBUG - if (changed_keys != NULL) { - fprintf (stderr, "x11: changed sc keys: "); - CFShow (changed_keys); - } -#endif - - if (auth_file != NULL && !pending_timer) - { - CFRunLoopTimerRef timer; - - timer = CFRunLoopTimerCreate (NULL, CFAbsoluteTimeGetCurrent () + 1.0, - 0.0, 0, 0, timer_callback, NULL); - CFRunLoopAddTimer (CFRunLoopGetCurrent (), timer, - kCFRunLoopDefaultMode); - CFRelease (timer); - - pending_timer = TRUE; - } -} - -/* This code adapted from "Living in a Dynamic TCP/IP Environment" technote. */ -static Boolean -install_ipaddr_source (void) -{ - CFRunLoopSourceRef source = NULL; - - SCDynamicStoreContext context = {0}; - SCDynamicStoreRef ref; - - ref = SCDynamicStoreCreate (NULL, - CFSTR ("AddIPAddressListChangeCallbackSCF"), - ipaddr_callback, &context); - - if (ref != NULL) - { - const void *keys[4], *patterns[2]; - int i; - - keys[0] = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4); - keys[1] = SCDynamicStoreKeyCreateNetworkGlobalEntity (NULL, kSCDynamicStoreDomainState, kSCEntNetIPv6); - keys[2] = SCDynamicStoreKeyCreateComputerName (NULL); - keys[3] = SCDynamicStoreKeyCreateHostNames (NULL); - - patterns[0] = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv4); - patterns[1] = SCDynamicStoreKeyCreateNetworkInterfaceEntity (NULL, kSCDynamicStoreDomainState, kSCCompAnyRegex, kSCEntNetIPv6); - - if (keys[0] != NULL && keys[1] != NULL && keys[2] != NULL - && keys[3] != NULL && patterns[0] != NULL && patterns[1] != NULL) - { - CFArrayRef key_array, pattern_array; - - key_array = CFArrayCreate (NULL, keys, 4, &kCFTypeArrayCallBacks); - pattern_array = CFArrayCreate (NULL, patterns, 2, &kCFTypeArrayCallBacks); - - if (key_array != NULL || pattern_array != NULL) - { - SCDynamicStoreSetNotificationKeys (ref, key_array, pattern_array); - source = SCDynamicStoreCreateRunLoopSource (NULL, ref, 0); - } - - if (key_array != NULL) - CFRelease (key_array); - if (pattern_array != NULL) - CFRelease (pattern_array); - } - - - for (i = 0; i < 4; i++) - if (keys[i] != NULL) - CFRelease (keys[i]); - for (i = 0; i < 2; i++) - if (patterns[i] != NULL) - CFRelease (patterns[i]); - - CFRelease (ref); - } - - if (source != NULL) - { - CFRunLoopAddSource (CFRunLoopGetCurrent (), - source, kCFRunLoopDefaultMode); - CFRelease (source); - } - - return source != NULL; -} - - -/* Entrypoint. */ - -void -termination_signal_handler (int unused_sig) -{ - signal (SIGTERM, SIG_DFL); - signal (SIGHUP, SIG_DFL); - signal (SIGINT, SIG_DFL); - signal (SIGQUIT, SIG_DFL); - - longjmp (exit_continuation, 1); -} - -int -server_main (int argc, char **argv) -{ - char **xargv; - int i, j; - int fd; - - xargv = alloca (sizeof (char *) * (argc + 32)); - - if (!read_boolean_pref (CFSTR ("no_auth"), FALSE)) - auth_file = XauFileName (); - - /* The standard X11 behaviour is for the server to quit when the first - client exits. But it can be useful for debugging (and to mimic our - behaviour in the beta releases) to not do that. */ - - xinit_kills_server = read_boolean_pref (CFSTR ("xinit_kills_server"), TRUE); - - for (i = 1; i < argc; i++) - { - if (argv[i][0] == ':') - server_name = argv[i]; - } - - if (server_name == NULL) - { - static char name[8]; - - /* No display number specified, so search for the first unused. - - There's a big old race condition here if two servers start at - the same time, but that's fairly unlikely. We could create - lockfiles or something, but that's seems more likely to cause - problems than the race condition itself.. */ - - for (i = 0; i < MAX_DISPLAYS; i++) - { - if (!display_exists_p (i)) - break; - } - - if (i == MAX_DISPLAYS) - { - fprintf (stderr, "%s: couldn't allocate a display number", argv[0]); - exit (1); - } - - sprintf (name, ":%d", i); - server_name = name; - } - - if (auth_file != NULL) - { - /* Create new Xauth keys and add them to the .Xauthority file */ - - make_auth_keys (server_name); - write_auth_file (TRUE); - } - - /* Construct our new argv */ - - i = j = 0; - - xargv[i++] = argv[j++]; - - if (auth_file != NULL) - { - xargv[i++] = "-auth"; - xargv[i++] = auth_file; - } - - /* By default, don't listen on tcp sockets if Xauth is disabled. */ - - if (read_boolean_pref (CFSTR ("nolisten_tcp"), auth_file == NULL)) - { - xargv[i++] = "-nolisten"; - xargv[i++] = "tcp"; - } - - while (j < argc) - { - if (argv[j++][0] != ':') - xargv[i++] = argv[j-1]; - } - - xargv[i++] = (char *) server_name; - xargv[i++] = NULL; - - /* Detach from any controlling terminal and connect stdin to /dev/null */ - -#ifdef TIOCNOTTY - fd = open ("/dev/tty", O_RDONLY); - if (fd != -1) - { - ioctl (fd, TIOCNOTTY, 0); - close (fd); - } -#endif - - fd = open ("/dev/null", O_RDWR, 0); - if (fd >= 0) - { - dup2 (fd, 0); - if (fd > 0) - close (fd); - } - - if (!start_server (xargv)) - return 1; - - if (!wait_for_server ()) - { - kill (server_pid, SIGTERM); - return 1; - } - - if (!start_client ()) - { - kill (server_pid, SIGTERM); - return 1; - } - - signal (SIGCHLD, sigchld_handler); - - signal (SIGTERM, termination_signal_handler); - signal (SIGHUP, termination_signal_handler); - signal (SIGINT, termination_signal_handler); - signal (SIGQUIT, termination_signal_handler); - - if (setjmp (exit_continuation) == 0) - { - if (install_ipaddr_source ()) - CFRunLoopRun (); - else - while (1) pause (); - } - - signal (SIGCHLD, SIG_IGN); - - if (client_pid >= 0) kill (client_pid, SIGTERM); - if (server_pid >= 0) kill (server_pid, SIGTERM); - - if (auth_file != NULL) - { - /* Remove our Xauth keys */ - - write_auth_file (FALSE); - } - - free_auth_items (); - - return 0; -} From 603a8b73d46d59e5f9f0be39be8317f3fadfe7e6 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 20 Dec 2007 18:29:57 -0800 Subject: [PATCH 341/552] XQuartz: Cleaned up command line arguments. --- hw/xquartz/darwin.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index d6eb100ac..463073485 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -701,20 +701,15 @@ void ddxInitGlobals(void) */ int ddxProcessArgument( int argc, char *argv[], int i ) { - if( !strcmp( argv[i], "-launchd" ) ) { - ErrorF( "Launchd command line argument noticed.\n" ); - return 1; - } +// if ( !strcmp( argv[i], "-fullscreen" ) ) { +// ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" ); +// return 1; +// } - if ( !strcmp( argv[i], "-fullscreen" ) ) { - ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" ); - return 1; - } - - if ( !strcmp( argv[i], "-rootless" ) ) { - ErrorF( "Running rootless inside Mac OS X window server.\n" ); - return 1; - } +// if ( !strcmp( argv[i], "-rootless" ) ) { +// ErrorF( "Running rootless inside Mac OS X window server.\n" ); +// return 1; +// } // This command line arg is passed when launched from the Aqua GUI. if ( !strncmp( argv[i], "-psn_", 5 ) ) { @@ -838,12 +833,6 @@ int ddxProcessArgument( int argc, char *argv[], int i ) exit(0); } - // XDarwinStartup uses this argument to indicate the IOKit X server - // should be started. Ignore it here. - if ( !strcmp( argv[i], "-iokit" ) ) { - return 1; - } - return 0; } From fa9680a7305d7f906da1bdeb40a0863ef66316e6 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 20 Dec 2007 19:38:20 -0800 Subject: [PATCH 342/552] XQuartz: Added localization. (cherry picked from commit 7a5cc7bfbb296a2c41a580b063324c448f7131db) --- .../bundle/Dutch.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../bundle/Dutch.lproj/Localizable.strings | Bin 0 -> 1084 bytes .../Dutch.lproj/main.nib/keyedobjects.nib | Bin 0 -> 32654 bytes .../bundle/French.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../bundle/French.lproj/Localizable.strings | Bin 0 -> 1168 bytes .../French.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36404 bytes .../bundle/German.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../bundle/German.lproj/Localizable.strings | Bin 0 -> 1096 bytes .../German.lproj/main.nib/keyedobjects.nib | Bin 0 -> 34995 bytes .../bundle/Italian.lproj/InfoPlist.strings | Bin 0 -> 278 bytes .../bundle/Italian.lproj/Localizable.strings | Bin 0 -> 1146 bytes .../Italian.lproj/main.nib/keyedobjects.nib | Bin 0 -> 33677 bytes .../bundle/Japanese.lproj/InfoPlist.strings | Bin 0 -> 272 bytes .../bundle/Japanese.lproj/Localizable.strings | Bin 0 -> 916 bytes .../Japanese.lproj/main.nib/keyedobjects.nib | Bin 0 -> 33095 bytes .../bundle/Spanish.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../bundle/Spanish.lproj/Localizable.strings | Bin 0 -> 1134 bytes .../Spanish.lproj/main.nib/keyedobjects.nib | Bin 0 -> 35294 bytes .../bundle/X11.xcodeproj/project.pbxproj | 122 ++++++++++++++++++ hw/xquartz/bundle/da.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../bundle/da.lproj/Localizable.strings | Bin 0 -> 1090 bytes .../bundle/da.lproj/main.nib/keyedobjects.nib | Bin 0 -> 34164 bytes hw/xquartz/bundle/fi.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../bundle/fi.lproj/Localizable.strings | Bin 0 -> 1102 bytes .../bundle/fi.lproj/main.nib/keyedobjects.nib | Bin 0 -> 34765 bytes hw/xquartz/bundle/ko.lproj/InfoPlist.strings | Bin 0 -> 266 bytes .../bundle/ko.lproj/Localizable.strings | Bin 0 -> 916 bytes .../bundle/ko.lproj/main.nib/keyedobjects.nib | Bin 0 -> 32690 bytes hw/xquartz/bundle/no.lproj/InfoPlist.strings | Bin 0 -> 276 bytes .../bundle/no.lproj/Localizable.strings | Bin 0 -> 1084 bytes .../bundle/no.lproj/main.nib/keyedobjects.nib | Bin 0 -> 33581 bytes hw/xquartz/bundle/pl.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../bundle/pl.lproj/Localizable.strings | Bin 0 -> 1116 bytes .../bundle/pl.lproj/main.nib/keyedobjects.nib | Bin 0 -> 35113 bytes hw/xquartz/bundle/pt.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../bundle/pt.lproj/Localizable.strings | Bin 0 -> 1192 bytes .../bundle/pt.lproj/main.nib/keyedobjects.nib | Bin 0 -> 34533 bytes .../bundle/pt_PT.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../bundle/pt_PT.lproj/Localizable.strings | Bin 0 -> 1140 bytes .../pt_PT.lproj/main.nib/keyedobjects.nib | Bin 0 -> 35485 bytes hw/xquartz/bundle/ru.lproj/InfoPlist.strings | Bin 0 -> 274 bytes .../bundle/ru.lproj/Localizable.strings | Bin 0 -> 1122 bytes .../bundle/ru.lproj/main.nib/keyedobjects.nib | Bin 0 -> 36593 bytes hw/xquartz/bundle/sv.lproj/InfoPlist.strings | Bin 0 -> 260 bytes .../bundle/sv.lproj/Localizable.strings | Bin 0 -> 1106 bytes .../bundle/sv.lproj/main.nib/keyedobjects.nib | Bin 0 -> 35017 bytes .../bundle/zh_CN.lproj/InfoPlist.strings | Bin 0 -> 260 bytes .../bundle/zh_CN.lproj/Localizable.strings | Bin 0 -> 884 bytes .../zh_CN.lproj/main.nib/keyedobjects.nib | Bin 0 -> 31481 bytes .../bundle/zh_TW.lproj/InfoPlist.strings | Bin 0 -> 266 bytes .../bundle/zh_TW.lproj/Localizable.strings | Bin 0 -> 890 bytes .../zh_TW.lproj/main.nib/keyedobjects.nib | Bin 0 -> 31748 bytes 52 files changed, 122 insertions(+) create mode 100644 hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Dutch.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/French.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/French.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/French.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/German.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/German.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Italian.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Italian.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Japanese.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/Spanish.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/da.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/da.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/fi.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/fi.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/ko.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/ko.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/ko.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/no.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/no.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/pl.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/pl.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/pt.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/pt.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/pt_PT.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/ru.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/ru.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/sv.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/sv.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/zh_CN.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib create mode 100644 hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings create mode 100644 hw/xquartz/bundle/zh_TW.lproj/Localizable.strings create mode 100644 hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib diff --git a/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings b/hw/xquartz/bundle/Dutch.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..8f978d63fbce745e2fa97bce8bc07e87994e97bb GIT binary patch literal 274 zcmZvX%L>9U5Jm6WuLxZhv9%i);zA3GAa2~amA(}1gSHC#@#;wyA|fHVlbJh{ljlo; zd>L(2E73t0o%B$ql-vz%)sd-Hp$5%4*W7aAks9ak)RR5qzB`xC%mFLbQVU&ir}#2$ znO~wtGq$I_#w<_MKi(C-{`1m~xP_xq@zecHX(vZeg&GpY5H=9mzCuUG7*Pu~p*p8# N>1~hwPePv~c>|}zEV}>z literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Dutch.lproj/Localizable.strings b/hw/xquartz/bundle/Dutch.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..1ff39fe67e3ec640b76f88b8af94b5211b17a38b GIT binary patch literal 1084 zcmcJOF;BxV5QT5xxF(|OV|l5#jkA2nv5`au~Mq_^$*NqG}AuAI_4qk#@{T7ks57pN$dz6 zot-hK_Q0Lg`=#b5`!{C8KH-MY&#yz)t6oCnH8WIi`?THn%0K zUWFqqD)r~@Ug$k1{V#pZ EKNc>xSpWb4 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Dutch.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..95c26d7b3f437730f9b969b7f44c6aeddbee0693 GIT binary patch literal 32654 zcmd?S2YeJ&_b@#7&d%=6&XVk=7f3bP!?=y(O49h4Oj!`l^qZ!hBlC`;|&ek}fcdM;wXm3k%&Gr`uPp1so!J^qCe7%daWBr$1BE@Na0m=dO( znZqn(7BfqjZOnG&S!M^bn|X*xr23%!lrLC4TZbQXPzE~9VIx9B$d8U2p_#29n92X@9f?1jB?01m>vaU_nyNjL?k z;yj#>%Wyfazyt9hJQxqf!|-TahwJe@cp9FGXW`j+Azp+Z!%yH9cr9Lsx8m*iS-cNF zj}PM4@FDyTeiy%w&)~E86MP9@!(ZXA@l6=(7XAtU!ZIw&Dp(Ec%zCo^corMLhO-fD z0-MApvpH-oTf&yHecAr(0CogBimhhHvE$h$wwY~Vr{h8Fz3dG3epX}&JCl8Yoy9)L zKE%#vA7L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k=sg%ywnt05iMK?Y>PM#zCp zuo)Jr zF&Zb}B%F$|I0I*)4dc*23ti|&zvl`W6LB6c#3WpVDVT~&aXGHUG+cvgaXn_@M$E=s z%)>3X9e3fExDN~Q5EkJvJb@*63d^wqE3pdC;dfYrwOEf0*o4jaGyZ}t*oxP&4R7Kd zyoZnRZyG_PXf%zZ@idVp(=?h+Gs#AAWRi^t)g^VM;mA( z<E!9&4HPI!yLM_xvH>jO%(Or5# z59v?(i~ga1IgmT@i`7tclcc%%h5c6C-GE{ea=MOoV7xNNc$}2dH*YH}-;4IGOFL*O=55gve_$NWvvThDoHnEh8mLM$0&fmKd2RlVqyI`thCFekGV8@!}S*ps@eO%Kug& z3&n3fmlR2rWwJujWVL)I>t%yv$>)+Qd6F;NWQXjQ0@*Kxa!88gm>idrQYvL~S}LSc zs^q-XNUhY#1^G#uHH_fOgPM+C{r-PwlOJw4e6Zff}k| zI#^%VH}p-7)Zsc(qjZeEr{i^^PS$BUU1zFIkpCWL>OF^iy4? zD|MBo>pIQQEX~$j&C`6{raN_y?$rZ&P!DT~mg*_3)GDpkAN7J>)XVy-pY-!5F!1?y Li+R5Px8C~?1gk>^ literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/French.lproj/InfoPlist.strings b/hw/xquartz/bundle/French.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..88e1f04ac78e9f0b14a2b6fa57a4a02ae91d8edd GIT binary patch literal 276 zcmZvXy9&ZU5Jhk8S1c)mn3%>wEHt19Vq;?~c`2F)Nfh+s)w5ez1X*_P?983nv+s`r z`7+w6R-%(`y6B}$DY*yQsv}dYLJgX8Zn@>e6E)7?sV95I{d6v$nIl%LwN|?0PVr^h zGrvTQ7Hm&POYH~HO3di*uZ2v3!NQhL@m^e>XMq} Mw>X2%<&^MNmKi5~87?33dXO%sSW!Q8*3f;U>8R@V#AcY>+6U zmE+m@doypw`TDja8=12UD{N||RrbVfZO=9{kMwFQEK5$oUA7Ss0~^}JYJ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CBgjEjj6j* zPo>^WtCrRvEjg`ksB$Pa)I5|GniR?n?Ma99?DXmBE7EtQUk%p^w+g3(`-U}~6J8cx z8!ikV4wr<>BDEroBfTRdBJ(2KB6}lOGAd-mW~|95&bXM_GP7r9C=)X$W^T>AG_dBt z#|E~|vRS7G#YC$_W25&+>qq0FO``G9X3^HsHg0ISi1{V=a=HF|q#NVLxe0Evo95nd zZ@SrTuAA@PaqqfCF4rw}@4FRlrTfr*?AE&VF3)Xp`EHBb?!IsZZjamRzHtZKL3h|4 zb;sNf?xZVmrS7!*)tz(a-352aU3O*en!AA&Fa|4O6|9QY@D98aYvDb3FV@8eFb*4F zLu`aiFdh@I1-8OOOu}Srj~y`uyI?o$iM_EO8no!gAg1B~3}gA7Jq|)dLct;UJZ9rC z9FDKxNF0r0aXe1MDL5Tx;w+ql^YCrV!G)NMOK~}VfU9sduEBM<0rPMZeui6dJMP2+ z+>M2}4-a4w9>OD7jK}ZZ_WILK+7&JiBSQ69{~Lphs=@dzHt zV|W}-;K@9V-{4t1hv)MW9tN_D9zcgfvSN9syFiIa!q5osdvk|2*uOG%U@ zX)7J1lXQ{p(o6bCe*y7HP|_qM<*EwF5+{R2WT<4zFc~4Q$|xBlV`aQdlBqI7X38v? zBlBc|u6oAr*Zm_KBA4asW#K*`h>RDHkz#M z^=VDfuG&L;X>aYPMtvI4R2`sU&Co23>R=Tes@XbHN9$M}uak7D&d{0qmd@1$nxl(! tu`bgUx=KINJl&+5b*C2Sm%3kz^q?NsAIm4~<%x;;kJbDC$NyU|{0nE!f^Gl+ literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings b/hw/xquartz/bundle/Italian.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..4121698807d1e090f39cf32b14d130c197c7d5f8 GIT binary patch literal 278 zcmZvXI}5@<5QL}pR~#vWn3%>wEHt19Vq;?~c`2F)Nfh+QtKVH=5oEcWz1^9;+4o0* zd>QRjE73_eUG!3>l-dJq)lsQcfdD)B=lq~p8`VnW*S8!Po*V+E{I_F`9&(F{P*s7nu(F4zJgJX&k<>e`}TAhSe+`pp2Bjhm?@M#OKPq_(VZ$wxW{_# z!Iz%u-6^i~DO0K?AtDTE>1~fit;AWUU1IX+%%}P$L2b>35Op)!sYVJ#uOg>B7i372 z8LMNY9-386-yFXfs(ZwVyoPM*&`Y-`{co7&QTr9V2DT~BI1h1p>%eORaz>5j;VVps zz7X{*@rwN=k?!lb52sJ@7lS*Vl3Sv^<}W#0?-#IBxIBgK^+A6hZeDj1v(9z?H~Q#* Mqo41`b{gA`|3uBg{Qv*} literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Italian.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b6e2e1bb15ab0bea00866cc2a56194ac46e19224 GIT binary patch literal 33677 zcmeFa2YggT_cuN>cki~lB)jRAYzibH38eR)Y8KXdOUSs?oOJfGkH|9{`l`{MJ!?!9wo&YU@O&i9nL zJEp1L-qIQ$e-vRv5Qh|qM@pnY+My8>ZOtuqN8`YVR!7sY2y1igcspDg8sQjor>(ZN z#RK8FYu`sIq#jjX*jv6>XKl5LxJK`89#CnUVyi1~KJ>JKTtNcTp#+qIGEhD$LdB>I zRiU|P5qcDDM4QlN^d#DjohB!`rcQc_0BiJ1%{ z!^m(lg4{u@#762#18F1<(n_Y08AK#=$bDo1d4N1ZHj&Nb39_BMNOqG~$iK*b@)kKr z-X@305pt58B4^3(Ts3Fr`f~%hVcc+T z6n6(#%T3@KxJGU^H=nzYTfwd39^qDVk8zv0XSip%m$_HC1KgY3A?`iy7<8iiIND7q=!6kdv8g;5c$NKhmxk`>vC9EC|yswh)f6#W## z6eAQP6*k3KMWdogahGC>Vya@MVzy$AVi7#QSn+^jnPQbGAnZL+i;;$;ZDZP~5Ngn(FjcrJN)@k4R3)jhRXM6W zRldrk+NOG5wNtfA^|I;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O8^xN6*|EcNDpKCs&Fo2sF`&Ox-w$@Tg38j`w?PMr}@3~tfZf@?q?{St9jeV_H z(`ag!S}K*uBtvP4oiuh*X*2}2Rwf$zGAbIhN^i&X{O~+~#q&7_tX%7`b<8?xow5q7 zLaWHSU|q7VTGy=-tJJz}-LoEAkF7GR+(_t3G!#r3BiI4v-m@>}>Ar?HuVG?Og8s!TH=(+ttVw z=SpyW=gM#$b(KWC6VW}w5ivHRC^9YbVq|IL>!^^Z(5Ni;LibvChCADx>ptgx;C>bz z93AGF;EDGv@+5n}%%skgqjg?FHLgm;>^zdWwD`A+(ZeGmNA{K5VZe|`VE{uch0{`UTkhK-t76K5uvNoIhQXp+ogv&^h8$!3lD)})wJlWsE2X0z2~neAqW*=6>aeJ01`n#1OpIbrh5DN|qy z%~^BaTr^kAHB)R#%#kVm88(<@B zitk|yd>`9jTWpV^*a^E}H|&97*cbcgQKBl?4$(lh#t{^1H-kt=gGuE}*cm_xWB zH|A#CoLg}lZpR(C6L;Zm{0V=`eYigl;=w$WhqJ|Yc5x)TIfnf_hK0xS=RAQY^E95x zvw1Er;4k?rUd+pQC4a+fc|C97jhw-ocnfE7Ht*uSe1LQLFdyTSe2NRWkc;>NU*fBL zolCfsZ}UBV$d9><%lQSr-t5GTwcgad8HM!qE^x>T1{(cZLO>Iw1GC#CfZD!Yb$M|?X-h-)Xv&fduUJXrG0gP zhU*X=ro(ll+SI9|G)kk@t42vh$Lcs8uM>5$PScq>Tj%I}P0&S}q)T+UuF}=IPE#~h o(=}7KX}0dr96hLq^e6pU3-p3s2~3Ft7ZmiSYxaNB|EJ#l7kPo#c>n+a literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings b/hw/xquartz/bundle/Japanese.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..2d6330fa7e8c58dec36e792de0f62f76ea0cb2fa GIT binary patch literal 272 zcmZvXJqp4=5QSguDMHF1x~8!Z3k@iO*x1-g{uDI{Nfh*C9>ZIB09#SNO<^Ij?9S}G zH?!Zq-s;Meqq%a0T5GSZE{YXVI}uA&RB~lRhnR5AxFzHr6^*}AO?8L++_*euwpf8C z8taHV!WV17`~%U^knL)v9?R9>k9Uf%{=T#%FX70P{&YL$W}fD1?&g8w!(`MZ3*al@ av0bS)4WW-_)JGkmS$4}}e-qNzaC`tP?k{@) literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Japanese.lproj/Localizable.strings b/hw/xquartz/bundle/Japanese.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..99821ea1f97299c57a8f24ee4719eb7661e96a0a GIT binary patch literal 916 zcmcIjyG{a85FPB~C)`jH#Y1h3Q7JScY9$*;l;?urE`mrXw6HKFYE1kA6MG9Q3qJ%K zD+?1TwKU?HWf#z%Ozz&f^E~&=-Jib9OIQqvNm(*d6-O+dT2hjN*wl`sNzXB*%(ME! z%m_+ImZi=ZL)y$~a&Pea*V1A|o0$fe!>?bIgDtGRmpg0>cnMJeEcnHRf-~3Ts3NCIiwUMPfe>8=+|!AH9uB!l&efN z-23~;a^y^Pi`H=*YCUlyZRRK&4bPI72zfMQkt^ii47aB%i3{wah;wvsO)UlsCN}yr zL%uu~yjT;LC?Sx#>%p~rtit1e?X+N&cb@PIdBeMWC$eK*-RM;vQz=h~>ZcpkiDSMUDhEi#p(m@#l@1i0bLD_IF)RkW%DUuB- z(ngvuR#h}taJXD$TT-Sojx$zeTW;E{CU+5wlqed-qhyqYa!@WRM8#+-nuAuLb?8;J z5p6;rp~L74^d-i`O+L--T?DL#(R;Y;`j zd>!Awzu~+1Awh&8Qlca_L`Cd~J#ixLB#cCp7!peoNfJpT=_HF}lYCM_%19s5mz0xX zq=Jkfb)=q{NHZBn#*@ip23bHBl0{@0SxH_aTgY2vE7?YNk%QzT@-aC=z9z@X338Hr zOD>bEBS6X zhBK8+6;sXBGh>-?%rnfh%p7Je^CGj5S;nkk)-vmu^~^@*E#@6&JF|n?%j{zgGDn%u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wql zO{slpO6j0p|4&V4`c!2BMsY>MWH3;NG;vQs#f@-D6J-E5LK(dGzTBPH=Xsw6B6Dys z0+mD@(j;T^Cr}N>QKjNIR*|ym#Y=>;uY|rh%_E`I5d$xU^z1)7*-e7<1=bIG+3czI26>~r@!k~gbYG~it8bsL&L8ei^!xmU{;mFB{Lj-5r#G5i zOqW?`mYWC6W9Dh|oLOmBnbqbM^H1|O^nhN_2O^*!41j?!1m1w*@Ft9gScroJ7!MO6 z36dcNQo#;s;07Rav&G-U=9>OArwI|EQTde3d>*xtb#T0IeY9$U|-CAFqD6h!SPlseL@^cr=g9@LxqQa_5K z!4yryXe5oMSc;&@H-4wNytB zsDT=(iJo!`ZpDGzmV-HjJ8&3x=5X%Ly|@oY@&F#hLpg>=@F*U`<2atj^CW(or*bOW zIgQ=yW0R4YGdPRi<8031T+ZitJfDlWm=|*if6B{w6|doSyn(;uExe7(`D@<86?}jX z@(+BBf8vvTn$Pjie1R`<6<70BuHhSei|=wR*YN{x;6`rZC;UvB>uGsO+DMQDONexk zFzF;+q?`1V-qJ@RrN0c6ArdXaWTcFiSc#K(884G0Ns?u%q>4=pafw&b1;i4OOv#ew zDXHX0uH?yFDUkV6B*n5wmPn~Ala;bs*2;R>D4S%9Y?U3dOTLkBWxsqchvkSImlIMc z=jEbYk}CO4ewS-GDNt&!FnyNN6)TJKvt7wL1>MWhD@9T%UK#R0Qmo<~g R%?b#3k--Ts@_*N|{{T5LF{l6l literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings b/hw/xquartz/bundle/Spanish.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..0e4287d14155bd78396ae9d50cecdf37782ca44a GIT binary patch literal 276 zcmZvXJqyAx6h-gsuLvEBXzk)44q8wIadB~#ep%GEv{lf*?XI3=5D^K2*`eYG|HB7cM*TGSSXo1G4 PGc?O@dF+p3`W(v}Gg2+L literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Spanish.lproj/Localizable.strings b/hw/xquartz/bundle/Spanish.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..652f432a5d851f6f95f560020908ed4dd3542812 GIT binary patch literal 1134 zcmcJPO-{ow5QS&mQ&?SAsE9Q}sDcG7KtkQHVACcc1f@wxTB@Fovv3jMdv>fE_Q-N< z&+nTz(|sm;vUwNx@YGuEX&q1V2(=Oof!yAyPZbl?o0dUvcER2g@nYq1!TD60`o53Yt4 z@$b3SEFl)Ij$36LR$)0eMJv!No3iFf%%iWE8hrf`Sq5jimq=3_lD>P(1|P98jFQ~u z@aXJ;;2IM1f$Kotv__&#TPC*#!Ld;5%U=zo~j4v&_eRUU=< zzxLChN=l?+N9g8g;;-S#SDzuTlb)th;rOrYcVy2%bK~=O34#U4cfNjS!Ro&-Jdj8K O6vv5Pf+|ewnDYntYr#?g literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Spanish.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..029349dd078a50c3a5074bda5f5fec378cb6904f GIT binary patch literal 35294 zcmeFa2YeLO`T#oT?98^=B)jRAYHC8 z#M|(8{5sx)-@tF-1NZ}c5Pyh|;gk3j{tTbP=kW#nJ^mSA##iul86%U+lroj9k1R+Q zB1@E|%F<+gWf`(TvJzRTY_M#IY^=;ItCKaz?vhQEwaTW*rpl(tX2~9uJuF)wTPRy8 zdqVc4Y_)8?Y=i6>*-NtRvX^ChWN*m!%J$0+$d1cS$WF>m$@ao&JCdzq>)G*a z1KY$lvu*4&b~<|xE3gl+53+OFhuBBhrR*|xIlF>g#cp6Xu}`yG*_YUD>?`apb`Sd& zdw~6bJ;;8@9%DaYKV{Fb7ucWJpV`aoHTD+Aa&k_=X*nI|!TECmTpuow3+2MNXfBCM z=F+)=TsAj|%i#*Sa;}1_#; zw}acm?dA4y?{f#ZW84YuBkm0MId_5khP%l9%w6WLa96osx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Y#!RIT0g6w*Q@l4`fqxTUaQyX*Yuluy?#e;)c?@`)F0>%^;Z3f-ljj-JM_Py z3z)!LEkY0QhX4qKAP9y&&<_T}US5B(Q-U9FPib&_M!$0ZU;Sq(cU*fK`wQYakoeLN2U_4e&W^f$fkF1yBe@Pz)uo z8}`6H_#O_xAvg-hp%luX94g>6oQ3mn0jl9L{0_BH2iM>x)Wco42Tjlnf5Ag|3{T-1 zv_l7UN|Wp=yGdW^C;erBd`Wn(CE~si%qiWSv zbwk}&cho&~Up-I{)nnDB+SLo}f-hk=^hG~>1$$yI4931V07Ebghu}~gjwA6cjKXM~ zh%xvMPRI9fCeFe6sNo_sqZRF#f=keY5(z)Rk1!3F;|g4jYw$B%hwE_zZo;j&19xH} z7U3@3jeGDr`~eT*5j=(`unfzw0xR(xR^cVQj90J@uj4Ijz(#DsW^BP$e2UMp13Sq? zKGdChkUs@bAoZp`)Sm`XD1}o5MbZcwO=D?1O`yp%m8MZFy-%}g9xbGJN+1i_DA~)P zxyVC6NK9UdozmzN%Al2$Nm-Obxs*p6X)|r3d@7(qDxzJqoA%H?I!r&(aVn)UDyIrM zO=sy>x=7VjL$!33ZqRLNpu2RB?$ZNmp;mfAZPZR3)X66H;g{K${n(!aIFN(*b?(Ol zID|tvoFh1rNAM^f!%-Z~6L>ODJi(Jh$ ze1+@yI^W_3ZsaCz<`#a$Pq>ZS`GwKV=x+ELJ&j&QkTK90Y=jz-#(ze$$>c3ez2_J6 K@Be>|DgOX<^AGy~ literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj index ddb6f8364..ae8ec07e6 100644 --- a/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj +++ b/hw/xquartz/bundle/X11.xcodeproj/project.pbxproj @@ -20,6 +20,57 @@ /* Begin PBXFileReference section */ 0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = ""; }; + 3FB03E460D1B6C05005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E470D1B6C05005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E480D1B6C05005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E490D1B6C05005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E4A0D1B6C05005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E4B0D1B6C05005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Italian; path = Italian.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E4C0D1B6C05005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E4D0D1B6C05005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E4E0D1B6C05005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E4F0D1B6C05005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E500D1B6C05005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E510D1B6C05005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E520D1B6C05005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E530D1B6C05005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E540D1B6C05005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E550D1B6C05005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E560D1B6C05005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/Localizable.strings; sourceTree = ""; }; + 3FB03E570D1B6C17005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E580D1B6C17005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Dutch; path = Dutch.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E590D1B6C17005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E5A0D1B6C17005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E5B0D1B6C17005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = German; path = German.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E5C0D1B6C17005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Italian; path = Italian.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E5D0D1B6C17005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Japanese; path = Japanese.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E5E0D1B6C17005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E5F0D1B6C17005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = no; path = no.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E600D1B6C17005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E610D1B6C17005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E620D1B6C17005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt_PT; path = pt_PT.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E630D1B6C17005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E640D1B6C17005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Spanish; path = Spanish.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E650D1B6C17005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E660D1B6C17005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E670D1B6C17005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/InfoPlist.strings; sourceTree = ""; }; + 3FB03E680D1B6C34005958A5 /* da */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = da; path = da.lproj/main.nib; sourceTree = ""; }; + 3FB03E690D1B6C34005958A5 /* Dutch */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Dutch; path = Dutch.lproj/main.nib; sourceTree = ""; }; + 3FB03E6A0D1B6C34005958A5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = fi; path = fi.lproj/main.nib; sourceTree = ""; }; + 3FB03E6B0D1B6C34005958A5 /* French */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = French; path = French.lproj/main.nib; sourceTree = ""; }; + 3FB03E6C0D1B6C34005958A5 /* German */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = German; path = German.lproj/main.nib; sourceTree = ""; }; + 3FB03E6D0D1B6C34005958A5 /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/main.nib; sourceTree = ""; }; + 3FB03E6E0D1B6C34005958A5 /* Japanese */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Japanese; path = Japanese.lproj/main.nib; sourceTree = ""; }; + 3FB03E6F0D1B6C34005958A5 /* ko */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ko; path = ko.lproj/main.nib; sourceTree = ""; }; + 3FB03E700D1B6C34005958A5 /* no */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = no; path = no.lproj/main.nib; sourceTree = ""; }; + 3FB03E710D1B6C34005958A5 /* pl */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pl; path = pl.lproj/main.nib; sourceTree = ""; }; + 3FB03E720D1B6C34005958A5 /* pt */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt; path = pt.lproj/main.nib; sourceTree = ""; }; + 3FB03E730D1B6C34005958A5 /* pt_PT */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = pt_PT; path = pt_PT.lproj/main.nib; sourceTree = ""; }; + 3FB03E740D1B6C34005958A5 /* ru */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = ru; path = ru.lproj/main.nib; sourceTree = ""; }; + 3FB03E750D1B6C34005958A5 /* Spanish */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Spanish; path = Spanish.lproj/main.nib; sourceTree = ""; }; + 3FB03E760D1B6C34005958A5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = sv; path = sv.lproj/main.nib; sourceTree = ""; }; + 3FB03E770D1B6C34005958A5 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_CN; path = zh_CN.lproj/main.nib; sourceTree = ""; }; + 3FB03E780D1B6C34005958A5 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = zh_TW; path = zh_TW.lproj/main.nib; sourceTree = ""; }; 50459C5F038587C60ECA21EC /* X11.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = X11.icns; sourceTree = ""; }; 50EE2AB703849F0B0ECA21EC /* bundle-main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "bundle-main.c"; sourceTree = ""; }; 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; @@ -130,6 +181,26 @@ buildConfigurationList = 527F24080B5D8FFC007840A7 /* Build configuration list for PBXProject "X11" */; compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + da, + Dutch, + fi, + Italian, + ko, + no, + pl, + pt, + pt_PT, + ru, + Spanish, + sv, + zh_CN, + zh_TW, + ); mainGroup = 20286C29FDCF999611CA2CEA /* X11 */; projectDirPath = ""; projectRoot = ""; @@ -180,6 +251,23 @@ isa = PBXVariantGroup; children = ( 1870340FFE93FCAF11CA0CD7 /* English */, + 3FB03E680D1B6C34005958A5 /* da */, + 3FB03E690D1B6C34005958A5 /* Dutch */, + 3FB03E6A0D1B6C34005958A5 /* fi */, + 3FB03E6B0D1B6C34005958A5 /* French */, + 3FB03E6C0D1B6C34005958A5 /* German */, + 3FB03E6D0D1B6C34005958A5 /* Italian */, + 3FB03E6E0D1B6C34005958A5 /* Japanese */, + 3FB03E6F0D1B6C34005958A5 /* ko */, + 3FB03E700D1B6C34005958A5 /* no */, + 3FB03E710D1B6C34005958A5 /* pl */, + 3FB03E720D1B6C34005958A5 /* pt */, + 3FB03E730D1B6C34005958A5 /* pt_PT */, + 3FB03E740D1B6C34005958A5 /* ru */, + 3FB03E750D1B6C34005958A5 /* Spanish */, + 3FB03E760D1B6C34005958A5 /* sv */, + 3FB03E770D1B6C34005958A5 /* zh_CN */, + 3FB03E780D1B6C34005958A5 /* zh_TW */, ); name = main.nib; sourceTree = ""; @@ -188,6 +276,23 @@ isa = PBXVariantGroup; children = ( 0867D6ABFE840B52C02AAC07 /* English */, + 3FB03E570D1B6C17005958A5 /* da */, + 3FB03E580D1B6C17005958A5 /* Dutch */, + 3FB03E590D1B6C17005958A5 /* fi */, + 3FB03E5A0D1B6C17005958A5 /* French */, + 3FB03E5B0D1B6C17005958A5 /* German */, + 3FB03E5C0D1B6C17005958A5 /* Italian */, + 3FB03E5D0D1B6C17005958A5 /* Japanese */, + 3FB03E5E0D1B6C17005958A5 /* ko */, + 3FB03E5F0D1B6C17005958A5 /* no */, + 3FB03E600D1B6C17005958A5 /* pl */, + 3FB03E610D1B6C17005958A5 /* pt */, + 3FB03E620D1B6C17005958A5 /* pt_PT */, + 3FB03E630D1B6C17005958A5 /* ru */, + 3FB03E640D1B6C17005958A5 /* Spanish */, + 3FB03E650D1B6C17005958A5 /* sv */, + 3FB03E660D1B6C17005958A5 /* zh_CN */, + 3FB03E670D1B6C17005958A5 /* zh_TW */, ); name = InfoPlist.strings; sourceTree = ""; @@ -196,6 +301,23 @@ isa = PBXVariantGroup; children = ( 52D9C0EC0BCDDF6B00CD2AFC /* English */, + 3FB03E460D1B6C05005958A5 /* da */, + 3FB03E470D1B6C05005958A5 /* Dutch */, + 3FB03E480D1B6C05005958A5 /* fi */, + 3FB03E490D1B6C05005958A5 /* French */, + 3FB03E4A0D1B6C05005958A5 /* German */, + 3FB03E4B0D1B6C05005958A5 /* Italian */, + 3FB03E4C0D1B6C05005958A5 /* Japanese */, + 3FB03E4D0D1B6C05005958A5 /* ko */, + 3FB03E4E0D1B6C05005958A5 /* no */, + 3FB03E4F0D1B6C05005958A5 /* pl */, + 3FB03E500D1B6C05005958A5 /* pt */, + 3FB03E510D1B6C05005958A5 /* pt_PT */, + 3FB03E520D1B6C05005958A5 /* ru */, + 3FB03E530D1B6C05005958A5 /* Spanish */, + 3FB03E540D1B6C05005958A5 /* sv */, + 3FB03E550D1B6C05005958A5 /* zh_CN */, + 3FB03E560D1B6C05005958A5 /* zh_TW */, ); name = Localizable.strings; sourceTree = ""; diff --git a/hw/xquartz/bundle/da.lproj/InfoPlist.strings b/hw/xquartz/bundle/da.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..88e1f04ac78e9f0b14a2b6fa57a4a02ae91d8edd GIT binary patch literal 276 zcmZvXy9&ZU5Jhk8S1c)mn3%>wEHt19Vq;?~c`2F)Nfh+s)w5ez1X*_P?983nv+s`r z`7+w6R-%(`y6B}$DY*yQsv}dYLJgX8Zn@>e6E)7?sV95I{d6v$nIl%LwN|?0PVr^h zGrvTQ7Hm&POYH~HO3di*uZ2v3!NQhL@m^e>XMq} Mw>%8KK7 zcW1`q&G(O;+Q^(;TWWL5tgwWyoxNIYIjaxb5Lq))z7-o$F|eUcts=+So|+Bsn)(0E z4#b>F$5Sx3Sk9j8jB#nt#P!_TOAqNV?}V6;_Pj%-zDq`iswHcwE6AvODDy^5g|3{@ z>ff=-7*Z@sIgccJQn^>bBW>+hxYJdJ#*%HsRPT1}1(C*e}=G4fIy4i_r zf{)HFc!qX^UI$z7GPM;W_Iss$TJS*CA!F-LA*_rF-H-0#(AOEvsaMnDcG+SJ`ND3! zC>u`oLe|3^<5PwHgn8b$Re4p>U&V`OTlqRUkfTi4p{JDR?8`e^p(;4lV(8TEnVol1 z`gDgY_T`^?Ywht8{7`gFe8DUi&*{lQ)64fTI{Kn$bcP-b`sIg|=vEj0j@9Rh*Ash| z36ZwPuVBbQQa^MzHDym{3l3FBW50uaiJF<`FMA3?WQ II<8^-1@m{fhX4Qo literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/da.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..4a2bd4bded4b836fde586c94351c85611c514456 GIT binary patch literal 34164 zcmeFa34Bw<`!{-KlAJ6jZIkXTEe&n4bZ@%vd(*vX%f6P-hElquq%EuH8Bi8M5S2~Y zcLhZhSwsZ)1yNKG5fKqZ*%d`mMD8=^By9@Cpa0*z_r0IbdtVAPIhix_%(Krk-#Ho6 z+SJh29usqvK@4UjjFgcvETd#pLxLxot!)jKmI1--me!%cCTs1u2DmgN*fM6kxwgH{ zl|i%Ce8R{X#mM5^DDh&Qsolh*8jVXu|5Ec5b6t+@rtMn%C&MvnM$aTLDNHt#$K*3b zOc^taS-`AfHZq%-&CE9DIp%q02lFzsi`mP(%Is%eW8PriWjZraQ79SZBLgZ%C8!RWQ4?xL7Sx8?;ooF54Lyh+MvtO}=rObc ztwih4HuM~N9=(WmqP^%9v>zQrZ=yr!F!~66kItiu=nr%Y{f%y8jFs38yW`$C0Egl* z9ED?WJWj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strings b/hw/xquartz/bundle/fi.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..8e4f6474fd29ef2edb5e82a98f879321a49cefd2 GIT binary patch literal 274 zcmZvX%L>9U5Jm6WuLxZhv9%i);zA3GAa2~amA(}1gSHC#@#;wyf+8WglbJh{ljlo; zd>L(2E73t0o%B$ql-vz%)sd-Hp$5%4*W7aAks9ak)RR5qzB`xC%mFLbQVU&ir}#2$ znO~wtGq$I_#w<_MKi(C-{`1m~xP_xq@zecHX%s;fYKSX_uz|?-6*@Y`h+3!#)j2gw MZ)xm*68ap;8>)3I#Q*>R literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/fi.lproj/Localizable.strings b/hw/xquartz/bundle/fi.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..e8420fbaa583bd0560a910ba37af49f0ac587930 GIT binary patch literal 1102 zcmcJNJ5R$v5QMkRuQ;WQc!(B+5P~8+B{~WklbFQulb9sR|IKfp1irb8V~0LE`FxMv znc3O<`L$CUn6q0;EV9f>o3LBi)M6`GecFPXFGj*%cLOqd*0*b$6XR@6&Vql9(GQNr3>@><#`6<7pQeBbKnV;oy;Vam9oP8DQQi9{* z?I~NG(oSnRp~}mhwj93}{v?G(zR1xF-e+(7uAhl^ybf*?Km~ZhAs`?>&Ts0O^~yNj9Okup|ovl59)?5rH#O1W^&Bh=?Lp zM5K!iMMOanm7<8EC?G{dv18@FbIxwEfx!K~|NH;vKKDKs2-!V5XXc%^w>dkurLm!{ zJt^q~!iXRl;*cCEkQ!-*hE2A#wl!Fr2ZpsUb?t4g2+v)8 z6e*EvR7qZfbg|ytZWeH@&ZVNJ%rezdpKH5mtDgLcc%((iC>>>@9F&g=P%$b;bJ2t7 z3G_5tgVv&F&?fXO+Jd&D9cVXt0lkd&p%2j~=u`AL`T|`?zhjIEmSY80VJ&vW9@rCm zVLu#+<8VAq!s)m_&c}tg2-o0&cqkqQKcny%Y{uho6TS<#;x;@5&%iUWfGM7XAH)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c!yvfY_^ z@68{6e(l0W=IqXLn^|FN%lO*ayQNlg`m_z6FD&OZtNAmo(FsDAsxq^;SfRN*IB0kHi9E+XC|lDEyB8FTTk15;xu324ndePC-WX5Z?OV7? ukW@`Kp$W`$nD=m>iun=d1xlu#yXvubo{xXuX{vu_p8C%pR^IJdTl*g_ueWpn literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/no.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..ca25327f5393df6fbd306b95803947c90dbf8b52 GIT binary patch literal 33581 zcmeFa2Xs_b*D!p}nLc-t%%t}W>Aegog!D4$nIwc7N*t0Q#FPmsRDpXCL8U7QsPrPD zf&~k9ioGEMA_&;9At2Ii{QKOSNhT0{e4qba|62dIK3GZa+BGh#(1)A{mk+6;h83o@{CFXtcHt4eqqIjS4om*G+7MTO)(5Q69=iMW_tTLyOT` zvS(umnr72D@Q*?1S|<5hvk6I1^Xl zv3MMwfE)0g*oxcnbUXv!g=gb?@G|@WUWp&Z>+pKK5pTge@Gks3eht5kKf)j5&+s99 z5`T+-#6RI*@UQqXzJjmgKk;7#5gCyaj<^s{;!S)=JV_u)BpH4NlMIqg@<=`@A{C^X z3?;+Ja59>VCkBD2VBaxb}$EG7?;N6A{Uj%*{3lkH?Dd6~RU-XQzQ zN91Gj3Hgj1Bge^?ND?fGk;F<2l2plH zNtz^Gk|QaSluJyK3Q478m}HD(tYn;|PI9NDNzyEtB$+0eA-PMkOtM_^kYs~oi)5?h zG0AqxGm=*%uS(vQyd(Kka!_(a@`dE2))YO4my_NViHKlRhbZPP$9_yz~X>%hEm4z0!Ts{nGcO?@K?C z9*`cEo{*lDo|1kgJuUr9`nU9k49O%irA#C9mif!VW$`kDY@jS%mLbcP<;efILDT zC6AUT%I3(EKa?d73<3o*~bc=g14><#Lm}LOxVJT3#!^LvEH&kT=MiaTip-?JR3QnO>=oFp`FNL?lN1<1Q zD{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?k7>T?KGQ|tazs4xr!Gmc2~Sw@kYhoiv1ODSG-&CLB&TE2PzI$9I7}{akS!C z#fgej72i~xuK1zir;0Nb=PG`!xL9$y;#$QY6@ORaN@=B{QdOy`bga}?x>UMXdRBT@ z`c?*1237`FhE|4GMpi~w##Y8x8Y+`2Qz}y{(<(D7b1L&H3o45%%PK1>hg1%$99daY zIi_-4Z(Vp)>Un++ETTx>WQiyRnJuI zs(P{N<*L`J-u!=RI`gk8%P0zm5}E@_5{gkIq7p0&Cr|`M6jH(#SFLjWT1KvBTJD955=3Lq?@h1#O`n z1VJ!#gir{BaEO3N=nhd34Y3dhy`di@zyKHsgJ1{@gV$jsjDk!Mpo0bM;Dl`O0)Pnw z3dX?%cpD}|9^^v-%z&9N8;W2Kl)yZg4+~%+EQY1997`5A277a0rgTQ8*4K;S^NC88`>ka0#x!HK>7`@E6p>xvAC)ruPBwvwTWq0|ijFGYOHQ8JCmGQE_Oq5A-kW7)Oa+pk)BV>lm zltSv#Dzl_hx}_ndMCsGF$%%53%#~Aoz>5MoLl(+evPjO6bLFRUv3cCAG^@-r<~g(4 zykuTAYs^}+&a5{Z&Aa9U^P%||{m>sMqYWLHja~#qR5%`Ua5Cm$K2FC%oQ=g;g7fer`~(-_XSf_oaV4(C zZ}3~(fE%$Kf57dy6L;fYJb)E=1driK{0)D{vv>jj#4C6mZ{pv03mfnb-p7CNUwVd` zQvf|jZKxeRPcKj>dXZkHE)+>UD4Jp^j`~nM4WJ|%OsSMc!|4rrlQh!FN?GJ04~-#{ zn8wjWnnbxYl?v!xnngwQK7By*X#p*yCA5q_r!Q$0t)X?ap2}zwmDBgMjdsvaw1@W5 zL8_p`bd*leDLPFT=`vlT8&pemR8I|bo9sTs6&iw)Lf1v!~l8_38fKYVLn? Cj}eRj literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/pl.lproj/InfoPlist.strings b/hw/xquartz/bundle/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..b9c9502149297d06b225625c20a74e31a4347144 GIT binary patch literal 274 zcmZvXy9&ZU5Jhk8S1c)mXiQ@v78+0lv9Yn0yo`?|BvH|iSI=%?A+qe=*_k`DXJ2m( z<;!TTO0o7jtI$)a5^^`RQA?&$i5fKHTye{Y2dbUFRY&%O`{7(ZGkdH^3(a-Ko#0Eg zVg3a*nzB9ZG-7$0{P8aFb>Ek^#0?y!@}F*_J5Eb^WV%rZRiHjm1Yr%4?aOs=j3Ko^ RW2!T1mfq6X|HSk;k`JdvEV%#x literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/pl.lproj/Localizable.strings b/hw/xquartz/bundle/pl.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..4ae12d77f898e651e2b8baf8f441d5baad8be6aa GIT binary patch literal 1116 zcmcJPPfx-?5XGk_6Fx=5kr<3;V+?_VnrQT9)JvrmkkTS;X=wcH>hEm}R6LW-(%t#< z=FQs)-#>O{J@aj3GYc%X)F#|Yn_6TEr%x;JZ|)Pq4Om$hvls2{}?DYb>Gl z(b2a{cGrehxta-HA65~spbVc5r);5C+$#KYOT7^`GQ1OPhkD*x3*ab%vCk zTi|`srTWzi7Oq~39<`>jFR^PfR@7eX>Iqva@B z#x95#?wDKMVd=gbmpR|z3SYeoIYk@QRK=>Pqxq1Y7fffTndW({(P zP4D~Wx|e@~Rk#tH`gpd}K6Lf;3UTYr2E-Ov3i~)(VL!XiaNN&iQ}-7j8oy@% literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pl.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..e9ca5404b8aa575c2689e2d72f571aa627953e0e GIT binary patch literal 35113 zcmeEv2YeLO`skdqGuvj9?4}1&HYAV)NZIt>!=|&@&|6rNg#?mpNFjuxa}WUm6%|2x z2SpJPv4DsODn-RYQE7Hj5exPL?>jTQ$p!+~d;kCUey@2iuseI^obPr<+ zF)=3@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>+{po#;Y0CSwYE z5s^^iSR98Fa3ZGTr#J871ARfXacnnYANj!u3Sb&9i5sR@D%di5k;|;9BJ6MhP@gY9J8dXcxQ7@@_s)1^x z0@N$2nQE?Ds#dCvYNtA=*VP-Uv+AaLs9q{uMW}u%QVmdp)DZQ7`cREjhO()6jaFWTij-Dk)yL`+HAziY87fm{sp)F2T3{YG^UTv`zFA-vnwQKH^NLw+UNiqO ztIRv*J@cXY#C%4zsV>!{2GoceQ&VbAEvXf?rS{a3I?9=T-%K7@1ge8jt6R zoX#1X$yq#uXYm}K#|wEeXY(@tj#u&;Ue6nOGjHK-yn}z{-Mp9g^Kbk+|G|H99-rbf z{1>0+BEHNee1*%of-Ct3-{QM`pC9p4ekQf0uJ}oP@s|K;B7qVl!O}+BNeAgDp%NyY zrK@z89@0y~B|`d3qzsV35-r0dMn(#VP2$BVE*T}G#Vbl!#=M}NWTK=?hGa^X%#c|! zN9M|WStLs&Tb9XkSs|-rjjWRmvPrhcHrXLNC07p0VL2+tB~MOEz7$BIT#^zgmA~bx zT$dYiOYX{jc_@$Nsjj8#=(@U|ZlD|K0Nq3f>LC59Zmrwu_Bup|>M-3!chfy|Z~eA@ tN58A1^guma$LJ9{UORPyPSL3vb(((uu=paipKB8@(lF}3{lE3}e*t3`SMC4+ literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/pt.lproj/InfoPlist.strings b/hw/xquartz/bundle/pt.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..33c637448e0e489cb79e7d95fa78e79811090653 GIT binary patch literal 274 zcmZvXy9&ZU5Jhk8S1c)mXiQ@v78+0lv9Yn0ybNj*k|^l!`XB1qEfhqC-Fe-aJ^OrV zC|^cvRf@IONrmo8l~B9l8?{s_m3V{CxL0Hu@j$iHx9X@KQQw@(XJ-$Kw9s4^)Csy& z8}^^^MpKTbokp0a$sg?!UH5ruOWeRwD*u`OQa&Iu3ZV+rCyK~xi0oXhgJTTo1scNr+8S3DAvoehzeRL$Zla_6DQ+1l1XB+GlTnW#bUwUR{fp#5)wu1 z)@65}qcD1FTL(P?`P^B5SwQe+3iFBtWmcN`iciXmz*wCi-)!-9!Pt1~U z%lo}%O~#VQz*F(=a|K;!kMm2H*!`U7dX(v--!?X9y62lBeXltMs3yopSK-l)vSb~a z23#el$G=7@I7Vz-HPT!Q&Qv*)vrVzPnycocoI|XcYGeOBvI(47o}nG%uyz$aOJdAM z+i7y`z+=!)o=yG1XMr@~+e8fi@JpNaXUo#feYZ?K!;kG%elb-(g8x8^&e z^EOJZp7Uc^)6XGc4GWNS8;=EpP?=BG}0X`{V(W%{Ar5CXb;9(Pxia2pHh7S lnqzPkusLkvK0CIITm~ht@4|3S9sj!wwU0VRyc?tL-vE-m&fNe2 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pt.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..e88cccdba36e84db38b7d58e4e211d32cae24e87 GIT binary patch literal 34533 zcmeFa2YeL8`!K#UyI1#;+@<$idLg|BBt5zGrz!)Zk}Rp$g@54ybk}x@Qj8@V$zr_CYLE-3Yik7f|<=M zU{*5gnDxvC<~e2yvz6J->}K{bFEB4NuQ0DNZ!m8$hne@86U+tXW9D<_3+7AaTjmDy z7vhi%sSuAe$OXA0KNN)YC>TYcOq7QTP%*)zPT#Es>UE(ft zKXbovf5_xAwTzc(WG*sKnO+tw>m!SmrOPs8{bboPgRE3mCL18Dm5r2*met7`W#eQM zWbLvJ*}byqvKcZ#Mr04l9+5pNTP|BGTQA!ndtSCpwomq=>?PR&*+JQ1*%8@M*=cBd zMs`;Ak?a%MHQ9C9*Rr2vf5~pj8M#WXmb=Q`KC&`oLedTw_`^$@D z)8)l-gS?dC+tMdKwgYq}!@5)cePs&fpFUUWZUy@&z zUz1;#eenb9~{CD{u3Pynxa)pz^S>d8^Q}`oQf^j0 zuiU2GuH2=3P5HX=4dp@Q`|>j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q z^09m^Kg-_=umY_hE7)pcHM3e+p;j9!-0G@5da|CTXX-h6zFwr4=medpm+O^!jb5iW z=*>DwZ`V8YF1=T$>O(qBr|S%TQlHjmb*8?guj=bMTi@3A^h2Gi^K`y0(1p547wZyT zs>^h_t{^Y+rfO7^YExbErvM71APS*o)RJ0LJL*84s0($cUeuQc&>$K@!)PRpCWCA= zjwaAViX|5*(j+vArqT?WP4j3WEvBXPB`u>Bw3^n^dfG%=X&WU|3hkl&bdZkFQ94E^ z=m+|d&eKJ@LO; zF$Z%~Zo#44mfLej?#$h|C->q0Jdg+TP#(dfcnkyE*};(<&9NNE@vPWlVh>N^DLkEL z@f@DV3wbdw;}yJ`*YY>Kk+*OXZ{uW6;XS;c5AqQ{%E$NwpW-uojx+fZU*T(fowNBC z-{l9K!?~Qt`CPz-T*Sp(!lhis`gZ?sPn-V$hDr@l literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings b/hw/xquartz/bundle/pt_PT.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..33c637448e0e489cb79e7d95fa78e79811090653 GIT binary patch literal 274 zcmZvXy9&ZU5Jhk8S1c)mXiQ@v78+0lv9Yn0ybNj*k|^l!`XB1qEfhqC-Fe-aJ^OrV zC|^cvRf@IONrmo8l~B9l8?{s_m3V{CxL0Hu@j$iHx9X@KQQw@(XJ-$Kw9s4^)Csy& z8}^^^MpKTbokp0a$sg?!UH5ruOWeRwD*u`OQa&Iu3ZV+rCyK~xi0oXhgJTTo1sc-CwC=?Vl#x{=8#Wr?K2){)Xynq&%S^H#@f-X9p zZ*OmRc5ZHy?;jjuiU8-x5y7EE#@z->q$p@Tqvgq(Bj;XcQ)WyMVvd?I0k+I(xiSK8Ga+rccA45&9FDAF+G1BSq8Xt?J)4@m z3J%YIL(6f9v3OOqa;!K~B(#K<@?6zaH5p+Jxl*dJ`+H_FHItpuJLVzpi$xa9ks3|! zNid_10ZuqW+%jfGE8>i4*T&<`_KD?77b#xZ&BRjd-&i>BIs6Lf6ql;F?lkc;-2D_GbZAiJ|R`MMs_MFS6N~;>YaYN#FO^78mo|bwJmzQn=)+<;FxE z@L>HQCYjYqjp2+Z{`YXk8il=_8@=k-D>Xvwr}`DE$7FLsUXCgbeKqIXw7o7}cXYA) TVsgW3`o|a;EXYmW*;o7p$G^j! literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/pt_PT.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..a61933475b1522977519195efec69139420fb62b GIT binary patch literal 35485 zcmeFa2Y3|K*EoFdo!L4|vYXy}Z={g|LVDQrEK9F0$pV2S8&c@#TtGwx6coh*QbiE~ z8zLZ0MNpbj6cBp>6j2Zq3w-C!>?RuszW(0#`JVsxeE%0svNLOVrXdlQ=9+PJaBFacZS;6+O>2uA!gE)A zh*U^Dq9i{_zFBK&wTO6>-nG(PW}RxS&9isfWFUVc0qIZ*>VdLRE-FBU$cW0(T(l4^ zM{Ch@XdT*sUP2qu%jk8q1-*%OptsOYv=_aHK1QFTFVQ#XTdc;eSdZPYH}=7PI0h%+ zM4W_Ea2C$T1-JrN;=y{`50D4R!{iC_ zBzcOgCTqxA@&egRUM8=QSIHY>C)q`IlRab~IZTd_qvSX_Lp~*E$!Fwia)JCnek2#k zW%38P$zhIg0;l7;ac-P1=g0YT0bD2-$0cxyTn{dT%i^-RK3oA;&Q)_JZXh>|8_rp{ zI{XGVfotX3xJle}ZWcG2o5S75J;*KQ9_1e6p5&h5mUC;l=eTv;^W00^2i$4yQ|>JH z4R?|IiTj1S#%po=$etrSJkbjhaj9<>L;@9!d^Dpw7`Iq_E_$~Y!{0{ytelLHTKf`~@pXI;czva*K zzwv)66pC&NSA|~TtMF3nWoHC_EF|2bCr3@Vr8YWT4_=aQ4UoOSB_AQR@NxTDI1h+%E`(pN>NFb zvz2p{4=5j0KCFCF`IPc$<+I8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file mode 100644 index 0000000000000000000000000000000000000000..7f722e4b628764cddad52da2150429794eb0b00d GIT binary patch literal 274 zcmZvXy9&ZU5JhjXm0uB32GJN01rdw^MG!4)Y$Y#6O+pd{{dn~xg@wqnJF|1|%$|L{ z)t4hnYvl@c&_yRb6)U24Czh(HKXT=bvexJumUYK*9~`s zFV=?nSE8jU+tywKmaWMj?-F1AeQ8Ht!jUQc>9&k#hGu4bGd5c^4=Pt(vH-#YqNXp^ Xv1RnoT#ZnDw1&Q+Y5o(^*OGhyTJkHj literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/ru.lproj/Localizable.strings b/hw/xquartz/bundle/ru.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..3b3811234301776bb8e5bfdaef2b71c2173a0a6f GIT binary patch literal 1122 zcmcJPK~KU!5QXP3Cypk@o2eX)K~RWQ1Vl8EfD&&WydWTw)E2Eu`19&F+g2)`&1AQ` zvor5KW+r@o$-eB0Cl@l4p#&1il-oj{WFjG_7kTI94V!Vdw_P#{Qk1s56648|oOix4 z`)|(z#E?vn6|rYnp4>?VYso$Dwz~3|Lt2m9p5==rluaUm-Q4wZPpE~5M5=RlieWe zlvRZ}$v5qJX7l#M7)@EmYI$uKE**p2R@^@MhM9PM9gvsjY`MxRM+?3+Z&< zP5U$JTpK9$eRL@~3!1yc1$dykt|~aXlX44|2WRrZ0&;>rVgQ p*soz9q2|i*&vOcP)cRu+aiV1+lF0w6!fpDmu$tbjKhv0Ue*-hWrCR_1 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/ru.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..9354e0264c73cb7e69eb977d9d77c85a90c533bc GIT binary patch literal 36593 zcmeFa2YggT*9SZ^_wH_X?bD)(KM@ z>)YF05T5_YyGVl^#+mZtln)!~+Uq1-YjCcpDQ%qH*pO$tXq!lWMFP^JL}WziC>Ir= z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qcxtz!O zT)>4~#Km07XZale!ZlpWm$`wj@l9^!TYQJ_^Mfvu*b9;Nkxr5QyN=#nv9o*Lz5nm literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings b/hw/xquartz/bundle/zh_CN.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..b5df36885021f7d532daf12f218eb64269305e58 GIT binary patch literal 260 zcmZvXJqyAx6h-eW{)o`AgVrt%;-G>eh>MG>^vj|)(pI7VcbAH`? K_k)BgKl=kxf#3O8?{5;A52r*k_sS z+=ZAxr9x-uY(zMTDs_&g2V52;!tX&dAq+9Y)rDqI2cl6E8mp$k&$_X$%|y*Omoepp z_m7aN;Ed@ytVtZq>V}aPau^#9w=}5$9tGOQ$|}B>aYqk#Q!0Pp%dq%m~D!`2@!Y&@N08+X0z;qR~t7nzzkzdphn0QdoMby7OWa# z3h+d4Wj|y_h24yATzTt^=hpEA9aSJW410FtuEafZ;p};C-OK#1`JHY!HO}r2bl9p> literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/zh_CN.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..e36c15fb6a168ab80ce6eb5e5aacf977cf758236 GIT binary patch literal 31481 zcmd43cVJXS*FQcpd$-7c0C<$LDth9r>qKJW8;|M;Ovw#=P5^OyZfcH-I)^YK zNP;*dMKYvBssVmuO^r>}^>uyxn(G?|`js}8S5?DD1N`dCMw!Z+n`{xDw(?^nM~b2O z*%9UsD@vP71w341Q&>`9nqaEPvOKg!Oa4GSQln@TkCKrN<)B=oM@BRay@=+a`Dhh- z1HFkhqb=wpI)%=m^XL-#0)2_TLf^vg@6io(6Wv8WqhHYP=pSs2?XW#|z%JModtxu_ zi~VpQ4#lxJ5hvkfoPsm49v9-?xCjr$!|(`Pibvu)+=N^3SUedEnBr-8I-ZRe;Fs_c z{4#zOAHW~rQ}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aiF{a literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings b/hw/xquartz/bundle/zh_TW.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..92d5473b020c840576b69f0063a31bae81dad9fe GIT binary patch literal 266 zcmZvXI}5@v6ot?1uLvEBXzk)44qEU5;^N{eeJN^N(kkeWSHEO%5DCe-x%ay_C$G1L z3T3oWtyBkHbkb9~GIDp+swGpaLJeAQuDKP&12vv+)sa0zKRgvOv&Txb&|Ej@3@+D} z`B&6v$_}*Gh!tq^hh4&T-HK+GI6thr`+1=PEKy`x##!0-?{y^XobQg(Js}fNDb0S#i>ijR3Q!833cE( zh176nUlZ$ZUZW%tV z)Wbf`f$`1=5ZGHJbba1 z9F{KM3nQ=B@|z#2SY644GGD_3b5Pn+XWh)=Qzz7)%P+_?>U94(Z6xG+$@0eog%MkB z`$tiZmlxG=axIrN2i4Ei>*^HntYf-9@haj#EP-KN@H3uf3(V@cQw`iOXA+fcw)n-U zuxhYY5EFsNc`Z9OHwx?x_s;3J=5S&iW9X;=!Jgf-<#r|Exe281uOF)O6GM;`|IY7> J?db`Ie*hmFt8)MV literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/zh_TW.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..36602c53e3e7a8c925599b6bcb5e1ee10776b5c0 GIT binary patch literal 31748 zcmd3P2YeL8_xQ}*UfoM_mju##@4dH6=W;28(1b`#IYJ;LA%$Lc5J8$C3L;Iah;$H@ zB7z8rB2_^VL`6^##fI4VzuCJZ2PA&|{{H3j2SfJuW@p}e^ZI)`*0eM>w6#Y^e}FI| zNP;*dMKYvBs)7Eajje4B%}ss%+nZY+@vm;J9o7K12KqPG3^&%cx7i~+edTE+M~X-F zIgzHDb=B?F0iUaNq;h&j37;cwI7*x(E)rLXmn2XUBng&;NFpT(l0-?8 z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 2007 01:24:06 -0800 Subject: [PATCH 343/552] XQuartz: Handle Pseudorami init in miinitext (cherry picked from commit a585c94fedd4ecbc87524703c01bb128fc2aa951) --- hw/xquartz/pseudoramiX.c | 2 +- hw/xquartz/quartz.c | 12 +++--------- hw/xquartz/quartzStartup.c | 2 +- mi/miinitext.c | 9 +++++++++ 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c index b19c6050f..4a9d8e1f1 100644 --- a/hw/xquartz/pseudoramiX.c +++ b/hw/xquartz/pseudoramiX.c @@ -44,7 +44,7 @@ Equipment Corporation. #include #include "globals.h" -extern int noPseudoramiXExtension; +Bool noPseudoramiXExtension = FALSE; extern int noPanoramiXExtension; extern int ProcPanoramiXQueryVersion (ClientPtr client); diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index 75f4e5eb0..6f42c538f 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -39,11 +39,13 @@ #include "quartzAudio.h" #include "pseudoramiX.h" #define _APPLEWM_SERVER_ -#include "X11/extensions/applewm.h" #include "applewmExt.h" #include "X11Application.h" +#include +#include + // X headers #include "scrnintstr.h" #include "windowstr.h" @@ -69,7 +71,6 @@ int quartzServerVisible = TRUE; int quartzServerQuitting = FALSE; DevPrivateKey quartzScreenKey = &quartzScreenKey; int aquaMenuBarHeight = 0; -int noPseudoramiXExtension = FALSE; QuartzModeProcsPtr quartzProcs = NULL; const char *quartzOpenGLBundle = NULL; @@ -165,13 +166,6 @@ void QuartzInitOutput( // Do display mode specific initialization quartzProcs->DisplayInit(); - - // Init PseudoramiX implementation of Xinerama. - // This should be in InitExtensions, but that causes link errors - // for servers that don't link in pseudoramiX.c. - if (!noPseudoramiXExtension) { - PseudoramiXExtensionInit(argc, argv); - } } diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c index 8600ec8d9..1b2a22623 100644 --- a/hw/xquartz/quartzStartup.c +++ b/hw/xquartz/quartzStartup.c @@ -106,6 +106,6 @@ void DarwinHandleGUI(int argc, char **argv, char **envp) { extern void _InitHLTB(void); _InitHLTB(); - X11ControllerMain(argc, argv, server_thread, NULL); + X11ControllerMain(argc, (const char **)argv, server_thread, NULL); exit(0); } diff --git a/mi/miinitext.c b/mi/miinitext.c index d06ab8ad1..319d2ced6 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -206,6 +206,9 @@ extern Bool noXkbExtension; #ifdef PANORAMIX extern Bool noPanoramiXExtension; #endif +#ifdef INXQUARTZ +extern Bool noPseudoramiXExtension; +#endif #ifdef XINPUT extern Bool noXInputExtension; #endif @@ -274,6 +277,9 @@ extern void MultibufferExtensionInit(INITARGS); #ifdef PANORAMIX extern void PanoramiXExtensionInit(INITARGS); #endif +#ifdef INXQUARTZ +extern void PseudoramiXExtensionInit(INITARGS); +#endif #ifdef XINPUT extern void XInputExtensionInit(INITARGS); #endif @@ -533,6 +539,9 @@ InitExtensions(argc, argv) if (!noPanoramiXExtension) PanoramiXExtensionInit(); # endif #endif +#ifdef INXQUARTZ + if(!noPseudoramiXExtension) PseudoramiXExtensionInit(); +#endif #ifdef SHAPE if (!noShapeExtension) ShapeExtensionInit(); #endif From 2c24231fc2027cf5034bb1b6636332687f586726 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 21 Dec 2007 01:57:43 -0800 Subject: [PATCH 344/552] XQuartz: Reduce code duplication in X11.app (cherry picked from commit b81809cd91a9f90b7f2de77b1dcf514cee87c32d) --- hw/xquartz/bundle/bundle-main.c | 87 +++++++++++++++------------------ 1 file changed, 39 insertions(+), 48 deletions(-) diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index cd74ceae6..a7b00d651 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -39,8 +39,8 @@ #define DEFAULT_CLIENT "/usr/X11/bin/xterm" #define DEFAULT_STARTX "/usr/X11/bin/startx" -static int launcher_main(int argc, char **argv); -static int server_main(int argc, char **argv); +static int execute(const char *command); +static char *command_from_prefs(const char *key, const char *default_value); int main(int argc, char **argv) { Display *display; @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for(i=0; i < argc; i++) { fprintf(stderr, "\targv[%u] = %s\n", (unsigned)i, argv[i]); } - + /* If we have a process serial number and it's our only arg, act as if * the user double clicked the app bundle: launch app_to_run if possible */ @@ -61,32 +61,32 @@ int main(int argc, char **argv) { fprintf(stderr, "X11.app: Closing the display and sleeping for 2s to allow the X server to start up.\n"); /* Could open the display, start the launcher */ XCloseDisplay(display); - + /* Give 2 seconds for the server to start... * TODO: *Really* fix this race condition */ usleep(2000); - return launcher_main(argc, argv); + return execute(command_from_prefs("app_to_run", DEFAULT_CLIENT)); } } - + /* Start the server */ fprintf(stderr, "X11.app: Could not connect to server. Starting X server."); - return server_main(argc, argv); + return execute(command_from_prefs("startx_script", DEFAULT_STARTX)); } -static int myexecvp(const char *command) { +static int execute(const char *command) { const char *newargv[7]; const char **s; - newargv[0] = "/usr/bin/login"; - newargv[1] = "-fp"; - newargv[2] = getlogin(); - newargv[3] = "/bin/sh"; - newargv[4] = "-c"; - newargv[5] = command; - newargv[6] = NULL; - + newargv[0] = "/usr/bin/login"; + newargv[1] = "-fp"; + newargv[2] = getlogin(); + newargv[3] = "/bin/sh"; + newargv[4] = "-c"; + newargv[5] = command; + newargv[6] = NULL; + fprintf(stderr, "X11.app: Launching %s:\n", command); for(s=newargv; *s; s++) { fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s); @@ -97,42 +97,33 @@ static int myexecvp(const char *command) { return(1); } -int launcher_main (int argc, char **argv) { - char *command = DEFAULT_CLIENT; +static char *command_from_prefs(const char *key, const char *default_value) { + char *command = NULL; - CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(CFSTR("app_to_run"), kCFPreferencesCurrentApplication); - - if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { - CFPreferencesSetAppValue(CFSTR("app_to_run"), CFSTR(DEFAULT_CLIENT), kCFPreferencesCurrentApplication); - CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); - } else { - int len = CFStringGetLength((CFStringRef)PlistRef)+1; - command = (char *)malloc(len); - CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); - } + CFStringRef cfKey = CFStringCreateWithPascalString(NULL, key, kCFStringEncodingASCII); + CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication); + + if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { + CFStringRef cfDefaultValue = CFStringCreateWithPascalString(NULL, default_value, kCFStringEncodingASCII); - if (PlistRef) - CFRelease(PlistRef); - - return myexecvp(command); -} - -int server_main (int argc, char **argv) { - char *command = DEFAULT_STARTX; - - CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(CFSTR("startx_script"), kCFPreferencesCurrentApplication); - - if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { - CFPreferencesSetAppValue(CFSTR("startx_script"), CFSTR(DEFAULT_STARTX), kCFPreferencesCurrentApplication); - CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); - } else { - int len = CFStringGetLength((CFStringRef)PlistRef)+1; - command = (char *)malloc(len); - CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); + CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication); + CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); + + int len = strlen(default_value) + 1; + command = (char *)malloc(len * sizeof(char)); + if(!command) + return NULL; + strcpy(command, default_value); + } else { + int len = CFStringGetLength((CFStringRef)PlistRef) + 1; + command = (char *)malloc(len * sizeof(char)); + if(!command) + return NULL; + CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); } - if (PlistRef) + if (PlistRef) CFRelease(PlistRef); - return myexecvp(command); + return command; } From 5dd895efa305954e2695aa22a9e49acfb65b4d5e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 21 Dec 2007 02:06:47 -0800 Subject: [PATCH 345/552] XQuartz: Use CFStringCreateWithCString (cherry picked from commit 79782b0e14761dcf5d6635b8eec161b74f06763a) --- hw/xquartz/bundle/bundle-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index a7b00d651..c66856794 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -100,7 +100,7 @@ static int execute(const char *command) { static char *command_from_prefs(const char *key, const char *default_value) { char *command = NULL; - CFStringRef cfKey = CFStringCreateWithPascalString(NULL, key, kCFStringEncodingASCII); + CFStringRef cfKey = CFStringCreateWithCString(NULL, key, kCFStringEncodingASCII); CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication); if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { From beb29c605b8c66e1a18b89668aa421c1519645f6 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 21 Dec 2007 02:09:01 -0800 Subject: [PATCH 346/552] XQuartz: *REALLY* use CFStringCreateWithCString I need sleep! Why am I making these stupid mistakes... sorry for pointless commit spam. ugg. (cherry picked from commit b16351fc6457aabead328472d16dc25789032940) --- hw/xquartz/bundle/bundle-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index c66856794..df78d7fb8 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -104,7 +104,7 @@ static char *command_from_prefs(const char *key, const char *default_value) { CFPropertyListRef PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication); if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { - CFStringRef cfDefaultValue = CFStringCreateWithPascalString(NULL, default_value, kCFStringEncodingASCII); + CFStringRef cfDefaultValue = CFStringCreateWithCString(NULL, default_value, kCFStringEncodingASCII); CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication); CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); From 743008a4812d6b046211ebcf4eab202687b458d5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 23 Dec 2007 14:27:14 -0500 Subject: [PATCH 347/552] Report serverClient resources in the X-Resource extension. --- Xext/xres.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Xext/xres.c b/Xext/xres.c index feadad27e..9bd70c672 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -67,7 +67,7 @@ ProcXResQueryClients (ClientPtr client) current_clients = xalloc((currentMaxClients - 1) * sizeof(int)); num_clients = 0; - for(i = 1; i < currentMaxClients; i++) { + for(i = 0; i < currentMaxClients; i++) { if(clients[i]) { current_clients[num_clients] = i; num_clients++; @@ -128,9 +128,7 @@ ProcXResQueryClientResources (ClientPtr client) clientID = CLIENT_ID(stuff->xid); - /* we could remove the (clientID == 0) check if we wanted to allow - probing the X-server's resource usage */ - if(!clientID || (clientID >= currentMaxClients) || !clients[clientID]) { + if((clientID >= currentMaxClients) || !clients[clientID]) { client->errorValue = stuff->xid; return BadValue; } @@ -254,9 +252,7 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) clientID = CLIENT_ID(stuff->xid); - /* we could remove the (clientID == 0) check if we wanted to allow - probing the X-server's resource usage */ - if(!clientID || (clientID >= currentMaxClients) || !clients[clientID]) { + if((clientID >= currentMaxClients) || !clients[clientID]) { client->errorValue = stuff->xid; return BadValue; } From 389e8917f66a489455f1d5c70f44c262717538ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Tue, 25 Dec 2007 22:59:24 +0200 Subject: [PATCH 348/552] Config: Fix a memory leak --- config/hal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/hal.c b/config/hal.c index 4427deb39..45238c0f4 100644 --- a/config/hal.c +++ b/config/hal.c @@ -251,6 +251,8 @@ unwind: xfree(xkb_model); if (xkb_layout) xfree(xkb_layout); + if (xkb_variant) + xfree(xkb_variant); if (xkb_options) xfree(xkb_options); if (config_info) From 009f1e4e55200425de2fe0dbc1f0ac0f431fb4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Tue, 25 Dec 2007 23:09:49 +0200 Subject: [PATCH 349/552] Config: Don't forget to add xkb_rules option --- config/hal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/hal.c b/config/hal.c index 45238c0f4..af96fc2c8 100644 --- a/config/hal.c +++ b/config/hal.c @@ -221,6 +221,8 @@ device_added(LibHalContext *hal_ctx, const char *udi) goto unwind; sprintf(config_info, "hal:%s", udi); + if (xkb_rules) + add_option(&options, "xkb_rules", xkb_rules); if (xkb_model) add_option(&options, "xkb_model", xkb_model); if (xkb_layout) From ae869fc7669764729e13fdd70149ed636753f2a3 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 25 Dec 2007 22:42:50 -0800 Subject: [PATCH 350/552] [SBUS]: Fix build, use getpagesize() instead of xf86getpagesize(). xf86getpagesize() was removed, but this one call site was not fixed up. Signed-off-by: David S. Miller --- hw/xfree86/os-support/bus/Sbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c index 2f0043f4c..ff257a8c7 100644 --- a/hw/xfree86/os-support/bus/Sbus.c +++ b/hw/xfree86/os-support/bus/Sbus.c @@ -585,7 +585,7 @@ xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size) { - unsigned long mask = xf86getpagesize() - 1; + unsigned long mask = getpagesize() - 1; unsigned long base = (unsigned long)addr & ~mask; unsigned long len = (((unsigned long)addr + size + mask) & ~mask) - base; From f44fd3f9e41bf467360ace93ef5b532d8f61fb2c Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 28 Dec 2007 15:47:21 +0200 Subject: [PATCH 351/552] Config: D-Bus: Don't leak timers TimerCancel doesn't free the timer: you need TimerFree for that. --- config/dbus-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/dbus-core.c b/config/dbus-core.c index eab72a530..9cf153076 100644 --- a/config/dbus-core.c +++ b/config/dbus-core.c @@ -76,7 +76,7 @@ teardown(void) struct config_dbus_core_hook *hook; if (bus_info.timer) { - TimerCancel(bus_info.timer); + TimerFree(bus_info.timer); bus_info.timer = NULL; } @@ -116,6 +116,8 @@ message_filter(DBusConnection *connection, DBusMessage *message, void *data) bus_info.connection = NULL; teardown(); + if (bus_info.timer) + TimerFree(bus_info.timer); bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); return DBUS_HANDLER_RESULT_HANDLED; @@ -186,6 +188,7 @@ static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, pointer arg) { if (connect_to_bus()) { + TimerFree(bus_info.timer); bus_info.timer = NULL; return 0; } From 190a0506243b39cd8dfc0e12068e3a3f416330f1 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 28 Dec 2007 15:47:57 +0200 Subject: [PATCH 352/552] Config: HAL: Don't leak options on failure to add device This showed up in Xephyr in particular, which denies new device requests. --- config/hal.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config/hal.c b/config/hal.c index af96fc2c8..4ab296159 100644 --- a/config/hal.c +++ b/config/hal.c @@ -92,6 +92,8 @@ add_option(InputOption **options, const char *key, const char *value) for (; *options; options = &(*options)->next) ; *options = xcalloc(sizeof(**options), 1); + if (!*options) /* Yeesh. */ + return; (*options)->key = xstrdup(key); (*options)->value = xstrdup(value); (*options)->next = NULL; @@ -156,7 +158,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) char *path = NULL, *driver = NULL, *name = NULL, *xkb_rules = NULL; char *xkb_model = NULL, *xkb_layout = NULL, *xkb_variant = NULL; char *xkb_options = NULL, *config_info = NULL; - InputOption *options = NULL; + InputOption *options = NULL, *tmpo = NULL; DeviceIntPtr dev; DBusError error; int type = TYPE_NONE; @@ -234,6 +236,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) if (NewInputDeviceRequest(options, &dev) != Success) { DebugF("[config/hal] NewInputDeviceRequest failed\n"); + dev = NULL; goto unwind; } @@ -259,6 +262,12 @@ unwind: xfree(xkb_options); if (config_info) xfree(config_info); + while (!dev && (tmpo = options)) { + options = tmpo->next; + xfree(tmpo->key); + xfree(tmpo->value); + xfree(tmpo); + } out_error: dbus_error_free(&error); From b2f6cd290c43b88f0d08fb29f8657618a067d2a0 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 28 Dec 2007 15:48:25 +0200 Subject: [PATCH 353/552] OS: Don't leak connection translation table on regeneration --- os/connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os/connection.c b/os/connection.c index 3b5742c2b..8b6541ce6 100644 --- a/os/connection.c +++ b/os/connection.c @@ -353,7 +353,8 @@ InitConnectionLimits(void) #endif #if !defined(WIN32) - ConnectionTranslation = (int *)xnfalloc(sizeof(int)*(lastfdesc + 1)); + if (!ConnectionTranslation) + ConnectionTranslation = (int *)xnfalloc(sizeof(int)*(lastfdesc + 1)); #else InitConnectionTranslation(); #endif From 941058f8da0d725f909dc97f68c32ce244a9dc0a Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 28 Dec 2007 15:48:57 +0200 Subject: [PATCH 354/552] KDrive: Xephyr: Don't leak screen damage structure --- hw/kdrive/ephyr/ephyr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index a4d995cb8..2a762a2a9 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -402,6 +402,7 @@ ephyrUnsetInternalDamage (ScreenPtr pScreen) pPixmap = (*pScreen->GetScreenPixmap) (pScreen); DamageUnregister (&pPixmap->drawable, scrpriv->pDamage); + DamageDestroy (scrpriv->pDamage); RemoveBlockAndWakeupHandlers (ephyrInternalDamageBlockHandler, ephyrInternalDamageWakeupHandler, From 24105cf6582201a94bc39aeac5a795297018aeb5 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 28 Dec 2007 15:49:50 +0200 Subject: [PATCH 355/552] Input: Don't reinit devices If a device is already initialised (i.e. the virtual core devices) during IASD, don't init them again. This fixes a leak. --- dix/devices.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index adf2fba45..534a0b9e5 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -469,7 +469,8 @@ InitAndStartDevices(void) for (dev = inputInfo.off_devices; dev; dev = dev->next) { DebugF("(dix) initialising device %d\n", dev->id); - ActivateDevice(dev); + if (!dev->inited) + ActivateDevice(dev); } for (dev = inputInfo.off_devices; dev; dev = next) { From 938da5ee389975f910721f1c2cebc2dcec793117 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 12:23:44 -0500 Subject: [PATCH 356/552] Add HDMI and DisplayPort connector types. --- hw/xfree86/modes/xf86Crtc.c | 9 ++++++--- hw/xfree86/modes/xf86Crtc.h | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index e00fdf3f3..10db86267 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2192,9 +2192,12 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus) return mon; } -static char *_xf86ConnectorNames[] = { "None", "VGA", "DVI-I", "DVI-D", - "DVI-A", "Composite", "S-Video", - "Component", "LFP", "Proprietary" }; +static char *_xf86ConnectorNames[] = { + "None", "VGA", "DVI-I", "DVI-D", + "DVI-A", "Composite", "S-Video", + "Component", "LFP", "Proprietary", + "HDMI", "DisplayPort", + }; _X_EXPORT char * xf86ConnectorGetName(xf86ConnectorType connector) { diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index f312b30cb..62d85bbc9 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -61,7 +61,9 @@ typedef enum _xf86ConnectorType { XF86ConnectorSvideo, XF86ConnectorComponent, XF86ConnectorLFP, - XF86ConnectorProprietary + XF86ConnectorProprietary, + XF86ConnectorHDMI, + XF86ConnectorDisplayPort, } xf86ConnectorType; typedef enum _xf86OutputStatus { From 1bbf64ab115e2a1121d6f9c0830b1b977f025178 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 20 Dec 2007 20:31:34 -0500 Subject: [PATCH 357/552] xselinux: Remove unnecessary structure definition. --- Xext/xselinux.h | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Xext/xselinux.h b/Xext/xselinux.h index ebcc4aae0..9800d5ae4 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -138,20 +138,6 @@ typedef struct { CARD32 id; } SELinuxGetContextReq; -typedef struct { - CARD8 type; - CARD8 pad1; - CARD16 sequenceNumber; - CARD32 length; - CARD16 context_len; - CARD16 pad2; - CARD32 pad3; - CARD32 pad4; - CARD32 pad5; - CARD32 pad6; - CARD32 pad7; -} SELinuxGetContextReply; - typedef struct { CARD8 reqType; CARD8 SELinuxReqType; @@ -172,7 +158,7 @@ typedef struct { CARD32 pad5; CARD32 pad6; CARD32 pad7; -} SELinuxGetPropertyContextReply; +} SELinuxGetContextReply; /* Private Flask definitions */ From f3780ece528ed3ead809ba6a388fa0f8aab2a775 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 20 Dec 2007 20:32:07 -0500 Subject: [PATCH 358/552] xselinux: Implement swapped protocol request logic. --- Xext/xselinux.c | 69 +++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index bbd8d1a46..d7c73227d 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1198,69 +1198,82 @@ SProcSELinuxSetSelectionManager(ClientPtr client) return ProcSELinuxSetSelectionManager(client); } -static int -SProcSELinuxGetSelectionManager(ClientPtr client) -{ - return ProcSELinuxGetSelectionManager(client); -} - static int SProcSELinuxSetDeviceCreateContext(ClientPtr client) { - return ProcSELinuxSetDeviceCreateContext(client); -} + REQUEST(SELinuxSetCreateContextReq); + int n; -static int -SProcSELinuxGetDeviceCreateContext(ClientPtr client) -{ - return ProcSELinuxGetDeviceCreateContext(client); + REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); + swaps(&stuff->context_len,n); + return ProcSELinuxSetDeviceCreateContext(client); } static int SProcSELinuxSetDeviceContext(ClientPtr client) { + REQUEST(SELinuxSetContextReq); + int n; + + REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq); + swapl(&stuff->id,n); + swaps(&stuff->context_len,n); return ProcSELinuxSetDeviceContext(client); } static int SProcSELinuxGetDeviceContext(ClientPtr client) { + REQUEST(SELinuxGetContextReq); + int n; + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id,n); return ProcSELinuxGetDeviceContext(client); } static int SProcSELinuxSetPropertyCreateContext(ClientPtr client) { - return ProcSELinuxSetPropertyCreateContext(client); -} + REQUEST(SELinuxSetCreateContextReq); + int n; -static int -SProcSELinuxGetPropertyCreateContext(ClientPtr client) -{ - return ProcSELinuxGetPropertyCreateContext(client); + REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); + swaps(&stuff->context_len,n); + return ProcSELinuxSetPropertyCreateContext(client); } static int SProcSELinuxGetPropertyContext(ClientPtr client) { + REQUEST(SELinuxGetPropertyContextReq); + int n; + + REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq); + swapl(&stuff->window,n); + swapl(&stuff->property,n); return ProcSELinuxGetPropertyContext(client); } static int SProcSELinuxSetWindowCreateContext(ClientPtr client) { - return ProcSELinuxSetWindowCreateContext(client); -} + REQUEST(SELinuxSetCreateContextReq); + int n; -static int -SProcSELinuxGetWindowCreateContext(ClientPtr client) -{ - return ProcSELinuxGetWindowCreateContext(client); + REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); + swaps(&stuff->context_len,n); + return ProcSELinuxSetWindowCreateContext(client); } static int SProcSELinuxGetWindowContext(ClientPtr client) { + REQUEST(SELinuxGetContextReq); + int n; + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id,n); return ProcSELinuxGetWindowContext(client); } @@ -1278,11 +1291,11 @@ SProcSELinuxDispatch(ClientPtr client) case X_SELinuxSetSelectionManager: return SProcSELinuxSetSelectionManager(client); case X_SELinuxGetSelectionManager: - return SProcSELinuxGetSelectionManager(client); + return ProcSELinuxGetSelectionManager(client); case X_SELinuxSetDeviceCreateContext: return SProcSELinuxSetDeviceCreateContext(client); case X_SELinuxGetDeviceCreateContext: - return SProcSELinuxGetDeviceCreateContext(client); + return ProcSELinuxGetDeviceCreateContext(client); case X_SELinuxSetDeviceContext: return SProcSELinuxSetDeviceContext(client); case X_SELinuxGetDeviceContext: @@ -1290,13 +1303,13 @@ SProcSELinuxDispatch(ClientPtr client) case X_SELinuxSetPropertyCreateContext: return SProcSELinuxSetPropertyCreateContext(client); case X_SELinuxGetPropertyCreateContext: - return SProcSELinuxGetPropertyCreateContext(client); + return ProcSELinuxGetPropertyCreateContext(client); case X_SELinuxGetPropertyContext: return SProcSELinuxGetPropertyContext(client); case X_SELinuxSetWindowCreateContext: return SProcSELinuxSetWindowCreateContext(client); case X_SELinuxGetWindowCreateContext: - return SProcSELinuxGetWindowCreateContext(client); + return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: return SProcSELinuxGetWindowContext(client); default: From f4bc333fc1e8d9fa9911771d2072df4df741c553 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 28 Dec 2007 11:56:54 -0500 Subject: [PATCH 359/552] xselinux: don't FatalError on an invalid class mapping, just disable support. --- Xext/xselinux.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index d7c73227d..f3a84571e 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1376,15 +1376,20 @@ XSELinuxExtensionInit(INITARGS) /* Setup SELinux stuff */ if (!is_selinux_enabled()) { - ErrorF("XSELinux: Extension failed to load: SELinux not enabled\n"); + ErrorF("XSELinux: SELinux not enabled, disabling SELinux support.\n"); return; } selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback)SELinuxLog); selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback)SELinuxAudit); - if (selinux_set_mapping(map) < 0) + if (selinux_set_mapping(map) < 0) { + if (errno == EINVAL) { + ErrorF("XSELinux: Invalid object class mapping, disabling SELinux support.\n"); + return; + } FatalError("XSELinux: Failed to set up security class mapping\n"); + } if (avc_open(NULL, 0) < 0) FatalError("XSELinux: Couldn't initialize SELinux userspace AVC\n"); From 643c52be32c187a0fdb9a031b1e31d97cd551339 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 28 Dec 2007 13:26:26 -0500 Subject: [PATCH 360/552] xselinux: Remove "X" prefix on remaining functions and strings. Should be evident from the context. --- Xext/xselinux.c | 74 ++++++++++++++--------------- Xext/xselinux.h | 10 ++-- hw/xfree86/dixmods/extmod/modinit.h | 2 +- mi/miinitext.c | 6 +-- 4 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index f3a84571e..6550c7f72 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -175,12 +175,12 @@ SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return) security_id_t sid; if (selabel_lookup(label_hnd, &con, name, SELABEL_X_SELN) < 0) { - ErrorF("XSELinux: a selection label lookup failed!\n"); + ErrorF("SELinux: a selection label lookup failed!\n"); return BadValue; } /* Get a SID for context */ if (avc_context_to_sid(con, &sid) < 0) { - ErrorF("XSELinux: a context_to_SID call failed!\n"); + ErrorF("SELinux: a context_to_SID call failed!\n"); return BadAlloc; } freecon(con); @@ -216,12 +216,12 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window, if (!knownEvents[type]) { /* Look in the mappings of event names to contexts */ if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EVENT) < 0) { - ErrorF("XSELinux: an event label lookup failed!\n"); + ErrorF("SELinux: an event label lookup failed!\n"); return BadValue; } /* Get a SID for context */ if (avc_context_to_sid(con, knownEvents + type) < 0) { - ErrorF("XSELinux: a context_to_SID call failed!\n"); + ErrorF("SELinux: a context_to_SID call failed!\n"); return BadAlloc; } freecon(con); @@ -230,7 +230,7 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window, /* Perform a transition to obtain the final SID */ if (avc_compute_create(sid_of_window, knownEvents[type], SECCLASS_X_EVENT, &sid_return->sid) < 0) { - ErrorF("XSELinux: a compute_create call failed!\n"); + ErrorF("SELinux: a compute_create call failed!\n"); return BadValue; } @@ -607,13 +607,13 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Look in the mappings of property names to contexts */ if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EXT) < 0) { - ErrorF("XSELinux: a property label lookup failed!\n"); + ErrorF("SELinux: a property label lookup failed!\n"); rec->status = BadValue; return; } /* Get a SID for context */ if (avc_context_to_sid(con, &sid) < 0) { - ErrorF("XSELinux: a context_to_SID call failed!\n"); + ErrorF("SELinux: a context_to_SID call failed!\n"); rec->status = BadAlloc; return; } @@ -623,7 +623,7 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Perform a transition to obtain the final SID */ if (avc_compute_create(serv->sid, sid, SECCLASS_X_EXTENSION, &obj->sid) < 0) { - ErrorF("XSELinux: a SID transition call failed!\n"); + ErrorF("SELinux: a SID transition call failed!\n"); freecon(con); rec->status = BadValue; return; @@ -658,13 +658,13 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Look in the mappings of property names to contexts */ if (selabel_lookup(label_hnd, &con, name, SELABEL_X_PROP) < 0) { - ErrorF("XSELinux: a property label lookup failed!\n"); + ErrorF("SELinux: a property label lookup failed!\n"); rec->status = BadValue; return; } /* Get a SID for context */ if (avc_context_to_sid(con, &sid) < 0) { - ErrorF("XSELinux: a context_to_SID call failed!\n"); + ErrorF("SELinux: a context_to_SID call failed!\n"); rec->status = BadAlloc; return; } @@ -674,7 +674,7 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Perform a transition to obtain the final SID */ if (avc_compute_create(subj->sid, sid, SECCLASS_X_PROPERTY, &obj->sid) < 0) { - ErrorF("XSELinux: a SID transition call failed!\n"); + ErrorF("SELinux: a SID transition call failed!\n"); freecon(con); rec->status = BadValue; return; @@ -732,7 +732,7 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Perform a transition to obtain the final SID */ if (avc_compute_create(subj->sid, pobj->sid, class, &obj->sid) < 0) { - ErrorF("XSELinux: a compute_create call failed!\n"); + ErrorF("SELinux: a compute_create call failed!\n"); rec->status = BadValue; return; } @@ -766,7 +766,7 @@ SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) /* Perform a transition to obtain the final SID */ if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SCREEN, &obj->sid) < 0) { - ErrorF("XSELinux: a compute_create call failed!\n"); + ErrorF("SELinux: a compute_create call failed!\n"); rec->status = BadValue; return; } @@ -883,16 +883,16 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) security_context_t ctx; int rc = avc_sid_to_context(state->sid, &ctx); if (rc < 0) - FatalError("XSELinux: Failed to get security context!\n"); + FatalError("SELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); if (rc != Success) - FatalError("XSELinux: Failed to set label property on window!\n"); + FatalError("SELinux: Failed to set label property on window!\n"); freecon(ctx); } else - FatalError("XSELinux: Unexpected unlabeled client found\n"); + FatalError("SELinux: Unexpected unlabeled client found\n"); state = dixLookupPrivate(&pWin->devPrivates, stateKey); @@ -900,16 +900,16 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) security_context_t ctx; int rc = avc_sid_to_context(state->sid, &ctx); if (rc < 0) - FatalError("XSELinux: Failed to get security context!\n"); + FatalError("SELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, pWin, atom_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); if (rc != Success) - FatalError("XSELinux: Failed to set label property on window!\n"); + FatalError("SELinux: Failed to set label property on window!\n"); freecon(ctx); } else - FatalError("XSELinux: Unexpected unlabeled window found\n"); + FatalError("SELinux: Unexpected unlabeled window found\n"); } static void @@ -931,7 +931,7 @@ SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SELECTION, &obj->sid) < 0) { - ErrorF("XSELinux: a compute_create call failed!\n"); + ErrorF("SELinux: a compute_create call failed!\n"); obj->sid = unlabeled_sid; } break; @@ -998,8 +998,8 @@ ProcSELinuxQueryVersion(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.server_major = XSELINUX_MAJOR_VERSION; - rep.server_minor = XSELINUX_MINOR_VERSION; + rep.server_major = SELINUX_MAJOR_VERSION; + rep.server_minor = SELINUX_MINOR_VERSION; if (client->swapped) { int n; swaps(&rep.sequenceNumber, n); @@ -1367,7 +1367,7 @@ SELinuxResetProc(ExtensionEntry *extEntry) } void -XSELinuxExtensionInit(INITARGS) +SELinuxExtensionInit(INITARGS) { ExtensionEntry *extEntry; struct selinux_opt options[] = { { SELABEL_OPT_VALIDATE, (char *)1 } }; @@ -1376,7 +1376,7 @@ XSELinuxExtensionInit(INITARGS) /* Setup SELinux stuff */ if (!is_selinux_enabled()) { - ErrorF("XSELinux: SELinux not enabled, disabling SELinux support.\n"); + ErrorF("SELinux: SELinux not enabled, disabling SELinux support.\n"); return; } @@ -1385,42 +1385,42 @@ XSELinuxExtensionInit(INITARGS) if (selinux_set_mapping(map) < 0) { if (errno == EINVAL) { - ErrorF("XSELinux: Invalid object class mapping, disabling SELinux support.\n"); + ErrorF("SELinux: Invalid object class mapping, disabling SELinux support.\n"); return; } - FatalError("XSELinux: Failed to set up security class mapping\n"); + FatalError("SELinux: Failed to set up security class mapping\n"); } if (avc_open(NULL, 0) < 0) - FatalError("XSELinux: Couldn't initialize SELinux userspace AVC\n"); + FatalError("SELinux: Couldn't initialize SELinux userspace AVC\n"); avc_active = 1; label_hnd = selabel_open(SELABEL_CTX_X, options, 1); if (!label_hnd) - FatalError("XSELinux: Failed to open x_contexts mapping in policy\n"); + FatalError("SELinux: Failed to open x_contexts mapping in policy\n"); if (security_get_initial_context("unlabeled", &con) < 0) - FatalError("XSELinux: Failed to look up unlabeled context\n"); + FatalError("SELinux: Failed to look up unlabeled context\n"); if (avc_context_to_sid(con, &unlabeled_sid) < 0) - FatalError("XSELinux: a context_to_SID call failed!\n"); + FatalError("SELinux: a context_to_SID call failed!\n"); freecon(con); /* Prepare for auditing */ audit_fd = audit_open(); if (audit_fd < 0) - FatalError("XSELinux: Failed to open the system audit log\n"); + FatalError("SELinux: Failed to open the system audit log\n"); /* Allocate private storage */ if (!dixRequestPrivate(stateKey, sizeof(SELinuxStateRec))) - FatalError("XSELinux: Failed to allocate private storage.\n"); + FatalError("SELinux: Failed to allocate private storage.\n"); /* Create atoms for doing window labeling */ atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, TRUE); if (atom_ctx == BAD_RESOURCE) - FatalError("XSELinux: Failed to create atom\n"); + FatalError("SELinux: Failed to create atom\n"); atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, TRUE); if (atom_client_ctx == BAD_RESOURCE) - FatalError("XSELinux: Failed to create atom\n"); + FatalError("SELinux: Failed to create atom\n"); /* Register callbacks */ ret &= dixRegisterPrivateInitFunc(stateKey, SELinuxStateInit, NULL); @@ -1443,11 +1443,11 @@ XSELinuxExtensionInit(INITARGS) ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); if (!ret) - FatalError("XSELinux: Failed to register one or more callbacks\n"); + FatalError("SELinux: Failed to register one or more callbacks\n"); /* Add extension to server */ - extEntry = AddExtension(XSELINUX_EXTENSION_NAME, - XSELinuxNumberEvents, XSELinuxNumberErrors, + extEntry = AddExtension(SELINUX_EXTENSION_NAME, + SELinuxNumberEvents, SELinuxNumberErrors, ProcSELinuxDispatch, SProcSELinuxDispatch, SELinuxResetProc, StandardMinorOpcode); diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 9800d5ae4..ba1380b57 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -23,11 +23,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "dixaccess.h" /* Extension info */ -#define XSELINUX_EXTENSION_NAME "SELinux" -#define XSELINUX_MAJOR_VERSION 1 -#define XSELINUX_MINOR_VERSION 0 -#define XSELinuxNumberEvents 0 -#define XSELinuxNumberErrors 0 +#define SELINUX_EXTENSION_NAME "SELinux" +#define SELINUX_MAJOR_VERSION 1 +#define SELINUX_MINOR_VERSION 0 +#define SELinuxNumberEvents 0 +#define SELinuxNumberErrors 0 /* Extension protocol */ #define X_SELinuxQueryVersion 0 diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index 191b3ef89..99d714c4f 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -130,7 +130,7 @@ extern void XaceExtensionInit(INITARGS); #endif #ifdef XSELINUX -extern void XSELinuxExtensionInit(INITARGS); +extern void SELinuxExtensionInit(INITARGS); #endif #if 1 diff --git a/mi/miinitext.c b/mi/miinitext.c index 319d2ced6..b14690756 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -330,7 +330,7 @@ extern void XaceExtensionInit(INITARGS); extern void SecurityExtensionInit(INITARGS); #endif #ifdef XSELINUX -extern void XSELinuxExtensionInit(INITARGS); +extern void SELinuxExtensionInit(INITARGS); #endif #ifdef XPRINT extern void XpExtensionInit(INITARGS); @@ -606,7 +606,7 @@ InitExtensions(argc, argv) if (!noSecurityExtension) SecurityExtensionInit(); #endif #ifdef XSELINUX - XSELinuxExtensionInit(); + SELinuxExtensionInit(); #endif #ifdef XPRINT XpExtensionInit(); /* server-specific extension, cannot be disabled */ @@ -703,7 +703,7 @@ static ExtensionModule staticExtensions[] = { { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, #endif #ifdef XSELINUX - { XSELinuxExtensionInit, XSELINUX_EXTENSION_NAME, NULL, NULL, NULL }, + { SELinuxExtensionInit, SELINUX_EXTENSION_NAME, NULL, NULL, NULL }, #endif #ifdef XPRINT { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL }, From 3b23dd9fd43a28033d0af7b02088b0c6ca433158 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 28 Dec 2007 13:29:45 -0500 Subject: [PATCH 361/552] xselinux: Fix whitespace warnings. --- Xext/xselinux.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 6550c7f72..4629e9027 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1145,31 +1145,31 @@ ProcSELinuxDispatch(ClientPtr client) REQUEST(xReq); switch (stuff->data) { case X_SELinuxQueryVersion: - return ProcSELinuxQueryVersion(client); + return ProcSELinuxQueryVersion(client); case X_SELinuxSetSelectionManager: return ProcSELinuxSetSelectionManager(client); case X_SELinuxGetSelectionManager: - return ProcSELinuxGetSelectionManager(client); + return ProcSELinuxGetSelectionManager(client); case X_SELinuxSetDeviceCreateContext: - return ProcSELinuxSetDeviceCreateContext(client); + return ProcSELinuxSetDeviceCreateContext(client); case X_SELinuxGetDeviceCreateContext: - return ProcSELinuxGetDeviceCreateContext(client); + return ProcSELinuxGetDeviceCreateContext(client); case X_SELinuxSetDeviceContext: - return ProcSELinuxSetDeviceContext(client); + return ProcSELinuxSetDeviceContext(client); case X_SELinuxGetDeviceContext: - return ProcSELinuxGetDeviceContext(client); + return ProcSELinuxGetDeviceContext(client); case X_SELinuxSetPropertyCreateContext: - return ProcSELinuxSetPropertyCreateContext(client); + return ProcSELinuxSetPropertyCreateContext(client); case X_SELinuxGetPropertyCreateContext: - return ProcSELinuxGetPropertyCreateContext(client); + return ProcSELinuxGetPropertyCreateContext(client); case X_SELinuxGetPropertyContext: - return ProcSELinuxGetPropertyContext(client); + return ProcSELinuxGetPropertyContext(client); case X_SELinuxSetWindowCreateContext: - return ProcSELinuxSetWindowCreateContext(client); + return ProcSELinuxSetWindowCreateContext(client); case X_SELinuxGetWindowCreateContext: - return ProcSELinuxGetWindowCreateContext(client); + return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: - return ProcSELinuxGetWindowContext(client); + return ProcSELinuxGetWindowContext(client); default: return BadRequest; } From bac3ecde39cc914ab515991234b7dc2138005b84 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 13:33:39 -0500 Subject: [PATCH 362/552] EDID 1.4: Allow for sync range offsets. Table 3.26: Display Range Limits & Timing Descriptor Block Definition --- hw/xfree86/ddc/edid.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index 4487273cd..02f5d09c5 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -1,5 +1,5 @@ - -/* edid.h: defines to parse an EDID block +/* + * edid.h: defines to parse an EDID block * * This file contains all information to interpret a standard EDIC block * transmitted by a display device via DDC (Display Data Channel). So far @@ -241,14 +241,18 @@ #define SERIAL_NUMBER 0xFF #define ASCII_STR 0xFE #define MONITOR_RANGES 0xFD +#define _MIN_V_OFFSET(x) ((!!(x[4] & 0x01)) * 255) +#define _MAX_V_OFFSET(x) ((!!(x[4] & 0x02)) * 255) +#define _MIN_H_OFFSET(x) ((!!(x[4] & 0x04)) * 255) +#define _MAX_H_OFFSET(x) ((!!(x[4] & 0x08)) * 255) #define _MIN_V(x) x[5] -#define MIN_V _MIN_V(c) +#define MIN_V (_MIN_V(c) + _MIN_V_OFFSET(c)) #define _MAX_V(x) x[6] -#define MAX_V _MAX_V(c) +#define MAX_V (_MAX_V(c) + _MAX_V_OFFSET(c)) #define _MIN_H(x) x[7] -#define MIN_H _MIN_H(c) +#define MIN_H (_MIN_H(c) + _MIN_H_OFFSET(c)) #define _MAX_H(x) x[8] -#define MAX_H _MAX_H(c) +#define MAX_H (_MAX_H(c) + _MAX_H_OFFSET(c)) #define _MAX_CLOCK(x) x[9] #define MAX_CLOCK _MAX_CLOCK(c) #define _HAVE_2ND_GTF(x) (x[10] == 0x02) From f6df66cc89bcd0a0be2e7bca05839fdd428c1d4c Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 13:55:39 -0500 Subject: [PATCH 363/552] EDID 1.4: Trivial support for new detailed sections. Nothing actually decoded yet, but at least we print what they are. New in EDID 1.4: - Color Management Data (0xF9), Section 3.10.3.7 - CVT 3 Byte Code Descriptor (0xF8), Section 3.10.3.8 - Established Timings III Descriptor (0xF7), section 3.10.3.9 - Manufacturer-specified data tag (0x00 - 0x0F), section 3.10.3.12 --- hw/xfree86/ddc/edid.h | 8 +++++++ hw/xfree86/ddc/interpret_edid.c | 38 ++++++++++++++++++++++++++++++--- hw/xfree86/ddc/print_edid.c | 17 +++++++++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index 02f5d09c5..2e3e7df4f 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -286,6 +286,9 @@ #define _WHITE_GAMMA2(x) _GAMMA(x[14]) #define WHITE_GAMMA2 _WHITE_GAMMA2(c) #define ADD_STD_TIMINGS 0xFA +#define COLOR_MANAGEMENT_DATA 0xF9 +#define CVT_3BYTE_DATA 0xF8 +#define ADD_EST_TIMINGS 0xF7 #define ADD_DUMMY 0x10 #define _NEXT_DT_MD_SECTION(x) (x = (x + DET_TIMING_INFO_LEN)) @@ -418,8 +421,13 @@ struct detailed_timings { #define DS_RANGES 0xFD #define DS_WHITE_P 0xFB #define DS_STD_TIMINGS 0xFA +#define DS_CMD 0xF9 +#define DS_CVT 0xF8 +#define DS_EST_III 0xF7 #define DS_DUMMY 0x10 #define DS_UNKOWN 0x100 /* type is an int */ +#define DS_VENDOR 0x101 +#define DS_VENDOR_MAX 0x110 struct monitor_ranges { int min_v; diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c index 7b4b2b9ec..ecec2b039 100644 --- a/hw/xfree86/ddc/interpret_edid.c +++ b/hw/xfree86/ddc/interpret_edid.c @@ -1,8 +1,28 @@ - -/* interpret_edid.c: interpret a primary EDID block - * +/* * Copyright 1998 by Egbert Eich + * Copyright 2007 Red Hat, Inc. + * + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * them 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 MERCHANTIBILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS 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. + * + * interpret_edid.c: interpret a primary EDID block */ + #ifdef HAVE_XORG_CONFIG_H #include #endif @@ -207,6 +227,15 @@ get_dt_md_section(Uchar *c, struct edid_version *ver, det_mon[i].type = DS_STD_TIMINGS; get_dst_timing_section(c,det_mon[i].section.std_t, ver); break; + case COLOR_MANAGEMENT_DATA: + det_mon[i].type = DS_CMD; + break; + case CVT_3BYTE_DATA: + det_mon[i].type = DS_CVT; + break; + case ADD_EST_TIMINGS: + det_mon[i].type = DS_EST_III; + break; case ADD_DUMMY: det_mon[i].type = DS_DUMMY; break; @@ -214,6 +243,9 @@ get_dt_md_section(Uchar *c, struct edid_version *ver, det_mon[i].type = DS_UNKOWN; break; } + if (c[3] <= 0x0F) { + det_mon[i].type = DS_VENDOR + c[3]; + } } else { det_mon[i].type = DT; get_detailed_timing_section(c,&det_mon[i].section.d_timings); diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c index 30b607d4f..17e21aca8 100644 --- a/hw/xfree86/ddc/print_edid.c +++ b/hw/xfree86/ddc/print_edid.c @@ -290,10 +290,27 @@ print_detailed_monitor_section(int scrnIndex, m[i].section.wp[j].white_y, m[i].section.wp[j].white_gamma); break; + case DS_CMD: + xf86DrvMsg(scrnIndex, X_INFO, + "Color management data: (not decoded)\n"); + break; + case DS_CVT: + xf86DrvMsg(scrnIndex, X_INFO, + "CVT 3-byte-code modes: (not decoded)\n"); + break; + case DS_EST_III: + xf86DrvMsg(scrnIndex, X_INFO, + "Established timings III: (not decoded)\n"); + break; case DS_DUMMY: default: break; } + if (m[i].type >= DS_VENDOR && m[i].type <= DS_VENDOR_MAX) { + xf86DrvMsg(scrnIndex, X_WARNING, + "Unknown vendor-specific block %hx\n", + m[i].type - DS_VENDOR); + } } } From a948216dccb5ee577a50a42035dc9bc49d0a00c6 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 15:00:41 -0500 Subject: [PATCH 364/552] EDID 1.4: Decode CVT 3-byte codes and add them to the mode pool. Section 3.10.3.8: CVT 3 Byte Code Descriptor Definition. --- hw/xfree86/ddc/edid.h | 26 +++++++++++++++++++----- hw/xfree86/ddc/interpret_edid.c | 29 +++++++++++++++++++++++++++ hw/xfree86/ddc/print_edid.c | 21 +++++++++++++++++++- hw/xfree86/modes/xf86EdidModes.c | 34 ++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index 2e3e7df4f..6708eaaa5 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -449,17 +449,33 @@ struct whitePoints{ float white_gamma; }; +struct cvt_timings { + int width; + int height; + int rate; + int rates; +}; + +/* + * Be careful when adding new sections; this structure can't grow, it's + * embedded in the middle of xf86Monitor which is ABI. Sizes below are + * in bytes, for ILP32 systems. If all else fails just copy the section + * literally like serial and friends. + */ struct detailed_monitor_section { int type; union { - struct detailed_timings d_timings; + struct detailed_timings d_timings; /* 56 */ Uchar serial[13]; Uchar ascii_data[13]; Uchar name[13]; - struct monitor_ranges ranges; - struct std_timings std_t[5]; - struct whitePoints wp[2]; - } section; + struct monitor_ranges ranges; /* 40 */ + struct std_timings std_t[5]; /* 80 */ + struct whitePoints wp[2]; /* 32 */ + /* color management data */ + struct cvt_timings cvt[4]; /* 64 */ + /* established timings III */ + } section; /* max: 80 */ }; typedef struct { diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c index ecec2b039..982a502fd 100644 --- a/hw/xfree86/ddc/interpret_edid.c +++ b/hw/xfree86/ddc/interpret_edid.c @@ -174,6 +174,34 @@ get_established_timing_section(Uchar *c, struct established_timings *r) r->t_manu = T_MANU; } +static void +get_cvt_timing_section(Uchar *c, struct cvt_timings *r) +{ + int i; + + for (i = 0; i < 4; i++) { + if (c[0] && c[1] && c[2]) { + r[i].height = (c[0] + ((c[1] & 0xF0) << 8) + 1) * 2; + switch (c[1] & 0xc0) { + case 0x00: r[i].width = r[i].height * 4 / 3; break; + case 0x40: r[i].width = r[i].height * 16 / 9; break; + case 0x80: r[i].width = r[i].height * 16 / 10; break; + case 0xc0: r[i].width = r[i].height * 15 / 9; break; + } + switch (c[2] & 0x60) { + case 0x00: r[i].rate = 50; break; + case 0x20: r[i].rate = 60; break; + case 0x40: r[i].rate = 75; break; + case 0x60: r[i].rate = 85; break; + } + r[i].rates = c[2] & 0x1f; + } else { + return; + } + c += 3; + } +} + static void get_std_timing_section(Uchar *c, struct std_timings *r, struct edid_version *v) @@ -232,6 +260,7 @@ get_dt_md_section(Uchar *c, struct edid_version *ver, break; case CVT_3BYTE_DATA: det_mon[i].type = DS_CVT; + get_cvt_timing_section(c, det_mon[i].section.cvt); break; case ADD_EST_TIMINGS: det_mon[i].type = DS_EST_III; diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c index 17e21aca8..5aebc6e74 100644 --- a/hw/xfree86/ddc/print_edid.c +++ b/hw/xfree86/ddc/print_edid.c @@ -235,6 +235,24 @@ print_std_timings(int scrnIndex, struct std_timings *t) } } } + +static void +print_cvt_timings(int si, struct cvt_timings *t) +{ + int i; + + for (i = 0; i < 4; i++) { + if (t[i].height) { + xf86DrvMsg(si, X_INFO, "%dx%d @ %s%s%s%s%s Hz\n", + t[i].width, t[i].height, + t[i].rates & 0x10 ? "50," : "", + t[i].rates & 0x08 ? "60," : "", + t[i].rates & 0x04 ? "75," : "", + t[i].rates & 0x02 ? "85," : "", + t[i].rates & 0x01 ? "60RB" : ""); + } else break; + } +} static void print_detailed_monitor_section(int scrnIndex, @@ -296,7 +314,8 @@ print_detailed_monitor_section(int scrnIndex, break; case DS_CVT: xf86DrvMsg(scrnIndex, X_INFO, - "CVT 3-byte-code modes: (not decoded)\n"); + "CVT 3-byte-code modes:\n"); + print_cvt_timings(scrnIndex, m[i].section.cvt); break; case DS_EST_III: xf86DrvMsg(scrnIndex, X_INFO, diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index a125d8c82..d8c61617e 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -354,6 +354,36 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, return Mode; } +static DisplayModePtr +DDCModesFromCVT(int scrnIndex, struct cvt_timings *t) +{ + DisplayModePtr modes = NULL; + int i; + + for (i = 0; i < 4; i++) { + if (t[i].height) { + if (t[i].rates & 0x10) + modes = xf86ModesAdd(modes, + xf86CVTMode(t[i].width, t[i].height, 50, 0, 0)); + if (t[i].rates & 0x08) + modes = xf86ModesAdd(modes, + xf86CVTMode(t[i].width, t[i].height, 60, 0, 0)); + if (t[i].rates & 0x04) + modes = xf86ModesAdd(modes, + xf86CVTMode(t[i].width, t[i].height, 75, 0, 0)); + if (t[i].rates & 0x02) + modes = xf86ModesAdd(modes, + xf86CVTMode(t[i].width, t[i].height, 85, 0, 0)); + if (t[i].rates & 0x01) + modes = xf86ModesAdd(modes, + xf86CVTMode(t[i].width, t[i].height, 60, 1, 0)); + } else break; + } + + return modes; +} + + /* * */ @@ -527,6 +557,10 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) quirks); Modes = xf86ModesAdd(Modes, Mode); break; + case DS_CVT: + Mode = DDCModesFromCVT(scrnIndex, det_mon->section.cvt); + Modes = xf86ModesAdd(Modes, Mode); + break; default: break; } From 14b5c8a447db0395fb14b2d404eafb1d8e4fb817 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 15:52:42 -0500 Subject: [PATCH 365/552] EDID 1.4: Extended support for digital interfaces. Section 3.6.1, Table 3.11: Video Input Definition. --- hw/xfree86/ddc/edid.h | 7 + hw/xfree86/ddc/interpret_edid.c | 6 +- hw/xfree86/ddc/print_edid.c | 262 ++++++++++++++++++-------------- 3 files changed, 157 insertions(+), 118 deletions(-) diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index 6708eaaa5..25163a69f 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -125,6 +125,10 @@ #define SYNC _SYNC(GET(D_INPUT)) #define _DFP(x) (x & 0x01) #define DFP _DFP(GET(D_INPUT)) +#define _BPC(x) ((x & 0x70) >> 4) +#define BPC _BPC(GET(D_INPUT)) +#define _DIGITAL_INTERFACE(x) (x & 0x0F) +#define DIGITAL_INTERFACE _DIGITAL_INTERFACE(GET(D_INPUT)) #define _GAMMA(x) (x == 0xff ? 1.0 : ((x + 100.0)/100.0)) #define GAMMA _GAMMA(GET(D_GAMMA)) #define HSIZE_MAX GET(D_HSIZE) @@ -364,6 +368,9 @@ struct disp_features { unsigned int input_setup:1; unsigned int input_sync:5; unsigned int input_dfp:1; + unsigned int input_bpc:3; + unsigned int input_interface:4; + /* 15 bit hole */ int hsize; int vsize; float gamma; diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c index 982a502fd..045c12d9d 100644 --- a/hw/xfree86/ddc/interpret_edid.c +++ b/hw/xfree86/ddc/interpret_edid.c @@ -148,8 +148,12 @@ get_display_section(Uchar *c, struct disp_features *r, r->input_voltage = INPUT_VOLTAGE; r->input_setup = SETUP; r->input_sync = SYNC; - } else if (v->version > 1 || v->revision > 2) + } else if (v->revision == 2 || v->revision == 3) { r->input_dfp = DFP; + } else if (v->revision >= 4) { + r->input_bpc = BPC; + r->input_interface = DIGITAL_INTERFACE; + } r->hsize = HSIZE_MAX; r->vsize = VSIZE_MAX; r->gamma = GAMMA; diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c index 5aebc6e74..9bd7ebcf5 100644 --- a/hw/xfree86/ddc/print_edid.c +++ b/hw/xfree86/ddc/print_edid.c @@ -1,8 +1,28 @@ - -/* print_edid.c: print out all information retrieved from display device - * +/* * Copyright 1998 by Egbert Eich + * Copyright 2007 Red Hat, Inc. + * + * 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 + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * them 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 MERCHANTIBILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS 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. + * + * print_edid.c: print out all information retrieved from display device */ + #ifdef HAVE_XORG_CONFIG_H #include #endif @@ -11,53 +31,9 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "xf86DDC.h" +#include "edid.h" -static void print_vendor(int scrnIndex, struct vendor *); -static void print_version(int scrnIndex, struct edid_version *); -static void print_display(int scrnIndex, struct disp_features *, - struct edid_version *); -static void print_established_timings(int scrnIndex, - struct established_timings *); -static void print_std_timings(int scrnIndex, struct std_timings *); -static void print_detailed_monitor_section(int scrnIndex, - struct detailed_monitor_section *); -static void print_detailed_timings(int scrnIndex, struct detailed_timings *); - -static void print_input_features(int scrnIndex, struct disp_features *); -static void print_dpms_features(int scrnIndex, struct disp_features *, - struct edid_version *v); -static void print_whitepoint(int scrnIndex, struct disp_features *); -static void print_number_sections(int scrnIndex, int); - #define EDID_WIDTH 16 - -xf86MonPtr -xf86PrintEDID(xf86MonPtr m) -{ - CARD16 i, j; - char buf[EDID_WIDTH * 2 + 1]; - - if (!(m)) return NULL; - - print_vendor(m->scrnIndex,&m->vendor); - print_version(m->scrnIndex,&m->ver); - print_display(m->scrnIndex,&m->features, &m->ver); - print_established_timings(m->scrnIndex,&m->timings1); - print_std_timings(m->scrnIndex,m->timings2); - print_detailed_monitor_section(m->scrnIndex,m->det_mon); - print_number_sections(m->scrnIndex,m->no_sections); - - xf86DrvMsg(m->scrnIndex, X_INFO, "EDID (in hex):\n"); - - for (i = 0; i < 128; i += j) { - for (j = 0; j < EDID_WIDTH; ++j) { - sprintf(&buf[j * 2], "%02x", m->rawData[i + j]); - } - xf86DrvMsg(m->scrnIndex, X_INFO, "\t%s\n", buf); - } - - return m; -} static void print_vendor(int scrnIndex, struct vendor *c) @@ -66,7 +42,7 @@ print_vendor(int scrnIndex, struct vendor *c) (char *)&c->name, c->prod_id, c->serial); xf86DrvMsg(scrnIndex, X_INFO, "Year: %u Week: %u\n", c->year, c->week); } - + static void print_version(int scrnIndex, struct edid_version *c) { @@ -74,32 +50,38 @@ print_version(int scrnIndex, struct edid_version *c) c->revision); } -static void -print_display(int scrnIndex, struct disp_features *disp, - struct edid_version *version) -{ - print_input_features(scrnIndex,disp); - xf86DrvMsg(scrnIndex,X_INFO,"Max H-Image Size [cm]: "); - if (disp->hsize) - xf86ErrorF("horiz.: %i ",disp->hsize); - else - xf86ErrorF("H-Size may change, "); - if (disp->vsize) - xf86ErrorF("vert.: %i\n",disp->vsize); - else - xf86ErrorF("V-Size may change\n"); - xf86DrvMsg(scrnIndex,X_INFO,"Gamma: %.2f\n", disp->gamma); - print_dpms_features(scrnIndex,disp,version); - print_whitepoint(scrnIndex,disp); -} - +static const char *digital_interfaces[] = { + "undefined", + "DVI", + "HDMI-a", + "HDMI-b", + "MDDI", + "DisplayPort", + "unknown" +}; + static void -print_input_features(int scrnIndex, struct disp_features *c) +print_input_features(int scrnIndex, struct disp_features *c, + struct edid_version *v) { if (DIGITAL(c->input_type)) { - xf86DrvMsg(scrnIndex,X_INFO,"Digital Display Input\n"); - if (DFP1(c->input_dfp)) - xf86DrvMsg(scrnIndex,X_INFO,"DFP 1.x compatible TMDS\n"); + xf86DrvMsg(scrnIndex, X_INFO, "Digital Display Input\n"); + if (v->revision == 2 || v->revision == 3) { + if (DFP1(c->input_dfp)) + xf86DrvMsg(scrnIndex, X_INFO, "DFP 1.x compatible TMDS\n"); + } else if (v->revision >= 4) { + int interface = c->input_interface; + int bpc = c->input_bpc; + if (interface > 6) + interface = 6; /* unknown */ + if (bpc == 0 || bpc == 7) + xf86DrvMsg(scrnIndex, X_INFO, "Undefined color depth\n"); + else + xf86DrvMsg(scrnIndex, X_INFO, "%d bits per channel\n", + bpc * 2 + 4); + xf86DrvMsg(scrnIndex, X_INFO, "Digital interface is %s\n", + digital_interfaces[interface]); + } } else { xf86DrvMsg(scrnIndex,X_INFO,"Analog Display Input, "); xf86ErrorF("Input Voltage Level: "); @@ -187,7 +169,26 @@ print_whitepoint(int scrnIndex, struct disp_features *disp) xf86ErrorF("whiteX: %.3f whiteY: %.3f\n", disp->whitex,disp->whitey); } - + +static void +print_display(int scrnIndex, struct disp_features *disp, + struct edid_version *version) +{ + print_input_features(scrnIndex, disp, version); + xf86DrvMsg(scrnIndex,X_INFO,"Max H-Image Size [cm]: "); + if (disp->hsize) + xf86ErrorF("horiz.: %i ",disp->hsize); + else + xf86ErrorF("H-Size may change, "); + if (disp->vsize) + xf86ErrorF("vert.: %i\n",disp->vsize); + else + xf86ErrorF("V-Size may change\n"); + xf86DrvMsg(scrnIndex,X_INFO,"Gamma: %.2f\n", disp->gamma); + print_dpms_features(scrnIndex,disp,version); + print_whitepoint(scrnIndex,disp); +} + static void print_established_timings(int scrnIndex, struct established_timings *t) { @@ -253,7 +254,50 @@ print_cvt_timings(int si, struct cvt_timings *t) } else break; } } - + +static void +print_detailed_timings(int scrnIndex, struct detailed_timings *t) +{ + + if (t->clock > 15000000) { /* sanity check */ + xf86DrvMsg(scrnIndex,X_INFO,"Supported additional Video Mode:\n"); + xf86DrvMsg(scrnIndex,X_INFO,"clock: %.1f MHz ",t->clock/1000000.0); + xf86ErrorF("Image Size: %i x %i mm\n",t->h_size,t->v_size); + xf86DrvMsg(scrnIndex,X_INFO, + "h_active: %i h_sync: %i h_sync_end %i h_blank_end %i ", + t->h_active, t->h_sync_off + t->h_active, + t->h_sync_off + t->h_sync_width + t->h_active, + t->h_active + t->h_blanking); + xf86ErrorF("h_border: %i\n",t->h_border); + xf86DrvMsg(scrnIndex,X_INFO, + "v_active: %i v_sync: %i v_sync_end %i v_blanking: %i ", + t->v_active, t->v_sync_off + t->v_active, + t->v_sync_off + t->v_sync_width + t->v_active, + t->v_active + t->v_blanking); + xf86ErrorF("v_border: %i\n",t->v_border); + if (IS_STEREO(t->stereo)) { + xf86DrvMsg(scrnIndex,X_INFO,"Stereo: "); + if (IS_RIGHT_STEREO(t->stereo)) { + if (!t->stereo_1) + xf86ErrorF("right channel on sync\n"); + else + xf86ErrorF("left channel on sync\n"); + } else if (IS_LEFT_STEREO(t->stereo)) { + if (!t->stereo_1) + xf86ErrorF("right channel on even line\n"); + else + xf86ErrorF("left channel on evel line\n"); + } + if (IS_4WAY_STEREO(t->stereo)) { + if (!t->stereo_1) + xf86ErrorF("4-way interleaved\n"); + else + xf86ErrorF("side-by-side interleaved"); + } + } + } +} + static void print_detailed_monitor_section(int scrnIndex, struct detailed_monitor_section *m) @@ -333,49 +377,6 @@ print_detailed_monitor_section(int scrnIndex, } } -static void -print_detailed_timings(int scrnIndex, struct detailed_timings *t) -{ - - if (t->clock > 15000000) { /* sanity check */ - xf86DrvMsg(scrnIndex,X_INFO,"Supported additional Video Mode:\n"); - xf86DrvMsg(scrnIndex,X_INFO,"clock: %.1f MHz ",t->clock/1000000.0); - xf86ErrorF("Image Size: %i x %i mm\n",t->h_size,t->v_size); - xf86DrvMsg(scrnIndex,X_INFO, - "h_active: %i h_sync: %i h_sync_end %i h_blank_end %i ", - t->h_active, t->h_sync_off + t->h_active, - t->h_sync_off + t->h_sync_width + t->h_active, - t->h_active + t->h_blanking); - xf86ErrorF("h_border: %i\n",t->h_border); - xf86DrvMsg(scrnIndex,X_INFO, - "v_active: %i v_sync: %i v_sync_end %i v_blanking: %i ", - t->v_active, t->v_sync_off + t->v_active, - t->v_sync_off + t->v_sync_width + t->v_active, - t->v_active + t->v_blanking); - xf86ErrorF("v_border: %i\n",t->v_border); - if (IS_STEREO(t->stereo)) { - xf86DrvMsg(scrnIndex,X_INFO,"Stereo: "); - if (IS_RIGHT_STEREO(t->stereo)) { - if (!t->stereo_1) - xf86ErrorF("right channel on sync\n"); - else - xf86ErrorF("left channel on sync\n"); - } else if (IS_LEFT_STEREO(t->stereo)) { - if (!t->stereo_1) - xf86ErrorF("right channel on even line\n"); - else - xf86ErrorF("left channel on evel line\n"); - } - if (IS_4WAY_STEREO(t->stereo)) { - if (!t->stereo_1) - xf86ErrorF("4-way interleaved\n"); - else - xf86ErrorF("side-by-side interleaved"); - } - } - } -} - static void print_number_sections(int scrnIndex, int num) { @@ -384,3 +385,30 @@ print_number_sections(int scrnIndex, int num) num); } +xf86MonPtr +xf86PrintEDID(xf86MonPtr m) +{ + CARD16 i, j; + char buf[EDID_WIDTH * 2 + 1]; + + if (!(m)) return NULL; + + print_vendor(m->scrnIndex,&m->vendor); + print_version(m->scrnIndex,&m->ver); + print_display(m->scrnIndex,&m->features, &m->ver); + print_established_timings(m->scrnIndex,&m->timings1); + print_std_timings(m->scrnIndex,m->timings2); + print_detailed_monitor_section(m->scrnIndex,m->det_mon); + print_number_sections(m->scrnIndex,m->no_sections); + + xf86DrvMsg(m->scrnIndex, X_INFO, "EDID (in hex):\n"); + + for (i = 0; i < 128; i += j) { + for (j = 0; j < EDID_WIDTH; ++j) { + sprintf(&buf[j * 2], "%02x", m->rawData[i + j]); + } + xf86DrvMsg(m->scrnIndex, X_INFO, "\t%s\n", buf); + } + + return m; +} From 861ee38817523a647e6be10d7e8fe26f66054217 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 16:06:45 -0500 Subject: [PATCH 366/552] EDID 1.4: Additional aspect ratio semantics for screen size fields. Section 3.6.2, Table 3.12: Horizontal and Vertical Screen Size or Aspect Ratio. --- hw/xfree86/ddc/print_edid.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c index 9bd7ebcf5..59d414fc7 100644 --- a/hw/xfree86/ddc/print_edid.c +++ b/hw/xfree86/ddc/print_edid.c @@ -172,21 +172,28 @@ print_whitepoint(int scrnIndex, struct disp_features *disp) static void print_display(int scrnIndex, struct disp_features *disp, - struct edid_version *version) + struct edid_version *v) { - print_input_features(scrnIndex, disp, version); - xf86DrvMsg(scrnIndex,X_INFO,"Max H-Image Size [cm]: "); - if (disp->hsize) - xf86ErrorF("horiz.: %i ",disp->hsize); - else - xf86ErrorF("H-Size may change, "); - if (disp->vsize) - xf86ErrorF("vert.: %i\n",disp->vsize); - else - xf86ErrorF("V-Size may change\n"); - xf86DrvMsg(scrnIndex,X_INFO,"Gamma: %.2f\n", disp->gamma); - print_dpms_features(scrnIndex,disp,version); - print_whitepoint(scrnIndex,disp); + print_input_features(scrnIndex, disp, v); + if (disp->hsize && disp->vsize) { + xf86DrvMsg(scrnIndex, X_INFO, "Max Image Size [cm]: "); + xf86ErrorF("horiz.: %i ", disp->hsize); + xf86ErrorF("vert.: %i\n", disp->vsize); + } else if (v->revision >= 4 && (disp->hsize || disp->vsize)) { + if (disp->hsize) + xf86DrvMsg(scrnIndex, X_INFO, "Aspect ratio: %.2f (landscape)\n", + (disp->hsize + 99) / 100.0); + if (disp->vsize) + xf86DrvMsg(scrnIndex, X_INFO, "Aspect ratio: %.2f (portrait)\n", + 100.0 / (float)(disp->vsize + 99)); + + } else { + xf86DrvMsg(scrnIndex, X_INFO, "Indeterminate output size\n"); + } + + xf86DrvMsg(scrnIndex, X_INFO, "Gamma: %.2f\n", disp->gamma); + print_dpms_features(scrnIndex, disp, v); + print_whitepoint(scrnIndex, disp); } static void From f1f43caf7e26a84dbacd4e5d7d47c8b4e4982836 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 16:12:11 -0500 Subject: [PATCH 367/552] EDID 1.4: Allow for gamma definition in extension blocks. Section 3.6.3, Table 3.13: Display Transfer Characteristics (Gamma) --- hw/xfree86/ddc/edid.h | 2 +- hw/xfree86/ddc/print_edid.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index 25163a69f..198794eaa 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -129,7 +129,7 @@ #define BPC _BPC(GET(D_INPUT)) #define _DIGITAL_INTERFACE(x) (x & 0x0F) #define DIGITAL_INTERFACE _DIGITAL_INTERFACE(GET(D_INPUT)) -#define _GAMMA(x) (x == 0xff ? 1.0 : ((x + 100.0)/100.0)) +#define _GAMMA(x) (x == 0xff ? 0.0 : ((x + 100.0)/100.0)) #define GAMMA _GAMMA(GET(D_GAMMA)) #define HSIZE_MAX GET(D_HSIZE) #define VSIZE_MAX GET(D_VSIZE) diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c index 59d414fc7..880ca073c 100644 --- a/hw/xfree86/ddc/print_edid.c +++ b/hw/xfree86/ddc/print_edid.c @@ -191,7 +191,11 @@ print_display(int scrnIndex, struct disp_features *disp, xf86DrvMsg(scrnIndex, X_INFO, "Indeterminate output size\n"); } - xf86DrvMsg(scrnIndex, X_INFO, "Gamma: %.2f\n", disp->gamma); + if (!gamma && v->revision >= 1.4) + xf86DrvMsg(scrnIndex, X_INFO, "Gamma defined in extension block\n"); + else + xf86DrvMsg(scrnIndex, X_INFO, "Gamma: %.2f\n", disp->gamma); + print_dpms_features(scrnIndex, disp, v); print_whitepoint(scrnIndex, disp); } From 322d0103aee317500057c80d542d7270d69a5731 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 16:28:44 -0500 Subject: [PATCH 368/552] EDID 1.4: Alternate color encodings for digital inputs. Section 3.6.4, Table 3.14: Feature support. --- hw/xfree86/ddc/edid.h | 6 +++++- hw/xfree86/ddc/print_edid.c | 35 ++++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h index 198794eaa..2496e19e6 100644 --- a/hw/xfree86/ddc/edid.h +++ b/hw/xfree86/ddc/edid.h @@ -326,11 +326,15 @@ #define DPMS_SUSPEND(x) (x & 0x02) #define DPMS_OFF(x) (x & 0x01) -/* display type */ +/* display type, analog */ #define DISP_MONO 0 #define DISP_RGB 1 #define DISP_MULTCOLOR 2 +/* display color encodings, digital */ +#define DISP_YCRCB444 0x01 +#define DISP_YCRCB422 0x02 + /* Msc stuff EDID Ver > 1.1 */ #define STD_COLOR_SPACE(x) (x & 0x4) #define PREFERRED_TIMING_MODE(x) (x & 0x2) diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c index 880ca073c..30cd17588 100644 --- a/hw/xfree86/ddc/print_edid.c +++ b/hw/xfree86/ddc/print_edid.c @@ -128,20 +128,29 @@ print_dpms_features(int scrnIndex, struct disp_features *c, if (DPMS_OFF(c->dpms)) xf86ErrorF(" Off"); } else xf86DrvMsg(scrnIndex,X_INFO,"No DPMS capabilities specified"); - switch (c->display_type){ - case DISP_MONO: - xf86ErrorF("; Monochorome/GrayScale Display\n"); - break; - case DISP_RGB: - xf86ErrorF("; RGB/Color Display\n"); - break; - case DISP_MULTCOLOR: - xf86ErrorF("; Non RGB Multicolor Display\n"); - break; - default: - xf86ErrorF("\n"); - break; + if (!c->input_type) { /* analog */ + switch (c->display_type){ + case DISP_MONO: + xf86ErrorF("; Monochorome/GrayScale Display\n"); + break; + case DISP_RGB: + xf86ErrorF("; RGB/Color Display\n"); + break; + case DISP_MULTCOLOR: + xf86ErrorF("; Non RGB Multicolor Display\n"); + break; + default: + xf86ErrorF("\n"); + break; + } + } else { + int enc = c->display_type; + xf86DrvMsg(scrnIndex, X_INFO, "\nSupported color encodings: " + "RGB 4:4:4 %s%s\n", + enc & DISP_YCRCB444 ? "YCrCb 4:4:4 " : "", + enc & DISP_YCRCB422 ? "YCrCb 4:2:2" : ""); } + if (STD_COLOR_SPACE(c->msc)) xf86DrvMsg(scrnIndex,X_INFO, "Default color space is primary color space\n"); From 592d814ee09e86e283116a7a1052762c8398e8e5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 16:37:23 -0500 Subject: [PATCH 369/552] EDID 1.4: Additional semantics for display feature bits. First mode is _always_ preferred in 1.4; the bit that used to mean this now means that the preferred mode is also the native pixel format. The old "is GTF" bit now means "is continuous-frequency" instead. Section 3.6.4, Table 3.14: Feature Support, Notes 4 and 5. --- hw/xfree86/ddc/print_edid.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c index 30cd17588..a55c46523 100644 --- a/hw/xfree86/ddc/print_edid.c +++ b/hw/xfree86/ddc/print_edid.c @@ -154,16 +154,27 @@ print_dpms_features(int scrnIndex, struct disp_features *c, if (STD_COLOR_SPACE(c->msc)) xf86DrvMsg(scrnIndex,X_INFO, "Default color space is primary color space\n"); - if (PREFERRED_TIMING_MODE(c->msc)) - xf86DrvMsg(scrnIndex,X_INFO, + + if (PREFERRED_TIMING_MODE(c->msc) || v->revision >= 4) { + xf86DrvMsg(scrnIndex, X_INFO, "First detailed timing is preferred mode\n"); - else if (v->version == 1 && v->revision >= 3) + if (v->revision >= 4) + xf86DrvMsg(scrnIndex, X_INFO, + "Preferred mode is native pixel format and refresh rate\n"); + } else if (v->revision == 3) { xf86DrvMsg(scrnIndex,X_INFO, "First detailed timing not preferred " "mode in violation of standard!"); - if (GFT_SUPPORTED(c->msc)) - xf86DrvMsg(scrnIndex,X_INFO, - "GTF timings supported\n"); + } + + if (v->revision >= 4) { + if (GFT_SUPPORTED(c->msc)) { + xf86DrvMsg(scrnIndex, X_INFO, "Display is continuous-frequency\n"); + } + } else { + if (GFT_SUPPORTED(c->msc)) + xf86DrvMsg(scrnIndex, X_INFO, "GTF timings supported\n"); + } } static void From 70b2d6cfeb3bcb7b862a2ae29f6ef7cb84d69486 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 16:39:00 -0500 Subject: [PATCH 370/552] Check the gamma value, not its address. --- hw/xfree86/ddc/print_edid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c index a55c46523..d9f18fa9f 100644 --- a/hw/xfree86/ddc/print_edid.c +++ b/hw/xfree86/ddc/print_edid.c @@ -211,7 +211,7 @@ print_display(int scrnIndex, struct disp_features *disp, xf86DrvMsg(scrnIndex, X_INFO, "Indeterminate output size\n"); } - if (!gamma && v->revision >= 1.4) + if (!disp->gamma && v->revision >= 1.4) xf86DrvMsg(scrnIndex, X_INFO, "Gamma defined in extension block\n"); else xf86DrvMsg(scrnIndex, X_INFO, "Gamma: %.2f\n", disp->gamma); From bae459cfc4f17a5ec5f2810e9f913e3ad2d8b8d4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 16:50:18 -0500 Subject: [PATCH 371/552] Don't carp on EDID 1.4 blocks anymore. Also whine more loudly when we get something other than 1.x. --- hw/xfree86/ddc/interpret_edid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c index 045c12d9d..14b0fd73a 100644 --- a/hw/xfree86/ddc/interpret_edid.c +++ b/hw/xfree86/ddc/interpret_edid.c @@ -369,13 +369,16 @@ get_detailed_timing_section(Uchar *c, struct detailed_timings *r) r->misc = MISC; } -#define MAX_EDID_MINOR 3 +#define MAX_EDID_MINOR 4 static Bool validate_version(int scrnIndex, struct edid_version *r) { - if (r->version != 1) + if (r->version != 1) { + xf86DrvMsg(scrnIndex, X_ERROR, "Unknown EDID version %d\n", + r->version); return FALSE; + } if (r->revision > MAX_EDID_MINOR) xf86DrvMsg(scrnIndex, X_WARNING, From 36ff05771b0699aa80ad718e24097bc25cb4fb00 Mon Sep 17 00:00:00 2001 From: Jurij Smakov Date: Fri, 28 Dec 2007 23:59:53 +0200 Subject: [PATCH 372/552] GL: Add GLX compile flags lost in modular X server changes RISC chips that trap on unaligned loads and stores need to define __GLX_ALIGN64. This used to get added to the cflags in the old *.cf files but it no longer does in the modular X server. Also, Alpha needs to pass -mieee to the compiler as well. This is a simple backport of a patch that debian, and probably other distributions, have been applying forever. To the best of my knowledge the patch was written by Jurij Smakov. See Debian bug number #388125. I just checked and this has been rotting for more than a year in freedesktop bugzilla as #8392. Signed-off-by: David S. Miller --- GL/glx/Makefile.am | 3 ++- configure.ac | 10 ++++++++++ hw/dmx/glxProxy/Makefile.am | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 8eda1531e..4cf56e89d 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -14,7 +14,8 @@ AM_CFLAGS = \ -I@MESA_SOURCE@/src/mesa/glapi \ -I@MESA_SOURCE@/src/mesa/main \ -DXFree86Server \ - @GLX_DEFINES@ + @GLX_DEFINES@ \ + @GLX_ARCH_DEFINES@ # none yet #sdk_HEADERS = diff --git a/configure.ac b/configure.ac index 0b718c9f5..0742040c9 100644 --- a/configure.ac +++ b/configure.ac @@ -304,6 +304,7 @@ case $host_cpu in *freebsd*) SYS_LIBS=-lio ;; *netbsd*) AC_DEFINE(USE_ALPHA_PIO, 1, [NetBSD PIO alpha IO]) ;; esac + GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" ;; arm*) ARM_VIDEO=yes @@ -333,6 +334,7 @@ case $host_cpu in xorg_loader_sparcmuldiv="yes" SPARC64_VIDEO=yes BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; x86_64*|amd64*) use_x86_asm="yes" @@ -347,8 +349,16 @@ case $host_cpu in SYS_LIBS=-lamd64 ;; esac + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + ia64*) + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" + ;; + s390*) + GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; esac +AC_SUBST(GLX_ARCH_DEFINES) dnl BSD *_video.c selection AM_CONDITIONAL(ALPHA_VIDEO, [test "x$ALPHA_VIDEO" = xyes]) diff --git a/hw/dmx/glxProxy/Makefile.am b/hw/dmx/glxProxy/Makefile.am index 1fbc8d764..f99549817 100644 --- a/hw/dmx/glxProxy/Makefile.am +++ b/hw/dmx/glxProxy/Makefile.am @@ -32,6 +32,7 @@ libglxproxy_a_SOURCES = compsize.c \ unpack.h AM_CFLAGS = \ + @GLX_ARCH_DEFINES@ \ $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ -I$(top_srcdir)/include \ From 9dbb73033ae60e7ab85f1469a696e2a52f0cb0fe Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Sat, 29 Dec 2007 00:02:16 +0200 Subject: [PATCH 373/552] Rootless: Fix lvalue error from devPrivates change Instead of trying to use an invalid expression as an lvalue, use the function call instead. --- miext/rootless/accel/rlAccel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/miext/rootless/accel/rlAccel.c b/miext/rootless/accel/rlAccel.c index a14412416..f3cb21569 100644 --- a/miext/rootless/accel/rlAccel.c +++ b/miext/rootless/accel/rlAccel.c @@ -51,6 +51,9 @@ static DevPrivateKey rlAccelScreenPrivateKey = &rlAccelScreenPrivateKey; #define RLACCELREC(pScreen) ((rlAccelScreenRec *) \ dixLookupPrivate(&(pScreen)->devPrivates, rlAccelScreenPrivateKey)) +#define SETRLACCELREC(pScreen, v) \ + dixSetPrivate(&(pScreen)->devPrivates, rlAccelScreenPrivateKey, v) + /* This is mostly identical to fbGCOps. */ static GCOps rlAccelOps = { rlFillSpans, @@ -132,7 +135,7 @@ RootlessAccelInit(ScreenPtr pScreen) s = xalloc(sizeof(rlAccelScreenRec)); if (!s) return FALSE; - RLACCELREC(pScreen) = s; + SETRLACCELREC(pScreen, s); // Wrap the screen functions we need s->CreateGC = pScreen->CreateGC; From 312b30cb03e439644ea10e08fa93268116333f0d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 17:18:30 -0500 Subject: [PATCH 374/552] EDID 1.4: First detailed mode is always preferred. ... so act like it in the modelist generator, not just the parser. --- hw/xfree86/modes/xf86EdidModes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index d8c61617e..87a812765 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -534,6 +534,8 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) quirks = xf86DDCDetectQuirks(scrnIndex, DDC, TRUE); preferred = PREFERRED_TIMING_MODE(DDC->features.msc); + if (DDC->ver.revision >= 4) + preferred = TRUE; if (quirks & DDC_QUIRK_FIRST_DETAILED_PREFERRED) preferred = TRUE; if (quirks & (DDC_QUIRK_PREFER_LARGE_60 | DDC_QUIRK_PREFER_LARGE_75)) From 85365ddf16e2b954d8249b380df53337420ed684 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 28 Dec 2007 17:35:54 -0500 Subject: [PATCH 375/552] EDID 1.4: If given a native pixel format, use it when inferring virtual. --- hw/xfree86/common/xf86Mode.c | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c index 782f08b8d..fb899a1e4 100644 --- a/hw/xfree86/common/xf86Mode.c +++ b/hw/xfree86/common/xf86Mode.c @@ -1215,20 +1215,40 @@ inferVirtualSize(ScrnInfoPtr scrp, DisplayModePtr modes, int *vx, int *vy) { float aspect = 0.0; MonPtr mon = scrp->monitor; + xf86MonPtr DDC; int x = 0, y = 0; DisplayModePtr mode; if (!mon) return 0; + DDC = mon->DDC; + + if (DDC && DDC->ver.revision >= 4) { + /* For 1.4, we might actually get native pixel format. How novel. */ + if (PREFERRED_TIMING_MODE(DDC->features.msc)) { + for (mode = modes; mode; mode = mode->next) { + if (mode->type & (M_T_DRIVER | M_T_PREFERRED)) { + x = mode->HDisplay; + y = mode->VDisplay; + goto found; + } + } + } + /* + * Even if we don't, we might get aspect ratio from extra CVT info + * or from the monitor size fields. TODO. + */ + } /* - * technically this triggers if _either_ is zero, which is not what EDID - * says, but if only one is zero this is best effort. also we don't - * know that all projectors are 4:3, but we certainly suspect it. + * Technically this triggers if either is zero. That wasn't legal + * before EDID 1.4, but right now we'll get that wrong. TODO. */ - if (!mon->widthmm || !mon->heightmm) - aspect = 4.0/3.0; - else - aspect = (float)mon->widthmm / (float)mon->heightmm; + if (!aspect) { + if (!mon->widthmm || !mon->heightmm) + aspect = 4.0/3.0; + else + aspect = (float)mon->widthmm / (float)mon->heightmm; + } /* find the largest M_T_DRIVER mode with that aspect ratio */ for (mode = modes; mode; mode = mode->next) { @@ -1252,6 +1272,7 @@ inferVirtualSize(ScrnInfoPtr scrp, DisplayModePtr modes, int *vx, int *vy) return 0; } +found: *vx = x; *vy = y; From 5c362c2eb2cfdf1f6d667a3e64a0a7bc4942c950 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 1 Jan 2008 09:07:48 -0700 Subject: [PATCH 376/552] regenerated, adds GL_MAX_3D_TEXTURE_SIZE (see bug 13811) --- GL/glx/indirect_size_get.c | 1 + 1 file changed, 1 insertion(+) diff --git a/GL/glx/indirect_size_get.c b/GL/glx/indirect_size_get.c index f64fb7ece..1a1b12399 100644 --- a/GL/glx/indirect_size_get.c +++ b/GL/glx/indirect_size_get.c @@ -538,6 +538,7 @@ __glGetBooleanv_size(GLenum e) case GL_UNPACK_SKIP_IMAGES: case GL_UNPACK_IMAGE_HEIGHT: case GL_TEXTURE_3D: + case GL_MAX_3D_TEXTURE_SIZE: case GL_VERTEX_ARRAY: case GL_NORMAL_ARRAY: case GL_COLOR_ARRAY: From 306fde4082044dfecbedd9af41e660bafb3ce438 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 1 Jan 2008 09:27:44 -0700 Subject: [PATCH 377/552] regenerated to add framebuffer object tokens (bug 13800) --- GL/glx/indirect_size_get.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GL/glx/indirect_size_get.c b/GL/glx/indirect_size_get.c index 1a1b12399..e7eaf97cb 100644 --- a/GL/glx/indirect_size_get.c +++ b/GL/glx/indirect_size_get.c @@ -613,6 +613,7 @@ __glGetBooleanv_size(GLenum e) /* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ case GL_MAX_TEXTURE_UNITS: /* case GL_MAX_TEXTURE_UNITS_ARB:*/ + case GL_MAX_RENDERBUFFER_SIZE_EXT: case GL_TEXTURE_COMPRESSION_HINT: /* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ case GL_TEXTURE_RECTANGLE_ARB: @@ -715,6 +716,10 @@ __glGetBooleanv_size(GLenum e) case GL_ACTIVE_STENCIL_FACE_EXT: case GL_TEXTURE_BINDING_1D_ARRAY_EXT: case GL_TEXTURE_BINDING_2D_ARRAY_EXT: + case GL_DRAW_FRAMEBUFFER_BINDING_EXT: + case GL_RENDERBUFFER_BINDING_EXT: + case GL_READ_FRAMEBUFFER_BINDING_EXT: + case GL_MAX_COLOR_ATTACHMENTS_EXT: case GL_RASTER_POSITION_UNCLIPPED_IBM: return 1; case GL_SMOOTH_POINT_SIZE_RANGE: From 895073f6b41d9313cfe748232c492c5e9f76b443 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 2 Jan 2008 18:09:26 -0800 Subject: [PATCH 378/552] Restore include & typedef needed by dtrace 996b621bec1bbc4fb21970c75eaec62053bc6ccb deleted a couple lines too many --- dix/dispatch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/dispatch.c b/dix/dispatch.c index 577e17cf0..004509caa 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -149,6 +149,8 @@ int ProcInitialConnection(); #ifdef XSERVER_DTRACE #include "registry.h" +#include +typedef const char *string; #include "Xserver-dtrace.h" #endif From 73f422996016107d5f53492e4197bb05ed9c4bb9 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 2 Jan 2008 19:17:54 -0800 Subject: [PATCH 379/552] Fix names/types of new vuidMouse{Get,Set}ScreenPrivates macros --- hw/xfree86/os-support/solaris/sun_mouse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/os-support/solaris/sun_mouse.c b/hw/xfree86/os-support/solaris/sun_mouse.c index b1b7797f1..a5955ef2c 100644 --- a/hw/xfree86/os-support/solaris/sun_mouse.c +++ b/hw/xfree86/os-support/solaris/sun_mouse.c @@ -122,10 +122,10 @@ static void vuidMouseAdjustFrame(int index, int x, int y, int flags); static int vuidMouseGeneration = 0; static DevPrivateKey vuidMouseScreenKey = &vuidMouseScreenKey; -#define vuidGetMouseScreenPrivate(s) ((VuidMsePtr) \ +#define vuidMouseGetScreenPrivate(s) ( \ dixLookupPrivate(&(s)->devPrivates, vuidMouseScreenKey)) -#define vuidSetMouseScreenPrivate(s,p) \ - dixSetPrivate(&(s)->devPrivates, vuidMouseScreenKey, p) +#define vuidMouseSetScreenPrivate(s,p) \ + dixSetPrivate(&(s)->devPrivates, vuidMouseScreenKey, (void *) p) #endif /* HAVE_ABSOLUTE_MOUSE_SCALING */ static inline From f6666dcc3b1ac60f850ea53c357a9ef61672a52a Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 2 Jan 2008 19:19:55 -0800 Subject: [PATCH 380/552] Add dixAllocatePrivate stub to dummylib for utils Normally not necessary, except when building non-optimized/debug causes the inline functions from private.h to appear in os-support/libxorgos.la --- hw/xfree86/dummylib/Makefile.am | 1 + hw/xfree86/dummylib/dixprivates.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 hw/xfree86/dummylib/dixprivates.c diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am index 3e70d25fe..2ab0a77ae 100644 --- a/hw/xfree86/dummylib/Makefile.am +++ b/hw/xfree86/dummylib/Makefile.am @@ -13,6 +13,7 @@ STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c endif libdummy_nonserver_a_SOURCES = \ + dixprivates.c \ fatalerror.c \ logvwrite.c \ $(STRL_SRCS) \ diff --git a/hw/xfree86/dummylib/dixprivates.c b/hw/xfree86/dummylib/dixprivates.c new file mode 100644 index 000000000..40c173a20 --- /dev/null +++ b/hw/xfree86/dummylib/dixprivates.c @@ -0,0 +1,19 @@ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include +#include "os.h" +#include "xf86.h" +#include "xf86Priv.h" + +/* + * Utility functions required by libxf86_os. + */ + +_X_EXPORT pointer * +dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) +{ + return NULL; /* not used */ +} + From dfd682b582636a36345144bcf835e3ee46718d90 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 2 Jan 2008 19:27:22 -0800 Subject: [PATCH 381/552] X.Org bug 4947/Sun bug 6646626: Xv extension not byte-swapping properly X.Org Bugzilla #4947 Sun bug 6646626 Don't use swapped data after swapping it. When done swapping data, send the swapped data, not the address of the pointer to it, to the client. --- Xext/xvdisp.c | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 8096c8c14..17ff1d788 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -67,7 +67,7 @@ SWriteQueryExtensionReply( swaps(&rep->version, n); swaps(&rep->revision, n); - (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep); + (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)rep); return Success; } @@ -83,7 +83,7 @@ SWriteQueryAdaptorsReply( swapl(&rep->length, n); swaps(&rep->num_adaptors, n); - (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep); + (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)rep); return Success; } @@ -99,7 +99,7 @@ SWriteQueryEncodingsReply( swapl(&rep->length, n); swaps(&rep->num_encodings, n); - (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep); + (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)rep); return Success; } @@ -204,7 +204,7 @@ SWriteGrabPortReply( swaps(&rep->sequenceNumber, n); swapl(&rep->length, n); - (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep); + (void)WriteToClient(client, sz_xvGrabPortReply, (char *)rep); return Success; } @@ -220,7 +220,7 @@ SWriteGetPortAttributeReply( swapl(&rep->length, n); swapl(&rep->value, n); - (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep); + (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)rep); return Success; } @@ -237,7 +237,7 @@ SWriteQueryBestSizeReply( swaps(&rep->actual_width, n); swaps(&rep->actual_height, n); - (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep); + (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)rep); return Success; } @@ -254,7 +254,7 @@ SWriteQueryPortAttributesReply( swapl(&rep->num_attributes, n); swapl(&rep->text_size, n); - (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep); + (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)rep); return Success; } @@ -273,7 +273,7 @@ SWriteQueryImageAttributesReply( swaps(&rep->width, n); swaps(&rep->height, n); - (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep); + (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)rep); return Success; } @@ -289,7 +289,7 @@ SWriteListImageFormatsReply( swapl(&rep->length, n); swapl(&rep->num_formats, n); - (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep); + (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)rep); return Success; } @@ -378,6 +378,7 @@ ProcXvQueryAdaptors(ClientPtr client) xvAdaptorInfo ainfo; xvQueryAdaptorsReply rep; int totalSize, na, nf, rc; + int nameSize; XvAdaptorPtr pa; XvFormatPtr pf; WindowPtr pWin; @@ -439,12 +440,12 @@ ProcXvQueryAdaptors(ClientPtr client) ainfo.base_id = pa->base_id; ainfo.num_ports = pa->nPorts; ainfo.type = pa->type; - ainfo.name_size = strlen(pa->name); + ainfo.name_size = nameSize = strlen(pa->name); ainfo.num_formats = pa->nFormats; _WriteAdaptorInfo(client, &ainfo); - WriteToClient(client, ainfo.name_size, pa->name); + WriteToClient(client, nameSize, pa->name); nf = pa->nFormats; pf = pa->pFormats; @@ -469,6 +470,7 @@ ProcXvQueryEncodings(ClientPtr client) xvEncodingInfo einfo; xvQueryEncodingsReply rep; int totalSize; + int nameSize; XvPortPtr pPort; int ne; XvEncodingPtr pe; @@ -513,13 +515,13 @@ ProcXvQueryEncodings(ClientPtr client) while (ne--) { einfo.encoding = pe->id; - einfo.name_size = strlen(pe->name); + einfo.name_size = nameSize = strlen(pe->name); einfo.width = pe->width; einfo.height = pe->height; einfo.rate.numerator = pe->rate.numerator; einfo.rate.denominator = pe->rate.denominator; _WriteEncodingInfo(client, &einfo); - WriteToClient(client, einfo.name_size, pe->name); + WriteToClient(client, nameSize, pe->name); pe++; } @@ -984,18 +986,19 @@ ProcXvQueryPortAttributes(ClientPtr client) rep.text_size = 0; for(i = 0, pAtt = pPort->pAdaptor->pAttributes; - i < rep.num_attributes; i++, pAtt++) + i < pPort->pAdaptor->nAttributes; i++, pAtt++) { rep.text_size += (strlen(pAtt->name) + 1 + 3) & ~3L; } - rep.length = (rep.num_attributes * sz_xvAttributeInfo) + rep.text_size; + rep.length = (pPort->pAdaptor->nAttributes * sz_xvAttributeInfo) + + rep.text_size; rep.length >>= 2; _WriteQueryPortAttributesReply(client, &rep); for(i = 0, pAtt = pPort->pAdaptor->pAttributes; - i < rep.num_attributes; i++, pAtt++) + i < pPort->pAdaptor->nAttributes; i++, pAtt++) { size = strlen(pAtt->name) + 1; /* pass the NULL */ Info.flags = pAtt->flags; @@ -1211,6 +1214,7 @@ ProcXvQueryImageAttributes(ClientPtr client) XvPortPtr pPort; int *offsets; int *pitches; + int planeLength; REQUEST(xvQueryImageAttributesReq); REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); @@ -1250,7 +1254,7 @@ ProcXvQueryImageAttributes(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.length = num_planes << 1; + rep.length = planeLength = num_planes << 1; rep.num_planes = num_planes; rep.width = width; rep.height = height; @@ -1258,8 +1262,8 @@ ProcXvQueryImageAttributes(ClientPtr client) _WriteQueryImageAttributesReply(client, &rep); if(client->swapped) - SwapLongs((CARD32*)offsets, rep.length); - WriteToClient(client, rep.length << 2, (char*)offsets); + SwapLongs((CARD32*)offsets, planeLength); + WriteToClient(client, planeLength << 2, (char*)offsets); xfree(offsets); @@ -1287,13 +1291,13 @@ ProcXvListImageFormats(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.num_formats = pPort->pAdaptor->nImages; - rep.length = rep.num_formats * sz_xvImageFormatInfo >> 2; + rep.length = pPort->pAdaptor->nImages * sz_xvImageFormatInfo >> 2; _WriteListImageFormatsReply(client, &rep); pImage = pPort->pAdaptor->pImages; - for(i = 0; i < rep.num_formats; i++, pImage++) { + for(i = 0; i < pPort->pAdaptor->nImages; i++, pImage++) { info.id = pImage->id; info.type = pImage->type; info.byte_order = pImage->byte_order; From ccf6636d2ca8acdaaeb8da34db507a10a082b0de Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 2 Jan 2008 19:28:33 -0800 Subject: [PATCH 382/552] Kill xf86getpagesize even harder (dummylib & ioport) --- hw/xfree86/dummylib/Makefile.am | 1 - hw/xfree86/dummylib/xf86getpagesize.c | 21 --------------------- hw/xfree86/utils/ioport/ioport.c | 1 - 3 files changed, 23 deletions(-) delete mode 100644 hw/xfree86/dummylib/xf86getpagesize.c diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am index 2ab0a77ae..ad3f1ea12 100644 --- a/hw/xfree86/dummylib/Makefile.am +++ b/hw/xfree86/dummylib/Makefile.am @@ -25,7 +25,6 @@ libdummy_nonserver_a_SOURCES = \ xf86drvmsgverb.c \ xf86errorf.c \ xf86errorfverb.c \ - xf86getpagesize.c \ xf86getverb.c \ xf86info.c \ xf86msg.c \ diff --git a/hw/xfree86/dummylib/xf86getpagesize.c b/hw/xfree86/dummylib/xf86getpagesize.c deleted file mode 100644 index 8859c7673..000000000 --- a/hw/xfree86/dummylib/xf86getpagesize.c +++ /dev/null @@ -1,21 +0,0 @@ -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include "os.h" -#include "xf86.h" -#include "xf86Priv.h" - -/* - * Utility functions required by libxf86_os. - */ - -int xf86getpagesize(void); - -_X_EXPORT int -xf86getpagesize(void) -{ - return 4096; /* not used */ -} - diff --git a/hw/xfree86/utils/ioport/ioport.c b/hw/xfree86/utils/ioport/ioport.c index 32213642e..737043462 100644 --- a/hw/xfree86/utils/ioport/ioport.c +++ b/hw/xfree86/utils/ioport/ioport.c @@ -489,4 +489,3 @@ main(argc, argv) return (0); } -#include "xf86getpagesize.c" From 17a9714a6789a389d52dbb40fd1eed1e24c04d64 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 3 Jan 2008 14:46:54 -0500 Subject: [PATCH 383/552] Bug #13794: Update MBE extension devPrivates to new interface. --- Xext/mbuf.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/Xext/mbuf.c b/Xext/mbuf.c index 35c8c8988..0b5b91ea9 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -61,8 +61,8 @@ in this Software without prior written authorization from The Open Group. static int MultibufferEventBase; static int MultibufferErrorBase; -int MultibufferScreenIndex = -1; -int MultibufferWindowIndex = -1; +static DevPrivateKey MultibufferScreenPrivKey = &MultibufferScreenPrivKey; +static DevPrivateKey MultibufferWindowPrivKey = &MultibufferWindowPrivKey; static void PerformDisplayRequest ( MultibuffersPtr * /* ppMultibuffers */, @@ -200,27 +200,16 @@ MultibufferExtensionInit() ScreenPtr pScreen; MultibufferScreenPtr pMultibufferScreen; - /* - * allocate private pointers in windows and screens. Allocating - * window privates may seem like an unnecessary expense, but every - * PositionWindow call must check to see if the window is - * multi-buffered; a resource lookup is too expensive. - */ - MultibufferScreenIndex = AllocateScreenPrivateIndex (); - if (MultibufferScreenIndex < 0) - return; - MultibufferWindowIndex = AllocateWindowPrivateIndex (); for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; - if (!AllocateWindowPrivate (pScreen, MultibufferWindowIndex, 0) || - !(pMultibufferScreen = (MultibufferScreenPtr) xalloc (sizeof (MultibufferScreenRec)))) + if (!(pMultibufferScreen = (MultibufferScreenPtr) xalloc (sizeof (MultibufferScreenRec)))) { for (j = 0; j < i; j++) - xfree (screenInfo.screens[j]->devPrivates[MultibufferScreenIndex].ptr); + xfree (dixLookupPrivate(&screenInfo.screens[j]->devPrivates, MultibufferScreenPrivKey)); return; } - pScreen->devPrivates[MultibufferScreenIndex].ptr = (pointer) pMultibufferScreen; + dixSetPrivate(&pScreen->devPrivates, MultibufferScreenPrivKey, pMultibufferScreen); /* * wrap PositionWindow to resize the pixmap when the window * changes size @@ -260,14 +249,11 @@ ExtensionEntry *extEntry; ScreenPtr pScreen; MultibufferScreenPtr pMultibufferScreen; - if (MultibufferScreenIndex < 0) - return; for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; - if (pScreen->devPrivates[MultibufferScreenIndex].ptr) + if ((pMultibufferScreen = (MultibufferScreenPtr)dixLookupPrivate(&pScreen->devPrivates, MultibufferScreenPrivKey))) { - pMultibufferScreen = (MultibufferScreenPtr) pScreen->devPrivates[MultibufferScreenIndex].ptr; pScreen->PositionWindow = pMultibufferScreen->PositionWindow; xfree (pMultibufferScreen); } @@ -427,7 +413,7 @@ CreateImageBuffers (pWin, nbuf, ids, action, hint) pMultibuffers->lastUpdate.milliseconds = 0; pMultibuffers->width = width; pMultibuffers->height = height; - pWin->devPrivates[MultibufferWindowIndex].ptr = (pointer) pMultibuffers; + dixSetPrivate(&pWin->devPrivates, MultibufferWindowPrivKey, pMultibuffers); if (pClearGC) FreeScratchGC(pClearGC); return Success; } @@ -487,7 +473,7 @@ ProcCreateImageBuffers (client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.numberBuffer = ((MultibuffersPtr) (pWin->devPrivates[MultibufferWindowIndex].ptr))->numMultibuffer; + rep.numberBuffer = ((MultibuffersPtr) (dixLookupPrivate(&pWin->devPrivates, MultibufferWindowPrivKey)))->numMultibuffer; if (client->swapped) { swaps(&rep.sequenceNumber, n); @@ -1236,7 +1222,7 @@ GetBufferPointer (pWin, i) { MultibuffersPtr pMultibuffers; - if (!(pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr)) + if (!(pMultibuffers = (MultibuffersPtr) dixLookupPrivate(&pWin->devPrivates, MultibufferWindowPrivKey))) return NULL; return (DrawablePtr) pMultibuffers->buffers[i].pPixmap; } @@ -1475,7 +1461,7 @@ DestroyImageBuffers (pWin) { FreeResourceByType (pWin->drawable.id, MultibuffersResType, FALSE); /* Zero out the window's pointer to the buffers so they won't be reused */ - pWin->devPrivates[MultibufferWindowIndex].ptr = NULL; + dixSetPrivate(&pWin->devPrivates, MultibufferWindowPrivKey, NULL); } /* @@ -1503,11 +1489,11 @@ MultibufferPositionWindow (pWin, x, y) Bool clear; pScreen = pWin->drawable.pScreen; - pMultibufferScreen = (MultibufferScreenPtr) pScreen->devPrivates[MultibufferScreenIndex].ptr; + pMultibufferScreen = (MultibufferScreenPtr) dixLookupPrivate(&pScreen->devPrivates, MultibufferScreenPrivKey); (*pMultibufferScreen->PositionWindow) (pWin, x, y); /* if this window is not multibuffered, we're done */ - if (!(pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr)) + if (!(pMultibuffers = (MultibuffersPtr) dixLookupPrivate(&pWin->devPrivates, MultibufferWindowPrivKey))) return TRUE; /* if new size is same as old, we're done */ @@ -1620,7 +1606,7 @@ MultibufferDrawableDelete (value, id) if (pDrawable->type == DRAWABLE_WINDOW) { pWin = (WindowPtr) pDrawable; - pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr; + pMultibuffers = (MultibuffersPtr) dixLookupPrivate(&pWin->devPrivates, MultibufferWindowPrivKey); pPixmap = pMultibuffers->buffers[pMultibuffers->displayedMultibuffer].pPixmap; } else From e46d559739e020dc7f6fcbdc6d1fb39c57aab4b1 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 22 Dec 2007 15:09:12 -0800 Subject: [PATCH 384/552] XQuartz: Cleaned up color map configuration. 8 bit color still doesn't work, but the -depth command line argument now works properly. (cherry picked from commit 6765949c27c053d22882f54337cfd09203aa5383) --- hw/xquartz/darwin.c | 108 ++++++++++++++++--------------------- hw/xquartz/darwin.h | 10 ++-- hw/xquartz/xpr/xprScreen.c | 81 ++++++++++++++++++---------- 3 files changed, 105 insertions(+), 94 deletions(-) diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 463073485..3ad9e14d5 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -78,7 +78,7 @@ #include "darwinEvents.h" #include "darwinKeyboard.h" #include "quartz.h" -#include "darwinClut8.h" +//#include "darwinClut8.h" #ifdef ENABLE_DEBUG_LOG FILE *debug_log_fp = NULL; @@ -176,17 +176,10 @@ static Bool DarwinSaveScreen(ScreenPtr pScreen, int on) * This is a callback from dix during AddScreen() from InitOutput(). * Initialize the screen and communicate information about it back to dix. */ -static Bool DarwinAddScreen( - int index, - ScreenPtr pScreen, - int argc, - char **argv ) -{ - int bitsPerRGB, i, dpi; +static Bool DarwinAddScreen(int index, ScreenPtr pScreen, int argc, char **argv) { + int dpi; static int foundIndex = 0; Bool ret; - VisualPtr visual; - ColormapPtr pmap; DarwinFramebufferPtr dfb; // reset index of found screens for each server generation @@ -204,28 +197,13 @@ static Bool DarwinAddScreen( if (! ret) return FALSE; - bitsPerRGB = dfb->bitsPerComponent; - // reset the visual list miClearVisualTypes(); // setup a single visual appropriate for our pixel type - if (dfb->colorType == TrueColor) { - if (!miSetVisualTypes( dfb->colorBitsPerPixel, TrueColorMask, - bitsPerRGB, TrueColor )) { - return FALSE; - } - } else if (dfb->colorType == PseudoColor) { - if (!miSetVisualTypes( dfb->colorBitsPerPixel, PseudoColorMask, - bitsPerRGB, PseudoColor )) { - return FALSE; - } - } else if (dfb->colorType == StaticColor) { - if (!miSetVisualTypes( dfb->colorBitsPerPixel, StaticColorMask, - bitsPerRGB, StaticColor )) { - return FALSE; - } - } else { + if(!miSetVisualTypesAndMasks(dfb->depth, dfb->visuals, dfb->bitsPerRGB, + dfb->preferredCVC, dfb->redMask, + dfb->greenMask, dfb->blueMask)) { return FALSE; } @@ -249,20 +227,28 @@ static Bool DarwinAddScreen( return FALSE; } +// ErrorF("Screen type: %d, %d=%d, %d=%d, %d=%d, %x=%x=%x, %x=%x=%x, %x=%x=%x\n", pScreen->visuals->class, +// pScreen->visuals->offsetRed, dfb->bitsPerRGB * 2, +// pScreen->visuals->offsetGreen, dfb->bitsPerRGB, +// pScreen->visuals->offsetBlue, 0, +// pScreen->visuals->redMask, dfb->redMask, ((1<bitsPerRGB)-1) << pScreen->visuals->offsetRed, +// pScreen->visuals->greenMask, dfb->greenMask, ((1<bitsPerRGB)-1) << pScreen->visuals->offsetGreen, +// pScreen->visuals->blueMask, dfb->blueMask, ((1<bitsPerRGB)-1) << pScreen->visuals->offsetBlue); + // set the RGB order correctly for TrueColor - if (dfb->bitsPerPixel > 8) { - for (i = 0, visual = pScreen->visuals; // someday we may have more than 1 - i < pScreen->numVisuals; i++, visual++) { - if (visual->class == TrueColor) { - visual->offsetRed = bitsPerRGB * 2; - visual->offsetGreen = bitsPerRGB; - visual->offsetBlue = 0; - visual->redMask = ((1<offsetRed; - visual->greenMask = ((1<offsetGreen; - visual->blueMask = ((1<offsetBlue; - } - } - } +// if (dfb->bitsPerPixel > 8) { +// for (i = 0, visual = pScreen->visuals; // someday we may have more than 1 +// i < pScreen->numVisuals; i++, visual++) { +// if (visual->class == TrueColor) { +// visual->offsetRed = bitsPerRGB * 2; +// visual->offsetGreen = bitsPerRGB; +// visual->offsetBlue = 0; +// visual->redMask = ((1<offsetRed; +// visual->greenMask = ((1<offsetGreen; +// visual->blueMask = ((1<offsetBlue; +// } +// } +// } #ifdef RENDER if (! fbPictureInit(pScreen, 0, 0)) { @@ -292,17 +278,16 @@ static Bool DarwinAddScreen( * mode and we're using a fixed color map. Essentially this translates * to Darwin/x86 in 8-bit mode. */ - if( (dfb->colorBitsPerPixel == 8) && - (dfb->colorType == StaticColor) ) - { - pmap = miInstalledMaps[pScreen->myNum]; - visual = pmap->pVisual; - for( i = 0; i < visual->ColormapEntries; i++ ) { - pmap->red[i].co.local.red = darwinClut8[i].red; - pmap->red[i].co.local.green = darwinClut8[i].green; - pmap->red[i].co.local.blue = darwinClut8[i].blue; - } - } +// if(dfb->depth == 8) { +// ColormapPtr map = RootlessGetColormap (pScreen); +// for( i = 0; i < map->pVisual->ColormapEntries; i++ ) { +// Entry *ent = map->red + i; +// ErrorF("Setting lo %d -> r: %04x g: %04x b: %04x\n", i, darwinClut8[i].red, darwinClut8[i].green, darwinClut8[i].blue); +// ent->co.local.red = darwinClut8[i].red; +// ent->co.local.green = darwinClut8[i].green; +// ent->co.local.blue = darwinClut8[i].blue; +// } +// } dixScreenOrigins[index].x = dfb->x; dixScreenOrigins[index].y = dfb->y; @@ -793,24 +778,21 @@ int ddxProcessArgument( int argc, char *argv[], int i ) } if ( !strcmp( argv[i], "-depth" ) ) { - int bitDepth; - if ( i == argc-1 ) { FatalError( "-depth must be followed by a number\n" ); } #ifdef OLD_POWERBOOK_G3 ErrorF( "Ignoring unsupported -depth option on old PowerBook G3\n"); #else - bitDepth = atoi( argv[i+1] ); - if (bitDepth == 8) - darwinDesiredDepth = 0; - else if (bitDepth == 15) - darwinDesiredDepth = 1; - else if (bitDepth == 24) - darwinDesiredDepth = 2; - else + darwinDesiredDepth = atoi( argv[i+1] ); + if(darwinDesiredDepth != -1 && + darwinDesiredDepth != 8 && + darwinDesiredDepth != 15 && + darwinDesiredDepth != 24) { FatalError( "Unsupported pixel depth. Use 8, 15, or 24 bits\n" ); - ErrorF( "Attempting to use pixel depth of %i\n", bitDepth ); + } + + ErrorF( "Attempting to use pixel depth of %i\n", darwinDesiredDepth ); #endif return 2; } diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index c569d66df..19254247a 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -40,10 +40,14 @@ typedef struct { int width; int height; int pitch; - int colorType; + int depth; + int visuals; + int bitsPerRGB; int bitsPerPixel; - int colorBitsPerPixel; - int bitsPerComponent; + int preferredCVC; + Pixel redMask; + Pixel greenMask; + Pixel blueMask; } DarwinFramebufferRec, *DarwinFramebufferPtr; // From darwin.c diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c index 068b7b177..29179e5fd 100644 --- a/hw/xquartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -42,6 +42,7 @@ #include "globals.h" #include "Xplugin.h" #include "applewmExt.h" +#include "micmap.h" // From xprFrame.c WindowPtr xprGetXWindow(xp_window_id wid); @@ -249,35 +250,59 @@ static Bool xprAddScreen(int index, ScreenPtr pScreen) { DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - - /* If no specific depth chosen, look for the depth of the main display. - Else if 16bpp specified, use that. Else use 32bpp. */ - - dfb->colorType = TrueColor; - dfb->bitsPerComponent = 8; - dfb->bitsPerPixel = 32; - dfb->colorBitsPerPixel = 24; - - if (darwinDesiredDepth == -1) - { - dfb->bitsPerComponent = CGDisplayBitsPerSample(kCGDirectMainDisplay); - dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); - dfb->colorBitsPerPixel = - CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * - dfb->bitsPerComponent; + int depth = darwinDesiredDepth; + + if(depth == -1) { + depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay); + //dfb->depth = CGDisplaySamplesPerPixel(kCGDirectMainDisplay) * CGDisplayBitsPerSample(kCGDirectMainDisplay); + //dfb->bitsPerRGB = CGDisplayBitsPerSample(kCGDirectMainDisplay); + //dfb->bitsPerPixel = CGDisplayBitsPerPixel(kCGDirectMainDisplay); } - else if (darwinDesiredDepth == 15) - { - dfb->bitsPerComponent = 5; - dfb->bitsPerPixel = 16; - dfb->colorBitsPerPixel = 15; - } - else if (darwinDesiredDepth == 8) - { - dfb->colorType = PseudoColor; - dfb->bitsPerComponent = 8; - dfb->bitsPerPixel = 8; - dfb->colorBitsPerPixel = 8; + + switch(depth) { + case -8: // broken + FatalError("Unsupported color depth %d\n", darwinDesiredDepth); + dfb->visuals = (1 << StaticGray) | (1 << GrayScale); + dfb->preferredCVC = GrayScale; + dfb->depth = 8; + dfb->bitsPerRGB = 8; + dfb->bitsPerPixel = 8; + dfb->redMask = 0; + dfb->greenMask = 0; + dfb->blueMask = 0; + break; + case 8: // broken + dfb->visuals = PseudoColorMask; + dfb->preferredCVC = PseudoColor; + dfb->depth = 8; + dfb->bitsPerRGB = 8; + dfb->bitsPerPixel = 8; + dfb->redMask = 0; + dfb->greenMask = 0; + dfb->blueMask = 0; + break; + case 15: + dfb->visuals = LARGE_VISUALS; + dfb->preferredCVC = TrueColor; + dfb->depth = 15; + dfb->bitsPerRGB = 5; + dfb->bitsPerPixel = 16; + dfb->redMask = 0x7c00; + dfb->greenMask = 0x03e0; + dfb->blueMask = 0x001f; + break; + case 24: + dfb->visuals = LARGE_VISUALS; + dfb->preferredCVC = TrueColor; + dfb->depth = 24; + dfb->bitsPerRGB = 8; + dfb->bitsPerPixel = 32; + dfb->redMask = 0x00ff0000; + dfb->greenMask = 0x0000ff00; + dfb->blueMask = 0x000000ff; + break; + default: + FatalError("Unsupported color depth %d\n", darwinDesiredDepth); } if (noPseudoramiXExtension) From cd0603c2dc5ee000ebce66056bc1a72f99bfb617 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 3 Jan 2008 21:41:02 -0500 Subject: [PATCH 385/552] Bug #13765: Heap corruption in XC-SECURITY extension code. --- Xext/xace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xace.c b/Xext/xace.c index 9f8a8cc75..6a7df3188 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -448,7 +448,7 @@ XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h, /* convert region to list-of-rectangles for PolyFillRect */ - pRects = (xRectangle *)xalloc(nRects * sizeof(xRectangle *)); + pRects = (xRectangle *)xalloc(nRects * sizeof(xRectangle)); if (!pRects) { failed = TRUE; From 20eb26f9d149993ae360a2cbd1b536b68c9f4069 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 3 Jan 2008 22:53:36 -0500 Subject: [PATCH 386/552] Fix potential crasher in xf86CrtcRotate() xf86CrtcRotate() is called by randr 1.2 drivers via xf86CrtcSetMode() or xf86SetDesiredModes() during ScreenInit() at which point pScrn->pScreen is not set. If a user specifies a rotation in their config file pScrn->pScreen is dereferenced and boom. --- hw/xfree86/modes/xf86Rotate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index 380478f7f..c129d9b92 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -494,7 +494,8 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) { ScrnInfoPtr pScrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); - ScreenPtr pScreen = pScrn->pScreen; + /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */ + ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; PictTransform crtc_to_fb, fb_to_crtc; PictureTransformIdentity (&crtc_to_fb); From de18703d2a25999e391d11b4c82ee018fb87372d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 3 Jan 2008 23:07:24 -0500 Subject: [PATCH 387/552] dix: Fix bug+leak in callback manager DeleteCallbackList function. --- dix/dixutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/dixutils.c b/dix/dixutils.c index 786f4e335..dd485d518 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -800,7 +800,7 @@ _DeleteCallbackList( for (i = 0; i < numCallbackListsToCleanup; i++) { - if ((listsToCleanup[i] = pcbl) != 0) + if (listsToCleanup[i] == pcbl) { listsToCleanup[i] = NULL; break; From 7f376f23db463a65176de632ca6094acb55db951 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 3 Jan 2008 23:08:49 -0500 Subject: [PATCH 388/552] devPrivates rework: Free callback lists after use. --- dix/privates.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/privates.c b/dix/privates.c index e04da41b1..47a0e1a29 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -232,6 +232,8 @@ dixResetPrivates(void) /* reset internal structures */ while (items) { next = items->next; + DeleteCallbackList(&items->initfuncs); + DeleteCallbackList(&items->deletefuncs); xfree(items); items = next; } From 39cb782f28be4efb2621fd8c614f2367eb834412 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 3 Jan 2008 23:16:06 -0500 Subject: [PATCH 389/552] XACE: DeleteCallbackList zeroes out its argument so don't do it twice. --- Xext/xace.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 6a7df3188..e85a51714 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -262,10 +262,7 @@ XaceResetProc(ExtensionEntry *extEntry) int i; for (i=0; i Date: Fri, 4 Jan 2008 12:37:55 +0000 Subject: [PATCH 390/552] Fix Line drawing with CapNotLast set in PolySegment. --- exa/exa_accel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/exa/exa_accel.c b/exa/exa_accel.c index ae951ed9a..c2bfdee6b 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -739,6 +739,14 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, prect[i].y = pSeg[i].y2; prect[i].height = pSeg[i].y1 - pSeg[i].y2 + 1; } + + /* don't paint last pixel */ + if (pGC->capStyle == CapNotLast) { + if (prect[i].width == 1) + prect[i].height--; + else + prect[i].width--; + } } pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect); xfree(prect); From aca75f389e2b08096c3cacec03b12a58075cf12c Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 4 Jan 2008 12:23:09 -0800 Subject: [PATCH 391/552] XQuartz: Flush the debug log for easier debugging Also cleaned up formatting in xpr's eventHandler (cherry picked from commit 16861d6d4239c7f3918332ef07752f1e211afb23) --- hw/xquartz/darwin.h | 2 +- hw/xquartz/xpr/xprScreen.c | 91 +++++++++++++++++++------------------- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index 19254247a..c5e2ed80d 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -124,7 +124,7 @@ enum { #ifdef ENABLE_DEBUG_LOG extern FILE *debug_log_fp; #define DEBUG_LOG_NAME "x11-debug.txt" -#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%s:%d: " msg, __FUNCTION__, __LINE__, ##args ) +#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, "%s:%s:%d " msg, __FILE__, __FUNCTION__, __LINE__, ##args ); fflush(debug_log_fp); #else #define DEBUG_LOG(msg, args...) #endif diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c index 29179e5fd..e4e1fda7e 100644 --- a/hw/xquartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -62,53 +62,52 @@ static const char *xprOpenGLBundle = "glxCGL.bundle"; * eventHandler * Callback handler for Xplugin events. */ -static void -eventHandler(unsigned int type, const void *arg, - unsigned int arg_size, void *data) -{ +static void eventHandler(unsigned int type, const void *arg, + unsigned int arg_size, void *data) { switch (type) { - case XP_EVENT_DISPLAY_CHANGED: - DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n"); - QuartzMessageServerThread(kXDarwinDisplayChanged, 0); - break; - - case XP_EVENT_WINDOW_STATE_CHANGED: - DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED\n"); - if (arg_size >= sizeof(xp_window_state_event)) { - const xp_window_state_event *ws_arg = arg; - - QuartzMessageServerThread(kXDarwinWindowState, 2, - ws_arg->id, ws_arg->state); - } - break; - - case XP_EVENT_WINDOW_MOVED: - DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n"); - if (arg_size == sizeof(xp_window_id)) { - xp_window_id id = * (xp_window_id *) arg; - WindowPtr pWin = xprGetXWindow(id); - QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin); - } - break; - - case XP_EVENT_SURFACE_DESTROYED: - DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n"); - case XP_EVENT_SURFACE_CHANGED: - DEBUG_LOG("XP_EVENT_SURFACE_CHANGED\n"); - if (arg_size == sizeof(xp_surface_id)) { - int kind; - - if (type == XP_EVENT_SURFACE_DESTROYED) - kind = AppleDRISurfaceNotifyDestroyed; - else - kind = AppleDRISurfaceNotifyChanged; - - DRISurfaceNotify(*(xp_surface_id *) arg, kind); - } - break; - default: - ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n", - type); + case XP_EVENT_DISPLAY_CHANGED: + DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n"); + QuartzMessageServerThread(kXDarwinDisplayChanged, 0); + break; + + case XP_EVENT_WINDOW_STATE_CHANGED: + if (arg_size >= sizeof(xp_window_state_event)) { + const xp_window_state_event *ws_arg = arg; + + DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: id=%d, state=%d\n", ws_arg->id, ws_arg->state); + QuartzMessageServerThread(kXDarwinWindowState, 2, + ws_arg->id, ws_arg->state); + } else { + DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: ignored\n"); + } + break; + + case XP_EVENT_WINDOW_MOVED: + DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n"); + if (arg_size == sizeof(xp_window_id)) { + xp_window_id id = * (xp_window_id *) arg; + WindowPtr pWin = xprGetXWindow(id); + QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin); + } + break; + + case XP_EVENT_SURFACE_DESTROYED: + DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n"); + case XP_EVENT_SURFACE_CHANGED: + DEBUG_LOG("XP_EVENT_SURFACE_CHANGED\n"); + if (arg_size == sizeof(xp_surface_id)) { + int kind; + + if (type == XP_EVENT_SURFACE_DESTROYED) + kind = AppleDRISurfaceNotifyDestroyed; + else + kind = AppleDRISurfaceNotifyChanged; + + DRISurfaceNotify(*(xp_surface_id *) arg, kind); + } + break; + default: + ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n", type); } } From 11967dce11cd953d123d53bb3389aa257c5158e8 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 4 Jan 2008 22:54:26 -0800 Subject: [PATCH 392/552] XQuartz: Fixed copyright in About box for 2008. Happy New Year! --- hw/xquartz/Makefile.am | 4 +++- hw/xquartz/bundle/Info.plist | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 831ba49f4..9ac6e0a3e 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -1,7 +1,9 @@ noinst_LTLIBRARIES = libXquartz.la AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) +AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ -DBUILD_DATE=\"$(BUILD_DATE)\" \ + -DXSERVER_VERSION=\"$(VERSION)\" \ -DINXQUARTZ \ -DUSE_NEW_CLUT \ -DXFree86Server \ @@ -15,7 +17,7 @@ SUBDIRS = . xpr $(X11APP_SUBDIRS) DIST_SUBDIRS = xpr bundle libXquartz_la_SOURCES = \ - $(top_srcdir)/fb/fbcmap.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c \ X11Application.m \ X11Controller.m \ diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist index fce8c964d..5babdfe6e 100644 --- a/hw/xquartz/bundle/Info.plist +++ b/hw/xquartz/bundle/Info.plist @@ -25,9 +25,9 @@ CSResourcesFileMapped NSHumanReadableCopyright - Copyright © 2003-2007, Apple Inc. + Copyright © 2003-2008, Apple Inc. Copyright © 2003, XFree86 Project, Inc. -Copyright © 2003-2007, X.org Project, Inc. +Copyright © 2003-2008, X.org Project, Inc. NSMainNibFile main From 7d226d6a251cb90765be2b50a1973986c5b7605b Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 5 Jan 2008 03:14:07 -0800 Subject: [PATCH 393/552] XQuartz: Cleanup for strict-prototyping Also fixed DarwinEQEnqueue to match changes to the callback And also use dpmsstubs.c rather than copying the code into darwin.c (cherry picked from commit 4c5c30a4beb7a427b00b18097f548876ad3c11d7) --- hw/xquartz/Makefile.am | 1 + hw/xquartz/X11Application.m | 2 +- hw/xquartz/applewm.c | 15 ++++++--------- hw/xquartz/darwin.c | 18 ------------------ hw/xquartz/darwinEvents.c | 7 +++---- hw/xquartz/darwinEvents.h | 5 +++-- hw/xquartz/darwinKeyboard.c | 6 +++--- hw/xquartz/darwinXinput.c | 9 +++------ hw/xquartz/quartzAudio.c | 2 +- hw/xquartz/quartzCocoa.m | 1 + hw/xquartz/quartzForeground.c | 2 ++ hw/xquartz/quartzForeground.h | 2 +- hw/xquartz/quartzPasteboard.h | 4 ++-- hw/xquartz/quartzStartup.c | 7 ++++--- hw/xquartz/xpr/appledri.c | 1 + 15 files changed, 32 insertions(+), 50 deletions(-) diff --git a/hw/xquartz/Makefile.am b/hw/xquartz/Makefile.am index 9ac6e0a3e..99d23eb1f 100644 --- a/hw/xquartz/Makefile.am +++ b/hw/xquartz/Makefile.am @@ -19,6 +19,7 @@ DIST_SUBDIRS = xpr bundle libXquartz_la_SOURCES = \ $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c \ + $(top_srcdir)/Xext/dpmsstubs.c \ X11Application.m \ X11Controller.m \ applewm.c \ diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 56db2c477..72537bb65 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -855,7 +855,7 @@ static void send_nsevent (NSEventType type, NSEvent *e) { NSWindow *window; int pointer_x, pointer_y, ev_button, ev_type; // int num_events=0, i=0, state; - xEvent xe; + // xEvent xe; /* convert location to global top-left coordinates */ location = [e locationInWindow]; diff --git a/hw/xquartz/applewm.c b/hw/xquartz/applewm.c index 72dca28e7..c460ec6ae 100644 --- a/hw/xquartz/applewm.c +++ b/hw/xquartz/applewm.c @@ -264,8 +264,7 @@ WMFreeEvents (data, id) } static int -ProcAppleWMSelectInput (client) - register ClientPtr client; +ProcAppleWMSelectInput (register ClientPtr client) { REQUEST(xAppleWMSelectInputReq); WMEventPtr pEvent, pNewEvent, *pHead; @@ -479,13 +478,11 @@ ProcAppleWMSetFrontProcess( } static int -ProcAppleWMSetWindowLevel( - register ClientPtr client -) +ProcAppleWMSetWindowLevel(register ClientPtr client) { REQUEST(xAppleWMSetWindowLevelReq); WindowPtr pWin; - int errno; + int err; REQUEST_SIZE_MATCH(xAppleWMSetWindowLevelReq); @@ -497,9 +494,9 @@ ProcAppleWMSetWindowLevel( return BadValue; } - errno = appleWMProcs->SetWindowLevel(pWin, stuff->level); - if (errno != Success) { - return errno; + err = appleWMProcs->SetWindowLevel(pWin, stuff->level); + if (err != Success) { + return err; } return (client->noClientException); diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 3ad9e14d5..20bcee592 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -879,24 +879,6 @@ void AbortDDX( void ) ddxGiveUp(); } - -/* - * DPMS extension stubs - */ -Bool DPMSSupported(void) -{ - return FALSE; -} - -void DPMSSet(int level) -{ -} - -int DPMSGet(int *level) -{ - return -1; -} - #include "mivalidate.h" // for union _Validate used by windowstr.h #include "windowstr.h" // for struct _Window #include "scrnintstr.h" // for struct _Screen diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 1760792c6..827fd81b8 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -45,6 +45,7 @@ in this Software without prior written authorization from The Open Group. #include "darwin.h" #include "quartz.h" #include "darwinKeyboard.h" +#include "darwinEvents.h" #include #include @@ -213,9 +214,8 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) { * * This should be deprecated in favor of miEQEnqueue -- BB */ -void DarwinEQEnqueue(const xEvent *e) { +void DarwinEQEnqueue(const xEventPtr e) { HWEventQueueType oldtail, newtail; - char byte = 0; oldtail = darwinEventQueue.tail; @@ -253,7 +253,7 @@ void DarwinEQEnqueue(const xEvent *e) { * DarwinEQPointerPost * Post a pointer event. Used by the mipointer.c routines. */ -void DarwinEQPointerPost(xEvent *e) { +void DarwinEQPointerPost(DeviceIntPtr pdev, xEventPtr e) { (*darwinEventQueue.pPtr->processInputProc) (e, (DeviceIntPtr)darwinEventQueue.pPtr, 1); } @@ -274,7 +274,6 @@ void ProcessInputEvents(void) { EventRec *e; int x, y; xEvent xe; - static int old_flags = 0; // last known modifier state // button number and modifier mask of currently pressed fake button input_check_flag=0; diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h index d6cab2e6c..82cc26bc0 100644 --- a/hw/xquartz/darwinEvents.h +++ b/hw/xquartz/darwinEvents.h @@ -28,12 +28,13 @@ #define _DARWIN_EVENTS_H Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr); -void DarwinEQEnqueue(const xEvent *e); -void DarwinEQPointerPost(xEvent *e); +void DarwinEQEnqueue(const xEventPtr e); +void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr e); void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX); void DarwinPokeEQ(void); void DarwinSendPointerEvents(int ev_type, int ev_button, int pointer_x, int pointer_y); void DarwinSendKeyboardEvents(int ev_type, int keycode); void DarwinSendScrollEvents(float count, int pointer_x, int pointer_y); +void DarwinUpdateModKeys(int flags); #endif /* _DARWIN_EVENTS_H */ diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c index f1b90b76a..b368fe9d9 100644 --- a/hw/xquartz/darwinKeyboard.c +++ b/hw/xquartz/darwinKeyboard.c @@ -330,7 +330,7 @@ static void parse_next_char_code(DataStream *s, KeySym *k) { * DarwinReadKeymapFile * Read the appropriate keymapping from a keymapping file. */ -Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) { +static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) { struct stat st; NXEventSystemDevice info[20]; int interface = 0, handler_id = 0; @@ -439,7 +439,7 @@ Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) { /* * DarwinParseNXKeyMapping */ -Bool DarwinParseNXKeyMapping(darwinKeyboardInfo *info) { +static Bool DarwinParseNXKeyMapping(darwinKeyboardInfo *info) { KeySym *k; int i; short numMods, numKeys, numPadKeys = 0; @@ -933,7 +933,7 @@ int DarwinModifierNXMaskToNXKey(int mask) { return -1; } -const char *DarwinModifierNXMaskTostring(int mask) { +static const char *DarwinModifierNXMaskTostring(int mask) { switch (mask) { case NX_ALPHASHIFTMASK: return "NX_ALPHASHIFTMASK"; case NX_SHIFTMASK: return "NX_SHIFTMASK"; diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c index ee456a43a..e62ec0ab6 100644 --- a/hw/xquartz/darwinXinput.c +++ b/hw/xquartz/darwinXinput.c @@ -63,6 +63,7 @@ SOFTWARE. #include #include #include "XIstubs.h" +#include "chgkbd.h" /*********************************************************************** * @@ -88,16 +89,12 @@ SOFTWARE. * */ -int -ChangeKeyboardDevice (old_dev, new_dev) - DeviceIntPtr old_dev; - DeviceIntPtr new_dev; - { +int ChangeKeyboardDevice (DeviceIntPtr old_dev, DeviceIntPtr new_dev) { /*********************************************************************** DeleteFocusClassDeviceStruct(old_dev); * defined in xchgptr.c * **********************************************************************/ return BadMatch; - } +} /*********************************************************************** diff --git a/hw/xquartz/quartzAudio.c b/hw/xquartz/quartzAudio.c index 86bb20015..5dee32f54 100644 --- a/hw/xquartz/quartzAudio.c +++ b/hw/xquartz/quartzAudio.c @@ -50,7 +50,7 @@ #include #include -void NSBeep(); +void NSBeep(void); typedef struct QuartzAudioRec { double frequency; diff --git a/hw/xquartz/quartzCocoa.m b/hw/xquartz/quartzCocoa.m index 0086c5ca4..53e3f0897 100644 --- a/hw/xquartz/quartzCocoa.m +++ b/hw/xquartz/quartzCocoa.m @@ -37,6 +37,7 @@ #endif #include "quartzCommon.h" +#include "quartzPasteboard.h" #define BOOL xBOOL #include "darwin.h" diff --git a/hw/xquartz/quartzForeground.c b/hw/xquartz/quartzForeground.c index bfea642d1..0e724de76 100644 --- a/hw/xquartz/quartzForeground.c +++ b/hw/xquartz/quartzForeground.c @@ -32,6 +32,8 @@ #include #include +#include "quartzForeground.h" + int QuartzMoveToForeground() { ProcessSerialNumber psn = { 0, kCurrentProcess }; OSStatus returnCode = TransformProcessType(& psn, kProcessTransformToForegroundApplication); diff --git a/hw/xquartz/quartzForeground.h b/hw/xquartz/quartzForeground.h index 4fc21c72f..b5422ff9c 100644 --- a/hw/xquartz/quartzForeground.h +++ b/hw/xquartz/quartzForeground.h @@ -32,6 +32,6 @@ #ifndef _QUARTZ_FOREGROUND_H_ #define _QUARTZ_FOREGROUND_H_ -int QuartzMoveToForeground(); +int QuartzMoveToForeground(void); #endif /* _QUARTZ_FOREGROUND_H_ */ diff --git a/hw/xquartz/quartzPasteboard.h b/hw/xquartz/quartzPasteboard.h index afcb6e587..d6a8ee815 100644 --- a/hw/xquartz/quartzPasteboard.h +++ b/hw/xquartz/quartzPasteboard.h @@ -34,11 +34,11 @@ #define _QUARTZPASTEBOARD_H // Aqua->X -void QuartzReadPasteboard(); +void QuartzReadPasteboard(void); char * QuartzReadCocoaPasteboard(void); // caller must free string // X->Aqua -void QuartzWritePasteboard(); +void QuartzWritePasteboard(void); void QuartzWriteCocoaPasteboard(char *text); #endif /* _QUARTZPASTEBOARD_H */ diff --git a/hw/xquartz/quartzStartup.c b/hw/xquartz/quartzStartup.c index 1b2a22623..e25e15583 100644 --- a/hw/xquartz/quartzStartup.c +++ b/hw/xquartz/quartzStartup.c @@ -52,8 +52,11 @@ char **envpGlobal; // argcGlobal and argvGlobal // are from dix/globals.c +int main(int argc, char **argv, char **envp); +void _InitHLTB(void); +void DarwinHandleGUI(int argc, char **argv, char **envp); + static void server_thread (void *arg) { - extern int main(int argc, char **argv, char **envp); exit (main (argcGlobal, argvGlobal, envpGlobal)); } @@ -103,8 +106,6 @@ void DarwinHandleGUI(int argc, char **argv, char **envp) { before the main thread when we're _not_ prebound, things fail, so initialize by hand. */ - extern void _InitHLTB(void); - _InitHLTB(); X11ControllerMain(argc, (const char **)argv, server_thread, NULL); exit(0); diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c index 95a443976..b4a4725e2 100644 --- a/hw/xquartz/xpr/appledri.c +++ b/hw/xquartz/xpr/appledri.c @@ -55,6 +55,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "swaprep.h" #include "dri.h" #include "dristruct.h" +#include "xpr.h" static int DRIErrorBase = 0; From 59df687835c68eda147de47edfe9bc415c0efb4f Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 6 Jan 2008 16:57:45 +0100 Subject: [PATCH 394/552] Document the AllowEmptyInput, AutoAddDevices and AutoEnableDevices flags Add documentation for the new AllowEmptyInput, AutoAddDevices and AutoEnableDevices server flags in the xorg.conf manpage. --- hw/xfree86/doc/man/xorg.conf.man.pre | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 77439a517..9a0811159 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -704,6 +704,20 @@ default. .BI "Option \*qIgnoreABI\*q \*q" boolean \*q Allow modules built for a different, potentially incompatible version of the X server to load. Disabled by default. +.TP 7 +.BI "Option \*qAllowEmptyInput\*q \*q" boolean \*q +If enabled, don't add the standard keyboard and mouse drivers, if there are no +input devices in the config file. Disabled by default. +.TP 7 +.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q +If this option is disabled, then no devices will be added from HAL events. +Enabled by default. +.TP 7 +.BI "Option \*qAutoEnableDevices\*q \*q" boolean \*q +If this option is disabled, then the devices will be added (and the +DevicePresenceNotify event sent), but not enabled, thus leaving policy up +to the client. +Enabled by default. .SH "MODULE SECTION" The .B Module From 7e7622165940934e56ae96ae785a8f88eec1a5cf Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 6 Jan 2008 18:23:09 +0100 Subject: [PATCH 395/552] Fix the name of the XFree86-Misc extension in the xorg.conf manpage. --- hw/xfree86/doc/man/xorg.conf.man.pre | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 9a0811159..7eaf5d506 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -493,7 +493,7 @@ extension) to connect from another host. Default: off. .TP 7 .BI "Option \*qDisableModInDev\*q \*q" boolean \*q -This disables the parts of the __xservername__\-Misc extension that can be used to +This disables the parts of the XFree86\-Misc extension that can be used to modify the input device settings dynamically. Default: that functionality is enabled. .TP 7 From 260505e3c5a18044e97d31ea3bcc0955e46335c8 Mon Sep 17 00:00:00 2001 From: David Nusinow Date: Sun, 6 Jan 2008 16:37:13 -0500 Subject: [PATCH 396/552] Log enabling of DPMS even when it's not set in xorg.conf --- hw/xfree86/common/xf86DPMS.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index 43efb8ed4..a23d81d3f 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -79,7 +79,6 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) && !DPMSDisabledSwitch) DPMSEnabled = TRUE; xf86MarkOptionUsed(DPMSOpt); - xf86DrvMsg(pScreen->myNum, X_CONFIG, "DPMS enabled\n"); } else if (DPMSEnabledSwitch) { if (!DPMSDisabledSwitch) DPMSEnabled = TRUE; @@ -88,6 +87,8 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) else { pDPMS->Enabled = defaultDPMSEnabled; } + if (pDPMS->Enabled) + xf86DrvMsg(pScreen->myNum, X_CONFIG, "DPMS enabled\n"); pDPMS->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = DPMSClose; DPMSCount++; From 981bb9f1e33e4564d1b59c00c808cc43a2e9497b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 18 Dec 2007 13:57:07 +1030 Subject: [PATCH 397/552] dix: set the correct number of valuators in valuator events. (first_valuator + num_valuators) must never be larger than the number of axes, otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is wrong too. (cherry picked from commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e) --- dix/getevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index 40fc7f2a9..12cb950b2 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -346,7 +346,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator, for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) { xv->type = DeviceValuator; xv->first_valuator = i; - xv->num_valuators = num_valuators; + xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); xv->deviceid = pDev->id; switch (final_valuator - i) { case 6: From 30375cd6d1439a3390b41714fe116aecc94743ca Mon Sep 17 00:00:00 2001 From: David Nusinow Date: Mon, 7 Jan 2008 20:57:30 -0500 Subject: [PATCH 398/552] Don't log DPMS enabling as being from xorg.conf if it's not --- hw/xfree86/common/xf86DPMS.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index a23d81d3f..4fb901aae 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -60,6 +60,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; DPMSPtr pDPMS; pointer DPMSOpt; + MessageType enabled_from = X_INFO; DPMSKey = &DPMSKey; @@ -78,6 +79,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) = xf86SetBoolOption(pScrn->options, "dpms", FALSE)) && !DPMSDisabledSwitch) DPMSEnabled = TRUE; + enabled_from = X_CONFIG; xf86MarkOptionUsed(DPMSOpt); } else if (DPMSEnabledSwitch) { if (!DPMSDisabledSwitch) @@ -88,7 +90,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) pDPMS->Enabled = defaultDPMSEnabled; } if (pDPMS->Enabled) - xf86DrvMsg(pScreen->myNum, X_CONFIG, "DPMS enabled\n"); + xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n"); pDPMS->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = DPMSClose; DPMSCount++; From c31aead0fe9fe424120ce221cd9f76cb6d29a5b5 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 8 Jan 2008 12:12:06 +0100 Subject: [PATCH 399/552] [Kdrive] make XCalibrate 'orientation aware' --- Xext/xcalibrate.c | 47 +++++++++++++++++++++++++++++++++++++++++- hw/kdrive/src/kdrive.h | 5 ++++- hw/kdrive/src/kinput.c | 12 +++++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/Xext/xcalibrate.c b/Xext/xcalibrate.c index 97ef3dc38..3fe2bdc5c 100644 --- a/Xext/xcalibrate.c +++ b/Xext/xcalibrate.c @@ -164,7 +164,6 @@ ProcXCalibrateSetRawMode (ClientPtr client) return (client->noClientException); } - static int SProcXCalibrateSetRawMode (ClientPtr client) { @@ -178,6 +177,47 @@ SProcXCalibrateSetRawMode (ClientPtr client) return ProcXCalibrateSetRawMode(client); } +static int +ProcXCalibrateScreenToCoord (ClientPtr client) +{ + REQUEST(xXCalibrateScreenToCoordReq); + xXCalibrateScreenToCoordReply rep; + + REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq); + + memset (&rep, 0, sizeof (rep)); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + rep.x = stuff->x; + rep.y = stuff->y; + + KdScreenToPointerCoords(&rep.x, &rep.y); + + if (client->swapped) + { + int n; + + swaps (&rep.x, n); + swaps (&rep.y, n); + } + WriteToClient(client, sizeof (rep), (char *) &rep); + return (client->noClientException); +} + +static int +SProcXCalibrateScreenToCoord (ClientPtr client) +{ + REQUEST(xXCalibrateScreenToCoordReq); + int n; + + REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq); + + swaps(&stuff->x, n); + swaps(&stuff->y, n); + + return ProcXCalibrateScreenToCoord(client); +} + static void XCalibrateResetProc (ExtensionEntry *extEntry) { @@ -192,6 +232,9 @@ ProcXCalibrateDispatch (ClientPtr client) return ProcXCalibrateQueryVersion(client); case X_XCalibrateRawMode: return ProcXCalibrateSetRawMode(client); + case X_XCalibrateScreenToCoord: + return ProcXCalibrateScreenToCoord(client); + default: break; } @@ -211,6 +254,8 @@ SProcXCalibrateDispatch (ClientPtr client) return SProcXCalibrateQueryVersion(client); case X_XCalibrateRawMode: return SProcXCalibrateSetRawMode(client); + case X_XCalibrateScreenToCoord: + return SProcXCalibrateScreenToCoord(client); default: break; } diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 8722ba303..4e04b59f7 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -832,7 +832,10 @@ KdSetPointerMatrix (KdPointerMatrix *pointer); void KdComputePointerMatrix (KdPointerMatrix *pointer, Rotation randr, int width, int height); - + +void +KdScreenToPointerCoords (int *x, int *y); + void KdBlockHandler (int screen, pointer blockData, diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 6c247c185..df73942e7 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -631,6 +631,18 @@ KdComputePointerMatrix (KdPointerMatrix *m, Rotation randr, int width, } } +void +KdScreenToPointerCoords (int *x, int *y) +{ + int (*m)[3] = kdPointerMatrix.matrix; + int div = m[0][1] * m[1][0] - m[1][1] * m[0][0]; + int sx = *x; + int sy = *y; + + *x = (m[0][1] * sy - m[0][1] * m[1][2] + m[1][1] * m[0][2] - m[1][1] * sx) / div; + *y = (m[1][0] * sx + m[0][0] * m[1][2] - m[1][0] * m[0][2] - m[0][0] * sy) / div; +} + static void KdKbdCtrl (DeviceIntPtr pDevice, KeybdCtrl *ctrl) { From e070c2cbef0d6fbbafce8d417e8b29231c2fdc50 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Dec 2007 20:18:49 +1030 Subject: [PATCH 400/552] mi: change infamous "Tossed event ..." error for something more explanatory. Few whitespace errors fixed. Two ErrorF's prefixed with [mi]. (cherry picked from commit 117458d2db49efd3f04432ff45871b44c7d4ad57) --- mi/mieq.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mi/mieq.c b/mi/mieq.c index c2f687a6b..aaa247d6c 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -122,7 +122,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) * motion event they need to be attached to. Sigh. */ if (e->u.u.type == DeviceValuator) { if (laste->nevents > 6) { - ErrorF("mieqEnqueue: more than six valuator events; dropping.\n"); + ErrorF("[mi] mieqEnqueue: more than six valuator events; dropping.\n"); return; } if (oldtail == miEventQueue.head || @@ -133,7 +133,7 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) lastkbp->type == ProximityOut) || ((lastkbp->deviceid & DEVICE_BITS) != (v->deviceid & DEVICE_BITS))) { - ErrorF("mieqEnequeue: out-of-order valuator event; dropping.\n"); + ErrorF("[mi] mieqEnequeue: out-of-order valuator event; dropping.\n"); return; } memcpy(&(laste->event[laste->nevents++]), e, sizeof(xEvent)); @@ -145,12 +145,13 @@ mieqEnqueue(DeviceIntPtr pDev, xEvent *e) oldtail = (oldtail - 1) % QUEUE_SIZE; } else { - newtail = (oldtail + 1) % QUEUE_SIZE; - /* Toss events which come in late. Usually this means your server's + newtail = (oldtail + 1) % QUEUE_SIZE; + /* Toss events which come in late. Usually this means your server's * stuck in an infinite loop somewhere, but SIGIO is still getting * handled. */ - if (newtail == miEventQueue.head) { - ErrorF("tossed event which came in late\n"); + if (newtail == miEventQueue.head) { + ErrorF("[mi] EQ overflowing. The server is probably stuck " + "in an infinite loop.\n"); return; } miEventQueue.tail = newtail; From 59a63d72a1407a8aaf9878eeff7ee7a66f65a42b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 9 Jan 2008 18:42:58 -0800 Subject: [PATCH 401/552] Fix reference to old versions of XFree86 to not say "Xorg 4.2 or earlier" --- hw/xfree86/doc/man/xorg.conf.man.pre | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 7eaf5d506..1369a16c9 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -2029,7 +2029,7 @@ These both specify that the upper left corner's coordinates are The .B Absolute keyword is optional. -Some older versions of __xservername__ (4.2 and earlier) don't recognise the +Some older versions of XFree86 (4.2 and earlier) don't recognise the .B Absolute keyword, so it's safest to just specify the coordinates without it. .TP 4 From 0883e838e25227f0af84d2a90979175724166d16 Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Wed, 9 Jan 2008 14:52:33 -0500 Subject: [PATCH 402/552] xf86misc.c: Avoid use of swapped values --- hw/xfree86/dixmods/extmod/xf86misc.c | 33 +++++++++++++++------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c index 66278a298..8f4434601 100644 --- a/hw/xfree86/dixmods/extmod/xf86misc.c +++ b/hw/xfree86/dixmods/extmod/xf86misc.c @@ -250,6 +250,7 @@ ProcXF86MiscGetMouseSettings(client) char *devname; pointer mouse; register int n; + int devnamelen; DEBUG_P("XF86MiscGetMouseSettings"); @@ -269,7 +270,7 @@ ProcXF86MiscGetMouseSettings(client) rep.emulate3timeout = MiscExtGetMouseValue(mouse, MISC_MSE_EM3TIMEOUT); rep.chordmiddle = MiscExtGetMouseValue(mouse, MISC_MSE_CHORDMIDDLE); rep.flags = MiscExtGetMouseValue(mouse, MISC_MSE_FLAGS); - rep.devnamelen = (devname? strlen(devname): 0); + devnamelen = rep.devnamelen = (devname? strlen(devname): 0); rep.length = (sizeof(xXF86MiscGetMouseSettingsReply) - sizeof(xGenericReply) + ((rep.devnamelen+3) & ~3)) >> 2; @@ -289,8 +290,8 @@ ProcXF86MiscGetMouseSettings(client) WriteToClient(client, SIZEOF(xXF86MiscGetMouseSettingsReply), (char *)&rep); MiscExtDestroyStruct(mouse, MISC_POINTER); - if (rep.devnamelen) - WriteToClient(client, rep.devnamelen, devname); + if (devnamelen) + WriteToClient(client, devnamelen, devname); return (client->noClientException); } @@ -508,6 +509,7 @@ ProcXF86MiscGetFilePaths(client) const char *modulepath; const char *logfile; register int n; + int configlen, modulelen, loglen; DEBUG_P("XF86MiscGetFilePaths"); @@ -518,9 +520,9 @@ ProcXF86MiscGetFilePaths(client) if (!MiscExtGetFilePaths(&configfile, &modulepath, &logfile)) return BadValue; - rep.configlen = (configfile? strlen(configfile): 0); - rep.modulelen = (modulepath? strlen(modulepath): 0); - rep.loglen = (logfile? strlen(logfile): 0); + configlen = rep.configlen = (configfile? strlen(configfile): 0); + modulelen = rep.modulelen = (modulepath? strlen(modulepath): 0); + loglen = rep.loglen = (logfile? strlen(logfile): 0); rep.length = (SIZEOF(xXF86MiscGetFilePathsReply) - SIZEOF(xGenericReply) + ((rep.configlen + 3) & ~3) + ((rep.modulelen + 3) & ~3) + @@ -535,12 +537,12 @@ ProcXF86MiscGetFilePaths(client) } WriteToClient(client, SIZEOF(xXF86MiscGetFilePathsReply), (char *)&rep); - if (rep.configlen) - WriteToClient(client, rep.configlen, (char *)configfile); - if (rep.modulelen) - WriteToClient(client, rep.modulelen, (char *)modulepath); - if (rep.loglen) - WriteToClient(client, rep.loglen, (char *)logfile); + if (configlen) + WriteToClient(client, configlen, (char *)configfile); + if (modulelen) + WriteToClient(client, modulelen, (char *)modulepath); + if (loglen) + WriteToClient(client, loglen, (char *)logfile); return (client->noClientException); } @@ -553,6 +555,7 @@ ProcXF86MiscPassMessage(client) char *msgtype, *msgval, *retstr; int retval, size; register int n; + int mesglen; REQUEST(xXF86MiscPassMessageReq); @@ -589,7 +592,7 @@ ProcXF86MiscPassMessage(client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; - rep.mesglen = (retstr? strlen(retstr): 0); + mesglen = rep.mesglen = (retstr? strlen(retstr): 0); rep.length = (SIZEOF(xXF86MiscPassMessageReply) - SIZEOF(xGenericReply) + ((rep.mesglen + 3) & ~3)) >> 2; rep.status = 0; @@ -601,8 +604,8 @@ ProcXF86MiscPassMessage(client) } WriteToClient(client, SIZEOF(xXF86MiscPassMessageReply), (char *)&rep); - if (rep.mesglen) - WriteToClient(client, rep.mesglen, (char *)retstr); + if (mesglen) + WriteToClient(client, mesglen, (char *)retstr); xfree(msgtype); xfree(msgval); From 6844bd2e63490870bab3c469eec6030354ef2865 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 9 Jan 2008 19:52:00 -0800 Subject: [PATCH 403/552] More Xv extension byte swapping fixes --- Xext/xvdisp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 17ff1d788..237ad51c0 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -1532,6 +1532,7 @@ SProcXvShmPutImage(ClientPtr client) swapl(&stuff->gc, n); swapl(&stuff->shmseg, n); swapl(&stuff->id, n); + swapl(&stuff->offset, n); swaps(&stuff->src_x, n); swaps(&stuff->src_y, n); swaps(&stuff->src_w, n); @@ -1540,7 +1541,6 @@ SProcXvShmPutImage(ClientPtr client) swaps(&stuff->drw_y, n); swaps(&stuff->drw_w, n); swaps(&stuff->drw_h, n); - swaps(&stuff->offset, n); swaps(&stuff->width, n); swaps(&stuff->height, n); return XvProcVector[xv_ShmPutImage](client); @@ -1632,9 +1632,10 @@ SProcXvQueryImageAttributes(ClientPtr client) char n; REQUEST(xvQueryImageAttributesReq); swaps(&stuff->length, n); + swapl(&stuff->port, n); swapl(&stuff->id, n); swaps(&stuff->width, n); - swaps(&stuff->width, n); + swaps(&stuff->height, n); return XvProcVector[xv_QueryImageAttributes](client); } From ec24a6b5aa732ec6999a27889d9a33cf80123886 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 6 Jan 2008 18:29:54 -0800 Subject: [PATCH 404/552] XQuartz: Fixed switching into XQuartz via expose. (cherry picked from commit 627ed60ce5d7499761028edf379ebd95250d3e04) --- hw/xquartz/X11Application.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index 72537bb65..f68898582 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -164,7 +164,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) { have it activated while X is active (unless using the old keymapping files) */ static TSMDocumentID x11_document; - + DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active) if (state) { QuartzMessageServerThread (kXDarwinActivate, 0); @@ -314,6 +314,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) { } - (void) set_front_process:unused { +// [self activateX:YES]; QuartzMessageServerThread(kXDarwinBringAllToFront, 0); } @@ -710,6 +711,10 @@ void X11ApplicationSetWindowMenuCheck (int idx) { void X11ApplicationSetFrontProcess (void) { message_kit_thread (@selector (set_front_process:), nil); + + /* Hackery needed due to argv[0] hackery */ + ProcessSerialNumber psn = { 0, kCurrentProcess }; + SetFrontProcess(&psn); } void X11ApplicationSetCanQuit (int state) { From f72255639c065d795f7767683e851b1b5b2d9480 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 12 Jan 2008 11:35:48 -0800 Subject: [PATCH 405/552] XQuartz: added 'login_shell' option to defaults so the user can choose something other than /bin/sh (cherry picked from commit b549cf18cebd3435d70f62855239484974c455a1) --- hw/xquartz/X11Application.h | 1 + hw/xquartz/X11Controller.m | 2 +- hw/xquartz/bundle/Makefile.am | 2 -- hw/xquartz/bundle/bundle-main.c | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h index a1be7514a..af5aea2ce 100644 --- a/hw/xquartz/X11Application.h +++ b/hw/xquartz/X11Application.h @@ -97,5 +97,6 @@ extern int quartzHasRoot, quartzEnableRootless; #define PREFS_SWAP_ALT_META "swap_alt_meta" #define PREFS_XP_OPTIONS "xp_options" #define PREFS_ENABLE_STEREO "enable_stereo" +#define PREFS_LOGIN_SHELL "login_shell" #endif /* X11APPLICATION_H */ diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index 6b7c35141..e13edc15d 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -302,7 +302,7 @@ argv[0] = "/usr/bin/login"; argv[1] = "-fp"; argv[2] = getlogin(); - argv[3] = "/bin/sh"; + argv[3] = [X11App prefs_get_string:@PREFS_FAKE_BUTTON2 default:"/bin/sh"]; argv[4] = "-c"; argv[5] = command; argv[6] = NULL; diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 951167002..00d540fee 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -18,8 +18,6 @@ EXTRA_DIST = \ Info.plist \ X11.icns \ bundle-main.c \ - launcher-main.c \ - server-main.c \ English.lproj/InfoPlist.strings \ English.lproj/Localizable.strings \ English.lproj/main.nib/classes.nib \ diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index df78d7fb8..54d01368d 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -38,6 +38,7 @@ #define DEFAULT_CLIENT "/usr/X11/bin/xterm" #define DEFAULT_STARTX "/usr/X11/bin/startx" +#define DEFAULT_SHELL "/bin/sh" static int execute(const char *command); static char *command_from_prefs(const char *key, const char *default_value); @@ -82,7 +83,7 @@ static int execute(const char *command) { newargv[0] = "/usr/bin/login"; newargv[1] = "-fp"; newargv[2] = getlogin(); - newargv[3] = "/bin/sh"; + newargv[3] = command_from_prefs("login_shell", DEFAULT_SHELL); newargv[4] = "-c"; newargv[5] = command; newargv[6] = NULL; From 6fd4a5e2e4d0be0ba0773df831687e11e1262c72 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 12 Jan 2008 11:56:00 -0800 Subject: [PATCH 406/552] XQuartz: Corrected copyright X.org Project -> X.org Foundation (cherry picked from commit f21631444816fc12b8a534c2cf79e6ac6c2af7c9) --- hw/xquartz/bundle/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/bundle/Info.plist b/hw/xquartz/bundle/Info.plist index 5babdfe6e..6ba02dda2 100644 --- a/hw/xquartz/bundle/Info.plist +++ b/hw/xquartz/bundle/Info.plist @@ -27,7 +27,7 @@ NSHumanReadableCopyright Copyright © 2003-2008, Apple Inc. Copyright © 2003, XFree86 Project, Inc. -Copyright © 2003-2008, X.org Project, Inc. +Copyright © 2003-2008, X.org Foundation, Inc. NSMainNibFile main From 180a5aba4de3104fed8bc4e7d42a1e3a51575318 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 12 Jan 2008 21:24:34 -0800 Subject: [PATCH 407/552] XQuartz: Fixed copy-paste error with login_shell commit (cherry picked from commit 6deec3acc6f8010b5b53a1e55a0a2c4080ba69d2) --- hw/xquartz/X11Controller.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index e13edc15d..d3f83656c 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -302,7 +302,7 @@ argv[0] = "/usr/bin/login"; argv[1] = "-fp"; argv[2] = getlogin(); - argv[3] = [X11App prefs_get_string:@PREFS_FAKE_BUTTON2 default:"/bin/sh"]; + argv[3] = [X11App prefs_get_string:@PREFS_LOGIN_SHELL default:"/bin/sh"]; argv[4] = "-c"; argv[5] = command; argv[6] = NULL; From e6ea3147bfb686798dac381eb8900f9f18beb88e Mon Sep 17 00:00:00 2001 From: Bernardo Innocenti Date: Sun, 13 Jan 2008 19:50:37 -0500 Subject: [PATCH 408/552] exa: make the prototype for exaGetPixmapFirstPixel() public This fixes a warning in amd_drv which is using it. Signed-off-by: Bernardo Innocenti --- exa/exa.h | 3 +++ exa/exa_priv.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exa/exa.h b/exa/exa.h index 1ff0518e4..0774a700a 100644 --- a/exa/exa.h +++ b/exa/exa.h @@ -790,6 +790,9 @@ exaMoveOutPixmap (PixmapPtr pPixmap); void * exaGetPixmapDriverPrivate(PixmapPtr p); +CARD32 +exaGetPixmapFirstPixel (PixmapPtr pPixmap); + /** * Returns TRUE if the given planemask covers all the significant bits in the * pixel values for pDrawable. diff --git a/exa/exa_priv.h b/exa/exa_priv.h index de8b2f541..89f47184f 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -291,9 +291,6 @@ ExaCheckGetSpans (DrawablePtr pDrawable, int nspans, char *pdstStart); -CARD32 -exaGetPixmapFirstPixel (PixmapPtr pPixmap); - /* exa_accel.c */ static _X_INLINE Bool From 1f83f40525acd3aff8f50b3c519bc1f307ff1e19 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 15 Jan 2008 10:20:50 +1000 Subject: [PATCH 409/552] xf86Cursors: fix memset for non-square cursors --- hw/xfree86/modes/xf86Cursors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index acf34c1d1..5a4d0f6fa 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -400,7 +400,7 @@ xf86_crtc_load_cursor_image (xf86CrtcPtr crtc, CARD8 *src) int flags = cursor_info->Flags; cursor_image = xf86_config->cursor_image; - memset(cursor_image, 0, cursor_info->MaxWidth * stride); + memset(cursor_image, 0, cursor_info->MaxHeight * stride); for (y = 0; y < cursor_info->MaxHeight; y++) for (x = 0; x < cursor_info->MaxWidth; x++) From 315d6a2b1d2a3de308e98d548afe780c59a784fc Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Tue, 15 Jan 2008 02:59:56 -0200 Subject: [PATCH 410/552] Fix Xephyr compilation without GLX. --- configure.ac | 2 +- hw/kdrive/ephyr/ephyr.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0742040c9..566ddcbd0 100644 --- a/configure.ac +++ b/configure.ac @@ -1901,7 +1901,7 @@ if test "$KDRIVE" = yes; then XEPHYR=$xephyr fi XEPHYR_DRI=no - if test x$XEPHYR = xyes -a x$DRI = xyes; then + if test x$XEPHYR = xyes -a x$DRI = xyes && test "x$GLX" = xyes; then XEPHYR_DRI=yes XEPHYR_DRI_LIBS=-lGL AC_SUBST(XEPHYR_DRI_LIBS) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 2a762a2a9..c5c8a5640 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -635,7 +635,9 @@ ephyrInitScreen (ScreenPtr pScreen) if (!ephyrNoDRI && !hostx_has_dri ()) { EPHYR_LOG ("host x does not support DRI. Disabling DRI forwarding\n") ; ephyrNoDRI = TRUE ; +#ifdef GLXEXT noGlxVisualInit = FALSE ; +#endif } if (!ephyrNoDRI) { ephyrDRIExtensionInit (pScreen) ; From 7a0d16ef0a103bcb25fa8a20322685f017aaf5a3 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Tue, 15 Jan 2008 03:27:16 -0200 Subject: [PATCH 411/552] Removed some warnings. --- hw/kdrive/ephyr/ephyrdriext.c | 2 +- hw/kdrive/ephyr/ephyrlog.h | 4 ++-- hw/kdrive/ephyr/hostx.c | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index b6be47f5e..1b9dce5c8 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -206,7 +206,7 @@ ephyrDRIScreenInit (ScreenPtr a_screen) a_screen->ClipNotify = ephyrDRIClipNotify ; is_ok = TRUE ; -out: + return is_ok ; } diff --git a/hw/kdrive/ephyr/ephyrlog.h b/hw/kdrive/ephyr/ephyrlog.h index 4c6435edd..71f797777 100644 --- a/hw/kdrive/ephyr/ephyrlog.h +++ b/hw/kdrive/ephyr/ephyrlog.h @@ -33,8 +33,8 @@ #ifdef NDEBUG /*we are not in debug mode*/ -#define EPHYR_LOG -#define EPHYR_LOG_ERROR +#define EPHYR_LOG(...) +#define EPHYR_LOG_ERROR(...) #endif /*NDEBUG*/ #define ERROR_LOG_LEVEL 3 diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index b5ffdd075..a5413b876 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -1078,16 +1078,6 @@ out: } -typedef struct { - int is_valid ; - int local_id ; - int remote_id ; -} ResourcePair ; - -#define RESOURCE_PEERS_SIZE 1024*10 -static ResourcePair resource_peers[RESOURCE_PEERS_SIZE] ; - - int hostx_create_window (int a_screen_number, EphyrBox *a_geometry, @@ -1259,6 +1249,16 @@ hostx_has_xshape (void) } #ifdef XEPHYR_DRI +typedef struct { + int is_valid ; + int local_id ; + int remote_id ; +} ResourcePair ; + +#define RESOURCE_PEERS_SIZE 1024*10 +static ResourcePair resource_peers[RESOURCE_PEERS_SIZE] ; + + int hostx_allocate_resource_id_peer (int a_local_resource_id, int *a_remote_resource_id) From e46f6ddeccd082b2d507a1e8b57ea30e6b0a2c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 16 Jan 2008 14:24:22 +0100 Subject: [PATCH 412/552] Yet another Xv extension byte swapping fix. --- Xext/xvdisp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 237ad51c0..de0128e14 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -1588,6 +1588,7 @@ SProcXvSetPortAttribute(ClientPtr client) swaps(&stuff->length, n); swapl(&stuff->port, n); swapl(&stuff->attribute, n); + swapl(&stuff->value, n); return XvProcVector[xv_SetPortAttribute](client); } From a6a7fadbb03ee99312dfb15ac478ab3c414c1c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 16 Jan 2008 20:24:11 -0500 Subject: [PATCH 413/552] Don't break grab and focus state for a window when redirecting it. Composite uses an unmap/map cycle to trigger backing pixmap allocation and cliprect recomputation when a window is redirected or unredirected. To avoid protocol visible side effects, map and unmap events are disabled temporarily. However, when a window is unmapped it is also removed from grabs and loses focus, but these state changes are not disabled. This change supresses the unmap side effects during the composite unmap/map cycle and fixes this bug: http://bugzilla.gnome.org/show_bug.cgi?id=488264 where compiz would cause gnome-screensaver to lose its grab when compiz unredirects the fullscreen lock window. --- dix/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dix/window.c b/dix/window.c index 33cf76b59..1ccf12603 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2993,7 +2993,8 @@ UnrealizeTree( } #endif (* Unrealize)(pChild); - DeleteWindowFromAnyEvents(pChild, FALSE); + if (MapUnmapEventsEnabled(pWin)) + DeleteWindowFromAnyEvents(pChild, FALSE); if (pChild->viewable) { #ifdef DO_SAVE_UNDERS From b99a43dfe97c1813e1c61f298b1c83c5d5ca88a2 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 5 Jan 2008 10:38:16 +0200 Subject: [PATCH 414/552] OS: IO: Zero out client buffers For alignment reasons, we can write out uninitialised bytes, so allocate the whole thing with xcalloc. --- os/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/io.c b/os/io.c index 968f40a54..be89021e5 100644 --- a/os/io.c +++ b/os/io.c @@ -1196,7 +1196,7 @@ AllocateOutputBuffer(void) oco = (ConnectionOutputPtr)xalloc(sizeof(ConnectionOutput)); if (!oco) return (ConnectionOutputPtr)NULL; - oco->buf = (unsigned char *) xalloc(BUFSIZE); + oco->buf = (unsigned char *) xcalloc(1, BUFSIZE); if (!oco->buf) { xfree(oco); From 0137b0394a248f694448a7d97c9a1a3efcf24e81 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 5 Jan 2008 10:43:53 +0200 Subject: [PATCH 415/552] XKB: XkbCopyKeymap: Don't leak all the sections Previously, we'd just keep num_sections at 0, which would break the geometry and lead us to leak sections. Don't do that. --- xkb/xkbUtils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 31c1a9fa9..1fb47ed56 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1793,6 +1793,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) if (!tmp) return FALSE; dst->geom->sections = tmp; + dst->geom->num_sections = src->geom->num_sections; for (i = 0, ssection = src->geom->sections, From e85130c85f727466fc27be1cfa46c88b257499fb Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 5 Jan 2008 10:47:39 +0200 Subject: [PATCH 416/552] Xephyr: One-time keyboard leak fix Don't leak the originally-allocated keysym map. --- hw/kdrive/ephyr/ephyr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index c5c8a5640..6ec95d631 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -1031,6 +1031,7 @@ EphyrKeyboardInit (KdKeyboardInfo *ki) ki->minScanCode = ki->keySyms.minKeyCode; ki->maxScanCode = ki->keySyms.maxKeyCode; ki->keySyms.mapWidth = ephyrKeySyms.mapWidth; + xfree(ki->keySyms.map); ki->keySyms.map = ephyrKeySyms.map; ki->name = KdSaveString("Xephyr virtual keyboard"); ephyrKbd = ki; From bbde5b62a137ba726a747b838d81e92d72c1b42b Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Thu, 17 Jan 2008 15:26:41 +0100 Subject: [PATCH 417/552] Fix for CVE-2007-5760 - XFree86 Misc extension out of bounds array index --- hw/xfree86/common/xf86MiscExt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/xfree86/common/xf86MiscExt.c b/hw/xfree86/common/xf86MiscExt.c index c1b9c60fc..40c196a3e 100644 --- a/hw/xfree86/common/xf86MiscExt.c +++ b/hw/xfree86/common/xf86MiscExt.c @@ -548,6 +548,10 @@ MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval, { ScrnInfoPtr pScr = xf86Screens[scrnIndex]; + /* should check this in the protocol, but xf86NumScreens isn't exported */ + if (scrnIndex >= xf86NumScreens) + return BadValue; + if (*pScr->HandleMessage == NULL) return BadImplementation; return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr); From dd5e0f5cd5f3a87fee86d99c073ffa7cf89b0a27 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Thu, 17 Jan 2008 15:27:34 +0100 Subject: [PATCH 418/552] Fix for CVE-2007-6427 - Xinput extension memory corruption. --- Xi/chgfctl.c | 7 +------ Xi/chgkmap.c | 14 +++++++------- Xi/chgprop.c | 10 +++------- Xi/grabdev.c | 12 +++++------- Xi/grabdevb.c | 10 +++------- Xi/grabdevk.c | 9 ++------- Xi/selectev.c | 11 ++++------- Xi/sendexev.c | 14 ++++++++------ 8 files changed, 33 insertions(+), 54 deletions(-) diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c index 8fc24d5ff..696b74a16 100644 --- a/Xi/chgfctl.c +++ b/Xi/chgfctl.c @@ -302,18 +302,13 @@ ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev, xStringFeedbackCtl * f) { char n; - long *p; int i, j; KeySym *syms, *sup_syms; syms = (KeySym *) (f + 1); if (client->swapped) { swaps(&f->length, n); /* swapped num_keysyms in calling proc */ - p = (long *)(syms); - for (i = 0; i < f->num_keysyms; i++) { - swapl(p, n); - p++; - } + SwapLongs((CARD32 *) syms, f->num_keysyms); } if (f->num_keysyms > s->ctrl.max_symbols) diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c index 3361e9801..df334c11c 100644 --- a/Xi/chgkmap.c +++ b/Xi/chgkmap.c @@ -75,18 +75,14 @@ int SProcXChangeDeviceKeyMapping(ClientPtr client) { char n; - long *p; - int i, count; + unsigned int count; REQUEST(xChangeDeviceKeyMappingReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); - p = (long *)&stuff[1]; count = stuff->keyCodes * stuff->keySymsPerKeyCode; - for (i = 0; i < count; i++) { - swapl(p, n); - p++; - } + REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), count); return (ProcXChangeDeviceKeyMapping(client)); } @@ -102,10 +98,14 @@ ProcXChangeDeviceKeyMapping(ClientPtr client) int ret; unsigned len; DeviceIntPtr dev; + unsigned int count; REQUEST(xChangeDeviceKeyMappingReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); + count = stuff->keyCodes * stuff->keySymsPerKeyCode; + REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); if (ret != Success) return ret; diff --git a/Xi/chgprop.c b/Xi/chgprop.c index 58db88620..3fb33e129 100644 --- a/Xi/chgprop.c +++ b/Xi/chgprop.c @@ -77,19 +77,15 @@ int SProcXChangeDeviceDontPropagateList(ClientPtr client) { char n; - long *p; - int i; REQUEST(xChangeDeviceDontPropagateListReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); swapl(&stuff->window, n); swaps(&stuff->count, n); - p = (long *)&stuff[1]; - for (i = 0; i < stuff->count; i++) { - swapl(p, n); - p++; - } + REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq, + stuff->count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), stuff->count); return (ProcXChangeDeviceDontPropagateList(client)); } diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 110fc6b5f..0671e0ea7 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -78,8 +78,6 @@ int SProcXGrabDevice(ClientPtr client) { char n; - long *p; - int i; REQUEST(xGrabDeviceReq); swaps(&stuff->length, n); @@ -87,11 +85,11 @@ SProcXGrabDevice(ClientPtr client) swapl(&stuff->grabWindow, n); swapl(&stuff->time, n); swaps(&stuff->event_count, n); - p = (long *)&stuff[1]; - for (i = 0; i < stuff->event_count; i++) { - swapl(p, n); - p++; - } + + if (stuff->length != (sizeof(xGrabDeviceReq) >> 2) + stuff->event_count) + return BadLength; + + SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); return (ProcXGrabDevice(client)); } diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c index c2661e85b..ce0dcc5f9 100644 --- a/Xi/grabdevb.c +++ b/Xi/grabdevb.c @@ -77,8 +77,6 @@ int SProcXGrabDeviceButton(ClientPtr client) { char n; - long *p; - int i; REQUEST(xGrabDeviceButtonReq); swaps(&stuff->length, n); @@ -86,11 +84,9 @@ SProcXGrabDeviceButton(ClientPtr client) swapl(&stuff->grabWindow, n); swaps(&stuff->modifiers, n); swaps(&stuff->event_count, n); - p = (long *)&stuff[1]; - for (i = 0; i < stuff->event_count; i++) { - swapl(p, n); - p++; - } + REQUEST_FIXED_SIZE(xGrabDeviceButtonReq, + stuff->event_count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); return (ProcXGrabDeviceButton(client)); } diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c index 43b19280d..d4b7fe815 100644 --- a/Xi/grabdevk.c +++ b/Xi/grabdevk.c @@ -77,8 +77,6 @@ int SProcXGrabDeviceKey(ClientPtr client) { char n; - long *p; - int i; REQUEST(xGrabDeviceKeyReq); swaps(&stuff->length, n); @@ -86,11 +84,8 @@ SProcXGrabDeviceKey(ClientPtr client) swapl(&stuff->grabWindow, n); swaps(&stuff->modifiers, n); swaps(&stuff->event_count, n); - p = (long *)&stuff[1]; - for (i = 0; i < stuff->event_count; i++) { - swapl(p, n); - p++; - } + REQUEST_FIXED_SIZE(xGrabDeviceKeyReq, stuff->event_count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); return (ProcXGrabDeviceKey(client)); } diff --git a/Xi/selectev.c b/Xi/selectev.c index b93618ace..d3670ab1b 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -127,19 +127,16 @@ int SProcXSelectExtensionEvent(ClientPtr client) { char n; - long *p; - int i; REQUEST(xSelectExtensionEventReq); swaps(&stuff->length, n); REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); swapl(&stuff->window, n); swaps(&stuff->count, n); - p = (long *)&stuff[1]; - for (i = 0; i < stuff->count; i++) { - swapl(p, n); - p++; - } + REQUEST_FIXED_SIZE(xSelectExtensionEventReq, + stuff->count * sizeof(CARD32)); + SwapLongs((CARD32 *) (&stuff[1]), stuff->count); + return (ProcXSelectExtensionEvent(client)); } diff --git a/Xi/sendexev.c b/Xi/sendexev.c index e4e38d790..588c91023 100644 --- a/Xi/sendexev.c +++ b/Xi/sendexev.c @@ -80,7 +80,7 @@ int SProcXSendExtensionEvent(ClientPtr client) { char n; - long *p; + CARD32 *p; int i; xEvent eventT; xEvent *eventP; @@ -91,6 +91,11 @@ SProcXSendExtensionEvent(ClientPtr client) REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); swapl(&stuff->destination, n); swaps(&stuff->count, n); + + if (stuff->length != (sizeof(xSendExtensionEventReq) >> 2) + stuff->count + + (stuff->num_events * (sizeof(xEvent) >> 2))) + return BadLength; + eventP = (xEvent *) & stuff[1]; for (i = 0; i < stuff->num_events; i++, eventP++) { proc = EventSwapVector[eventP->u.u.type & 0177]; @@ -100,11 +105,8 @@ SProcXSendExtensionEvent(ClientPtr client) *eventP = eventT; } - p = (long *)(((xEvent *) & stuff[1]) + stuff->num_events); - for (i = 0; i < stuff->count; i++) { - swapl(p, n); - p++; - } + p = (CARD32 *)(((xEvent *) & stuff[1]) + stuff->num_events); + SwapLongs(p, stuff->count); return (ProcXSendExtensionEvent(client)); } From 7dc1717ff0f96b99271a912b8948dfce5164d5ad Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Thu, 17 Jan 2008 15:28:03 +0100 Subject: [PATCH 419/552] Fix for CVE-2007-6428 - TOG-cup extension memory corruption. --- Xext/cup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Xext/cup.c b/Xext/cup.c index d0e820c41..fd1409e33 100644 --- a/Xext/cup.c +++ b/Xext/cup.c @@ -176,6 +176,9 @@ int ProcGetReservedColormapEntries( REQUEST_SIZE_MATCH (xXcupGetReservedColormapEntriesReq); + if (stuff->screen >= screenInfo.numScreens) + return BadValue; + #ifndef HAVE_SPECIAL_DESKTOP_COLORS citems[CUP_BLACK_PIXEL].pixel = screenInfo.screens[stuff->screen]->blackPixel; From 6de61f82728df22ea01f9659df6581b87f33f11d Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Thu, 17 Jan 2008 15:28:42 +0100 Subject: [PATCH 420/552] Fix for CVE-2007-6429 - MIT-SHM and EVI extensions integer overflows. --- Xext/EVI.c | 15 ++++++++++++++- Xext/sampleEVI.c | 29 ++++++++++++++++++++++++----- Xext/shm.c | 46 ++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 76 insertions(+), 14 deletions(-) diff --git a/Xext/EVI.c b/Xext/EVI.c index 4bd050ca7..a637bae5d 100644 --- a/Xext/EVI.c +++ b/Xext/EVI.c @@ -34,6 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "EVIstruct.h" #include "modinit.h" +#include "scrnintstr.h" static EviPrivPtr eviPriv; @@ -84,10 +85,22 @@ ProcEVIGetVisualInfo(ClientPtr client) { REQUEST(xEVIGetVisualInfoReq); xEVIGetVisualInfoReply rep; - int n, n_conflict, n_info, sz_info, sz_conflict; + int i, n, n_conflict, n_info, sz_info, sz_conflict; VisualID32 *conflict; + unsigned int total_visuals = 0; xExtendedVisualInfo *eviInfo; int status; + + /* + * do this first, otherwise REQUEST_FIXED_SIZE can overflow. we assume + * here that you don't have more than 2^32 visuals over all your screens; + * this seems like a safe assumption. + */ + for (i = 0; i < screenInfo.numScreens; i++) + total_visuals += screenInfo.screens[i]->numVisuals; + if (stuff->n_visual > total_visuals) + return BadValue; + REQUEST_FIXED_SIZE(xEVIGetVisualInfoReq, stuff->n_visual * sz_VisualID32); status = eviPriv->getVisualInfo((VisualID32 *)&stuff[1], (int)stuff->n_visual, &eviInfo, &n_info, &conflict, &n_conflict); diff --git a/Xext/sampleEVI.c b/Xext/sampleEVI.c index 7508aa773..b871bfd74 100644 --- a/Xext/sampleEVI.c +++ b/Xext/sampleEVI.c @@ -34,6 +34,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "EVIstruct.h" #include "scrnintstr.h" + +#if HAVE_STDINT_H +#include +#elif !defined(UINT32_MAX) +#define UINT32_MAX 0xffffffffU +#endif + static int sampleGetVisualInfo( VisualID32 *visual, int n_visual, @@ -42,24 +49,36 @@ static int sampleGetVisualInfo( VisualID32 **conflict_rn, int *n_conflict_rn) { - int max_sz_evi = n_visual * sz_xExtendedVisualInfo * screenInfo.numScreens; + unsigned int max_sz_evi; VisualID32 *temp_conflict; xExtendedVisualInfo *evi; - int max_visuals = 0, max_sz_conflict, sz_conflict = 0; + unsigned int max_visuals = 0, max_sz_conflict, sz_conflict = 0; register int visualI, scrI, sz_evi = 0, conflictI, n_conflict; - *evi_rn = evi = (xExtendedVisualInfo *)xalloc(max_sz_evi); - if (!*evi_rn) - return BadAlloc; + + if (n_visual > UINT32_MAX/(sz_xExtendedVisualInfo * screenInfo.numScreens)) + return BadAlloc; + max_sz_evi = n_visual * sz_xExtendedVisualInfo * screenInfo.numScreens; + for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { if (screenInfo.screens[scrI]->numVisuals > max_visuals) max_visuals = screenInfo.screens[scrI]->numVisuals; } + + if (n_visual > UINT32_MAX/(sz_VisualID32 * screenInfo.numScreens + * max_visuals)) + return BadAlloc; max_sz_conflict = n_visual * sz_VisualID32 * screenInfo.numScreens * max_visuals; + + *evi_rn = evi = (xExtendedVisualInfo *)xalloc(max_sz_evi); + if (!*evi_rn) + return BadAlloc; + temp_conflict = (VisualID32 *)xalloc(max_sz_conflict); if (!temp_conflict) { xfree(*evi_rn); return BadAlloc; } + for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { for (visualI = 0; visualI < n_visual; visualI++) { evi[sz_evi].core_visual_id = visual[visualI]; diff --git a/Xext/shm.c b/Xext/shm.c index e3d7a23ff..c545e4919 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -757,6 +757,8 @@ ProcPanoramiXShmCreatePixmap( int i, j, result, rc; ShmDescPtr shmdesc; REQUEST(xShmCreatePixmapReq); + unsigned int width, height, depth; + unsigned long size; PanoramiXRes *newPix; REQUEST_SIZE_MATCH(xShmCreatePixmapReq); @@ -770,11 +772,26 @@ ProcPanoramiXShmCreatePixmap( return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); - if (!stuff->width || !stuff->height) + + width = stuff->width; + height = stuff->height; + depth = stuff->depth; + if (!width || !height || !depth) { client->errorValue = 0; return BadValue; } + if (width > 32767 || height > 32767) + return BadAlloc; + size = PixmapBytePad(width, depth) * height; + if (sizeof(size) == 4) { + if (size < width * height) + return BadAlloc; + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; + } + if (stuff->depth != 1) { pDepth = pDraw->pScreen->allowedDepths; @@ -785,9 +802,7 @@ ProcPanoramiXShmCreatePixmap( return BadValue; } CreatePmap: - VERIFY_SHMSIZE(shmdesc, stuff->offset, - PixmapBytePad(stuff->width, stuff->depth) * stuff->height, - client); + VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) return BadAlloc; @@ -1086,6 +1101,8 @@ ProcShmCreatePixmap(client) register int i, rc; ShmDescPtr shmdesc; REQUEST(xShmCreatePixmapReq); + unsigned int width, height, depth; + unsigned long size; REQUEST_SIZE_MATCH(xShmCreatePixmapReq); client->errorValue = stuff->pid; @@ -1098,11 +1115,26 @@ ProcShmCreatePixmap(client) return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); - if (!stuff->width || !stuff->height) + + width = stuff->width; + height = stuff->height; + depth = stuff->depth; + if (!width || !height || !depth) { client->errorValue = 0; return BadValue; } + if (width > 32767 || height > 32767) + return BadAlloc; + size = PixmapBytePad(width, depth) * height; + if (sizeof(size) == 4) { + if (size < width * height) + return BadAlloc; + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; + } + if (stuff->depth != 1) { pDepth = pDraw->pScreen->allowedDepths; @@ -1113,9 +1145,7 @@ ProcShmCreatePixmap(client) return BadValue; } CreatePmap: - VERIFY_SHMSIZE(shmdesc, stuff->offset, - PixmapBytePad(stuff->width, stuff->depth) * stuff->height, - client); + VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); pMap = (*shmFuncs[pDraw->pScreen->myNum]->CreatePixmap)( pDraw->pScreen, stuff->width, stuff->height, stuff->depth, From 8e133d96740d010a4fd969a8188e6e71fb2cafe2 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Thu, 17 Jan 2008 15:29:06 +0100 Subject: [PATCH 421/552] Fix for CVE-2008-0006 - PCF Font parser buffer overflow. --- dix/dixfonts.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 2979c6424..04f1f1b30 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -326,6 +326,13 @@ doOpenFont(ClientPtr client, OFclosurePtr c) err = BadFontName; goto bail; } + /* check values for firstCol, lastCol, firstRow, and lastRow */ + if (pfont->info.firstCol > pfont->info.lastCol || + pfont->info.firstRow > pfont->info.lastRow || + pfont->info.lastCol - pfont->info.firstCol > 255) { + err = AllocError; + goto bail; + } if (!pfont->fpe) pfont->fpe = fpe; pfont->refcnt++; From 23f3f0e27dc90b7b3a375f2a5dd094e6f53552b5 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 13 Jan 2008 14:00:25 -0800 Subject: [PATCH 422/552] XQuartz: Moved SetFrontProcess haco to set_front_process So it is done by the other thread... (cherry picked from commit 7429379eb1001ee3dc769daa8fe6b3aef1b9cc8a) --- hw/xquartz/X11Application.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index f68898582..be5511d30 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -314,7 +314,11 @@ static void message_kit_thread (SEL selector, NSObject *arg) { } - (void) set_front_process:unused { -// [self activateX:YES]; + /* Hackery needed due to argv[0] hackery */ + // [self activateX:YES]; + ProcessSerialNumber psn = { 0, kCurrentProcess }; + SetFrontProcess(&psn); + QuartzMessageServerThread(kXDarwinBringAllToFront, 0); } @@ -711,10 +715,6 @@ void X11ApplicationSetWindowMenuCheck (int idx) { void X11ApplicationSetFrontProcess (void) { message_kit_thread (@selector (set_front_process:), nil); - - /* Hackery needed due to argv[0] hackery */ - ProcessSerialNumber psn = { 0, kCurrentProcess }; - SetFrontProcess(&psn); } void X11ApplicationSetCanQuit (int state) { From e9fa7c1c88a8130a48f772c92b186b8b777986b5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 18 Jan 2008 14:41:20 -0500 Subject: [PATCH 423/552] CVE-2007-6429: Don't spuriously reject <8bpp shm pixmaps. Move size validation after depth validation, and only validate size if the bpp of the pixmap format is > 8. If bpp < 8 then we're already protected from overflow by the width and height checks. --- Xext/shm.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/Xext/shm.c b/Xext/shm.c index c545e4919..e46f6fcde 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -783,14 +783,6 @@ ProcPanoramiXShmCreatePixmap( } if (width > 32767 || height > 32767) return BadAlloc; - size = PixmapBytePad(width, depth) * height; - if (sizeof(size) == 4) { - if (size < width * height) - return BadAlloc; - /* thankfully, offset is unsigned */ - if (stuff->offset + size < size) - return BadAlloc; - } if (stuff->depth != 1) { @@ -801,7 +793,17 @@ ProcPanoramiXShmCreatePixmap( client->errorValue = stuff->depth; return BadValue; } + CreatePmap: + size = PixmapBytePad(width, depth) * height; + if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { + if (size < width * height) + return BadAlloc; + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; + } + VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) @@ -1126,14 +1128,6 @@ ProcShmCreatePixmap(client) } if (width > 32767 || height > 32767) return BadAlloc; - size = PixmapBytePad(width, depth) * height; - if (sizeof(size) == 4) { - if (size < width * height) - return BadAlloc; - /* thankfully, offset is unsigned */ - if (stuff->offset + size < size) - return BadAlloc; - } if (stuff->depth != 1) { @@ -1144,7 +1138,17 @@ ProcShmCreatePixmap(client) client->errorValue = stuff->depth; return BadValue; } + CreatePmap: + size = PixmapBytePad(width, depth) * height; + if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { + if (size < width * height) + return BadAlloc; + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; + } + VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); pMap = (*shmFuncs[pDraw->pScreen->myNum]->CreatePixmap)( pDraw->pScreen, stuff->width, From 94a21d757ce58254accbd5dd3a86810aadeec9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Sat, 19 Jan 2008 13:17:45 +0100 Subject: [PATCH 424/552] AIGLX: Fix GLX_EXT_texture_from_pixmap fallback with EXA. Use pScreen->GetImage to obtain the pixmap contents instead of dereferencing pPixmap->devPrivate.ptr directly. --- GL/glx/glxdri.c | 80 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 27 deletions(-) diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index c0da07b68..6c1a199f7 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -47,6 +47,8 @@ #include #include +#include "servermd.h" + #define DRI_NEW_INTERFACE_ONLY #include "glxserver.h" #include "glxutil.h" @@ -308,18 +310,20 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext) } static void -glxFillAlphaChannel (PixmapPtr pixmap, int x, int y, int width, int height) +glxFillAlphaChannel (CARD32 *pixels, CARD32 rowstride, int width, int height) { int i; - CARD32 *p, *end, *pixels = (CARD32 *)pixmap->devPrivate.ptr; - CARD32 rowstride = pixmap->devKind / 4; + CARD32 *p, *end; + + rowstride /= 4; - for (i = y; i < y + height; i++) + for (i = 0; i < height; i++) { - p = &pixels[i * rowstride + x]; + p = pixels; end = p + width; while (p < end) *p++ |= 0xFF000000; + pixels += rowstride; } } @@ -430,22 +434,31 @@ nooverride: type = GL_UNSIGNED_SHORT_5_6_5; } - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, - pixmap->devKind / bpp) ); - if (pRegion == NULL) { - if (!override && pixmap->drawable.depth == 24) - glxFillAlphaChannel(pixmap, - pixmap->drawable.x, - pixmap->drawable.y, - pixmap->drawable.width, - pixmap->drawable.height); + void *data = NULL; - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, - pixmap->drawable.x) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, - pixmap->drawable.y) ); + if (!override) { + unsigned pitch = PixmapBytePad(pixmap->drawable.width, + pixmap->drawable.depth); + + data = xalloc(pitch * pixmap->drawable.height); + + pScreen->GetImage(&pixmap->drawable, 0 /*pixmap->drawable.x*/, + 0 /*pixmap->drawable.y*/, pixmap->drawable.width, + pixmap->drawable.height, ZPixmap, ~0, data); + + if (pixmap->drawable.depth == 24) + glxFillAlphaChannel(data, + pitch, + pixmap->drawable.width, + pixmap->drawable.height); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, + pitch / bpp) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, 0) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, 0) ); + } CALL_TexImage2D( GET_DISPATCH(), (glxPixmap->target, @@ -456,26 +469,37 @@ nooverride: 0, format, type, - override ? NULL : pixmap->devPrivate.ptr) ); + data) ); + + xfree(data); } else if (!override) { int i, numRects; BoxPtr p; numRects = REGION_NUM_RECTS (pRegion); p = REGION_RECTS (pRegion); + + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, 0) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, 0) ); + for (i = 0; i < numRects; i++) { + unsigned pitch = PixmapBytePad(p[i].x2 - p[i].x1, + pixmap->drawable.depth); + void *data = xalloc(pitch * (p[i].y2 - p[i].y1)); + + pScreen->GetImage(&pixmap->drawable, /*pixmap->drawable.x +*/ p[i].x1, + /*pixmap->drawable.y*/ + p[i].y1, p[i].x2 - p[i].x1, + p[i].y2 - p[i].y1, ZPixmap, ~0, data); + if (pixmap->drawable.depth == 24) - glxFillAlphaChannel(pixmap, - pixmap->drawable.x + p[i].x1, - pixmap->drawable.y + p[i].y1, + glxFillAlphaChannel(data, + pitch, p[i].x2 - p[i].x1, p[i].y2 - p[i].y1); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, - pixmap->drawable.x + p[i].x1) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, - pixmap->drawable.y + p[i].y1) ); + CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, + pitch / bpp) ); CALL_TexSubImage2D( GET_DISPATCH(), (glxPixmap->target, @@ -484,7 +508,9 @@ nooverride: p[i].x2 - p[i].x1, p[i].y2 - p[i].y1, format, type, - pixmap->devPrivate.ptr) ); + data) ); + + xfree(data); } } From be6c17fcf9efebc0bbcc3d9a25f8c5a2450c2161 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Mon, 21 Jan 2008 16:13:21 +0100 Subject: [PATCH 425/552] CVE-2007-6429: Always test for size+offset wrapping. --- Xext/shm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Xext/shm.c b/Xext/shm.c index e46f6fcde..a7a1ecf75 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -799,10 +799,10 @@ CreatePmap: if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { if (size < width * height) return BadAlloc; - /* thankfully, offset is unsigned */ - if (stuff->offset + size < size) - return BadAlloc; } + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); @@ -1144,10 +1144,10 @@ CreatePmap: if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { if (size < width * height) return BadAlloc; - /* thankfully, offset is unsigned */ - if (stuff->offset + size < size) - return BadAlloc; } + /* thankfully, offset is unsigned */ + if (stuff->offset + size < size) + return BadAlloc; VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); pMap = (*shmFuncs[pDraw->pScreen->myNum]->CreatePixmap)( From 1a88aed5c82c7c131e3d473ef7b8766a418fdf1b Mon Sep 17 00:00:00 2001 From: David Nusinow Date: Mon, 21 Jan 2008 21:16:13 -0500 Subject: [PATCH 426/552] Add tags/TAGS to .gitignore for ctags usage --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b52664bda..406b74c4e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,8 @@ install-sh libtool ltmain.sh missing +TAGS +tags ylwrap xorg-server.pc stamp-h? From cc22b05ea06e08568d0f0abdaccf67bd32662e94 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 22 Jan 2008 18:57:11 -0500 Subject: [PATCH 427/552] There is no such thing as /dev/cpu/mtrr. --- hw/xfree86/os-support/linux/lnx_video.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c index ad2b66f74..1bd2d575f 100644 --- a/hw/xfree86/os-support/linux/lnx_video.c +++ b/hw/xfree86/os-support/linux/lnx_video.c @@ -142,17 +142,8 @@ mtrr_open(int verbosity) /* Only report absence of /proc/mtrr once. */ static Bool warned = FALSE; - char **fn; - static char *mtrr_files[] = { - "/dev/cpu/mtrr", /* Possible future name */ - "/proc/mtrr", /* Current name */ - NULL - }; - if (mtrr_fd == MTRR_FD_UNOPENED) { - /* So open it. */ - for (fn = mtrr_files; mtrr_fd < 0 && *fn; fn++) - mtrr_fd = open(*fn, O_WRONLY); + mtrr_fd = open("/proc/mtrr", O_WRONLY); if (mtrr_fd < 0) mtrr_fd = MTRR_FD_PROBLEM; From 734e115871ce98badb8800383c423493802ae3d3 Mon Sep 17 00:00:00 2001 From: Hong Liu Date: Wed, 23 Jan 2008 21:04:32 +0800 Subject: [PATCH 428/552] Bug #12439: add a quirk to use +hsync +vsync for the probed detailed mode. Samsung 205BW quirk is somehow reworked. --- hw/xfree86/modes/xf86EdidModes.c | 35 ++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index 87a812765..b865727ef 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -66,6 +66,8 @@ typedef enum { DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE = 1 << 5, /* Monitor forgot to set the first detailed is preferred bit. */ DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6, + /* use +hsync +vsync for detailed mode */ + DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7, } ddc_quirk_t; static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC) @@ -160,6 +162,15 @@ static Bool quirk_first_detailed_preferred (int scrnIndex, xf86MonPtr DDC) return FALSE; } +static Bool quirk_detailed_sync_pp(int scrnIndex, xf86MonPtr DDC) +{ + /* Bug #12439: Samsung SyncMaster 205BW */ + if (memcmp (DDC->vendor.name, "SAM", 4) == 0 && + DDC->vendor.prod_id == 541) + return TRUE; + return FALSE; +} + typedef struct { Bool (*detect) (int scrnIndex, xf86MonPtr DDC); ddc_quirk_t quirk; @@ -195,6 +206,10 @@ static const ddc_quirk_map_t ddc_quirks[] = { quirk_first_detailed_preferred, DDC_QUIRK_FIRST_DETAILED_PREFERRED, "First detailed timing was not marked as preferred." }, + { + quirk_detailed_sync_pp, DDC_QUIRK_DETAILED_SYNC_PP, + "Use +hsync +vsync for detailed timing." + }, { NULL, DDC_QUIRK_NONE, "No known quirks" @@ -341,15 +356,19 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, if (timing->interlaced) Mode->Flags |= V_INTERLACE; - if (timing->misc & 0x02) - Mode->Flags |= V_PVSYNC; - else - Mode->Flags |= V_NVSYNC; + if (quirks & DDC_QUIRK_DETAILED_SYNC_PP) + Mode->Flags |= V_PVSYNC | V_PHSYNC; + else { + if (timing->misc & 0x02) + Mode->Flags |= V_PVSYNC; + else + Mode->Flags |= V_NVSYNC; - if (timing->misc & 0x01) - Mode->Flags |= V_PHSYNC; - else - Mode->Flags |= V_NHSYNC; + if (timing->misc & 0x01) + Mode->Flags |= V_PHSYNC; + else + Mode->Flags |= V_NHSYNC; + } return Mode; } From f0bf9a5231d4f612ac916355118484d055715f32 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 24 Jan 2008 19:02:35 -0500 Subject: [PATCH 429/552] xselinux: Whitespace fixups. --- Xext/xselinux.c | 66 ++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 4629e9027..ede0350d4 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -271,7 +271,7 @@ SELinuxTypeToClass(RESTYPE type) knownTypes[type] = SECCLASS_X_CURSOR; if (fulltype == RT_COLORMAP) knownTypes[type] = SECCLASS_X_COLORMAP; - + /* Need to do a string lookup */ str = LookupResourceName(fulltype); if (!strcmp(str, "PICTURE")) @@ -890,8 +890,7 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (rc != Success) FatalError("SELinux: Failed to set label property on window!\n"); freecon(ctx); - } - else + } else FatalError("SELinux: Unexpected unlabeled client found\n"); state = dixLookupPrivate(&pWin->devPrivates, stateKey); @@ -907,8 +906,7 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (rc != Success) FatalError("SELinux: Failed to set label property on window!\n"); freecon(ctx); - } - else + } else FatalError("SELinux: Unexpected unlabeled window found\n"); } @@ -1181,9 +1179,9 @@ SProcSELinuxQueryVersion(ClientPtr client) REQUEST(SELinuxQueryVersionReq); int n; - REQUEST_SIZE_MATCH (SELinuxQueryVersionReq); - swaps(&stuff->client_major,n); - swaps(&stuff->client_minor,n); + REQUEST_SIZE_MATCH(SELinuxQueryVersionReq); + swaps(&stuff->client_major, n); + swaps(&stuff->client_minor, n); return ProcSELinuxQueryVersion(client); } @@ -1193,8 +1191,8 @@ SProcSELinuxSetSelectionManager(ClientPtr client) REQUEST(SELinuxSetSelectionManagerReq); int n; - REQUEST_SIZE_MATCH (SELinuxSetSelectionManagerReq); - swapl(&stuff->window,n); + REQUEST_SIZE_MATCH(SELinuxSetSelectionManagerReq); + swapl(&stuff->window, n); return ProcSELinuxSetSelectionManager(client); } @@ -1205,7 +1203,7 @@ SProcSELinuxSetDeviceCreateContext(ClientPtr client) int n; REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); - swaps(&stuff->context_len,n); + swaps(&stuff->context_len, n); return ProcSELinuxSetDeviceCreateContext(client); } @@ -1216,8 +1214,8 @@ SProcSELinuxSetDeviceContext(ClientPtr client) int n; REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq); - swapl(&stuff->id,n); - swaps(&stuff->context_len,n); + swapl(&stuff->id, n); + swaps(&stuff->context_len, n); return ProcSELinuxSetDeviceContext(client); } @@ -1228,7 +1226,7 @@ SProcSELinuxGetDeviceContext(ClientPtr client) int n; REQUEST_SIZE_MATCH(SELinuxGetContextReq); - swapl(&stuff->id,n); + swapl(&stuff->id, n); return ProcSELinuxGetDeviceContext(client); } @@ -1239,7 +1237,7 @@ SProcSELinuxSetPropertyCreateContext(ClientPtr client) int n; REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); - swaps(&stuff->context_len,n); + swaps(&stuff->context_len, n); return ProcSELinuxSetPropertyCreateContext(client); } @@ -1250,8 +1248,8 @@ SProcSELinuxGetPropertyContext(ClientPtr client) int n; REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq); - swapl(&stuff->window,n); - swapl(&stuff->property,n); + swapl(&stuff->window, n); + swapl(&stuff->property, n); return ProcSELinuxGetPropertyContext(client); } @@ -1262,7 +1260,7 @@ SProcSELinuxSetWindowCreateContext(ClientPtr client) int n; REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); - swaps(&stuff->context_len,n); + swaps(&stuff->context_len, n); return ProcSELinuxSetWindowCreateContext(client); } @@ -1273,7 +1271,7 @@ SProcSELinuxGetWindowContext(ClientPtr client) int n; REQUEST_SIZE_MATCH(SELinuxGetContextReq); - swapl(&stuff->id,n); + swapl(&stuff->id, n); return ProcSELinuxGetWindowContext(client); } @@ -1287,31 +1285,31 @@ SProcSELinuxDispatch(ClientPtr client) switch (stuff->data) { case X_SELinuxQueryVersion: - return SProcSELinuxQueryVersion(client); + return SProcSELinuxQueryVersion(client); case X_SELinuxSetSelectionManager: return SProcSELinuxSetSelectionManager(client); case X_SELinuxGetSelectionManager: - return ProcSELinuxGetSelectionManager(client); + return ProcSELinuxGetSelectionManager(client); case X_SELinuxSetDeviceCreateContext: - return SProcSELinuxSetDeviceCreateContext(client); + return SProcSELinuxSetDeviceCreateContext(client); case X_SELinuxGetDeviceCreateContext: - return ProcSELinuxGetDeviceCreateContext(client); + return ProcSELinuxGetDeviceCreateContext(client); case X_SELinuxSetDeviceContext: - return SProcSELinuxSetDeviceContext(client); + return SProcSELinuxSetDeviceContext(client); case X_SELinuxGetDeviceContext: - return SProcSELinuxGetDeviceContext(client); + return SProcSELinuxGetDeviceContext(client); case X_SELinuxSetPropertyCreateContext: - return SProcSELinuxSetPropertyCreateContext(client); + return SProcSELinuxSetPropertyCreateContext(client); case X_SELinuxGetPropertyCreateContext: - return ProcSELinuxGetPropertyCreateContext(client); + return ProcSELinuxGetPropertyCreateContext(client); case X_SELinuxGetPropertyContext: - return SProcSELinuxGetPropertyContext(client); + return SProcSELinuxGetPropertyContext(client); case X_SELinuxSetWindowCreateContext: - return SProcSELinuxSetWindowCreateContext(client); + return SProcSELinuxSetWindowCreateContext(client); case X_SELinuxGetWindowCreateContext: - return ProcSELinuxGetWindowCreateContext(client); + return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: - return SProcSELinuxGetWindowContext(client); + return SProcSELinuxGetWindowContext(client); default: return BadRequest; } @@ -1376,8 +1374,8 @@ SELinuxExtensionInit(INITARGS) /* Setup SELinux stuff */ if (!is_selinux_enabled()) { - ErrorF("SELinux: SELinux not enabled, disabling SELinux support.\n"); - return; + ErrorF("SELinux: SELinux not enabled, disabling SELinux support.\n"); + return; } selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback)SELinuxLog); @@ -1408,7 +1406,7 @@ SELinuxExtensionInit(INITARGS) /* Prepare for auditing */ audit_fd = audit_open(); if (audit_fd < 0) - FatalError("SELinux: Failed to open the system audit log\n"); + FatalError("SELinux: Failed to open the system audit log\n"); /* Allocate private storage */ if (!dixRequestPrivate(stateKey, sizeof(SELinuxStateRec))) From 7ba8e97cbabfef4d614a6a38314830ec0f925471 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 24 Jan 2008 19:09:58 -0500 Subject: [PATCH 430/552] xselinux: Implement "get context" protocol requests. --- Xext/xselinux.c | 119 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 116 insertions(+), 3 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index ede0350d4..1432916de 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1098,7 +1098,40 @@ ProcSELinuxSetDeviceContext(ClientPtr client) static int ProcSELinuxGetDeviceContext(ClientPtr client) { - return Success; + char *ctx; + DeviceIntPtr dev; + SELinuxStateRec *state; + SELinuxGetContextReply rep; + int rc; + + REQUEST(SELinuxGetContextReq); + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + + rc = dixLookupDevice(&dev, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + state = dixLookupPrivate(&dev->devPrivates, stateKey); + rc = avc_sid_to_context(state->sid, &ctx); + if (rc != Success) + return BadValue; + + rep.type = X_Reply; + rep.length = (strlen(ctx) + 4) >> 2; + rep.sequenceNumber = client->sequence; + rep.context_len = strlen(ctx) + 1; + + if (client->swapped) { + int n; + swapl(&rep.length, n); + swaps(&rep.sequenceNumber, n); + swaps(&rep.context_len, n); + } + + WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep); + WriteToClient(client, rep.context_len, ctx); + free(ctx); + return client->noClientException; } static int @@ -1116,7 +1149,54 @@ ProcSELinuxGetPropertyCreateContext(ClientPtr client) static int ProcSELinuxGetPropertyContext(ClientPtr client) { - return Success; + char *ctx; + WindowPtr pWin; + PropertyPtr pProp; + SELinuxStateRec *state; + SELinuxGetContextReply rep; + int rc; + + REQUEST(SELinuxGetPropertyContextReq); + REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq); + + rc = dixLookupWindow(&pWin, stuff->window, client, DixGetPropAccess); + if (rc != Success) + return rc; + + pProp = wUserProps(pWin); + while (pProp) { + if (pProp->propertyName == stuff->property) + break; + pProp = pProp->next; + } + if (!pProp) + return BadValue; + + rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, DixGetAttrAccess); + if (rc != Success) + return rc; + + state = dixLookupPrivate(&pProp->devPrivates, stateKey); + rc = avc_sid_to_context(state->sid, &ctx); + if (rc != Success) + return BadValue; + + rep.type = X_Reply; + rep.length = (strlen(ctx) + 4) >> 2; + rep.sequenceNumber = client->sequence; + rep.context_len = strlen(ctx) + 1; + + if (client->swapped) { + int n; + swapl(&rep.length, n); + swaps(&rep.sequenceNumber, n); + swaps(&rep.context_len, n); + } + + WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep); + WriteToClient(client, rep.context_len, ctx); + free(ctx); + return client->noClientException; } static int @@ -1134,7 +1214,40 @@ ProcSELinuxGetWindowCreateContext(ClientPtr client) static int ProcSELinuxGetWindowContext(ClientPtr client) { - return Success; + char *ctx; + WindowPtr pWin; + SELinuxStateRec *state; + SELinuxGetContextReply rep; + int rc; + + REQUEST(SELinuxGetContextReq); + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + + rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); + if (rc != Success) + return rc; + + state = dixLookupPrivate(&pWin->devPrivates, stateKey); + rc = avc_sid_to_context(state->sid, &ctx); + if (rc != Success) + return BadValue; + + rep.type = X_Reply; + rep.length = (strlen(ctx) + 4) >> 2; + rep.sequenceNumber = client->sequence; + rep.context_len = strlen(ctx) + 1; + + if (client->swapped) { + int n; + swapl(&rep.length, n); + swaps(&rep.sequenceNumber, n); + swaps(&rep.context_len, n); + } + + WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep); + WriteToClient(client, rep.context_len, ctx); + free(ctx); + return client->noClientException; } static int From 6ffeecabb7f3f3173864e0f0af21a99bdc5b5044 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 24 Jan 2008 18:11:49 -0500 Subject: [PATCH 431/552] xselinux: Use a privileged bit in the state instead of passing an index to the permission checking function. --- Xext/xselinux.c | 60 ++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 1432916de..53ea6c114 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -63,6 +63,7 @@ typedef struct { security_id_t sid; struct avc_entry_ref aeref; char *command; + int privileged; } SELinuxStateRec; /* selection manager */ @@ -287,11 +288,11 @@ SELinuxTypeToClass(RESTYPE type) * Performs an SELinux permission check. */ static int -SELinuxDoCheck(int clientIndex, SELinuxStateRec *subj, SELinuxStateRec *obj, +SELinuxDoCheck(SELinuxStateRec *subj, SELinuxStateRec *obj, security_class_t class, Mask mode, SELinuxAuditRec *auditdata) { /* serverClient requests OK */ - if (clientIndex == 0) + if (subj->privileged) return Success; auditdata->command = subj->command; @@ -383,6 +384,7 @@ SELinuxLabelInitial(void) /* Do the serverClient */ state = dixLookupPrivate(&serverClient->devPrivates, stateKey); + state->privileged = 1; sidput(state->sid); /* Use the context of the X server process for the serverClient */ @@ -496,8 +498,8 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) obj->sid = subj->sid; } - rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_DEVICE, - rec->access_mode, &auditdata); + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DEVICE, rec->access_mode, + &auditdata); if (rc != Success) rec->status = rc; } @@ -509,21 +511,18 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) SELinuxStateRec *subj, *obj, ev_sid; SELinuxAuditRec auditdata = { .client = rec->client }; security_class_t class; - int rc, i, type, clientIndex; + int rc, i, type; - if (rec->dev) { + if (rec->dev) subj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); - clientIndex = -1; /* some nonzero value */ - } else { + else subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - clientIndex = rec->client->index; - } obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); /* Check send permission on window */ - rc = SELinuxDoCheck(clientIndex, subj, obj, SECCLASS_X_DRAWABLE, - DixSendAccess, &auditdata); + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess, + &auditdata); if (rc != Success) goto err; @@ -537,8 +536,7 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) goto err; auditdata.event = type; - rc = SELinuxDoCheck(clientIndex, subj, &ev_sid, class, - DixSendAccess, &auditdata); + rc = SELinuxDoCheck(subj, &ev_sid, class, DixSendAccess, &auditdata); if (rc != Success) goto err; } @@ -560,8 +558,8 @@ SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); /* Check receive permission on window */ - rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_DRAWABLE, - DixReceiveAccess, &auditdata); + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess, + &auditdata); if (rc != Success) goto err; @@ -575,8 +573,7 @@ SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) goto err; auditdata.event = type; - rc = SELinuxDoCheck(rec->client->index, subj, &ev_sid, class, - DixReceiveAccess, &auditdata); + rc = SELinuxDoCheck(subj, &ev_sid, class, DixReceiveAccess, &auditdata); if (rc != Success) goto err; } @@ -633,8 +630,8 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Perform the security check */ auditdata.extension = rec->ext->name; - rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_EXTENSION, - rec->access_mode, &auditdata); + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_EXTENSION, rec->access_mode, + &auditdata); if (rc != Success) rec->status = rc; } @@ -680,13 +677,12 @@ SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) return; } freecon(con); - avc_entry_ref_init(&obj->aeref); } /* Perform the security check */ auditdata.property = rec->pProp->propertyName; - rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_PROPERTY, - rec->access_mode, &auditdata); + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode, + &auditdata); if (rc != Success) rec->status = rc; } @@ -741,8 +737,7 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* Perform the security check */ auditdata.restype = rec->rtype; auditdata.id = rec->id; - rc = SELinuxDoCheck(rec->client->index, subj, obj, class, - rec->access_mode, &auditdata); + rc = SELinuxDoCheck(subj, obj, class, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; } @@ -775,8 +770,7 @@ SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) if (is_saver) access_mode <<= 2; - rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_SCREEN, - access_mode, &auditdata); + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SCREEN, access_mode, &auditdata); if (rc != Success) rec->status = rc; } @@ -792,8 +786,8 @@ SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); - rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_CLIENT, - rec->access_mode, &auditdata); + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode, + &auditdata); if (rc != Success) rec->status = rc; } @@ -809,8 +803,8 @@ SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); - rc = SELinuxDoCheck(rec->client->index, subj, obj, SECCLASS_X_SERVER, - rec->access_mode, &auditdata); + rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode, + &auditdata); if (rc != Success) rec->status = rc; } @@ -832,8 +826,8 @@ SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) } auditdata.selection = rec->name; - rc = SELinuxDoCheck(rec->client->index, subj, &sel_sid, - SECCLASS_X_SELECTION, rec->access_mode, &auditdata); + rc = SELinuxDoCheck(subj, &sel_sid, SECCLASS_X_SELECTION, rec->access_mode, + &auditdata); if (rc != Success) rec->status = rc; } From 46794d0c9665f07913980830d038c88d00407612 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 24 Jan 2008 19:49:13 -0500 Subject: [PATCH 432/552] xselinux: Rename SelectionManager to more generic SecurityManager. --- Xext/xselinux.c | 60 ++++++++++++++++++++++++------------------------- Xext/xselinux.h | 10 ++++----- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 53ea6c114..a6e27e695 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -72,8 +72,8 @@ typedef struct { security_id_t sid; } SELinuxSelectionRec; -static ClientPtr selectionManager; -static Window selectionWindow; +static ClientPtr securityManager; +static Window securityWindow; /* audit file descriptor */ static int audit_fd; @@ -849,9 +849,9 @@ SELinuxClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) case ClientStateRetained: case ClientStateGone: - if (pci->client == selectionManager) { - selectionManager = NULL; - selectionWindow = 0; + if (pci->client == securityManager) { + securityManager = NULL; + securityWindow = 0; } break; @@ -935,9 +935,9 @@ SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) case SelectionConvertSelection: /* redirect the convert request if necessary */ - if (selectionManager && selectionManager != rec->client) { - rec->selection->client = selectionManager; - rec->selection->window = selectionWindow; + if (securityManager && securityManager != rec->client) { + rec->selection->client = securityManager; + rec->selection->window = securityWindow; } else { rec->selection->client = rec->selection->alt_client; rec->selection->window = rec->selection->alt_window; @@ -1004,39 +1004,39 @@ ProcSELinuxQueryVersion(ClientPtr client) } static int -ProcSELinuxSetSelectionManager(ClientPtr client) +ProcSELinuxSetSecurityManager(ClientPtr client) { WindowPtr pWin; int rc; - REQUEST(SELinuxSetSelectionManagerReq); - REQUEST_SIZE_MATCH(SELinuxSetSelectionManagerReq); + REQUEST(SELinuxSetSecurityManagerReq); + REQUEST_SIZE_MATCH(SELinuxSetSecurityManagerReq); if (stuff->window == None) { - selectionManager = NULL; - selectionWindow = None; + securityManager = NULL; + securityWindow = None; } else { rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) return rc; - selectionManager = client; - selectionWindow = stuff->window; + securityManager = client; + securityWindow = stuff->window; } return Success; } static int -ProcSELinuxGetSelectionManager(ClientPtr client) +ProcSELinuxGetSecurityManager(ClientPtr client) { - SELinuxGetSelectionManagerReply rep; + SELinuxGetSecurityManagerReply rep; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.window = selectionWindow; + rep.window = securityWindow; if (client->swapped) { int n; swaps(&rep.sequenceNumber, n); @@ -1251,10 +1251,10 @@ ProcSELinuxDispatch(ClientPtr client) switch (stuff->data) { case X_SELinuxQueryVersion: return ProcSELinuxQueryVersion(client); - case X_SELinuxSetSelectionManager: - return ProcSELinuxSetSelectionManager(client); - case X_SELinuxGetSelectionManager: - return ProcSELinuxGetSelectionManager(client); + case X_SELinuxSetSecurityManager: + return ProcSELinuxSetSecurityManager(client); + case X_SELinuxGetSecurityManager: + return ProcSELinuxGetSecurityManager(client); case X_SELinuxSetDeviceCreateContext: return ProcSELinuxSetDeviceCreateContext(client); case X_SELinuxGetDeviceCreateContext: @@ -1293,14 +1293,14 @@ SProcSELinuxQueryVersion(ClientPtr client) } static int -SProcSELinuxSetSelectionManager(ClientPtr client) +SProcSELinuxSetSecurityManager(ClientPtr client) { - REQUEST(SELinuxSetSelectionManagerReq); + REQUEST(SELinuxSetSecurityManagerReq); int n; - REQUEST_SIZE_MATCH(SELinuxSetSelectionManagerReq); + REQUEST_SIZE_MATCH(SELinuxSetSecurityManagerReq); swapl(&stuff->window, n); - return ProcSELinuxSetSelectionManager(client); + return ProcSELinuxSetSecurityManager(client); } static int @@ -1393,10 +1393,10 @@ SProcSELinuxDispatch(ClientPtr client) switch (stuff->data) { case X_SELinuxQueryVersion: return SProcSELinuxQueryVersion(client); - case X_SELinuxSetSelectionManager: - return SProcSELinuxSetSelectionManager(client); - case X_SELinuxGetSelectionManager: - return ProcSELinuxGetSelectionManager(client); + case X_SELinuxSetSecurityManager: + return SProcSELinuxSetSecurityManager(client); + case X_SELinuxGetSecurityManager: + return ProcSELinuxGetSecurityManager(client); case X_SELinuxSetDeviceCreateContext: return SProcSELinuxSetDeviceCreateContext(client); case X_SELinuxGetDeviceCreateContext: diff --git a/Xext/xselinux.h b/Xext/xselinux.h index ba1380b57..7eeea5046 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -31,8 +31,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* Extension protocol */ #define X_SELinuxQueryVersion 0 -#define X_SELinuxSetSelectionManager 1 -#define X_SELinuxGetSelectionManager 2 +#define X_SELinuxSetSecurityManager 1 +#define X_SELinuxGetSecurityManager 2 #define X_SELinuxSetDeviceCreateContext 3 #define X_SELinuxGetDeviceCreateContext 4 #define X_SELinuxSetDeviceContext 5 @@ -72,13 +72,13 @@ typedef struct { CARD8 SELinuxReqType; CARD16 length; CARD32 window; -} SELinuxSetSelectionManagerReq; +} SELinuxSetSecurityManagerReq; typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; -} SELinuxGetSelectionManagerReq; +} SELinuxGetSecurityManagerReq; typedef struct { CARD8 type; @@ -91,7 +91,7 @@ typedef struct { CARD32 pad4; CARD32 pad5; CARD32 pad6; -} SELinuxGetSelectionManagerReply; +} SELinuxGetSecurityManagerReply; typedef struct { CARD8 reqType; From f82329b0811469ddae5c44dcfffa38185c11a67c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 25 Jan 2008 16:20:46 -0500 Subject: [PATCH 433/552] XACE: Don't need to actually register a protocol extension. --- Xext/xace.c | 50 -------------------------------------------------- Xext/xace.h | 3 --- 2 files changed, 53 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index e85a51714..632673548 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -221,51 +221,6 @@ int XaceHook(int hook, ...) return prv ? *prv : Success; } -static int -ProcXaceDispatch(ClientPtr client) -{ - REQUEST(xReq); - - switch (stuff->data) - { - default: - return BadRequest; - } -} /* ProcXaceDispatch */ - -static int -SProcXaceDispatch(ClientPtr client) -{ - REQUEST(xReq); - - switch (stuff->data) - { - default: - return BadRequest; - } -} /* SProcXaceDispatch */ - - -/* XaceResetProc - * - * Arguments: - * extEntry is the extension information for the XACE extension. - * - * Returns: nothing. - * - * Side Effects: - * Performs any cleanup needed by XACE at server shutdown time. - */ -static void -XaceResetProc(ExtensionEntry *extEntry) -{ - int i; - - for (i=0; i Date: Fri, 25 Jan 2008 17:28:17 -0500 Subject: [PATCH 434/552] XACE: Stop using fake requestVectors in favor of a simple hook call. --- Xext/xace.c | 139 +++++++------------------------------------------ Xext/xace.h | 6 +-- dix/dispatch.c | 5 +- 3 files changed, 24 insertions(+), 126 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 632673548..0b3baf6b1 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -28,27 +28,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; -/* Proc vectors for untrusted clients, swapped and unswapped versions. - * These are the same as the normal proc vectors except that extensions - * that haven't declared themselves secure will have ProcBadRequest plugged - * in for their major opcode dispatcher. This prevents untrusted clients - * from guessing extension major opcodes and using the extension even though - * the extension can't be listed or queried. - */ -static int (*UntrustedProcVector[256])( - ClientPtr /*client*/ -); -static int (*SwappedUntrustedProcVector[256])( - ClientPtr /*client*/ -); - /* Special-cased hook functions. Called by Xserver. */ -void XaceHookAuditBegin(ClientPtr ptr) +int XaceHookDispatch(ClientPtr client, int major) { - XaceAuditRec rec = { ptr, 0 }; - /* call callbacks, there is no return value. */ + /* Call the audit begin callback, there is no return value. */ + XaceAuditRec rec = { client, 0 }; CallCallbacks(&XaceHooks[XACE_AUDIT_BEGIN], &rec); + + if (major < 128) { + /* Call the core dispatch hook */ + XaceCoreDispatchRec rec = { client, Success /* default allow */ }; + CallCallbacks(&XaceHooks[XACE_CORE_DISPATCH], &rec); + return rec.status; + } else { + /* Call the extension dispatch hook */ + ExtensionEntry *ext = GetExtensionEntry(major); + XaceExtAccessRec rec = { client, ext, DixUseAccess, Success }; + if (ext) + CallCallbacks(&XaceHooks[XACE_EXT_DISPATCH], &rec); + /* On error, pretend extension doesn't exist */ + return (rec.status == Success) ? Success : BadRequest; + } } void XaceHookAuditEnd(ClientPtr ptr, int result) @@ -221,116 +222,12 @@ int XaceHook(int hook, ...) return prv ? *prv : Success; } -static int -XaceCatchDispatchProc(ClientPtr client) -{ - REQUEST(xReq); - int major = stuff->reqType; - XaceCoreDispatchRec rec = { client, Success /* default allow */ }; - - if (!ProcVector[major]) - return BadRequest; - - /* call callbacks and return result, if any. */ - CallCallbacks(&XaceHooks[XACE_CORE_DISPATCH], &rec); - - if (rec.status != Success) - return rec.status; - - return client->swapped ? - (* SwappedProcVector[major])(client) : - (* ProcVector[major])(client); -} - -static int -XaceCatchExtProc(ClientPtr client) -{ - REQUEST(xReq); - int major = stuff->reqType; - ExtensionEntry *ext = GetExtensionEntry(major); - XaceExtAccessRec rec = { client, ext, DixUseAccess, Success }; - - if (!ext || !ProcVector[major]) - return BadRequest; - - /* call callbacks and return result, if any. */ - CallCallbacks(&XaceHooks[XACE_EXT_DISPATCH], &rec); - - if (rec.status != Success) - return BadRequest; /* pretend extension doesn't exist */ - - return client->swapped ? - (* SwappedProcVector[major])(client) : - (* ProcVector[major])(client); -} - - -/* SecurityClientStateCallback - * - * Arguments: - * pcbl is &ClientStateCallback. - * nullata is NULL. - * calldata is a pointer to a NewClientInfoRec (include/dixstruct.h) - * which contains information about client state changes. - * - * Returns: nothing. - * - * Side Effects: - * - * If a new client is connecting, its authorization ID is copied to - * client->authID. If this is a generated authorization, its reference - * count is bumped, its timer is cancelled if it was running, and its - * trustlevel is copied to TRUSTLEVEL(client). - * - * If a client is disconnecting and the client was using a generated - * authorization, the authorization's reference count is decremented, and - * if it is now zero, the timer for this authorization is started. - */ - -static void -XaceClientStateCallback( - CallbackListPtr *pcbl, - pointer nulldata, - pointer calldata) -{ - NewClientInfoRec *pci = (NewClientInfoRec *)calldata; - ClientPtr client = pci->client; - - switch (client->clientState) - { - case ClientStateRunning: - { - client->requestVector = client->swapped ? - SwappedUntrustedProcVector : UntrustedProcVector; - break; - } - default: break; - } -} /* XaceClientStateCallback */ - /* XaceExtensionInit * * Initialize the XACE Extension */ void XaceExtensionInit(INITARGS) { - ExtensionEntry *extEntry; - int i; - - if (!AddCallback(&ClientStateCallback, XaceClientStateCallback, NULL)) - return; - - /* initialize dispatching intercept functions */ - for (i = 0; i < 128; i++) - { - UntrustedProcVector[i] = XaceCatchDispatchProc; - SwappedUntrustedProcVector[i] = XaceCatchDispatchProc; - } - for (i = 128; i < 256; i++) - { - UntrustedProcVector[i] = XaceCatchExtProc; - SwappedUntrustedProcVector[i] = XaceCatchExtProc; - } } /* XaceCensorImage diff --git a/Xext/xace.h b/Xext/xace.h index fdf91d159..a8fac98e2 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -65,8 +65,8 @@ extern int XaceHook( /* Special-cased hook functions */ +extern int XaceHookDispatch(ClientPtr ptr, int major); extern void XaceHookAuditEnd(ClientPtr ptr, int result); -extern void XaceHookAuditBegin(ClientPtr ptr); /* Register a callback for a given hook. */ @@ -101,13 +101,13 @@ extern void XaceCensorImage( #ifdef __GNUC__ #define XaceHook(args...) Success +#define XaceHookDispatch(args...) Success #define XaceHookAuditEnd(args...) { ; } -#define XaceHookAuditBegin(args...) { ; } #define XaceCensorImage(args...) { ; } #else #define XaceHook(...) Success +#define XaceHookDispatch(...) Success #define XaceHookAuditEnd(...) { ; } -#define XaceHookAuditBegin(...) { ; } #define XaceCensorImage(...) { ; } #endif diff --git a/dix/dispatch.c b/dix/dispatch.c index 004509caa..663bf7dd5 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -463,8 +463,9 @@ Dispatch(void) if (result > (maxBigRequestSize << 2)) result = BadLength; else { - XaceHookAuditBegin(client); - result = (* client->requestVector[MAJOROP])(client); + result = XaceHookDispatch(client, MAJOROP); + if (result == Success) + result = (* client->requestVector[MAJOROP])(client); XaceHookAuditEnd(client, result); } #ifdef XSERVER_DTRACE From f6a78ee143e3a3ad69538adf2b9675d724468ffa Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 25 Jan 2008 18:04:10 -0500 Subject: [PATCH 435/552] XACE: Remove the extension code entirely, XACE is completely static now. --- Xext/xace.c | 9 --------- Xext/xace.h | 1 - hw/xfree86/dixmods/extmod/modinit.h | 4 ---- mi/miinitext.c | 12 ------------ 4 files changed, 26 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 0b3baf6b1..0470e44dd 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -24,7 +24,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "scrnintstr.h" #include "xacestr.h" -#include "modinit.h" CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; @@ -222,14 +221,6 @@ int XaceHook(int hook, ...) return prv ? *prv : Success; } -/* XaceExtensionInit - * - * Initialize the XACE Extension - */ -void XaceExtensionInit(INITARGS) -{ -} - /* XaceCensorImage * * Called after pScreen->GetImage to prevent pieces or trusted windows from diff --git a/Xext/xace.h b/Xext/xace.h index a8fac98e2..4100ba16e 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -22,7 +22,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef XACE -#define XACE_EXTENSION_NAME "XAccessControlExtension" #define XACE_MAJOR_VERSION 2 #define XACE_MINOR_VERSION 0 diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index 99d714c4f..116cb2ef7 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -125,10 +125,6 @@ extern void ShmRegisterFuncs( ShmFuncsPtr funcs); #endif -#ifdef XACE -extern void XaceExtensionInit(INITARGS); -#endif - #ifdef XSELINUX extern void SELinuxExtensionInit(INITARGS); #endif diff --git a/mi/miinitext.c b/mi/miinitext.c index b14690756..30cbc7a25 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -244,9 +244,6 @@ typedef void (*InitExtension)(INITARGS); #define _XAG_SERVER_ #include #endif -#ifdef XACE -#include "xace.h" -#endif #ifdef XCSECURITY #include "securitysrv.h" #include @@ -323,9 +320,6 @@ extern void DbeExtensionInit(INITARGS); #ifdef XAPPGROUP extern void XagExtensionInit(INITARGS); #endif -#ifdef XACE -extern void XaceExtensionInit(INITARGS); -#endif #ifdef XCSECURITY extern void SecurityExtensionInit(INITARGS); #endif @@ -599,9 +593,6 @@ InitExtensions(argc, argv) #ifdef XAPPGROUP if (!noXagExtension) XagExtensionInit(); #endif -#ifdef XACE - XaceExtensionInit(); -#endif #ifdef XCSECURITY if (!noSecurityExtension) SecurityExtensionInit(); #endif @@ -696,9 +687,6 @@ static ExtensionModule staticExtensions[] = { #ifdef XAPPGROUP { XagExtensionInit, XAGNAME, &noXagExtension, NULL, NULL }, #endif -#ifdef XACE - { XaceExtensionInit, XACE_EXTENSION_NAME, NULL, NULL, NULL }, -#endif #ifdef XCSECURITY { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, #endif From e915a2639752bc0ea9e6e192e020cc2031c08063 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 25 Jan 2008 19:22:19 -0500 Subject: [PATCH 436/552] xselinux: Move the extension to extmod instead of being built-in. --- Xext/Makefile.am | 2 +- hw/xfree86/dixmods/extmod/modinit.c | 9 +++++++++ hw/xfree86/dixmods/extmod/modinit.h | 1 + mi/miinitext.c | 3 --- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Xext/Makefile.am b/Xext/Makefile.am index f57e59910..648736d95 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -76,7 +76,7 @@ endif # requires X-ACE extension XSELINUX_SRCS = xselinux.c xselinux.h if XSELINUX -BUILTIN_SRCS += $(XSELINUX_SRCS) +MODULE_SRCS += $(XSELINUX_SRCS) endif # Security extension: multi-level security to protect clients from each other diff --git a/hw/xfree86/dixmods/extmod/modinit.c b/hw/xfree86/dixmods/extmod/modinit.c index acd700694..d0d892aaf 100644 --- a/hw/xfree86/dixmods/extmod/modinit.c +++ b/hw/xfree86/dixmods/extmod/modinit.c @@ -38,6 +38,15 @@ static MODULESETUPPROTO(extmodSetup); * Array describing extensions to be initialized */ static ExtensionModule extensionModules[] = { +#ifdef XSELINUX + { + SELinuxExtensionInit, + SELINUX_EXTENSION_NAME, + NULL, + NULL, + NULL + }, +#endif #ifdef SHAPE { ShapeExtensionInit, diff --git a/hw/xfree86/dixmods/extmod/modinit.h b/hw/xfree86/dixmods/extmod/modinit.h index 116cb2ef7..3c2e2022a 100644 --- a/hw/xfree86/dixmods/extmod/modinit.h +++ b/hw/xfree86/dixmods/extmod/modinit.h @@ -127,6 +127,7 @@ extern void ShmRegisterFuncs( #ifdef XSELINUX extern void SELinuxExtensionInit(INITARGS); +#include "xselinux.h" #endif #if 1 diff --git a/mi/miinitext.c b/mi/miinitext.c index 30cbc7a25..261fac9fc 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -690,9 +690,6 @@ static ExtensionModule staticExtensions[] = { #ifdef XCSECURITY { SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL }, #endif -#ifdef XSELINUX - { SELinuxExtensionInit, SELINUX_EXTENSION_NAME, NULL, NULL, NULL }, -#endif #ifdef XPRINT { XpExtensionInit, XP_PRINTNAME, NULL, NULL, NULL }, #endif From 4fc2d3cef8d7868b025aa14af7ed4b730e8f2c49 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 28 Jan 2008 12:18:43 -0800 Subject: [PATCH 437/552] Rootless: RootlessEnsureFrame: Added check for !IsRoot This was causing an issue with Apple-DRI and was reported here: http://trac.macosforge.org/projects/xquartz/ticket/51 (cherry picked from commit 116800279d2ec783c63f43d3902627edde6a4cff) --- miext/rootless/rootlessWindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index b95339888..7285f959d 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -471,7 +471,7 @@ RootlessEnsureFrame(WindowPtr pWin) if (WINREC(pWin) != NULL) return WINREC(pWin); - if (!IsTopLevel(pWin)) + if (!IsTopLevel(pWin) && !IsRoot(pWin)) return NULL; if (pWin->drawable.class != InputOutput) From 2cb0ebec2b85d96289c23c17cfdcdf97ef6877d2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Jan 2008 11:48:13 +1030 Subject: [PATCH 438/552] config: add a debug message, fix a whitespace error. (cherry picked from commit 7732898aaa70e076000f6e6aa9420482896ed996) --- config/hal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/hal.c b/config/hal.c index 4ab296159..52a011333 100644 --- a/config/hal.c +++ b/config/hal.c @@ -105,7 +105,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name) char *prop, *ret; prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL); - DebugF(" [config/hal] getting %s on %s returned %s\n", name, udi, prop); + DebugF("[config/hal] getting %s on %s returned %s\n", name, udi, prop); if (prop) { ret = xstrdup(prop); libhal_free_string(prop); @@ -234,8 +234,9 @@ device_added(LibHalContext *hal_ctx, const char *udi) if (xkb_options) add_option(&options, "xkb_options", xkb_options); + DebugF("[config/hal] Adding device %s\n", name); if (NewInputDeviceRequest(options, &dev) != Success) { - DebugF("[config/hal] NewInputDeviceRequest failed\n"); + ErrorF("[config/hal] NewInputDeviceRequest failed\n"); dev = NULL; goto unwind; } From f0ba7707161b8866e6fde32d6f25be6afcdecb48 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Jan 2008 13:45:22 +1030 Subject: [PATCH 439/552] config: only shutdown libhal if the connection is valid. Thanks to libdbus' extensive use of assert we won't just get an error, it'll bring the whole server down for us. (cherry picked from commit fb07fab2c07e7b0834724541dc47bfba02ba8574) --- config/hal.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/config/hal.c b/config/hal.c index 52a011333..1575422c3 100644 --- a/config/hal.c +++ b/config/hal.c @@ -283,12 +283,14 @@ disconnect_hook(void *data) struct config_hal_info *info = data; if (info->hal_ctx) { - dbus_error_init(&error); - if (!libhal_ctx_shutdown(info->hal_ctx, &error)) - DebugF("[config/hal] couldn't shut down context: %s (%s)\n", - error.name, error.message); + if (dbus_connection_get_is_connected(info->system_bus)) { + dbus_error_init(&error); + if (!libhal_ctx_shutdown(info->hal_ctx, &error)) + DebugF("[config/hal] couldn't shut down context: %s (%s)\n", + error.name, error.message); + dbus_error_free(&error); + } libhal_ctx_free(info->hal_ctx); - dbus_error_free(&error); } info->hal_ctx = NULL; From 7dde5a694a06efed0a9186f05d33f5be6f5dba71 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 25 Jan 2008 13:54:47 +1030 Subject: [PATCH 440/552] config: check connection != NULL before getting dbus' dispatch status. (cherry picked from commit d23266522390a4ef7203ae7c062b2b920e45f9d7) --- config/dbus-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/dbus-core.c b/config/dbus-core.c index 9cf153076..b349c6e3c 100644 --- a/config/dbus-core.c +++ b/config/dbus-core.c @@ -56,8 +56,9 @@ wakeup_handler(pointer data, int err, pointer read_mask) if (info->connection && FD_ISSET(info->fd, (fd_set *) read_mask)) { do { dbus_connection_read_write_dispatch(info->connection, 0); - } while (dbus_connection_get_dispatch_status(info->connection) == - DBUS_DISPATCH_DATA_REMAINS); + } while (info->connection && + dbus_connection_get_is_connected(info->connection) && + dbus_connection_get_dispatch_status(info->connection) == DBUS_DISPATCH_DATA_REMAINS); } } From 975ab11799c819a81da1dfe83505194410dbcb95 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 26 Jan 2008 09:39:54 +1030 Subject: [PATCH 441/552] config: don't reset connection info on disconnect. If dbus is restarted, we try to connect again and this is difficult if the busname and/or busobject is not set. (cherry picked from commit 210eeef495770c1883c842ff003c28ce25f279d4) --- config/dbus.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/dbus.c b/config/dbus.c index f6ac4c11c..0be42afb6 100644 --- a/config/dbus.c +++ b/config/dbus.c @@ -396,9 +396,6 @@ err_start: static void disconnect_hook(void *data) { - struct connection_info *info = data; - - reset_info(info); } #if 0 @@ -440,4 +437,6 @@ void config_dbus_fini(void) { config_dbus_core_remove_hook(&core_hook); + connection_data.busname[0] = '\0'; + connection_data.busobject[0] = '\0'; } From 5b8641a5fdc112c19e78ca2954878712e328d403 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 29 Jan 2008 10:01:37 +1030 Subject: [PATCH 442/552] xfree86: fix AlwaysCore handling. (Bug #14256) Assume AlwaysCore being set by default, just like the other options. X.Org Bug 14256 --- hw/xfree86/common/xf86Xinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index cd0c30ac1..9a94c0487 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -115,7 +115,7 @@ _X_EXPORT void xf86ProcessCommonOptions(LocalDevicePtr local, pointer list) { - if (xf86SetBoolOption(list, "AlwaysCore", 0) || + if (!xf86SetBoolOption(list, "AlwaysCore", 1) || !xf86SetBoolOption(list, "SendCoreEvents", 1) || !xf86SetBoolOption(list, "CorePointer", 1) || !xf86SetBoolOption(list, "CoreKeyboard", 1)) { From 442838fcb3bf07ac57553ae5600d9e6c59a559bb Mon Sep 17 00:00:00 2001 From: Julien Goodwin Date: Sun, 27 Jan 2008 12:27:26 +1100 Subject: [PATCH 443/552] xorg.conf.man: Fix monitor/output confusion in monitor positioning On the Intel driver at least, LeftOf/RightOf/Above/Below in xorg.conf refers to output names, not monitor names. Fix nomenclature in xorg.conf.man. --- hw/xfree86/doc/man/xorg.conf.man.pre | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 1369a16c9..608ba37ed 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -1432,24 +1432,24 @@ This optional entry specifies the position of the monitor within the X screen. (RandR 1.2-supporting drivers only) .TP 7 -.BI "Option " "\*qLeftOf\*q " \*qmonitor\*q +.BI "Option " "\*qLeftOf\*q " \*qoutput\*q This optional entry specifies that the monitor should be positioned to the -left of the monitor of the given name. +left of the output (not monitor) of the given name. (RandR 1.2-supporting drivers only) .TP 7 -.BI "Option " "\*qRightOf\*q " \*qmonitor\*q +.BI "Option " "\*qRightOf\*q " \*qoutput\*q This optional entry specifies that the monitor should be positioned to the -right of the monitor of the given name. +right of the output (not monitor) of the given name. (RandR 1.2-supporting drivers only) .TP 7 -.BI "Option " "\*qAbove\*q " \*qmonitor\*q +.BI "Option " "\*qAbove\*q " \*qoutput\*q This optional entry specifies that the monitor should be positioned above the -monitor of the given name. +output (not monitor) of the given name. (RandR 1.2-supporting drivers only) .TP 7 -.BI "Option " "\*qBelow\*q " \*qmonitor\*q +.BI "Option " "\*qBelow\*q " \*qoutput\*q This optional entry specifies that the monitor should be positioned below the -monitor of the given name. +output (not monitor) of the given name. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option " "\*qEnable\*q " \*qbool\*q From 94f412cb7e954fe872fed979057cbdfbef953c6f Mon Sep 17 00:00:00 2001 From: Julien Goodwin Date: Sun, 27 Jan 2008 12:30:16 +1100 Subject: [PATCH 444/552] Loader: Fix verbosity confusion 'Loading foo' is verbosity 3, whereas 'already built-in' is verbosity 0. This means that gdm's log would just be full of bare 'module already built-in' messages. --- hw/xfree86/loader/loadmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 584cabfd1..45e9cb374 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -864,7 +864,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, for (cim = compiled_in_modules; *cim; cim++) if (!strcmp (module, *cim)) { - xf86MsgVerb(X_INFO, 0, "Module \"%s\" already built-in\n", module); + xf86MsgVerb(X_INFO, 3, "Module \"%s\" already built-in\n", module); return (ModuleDescPtr) 1; } From df325be394e1f75c396b2768f81373f2989aef7c Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Tue, 29 Jan 2008 09:47:00 -0800 Subject: [PATCH 445/552] Bug 13101: xorg-server has a typo in hw/xfree86/os-support/bsd/i386_video.c X.Org Bug #13101 Patch #12360 --- hw/xfree86/os-support/bsd/i386_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c index 42b905483..0dcff6631 100644 --- a/hw/xfree86/os-support/bsd/i386_video.c +++ b/hw/xfree86/os-support/bsd/i386_video.c @@ -602,7 +602,7 @@ cleanMTRR() #ifdef DEBUG ErrorF("Clean for (0x%lx,0x%lx)\n", (unsigned long)mrd[i].mr_base, - (unsigned long)rd[i].mr_len); + (unsigned long)mrd[i].mr_len); #endif if (mrd[i].mr_flags & MDF_FIXACTIVE) { mro.mo_arg[0] = MEMRANGE_SET_UPDATE; From d954f9c80348de294602d931d387e5cd1ef4b9a5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Jan 2008 10:39:54 +1030 Subject: [PATCH 446/552] xkb: don't update LEDs if they don't exist. (Bug #13961) In some weird cases we call this function when there is no SrvLedInfo on the device. And it turns out null-pointer dereferences are bad. X.Org Bug 13961 --- xkb/xkbLEDs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c index 2877af0c4..55ce12aad 100644 --- a/xkb/xkbLEDs.c +++ b/xkb/xkbLEDs.c @@ -63,6 +63,9 @@ XkbSrvLedInfoPtr sli; sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0); + if (!sli) + return update; + if (state_changes&(XkbModifierStateMask|XkbGroupStateMask)) update|= sli->usesEffective; if (state_changes&(XkbModifierBaseMask|XkbGroupBaseMask)) From 1692dcf197470d074f69d5af1608cb2ff1d08872 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Jan 2008 13:04:58 +1030 Subject: [PATCH 447/552] dix: print out event type if a bogus pointer event occurs. --- dix/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/events.c b/dix/events.c index 15aa16ed6..4a8e480c8 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3312,7 +3312,7 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count) deactivateGrab = TRUE; break; default: - FatalError("bogus pointer event from ddx"); + FatalError("bogus pointer event from ddx: %d", xE->u.u.type); } } else if (!CheckMotion(xE)) From c68f063be639f39c2facbb496e8455e8e3771b41 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Fri, 1 Feb 2008 14:13:29 +1030 Subject: [PATCH 448/552] xfree86: don't call xalloc from signal handlers when posting events. Reviewed-by: Peter Hutterer --- hw/xfree86/common/xf86Xinput.c | 69 ++++++++++++++++------------------ 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 9a94c0487..3e9a4796e 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -133,6 +133,11 @@ xf86ProcessCommonOptions(LocalDevicePtr local, /* Backwards compatibility. */ local->history_size = GetMotionHistorySize(); + /* Preallocate xEvent store */ + if (!xf86Events) + xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + if (!xf86Events) + FatalError("Couldn't allocate event store\n"); } /*********************************************************************** @@ -461,6 +466,8 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) * convenient functions to post events */ +#define MAX_VALUATORS 36 /* XXX from comment in dix/getevents.c */ + _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, @@ -470,17 +477,12 @@ xf86PostMotionEvent(DeviceIntPtr device, { va_list var; int i = 0; - static int *valuators = NULL; - static int n_valuators = 0; + static int valuators[MAX_VALUATORS]; - if (num_valuators > n_valuators) { - xfree (valuators); - valuators = NULL; - } - - if (!valuators) { - valuators = xcalloc(sizeof(int), num_valuators); - n_valuators = num_valuators; + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; } va_start(var, num_valuators); @@ -529,9 +531,7 @@ xf86PostMotionEventP(DeviceIntPtr device, #endif if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); + FatalError("Didn't allocate event store\n"); nevents = GetPointerEvents(xf86Events, device, MotionNotify, 0, flags, first_valuator, num_valuators, @@ -555,9 +555,15 @@ xf86PostProximityEvent(DeviceIntPtr device, ...) { va_list var; - int i, nevents, *valuators = NULL; + int i, nevents; + int valuators[MAX_VALUATORS]; - valuators = xcalloc(sizeof(int), num_valuators); + + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; + } va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) @@ -565,9 +571,7 @@ xf86PostProximityEvent(DeviceIntPtr device, va_end(var); if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); + FatalError("Didn't allocate event store\n"); nevents = GetProximityEvents(xf86Events, device, is_in ? ProximityIn : ProximityOut, @@ -575,7 +579,6 @@ xf86PostProximityEvent(DeviceIntPtr device, for (i = 0; i < nevents; i++) mieqEnqueue(device, xf86Events + i); - xfree(valuators); } _X_EXPORT void @@ -588,7 +591,7 @@ xf86PostButtonEvent(DeviceIntPtr device, ...) { va_list var; - int *valuators = NULL; + int valuators[MAX_VALUATORS]; int i = 0, nevents = 0; int index; @@ -599,18 +602,19 @@ xf86PostButtonEvent(DeviceIntPtr device, return; } #endif + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; + } - valuators = xcalloc(sizeof(int), num_valuators); - va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuators[i] = va_arg(var, int); va_end(var); if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); + FatalError("Didn't allocate event store\n"); nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, @@ -620,8 +624,6 @@ xf86PostButtonEvent(DeviceIntPtr device, for (i = 0; i < nevents; i++) mieqEnqueue(device, xf86Events + i); - - xfree(valuators); } _X_EXPORT void @@ -634,7 +636,8 @@ xf86PostKeyEvent(DeviceIntPtr device, ...) { va_list var; - int i = 0, nevents = 0, *valuators = NULL; + int i = 0, nevents = 0; + static int valuators[MAX_VALUATORS]; /* instil confidence in the user */ DebugF("this function has never been tested properly. if things go quite " @@ -642,12 +645,9 @@ xf86PostKeyEvent(DeviceIntPtr device, "broken.\n"); if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); + FatalError("Didn't allocate event store\n"); if (is_absolute) { - valuators = xcalloc(sizeof(int), num_valuators); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuators[i] = va_arg(var, int); @@ -657,7 +657,6 @@ xf86PostKeyEvent(DeviceIntPtr device, is_down ? KeyPress : KeyRelease, key_code, first_valuator, num_valuators, valuators); - xfree(valuators); } else { nevents = GetKeyboardEvents(xf86Events, device, @@ -686,9 +685,7 @@ xf86PostKeyboardEvent(DeviceIntPtr device, #endif if (!xf86Events) - xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum()); - if (!xf86Events) - FatalError("Couldn't allocate event store\n"); + FatalError("Didn't allocate event store\n"); nevents = GetKeyboardEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, key_code); From 10617dc0fb7166ccd5b2e92fa708390c2d7d0d27 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 1 Feb 2008 14:24:04 +1030 Subject: [PATCH 449/552] xfree86: stick two more checks in for num_valuators < MAX_VALUATORS --- hw/xfree86/common/xf86Xinput.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 3e9a4796e..eafc0e9a0 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -507,6 +507,12 @@ xf86PostMotionEventP(DeviceIntPtr device, int index; int flags = 0; + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; + } + if (is_absolute) flags = POINTER_ABSOLUTE; else @@ -644,6 +650,12 @@ xf86PostKeyEvent(DeviceIntPtr device, "badly south after this message, then xf86PostKeyEvent is " "broken.\n"); + if (num_valuators > MAX_VALUATORS) { + xf86Msg(X_ERROR, "xf86PostMotionEvent: num_valuator %d" + " is greater than MAX_VALUATORS\n", num_valuators); + return; + } + if (!xf86Events) FatalError("Didn't allocate event store\n"); From 521a7f26e088029707fb9a2bb80c9ddc734a3f8b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Feb 2008 18:34:31 +1030 Subject: [PATCH 450/552] mi: Only UpdateSpriteForScreen if we actually changed the screen. (Bug #12650) X.Org Bug 12650 --- mi/mipointer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mi/mipointer.c b/mi/mipointer.c index 2c3c68913..b55e68bf0 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -231,10 +231,14 @@ miPointerWarpCursor (pScreen, x, y) ScreenPtr pScreen; int x, y; { + BOOL changedScreen = FALSE; SetupScreen (pScreen); if (miPointer.pScreen != pScreen) + { (*pScreenPriv->screenFuncs->NewEventScreen) (pScreen, TRUE); + changedScreen = TRUE; + } if (GenerateEvent) { @@ -255,7 +259,9 @@ miPointerWarpCursor (pScreen, x, y) miPointer.y = y; miPointer.pScreen = pScreen; } - UpdateSpriteForScreen (pScreen) ; + + if (changedScreen) + UpdateSpriteForScreen (pScreen) ; } /* From 41991fb991313202e8e6b513fe928ba14f8fcb87 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 5 Feb 2008 16:01:56 +1030 Subject: [PATCH 451/552] xkb: when copying sections, make sure num_rows is set too. --- xkb/xkbUtils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 1fb47ed56..9f813e5e3 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1806,6 +1806,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) return FALSE; dsection->rows = tmp; } + dsection->num_rows = ssection->num_rows; for (j = 0, srow = ssection->rows, drow = dsection->rows; j < ssection->num_rows; j++, srow++, drow++) { From 12e532403210c15a25200ef448bfe9701735ab20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Sat, 2 Feb 2008 22:44:31 +0100 Subject: [PATCH 452/552] dix: Always add valuator information if present Send valuator information for all event types, not only for MotionEvents and absolute button events. --- dix/getevents.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 12cb950b2..94cbd1553 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -525,9 +525,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, int num_events = 0, final_valuator = 0; CARD32 ms = 0; deviceKeyButtonPointer *kbp = NULL; - /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies - * with DeviceValuators. */ - Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); DeviceIntPtr cp = inputInfo.pointer; int x = 0, y = 0; Bool coreOnly = (pDev == inputInfo.pointer); @@ -553,7 +550,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, return 0; /* Do we need to send a DeviceValuator event? */ - if (!coreOnly && sendValuators) { + if (!coreOnly && num_valuators) { if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) num_valuators = MAX_VALUATOR_EVENTS * 6; num_events += ((num_valuators - 1) / 6) + 1; @@ -684,7 +681,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, kbp->root_y = y; events++; - if (sendValuators) { + if (num_valuators) { kbp->deviceid |= MORE_EVENTS; clipValuators(pDev, first_valuator, num_valuators, valuators); events = getValuatorEvents(events, pDev, first_valuator, From f04c0838699f1a733735838e74cfbb1677b15dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Sat, 2 Feb 2008 22:45:31 +0100 Subject: [PATCH 453/552] Bug # 10324: dix: Allow arbitrary value ranges in GetPointerEvents Don't use a possitive value as a marker for if a max-value is defined on the valuators. Use the existence of a valid value range instead. This will also make it possible to define arbitrary start and end-values for min and max as long as min < max. --- dix/getevents.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index 94cbd1553..ea1c764f2 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -308,10 +308,13 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val) { AxisInfoPtr axes = pDev->valuator->axes + axisNum; - if (*val < axes->min_value) - *val = axes->min_value; - if (axes->max_value >= 0 && *val > axes->max_value) - *val = axes->max_value; + /* No clipping if the value-range <= 0 */ + if(axes->min_value < axes->min_value) { + if (*val < axes->min_value) + *val = axes->min_value; + if (*val > axes->max_value) + *val = axes->max_value; + } } /** From d9e23c4ff1607a62164b34717ef9afd352ce2b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Sat, 2 Feb 2008 22:57:32 +0100 Subject: [PATCH 454/552] Bug # 10324: dix: Add scaling of X and Y on the reported pointer-events Restore the rescaling code for x and y axis when generating motion events. --- dix/getevents.c | 97 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 76 insertions(+), 21 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index ea1c764f2..c2736e4a3 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -531,6 +531,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, DeviceIntPtr cp = inputInfo.pointer; int x = 0, y = 0; Bool coreOnly = (pDev == inputInfo.pointer); + ScreenPtr scr = miPointerGetScreen(pDev); /* Sanity checks. */ if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) @@ -574,20 +575,39 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, x = valuators[0]; } else { - if (pDev->coreEvents) - x = cp->valuator->lastx; - else - x = pDev->valuator->lastx; + /* If we're sending core events but didn't provide a value, + * translate the core value (but use the device coord if + * it translates to the same coord to preserve sub-pixel + * coord information). If we're not sending core events use + * whatever value we have */ + x = pDev->valuator->lastx; + if(pDev->coreEvents) { + int min = pDev->valuator->axes[0].min_value; + int max = pDev->valuator->axes[0].max_value; + if(min < max) { + if((int)((float)(x-min)*scr->width/(max-min+1)) != cp->valuator->lastx) + x = (int)((float)(cp->valuator->lastx)*(max-min+1)/scr->width)+min; + } + else + x = cp->valuator->lastx; + } } if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { y = valuators[1 - first_valuator]; } else { - if (pDev->coreEvents) - y = cp->valuator->lasty; - else - y = pDev->valuator->lasty; + y = pDev->valuator->lasty; + if(pDev->coreEvents) { + int min = pDev->valuator->axes[1].min_value; + int max = pDev->valuator->axes[1].max_value; + if(min < max) { + if((int)((float)(y-min)*scr->height/(max-min+1)) != cp->valuator->lasty) + y = (int)((float)(cp->valuator->lasty)*(max-min+1)/scr->height)+min; + } + else + y = cp->valuator->lasty; + } } } else { @@ -596,15 +616,35 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, valuators); if (pDev->coreEvents) { - if (first_valuator == 0 && num_valuators >= 1) - x = cp->valuator->lastx + valuators[0]; + /* Get and convert the core pointer coordinate space into + * device coordinates. Use the device coords if it translates + * into the same position as the core to preserve relative sub- + * pixel movements from the device. */ + int min = pDev->valuator->axes[0].min_value; + int max = pDev->valuator->axes[0].max_value; + if(min < max) { + x = pDev->valuator->lastx; + if((int)((float)(x-min)*scr->width/(max-min+1)) != cp->valuator->lastx) + x = (int)((float)(cp->valuator->lastx)*(max-min+1)/scr->width)+min; + } else x = cp->valuator->lastx; - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y = cp->valuator->lasty + valuators[1 - first_valuator]; + min = pDev->valuator->axes[1].min_value; + max = pDev->valuator->axes[1].max_value; + if(min < max) { + y = pDev->valuator->lasty; + if((int)((float)(y-min)*scr->height/(max-min+1)) != cp->valuator->lasty) + y = (int)((float)(cp->valuator->lasty)*(max-min+1)/scr->height)+min; + } else y = cp->valuator->lasty; + + /* Add relative movement */ + if (first_valuator == 0 && num_valuators >= 1) + x += valuators[0]; + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + y += valuators[1 - first_valuator]; } else { if (first_valuator == 0 && num_valuators >= 1) @@ -623,11 +663,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, clipAxis(pDev, 0, &x); clipAxis(pDev, 1, &y); - /* This takes care of crossing screens for us, as well as clipping - * to the current screen. Right now, we only have one history buffer, - * so we don't set this for both the device and core.*/ - miPointerSetPosition(pDev, &x, &y, ms); - /* Drop x and y back into the valuators list, if they were originally * present. */ if (first_valuator == 0 && num_valuators >= 1) @@ -637,12 +672,32 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); + pDev->valuator->lastx = x; + pDev->valuator->lasty = y; + /* Convert the dev coord back to screen coord if we're + * sending core events */ + if (pDev->coreEvents) { + int min = pDev->valuator->axes[0].min_value; + int max = pDev->valuator->axes[0].max_value; + if(min < max) + x = (int)((float)(x-min)*scr->width/(max-min+1)); + cp->valuator->lastx = x; + min = pDev->valuator->axes[1].min_value; + max = pDev->valuator->axes[1].max_value; + if(min < max) + y = (int)((float)(y-min)*scr->height/(max-min+1)); + cp->valuator->lasty = y; + } + + /* This takes care of crossing screens for us, as well as clipping + * to the current screen. Right now, we only have one history buffer, + * so we don't set this for both the device and core.*/ + miPointerSetPosition(pDev, &x, &y, ms); + if (pDev->coreEvents) { cp->valuator->lastx = x; cp->valuator->lasty = y; } - pDev->valuator->lastx = x; - pDev->valuator->lasty = y; /* for some reason inputInfo.pointer does not have coreEvents set */ if (coreOnly || pDev->coreEvents) { @@ -680,8 +735,8 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, kbp->detail = pDev->button->map[buttons]; } - kbp->root_x = x; - kbp->root_y = y; + kbp->root_x = pDev->valuator->lastx; + kbp->root_y = pDev->valuator->lasty; events++; if (num_valuators) { From a0284d577aabea8406b72dd63773e341430ebe56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Sat, 2 Feb 2008 23:03:51 +0100 Subject: [PATCH 455/552] dix: Skip call to clipAxis for relative core-events Relative events that generates both core and extention events will have its axis cliped and screen changed by miPointerSetPosition when the events are processed. For absolute and non core-generating relative events the axis must be clipped if we shouldn't end up completely outside the defined ranges (if any). --- dix/getevents.c | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index c2736e4a3..bc64d318c 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -609,6 +609,10 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, y = cp->valuator->lasty; } } + + /* Clip both x and y to the defined limits (usually co-ord space limit). */ + clipAxis(pDev, 0, &x); + clipAxis(pDev, 1, &y); } else { if (flags & POINTER_ACCELERATE) @@ -647,22 +651,22 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, y += valuators[1 - first_valuator]; } else { + x = pDev->valuator->lastx; + y = pDev->valuator->lasty; if (first_valuator == 0 && num_valuators >= 1) - x = pDev->valuator->lastx + valuators[0]; - else - x = pDev->valuator->lastx; - + x += valuators[0]; if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - y = pDev->valuator->lasty + valuators[1 - first_valuator]; - else - y = pDev->valuator->lasty; + y += valuators[1 - first_valuator]; + + if(!coreOnly) { + /* Since we're not sending core-events we must clip both x and y + * to the defined limits so we don't run outside the box. */ + clipAxis(pDev, 0, &x); + clipAxis(pDev, 1, &y); + } } } - /* Clip both x and y to the defined limits (usually co-ord space limit). */ - clipAxis(pDev, 0, &x); - clipAxis(pDev, 1, &y); - /* Drop x and y back into the valuators list, if they were originally * present. */ if (first_valuator == 0 && num_valuators >= 1) @@ -695,6 +699,24 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, miPointerSetPosition(pDev, &x, &y, ms); if (pDev->coreEvents) { + /* miPointerSetPosition may have changed screen */ + scr = miPointerGetScreen(pDev); + if(x != cp->valuator->lastx) { + int min = pDev->valuator->axes[0].min_value; + int max = pDev->valuator->axes[0].max_value; + cp->valuator->lastx = pDev->valuator->lastx = x; + if(min < max) + pDev->valuator->lastx = (int)((float)(x)*(max-min+1)/scr->width)+min; + } + if(y != cp->valuator->lasty) { + int min = pDev->valuator->axes[1].min_value; + int max = pDev->valuator->axes[1].max_value; + cp->valuator->lasty = pDev->valuator->lasty = y; + if(min < max) + pDev->valuator->lasty = (int)((float)(y)*(max-min+1)/scr->height)+min; + } + } + else if (coreOnly) { cp->valuator->lastx = x; cp->valuator->lasty = y; } From a56ef7aaa4b6ac13c8181f68fc7dad3ca89e6973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Vigerl=C3=B6f?= Date: Sat, 2 Feb 2008 23:04:46 +0100 Subject: [PATCH 456/552] dix: Move motion history update until after screen crossing and clipping Cross screen and clip the coordinates before updating the motion history so that it will have the same contents as the events that are reported. --- dix/getevents.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index bc64d318c..3e6fe5ae0 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -667,15 +667,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, } } - /* Drop x and y back into the valuators list, if they were originally - * present. */ - if (first_valuator == 0 && num_valuators >= 1) - valuators[0] = x; - if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) - valuators[1 - first_valuator] = y; - - updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); - pDev->valuator->lastx = x; pDev->valuator->lasty = y; /* Convert the dev coord back to screen coord if we're @@ -721,6 +712,15 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, cp->valuator->lasty = y; } + /* Drop x and y back into the valuators list, if they were originally + * present. */ + if (first_valuator == 0 && num_valuators >= 1) + valuators[0] = pDev->valuator->lastx; + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + valuators[1 - first_valuator] = pDev->valuator->lasty; + + updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); + /* for some reason inputInfo.pointer does not have coreEvents set */ if (coreOnly || pDev->coreEvents) { events->u.u.type = type; From 4b5b6e7baab58072a983d2ec136965f404c3a74a Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 5 Feb 2008 10:54:10 +0800 Subject: [PATCH 457/552] fix max clock unit max clock from EDID data is in MHz, while we need KHz to validate modes. --- hw/xfree86/modes/xf86Crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 10db86267..da035f2b9 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1362,8 +1362,8 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) if (sync_source == sync_default) sync_source = sync_edid; } - if (ranges->max_clock > max_clock) - max_clock = ranges->max_clock; + if (ranges->max_clock * 1000 > max_clock) + max_clock = ranges->max_clock * 1000; } } } From d3c36fe721edc55636438bc3e0e7a6c03f62784e Mon Sep 17 00:00:00 2001 From: liuhong Date: Tue, 5 Feb 2008 10:54:58 +0800 Subject: [PATCH 458/552] validate mode clock for probed modes Some modes claimed in monitor EDID data may not be supported by the monitor. So also validating the max clock for probed modes. --- hw/xfree86/modes/xf86Crtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index da035f2b9..4ecf4b3d7 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1410,9 +1410,12 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) /* * Check default modes against monitor max clock */ - if (max_clock) + if (max_clock) { xf86ValidateModesClocks(scrn, default_modes, &min_clock, &max_clock, 1); + xf86ValidateModesClocks(scrn, output_modes, + &min_clock, &max_clock, 1); + } output->probed_modes = NULL; output->probed_modes = xf86ModesAdd (output->probed_modes, config_modes); From 019ad5acd20e34dc2aa3b89cc426138db5164c48 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 5 Feb 2008 15:44:41 -0500 Subject: [PATCH 459/552] XFixes: squash a pointer/integer size mismatch warning. --- xfixes/cursor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 1d122faea..d51251f19 100755 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -707,7 +707,8 @@ SProcXFixesChangeCursor (ClientPtr client) static Bool TestForCursorName (CursorPtr pCursor, pointer closure) { - return (pCursor->name == (Atom) closure); + Atom *pName = closure; + return (pCursor->name == *pName); } int @@ -724,7 +725,7 @@ ProcXFixesChangeCursorByName (ClientPtr client) tchar = (char *) &stuff[1]; name = MakeAtom (tchar, stuff->nbytes, FALSE); if (name) - ReplaceCursor (pSource, TestForCursorName, (pointer) name); + ReplaceCursor (pSource, TestForCursorName, &name); return (client->noClientException); } From bb1a577a6822f781f1e38d2434a13914e74f89aa Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 5 Feb 2008 20:07:08 -0500 Subject: [PATCH 460/552] XACE: Move the property access hook to its own function. --- Xext/xace.c | 20 ++++++++------------ Xext/xace.h | 6 ++++++ Xext/xselinux.c | 2 +- dix/property.c | 16 +++++++--------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index 0470e44dd..9ffac450d 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -51,6 +51,14 @@ int XaceHookDispatch(ClientPtr client, int major) } } +int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin, + PropertyPtr pProp, Mask access_mode) +{ + XacePropertyAccessRec rec = { client, pWin, pProp, access_mode, Success }; + CallCallbacks(&XaceHooks[XACE_PROPERTY_ACCESS], &rec); + return rec.status; +} + void XaceHookAuditEnd(ClientPtr ptr, int result) { XaceAuditRec rec = { ptr, result }; @@ -100,18 +108,6 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_PROPERTY_ACCESS: { - XacePropertyAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, WindowPtr), - va_arg(ap, PropertyPtr), - va_arg(ap, Mask), - Success /* default allow */ - }; - calldata = &rec; - prv = &rec.status; - break; - } case XACE_SEND_ACCESS: { XaceSendAccessRec rec = { va_arg(ap, ClientPtr), diff --git a/Xext/xace.h b/Xext/xace.h index 4100ba16e..24b9dce68 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -27,6 +27,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "pixmap.h" /* for DrawablePtr */ #include "regionstr.h" /* for RegionPtr */ +#include "window.h" /* for WindowPtr */ +#include "property.h" /* for PropertyPtr */ /* Default window background */ #define XaceBackgroundNoneState None @@ -65,6 +67,8 @@ extern int XaceHook( /* Special-cased hook functions */ extern int XaceHookDispatch(ClientPtr ptr, int major); +extern int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, + PropertyPtr pProp, Mask access_mode); extern void XaceHookAuditEnd(ClientPtr ptr, int result); /* Register a callback for a given hook. @@ -101,11 +105,13 @@ extern void XaceCensorImage( #ifdef __GNUC__ #define XaceHook(args...) Success #define XaceHookDispatch(args...) Success +#define XaceHookPropertyAccess(args...) Success #define XaceHookAuditEnd(args...) { ; } #define XaceCensorImage(args...) { ; } #else #define XaceHook(...) Success #define XaceHookDispatch(...) Success +#define XaceHookPropertyAccess(...) Success #define XaceHookAuditEnd(...) { ; } #define XaceCensorImage(...) { ; } #endif diff --git a/Xext/xselinux.c b/Xext/xselinux.c index a6e27e695..47383a4a9 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1166,7 +1166,7 @@ ProcSELinuxGetPropertyContext(ClientPtr client) if (!pProp) return BadValue; - rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, DixGetAttrAccess); + rc = XaceHookPropertyAccess(client, pWin, pProp, DixGetAttrAccess); if (rc != Success) return rc; diff --git a/dix/property.c b/dix/property.c index 3c0eaf1c9..ce6116992 100644 --- a/dix/property.c +++ b/dix/property.c @@ -156,8 +156,8 @@ ProcRotateProperties(ClientPtr client) xfree(props); return BadMatch; } - rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, - DixReadAccess|DixWriteAccess); + rc = XaceHookPropertyAccess(client, pWin, pProp, + DixReadAccess|DixWriteAccess); if (rc != Success) { xfree(props); client->errorValue = atoms[i]; @@ -276,8 +276,8 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, memmove((char *)data, (char *)value, totalSize); pProp->size = len; pProp->devPrivates = NULL; - rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, - DixCreateAccess|DixWriteAccess); + rc = XaceHookPropertyAccess(pClient, pWin, pProp, + DixCreateAccess|DixWriteAccess); if (rc != Success) { xfree(data); xfree(pProp); @@ -289,8 +289,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, } else { - rc = XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, - DixWriteAccess); + rc = XaceHookPropertyAccess(pClient, pWin, pProp, DixWriteAccess); if (rc != Success) { pClient->errorValue = property; return rc; @@ -382,8 +381,7 @@ DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName) } if (pProp) { - rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, - DixDestroyAccess); + rc = XaceHookPropertyAccess(client, pWin, pProp, DixDestroyAccess); if (rc != Success) return rc; @@ -502,7 +500,7 @@ ProcGetProperty(ClientPtr client) if (stuff->delete) access_mode |= DixDestroyAccess; - rc = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, access_mode); + rc = XaceHookPropertyAccess(client, pWin, pProp, access_mode); if (rc != Success) { client->errorValue = stuff->property; return rc; From 5c30327275509576b7848a5f842e7a1bffabe980 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 5 Feb 2008 21:06:05 -0500 Subject: [PATCH 461/552] XACE: Push the dix "structure" includes down to the security modules. --- Xext/security.c | 3 +++ Xext/xace.c | 4 ++++ Xext/xace.h | 8 ++++---- Xext/xacestr.h | 9 ++++----- Xext/xselinux.c | 17 +++++++++++------ 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 6aab3a342..069655964 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -29,6 +29,9 @@ in this Software without prior written authorization from The Open Group. #endif #include "scrnintstr.h" +#include "inputstr.h" +#include "windowstr.h" +#include "propertyst.h" #include "colormapst.h" #include "privates.h" #include "registry.h" diff --git a/Xext/xace.c b/Xext/xace.c index 9ffac450d..b2c7e4ab4 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -23,6 +23,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "scrnintstr.h" +#include "extnsionst.h" +#include "pixmapstr.h" +#include "regionstr.h" +#include "gcstruct.h" #include "xacestr.h" CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; diff --git a/Xext/xace.h b/Xext/xace.h index 24b9dce68..6f1f267ad 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -25,10 +25,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_MAJOR_VERSION 2 #define XACE_MINOR_VERSION 0 -#include "pixmap.h" /* for DrawablePtr */ -#include "regionstr.h" /* for RegionPtr */ -#include "window.h" /* for WindowPtr */ -#include "property.h" /* for PropertyPtr */ +#include "pixmap.h" +#include "region.h" +#include "window.h" +#include "property.h" /* Default window background */ #define XaceBackgroundNoneState None diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 045f8364f..e31d4246a 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -20,13 +20,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef _XACESTR_H #define _XACESTR_H -#include "dixstruct.h" +#include "dix.h" #include "resource.h" #include "extnsionst.h" -#include "gcstruct.h" -#include "windowstr.h" -#include "inputstr.h" -#include "propertyst.h" +#include "window.h" +#include "input.h" +#include "property.h" #include "selection.h" #include "xace.h" diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 47383a4a9..b3d938b0a 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -22,21 +22,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * All rights reserved. */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include + #include #include #include #include -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - #include #include "resource.h" #include "privates.h" #include "registry.h" #include "dixstruct.h" +#include "inputstr.h" +#include "windowstr.h" +#include "propertyst.h" #include "extnsionst.h" #include "scrnintstr.h" #include "selection.h" @@ -46,8 +53,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define TRANS_SERVER #include #include "../os/osdep.h" -#include -#include #include "modinit.h" From 2259b144f0fd4855085a656111a0c64246733e78 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 7 Feb 2008 14:35:02 -0500 Subject: [PATCH 462/552] xselinux: Add getattr and setattr to the permission map for properties. --- Xext/xselinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index b3d938b0a..c7ab8d095 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -127,7 +127,7 @@ static struct security_class_mapping map[] = { { "x_gc", { "", "", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_font", { "", "", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_glyph", "remove_glyph", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_colormap", { "read", "write", "destroy", "create", "getattr", "", "", "", "", "", "", "", "add_color", "remove_color", "", "", "", "", "", "", "install", "uninstall", "", "", "use", NULL }}, - { "x_property", { "read", "write", "destroy", "create", NULL }}, + { "x_property", { "read", "write", "destroy", "create", "getattr", "setattr", NULL }}, { "x_selection", { "read", "", "", "", "getattr", "setattr", NULL }}, { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }}, From 6dcb7d732bfeadc214228d68c5a13eef30248eb1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 7 Feb 2008 16:00:52 -0500 Subject: [PATCH 463/552] xselinux: Split devPrivate state into subject and object records. --- Xext/xselinux.c | 236 ++++++++++++++++++++++++++++++------------------ 1 file changed, 149 insertions(+), 87 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index c7ab8d095..60f0cc88f 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -61,7 +61,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* private state record */ -static DevPrivateKey stateKey = &stateKey; +static DevPrivateKey subjectKey = &subjectKey; +static DevPrivateKey objectKey = &objectKey; /* This is what we store for security state */ typedef struct { @@ -69,7 +70,12 @@ typedef struct { struct avc_entry_ref aeref; char *command; int privileged; -} SELinuxStateRec; +} SELinuxSubjectRec; + +typedef struct { + security_id_t sid; + int poly; +} SELinuxObjectRec; /* selection manager */ typedef struct { @@ -155,7 +161,7 @@ static pointer truep = (pointer)1; * Looks up the SID corresponding to the given selection atom */ static int -SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return) +SELinuxSelectionToSID(Atom selection, SELinuxObjectRec *sid_return) { const char *name; unsigned i, size; @@ -202,7 +208,7 @@ SELinuxSelectionToSID(Atom selection, SELinuxStateRec *sid_return) */ static int SELinuxEventToSID(unsigned type, security_id_t sid_of_window, - SELinuxStateRec *sid_return) + SELinuxObjectRec *sid_return) { const char *name = LookupEventName(type); security_context_t con; @@ -293,7 +299,7 @@ SELinuxTypeToClass(RESTYPE type) * Performs an SELinux permission check. */ static int -SELinuxDoCheck(SELinuxStateRec *subj, SELinuxStateRec *obj, +SELinuxDoCheck(SELinuxSubjectRec *subj, SELinuxObjectRec *obj, security_class_t class, Mask mode, SELinuxAuditRec *auditdata) { /* serverClient requests OK */ @@ -321,11 +327,14 @@ static void SELinuxLabelClient(ClientPtr client) { XtransConnInfo ci = ((OsCommPtr)client->osPrivate)->trans_conn; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; security_context_t ctx; - state = dixLookupPrivate(&client->devPrivates, stateKey); - sidput(state->sid); + subj = dixLookupPrivate(&client->devPrivates, subjectKey); + sidput(subj->sid); + obj = dixLookupPrivate(&client->devPrivates, objectKey); + sidput(obj->sid); if (_XSERVTransIsLocal(ci)) { int fd = _XSERVTransGetConnectionNumber(ci); @@ -354,12 +363,12 @@ SELinuxLabelClient(ClientPtr client) if (bytes <= 0) goto finish; - state->command = xalloc(bytes); - if (!state->command) + subj->command = xalloc(bytes); + if (!subj->command) goto finish; - memcpy(state->command, path, bytes); - state->command[bytes - 1] = 0; + memcpy(subj->command, path, bytes); + subj->command[bytes - 1] = 0; } else /* For remote clients, need to use a default context */ if (selabel_lookup(label_hnd, &ctx, NULL, SELABEL_X_CLIENT) < 0) @@ -368,10 +377,12 @@ SELinuxLabelClient(ClientPtr client) finish: /* Get a SID from the context */ - if (avc_context_to_sid(ctx, &state->sid) < 0) + if (avc_context_to_sid(ctx, &subj->sid) < 0) FatalError("Client %d: context_to_sid(%s) failed\n", client->index, ctx); + sidget(subj->sid); + obj->sid = subj->sid; freecon(ctx); } @@ -383,23 +394,27 @@ SELinuxLabelInitial(void) { int i; XaceScreenAccessRec srec; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; security_context_t ctx; pointer unused; /* Do the serverClient */ - state = dixLookupPrivate(&serverClient->devPrivates, stateKey); - state->privileged = 1; - sidput(state->sid); + subj = dixLookupPrivate(&serverClient->devPrivates, subjectKey); + obj = dixLookupPrivate(&serverClient->devPrivates, objectKey); + subj->privileged = 1; + sidput(subj->sid); /* Use the context of the X server process for the serverClient */ if (getcon(&ctx) < 0) FatalError("Couldn't get context of X server process\n"); /* Get a SID from the context */ - if (avc_context_to_sid(ctx, &state->sid) < 0) + if (avc_context_to_sid(ctx, &subj->sid) < 0) FatalError("serverClient: context_to_sid(%s) failed\n", ctx); + sidget(subj->sid); + obj->sid = subj->sid; freecon(ctx); srec.client = serverClient; @@ -487,20 +502,27 @@ static void SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceDeviceAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (rec->access_mode & DixCreateAccess) { + SELinuxSubjectRec *dsubj; + dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey); + + sidput(dsubj->sid); sidput(obj->sid); /* Label the device directly with the process SID */ sidget(subj->sid); obj->sid = subj->sid; + sidget(subj->sid); + dsubj->sid = subj->sid; } rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DEVICE, rec->access_mode, @@ -513,17 +535,18 @@ static void SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceSendAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj, ev_sid; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, ev_sid; SELinuxAuditRec auditdata = { .client = rec->client }; security_class_t class; int rc, i, type; if (rec->dev) - subj = dixLookupPrivate(&rec->dev->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey); else - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); - obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); + obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey); /* Check send permission on window */ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess, @@ -554,13 +577,14 @@ static void SELinuxReceive(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceReceiveAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj, ev_sid; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, ev_sid; SELinuxAuditRec auditdata = { .client = NULL }; security_class_t class; int rc, i, type; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->pWin->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey); /* Check receive permission on window */ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess, @@ -591,12 +615,13 @@ static void SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceExtAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj, *serv; + SELinuxSubjectRec *subj, *serv; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->ext->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ /* XXX there should be a separate callback for this */ @@ -605,9 +630,9 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) security_context_t con; security_id_t sid; - serv = dixLookupPrivate(&serverClient->devPrivates, stateKey); + serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey); - /* Look in the mappings of property names to contexts */ + /* Look in the mappings of extension names to contexts */ if (selabel_lookup(label_hnd, &con, name, SELABEL_X_EXT) < 0) { ErrorF("SELinux: a property label lookup failed!\n"); rec->status = BadValue; @@ -645,12 +670,13 @@ static void SELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XacePropertyAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->pProp->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->pProp->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (rec->access_mode & DixCreateAccess) { @@ -696,13 +722,15 @@ static void SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceResourceAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj, *pobj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj, *sobj, *pobj; SELinuxAuditRec auditdata = { .client = rec->client }; PrivateRec **privatePtr; security_class_t class; int rc, offset; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + sobj = dixLookupPrivate(&rec->client->devPrivates, objectKey); /* Determine if the resource object has a devPrivates field */ offset = dixLookupPrivateOffset(rec->rtype); @@ -710,12 +738,12 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* No: use the SID of the owning client */ class = SECCLASS_X_RESOURCE; privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates; - obj = dixLookupPrivate(privatePtr, stateKey); + obj = dixLookupPrivate(privatePtr, objectKey); } else { /* Yes: use the SID from the resource object itself */ class = SELinuxTypeToClass(rec->rtype); privatePtr = DEVPRIV_AT(rec->res, offset); - obj = dixLookupPrivate(privatePtr, stateKey); + obj = dixLookupPrivate(privatePtr, objectKey); } /* If this is a new object that needs labeling, do it now */ @@ -724,10 +752,10 @@ SELinuxResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) offset = dixLookupPrivateOffset(rec->ptype); if (rec->parent && offset >= 0) /* Use the SID of the parent object in the labeling operation */ - pobj = dixLookupPrivate(DEVPRIV_AT(rec->parent, offset), stateKey); + pobj = dixLookupPrivate(DEVPRIV_AT(rec->parent, offset), objectKey); else /* Use the SID of the subject */ - pobj = subj; + pobj = sobj; sidput(obj->sid); @@ -751,13 +779,14 @@ static void SELinuxScreen(CallbackListPtr *pcbl, pointer is_saver, pointer calldata) { XaceScreenAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; Mask access_mode = rec->access_mode; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->screen->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (access_mode & DixCreateAccess) { @@ -784,12 +813,13 @@ static void SELinuxClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceClientAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->target->devPrivates, objectKey); rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode, &auditdata); @@ -801,12 +831,13 @@ static void SELinuxServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceServerAccessRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&serverClient->devPrivates, objectKey); rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode, &auditdata); @@ -818,11 +849,12 @@ static void SELinuxSelection(CallbackListPtr *pcbl, pointer unused, pointer calldata) { XaceSelectionAccessRec *rec = (XaceSelectionAccessRec *)calldata; - SELinuxStateRec *subj, sel_sid; + SELinuxSubjectRec *subj; + SELinuxObjectRec sel_sid; SELinuxAuditRec auditdata = { .client = rec->client }; int rc; - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); rc = SELinuxSelectionToSID(rec->name, &sel_sid); if (rc != Success) { @@ -869,18 +901,19 @@ static void SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { ResourceStateInfoRec *rec = calldata; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; WindowPtr pWin; if (rec->type != RT_WINDOW) return; pWin = (WindowPtr)rec->value; - state = dixLookupPrivate(&wClient(pWin)->devPrivates, stateKey); + subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey); - if (state->sid) { + if (subj->sid) { security_context_t ctx; - int rc = avc_sid_to_context(state->sid, &ctx); + int rc = avc_sid_to_context(subj->sid, &ctx); if (rc < 0) FatalError("SELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, @@ -892,11 +925,11 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) } else FatalError("SELinux: Unexpected unlabeled client found\n"); - state = dixLookupPrivate(&pWin->devPrivates, stateKey); + obj = dixLookupPrivate(&pWin->devPrivates, objectKey); - if (state->sid) { + if (obj->sid) { security_context_t ctx; - int rc = avc_sid_to_context(state->sid, &ctx); + int rc = avc_sid_to_context(obj->sid, &ctx); if (rc < 0) FatalError("SELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, @@ -913,7 +946,8 @@ static void SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { SelectionInfoRec *rec = calldata; - SELinuxStateRec *subj, *obj; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; switch (rec->kind) { case SelectionSetOwner: @@ -922,8 +956,8 @@ SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) rec->selection->alt_window = rec->selection->window; /* figure out the new label for the content */ - subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&rec->selection->devPrivates, stateKey); + subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); + obj = dixLookupPrivate(&rec->selection->devPrivates, objectKey); sidput(obj->sid); if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SELECTION, @@ -959,27 +993,47 @@ SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) */ static void -SELinuxStateInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxSubjectInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) { PrivateCallbackRec *rec = calldata; - SELinuxStateRec *state = *rec->value; + SELinuxSubjectRec *subj = *rec->value; sidget(unlabeled_sid); - state->sid = unlabeled_sid; + subj->sid = unlabeled_sid; - avc_entry_ref_init(&state->aeref); + avc_entry_ref_init(&subj->aeref); } static void -SELinuxStateFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) +SELinuxSubjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) { PrivateCallbackRec *rec = calldata; - SELinuxStateRec *state = *rec->value; + SELinuxSubjectRec *subj = *rec->value; - xfree(state->command); + xfree(subj->command); if (avc_active) - sidput(state->sid); + sidput(subj->sid); +} + +static void +SELinuxObjectInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + PrivateCallbackRec *rec = calldata; + SELinuxObjectRec *obj = *rec->value; + + sidget(unlabeled_sid); + obj->sid = unlabeled_sid; +} + +static void +SELinuxObjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) +{ + PrivateCallbackRec *rec = calldata; + SELinuxObjectRec *obj = *rec->value; + + if (avc_active) + sidput(obj->sid); } @@ -1070,7 +1124,8 @@ ProcSELinuxSetDeviceContext(ClientPtr client) char *ctx; security_id_t sid; DeviceIntPtr dev; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; + SELinuxObjectRec *obj; int rc; REQUEST(SELinuxSetContextReq); @@ -1088,9 +1143,13 @@ ProcSELinuxSetDeviceContext(ClientPtr client) if (rc != Success) return BadValue; - state = dixLookupPrivate(&dev->devPrivates, stateKey); - sidput(state->sid); - state->sid = sid; + subj = dixLookupPrivate(&dev->devPrivates, subjectKey); + sidput(subj->sid); + subj->sid = sid; + obj = dixLookupPrivate(&dev->devPrivates, objectKey); + sidput(obj->sid); + obj->sid = sid; + return Success; } @@ -1099,7 +1158,7 @@ ProcSELinuxGetDeviceContext(ClientPtr client) { char *ctx; DeviceIntPtr dev; - SELinuxStateRec *state; + SELinuxSubjectRec *subj; SELinuxGetContextReply rep; int rc; @@ -1110,8 +1169,8 @@ ProcSELinuxGetDeviceContext(ClientPtr client) if (rc != Success) return rc; - state = dixLookupPrivate(&dev->devPrivates, stateKey); - rc = avc_sid_to_context(state->sid, &ctx); + subj = dixLookupPrivate(&dev->devPrivates, subjectKey); + rc = avc_sid_to_context(subj->sid, &ctx); if (rc != Success) return BadValue; @@ -1151,7 +1210,7 @@ ProcSELinuxGetPropertyContext(ClientPtr client) char *ctx; WindowPtr pWin; PropertyPtr pProp; - SELinuxStateRec *state; + SELinuxObjectRec *obj; SELinuxGetContextReply rep; int rc; @@ -1175,8 +1234,8 @@ ProcSELinuxGetPropertyContext(ClientPtr client) if (rc != Success) return rc; - state = dixLookupPrivate(&pProp->devPrivates, stateKey); - rc = avc_sid_to_context(state->sid, &ctx); + obj = dixLookupPrivate(&pProp->devPrivates, objectKey); + rc = avc_sid_to_context(obj->sid, &ctx); if (rc != Success) return BadValue; @@ -1215,7 +1274,7 @@ ProcSELinuxGetWindowContext(ClientPtr client) { char *ctx; WindowPtr pWin; - SELinuxStateRec *state; + SELinuxObjectRec *obj; SELinuxGetContextReply rep; int rc; @@ -1226,8 +1285,8 @@ ProcSELinuxGetWindowContext(ClientPtr client) if (rc != Success) return rc; - state = dixLookupPrivate(&pWin->devPrivates, stateKey); - rc = avc_sid_to_context(state->sid, &ctx); + obj = dixLookupPrivate(&pWin->devPrivates, objectKey); + rc = avc_sid_to_context(obj->sid, &ctx); if (rc != Success) return BadValue; @@ -1521,7 +1580,8 @@ SELinuxExtensionInit(INITARGS) FatalError("SELinux: Failed to open the system audit log\n"); /* Allocate private storage */ - if (!dixRequestPrivate(stateKey, sizeof(SELinuxStateRec))) + if (!dixRequestPrivate(subjectKey, sizeof(SELinuxSubjectRec)) || + !dixRequestPrivate(objectKey, sizeof(SELinuxObjectRec))) FatalError("SELinux: Failed to allocate private storage.\n"); /* Create atoms for doing window labeling */ @@ -1533,8 +1593,10 @@ SELinuxExtensionInit(INITARGS) FatalError("SELinux: Failed to create atom\n"); /* Register callbacks */ - ret &= dixRegisterPrivateInitFunc(stateKey, SELinuxStateInit, NULL); - ret &= dixRegisterPrivateDeleteFunc(stateKey, SELinuxStateFree, NULL); + ret &= dixRegisterPrivateInitFunc(subjectKey, SELinuxSubjectInit, NULL); + ret &= dixRegisterPrivateDeleteFunc(subjectKey, SELinuxSubjectFree, NULL); + ret &= dixRegisterPrivateInitFunc(objectKey, SELinuxObjectInit, NULL); + ret &= dixRegisterPrivateDeleteFunc(objectKey, SELinuxObjectFree, NULL); ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL); ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL); From 31934132a490b1b8ae73010c44e0b23217d8dab2 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 7 Feb 2008 16:32:06 -0500 Subject: [PATCH 464/552] xselinux: Use the device name in debugging output. --- Xext/xselinux.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 60f0cc88f..9acc93c61 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -92,6 +92,7 @@ static int audit_fd; /* structure passed to auditing callback */ typedef struct { ClientPtr client; /* client */ + DeviceIntPtr dev; /* device */ char *command; /* client's executable path */ unsigned id; /* resource id, if any */ int restype; /* resource type, if any */ @@ -461,11 +462,15 @@ SELinuxAudit(void *auditdata, propertyName = audit->property ? NameForAtom(audit->property) : NULL; selectionName = audit->selection ? NameForAtom(audit->selection) : NULL; - return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + return snprintf(msgbuf, msgbufsize, + "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", (major >= 0) ? "request=" : "", (major >= 0) ? LookupRequestName(major, minor) : "", audit->command ? " comm=" : "", audit->command ? audit->command : "", + audit->dev ? " xdevice=\"" : "", + audit->dev ? audit->dev->name : "", + audit->dev ? "\"" : "", audit->id ? " resid=" : "", audit->id ? idNum : "", audit->restype ? " restype=" : "", @@ -504,7 +509,7 @@ SELinuxDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceDeviceAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; - SELinuxAuditRec auditdata = { .client = rec->client }; + SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); @@ -537,7 +542,7 @@ SELinuxSend(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceSendAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj, ev_sid; - SELinuxAuditRec auditdata = { .client = rec->client }; + SELinuxAuditRec auditdata = { .client = rec->client, .dev = rec->dev }; security_class_t class; int rc, i, type; From de16a8c53046764dbdf26a87acc5c984ef00d818 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 7 Feb 2008 20:14:16 -0500 Subject: [PATCH 465/552] XACE: Correct some protocol error values in the colormap routines. --- dix/dispatch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 663bf7dd5..0bca4417e 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -2537,7 +2537,7 @@ ProcFreeColormap(ClientPtr client) else { client->errorValue = stuff->id; - return rc; + return (rc == BadValue) ? BadColor : rc; } } @@ -2566,7 +2566,7 @@ ProcCopyColormapAndFree(ClientPtr client) else { client->errorValue = stuff->srcCmap; - return rc; + return (rc == BadValue) ? BadColor : rc; } } @@ -2658,7 +2658,7 @@ ProcListInstalledColormaps(ClientPtr client) xfree(preply); rc = client->noClientException; out: - return (rc == BadValue) ? BadColor : rc; + return rc; } int From 66f8001b61d12eaf4905ac71ccbb3f304914d00d Mon Sep 17 00:00:00 2001 From: Bart Trojanowski Date: Thu, 7 Feb 2008 21:26:54 -0500 Subject: [PATCH 466/552] X86EMU: handle CPUID instruction After trying to switch from X to VT (or just quit) the video-amd driver attempts to issue INT 10/0 to go to mode 3 (VGA). The emulator, running the BIOS code, would then spit out: c000:0282: A2 ILLEGAL EXTENDED X86 OPCODE! The opcode was 0F A2, or CPUID; it was not implemented in the emulator. This simple patch, against 1.3.0.0, handles the CPUID instruction in one of two ways: 1) if ran on __i386__ or __x86_64__ then it calls the CPUID instruction directly. 2) if ran elsewhere it returns a canned 486dx4 set of values for function 1. This fix allows the video-amd driver to switch back to console mode, with the GSW BIOS. Thanks to Symbio Technologies for funding my work, and ThinCan for providing hardware :) Signed-off-by: Bart Trojanowski Acked-by: Eric Anholt --- hw/xfree86/x86emu/ops2.c | 16 ++++- hw/xfree86/x86emu/prim_ops.c | 66 +++++++++++++++++++++ hw/xfree86/x86emu/x86emu/prim_ops.h | 1 + hw/xfree86/x86emu/x86emu/prim_x86_gcc.h | 79 +++++++++++++++++++++++++ 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 hw/xfree86/x86emu/x86emu/prim_x86_gcc.h diff --git a/hw/xfree86/x86emu/ops2.c b/hw/xfree86/x86emu/ops2.c index 8c6c53539..324de8ad8 100644 --- a/hw/xfree86/x86emu/ops2.c +++ b/hw/xfree86/x86emu/ops2.c @@ -327,6 +327,20 @@ static void x86emuOp2_pop_FS(u8 X86EMU_UNUSED(op2)) END_OF_INSTR(); } +/**************************************************************************** +REMARKS: CPUID takes EAX/ECX as inputs, writes EAX/EBX/ECX/EDX as output +Handles opcode 0x0f,0xa2 +****************************************************************************/ +static void x86emuOp2_cpuid(u8 X86EMU_UNUSED(op2)) +{ + START_OF_INSTR(); + DECODE_PRINTF("CPUID\n"); + TRACE_AND_STEP(); + cpuid(); + DECODE_CLEAR_SEGOVR(); + END_OF_INSTR(); +} + /**************************************************************************** REMARKS: Handles opcode 0x0f,0xa3 @@ -2734,7 +2748,7 @@ void (*x86emu_optab2[256])(u8) = /* 0xa0 */ x86emuOp2_push_FS, /* 0xa1 */ x86emuOp2_pop_FS, -/* 0xa2 */ x86emuOp2_illegal_op, +/* 0xa2 */ x86emuOp2_cpuid, /* 0xa3 */ x86emuOp2_bt_R, /* 0xa4 */ x86emuOp2_shld_IMM, /* 0xa5 */ x86emuOp2_shld_CL, diff --git a/hw/xfree86/x86emu/prim_ops.c b/hw/xfree86/x86emu/prim_ops.c index b9e7257ca..b42cdc0a5 100644 --- a/hw/xfree86/x86emu/prim_ops.c +++ b/hw/xfree86/x86emu/prim_ops.c @@ -102,6 +102,12 @@ #define PRIM_OPS_NO_REDEFINE_ASM #include "x86emu/x86emui.h" +#if defined(__GNUC__) +# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) +# include "x86emu/prim_x86_gcc.h" +# endif +#endif + /*------------------------- Global Variables ------------------------------*/ static u32 x86emu_parity_tab[8] = @@ -2654,3 +2660,63 @@ DB( if (CHECK_SP_ACCESS()) return res; } +/**************************************************************************** +REMARKS: +CPUID takes EAX/ECX as inputs, writes EAX/EBX/ECX/EDX as output +****************************************************************************/ +void cpuid (void) +{ + u32 feature = M.x86.R_EAX; + +#ifdef X86EMU_HAS_HW_CPUID + /* If the platform allows it, we will base our values on the real + * results from the CPUID instruction. We limit support to the + * first two features, and the results of those are sanitized. + */ + if (feature <= 1) + hw_cpuid(&M.x86.R_EAX, &M.x86.R_EBX, &M.x86.R_ECX, &M.x86.R_EDX); +#endif + + switch (feature) { + case 0: + /* Regardless if we have real data from the hardware, the emulator + * will only support upto feature 1, which we set in register EAX. + * Registers EBX:EDX:ECX contain a string identifying the CPU. + */ + M.x86.R_EAX = 1; +#ifndef X86EMU_HAS_HW_CPUID + /* EBX:EDX:ECX = "GenuineIntel" */ + M.x86.R_EBX = 0x756e6547; + M.x86.R_EDX = 0x49656e69; + M.x86.R_ECX = 0x6c65746e; +#endif + break; + case 1: +#ifndef X86EMU_HAS_HW_CPUID + /* If we don't have x86 compatible hardware, we return values from an + * Intel 486dx4; which was one of the first processors to have CPUID. + */ + M.x86.R_EAX = 0x00000480; + M.x86.R_EBX = 0x00000000; + M.x86.R_ECX = 0x00000000; + M.x86.R_EDX = 0x00000002; /* VME */ +#else + /* In the case that we have hardware CPUID instruction, we make sure + * that the features reported are limited to TSC and VME. + */ + M.x86.R_EDX &= 0x00000012; +#endif + break; + default: + /* Finally, we don't support any additional features. Most CPUs + * return all zeros when queried for invalid or unsupported feature + * numbers. + */ + M.x86.R_EAX = 0; + M.x86.R_EBX = 0; + M.x86.R_ECX = 0; + M.x86.R_EDX = 0; + break; + } +} + diff --git a/hw/xfree86/x86emu/x86emu/prim_ops.h b/hw/xfree86/x86emu/x86emu/prim_ops.h index bea8357e4..6ac2a29f6 100644 --- a/hw/xfree86/x86emu/x86emu/prim_ops.h +++ b/hw/xfree86/x86emu/x86emu/prim_ops.h @@ -133,6 +133,7 @@ void push_word (u16 w); void push_long (u32 w); u16 pop_word (void); u32 pop_long (void); +void cpuid (void); #ifdef __cplusplus } /* End of "C" linkage for C++ */ diff --git a/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h new file mode 100644 index 000000000..af61e2023 --- /dev/null +++ b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h @@ -0,0 +1,79 @@ +/**************************************************************************** +* +* Inline helpers for x86emu +* +* Copyright (C) 2008 Bart Trojanowski, Symbio Technologies, LLC +* +* ======================================================================== +* +* Permission to use, copy, modify, distribute, and sell this software and +* its documentation for any purpose is hereby granted without fee, +* provided that the above copyright notice appear in all copies and that +* both that copyright notice and this permission notice appear in +* supporting documentation, and that the name of the authors not be used +* in advertising or publicity pertaining to distribution of the software +* without specific, written prior permission. The authors makes no +* representations about the suitability of this software for any purpose. +* It is provided "as is" without express or implied warranty. +* +* THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +* EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR +* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +* USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +* PERFORMANCE OF THIS SOFTWARE. +* +* ======================================================================== +* +* Language: GNU C +* Environment: GCC on i386 or x86-64 +* Developer: Bart Trojanowski +* +* Description: This file defines a few x86 macros that can be used by the +* emulator to execute native instructions. +* +* For PIC vs non-PIC code refer to: +* http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inline-assembly-and-pic-mix-well +* +****************************************************************************/ +#ifndef __X86EMU_PRIM_X86_GCC_H +#define __X86EMU_PRIM_X86_GCC_H + +#include "x86emu/types.h" + +#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__)) +#error This file is intended to be used by gcc on i386 or x86-64 system +#endif + +#if defined(__PIC__) && defined(__i386__) + +#define X86EMU_HAS_HW_CPUID 1 +static inline void hw_cpuid (u32 *a, u32 *b, u32 *c, u32 *d) +{ + __asm__ __volatile__ ("pushl %%ebx \n\t" + "cpuid \n\t" + "movl %%ebx, %1 \n\t" + "popl %%ebx \n\t" + : "=a" (*a), "=r" (*b), + "=c" (*c), "=d" (*d) + : "a" (*a), "c" (*c) + : "cc"); +} + +#else // ! (__PIC__ && __i386__) + +#define x86EMU_HAS_HW_CPUID 1 +static inline void hw_cpuid (u32 *a, u32 *b, u32 *c, u32 *d) +{ + __asm__ __volatile__ ("cpuid" + : "=a" (*a), "=b" (*b), + "=c" (*c), "=d" (*d) + : "a" (*a), "c" (*c) + : "cc"); +} + +#endif // __PIC__ && __i386__ + + +#endif // __X86EMU_PRIM_X86_GCC_H From 7018f280406eb0ef899a4046de274cfdd582881b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 7 Feb 2008 15:48:04 +1030 Subject: [PATCH 467/552] xkb: when copying the keymap, make sure the structs default to 0/NULL. It actually does help if a pointer is NULL rather than pointing to nirvana when you're trying to free it lateron. Who would have thought? --- xkb/xkbUtils.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 9f813e5e3..3cedf825a 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1730,9 +1730,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) else { if (dst->geom->sz_shapes) { xfree(dst->geom->shapes); - dst->geom->shapes = NULL; } - + dst->geom->shapes = NULL; dst->geom->num_shapes = 0; dst->geom->sz_shapes = 0; } @@ -1781,6 +1780,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } dst->geom->num_sections = 0; + dst->geom->sections = NULL; } if (src->geom->num_sections) { @@ -1792,6 +1792,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) tmp = xalloc(src->geom->num_sections * sizeof(XkbSectionRec)); if (!tmp) return FALSE; + memset(tmp, 0, src->geom->num_sections * sizeof(XkbSectionRec)); dst->geom->sections = tmp; dst->geom->num_sections = src->geom->num_sections; @@ -1828,6 +1829,10 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) return FALSE; dsection->doodads = tmp; } + else { + dsection->doodads = NULL; + } + for (k = 0, sdoodad = ssection->doodads, ddoodad = dsection->doodads; @@ -1855,9 +1860,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) else { if (dst->geom->sz_sections) { xfree(dst->geom->sections); - dst->geom->sections = NULL; } + dst->geom->sections = NULL; dst->geom->num_sections = 0; dst->geom->sz_sections = 0; } @@ -1886,6 +1891,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } } } + dst->geom->num_doodads = 0; + dst->geom->doodads = NULL; } if (src->geom->num_doodads) { @@ -1898,7 +1905,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) sizeof(XkbDoodadRec)); if (!tmp) return FALSE; - bzero(tmp, src->geom->num_doodads * sizeof(XkbDoodadRec)); + memset(tmp, 0, src->geom->num_doodads * sizeof(XkbDoodadRec)); dst->geom->doodads = tmp; dst->geom->sz_doodads = src->geom->num_doodads; @@ -1927,9 +1934,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) else { if (dst->geom->sz_doodads) { xfree(dst->geom->doodads); - dst->geom->doodads = NULL; } + dst->geom->doodads = NULL; dst->geom->num_doodads = 0; dst->geom->sz_doodads = 0; } @@ -1957,10 +1964,10 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) dst->geom->num_key_aliases = dst->geom->sz_key_aliases; } else { - if (dst->geom->sz_key_aliases && dst->geom->key_aliases) { + if (dst->geom->key_aliases) { xfree(dst->geom->key_aliases); - dst->geom->key_aliases = NULL; } + dst->geom->key_aliases = NULL; dst->geom->num_key_aliases = 0; dst->geom->sz_key_aliases = 0; } @@ -1991,8 +1998,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) else { if (dst->geom->label_font) { xfree(dst->geom->label_font); - dst->geom->label_font = NULL; } + dst->geom->label_font = NULL; dst->geom->label_color = NULL; dst->geom->base_color = NULL; } From 8004e160fa8cc75a3f1b7385fee64e5864b3b50a Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 10 Feb 2008 16:34:40 -0800 Subject: [PATCH 468/552] XQuartz: Converted interface to nib 3.x format (cherry picked from commit 656aaab95773bd70fc3504b68bf7e1d292891d93) --- .../bundle/English.lproj/main.nib/classes.nib | 318 -- .../English.lproj/main.nib/designable.nib | 4098 +++++++++++++++++ .../bundle/English.lproj/main.nib/info.nib | 18 - .../English.lproj/main.nib/keyedobjects.nib | Bin 30865 -> 33883 bytes 4 files changed, 4098 insertions(+), 336 deletions(-) delete mode 100644 hw/xquartz/bundle/English.lproj/main.nib/classes.nib create mode 100644 hw/xquartz/bundle/English.lproj/main.nib/designable.nib delete mode 100644 hw/xquartz/bundle/English.lproj/main.nib/info.nib diff --git a/hw/xquartz/bundle/English.lproj/main.nib/classes.nib b/hw/xquartz/bundle/English.lproj/main.nib/classes.nib deleted file mode 100644 index a82159bd5..000000000 --- a/hw/xquartz/bundle/English.lproj/main.nib/classes.nib +++ /dev/null @@ -1,318 +0,0 @@ - - - - - IBClasses - - - CLASS - IBLibraryObjectTemplate - LANGUAGE - ObjC - OUTLETS - - draggedView - NSView - representedObject - NSObject - - SUPERCLASS - NSView - - - CLASS - IBInspector - LANGUAGE - ObjC - OUTLETS - - inspectorView - NSView - - SUPERCLASS - NSObject - - - CLASS - NSDateFormatter - LANGUAGE - ObjC - SUPERCLASS - NSFormatter - - - ACTIONS - - apps_table_cancel - id - apps_table_delete - id - apps_table_done - id - apps_table_duplicate - id - apps_table_new - id - apps_table_show - id - bring_to_front - id - close_window - id - enable_fullscreen_changed - id - minimize_window - id - next_window - id - prefs_changed - id - prefs_show - id - previous_window - id - toggle_fullscreen - id - x11_help - id - zoom_window - id - - CLASS - X11Controller - LANGUAGE - ObjC - OUTLETS - - apps_separator - id - apps_table - id - depth - id - dock_apps_menu - id - dock_menu - id - dock_window_separator - id - enable_auth - id - enable_fullscreen - id - enable_keyequivs - id - enable_tcp - id - fake_buttons - id - prefs_panel - id - sync_keymap - id - toggle_fullscreen_item - id - use_sysbeep - id - window_separator - id - x11_about_item - id - - SUPERCLASS - NSObject - - - CLASS - NSNumberFormatter - LANGUAGE - ObjC - SUPERCLASS - NSFormatter - - - CLASS - NSFormatter - LANGUAGE - ObjC - SUPERCLASS - NSObject - - - ACTIONS - - alignCenter: - id - alignJustified: - id - alignLeft: - id - alignRight: - id - arrangeInFront: - id - centerSelectionInVisibleArea: - id - changeFont: - id - checkSpelling: - id - clear: - id - clearRecentDocuments: - id - complete: - id - copy: - id - copyFont: - id - copyRuler: - id - cut: - id - delete: - id - deminiaturize: - id - fax: - id - hide: - id - hideOtherApplications: - id - loosenKerning: - id - lowerBaseline: - id - makeKeyAndOrderFront: - id - miniaturize: - id - newDocument: - id - openDocument: - id - orderBack: - id - orderFront: - id - orderFrontColorPanel: - id - orderFrontHelpPanel: - id - orderOut: - id - outline: - id - paste: - id - pasteAsPlainText: - id - pasteAsRichText: - id - pasteFont: - id - pasteRuler: - id - pause: - id - performClose: - id - performFindPanelAction: - id - performMiniaturize: - id - performZoom: - id - play: - id - print: - id - printDocument: - id - raiseBaseline: - id - record: - id - redo: - id - resume: - id - revertDocumentToSaved: - id - run: - id - runPageLayout: - id - runToolbarCustomizationPalette: - id - saveAllDocuments: - id - saveDocument: - id - saveDocumentAs: - id - saveDocumentTo: - id - selectAll: - id - selectText: - id - showGuessPanel: - id - showHelp: - id - start: - id - startSpeaking: - id - stop: - id - stopSpeaking: - id - subscript: - id - superscript: - id - terminate: - id - tightenKerning: - id - toggleContinuousSpellChecking: - id - toggleRuler: - id - toggleToolbarShown: - id - turnOffKerning: - id - turnOffLigatures: - id - underline: - id - undo: - id - unhideAllApplications: - id - unscript: - id - useAllLigatures: - id - useStandardKerning: - id - useStandardLigatures: - id - - CLASS - FirstResponder - LANGUAGE - ObjC - SUPERCLASS - NSObject - - - IBVersion - 1 - - diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib new file mode 100644 index 000000000..c267e45e6 --- /dev/null +++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib @@ -0,0 +1,4098 @@ + + + + 1050 + 9C31 + 629 + 949.26 + 352.00 + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + + NSApplication + + + + FirstResponder + + + NSApplication + + + MainMenu + + YES + + + X11 + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + + NSMenuMixedState + + submenuAction: + + + + YES + + + About X11 + + 2147483647 + + + + + + Preferences... + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + + Services + + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Toggle Full Screen + a + 1572864 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide X11 + h + 1048576 + 2147483647 + + + 42 + + + + Hide Others + + 1048576 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + 42 + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit X11 + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + Applications + + 1048576 + 2147483647 + + + submenuAction: + + + + YES + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Customize... + + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + YES + + + Minimize Window + m + 1048576 + 2147483647 + + + + + + Close Window + w + 1048576 + 2147483647 + + + + + + Zoom Window + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Next Window + 75yDA + 1048576 + 2147483647 + + + + + + Previous Window + 75yCA + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + + + YES + + + X11 Help + + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + X11Controller + + + 3 + 2 + {{319, 323}, {478, 316}} + 1350041600 + X11 Preferences + NSPanel + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 256 + + YES + + + 256 + + YES + + + 256 + {{18, 90}, {402, 18}} + + YES + + 67239424 + 0 + Use system alert effect + + LucidaGrande + 1.300000e+01 + 1044 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 256 + {{36, 56}, {385, 28}} + + YES + + 67239424 + 4194304 + X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel. + + + 1.100000e+01 + 3100 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + + controlTextColor + + 3 + MAA + + + + + + + 256 + {{74, 209}, {128, 26}} + + YES + + -2076049856 + 1024 + + + 109199615 + 1 + + + 1.300000e+01 + 16 + + + + + + + + 400 + 75 + + + From Display + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + -1 + + + YES + + + OtherViews + + + YES + + + + 256 Colors + + 1048576 + 2147483647 + + + _popUpItemAction: + 8 + + + + + Thousands + + 1048576 + 2147483647 + + + _popUpItemAction: + 15 + + + + + Millions + + 1048576 + 2147483647 + + + _popUpItemAction: + 24 + + + + + 3 + YES + YES + 1 + + + + + 256 + {{17, 212}, {55, 20}} + + YES + + 67239424 + 4194304 + Q29sb3JzOgo + + + + + + + + + 256 + {{36, 190}, {392, 14}} + + YES + + 67239424 + 4194304 + This option takes effect when X11 is launched again. + + + + + + + + + 256 + {{18, 156}, {409, 23}} + + YES + + 67239424 + 0 + Full screen mode + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{36, 119}, {385, 31}} + + YES + + 67239424 + 4194304 + Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode. + + + + + + + + {{10, 33}, {438, 253}} + + + + {{10, 7}, {458, 299}} + + + YES + + + 1 + + + + 256 + + YES + + + 256 + {{18, 217}, {402, 18}} + + YES + + 67239424 + 0 + Emulate three button mouse + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{36, 67}, {385, 31}} + + YES + + 67239424 + 4194304 + When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier. + + + + + + + + + 256 + {{36, 182}, {385, 29}} + + YES + + 67239424 + 4194304 + SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs +ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA + + + + + + + + + 256 + {{18, 104}, {402, 18}} + + YES + + 67239424 + 0 + Enable key equivalents under X11 + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{36, 133}, {385, 14}} + + YES + + 67239424 + 4194304 + Allows input menu changes to overwrite the current X11 keymap. + + + + + + + + + 256 + {{18, 153}, {402, 18}} + + YES + + 67239424 + 0 + Follow system keyboard layout + + + 1211912703 + 2 + + + + 200 + 25 + + + + {{10, 33}, {438, 253}} + + Input + + + + + + 2 + + + Output + + + + + + + 256 + + YES + + + 256 + {{18, 217}, {402, 18}} + + YES + + 67239424 + 0 + Authenticate connections + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{18, 140}, {402, 18}} + + YES + + 67239424 + 0 + Allow connections from network clients + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{36, 169}, {385, 42}} + + YES + + 67239424 + 4194304 + TGF1bmNoaW5nIFgxMSB3aWxsIGNyZWF0ZSBYYXV0aG9yaXR5IGFjY2Vzcy1jb250cm9sIGtleXMuIElm +IHRoZSBzeXN0ZW0ncyBJUCBhZGRyZXNzIGNoYW5nZXMsIHRoZXNlIGtleXMgYmVjb21lIGludmFsaWQg +d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 + + + + + + + + + 256 + {{36, 92}, {385, 42}} + + YES + + 67239424 + 4194304 + If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed. + + + + + + + + + 256 + {{17, 20}, {404, 14}} + + YES + + 67239424 + 4194304 + These options take effect when X11 is next launched. + + + + + + + + {{10, 33}, {438, 253}} + + Security + + + + + + + 0 + YES + YES + + + {478, 316} + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + x11_prefs + + + 11 + 2 + {{279, 270}, {486, 310}} + 1350041600 + X11 Application Menu + + + View + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + 256 + + YES + + + 303 + {{388, 12}, {84, 32}} + + YES + + -2080244224 + 137887744 + Done + + + -2038284033 + 1 + + Helvetica + 1.300000e+01 + 16 + + + + + + 200 + 25 + + + + + 301 + {{372, 230}, {100, 32}} + + YES + + 67239424 + 137887744 + Duplicate + + + -2038284033 + 1 + + + + + + + + 200 + 25 + + + + + 301 + {{372, 198}, {100, 32}} + + YES + + 67239424 + 137887744 + Remove + + + -2038284033 + 1 + + + + + + + + 200 + 25 + + + + + 307 + + YES + + + 2304 + + YES + + + 256 + {333, 197} + + YES + + + 256 + {333, 17} + + + + + + 256 + {{334, 0}, {16, 17}} + + + + YES + + 7.900000e+01 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + Name + + + 3 + MC4zMzMzMzI5OQA + + + 6 + + headerTextColor + + + + + 338820672 + 1024 + + + + 3 + MQA + + + + 3 + YES + YES + + + + 1.937310e+02 + 6.273100e+01 + 1.000000e+03 + + 75628032 + 0 + Command + + + + + + 338820672 + 1024 + + + + + + 3 + YES + YES + + + + 5.100000e+01 + 1.000000e+01 + 1.000000e+03 + + 67239424 + 0 + Shortcut + + + 6 + + headerColor + + + + + + 338820672 + 1024 + + + 1.200000e+01 + 16 + + + YES + + 6 + + controlBackgroundColor + + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 6 + + gridColor + + 3 + MC41AA + + + 1.700000e+01 + 1379958784 + 1 + -1 + 0 + YES + + + {{1, 17}, {333, 197}} + + + + + 4 + + + + 256 + {{334, 17}, {15, 197}} + + + _doScroller: + 9.949238e-01 + + + + 256 + {{1, 214}, {333, 15}} + + 1 + + + 9.940299e-01 + + + + 2304 + + YES + + + {{1, 0}, {333, 17}} + + + + + 4 + + + + {{20, 60}, {350, 230}} + + + 50 + + + + + QSAAAEEgAABBmAAAQZgAAA + + + + 303 + {{304, 12}, {84, 32}} + + YES + + 67239424 + 137887744 + Cancel + + + -2038284033 + 1 + + + + + + + + 200 + 25 + + + + + 301 + {{372, 262}, {100, 32}} + + YES + + 67239424 + 137887744 + Add Item + + + -2038284033 + 1 + + + + + + + + 200 + 25 + + + + {{1, 1}, {486, 310}} + + {{0, 0}, {1440, 878}} + {213, 129} + {3.40282e+38, 3.40282e+38} + x11_apps + + + Menu + + YES + + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + 1048576 + 2147483647 + + + submenuAction: + + + + YES + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Q3VzdG9taXpl4oCmA + + 1048576 + 2147483647 + + + + + + + + + + + + + YES + + + cut: + + + + 175 + + + + paste: + + + + 176 + + + + redo: + + + + 178 + + + + selectAll: + + + + 179 + + + + undo: + + + + 180 + + + + copy: + + + + 181 + + + + delete: + + + + 195 + + + + minimize_window: + + + + 202 + + + + close_window: + + + + 205 + + + + zoom_window: + + + + 206 + + + + bring_to_front: + + + + 207 + + + + window_separator + + + + 260 + + + + hideOtherApplications: + + + + 263 + + + + apps_separator + + + + 273 + + + + apps_table + + + + 301 + + + + apps_table_done: + + + + 302 + + + + apps_table_delete: + + + + 303 + + + + apps_table_duplicate: + + + + 304 + + + + apps_table_show: + + + + 308 + + + + apps_table_cancel: + + + + 309 + + + + apps_table_new: + + + + 311 + + + + prefs_show: + + + + 318 + + + + x11_about_item + + + + 321 + + + + enable_auth + + + + 387 + + + + enable_tcp + + + + 388 + + + + depth + + + + 389 + + + + use_sysbeep + + + + 390 + + + + fake_buttons + + + + 391 + + + + sync_keymap + + + + 392 + + + + enable_keyequivs + + + + 393 + + + + prefs_changed: + + + + 394 + + + + + + + + 395 + + + + + + + + 396 + + + + + + + + 397 + + + + + + + + 398 + + + + + + + + 399 + + + + + + + + 401 + + + + prefs_panel + + + + 402 + + + + x11_help: + + + + 422 + + + + dockMenu + + + + 426 + + + + dock_menu + + + + 428 + + + + delegate + + + + 429 + + + + hide: + + + + 430 + + + + unhideAllApplications: + + + + 431 + + + + terminate: + + + + 432 + + + + orderFrontStandardAboutPanel: + + + + 433 + + + + dock_apps_menu + + + + 530 + + + + dock_window_separator + + + + 531 + + + + + + + + 534 + + + + next_window: + + + + 539 + + + + previous_window: + + + + 540 + + + + enable_fullscreen + + + + 546 + + + + enable_fullscreen_changed: + + + + 547 + + + + toggle_fullscreen: + + + + 548 + + + + toggle_fullscreen_item + + + + 549 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + + + 19 + + + YES + + + + + + 24 + + + YES + + + + + + + + + + + + + + 5 + + + + + 23 + + + + + 92 + + + + + 203 + + + + + 204 + + + + + 208 + + + + + 536 + + + + + 537 + + + + + 538 + + + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + + 58 + + + + + 129 + + + + + 131 + + + YES + + + + + + 130 + + + + + 134 + + + + + 136 + + + + + 143 + + + + + 144 + + + + + 145 + + + + + 149 + + + + + 150 + + + + + 544 + + + + + 545 + + + + + 163 + + + YES + + + + + + 169 + + + YES + + + + + + + + + + + + + 156 + + + + + 157 + + + + + 158 + + + + + 160 + + + + + 164 + + + + + 171 + + + + + 172 + + + + + 173 + + + + + 269 + + + YES + + + + + + 270 + + + YES + + + + + + + 272 + + + + + 305 + + + + + 419 + + + YES + + + + + + 420 + + + YES + + + + + + 421 + + + + + 196 + + + + + + 244 + + + YES + + + + PrefsPanel + + + 245 + + + YES + + + + + + 348 + + + YES + + + + + + + + 349 + + + YES + + + + + + 351 + + + YES + + + + + + + + + + + 363 + + + YES + + + + + + 364 + + + YES + + + + + + 365 + + + YES + + + + + + 368 + + + YES + + + + + + 369 + + + YES + + + + + + 370 + + + YES + + + + + + 352 + + + YES + + + + + + 350 + + + YES + + + + + + + + + + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + 382 + + + YES + + + + + + 385 + + + YES + + + + + + 386 + + + YES + + + + + + 541 + + + YES + + + + + + 543 + + + YES + + + + + + 353 + + + YES + + + + + + 354 + + + YES + + + + + + + + + + 374 + + + YES + + + + + + 375 + + + YES + + + + + + 376 + + + YES + + + + + + 377 + + + YES + + + + + + 379 + + + YES + + + + + + 285 + + + YES + + + + EditPrograms + + + 286 + + + YES + + + + + + + + + + + 291 + + + YES + + + + + + 292 + + + YES + + + + + + 293 + + + YES + + + + + + 295 + + + YES + + + + + + + + + 296 + + + YES + + + + + + + + 297 + + + YES + + + + + + 574 + + + + + 298 + + + YES + + + + + + 573 + + + + + 535 + + + YES + + + + + + 575 + + + + + 299 + + + YES + + + + + + 310 + + + YES + + + + + + 423 + + + YES + + + + + DockMenu + + + 524 + + + + + 526 + + + YES + + + + + + 527 + + + YES + + + + + + + 532 + + + + + 533 + + + + + 100363 + + + + + 100364 + + + + + 100365 + + + + + 100368 + + + + + 100369 + + + + + 100370 + + + + + 100371 + + + + + 100372 + + + + + 100382 + + + YES + + + + + + 100385 + + + + + 100386 + + + + + 100541 + + + + + 100543 + + + + + 100374 + + + + + 100375 + + + + + 100376 + + + + + 100377 + + + + + 100379 + + + + + 100291 + + + + + 100292 + + + + + 100293 + + + + + 100299 + + + + + 100310 + + + + + 380 + + + YES + + + + + + + + + 435 + + + + + 384 + + + + + 383 + + + + + 381 + + + + + 100295 + + + + + 200295 + + + + + 300295 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + -3.ImportedFromIB2 + 100295.IBShouldRemoveOnLegacySave + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 156.IBPluginDependency + 156.ImportedFromIB2 + 157.IBPluginDependency + 157.ImportedFromIB2 + 158.IBPluginDependency + 158.ImportedFromIB2 + 160.IBPluginDependency + 160.ImportedFromIB2 + 163.IBPluginDependency + 163.ImportedFromIB2 + 164.IBPluginDependency + 164.ImportedFromIB2 + 169.IBPluginDependency + 169.ImportedFromIB2 + 171.IBPluginDependency + 171.ImportedFromIB2 + 172.IBPluginDependency + 172.ImportedFromIB2 + 173.IBPluginDependency + 173.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 200295.IBShouldRemoveOnLegacySave + 203.IBPluginDependency + 203.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 208.IBPluginDependency + 208.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 244.IBPluginDependency + 244.ImportedFromIB2 + 244.windowTemplate.hasMaxSize + 244.windowTemplate.hasMinSize + 244.windowTemplate.maxSize + 244.windowTemplate.minSize + 245.IBPluginDependency + 245.ImportedFromIB2 + 269.IBPluginDependency + 269.ImportedFromIB2 + 270.IBPluginDependency + 270.ImportedFromIB2 + 272.IBPluginDependency + 272.ImportedFromIB2 + 285.IBPluginDependency + 285.ImportedFromIB2 + 285.windowTemplate.hasMaxSize + 285.windowTemplate.hasMinSize + 285.windowTemplate.maxSize + 285.windowTemplate.minSize + 286.IBPluginDependency + 286.ImportedFromIB2 + 29.IBPluginDependency + 29.ImportedFromIB2 + 291.IBPluginDependency + 291.ImportedFromIB2 + 292.IBPluginDependency + 292.ImportedFromIB2 + 293.IBPluginDependency + 293.ImportedFromIB2 + 295.IBPluginDependency + 295.ImportedFromIB2 + 296.IBPluginDependency + 296.ImportedFromIB2 + 297.IBPluginDependency + 297.ImportedFromIB2 + 298.IBPluginDependency + 298.ImportedFromIB2 + 299.IBPluginDependency + 299.ImportedFromIB2 + 300295.IBShouldRemoveOnLegacySave + 305.IBPluginDependency + 305.ImportedFromIB2 + 310.IBPluginDependency + 310.ImportedFromIB2 + 348.IBPluginDependency + 348.ImportedFromIB2 + 349.IBPluginDependency + 349.ImportedFromIB2 + 350.IBPluginDependency + 350.ImportedFromIB2 + 351.IBPluginDependency + 351.ImportedFromIB2 + 352.IBPluginDependency + 352.ImportedFromIB2 + 353.IBPluginDependency + 353.ImportedFromIB2 + 354.IBPluginDependency + 354.ImportedFromIB2 + 363.IBPluginDependency + 363.ImportedFromIB2 + 364.IBPluginDependency + 364.ImportedFromIB2 + 365.IBPluginDependency + 365.ImportedFromIB2 + 368.IBPluginDependency + 368.ImportedFromIB2 + 369.IBPluginDependency + 369.ImportedFromIB2 + 370.IBPluginDependency + 370.ImportedFromIB2 + 371.IBPluginDependency + 371.ImportedFromIB2 + 372.IBPluginDependency + 372.ImportedFromIB2 + 374.IBPluginDependency + 374.ImportedFromIB2 + 375.IBPluginDependency + 375.ImportedFromIB2 + 376.IBPluginDependency + 376.ImportedFromIB2 + 377.IBPluginDependency + 377.ImportedFromIB2 + 379.IBPluginDependency + 379.ImportedFromIB2 + 380.IBPluginDependency + 380.ImportedFromIB2 + 381.IBPluginDependency + 381.ImportedFromIB2 + 382.IBPluginDependency + 382.ImportedFromIB2 + 383.IBPluginDependency + 383.ImportedFromIB2 + 384.IBPluginDependency + 384.ImportedFromIB2 + 385.IBPluginDependency + 385.ImportedFromIB2 + 386.IBPluginDependency + 386.ImportedFromIB2 + 419.IBPluginDependency + 419.ImportedFromIB2 + 420.IBPluginDependency + 420.ImportedFromIB2 + 421.IBPluginDependency + 421.ImportedFromIB2 + 423.IBPluginDependency + 423.ImportedFromIB2 + 435.IBPluginDependency + 435.ImportedFromIB2 + 5.IBPluginDependency + 5.ImportedFromIB2 + 524.IBPluginDependency + 524.ImportedFromIB2 + 526.IBPluginDependency + 526.ImportedFromIB2 + 527.IBPluginDependency + 527.ImportedFromIB2 + 532.IBPluginDependency + 532.ImportedFromIB2 + 533.IBPluginDependency + 533.ImportedFromIB2 + 535.IBPluginDependency + 535.ImportedFromIB2 + 536.IBPluginDependency + 536.ImportedFromIB2 + 537.IBPluginDependency + 537.ImportedFromIB2 + 538.IBPluginDependency + 538.ImportedFromIB2 + 541.IBPluginDependency + 541.ImportedFromIB2 + 543.IBPluginDependency + 543.ImportedFromIB2 + 544.IBPluginDependency + 544.ImportedFromIB2 + 545.IBPluginDependency + 545.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBPluginDependency + 57.ImportedFromIB2 + 573.IBPluginDependency + 573.ImportedFromIB2 + 574.IBPluginDependency + 574.ImportedFromIB2 + 575.IBPluginDependency + 575.ImportedFromIB2 + 58.IBPluginDependency + 58.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + + + + + + + + + + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 300295 + + + + YES + + NSFormatter + + + YES + + YES + + + YES + + + + YES + + YES + + + YES + + + + IBUserSource + + + + + FirstResponder + + + YES + + YES + alignCenter: + alignJustified: + alignLeft: + alignRight: + arrangeInFront: + centerSelectionInVisibleArea: + changeFont: + checkSpelling: + clear: + clearRecentDocuments: + complete: + copy: + copyFont: + copyRuler: + cut: + delete: + deminiaturize: + fax: + hide: + hideOtherApplications: + loosenKerning: + lowerBaseline: + makeKeyAndOrderFront: + miniaturize: + newDocument: + openDocument: + orderBack: + orderFront: + orderFrontColorPanel: + orderFrontHelpPanel: + orderOut: + outline: + paste: + pasteAsPlainText: + pasteAsRichText: + pasteFont: + pasteRuler: + pause: + performClose: + performFindPanelAction: + performMiniaturize: + performZoom: + play: + print: + printDocument: + raiseBaseline: + record: + redo: + resume: + revertDocumentToSaved: + run: + runPageLayout: + runToolbarCustomizationPalette: + saveAllDocuments: + saveDocument: + saveDocumentAs: + saveDocumentTo: + selectAll: + selectText: + showGuessPanel: + showHelp: + start: + startSpeaking: + stop: + stopSpeaking: + subscript: + superscript: + terminate: + tightenKerning: + toggleContinuousSpellChecking: + toggleRuler: + toggleToolbarShown: + turnOffKerning: + turnOffLigatures: + underline: + undo: + unhideAllApplications: + unscript: + useAllLigatures: + useStandardKerning: + useStandardLigatures: + + + YES + id + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YES + + YES + + + YES + + + + + + + + + X11Controller + NSObject + + YES + + YES + apps_table_cancel: + apps_table_delete: + apps_table_done: + apps_table_duplicate: + apps_table_new: + apps_table_show: + bring_to_front: + close_window: + enable_fullscreen_changed: + minimize_window: + next_window: + prefs_changed: + prefs_show: + previous_window: + toggle_fullscreen: + x11_help: + zoom_window: + + + YES + + + + + + + + + + + + + + + + + + + + + YES + + YES + apps_separator + apps_table + depth + dock_apps_menu + dock_menu + dock_window_separator + enable_auth + enable_fullscreen + enable_keyequivs + enable_tcp + fake_buttons + prefs_panel + sync_keymap + toggle_fullscreen_item + use_sysbeep + window_separator + x11_about_item + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + 3 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AAAAAy5AAAAAAAAAAAAAAAAAABqyQ + + + diff --git a/hw/xquartz/bundle/English.lproj/main.nib/info.nib b/hw/xquartz/bundle/English.lproj/main.nib/info.nib deleted file mode 100644 index 88bc6260d..000000000 --- a/hw/xquartz/bundle/English.lproj/main.nib/info.nib +++ /dev/null @@ -1,18 +0,0 @@ - - - - - IBFramework Version - 588 - IBOpenObjects - - 244 - 29 - 423 - - IBSystem Version - 9A356 - targetFramework - IBCocoaFramework - - diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib index 8b31450ff5c9a6357f70baf56268899dee194109..194f4df7fdb98fef6f7ddc27edea49aab5e51e80 100644 GIT binary patch literal 33883 zcmdRX2YeLO+V?qUX12{F*-a-Q$)-Vi?~P5*F1>d`NEQer*^ojnb3hSAKtvD)l&&Ba z5U_#>NJmtv1+f=wc-}m{xm+a1-IpsM|`9I~%jBBi`ZEi_Q zI)^YKh(kOQkOt|IVOYdedsB0*qhU})i=%OPL{(Gu#9FvCEW$BvlD)d6*%RS~>)%9L zq#JE5N>DG>RJByexYFp+XJAkJ40}ys+f7fKxM(CI2_>U+l#MK?7?q$3)C(;{_oB6E z1KNl-p~ulSv>iQ(cA{Nq588`fLHepZfh5c|a z4#8#|io4%xU{VO%s9!zFVm zTq>8&WpH_1DObVu=Z0~^xv^XoH<7F58o4RlbZ!Pmx%u4P+&$cKXnjAof?LI{et;d_14RXY)CHE^pz>`3m03+xWixP<|LcoFBti z@-_TqzK*Zwr|{GH8T?Fs7BBO6@r(Go`Fr@K{7QZm{~*7bU&n9exA0r}C-`0bUj8}$ zd43;%kUzv9Axi;Ys0H z;Wgoua9VgnI4@if-WEO(J{CR`z7u{Deir`J2pUl%X-pbVO&3j&CQK8qiPA)C;xq}G zL`|9|Pm`}H(DcxhXnJaTX?kn=YldltYer~BYQ}0NXeMeJHB&UrnpVwJ%`DAq4b?2t z+^xAsvsiPVX1QjS=0VL`%{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@h$xYWMAICtR`2_MLKI_>Len(SvMh_-_kG`IlVvSu)3V$x%W~z))ih1> z-J17@=lLt1HvmBxis2ZEaE!q?Ou!_>A`bDGfdnKW1;T8kAsq{`7)!7W%aMybhMshqSax$lK8mDs>6PZjh zm2)|t3%H1x%wi5#auru|4cD=V#Vlbd%eaj@xrh6Ch(~#Xr+JPSd4<<`gEx7LRjlS6 z-e(PKS;u-l~>MLDadddXF8a+imCtB?B2OWyL4 zuLdhXK?+ugLKUXb8mlNpD@Ic^Qwd5`vZz$e(L80yaaN~HWhq-Ll&d`Dt3ZV+Qn5-@ zsxocW4(--H9n=vW*D0OV1zpxPm8(LPs#3M?>VY1rPW5`C=W5U^z1ADOSBpOBtG?@( ze(R6^S~u%q&eqdh%+=h?-8{_G`q}{VHXrjfKl8Uh8)Cz3gpIOri?B$GvS^F3Sc|iG jOR{83u{2A!3|ng1mSd}Jt)sMY%*m Date: Sun, 10 Feb 2008 18:27:52 -0800 Subject: [PATCH 469/552] XQuartz: Added option for setting quartz-wm click-through preference (cherry picked from commit bf54c267cba97b2b3b9a621da0575776a388b2cb) --- hw/xquartz/X11Application.h | 1 + hw/xquartz/X11Controller.h | 54 +- hw/xquartz/X11Controller.m | 4 +- .../English.lproj/main.nib/designable.nib | 4673 ++++++++--------- .../English.lproj/main.nib/keyedobjects.nib | Bin 33883 -> 35390 bytes 5 files changed, 2374 insertions(+), 2358 deletions(-) diff --git a/hw/xquartz/X11Application.h b/hw/xquartz/X11Application.h index af5aea2ce..86da67f2e 100644 --- a/hw/xquartz/X11Application.h +++ b/hw/xquartz/X11Application.h @@ -98,5 +98,6 @@ extern int quartzHasRoot, quartzEnableRootless; #define PREFS_XP_OPTIONS "xp_options" #define PREFS_ENABLE_STEREO "enable_stereo" #define PREFS_LOGIN_SHELL "login_shell" +#define PREFS_QUARTZ_WM_CLICK_THROUGH "wm_click_through" #endif /* X11APPLICATION_H */ diff --git a/hw/xquartz/X11Controller.h b/hw/xquartz/X11Controller.h index 47f5220e4..64d5cd1ce 100644 --- a/hw/xquartz/X11Controller.h +++ b/hw/xquartz/X11Controller.h @@ -37,29 +37,30 @@ @interface X11Controller : NSObject { - NSPanel *prefs_panel; + IBOutlet NSPanel *prefs_panel; - NSButton *fake_buttons; - NSButton *enable_fullscreen; - NSButton *use_sysbeep; - NSButton *enable_keyequivs; - NSButton *sync_keymap; - NSButton *enable_auth; - NSButton *enable_tcp; - NSPopUpButton *depth; + IBOutlet NSButton *fake_buttons; + IBOutlet NSButton *enable_fullscreen; + IBOutlet NSButton *use_sysbeep; + IBOutlet NSButton *enable_keyequivs; + IBOutlet NSButton *sync_keymap; + IBOutlet NSButton *click_through; + IBOutlet NSButton *enable_auth; + IBOutlet NSButton *enable_tcp; + IBOutlet NSPopUpButton *depth; - NSMenuItem *x11_about_item; - NSMenuItem *window_separator; - NSMenuItem *dock_window_separator; - NSMenuItem *apps_separator; - NSMenuItem *toggle_fullscreen_item; - NSMenu *dock_apps_menu; - NSTableView *apps_table; + IBOutlet NSMenuItem *x11_about_item; + IBOutlet NSMenuItem *window_separator; + IBOutlet NSMenuItem *dock_window_separator; + IBOutlet NSMenuItem *apps_separator; + IBOutlet NSMenuItem *toggle_fullscreen_item; + IBOutlet NSMenu *dock_apps_menu; + IBOutlet NSTableView *apps_table; NSArray *apps; NSMutableArray *table_apps; - NSMenu *dock_menu; + IBOutlet NSMenu *dock_menu; int checked_window_item; x_list *pending_apps; @@ -74,6 +75,25 @@ - (void) set_can_quit:(BOOL)state; - (void) server_ready; +- (IBAction) apps_table_show:(id)sender; +- (IBAction) apps_table_cancel:(id)sender; +- (IBAction) apps_table_done:(id)sender; +- (IBAction) apps_table_new:(id)sender; +- (IBAction) apps_table_duplicate:(id)sender; +- (IBAction) apps_table_delete:(id)sender; +- (IBAction) bring_to_front:(id)sender; +- (IBAction) close_window:(id)sender; +- (IBAction) minimize_window:(id)sender; +- (IBAction) zoom_window:(id)sender; +- (IBAction) next_window:(id)sender; +- (IBAction) previous_window:(id)sender; +- (IBAction) enable_fullscreen_changed:(id)sender; +- (IBAction) toggle_fullscreen:(id)sender; +- (IBAction) prefs_changed:(id)sender; +- (IBAction) prefs_show:(id)sender; +- (IBAction) quit:(id)sender; +- (IBAction) x11_help:(id)sender; + @end #endif /* __OBJC__ */ diff --git a/hw/xquartz/X11Controller.m b/hw/xquartz/X11Controller.m index d3f83656c..5111eafc3 100644 --- a/hw/xquartz/X11Controller.m +++ b/hw/xquartz/X11Controller.m @@ -613,7 +613,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row quartzUseSysBeep = [use_sysbeep intValue]; X11EnableKeyEquivalents = [enable_keyequivs intValue]; darwinSyncKeymap = [sync_keymap intValue]; - + /* after adding prefs here, also add to [X11Application read_defaults] and below */ @@ -621,6 +621,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep]; [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents]; [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap]; + [NSApp prefs_set_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH value:[click_through intValue]]; [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:![enable_auth intValue]]; [NSApp prefs_set_boolean:@PREFS_NO_TCP value:![enable_tcp intValue]]; [NSApp prefs_set_integer:@PREFS_DEPTH value:[depth selectedTag]]; @@ -635,6 +636,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row [enable_keyequivs setIntValue:X11EnableKeyEquivalents]; [sync_keymap setIntValue:darwinSyncKeymap]; [sync_keymap setEnabled:darwinKeymapFile == NULL]; + [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_QUARTZ_WM_CLICK_THROUGH default:NO]]; [enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]]; [enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]]; diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib index c267e45e6..08b381039 100644 --- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib +++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib @@ -8,85 +8,86 @@ 352.00 YES + YES - com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - + YES - + NSApplication - - FirstResponder + + FirstResponder - + NSApplication - - MainMenu + + MainMenu YES - - - X11 - + + + X11 + 1048576 2147483647 - - NSImage + + NSImage NSMenuCheckmark - - + + NSMenuMixedState submenuAction: - - + + YES - - + + About X11 - + 2147483647 - - + + - - + + Preferences... , 1048576 2147483647 - - + + - - + + YES YES - - + + 1048576 2147483647 - - + + - - + + Services - + 1048576 2147483647 - - + + submenuAction: - + Services @@ -96,343 +97,343 @@ _NSServicesMenu - - + + YES YES - - + + 1048576 2147483647 - - + + - - + + Toggle Full Screen - a + a 1572864 2147483647 - - + + - - + + YES YES - - + + 1048576 2147483647 - - + + - - + + Hide X11 h 1048576 2147483647 - - + + 42 - - + + Hide Others - + 1048576 2147483647 - - + + - - + + Show All - + 1048576 2147483647 - - + + 42 - - + + YES YES - - + + 1048576 2147483647 - - + + - - + + Quit X11 q 1048576 2147483647 - - + + _NSAppleMenu - - - Applications - + + + Applications + 1048576 2147483647 - - + + submenuAction: - - + + YES - - + + YES YES - - + + 1048576 2147483647 - - + + - - + + Customize... - + 1048576 2147483647 - - + + - - - Edit - + + + Edit + 1048576 2147483647 - - + + submenuAction: - - + + YES - - + + Undo z 1048576 2147483647 - - + + - - + + Redo Z 1048576 2147483647 - - + + - - + + YES YES - - + + 1048576 2147483647 - - + + - - + + Cut x 1048576 2147483647 - - + + - - + + Copy c 1048576 2147483647 - - + + - - + + Paste v 1048576 2147483647 - - + + - - + + Delete - + 1048576 2147483647 - - + + - - + + Select All - + 1048576 2147483647 - - + + - - + + Window - + 1048576 2147483647 - - + + submenuAction: - + Window YES - - - Minimize Window + + + Minimize m 1048576 2147483647 - - + + - - - Close Window + + + Zoom + + 1048576 + 2147483647 + + + + + + Cycle Through Windows + ` + 1048840 + 2147483647 + + + + + + Reverse Cycle Through Windows + ~ + 1179914 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close w 1048576 2147483647 - - + + - - - Zoom Window - - 1048576 - 2147483647 - - - - - + + YES YES - - + + 1048576 2147483647 - - + + - - - Next Window - 75yDA - 1048576 - 2147483647 - - - - - - Previous Window - 75yCA - 1048576 - 2147483647 - - - - - - YES - YES - - - 1048576 - 2147483647 - - - - - + + Bring All to Front - + 1048576 2147483647 - - + + - - + + YES YES - - + + 1048576 2147483647 - - + + _NSWindowsMenu - - - Help - + + + Help + 1048576 2147483647 - - + + submenuAction: - - + + YES - - + + X11 Help - + 1048576 2147483647 - - + + @@ -440,562 +441,599 @@ _NSMainMenu - - X11Controller + + X11Controller - + 3 2 - {{319, 323}, {478, 316}} + {{319, 294}, {481, 345}} 1350041600 X11 Preferences - NSPanel + NSPanel View {3.40282e+38, 3.40282e+38} {213, 107} - + 256 YES - - + + 256 YES - - + + 256 YES - - + + 256 - {{18, 90}, {402, 18}} - + {{18, 243}, {402, 18}} + YES - + 67239424 0 - Use system alert effect - - LucidaGrande + Emulate three button mouse + + LucidaGrande 1.300000e+01 1044 - + 1211912703 2 - + NSSwitch - - + + 200 25 - - + + 256 - {{36, 56}, {385, 28}} - + {{36, 93}, {385, 31}} + YES - + 67239424 4194304 - X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel. + When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier. - + 1.100000e+01 3100 - - + + 6 - System + System controlColor - + 3 MC42NjY2NjY2OQA - + 6 - + controlTextColor - + 3 MAA - - + + 256 - {{74, 209}, {128, 26}} - + {{36, 208}, {385, 29}} + YES - - -2076049856 - 1024 - - - 109199615 - 1 - - - 1.300000e+01 - 16 - - - - - - - - 400 - 75 - - - From Display - - 1048576 - 2147483647 - 1 - - - _popUpItemAction: - -1 - - - YES - - - OtherViews - - - YES - - - - 256 Colors - - 1048576 - 2147483647 - - - _popUpItemAction: - 8 - - - - - Thousands - - 1048576 - 2147483647 - - - _popUpItemAction: - 15 - - - - - Millions - - 1048576 - 2147483647 - - - _popUpItemAction: - 24 - - - - - 3 - YES - YES - 1 - - - - - 256 - {{17, 212}, {55, 20}} - - YES - + 67239424 4194304 - Q29sb3JzOgo - - - - - - - - - 256 - {{36, 190}, {392, 14}} - - YES - - 67239424 - 4194304 - This option takes effect when X11 is launched again. + SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs +ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA - - - + + + - - + + 256 - {{18, 156}, {409, 23}} - + {{18, 130}, {402, 18}} + YES - + 67239424 0 - Full screen mode - - + Enable key equivalents under X11 + + 1211912703 2 - - - + + + 200 25 - - + + 256 - {{36, 119}, {385, 31}} - + {{36, 159}, {385, 14}} + YES - + 67239424 4194304 - Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode. + Allows input menu changes to overwrite the current X11 keymap. - - - + + + + + + + + 256 + {{18, 179}, {402, 18}} + + YES + + 67239424 + 0 + Follow system keyboard layout + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{18, 69}, {402, 18}} + + YES + + 67239424 + 0 + Click-through Inactive Windows + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{33, 32}, {385, 31}} + + YES + + 67239424 + 4194304 + When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it. + + + + - {{10, 33}, {438, 253}} - + {{10, 33}, {438, 279}} + - {{10, 7}, {458, 299}} - + {{10, 10}, {458, 325}} + YES - + 1 - - - 256 - - YES - - - 256 - {{18, 217}, {402, 18}} - - YES - - 67239424 - 0 - Emulate three button mouse - - - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{36, 67}, {385, 31}} - - YES - - 67239424 - 4194304 - When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier. - - - - - - - - - 256 - {{36, 182}, {385, 29}} - - YES - - 67239424 - 4194304 - SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs -ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA - - - - - - - - - 256 - {{18, 104}, {402, 18}} - - YES - - 67239424 - 0 - Enable key equivalents under X11 - - - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{36, 133}, {385, 14}} - - YES - - 67239424 - 4194304 - Allows input menu changes to overwrite the current X11 keymap. - - - - - - - - - 256 - {{18, 153}, {402, 18}} - - YES - - 67239424 - 0 - Follow system keyboard layout - - - 1211912703 - 2 - - - - 200 - 25 - - - - {{10, 33}, {438, 253}} - + Input - - + + - + 2 - - Output - - - - - + 256 YES - - + + 256 - {{18, 217}, {402, 18}} - + {{18, 116}, {402, 18}} + YES - + + 67239424 + 0 + Use system alert effect + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{36, 82}, {385, 28}} + + YES + + 67239424 + 4194304 + X11 beeps will use the standard system alert, as defined in the Sound Effects system preferences panel. + + + + + + + + + 256 + {{74, 235}, {128, 26}} + + YES + + -2076049856 + 1024 + + + 109199615 + 1 + + + 1.300000e+01 + 16 + + + + + + + + 400 + 75 + + + From Display + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + -1 + + + YES + + + OtherViews + + + YES + + + + 256 Colors + + 1048576 + 2147483647 + + + _popUpItemAction: + 8 + + + + + Thousands + + 1048576 + 2147483647 + + + _popUpItemAction: + 15 + + + + + Millions + + 1048576 + 2147483647 + + + _popUpItemAction: + 24 + + + + + 3 + YES + YES + 1 + + + + + 256 + {{17, 238}, {55, 20}} + + YES + + 67239424 + 4194304 + Q29sb3JzOgo + + + + + + + + + 256 + {{36, 216}, {392, 14}} + + YES + + 67239424 + 4194304 + This option takes effect when X11 is launched again. + + + + + + + + + 256 + {{18, 182}, {409, 23}} + + YES + + 67239424 + 0 + Full screen mode + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{36, 145}, {385, 31}} + + YES + + 67239424 + 4194304 + Enables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode. + + + + + + + + {{10, 33}, {438, 279}} + + Output + + + + + + + 256 + + YES + + + 256 + {{18, 243}, {402, 18}} + + YES + 67239424 0 Authenticate connections - - + + 1211912703 2 - - - + + + 200 25 - - + + 256 - {{18, 140}, {402, 18}} - + {{18, 166}, {402, 18}} + YES - + 67239424 0 Allow connections from network clients - - + + 1211912703 2 - - - + + + 200 25 - - + + 256 - {{36, 169}, {385, 42}} - + {{36, 195}, {385, 42}} + YES - + 67239424 4194304 TGF1bmNoaW5nIFgxMSB3aWxsIGNyZWF0ZSBYYXV0aG9yaXR5IGFjY2Vzcy1jb250cm9sIGtleXMuIElm IHRoZSBzeXN0ZW0ncyBJUCBhZGRyZXNzIGNoYW5nZXMsIHRoZXNlIGtleXMgYmVjb21lIGludmFsaWQg d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - - - + + + - - + + 256 - {{36, 92}, {385, 42}} - + {{36, 118}, {385, 42}} + YES - + 67239424 4194304 If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed. - - - + + + - - + + 256 - {{17, 20}, {404, 14}} - + {{20, 17}, {404, 14}} + YES - + 67239424 4194304 These options take effect when X11 is next launched. - - - + + + - {{10, 33}, {438, 253}} + {{10, 33}, {438, 279}} Security - - + + - - + + 0 YES YES - {478, 316} + {481, 345} {{0, 0}, {1440, 878}} {213, 129} {3.40282e+38, 3.40282e+38} x11_prefs - + 11 2 - {{279, 270}, {486, 310}} + {{279, 253}, {486, 327}} 1350041600 X11 Application Menu - + View {3.40282e+38, 3.40282e+38} {213, 107} - + 256 YES - - + + 303 - {{388, 12}, {84, 32}} - + {{268, 12}, {84, 32}} + YES - + -2080244224 137887744 Done - - + + -2038284033 1 - + Helvetica 1.300000e+01 16 - + @@ -1003,21 +1041,21 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 25 - - + + 301 - {{372, 230}, {100, 32}} - + {{372, 247}, {100, 32}} + YES - + 67239424 137887744 Duplicate - - + + -2038284033 1 - + @@ -1028,21 +1066,21 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 25 - - + + 301 - {{372, 198}, {100, 32}} - + {{372, 215}, {100, 32}} + YES - + 67239424 137887744 Remove - - + + -2038284033 1 - + @@ -1053,39 +1091,39 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 25 - - + + 307 YES - - + + 2304 YES - - + + 256 {333, 197} - + YES - - + + 256 {333, 17} - - + + - - + + 256 {{334, 0}, {16, 17}} - + YES - - 7.900000e+01 + + 1.110000e+02 4.000000e+01 1.000000e+03 @@ -1093,35 +1131,36 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 0 Name - + 3 MC4zMzMzMzI5OQA - + 6 - + headerTextColor - + - + 338820672 1024 - - - + Text Cell + + + 3 MQA - + 3 YES YES - + - - 1.937310e+02 + + 1.327310e+02 6.273100e+01 1.000000e+03 @@ -1129,24 +1168,25 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 0 Command - - + + - + 338820672 1024 - - - - + + + + + 3 YES YES - + - - 5.100000e+01 + + 8.000000e+01 1.000000e+01 1.000000e+03 @@ -1156,42 +1196,43 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 6 - + headerColor - + - + - + 338820672 1024 + - + 1.200000e+01 16 - + YES - + 6 - + controlBackgroundColor - + - + 3 YES YES - + 3.000000e+00 2.000000e+00 - + 6 - + gridColor 3 @@ -1207,72 +1248,73 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 {{1, 17}, {333, 197}} - - - - + + + + 4 - - + + 256 {{334, 17}, {15, 197}} - - - _doScroller: + + + _doScroller: 9.949238e-01 - - + + 256 {{1, 214}, {333, 15}} - + 1 - - - 9.940299e-01 + + + 6.885246e-01 - - + + 2304 YES - + {{1, 0}, {333, 17}} - - - - + + + + 4 - + - {{20, 60}, {350, 230}} - - + {{20, 77}, {350, 230}} + + 50 - - - - + + + + + QSAAAEEgAABBmAAAQZgAAA - - + + 303 - {{304, 12}, {84, 32}} - + {{352, 12}, {84, 32}} + YES - - 67239424 + + -2080244224 137887744 Cancel - - + + -2038284033 1 - + @@ -1283,21 +1325,21 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 25 - - + + 301 - {{372, 262}, {100, 32}} - + {{372, 279}, {100, 32}} + YES - + 67239424 137887744 Add Item - - + + -2038284033 1 - + @@ -1309,66 +1351,66 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - {{1, 1}, {486, 310}} + {486, 327} {{0, 0}, {1440, 878}} {213, 129} {3.40282e+38, 3.40282e+38} x11_apps - + Menu YES - - + + YES YES - - + + 1048576 2147483647 - - + + - - - - + + + + 1048576 2147483647 - - + + submenuAction: - - + + YES - - + + YES YES - - + + 1048576 2147483647 - - + + - - + + Q3VzdG9taXpl4oCmA - + 1048576 2147483647 - - + + - + @@ -1377,1384 +1419,1438 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 cut: - - + + 175 paste: - - + + 176 redo: - - + + 178 selectAll: - - + + 179 undo: - - + + 180 copy: - - + + 181 delete: - - + + 195 minimize_window: - - + + 202 close_window: - - + + 205 zoom_window: - - + + 206 bring_to_front: - - + + 207 - - - window_separator - - - - 260 - hideOtherApplications: - - + + 263 apps_separator - - + + 273 apps_table - - + + 301 apps_table_done: - - + + 302 apps_table_delete: - - + + 303 apps_table_duplicate: - - + + 304 - apps_table_show: - - + apps_table_show: + + 308 apps_table_cancel: - - + + 309 apps_table_new: - - + + 311 prefs_show: - - + + 318 x11_about_item - - + + 321 enable_auth - - + + 387 enable_tcp - - + + 388 depth - - + + 389 use_sysbeep - - + + 390 fake_buttons - - + + 391 sync_keymap - - + + 392 enable_keyequivs - - + + 393 - prefs_changed: - - + prefs_changed: + + 394 - - - + + + 395 - - - + + + 396 - - - + + + 397 - - - + + + 398 - - - + + + 399 - - - + + + 401 prefs_panel - - + + 402 x11_help: - - + + 422 dockMenu - - + + 426 dock_menu - - + + 428 delegate - - + + 429 hide: - - + + 430 unhideAllApplications: - - + + 431 - - - terminate: - - - - 432 - orderFrontStandardAboutPanel: - - + + 433 dock_apps_menu - - + + 530 dock_window_separator - - + + 531 - - - + + + 534 next_window: - - + + 539 previous_window: - - + + 540 enable_fullscreen - - + + 546 enable_fullscreen_changed: - - + + 547 toggle_fullscreen: - - + + 548 toggle_fullscreen_item - - + + 549 + + + + + + + 300300 + + + + window_separator + + + + 300331 + + + + click_through + + + + 300332 + + + + quit: + + + + 300333 + + + + menu + + + + 300334 + YES 0 - + YES - + -2 - - + + RmlsZSdzIE93bmVyA -1 - - + + First Responder -3 - - + + Application 29 - + YES - - - - - + + + + + - - + + 19 - + YES - + - + 24 - + YES - - - - - - - - - + + + + + + + + + - + 5 - - + + 23 - - + + 92 - - + + 203 - - + + 204 - - - - - 208 - - + + 536 - - + + 537 - - + + 538 - - + + 56 - + YES - + - + 57 - + YES - - - - - - - - - - - - + + + + + + + + + + + + - + 58 - - + + 129 - - + + 131 - + YES - + - + 130 - - + + 134 - - + + 136 - - + + 143 - - + + 144 - - + + 145 - - + + 149 - - + + 150 - - + + 544 - - + + 545 - - + + 163 - + YES - + - + 169 - + YES - - - - - - - - + + + + + + + + - + 156 - - + + 157 - - + + 158 - - + + 160 - - + + 164 - - + + 171 - - + + 172 - - + + 173 - - + + 269 - + YES - + - + 270 - + YES - - + + - + 272 - - + + 305 - - + + 419 - + YES - + - + 420 - + YES - + - + 421 - - + + 196 - - - + + + 244 - + YES - + - + PrefsPanel 245 - + YES - + - + 348 - + YES - - - + + + - + 349 - + YES - + - + 351 - + YES - - - - - - + + + + + + + + - + 363 - + YES - + - + 364 - + YES - + - + 365 - + YES - + - + 368 - + YES - + - + 369 - + YES - + - + 370 - + YES - + - + 352 - + YES - + - + 350 - + YES - - - - - - - + + + + + + + - + 371 - + YES - + - + 372 - + YES - + - + 382 - + YES - + - + 385 - + YES - + - + 386 - + YES - + - + 541 - + YES - + - + 543 - + YES - + - + 353 - + YES - + - + 354 - + YES - - - - - + + + + + - + 374 - + YES - + - + 375 - + YES - + - + 376 - + YES - + - + 377 - + YES - + - + 379 - + YES - + - + 285 - + YES - + - + EditPrograms 286 - + YES - - - - - - + + + + + + - - - - 291 - - - YES - - - - - - 292 - - - YES - - - - - - 293 - - - YES - - - - - - 295 - - - YES - - - - - - - - - 296 - - - YES - - - - - - - - 297 - - - YES - - - - - - 574 - - - - - 298 - - - YES - - - - - - 573 - - - - - 535 - - - YES - - - - - - 575 - - - - - 299 - - - YES - - - - - - 310 - - - YES - - - + 423 - + YES - - + + - + DockMenu 524 - - + + 526 - + YES - + - + 527 - + YES - - + + - + 532 - - + + 533 - - + + 100363 - - + + 100364 - - + + 100365 - - + + 100368 - - + + 100369 - - + + 100370 - - + + 100371 - - + + 100372 - - + + 100382 - + YES - + - + 100385 - - + + 100386 - - + + 100541 - - + + 100543 - - + + 100374 - - + + 100375 - - + + 100376 - - + + 100377 - - + + 100379 - - - - - 100291 - - - - - 100292 - - - - - 100293 - - - - - 100299 - - - - - 100310 - - + + 380 - + YES - - - - + + + + - + 435 - - + + 384 - - + + 383 - - + + 381 - - + + - 100295 - - + 300296 + + + YES + + + - 200295 - - + 300297 + + + + + 300298 + + + YES + + + + + + 300299 + + + + + 295 + + + YES + + + + + + 300295 - - + + + + + 200295 + + + + + 100295 + + + + + 296 + + + YES + + + + + + + + 535 + + + YES + + + + + + 575 + + + + + 298 + + + YES + + + + + + 573 + + + + + 297 + + + YES + + + + + + 574 + + + + + 310 + + + YES + + + + + + 100310 + + + + + 292 + + + YES + + + + + + 100292 + + + + + 293 + + + YES + + + + + + 100293 + + + + + 299 + + + YES + + + + + + 100299 + + + + + 291 + + + YES + + + + + + 100291 + + + + + 300330 + + @@ -2801,6 +2897,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 164.ImportedFromIB2 169.IBPluginDependency 169.ImportedFromIB2 + 169.editorWindowContentRectSynchronizationRect 171.IBPluginDependency 171.ImportedFromIB2 172.IBPluginDependency @@ -2816,14 +2913,15 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 203.ImportedFromIB2 204.IBPluginDependency 204.ImportedFromIB2 - 208.IBPluginDependency - 208.ImportedFromIB2 23.IBPluginDependency 23.ImportedFromIB2 24.IBPluginDependency 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect 244.IBPluginDependency + 244.IBWindowTemplateEditedContentRect 244.ImportedFromIB2 + 244.editorWindowContentRectSynchronizationRect 244.windowTemplate.hasMaxSize 244.windowTemplate.hasMinSize 244.windowTemplate.maxSize @@ -2834,10 +2932,15 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 269.ImportedFromIB2 270.IBPluginDependency 270.ImportedFromIB2 + 270.editorWindowContentRectSynchronizationRect 272.IBPluginDependency 272.ImportedFromIB2 285.IBPluginDependency + 285.IBViewEditorWindowController.showingBoundsRectangles + 285.IBViewEditorWindowController.showingLayoutRectangles + 285.IBWindowTemplateEditedContentRect 285.ImportedFromIB2 + 285.editorWindowContentRectSynchronizationRect 285.windowTemplate.hasMaxSize 285.windowTemplate.hasMinSize 285.windowTemplate.maxSize @@ -2846,6 +2949,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 286.ImportedFromIB2 29.IBPluginDependency 29.ImportedFromIB2 + 29.editorWindowContentRectSynchronizationRect 291.IBPluginDependency 291.ImportedFromIB2 292.IBPluginDependency @@ -2863,6 +2967,12 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 299.IBPluginDependency 299.ImportedFromIB2 300295.IBShouldRemoveOnLegacySave + 300296.IBPluginDependency + 300296.ImportedFromIB2 + 300298.IBPluginDependency + 300298.ImportedFromIB2 + 300330.IBPluginDependency + 300330.ImportedFromIB2 305.IBPluginDependency 305.ImportedFromIB2 310.IBPluginDependency @@ -2963,6 +3073,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 56.ImportedFromIB2 57.IBPluginDependency 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect 573.IBPluginDependency 573.ImportedFromIB2 574.IBPluginDependency @@ -2976,217 +3087,232 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3.40282e+38, 3.40282e+38} - {213, 107} - - - - - - - - - - - - - {3.40282e+38, 3.40282e+38} - {213, 107} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{202, 626}, {154, 153}} + + + + + + + + + + + + + + + + + + + + {{271, 666}, {301, 153}} + + {{184, 290}, {481, 345}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {213, 107} + + + + + + + {{100, 746}, {155, 33}} + + + + + + {{433, 406}, {486, 327}} + + + + + + + + + + + {{67, 819}, {336, 20}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{79, 616}, {218, 203}} + + + + + + + + + + @@ -3209,13 +3335,13 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - 300295 + 300334 YES - NSFormatter + YES @@ -3236,196 +3362,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - IBUserSource - - - - - FirstResponder - - - YES - - YES - alignCenter: - alignJustified: - alignLeft: - alignRight: - arrangeInFront: - centerSelectionInVisibleArea: - changeFont: - checkSpelling: - clear: - clearRecentDocuments: - complete: - copy: - copyFont: - copyRuler: - cut: - delete: - deminiaturize: - fax: - hide: - hideOtherApplications: - loosenKerning: - lowerBaseline: - makeKeyAndOrderFront: - miniaturize: - newDocument: - openDocument: - orderBack: - orderFront: - orderFrontColorPanel: - orderFrontHelpPanel: - orderOut: - outline: - paste: - pasteAsPlainText: - pasteAsRichText: - pasteFont: - pasteRuler: - pause: - performClose: - performFindPanelAction: - performMiniaturize: - performZoom: - play: - print: - printDocument: - raiseBaseline: - record: - redo: - resume: - revertDocumentToSaved: - run: - runPageLayout: - runToolbarCustomizationPalette: - saveAllDocuments: - saveDocument: - saveDocumentAs: - saveDocumentTo: - selectAll: - selectText: - showGuessPanel: - showHelp: - start: - startSpeaking: - stop: - stopSpeaking: - subscript: - superscript: - terminate: - tightenKerning: - toggleContinuousSpellChecking: - toggleRuler: - toggleToolbarShown: - turnOffKerning: - turnOffLigatures: - underline: - undo: - unhideAllApplications: - unscript: - useAllLigatures: - useStandardKerning: - useStandardLigatures: - - - YES - id - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - YES - - YES - - - YES - - - - - + IBUserSource + @@ -3449,29 +3387,31 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 prefs_changed: prefs_show: previous_window: + quit: toggle_fullscreen: x11_help: zoom_window: YES - - - - - - - - - - - - - - - - - + id + + + + + + + + + + + + + + + + + @@ -3480,6 +3420,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES apps_separator apps_table + click_through depth dock_apps_menu dock_menu @@ -3498,28 +3439,55 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES - - - - - - - - - - - - - - - - - + NSMenuItem + NSTableView + NSButton + NSPopUpButton + NSMenu + + + + + + + + NSPanel + + + + + - - + IBUserSource + + + + + NSFormatter + + + YES + + YES + + + YES + + + + YES + + YES + + + YES + + + + + @@ -3529,570 +3497,595 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 3 YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQkdG9wWSRhc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sYmxlbGhsa2xubHFsdGx3bHpsfWyAbINshmyJbIxsj2ySbJVsmGybbJ5soWykbKdsqmyt +bLBss2y2bLlsvGy/bMJsxWzIbMtszmzRbNRs12zabN1s4GzjbOZs6WzsbO9s8mz1bPhs+2z+bQFtBG0H +bQptDW0QbRNtFm0ZbRxtH20ibSVtKG0rbS5tMW00bTdtOm09bUBtQ21GbUltTG1ObVBtU21WbVltXG1f +bWRtZ21pbWxtb210bXltfG1/bYRth22KbYxtjm2RbZRtmW2ebaNtqG2rba5tsW2zbbZtuW28bb9txG3H +bcptzW3QbdVt2G3dbeBt423mbelt7G3vbfJt9236bf9uBG4HbgxuEW4UbhduGm4cbh9uIm4lbiduKm4t +bjBuM244bjpuPG4+bkFuRG5JbkxuT25SblduWm5cbl9uYW5kbmZuaG5qbmxubm5xbnNudm55bnxugW6E +boduim6NbpBulW6Ybptunm6gbqJupG6mbqlurG6vbrFutG63brpuvG6+bsBuxW7HbspuzW7PbtJu127a +bt1u4m7kbulu627wbvNu9m74bvtu/W8AbwVvCG8Kbw1vEG8TbxZvGW8ebydvLG8ubzNvNm84bztvPm9D +b0VvR29Mb1FvVG9Wb1tvXW9gb2NvZm9pb2xvbm9xb3Rvd296b31vgG+Cb4dvjG+Rb5NvlW+Yb5tvpG+m +b6dvsG+zb7RvvW/Ab8Fvym/PAAAAAAAAAgIAAAAAAAANIAAAAAAAAAAAAAAAAAAAb94 diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib index 194f4df7fdb98fef6f7ddc27edea49aab5e51e80..430610292bd903db47a1bf8b9f351b8395f48c25 100644 GIT binary patch literal 35390 zcmdRX349dAv;TC@?CkFBB-zb<@8-Tk?hA4!WFt2T_Yp#}gh&p^!HrAAS?A;o#I%Eij^rg90D>7BZlbg@jZROVVA+Gb$$7#$-r@k}z4&g3xpOaWtN zx-xT^`OI_766OWwWo8HS2JOv>d&FR-x5s1KNhRqc_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FYsXnNW=+AVSF4qL@@ zU88IDL;XZQGj;Y3)5J70%}q^fdm`P@u$uqM|z9}$;X1*yhOU-h#+LV~}W~13+ zwwYaKx7lY7n4{)1Q)a#}Uz!SY%A7I(H0RAlbIDvb-XSRWD zWS_S!Y%3dK+u05_(ni^6`;hY4i|tCg#;&!S?N+ Date: Mon, 11 Feb 2008 12:09:41 -0800 Subject: [PATCH 470/552] XQuartz: Fixed layout of Applications->Customize menu Now resizing it won't produce weir overlaps of the widgets. Thanks to Pelle Johansson for his help showing me how to do this. (cherry picked from commit ef3498e92d13c82633fdbe8120396bfbe1e7489a) --- .../English.lproj/main.nib/designable.nib | 1751 ++++++----------- .../English.lproj/main.nib/keyedobjects.nib | Bin 35390 -> 35529 bytes 2 files changed, 570 insertions(+), 1181 deletions(-) diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib index 08b381039..b5cfcf682 100644 --- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib +++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib @@ -1,18 +1,19 @@ - + 1050 - 9C31 - 629 - 949.26 - 352.00 + 9B18 + 639 + 949 + 343.00 YES + YES - com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin YES @@ -22,41 +23,41 @@ - FirstResponder + FirstResponder NSApplication - MainMenu + MainMenu YES - X11 - + X11 + 1048576 2147483647 - NSImage + NSImage NSMenuCheckmark - - + + NSImage NSMenuMixedState submenuAction: - + X11 YES About X11 - + 2147483647 - + @@ -65,27 +66,27 @@ 1048576 2147483647 - + YES YES - - + + 1048576 2147483647 - + Services - + 1048576 2147483647 - + submenuAction: @@ -101,32 +102,32 @@ YES YES - - + + 1048576 2147483647 - + Toggle Full Screen - a + a 1572864 2147483647 - + YES YES - - + + 1048576 2147483647 - + @@ -135,38 +136,38 @@ 1048576 2147483647 - + 42 Hide Others - + 1048576 2147483647 - + Show All - + 1048576 2147483647 - + 42 YES YES - - + + 1048576 2147483647 - + @@ -175,7 +176,7 @@ 1048576 2147483647 - + _NSAppleMenu @@ -183,51 +184,51 @@ - Applications - + Applications + 1048576 2147483647 - + submenuAction: - + Applications YES YES YES - - + + 1048576 2147483647 - + Customize... - + 1048576 2147483647 - + - Edit - + Edit + 1048576 2147483647 - + submenuAction: - + Edit YES @@ -237,7 +238,7 @@ 1048576 2147483647 - + @@ -246,18 +247,18 @@ 1048576 2147483647 - + YES YES - - + + 1048576 2147483647 - + @@ -266,7 +267,7 @@ 1048576 2147483647 - + @@ -275,7 +276,7 @@ 1048576 2147483647 - + @@ -284,25 +285,25 @@ 1048576 2147483647 - + Delete - + 1048576 2147483647 - + Select All - + a 1048576 2147483647 - + @@ -310,11 +311,11 @@ Window - + 1048576 2147483647 - + submenuAction: @@ -329,16 +330,16 @@ 1048576 2147483647 - + Zoom - + 1048576 2147483647 - + @@ -347,7 +348,7 @@ 1048840 2147483647 - + @@ -356,18 +357,18 @@ 1179914 2147483647 - + YES YES - - + + 1048576 2147483647 - + @@ -376,38 +377,38 @@ 1048576 2147483647 - + YES YES - - + + 1048576 2147483647 - + Bring All to Front - + 1048576 2147483647 - + YES YES - - + + 1048576 2147483647 - + _NSWindowsMenu @@ -415,25 +416,25 @@ - Help - + Help + 1048576 2147483647 - + submenuAction: - + Help YES X11 Help - + 1048576 2147483647 - + @@ -442,15 +443,15 @@ _NSMainMenu - X11Controller + X11Controller 3 2 - {{319, 294}, {481, 345}} + {{479, 459}, {481, 345}} 1350041600 X11 Preferences - NSPanel + NSPanel View @@ -464,193 +465,6 @@ 256 - - YES - - - 256 - - YES - - - 256 - {{18, 243}, {402, 18}} - - YES - - 67239424 - 0 - Emulate three button mouse - - LucidaGrande - 1.300000e+01 - 1044 - - - 1211912703 - 2 - - NSSwitch - - - - 200 - 25 - - - - - 256 - {{36, 93}, {385, 31}} - - YES - - 67239424 - 4194304 - When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier. - - - 1.100000e+01 - 3100 - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2OQA - - - - 6 - - controlTextColor - - 3 - MAA - - - - - - - 256 - {{36, 208}, {385, 29}} - - YES - - 67239424 - 4194304 - SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs -ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA - - - - - - - - - 256 - {{18, 130}, {402, 18}} - - YES - - 67239424 - 0 - Enable key equivalents under X11 - - - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{36, 159}, {385, 14}} - - YES - - 67239424 - 4194304 - Allows input menu changes to overwrite the current X11 keymap. - - - - - - - - - 256 - {{18, 179}, {402, 18}} - - YES - - 67239424 - 0 - Follow system keyboard layout - - - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{18, 69}, {402, 18}} - - YES - - 67239424 - 0 - Click-through Inactive Windows - - - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{33, 32}, {385, 31}} - - YES - - 67239424 - 4194304 - When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it. - - - - - - - - {{10, 33}, {438, 279}} - - - {{10, 10}, {458, 325}} @@ -659,7 +473,190 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA 1 - + + + 256 + + YES + + + 256 + {{18, 243}, {402, 18}} + + YES + + 67239424 + 0 + Emulate three button mouse + + LucidaGrande + 1.300000e+01 + 1044 + + + 1211912703 + 2 + + NSSwitch + + + + 200 + 25 + + + + + 256 + {{36, 93}, {385, 31}} + + YES + + 67239424 + 4194304 + When enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier. + + LucidaGrande + 1.100000e+01 + 3100 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 256 + {{36, 208}, {385, 29}} + + YES + + 67239424 + 4194304 + SG9sZCBPcHRpb24gYW5kIENvbW1hbmQgd2hpbGUgY2xpY2tpbmcgdG8gYWN0aXZhdGUgdGhlIG1pZGRs +ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA + + + + + + + + + 256 + {{18, 130}, {402, 18}} + + YES + + 67239424 + 0 + Enable key equivalents under X11 + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{36, 159}, {385, 14}} + + YES + + 67239424 + 4194304 + Allows input menu changes to overwrite the current X11 keymap. + + + + + + + + + 256 + {{18, 179}, {402, 18}} + + YES + + 67239424 + 0 + Follow system keyboard layout + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{18, 69}, {402, 18}} + + YES + + 67239424 + 0 + Click-through Inactive Windows + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 256 + {{33, 32}, {385, 31}} + + YES + + 67239424 + 4194304 + When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it. + + + + + + + + {{10, 33}, {438, 279}} + + Input @@ -688,8 +685,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA 1211912703 2 - - + + 200 25 @@ -724,7 +721,7 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA 109199615 1 - + LucidaGrande 1.300000e+01 16 @@ -739,12 +736,12 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA From Display - + 1048576 2147483647 1 - + _popUpItemAction: -1 @@ -760,11 +757,11 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA 256 Colors - + 1048576 2147483647 - + _popUpItemAction: 8 @@ -772,11 +769,11 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA Thousands - + 1048576 2147483647 - + _popUpItemAction: 15 @@ -784,11 +781,11 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA Millions - + 1048576 2147483647 - + _popUpItemAction: 24 @@ -848,8 +845,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA 1211912703 2 - - + + 200 25 @@ -898,8 +895,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA 1211912703 2 - - + + 200 25 @@ -919,8 +916,8 @@ ZSBhbmQgcmlnaHQgbW91c2UgYnV0dG9ucy4KA 1211912703 2 - - + + 200 25 @@ -988,11 +985,15 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 0 YES YES + + YES + + {481, 345} - {{0, 0}, {1440, 878}} + {{0, 0}, {1920, 1178}} {213, 129} {3.40282e+38, 3.40282e+38} x11_prefs @@ -1000,51 +1001,24 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 11 2 - {{279, 253}, {486, 327}} + {{537, 554}, {454, 311}} 1350041600 X11 Application Menu - + NSPanel View - {3.40282e+38, 3.40282e+38} - {213, 107} + {10000, 10000} + {320, 240} - + 256 YES - - - 303 - {{268, 12}, {84, 32}} - - YES - - -2080244224 - 137887744 - Done - - - -2038284033 - 1 - - Helvetica - 1.300000e+01 - 16 - - - - - - 200 - 25 - - - 301 - {{372, 247}, {100, 32}} + 265 + {{340, 231}, {100, 32}} YES @@ -1055,7 +1029,11 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 -2038284033 1 - + + Helvetica + 1.300000e+01 + 16 + @@ -1068,8 +1046,8 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - 301 - {{372, 215}, {100, 32}} + 265 + {{340, 199}, {100, 32}} YES @@ -1093,7 +1071,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - 307 + 274 YES @@ -1104,26 +1082,26 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 256 - {333, 197} + {301, 198} YES 256 - {333, 17} + {301, 17} 256 - {{334, 0}, {16, 17}} + {{302, 0}, {16, 17}} YES - 1.110000e+02 + 9.900000e+01 4.000000e+01 1.000000e+03 @@ -1137,7 +1115,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 6 - + System headerTextColor @@ -1145,7 +1123,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 338820672 1024 - Text Cell + Text Cell @@ -1160,7 +1138,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - 1.327310e+02 + 1.217310e+02 6.273100e+01 1.000000e+03 @@ -1174,7 +1152,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 338820672 1024 - + Text Cell @@ -1186,7 +1164,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - 8.000000e+01 + 7.100000e+01 1.000000e+01 1.000000e+03 @@ -1196,7 +1174,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 6 - + System headerColor @@ -1205,9 +1183,9 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 338820672 1024 - + Text Cell - + LucidaGrande 1.200000e+01 16 @@ -1215,7 +1193,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES 6 - + System controlBackgroundColor @@ -1232,7 +1210,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 6 - + System gridColor 3 @@ -1247,7 +1225,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES - {{1, 17}, {333, 197}} + {{1, 17}, {301, 198}} @@ -1257,20 +1235,20 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 256 - {{334, 17}, {15, 197}} + {{302, 17}, {15, 198}} - _doScroller: + _doScroller: 9.949238e-01 256 - {{1, 214}, {333, 15}} + {{1, 215}, {301, 15}} 1 - + _doScroller: 6.885246e-01 @@ -1280,7 +1258,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES - {{1, 0}, {333, 17}} + {{1, 0}, {301, 17}} @@ -1289,7 +1267,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - {{20, 77}, {350, 230}} + {{20, 60}, {318, 231}} 50 @@ -1300,10 +1278,35 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 QSAAAEEgAABBmAAAQZgAAA + + + 265 + {{340, 263}, {100, 32}} + + YES + + -2080244224 + 137887744 + Add Item + + + -2038284033 + 1 + + + + + + + + 200 + 25 + + - 303 - {{352, 12}, {84, 32}} + 257 + {{356, 12}, {84, 32}} YES @@ -1325,24 +1328,22 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 25 - + - 301 - {{372, 279}, {100, 32}} + 257 + {{272, 12}, {84, 32}} YES - - 67239424 + + -2080244224 137887744 - Add Item + Done - + -2038284033 1 - - - + @@ -1351,11 +1352,11 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - {486, 327} + {454, 311} + - {{0, 0}, {1440, 878}} - {213, 129} - {3.40282e+38, 3.40282e+38} + {{0, 0}, {1920, 1178}} + {320, 262} x11_apps @@ -1366,51 +1367,51 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES YES - - + + 1048576 2147483647 - + - - + Applications + 1048576 2147483647 - + submenuAction: - + Applications YES YES YES - - + + 1048576 2147483647 - + Q3VzdG9taXpl4oCmA - + 1048576 2147483647 - + - + @@ -1554,7 +1555,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - apps_table_show: + apps_table_show: @@ -1650,7 +1651,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - prefs_changed: + prefs_changed: @@ -1658,7 +1659,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + prefs_changed: @@ -1666,7 +1667,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + prefs_changed: @@ -1674,7 +1675,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + prefs_changed: @@ -1682,7 +1683,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + prefs_changed: @@ -1690,7 +1691,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + prefs_changed: @@ -1698,7 +1699,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + prefs_changed: @@ -1786,7 +1787,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + apps_table_show: @@ -1842,7 +1843,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + prefs_changed: @@ -1922,7 +1923,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - + MainMenu 19 @@ -2209,7 +2210,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 196 - + X11Controller 244 @@ -2935,18 +2936,21 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 270.editorWindowContentRectSynchronizationRect 272.IBPluginDependency 272.ImportedFromIB2 + 285.IBEditorWindowLastContentRect 285.IBPluginDependency 285.IBViewEditorWindowController.showingBoundsRectangles 285.IBViewEditorWindowController.showingLayoutRectangles 285.IBWindowTemplateEditedContentRect 285.ImportedFromIB2 285.editorWindowContentRectSynchronizationRect + 285.lastResizeAction 285.windowTemplate.hasMaxSize 285.windowTemplate.hasMinSize 285.windowTemplate.maxSize 285.windowTemplate.minSize 286.IBPluginDependency 286.ImportedFromIB2 + 29.IBEditorWindowLastContentRect 29.IBPluginDependency 29.ImportedFromIB2 29.editorWindowContentRectSynchronizationRect @@ -3087,231 +3091,246 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES - - - + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin {{202, 626}, {154, 153}} - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin {{271, 666}, {301, 153}} - + com.apple.InterfaceBuilder.CocoaPlugin {{184, 290}, {481, 345}} {{184, 290}, {481, 345}} - {3.40282e+38, 3.40282e+38} - {213, 107} - + {3.40282e+38, 3.40282e+38} + {213, 107} + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin {{100, 746}, {155, 33}} - + com.apple.InterfaceBuilder.CocoaPlugin - + {{537, 554}, {454, 311}} + com.apple.InterfaceBuilder.CocoaPlugin - {{433, 406}, {486, 327}} + {{537, 554}, {454, 311}} - + {{433, 406}, {486, 327}} + + YES + + YES + IBResizeActionFinalFrame + IBResizeActionInitialFrame + + + YES + {{537, 554}, {454, 311}} + {{537, 576}, {471, 289}} + + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin - - - - - + {{0, 1114}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin {{67, 819}, {336, 20}} - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin {{79, 616}, {218, 203}} - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin @@ -3341,29 +3360,17 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES - - - - YES - - YES - - - YES - - - - YES - - YES - - - YES - - + FirstResponder - IBUserSource - + IBUserSource + + + + + NSFormatter + + IBUserSource + @@ -3394,24 +3401,24 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES - id - - - - - - - - - - - - - - - - - + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id @@ -3439,24 +3446,24 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 YES - NSMenuItem + NSMenuItem NSTableView - NSButton + NSButton NSPopUpButton - NSMenu - - - - - - - + NSMenu + NSMenu + NSMenuItem + NSButton + NSButton + NSButton + NSButton + NSButton NSPanel - - - - - + NSButton + NSMenuItem + NSButton + NSMenuItem + NSMenuItem @@ -3464,628 +3471,10 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - - NSFormatter - - - YES - - YES - - - YES - - - - YES - - YES - - - YES - - - - - - - 0 3 - - YnBsaXN0MDDUAAEAAgADAAQABQAGAAkAClgkdmVyc2lvblQkdG9wWSRhcmNoaXZlclgkb2JqZWN0cxIA -AYag0QAHAAhdSUIub2JqZWN0ZGF0YYABXxAPTlNLZXllZEFyY2hpdmVyrxEDQgALAAwAMQA1ADkAQABD -AEQASABMAIkAkQCZAJoAnwCyALMAuAC5ALoAvQDBAMIAxQDQANEA0gDWANsA5ADrAOwA8ADyAPMA9wD8 -AQoBEgETAS0BLgE1ATYBOQE9AT4BQAFCAUYBTAFPAVABUQFUAVkBYAFlAWYBZwFsAXMBeAF5AXoBewGA -AYcBjQGOAZkBmgGeAZ8BogGjAagBrwGwAbgBuQG6Ab8BwAHFAcwB0QHSAekB7AHuAfAB/QIBAgICAwIG -Ag0CFwICAhgCIgICAiMCLQICAi4CMgI1AjYCOwJDAkQCRQJKAlMCVwJYAl0CZAJlAm0CbgJzAnsCfAJ9 -An4CgwKIAo8ClAKVAp0CngKjAqoCqwKzArQCuQLBAsICwwLEAskC0QLSAtMC1ALZAtoC3wLgAuQC6wLv -AvAC8QL1AvwC/QL+Av8DBAMJAwoDEgMbANEDHAMrAzIDMwM0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G5qbmxubm5xbnNudm55bnxugW6E -boduim6NbpBulW6Ybptunm6gbqJupG6mbqlurG6vbrFutG63brpuvG6+bsBuxW7HbspuzW7PbtJu127a -bt1u4m7kbulu627wbvNu9m74bvtu/W8AbwVvCG8Kbw1vEG8TbxZvGW8ebydvLG8ubzNvNm84bztvPm9D -b0VvR29Mb1FvVG9Wb1tvXW9gb2NvZm9pb2xvbm9xb3Rvd296b31vgG+Cb4dvjG+Rb5NvlW+Yb5tvpG+m -b6dvsG+zb7RvvW/Ab8Fvym/PAAAAAAAAAgIAAAAAAAANIAAAAAAAAAAAAAAAAAAAb94 - diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib index 430610292bd903db47a1bf8b9f351b8395f48c25..5223c9a95ecc5ed438a02c3f6aff0a65e6f8360f 100644 GIT binary patch literal 35529 zcmdSC2YeLO*D!qVo!Onu>};}|o{+NXy={6Uoq$LWy@Ze~5J<8ig(^B15K$BqsnV;6 z6uT%22nZG|sDOYJktU+p5mb23o!KNCiqHS?`=00bzJX+CXKp#?+;h)4_ndR@jHs`v zZfr_S`~qP_5QliAL0aU5!~vn>tqqOUwz{&=CR_c$(29o2(baHkK&WlR7;9xyqbtHQ zR~N!F?Yd!=nAt_bOogpyDy%0&672o(K_Z8@+?xM<1Y%&>{30I*g8>a)K7AN5h+!5#DQrsDL!)16N9)uh4csvnL#*g6H_;LIMeiARjtKn)5-VA@Y z;Md{rcKjCJiTB`l@dx-r{4xF(YR|oG`^ZZ zO@t;=lc-73Bx_PNX_{DW}#-OW|?NSW`pKg%{I+;{$b4QWU6NQHaS(q-&5*`&E7v>8KgvG*AVV$r^cwTr(*de?l>=6zK?+Kp@UkJy9XO16aEzb(qSFZ&D71+Ez&L3Ez_;kJ*V5GdtSFy_quMo?k(Nh zx}CarkY2Y(_lfRP-67rQx-a;_y2H97x}zvVcUYob)rqI7srVW zVx!n3HjCrM3F1U?k~mqMB0e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R14xwt{G=0m`P@`nQrpU95c@>FbhqgS!TX4%T0;d gXf~OxX1m#84w%E$FoEjStoiTOZ~O25zs+y|02(M>8vp Date: Mon, 11 Feb 2008 16:03:25 -0500 Subject: [PATCH 471/552] Revert "Bug #8937: Extension setup functions not called on server resets" This reverts commit 5e946dd853a4ebc2722ae023429ce5797de3d7a6. The devPrivates rework makes this workaround unnecessary. --- mi/miinitext.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/mi/miinitext.c b/mi/miinitext.c index 261fac9fc..3c55eebb3 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -739,16 +739,6 @@ InitExtensions(argc, argv) /* Sort the extensions according the init dependencies. */ LoaderSortExtensions(); listInitialised = TRUE; - } else { - /* Call the setup functions on subsequent server resets as well */ - for (i = 0; ExtensionModuleList[i].name != NULL; i++) { - ext = &ExtensionModuleList[i]; - if (ext->setupFunc != NULL && - (ext->disablePtr == NULL || - (ext->disablePtr != NULL && !*ext->disablePtr))) { - (ext->setupFunc)(); - } - } } for (i = 0; ExtensionModuleList[i].name != NULL; i++) { From 0d492b2166c4026b9078ffd86d89a31ebe590be4 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 12 Feb 2008 19:59:10 -0500 Subject: [PATCH 472/552] XACE: Move the selection access hook to its own function. --- Xext/xace.c | 18 +++++++----------- Xext/xace.h | 4 ++++ dix/dispatch.c | 10 ++++------ 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Xext/xace.c b/Xext/xace.c index b2c7e4ab4..e88debc5f 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -63,6 +63,13 @@ int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin, return rec.status; } +int XaceHookSelectionAccess(ClientPtr client, Atom name, Mask access_mode) +{ + XaceSelectionAccessRec rec = { client, name, access_mode, Success }; + CallCallbacks(&XaceHooks[XACE_SELECTION_ACCESS], &rec); + return rec.status; +} + void XaceHookAuditEnd(ClientPtr ptr, int result) { XaceAuditRec rec = { ptr, result }; @@ -169,17 +176,6 @@ int XaceHook(int hook, ...) prv = &rec.status; break; } - case XACE_SELECTION_ACCESS: { - XaceSelectionAccessRec rec = { - va_arg(ap, ClientPtr), - va_arg(ap, Atom), - va_arg(ap, Mask), - Success /* default allow */ - }; - calldata = &rec; - prv = &rec.status; - break; - } case XACE_SCREEN_ACCESS: case XACE_SCREENSAVER_ACCESS: { XaceScreenAccessRec rec = { diff --git a/Xext/xace.h b/Xext/xace.h index 6f1f267ad..2016ca322 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -69,6 +69,8 @@ extern int XaceHook( extern int XaceHookDispatch(ClientPtr ptr, int major); extern int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, PropertyPtr pProp, Mask access_mode); +extern int XaceHookSelectionAccess(ClientPtr ptr, Atom name, + Mask access_mode); extern void XaceHookAuditEnd(ClientPtr ptr, int result); /* Register a callback for a given hook. @@ -106,12 +108,14 @@ extern void XaceCensorImage( #define XaceHook(args...) Success #define XaceHookDispatch(args...) Success #define XaceHookPropertyAccess(args...) Success +#define XaceHookSelectionAccess(args...) Success #define XaceHookAuditEnd(args...) { ; } #define XaceCensorImage(args...) { ; } #else #define XaceHook(...) Success #define XaceHookDispatch(...) Success #define XaceHookPropertyAccess(...) Success +#define XaceHookSelectionAccess(...) Success #define XaceHookAuditEnd(...) { ; } #define XaceCensorImage(...) { ; } #endif diff --git a/dix/dispatch.c b/dix/dispatch.c index 0bca4417e..3589fba1c 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -995,8 +995,8 @@ ProcSetSelectionOwner(ClientPtr client) { int i = 0; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - DixSetAttrAccess); + rc = XaceHookSelectionAccess(client, stuff->selection, + DixSetAttrAccess); if (rc != Success) return rc; @@ -1081,8 +1081,7 @@ ProcGetSelectionOwner(ClientPtr client) int rc, i; xGetSelectionOwnerReply reply; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->id, - DixGetAttrAccess); + rc = XaceHookSelectionAccess(client, stuff->id, DixGetAttrAccess); if (rc != Success) return rc; @@ -1127,8 +1126,7 @@ ProcConvertSelection(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess); if (rc != Success) return rc; - rc = XaceHook(XACE_SELECTION_ACCESS, client, stuff->selection, - DixReadAccess); + rc = XaceHookSelectionAccess(client, stuff->selection, DixReadAccess); if (rc != Success) return rc; From aa5216e89797b600f382c04e3eaa657e808a5c3e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 31 Jan 2008 12:05:08 +1100 Subject: [PATCH 473/552] Rip out useless indirection in the callback list management. --- dix/dixutils.c | 21 ++++++--------------- include/dix.h | 19 ------------------- include/dixstruct.h | 1 - 3 files changed, 6 insertions(+), 35 deletions(-) diff --git a/dix/dixutils.c b/dix/dixutils.c index dd485d518..aaf510623 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -816,16 +816,8 @@ _DeleteCallbackList( *pcbl = NULL; } -static CallbackFuncsRec default_cbfuncs = -{ - _AddCallback, - _DeleteCallback, - _CallCallbacks, - _DeleteCallbackList -}; - static Bool -CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs) +CreateCallbackList(CallbackListPtr *pcbl) { CallbackListPtr cbl; int i; @@ -833,7 +825,6 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs) if (!pcbl) return FALSE; cbl = (CallbackListPtr) xalloc(sizeof(CallbackListRec)); if (!cbl) return FALSE; - cbl->funcs = cbfuncs ? *cbfuncs : default_cbfuncs; cbl->inCallback = 0; cbl->deleted = FALSE; cbl->numDeleted = 0; @@ -864,31 +855,31 @@ AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) if (!pcbl) return FALSE; if (!*pcbl) { /* list hasn't been created yet; go create it */ - if (!CreateCallbackList(pcbl, (CallbackFuncsPtr)NULL)) + if (!CreateCallbackList(pcbl)) return FALSE; } - return ((*(*pcbl)->funcs.AddCallback) (pcbl, callback, data)); + return _AddCallback(pcbl, callback, data); } _X_EXPORT Bool DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data) { if (!pcbl || !*pcbl) return FALSE; - return ((*(*pcbl)->funcs.DeleteCallback) (pcbl, callback, data)); + return _DeleteCallback(pcbl, callback, data); } void CallCallbacks(CallbackListPtr *pcbl, pointer call_data) { if (!pcbl || !*pcbl) return; - (*(*pcbl)->funcs.CallCallbacks) (pcbl, call_data); + _CallCallbacks(pcbl, call_data); } void DeleteCallbackList(CallbackListPtr *pcbl) { if (!pcbl || !*pcbl) return; - (*(*pcbl)->funcs.DeleteCallbackList) (pcbl); + _DeleteCallbackList(pcbl); } void diff --git a/include/dix.h b/include/dix.h index 8cfbbc4f6..ec9806aef 100644 --- a/include/dix.h +++ b/include/dix.h @@ -498,25 +498,6 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */ typedef void (*CallbackProcPtr) ( CallbackListPtr *, pointer, pointer); -typedef Bool (*AddCallbackProcPtr) ( - CallbackListPtr *, CallbackProcPtr, pointer); - -typedef Bool (*DeleteCallbackProcPtr) ( - CallbackListPtr *, CallbackProcPtr, pointer); - -typedef void (*CallCallbacksProcPtr) ( - CallbackListPtr *, pointer); - -typedef void (*DeleteCallbackListProcPtr) ( - CallbackListPtr *); - -typedef struct _CallbackProcs { - AddCallbackProcPtr AddCallback; - DeleteCallbackProcPtr DeleteCallback; - CallCallbacksProcPtr CallCallbacks; - DeleteCallbackListProcPtr DeleteCallbackList; -} CallbackFuncsRec, *CallbackFuncsPtr; - extern Bool AddCallback( CallbackListPtr * /*pcbl*/, CallbackProcPtr /*callback*/, diff --git a/include/dixstruct.h b/include/dixstruct.h index cbeac48cb..d44b9cfa7 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -187,7 +187,6 @@ typedef struct _CallbackRec { } CallbackRec, *CallbackPtr; typedef struct _CallbackList { - CallbackFuncsRec funcs; int inCallback; Bool deleted; int numDeleted; From 3eaecdd66e791e0f3d86b23ce10be057ca44c044 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 31 Jan 2008 21:36:14 +1100 Subject: [PATCH 474/552] Disable Record by default. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 566ddcbd0..d8b78eadc 100644 --- a/configure.ac +++ b/configure.ac @@ -526,7 +526,7 @@ AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Compo AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes]) AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes]) -AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes]) +AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no]) AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes]) AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes]) AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto]) From 2ce35f6d45c3e1761d33b786520ff5ba56a3c518 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 31 Jan 2008 21:39:48 +1100 Subject: [PATCH 475/552] Simplify critical output flushing. --- dix/dispatch.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 3589fba1c..32efff782 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -424,10 +424,9 @@ Dispatch(void) while (!isItTimeToYield) { if (*icheck[0] != *icheck[1]) - { ProcessInputEvents(); - FlushIfCriticalOutputPending(); - } + + FlushIfCriticalOutputPending(); #ifdef SMART_SCHEDULE if (!SmartScheduleDisable && (SmartScheduleTime - start_tick) >= SmartScheduleSlice) @@ -483,9 +482,6 @@ Dispatch(void) client->errorValue, result); break; } -#ifdef DAMAGEEXT - FlushIfCriticalOutputPending (); -#endif } FlushAllOutput(); #ifdef SMART_SCHEDULE From eb8dc11d19dd0b5354de408578ab0cfb865df672 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 31 Jan 2008 21:45:14 +1100 Subject: [PATCH 476/552] Remove some MAX* #defines that never get used. --- include/misc.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/misc.h b/include/misc.h index e6a5e9eb2..a1cbe8670 100644 --- a/include/misc.h +++ b/include/misc.h @@ -87,10 +87,7 @@ extern unsigned long serverGeneration; #define MAXSCREENS 16 #endif #define MAXCLIENTS 256 -#define MAXDITS 1 -#define MAXEXTENSIONS 128 #define MAXFORMATS 8 -#define MAXVISUALS_PER_SCREEN 50 typedef unsigned long PIXEL; typedef unsigned long ATOM; From 62cfe8863823c0994f20555cb35ee3bacb9e5225 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 14:57:25 +1100 Subject: [PATCH 477/552] Redact all mention of PanoramiX from user strings. --- Xext/panoramiX.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 311a8e716..75277beaa 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -463,10 +463,8 @@ void PanoramiXExtensionInit(int argc, char *argv[]) ProcPanoramiXDispatch, SProcPanoramiXDispatch, PanoramiXResetProc, StandardMinorOpcode); - if (!extEntry) { - ErrorF("PanoramiXExtensionInit(): failed to AddExtension\n"); + if (!extEntry) break; - } /* * First make sure all the basic allocations succeed. If not, @@ -514,7 +512,7 @@ void PanoramiXExtensionInit(int argc, char *argv[]) if (!success) { noPanoramiXExtension = TRUE; - ErrorF("%s Extension failed to initialize\n", PANORAMIX_PROTOCOL_NAME); + ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n"); return; } @@ -604,14 +602,14 @@ Bool PanoramiXCreateConnectionBlock(void) */ if(!PanoramiXNumDepths) { - ErrorF("PanoramiX error: Incompatible screens. No common visuals\n"); + ErrorF("Xinerama error: No common visuals\n"); return FALSE; } for(i = 1; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; if(pScreen->rootDepth != screenInfo.screens[0]->rootDepth) { - ErrorF("PanoramiX error: Incompatible screens. Root window depths differ\n"); + ErrorF("Xinerama error: Root window depths differ\n"); return FALSE; } if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport) From 7c0709a736c0f3aa011de67dd2c2962585ab146e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 14:59:58 +1100 Subject: [PATCH 478/552] requestingClient is an xprintism, hide it for other servers. --- dix/dispatch.c | 4 ++++ dix/dixfonts.c | 5 ++++- dix/globals.c | 2 ++ hw/xnest/Font.c | 2 ++ include/dix.h | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index 32efff782..e8e650a91 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -417,7 +417,9 @@ Dispatch(void) } isItTimeToYield = FALSE; +#ifdef XPRINT requestingClient = client; +#endif #ifdef SMART_SCHEDULE start_tick = SmartScheduleTime; #endif @@ -489,7 +491,9 @@ Dispatch(void) if (client) client->smart_stop_tick = SmartScheduleTime; #endif +#ifdef XPRINT requestingClient = NULL; +#endif } dispatchException &= ~DE_PRIORITYCHANGE; } diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 04f1f1b30..8def6ee21 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1934,12 +1934,15 @@ GetDefaultPointSize () FontResolutionPtr GetClientResolutions (int *num) { +#ifdef XPRINT if (requestingClient && requestingClient->fontResFunc != NULL && !requestingClient->clientGone) { return (*requestingClient->fontResFunc)(requestingClient, num); } - else { + else +#endif + { static struct _FontResolution res; ScreenPtr pScreen; diff --git a/dix/globals.c b/dix/globals.c index d76b604da..7f95eabd5 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -143,7 +143,9 @@ Bool loadableFonts = FALSE; CursorPtr rootCursor; Bool blackRoot=FALSE; Bool whiteRoot=FALSE; +#ifdef XPRINT ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */ +#endif _X_EXPORT TimeStamp currentTime; _X_EXPORT TimeStamp lastDeviceEventTime; diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c index 72edcee9a..9f30085b1 100644 --- a/hw/xnest/Font.c +++ b/hw/xnest/Font.c @@ -44,8 +44,10 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) FontSetPrivate(pFont, xnestFontPrivateIndex, NULL); +#ifdef XPRINT if (requestingClient && XpClientIsPrintClient(requestingClient, NULL)) return True; +#endif name_atom = MakeAtom("FONT", 4, True); value_atom = 0L; diff --git a/include/dix.h b/include/dix.h index ec9806aef..52212e7e7 100644 --- a/include/dix.h +++ b/include/dix.h @@ -116,7 +116,9 @@ typedef struct _Client *ClientPtr; /* also in misc.h */ typedef struct _WorkQueue *WorkQueuePtr; +#ifdef XPRINT extern ClientPtr requestingClient; +#endif extern ClientPtr *clients; extern ClientPtr serverClient; extern int currentMaxClients; From 9113fa3de36e84bbae2727cace82b1cf0d709a86 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 15:03:57 +1100 Subject: [PATCH 479/552] Silence the harmless FreeFontPath error message. --- dix/dixfonts.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 8def6ee21..e9a3f3963 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1644,9 +1644,6 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force) found++; } if (list[i]->refcount != found) { - ErrorF("FreeFontPath: FPE \"%.*s\" refcount is %d, should be %d; fixing.\n", - list[i]->name_length, list[i]->name, - list[i]->refcount, found); list[i]->refcount = found; /* ensure it will get freed */ } } From 238b816469355159eea98600ca900e3baa8fa313 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 15:08:03 +1100 Subject: [PATCH 480/552] X.Org Group -> X.Org Foundation --- include/site.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/site.h b/include/site.h index 279cf2d70..fec87070b 100644 --- a/include/site.h +++ b/include/site.h @@ -52,7 +52,7 @@ SOFTWARE. * server executable. */ #ifndef VENDOR_STRING -#define VENDOR_STRING "The X.Org Group" +#define VENDOR_STRING "The X.Org Foundation" #endif /* From 89d3249c3e7611b22414bc84b10ca60aab4b9a77 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 15:11:27 +1100 Subject: [PATCH 481/552] Silence FreeResource() --- dix/resource.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dix/resource.c b/dix/resource.c index 6c1b04dc7..f318de3c0 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -535,7 +535,6 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) ResourcePtr *prev, *head; int *eltptr; int elements; - Bool gotOne = FALSE; if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) { @@ -563,15 +562,11 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) xfree(res); if (*eltptr != elements) prev = head; /* prev may no longer be valid */ - gotOne = TRUE; } else prev = &res->next; } } - if (!gotOne) - ErrorF("Freeing resource id=%lX which isn't there.\n", - (unsigned long)id); } From b740b865e4c156a40adc6b63fcf215156fc9151a Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 15:16:01 +1100 Subject: [PATCH 482/552] Silence an error message in ConfigureWindow that never happens. --- dix/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/window.c b/dix/window.c index 1ccf12603..b896ef742 100644 --- a/dix/window.c +++ b/dix/window.c @@ -2155,7 +2155,7 @@ WhereDoIGoInTheStack( return pWin->nextSib; default: { - ErrorF("Internal error in ConfigureWindow, smode == %d\n",smode ); + /* should never happen; make something up. */ return pWin->nextSib; } } From f3b3b37ec6197f8884417fbc26630d3a28f2e319 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 15:36:11 +1100 Subject: [PATCH 483/552] Use strerror instead of errno values in user strings. --- Xext/xf86bigfont.c | 8 ++++---- hw/dmx/examples/ev.c | 2 +- hw/kdrive/linux/linux.c | 2 +- hw/kdrive/src/kmap.c | 8 ++++---- hw/kdrive/vesa/vm86.c | 2 +- hw/vfb/InitOutput.c | 18 +++++++++--------- hw/xfree86/os-support/bsd/bsd_apm.c | 2 +- hw/xfree86/os-support/bsd/bsd_kqueue_apm.c | 2 +- hw/xfree86/os-support/solaris/sun_apm.c | 6 +++--- hw/xprint/ps/psout_ftpstype1.c | 2 +- hw/xquartz/darwinKeyboard.c | 12 ++++++------ os/WaitFor.c | 8 ++++---- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index 779f3b940..d5c5704de 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -236,15 +236,15 @@ shmalloc( size = (size + pagesize-1) & -pagesize; shmid = shmget(IPC_PRIVATE, size, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); if (shmid == -1) { - ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, errno = %d\n", - size, errno); + ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, %s\n", + size, strerror(errno)); xfree(pDesc); return (ShmDescPtr) NULL; } if ((addr = shmat(shmid, 0, 0)) == (char *)-1) { - ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, errno = %d\n", - size, errno); + ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, %s\n", + size, strerror(errno)); shmctl(shmid, IPC_RMID, (void *) 0); xfree(pDesc); return (ShmDescPtr) NULL; diff --git a/hw/dmx/examples/ev.c b/hw/dmx/examples/ev.c index 10912266d..ba45c2b25 100644 --- a/hw/dmx/examples/ev.c +++ b/hw/dmx/examples/ev.c @@ -174,7 +174,7 @@ int main(int argc, char **argv) } printf("\n"); } - printf("rc = %d, errno = %d (%s)\n", rc, errno, strerror(errno)); + printf("rc = %d, (%s)\n", rc, strerror(errno)); close(fd); } } diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index 23cd8f59f..258dc7b81 100644 --- a/hw/kdrive/linux/linux.c +++ b/hw/kdrive/linux/linux.c @@ -441,7 +441,7 @@ LinuxFini (void) memset (&vts, '\0', sizeof (vts)); /* valgrind */ ioctl (fd, VT_GETSTATE, &vts); if (ioctl (fd, VT_DISALLOCATE, vtno) < 0) - fprintf (stderr, "Can't deallocate console %d errno %d\n", vtno, errno); + fprintf (stderr, "Can't deallocate console %d %s\n", vtno, strerror(errno)); close (fd); } return; diff --git a/hw/kdrive/src/kmap.c b/hw/kdrive/src/kmap.c index b92c1a84f..ce1e28ae4 100644 --- a/hw/kdrive/src/kmap.c +++ b/hw/kdrive/src/kmap.c @@ -132,8 +132,8 @@ KdSetMappedMode (CARD32 addr, CARD32 size, int mode) sentry.type = type; if (ioctl (mtrr, MTRRIOC_ADD_ENTRY, &sentry) < 0) - ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (errno %d)\n", - base, bound - base, type, errno); + ErrorF ("MTRRIOC_ADD_ENTRY failed 0x%x 0x%x %d (%s)\n", + base, bound - base, type, strerror(errno)); } #endif } @@ -171,8 +171,8 @@ KdResetMappedMode (CARD32 addr, CARD32 size, int mode) sentry.type = type; if (ioctl (mtrr, MTRRIOC_DEL_ENTRY, &sentry) < 0) - ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (errno %d)\n", - base, bound - base, type, errno); + ErrorF ("MTRRIOC_DEL_ENTRY failed 0x%x 0x%x %d (%s)\n", + base, bound - base, type, strerror(errno)); } #endif } diff --git a/hw/kdrive/vesa/vm86.c b/hw/kdrive/vesa/vm86.c index 78fc593a7..0f7bb2262 100644 --- a/hw/kdrive/vesa/vm86.c +++ b/hw/kdrive/vesa/vm86.c @@ -567,7 +567,7 @@ vm86_loop(Vm86InfoPtr vi) if(errno == ENOSYS) { ErrorF("No vm86 support. Are you running on AMD64?\n"); } else { - ErrorF("vm86 failed (errno = %d).\n", errno); + ErrorF("vm86 failed (%s).\n", strerror(errno)); Vm86Debug(vi); } } else { diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index a00f7a5bb..1edceb930 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -179,8 +179,8 @@ ddxGiveUp() if (-1 == unlink(vfbScreens[i].mmap_file)) { perror("unlink"); - ErrorF("unlink %s failed, errno %d", - vfbScreens[i].mmap_file, errno); + ErrorF("unlink %s failed, %s", + vfbScreens[i].mmap_file, strerror(errno)); } } break; @@ -196,7 +196,7 @@ ddxGiveUp() if (-1 == shmdt((char *)vfbScreens[i].pXWDHeader)) { perror("shmdt"); - ErrorF("shmdt failed, errno %d", errno); + ErrorF("shmdt failed, %s", strerror(errno)); } } break; @@ -582,7 +582,7 @@ vfbBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) #endif { perror("msync"); - ErrorF("msync failed, errno %d", errno); + ErrorF("msync failed, %s", strerror(errno)); } } } @@ -605,7 +605,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) if (-1 == (pvfb->mmap_fd = open(pvfb->mmap_file, O_CREAT|O_RDWR, 0666))) { perror("open"); - ErrorF("open %s failed, errno %d", pvfb->mmap_file, errno); + ErrorF("open %s failed, %s", pvfb->mmap_file, strerror(errno)); return; } @@ -621,7 +621,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) if (-1 == write(pvfb->mmap_fd, dummyBuffer, writeThisTime)) { perror("write"); - ErrorF("write %s failed, errno %d", pvfb->mmap_file, errno); + ErrorF("write %s failed, %s", pvfb->mmap_file, strerror(errno)); return; } } @@ -635,7 +635,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) if (-1 == (long)pvfb->pXWDHeader) { perror("mmap"); - ErrorF("mmap %s failed, errno %d", pvfb->mmap_file, errno); + ErrorF("mmap %s failed, %s", pvfb->mmap_file, strerror(errno)); pvfb->pXWDHeader = NULL; return; } @@ -659,7 +659,7 @@ vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb) if (pvfb->shmid < 0) { perror("shmget"); - ErrorF("shmget %d bytes failed, errno %d", pvfb->sizeInBytes, errno); + ErrorF("shmget %d bytes failed, %s", pvfb->sizeInBytes, strerror(errno)); return; } @@ -669,7 +669,7 @@ vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb) if (-1 == (long)pvfb->pXWDHeader) { perror("shmat"); - ErrorF("shmat failed, errno %d", errno); + ErrorF("shmat failed, %s", strerror(errno)); pvfb->pXWDHeader = NULL; return; } diff --git a/hw/xfree86/os-support/bsd/bsd_apm.c b/hw/xfree86/os-support/bsd/bsd_apm.c index 61779875c..43eda7421 100644 --- a/hw/xfree86/os-support/bsd/bsd_apm.c +++ b/hw/xfree86/os-support/bsd/bsd_apm.c @@ -66,7 +66,7 @@ bsdPMGetEventFromOS(int fd, pmEvent *events, int num) if (ioctl(fd, APM_IOC_NEXTEVENT, &bsdEvent) < 0) { if (errno != EAGAIN) { xf86Msg(X_WARNING, "bsdPMGetEventFromOS: APM_IOC_NEXTEVENT" - " errno = %d\n", errno); + " %s\n", strerror(errno)); } break; } diff --git a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c index b0171e2c3..b37070c37 100644 --- a/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c +++ b/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c @@ -102,7 +102,7 @@ bsdPMGetEventFromOS(int kq, pmEvent *events, int num) break; } else if (result < 0) { xf86Msg(X_WARNING, "bsdPMGetEventFromOS: kevent returns" - " errno = %d\n", errno); + " %s\n", strerror(errno)); break; } events[i] = bsdToXF86(APM_EVENT_TYPE(ev.data)); diff --git a/hw/xfree86/os-support/solaris/sun_apm.c b/hw/xfree86/os-support/solaris/sun_apm.c index a9657fd55..7decc900f 100644 --- a/hw/xfree86/os-support/solaris/sun_apm.c +++ b/hw/xfree86/os-support/solaris/sun_apm.c @@ -149,7 +149,7 @@ sunPMGetEventFromOS(int fd, pmEvent *events, int num) if (ioctl(fd, APM_IOC_NEXTEVENT, &sunEvent) < 0) { if (errno != EAGAIN) { xf86Msg(X_WARNING, "sunPMGetEventFromOS: APM_IOC_NEXTEVENT" - " errno = %d\n", errno); + " %s\n", strerror(errno)); } break; } @@ -178,7 +178,7 @@ sunPMConfirmEventToOs(int fd, pmEvent event) return PM_CONTINUE; else { xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_SUSPEND" - " errno = %d\n", errno); + " %s\n", strerror(errno)); return PM_FAILED; } case XF86_APM_STANDBY_RESUME: @@ -191,7 +191,7 @@ sunPMConfirmEventToOs(int fd, pmEvent event) return PM_CONTINUE; else { xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_RESUME" - " errno = %d\n", errno); + " %s\n", strerror(errno)); return PM_FAILED; } default: diff --git a/hw/xprint/ps/psout_ftpstype1.c b/hw/xprint/ps/psout_ftpstype1.c index 2d40c186a..572e13601 100644 --- a/hw/xprint/ps/psout_ftpstype1.c +++ b/hw/xprint/ps/psout_ftpstype1.c @@ -124,7 +124,7 @@ int PsOut_DownloadFreeType1(PsOutPtr self, const char *psfontname, FontPtr pFont switch(childpid) { case -1: - FatalError("PS DDX internal error: Cannot fork() converter child process, errno=%d\n", (int)errno); + FatalError("PS DDX internal error: Cannot fork() converter child process, %s\n", strerror(errno)); break; case 0: /* child */ fclose(self->Fp); diff --git a/hw/xquartz/darwinKeyboard.c b/hw/xquartz/darwinKeyboard.c index b368fe9d9..8d1ee8ec9 100644 --- a/hw/xquartz/darwinKeyboard.c +++ b/hw/xquartz/darwinKeyboard.c @@ -344,13 +344,13 @@ static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) { fref = fopen( darwinKeymapFile, "rb" ); if (fref == NULL) { - ErrorF("Unable to open keymapping file '%s' (errno %d).\n", - darwinKeymapFile, errno); + ErrorF("Unable to open keymapping file '%s' (%s).\n", + darwinKeymapFile, strerror(errno)); return FALSE; } if (fstat(fileno(fref), &st) == -1) { - ErrorF("Could not stat keymapping file '%s' (errno %d).\n", - darwinKeymapFile, errno); + ErrorF("Could not stat keymapping file '%s' (%s).\n", + darwinKeymapFile, strerror(errno)); return FALSE; } @@ -364,8 +364,8 @@ static Bool DarwinReadKeymapFile(NXKeyMapping *keyMap) { inBuffer = (char*) xalloc( st.st_size ); bufferEnd = (int *) (inBuffer + st.st_size); if (fread(inBuffer, st.st_size, 1, fref) != 1) { - ErrorF("Could not read %qd bytes from keymapping file '%s' (errno %d).\n", - st.st_size, darwinKeymapFile, errno); + ErrorF("Could not read %qd bytes from keymapping file '%s' (%s).\n", + st.st_size, darwinKeymapFile, strerror(errno)); return FALSE; } diff --git a/os/WaitFor.c b/os/WaitFor.c index c58f24888..36e01ca38 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -254,13 +254,13 @@ WaitForSomething(int *pClientsReady) } else if (selecterr == EINVAL) { - FatalError("WaitForSomething(): select: errno=%d\n", - selecterr); + FatalError("WaitForSomething(): select: %s\n", + strerror(selecterr)); } else if (selecterr != EINTR && selecterr != EAGAIN) { - ErrorF("WaitForSomething(): select: errno=%d\n", - selecterr); + ErrorF("WaitForSomething(): select: %s\n", + strerror(selecterr)); } } #ifdef SMART_SCHEDULE From ef77e4c4419703b5a802f3eee92476a43f788a86 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 16:03:01 +1100 Subject: [PATCH 484/552] Remove useless commentary from environment and argument processing. --- os/utils.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/os/utils.c b/os/utils.c index 22f9541f5..4041028a3 100644 --- a/os/utils.c +++ b/os/utils.c @@ -2002,18 +2002,6 @@ enum BadCode { #define BUGADDRESS "xorg@freedesktop.org" #endif -#define ARGMSG \ - "\nIf the arguments used are valid, and have been rejected incorrectly\n" \ - "please send details of the arguments and why they are valid to\n" \ - "%s. In the meantime, you can start the Xserver as\n" \ - "the \"super user\" (root).\n" - -#define ENVMSG \ - "\nIf the environment is valid, and have been rejected incorrectly\n" \ - "please send details of the environment and why it is valid to\n" \ - "%s. In the meantime, you can start the Xserver as\n" \ - "the \"super user\" (root).\n" - void CheckUserParameters(int argc, char **argv, char **envp) { @@ -2060,10 +2048,6 @@ CheckUserParameters(int argc, char **argv, char **envp) /* Check for bad environment variables and values */ #if REMOVE_ENV_LD while (envp[i] && (strncmp(envp[i], "LD", 2) == 0)) { -#ifdef ENVDEBUG - ErrorF("CheckUserParameters: removing %s from the " - "environment\n", strtok(envp[i], "=")); -#endif for (j = i; envp[j]; j++) { envp[j] = envp[j+1]; } @@ -2071,10 +2055,6 @@ CheckUserParameters(int argc, char **argv, char **envp) #endif if (envp[i] && (strlen(envp[i]) > MAX_ENV_LENGTH)) { #if REMOVE_LONG_ENV -#ifdef ENVDEBUG - ErrorF("CheckUserParameters: removing %s from the " - "environment\n", strtok(envp[i], "=")); -#endif for (j = i; envp[j]; j++) { envp[j] = envp[j+1]; } @@ -2127,20 +2107,16 @@ CheckUserParameters(int argc, char **argv, char **envp) return; case UnsafeArg: ErrorF("Command line argument number %d is unsafe\n", i); - ErrorF(ARGMSG, BUGADDRESS); break; case ArgTooLong: ErrorF("Command line argument number %d is too long\n", i); - ErrorF(ARGMSG, BUGADDRESS); break; case UnprintableArg: ErrorF("Command line argument number %d contains unprintable" " characters\n", i); - ErrorF(ARGMSG, BUGADDRESS); break; case EnvTooLong: ErrorF("Environment variable `%s' is too long\n", e); - ErrorF(ENVMSG, BUGADDRESS); break; case OutputIsPipe: ErrorF("Stdout and/or stderr is a pipe\n"); @@ -2150,8 +2126,6 @@ CheckUserParameters(int argc, char **argv, char **envp) break; default: ErrorF("Unknown error\n"); - ErrorF(ARGMSG, BUGADDRESS); - ErrorF(ENVMSG, BUGADDRESS); break; } FatalError("X server aborted because of unsafe environment\n"); From 2aaf6ac134fa9f61984b1c03929c7b596c971cc8 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 16:10:23 +1100 Subject: [PATCH 485/552] Don't even attempt to parse -bpp in xfree86 DDX option parsing. This hasn't been valid since 1999. Get with the times, man. --- hw/xfree86/common/xf86Init.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index d12b6bd6a..a3ddfd0b9 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1566,15 +1566,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86sFlag = TRUE; return 0; } - if (!strcmp(argv[i], "-bpp")) - { - ErrorF("The -bpp option is no longer supported.\n" - "\tUse -depth to set the color depth, and use -fbbpp if you really\n" - "\tneed to force a non-default framebuffer (hardware) pixel format.\n"); - if (++i >= argc) - return 1; - return 2; - } if (!strcmp(argv[i], "-pixmap24")) { xf86Pix24 = Pix24Use24; From 24089b06243101b1bff4f2fd79fcbfd6a93992d5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 16:11:13 +1100 Subject: [PATCH 486/552] Don't bother warning people about the keyboard driver rename, just do it. --- hw/xfree86/common/xf86Init.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index a3ddfd0b9..2a7ecfdc8 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1135,12 +1135,6 @@ InitInput(argc, argv) for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) { /* Replace obsolete keyboard driver with kbd */ if (!xf86NameCmp((*pDev)->driver, "keyboard")) { - xf86MsgVerb(X_WARNING, 0, - "*** WARNING the legacy keyboard driver \"%s\" has been removed\n", - (*pDev)->driver); - xf86MsgVerb(X_WARNING, 0, - "*** Using the new \"kbd\" driver for \"%s\".\n", - (*pDev)->identifier); strcpy((*pDev)->driver, "kbd"); } From 0bdd20a0454c94f902fd4874855125bf7510fcf5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 16:15:58 +1100 Subject: [PATCH 487/552] Eradicate the VTInit code. "This option should rarely be used." Never sounds like a better idea. --- hw/xfree86/common/xf86Config.c | 5 ---- hw/xfree86/common/xf86Globals.c | 1 - hw/xfree86/common/xf86Init.c | 42 ---------------------------- hw/xfree86/common/xf86Privstr.h | 1 - hw/xfree86/doc/man/xorg.conf.man.pre | 11 -------- hw/xfree86/parser/xf86tokens.h | 1 - 6 files changed, 61 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 622c31850..605c6b347 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -733,7 +733,6 @@ typedef enum { FLAG_DISABLEMODINDEV, FLAG_MODINDEVALLOWNONLOCAL, FLAG_ALLOWMOUSEOPENFAIL, - FLAG_VTINIT, FLAG_VTSYSREQ, FLAG_XKBDISABLE, FLAG_PCIPROBE1, @@ -785,8 +784,6 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_VTINIT, "VTInit", OPTV_STRING, - {0}, FALSE }, { FLAG_VTSYSREQ, "VTSysReq", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_XKBDISABLE, "XkbDisable", OPTV_BOOLEAN, @@ -977,8 +974,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) #endif } - xf86Info.vtinit = xf86GetOptValString(FlagOptions, FLAG_VTINIT); - if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE1)) xf86Info.pciFlags = PCIProbe1; if (xf86IsOptionSet(FlagOptions, FLAG_PCIPROBE2)) diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index d796d627c..ba603f4df 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -97,7 +97,6 @@ InputInfoPtr xf86InputDevs = NULL; xf86InfoRec xf86Info = { -1, /* consoleFd */ -1, /* vtno */ - NULL, /* vtinit */ FALSE, /* vtSysreq */ SKWhenNeeded, /* ddxSpecialKeys */ NULL, /* pMouse */ diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 2a7ecfdc8..41cf1d17c 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -102,7 +102,6 @@ static void xf86PrintBanner(void); static void xf86PrintMarkers(void); static void xf86PrintDefaultModulePath(void); static void xf86PrintDefaultLibraryPath(void); -static void xf86RunVtInit(void); static Bool probe_devices_from_device_sections(DriverPtr drvp); static Bool add_matching_devices_to_configure_list(DriverPtr drvp); @@ -238,9 +237,6 @@ PostConfigInit(void) xf86OSPMClose = xf86OSPMOpen(); #endif - /* Run an external VT Init program if specified in the config file */ - xf86RunVtInit(); - /* Do this after XF86Config is read (it's normally in OsInit()) */ OsInitColors(); } @@ -1915,44 +1911,6 @@ xf86PrintDefaultLibraryPath(void) ErrorF("%s\n", DEFAULT_LIBRARY_PATH); } -static void -xf86RunVtInit(void) -{ - int i; - - /* - * If VTInit was set, run that program with consoleFd as stdin and stdout - */ - - if (xf86Info.vtinit) { - switch(fork()) { - case -1: - FatalError("xf86RunVtInit: fork failed (%s)\n", strerror(errno)); - break; - case 0: /* child */ - if (setuid(getuid()) == -1) { - xf86Msg(X_ERROR, "xf86RunVtInit: setuid failed (%s)\n", - strerror(errno)); - exit(255); - } - /* set stdin, stdout to the consoleFd */ - for (i = 0; i < 2; i++) { - if (xf86Info.consoleFd != i) { - close(i); - dup(xf86Info.consoleFd); - } - } - execl("/bin/sh", "sh", "-c", xf86Info.vtinit, (void *)NULL); - xf86Msg(X_WARNING, "exec of /bin/sh failed for VTInit (%s)\n", - strerror(errno)); - exit(255); - break; - default: /* parent */ - wait(NULL); - } - } -} - /* * xf86LoadModules iterates over a list that is being passed in. */ diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h index 92a6305a0..d97ca440e 100644 --- a/hw/xfree86/common/xf86Privstr.h +++ b/hw/xfree86/common/xf86Privstr.h @@ -75,7 +75,6 @@ typedef enum { typedef struct { int consoleFd; int vtno; - char * vtinit; Bool vtSysreq; SpecialKeysInDDX ddxSpecialKeys; diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 608ba37ed..96f30c4bd 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -507,17 +507,6 @@ This allows the server to start up even if the mouse device can't be opened/initialised. Default: false. .TP 7 -.BI "Option \*qVTInit\*q \*q" command \*q -Runs -.I command -after the VT used by the server has been opened. -The command string is passed to \*q/bin/sh \-c\*q, and is run with the real -user's id with stdin and stdout set to the VT. -The purpose of this option is to allow system dependent VT initialisation -commands to be run. -This option should rarely be needed. -Default: not set. -.TP 7 .BI "Option \*qVTSysReq\*q \*q" boolean \*q enables the SYSV\-style VT switch sequence for non\-SYSV systems which support VT switching. diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h index 786dac145..6e4fdeab5 100644 --- a/hw/xfree86/parser/xf86tokens.h +++ b/hw/xfree86/parser/xf86tokens.h @@ -208,7 +208,6 @@ typedef enum { XKBVARIANT, XKBOPTIONS, /* The next two have become ServerFlags options */ - VTINIT, VTSYSREQ, /* Obsolete keyboard tokens */ SERVERNUM, From e91ff09568c5579818b6641e88e95c6fe122cbe7 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 17:21:34 +1100 Subject: [PATCH 488/552] Friends don't let friends call xf86AddModuleInfo. That code only existed to leak memory. It can go now, thanks. --- hw/xfree86/common/xf86.h | 4 ++-- hw/xfree86/common/xf86Globals.c | 2 -- hw/xfree86/common/xf86Helper.c | 24 ++---------------------- hw/xfree86/common/xf86Priv.h | 3 --- hw/xfree86/common/xf86str.h | 2 +- hw/xfree86/exa/examodule.c | 26 +------------------------- hw/xfree86/loader/xf86sym.c | 2 -- hw/xfree86/xaa/xaaInitAccel.c | 26 +------------------------- 8 files changed, 7 insertions(+), 82 deletions(-) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 4e7d914bf..4b3e10463 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -337,8 +337,8 @@ int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, pointer value); Bool xf86IsUnblank(int mode); -void xf86AddModuleInfo(ModuleInfoPtr info, pointer module); -void xf86DeleteModuleInfo(int idx); +_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module); +_X_DEPRECATED void xf86DeleteModuleInfo(int idx); void xf86getsecs(long *, long *); /* xf86Debug.c */ diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index ba603f4df..0dc42c66b 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -153,8 +153,6 @@ DriverPtr *xf86DriverList = NULL; int xf86NumDrivers = 0; InputDriverPtr *xf86InputDriverList = NULL; int xf86NumInputDrivers = 0; -ModuleInfoPtr *xf86ModuleInfoList = NULL; -int xf86NumModuleInfos = 0; int xf86NumScreens = 0; const char *xf86VisualNames[] = { diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index ec524e63c..8978f8206 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -170,37 +170,17 @@ xf86LookupInput(const char *name) return NULL; } +/* ABI stubs of despair */ _X_EXPORT void -xf86AddModuleInfo(ModuleInfoPtr info, pointer module) +xf86AddModuleInfo(pointer info, pointer module) { - /* Don't add null entries */ - if (!module) - return; - - if (xf86ModuleInfoList == NULL) - xf86NumModuleInfos = 0; - - xf86NumModuleInfos++; - xf86ModuleInfoList = xnfrealloc(xf86ModuleInfoList, - xf86NumModuleInfos * sizeof(ModuleInfoPtr)); - xf86ModuleInfoList[xf86NumModuleInfos - 1] = xnfalloc(sizeof(ModuleInfoRec)); - *xf86ModuleInfoList[xf86NumModuleInfos - 1] = *info; - xf86ModuleInfoList[xf86NumModuleInfos - 1]->module = module; - xf86ModuleInfoList[xf86NumModuleInfos - 1]->refCount = 0; } _X_EXPORT void xf86DeleteModuleInfo(int idx) { - if (xf86ModuleInfoList[idx]) { - if (xf86ModuleInfoList[idx]->module) - UnloadModule(xf86ModuleInfoList[idx]->module); - xfree(xf86ModuleInfoList[idx]); - xf86ModuleInfoList[idx] = NULL; - } } - /* Allocate a new ScrnInfoRec in xf86Screens */ _X_EXPORT ScrnInfoPtr diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 4723f5aba..32801cb3f 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2002 by The XFree86 Project, Inc. * @@ -97,8 +96,6 @@ extern Bool xf86SupportedMouseTypes[]; extern int xf86NumMouseTypes; extern DriverPtr *xf86DriverList; -extern ModuleInfoPtr *xf86ModuleInfoList; -extern int xf86NumModuleInfos; extern int xf86NumDrivers; extern Bool xf86Resetting; extern Bool xf86Initialising; diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index 2e0213597..fc94284cb 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -348,7 +348,7 @@ typedef struct _DriverRec { * functions to configuration tools, the Xserver, or any other * application/module interested in such information. */ -typedef struct _ModuleInfoRec { +_X_DEPRECATED typedef struct _ModuleInfoRec { int moduleVersion; char * moduleName; pointer module; diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index b8d306eb4..086639cc5 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -178,8 +178,6 @@ exaDDXDriverInit(ScreenPtr pScreen) } -static MODULESETUPPROTO(exaSetup); - /*ARGSUSED*/ static const OptionInfoRec * EXAAvailableOptions(void *unused) @@ -201,26 +199,4 @@ static XF86ModuleVersionInfo exaVersRec = {0,0,0,0} }; -_X_EXPORT XF86ModuleData exaModuleData = { &exaVersRec, exaSetup, NULL }; - -static ModuleInfoRec EXA = { - 1, - "EXA", - NULL, - 0, - EXAAvailableOptions, -}; - -/*ARGSUSED*/ -static pointer -exaSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) -{ - static Bool Initialised = FALSE; - - if (!Initialised) { - Initialised = TRUE; - xf86AddModuleInfo(&EXA, Module); - } - - return (pointer)TRUE; -} +_X_EXPORT XF86ModuleData exaModuleData = { &exaVersRec, NULL, NULL }; diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 623e87ab5..754e9c06b 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -479,8 +479,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86IsScreenPrimary) SYMFUNC(xf86RegisterRootWindowProperty) SYMFUNC(xf86IsUnblank) - SYMFUNC(xf86AddModuleInfo) - SYMFUNC(xf86DeleteModuleInfo) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) /* xf86sbusBus.c */ diff --git a/hw/xfree86/xaa/xaaInitAccel.c b/hw/xfree86/xaa/xaaInitAccel.c index fe0b70a14..1b7c15487 100644 --- a/hw/xfree86/xaa/xaaInitAccel.c +++ b/hw/xfree86/xaa/xaaInitAccel.c @@ -93,8 +93,6 @@ static const OptionInfoRec XAAOptions[] = { OPTV_NONE, {0}, FALSE } }; -static MODULESETUPPROTO(xaaSetup); - static XF86ModuleVersionInfo xaaVersRec = { "xaa", @@ -109,29 +107,7 @@ static XF86ModuleVersionInfo xaaVersRec = {0,0,0,0} }; -_X_EXPORT XF86ModuleData xaaModuleData = { &xaaVersRec, xaaSetup, NULL }; - -ModuleInfoRec XAA = { - 1, - "XAA", - NULL, - 0, - XAAAvailableOptions, -}; - -/*ARGSUSED*/ -static pointer -xaaSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) -{ - static Bool Initialised = FALSE; - - if (!Initialised) { - Initialised = TRUE; - xf86AddModuleInfo(&XAA, Module); - } - - return (pointer)TRUE; -} +_X_EXPORT XF86ModuleData xaaModuleData = { &xaaVersRec, NULL, NULL }; /*ARGSUSED*/ static const OptionInfoRec * From f750ce53ac450824d0c792d11eafdf311cf8abc0 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 1 Feb 2008 17:33:48 +1100 Subject: [PATCH 489/552] Remove some braindamage from ModuleDesc. Yay dead code elimination. --- hw/xfree86/common/xf86Helper.c | 1 - hw/xfree86/loader/loaderProcs.h | 6 ------ hw/xfree86/loader/loadmod.c | 21 --------------------- 3 files changed, 28 deletions(-) diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 8978f8206..1368d04ab 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * diff --git a/hw/xfree86/loader/loaderProcs.h b/hw/xfree86/loader/loaderProcs.h index b71ad4590..9c73db3a6 100644 --- a/hw/xfree86/loader/loaderProcs.h +++ b/hw/xfree86/loader/loaderProcs.h @@ -62,17 +62,11 @@ typedef struct module_desc { struct module_desc *child; struct module_desc *sib; struct module_desc *parent; - struct module_desc *demand_next; char *name; - char *filename; - char *identifier; - XID client_id; - int in_use; int handle; ModuleSetupProc SetupProc; ModuleTearDownProc TearDownProc; void *TearDownData; /* returned from SetupProc */ - const char *path; const XF86ModuleVersionInfo *VersionInfo; } ModuleDesc, *ModuleDescPtr; diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 45e9cb374..650dcf35c 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -786,12 +786,7 @@ NewModuleDesc(const char *name) mdp->child = NULL; mdp->sib = NULL; mdp->parent = NULL; - mdp->demand_next = NULL; mdp->name = xstrdup(name); - mdp->filename = NULL; - mdp->identifier = NULL; - mdp->client_id = 0; - mdp->in_use = 0; mdp->handle = -1; mdp->SetupProc = NULL; mdp->TearDownProc = NULL; @@ -816,15 +811,10 @@ DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent) if (LoaderHandleOpen(mod->handle) == -1) return NULL; - ret->filename = xstrdup(mod->filename); - ret->identifier = mod->identifier; - ret->client_id = mod->client_id; - ret->in_use = mod->in_use; ret->handle = mod->handle; ret->SetupProc = mod->SetupProc; ret->TearDownProc = mod->TearDownProc; ret->TearDownData = NULL; - ret->path = mod->path; ret->child = DuplicateModule(mod->child, ret); ret->sib = DuplicateModule(mod->sib, parent); ret->parent = parent; @@ -943,8 +933,6 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, if (ret->handle < 0) goto LoadModule_fail; - ret->filename = xstrdup(found); - /* drop any explicit suffix from the module name */ p = strchr(name, '.'); if (p) @@ -998,7 +986,6 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, ret->SetupProc = setup; if (teardown) ret->TearDownProc = teardown; - ret->path = path; ret->VersionInfo = vers; } else { /* No initdata is OK for external modules */ @@ -1120,7 +1107,6 @@ UnloadModuleOrDriver(ModuleDescPtr mod) if (mod->sib) UnloadModuleOrDriver(mod->sib); TestFree(mod->name); - TestFree(mod->filename); xfree(mod); #ifdef __alpha__ istream_mem_barrier(); @@ -1145,7 +1131,6 @@ UnloadSubModule(ModuleDescPtr mod) UnloadModuleOrDriver(mod->child); TestFree(mod->name); - TestFree(mod->filename); xfree(mod); } @@ -1156,12 +1141,6 @@ FreeModuleDesc(ModuleDescPtr head) if (head == (ModuleDescPtr) 1) return; - /* - * only free it if it's not marked as in use. In use means that it may - * be unloaded someday, and UnloadModule will free it - */ - if (head->in_use) - return; if (head->child) FreeModuleDesc(head->child); sibs = head; From ba69904148acf755bec8fbda2eb869144f0ef7d4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 3 Feb 2008 22:49:23 +1100 Subject: [PATCH 490/552] Simplify dlloader a bit more. --- hw/xfree86/loader/dlloader.c | 43 ++++++++++++++---------------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c index 2afdef789..4caefd071 100644 --- a/hw/xfree86/loader/dlloader.c +++ b/hw/xfree86/loader/dlloader.c @@ -71,15 +71,9 @@ #define DLSYM_PREFIX "" #endif -typedef struct { - int handle; - void *dlhandle; - int flags; -} DLModuleRec, *DLModulePtr; - /* Hooray, yet another open coded linked list! FIXME */ typedef struct DLModuleList { - DLModulePtr module; + void *module; struct DLModuleList *next; } DLModuleList; @@ -88,19 +82,22 @@ static DLModuleList *dlModuleList = NULL; static void * DLFindSymbolLocal(pointer module, const char *name) { - DLModulePtr dlfile = module; void *p; char *n; static const char symPrefix[] = DLSYM_PREFIX; - n = malloc(strlen(symPrefix) + strlen(name) + 1); - if (strlen(symPrefix)) + if (strlen(symPrefix)) { + n = malloc(strlen(symPrefix) + strlen(name) + 1); sprintf(n, "%s%s", symPrefix, name); - else - sprintf(n, "%s", name); - p = dlsym(dlfile->dlhandle, n); - free(n); + } else { + n = name; + } + + p = dlsym(module, n); + + if (strlen(symPrefix)) + free(n); return p; } @@ -127,7 +124,7 @@ DLFindSymbol(const char *name) global_scope = dlopen(NULL, DLOPEN_LAZY | DLOPEN_GLOBAL); if (global_scope) - return dlsym(global_scope, name); + return DLFindSymbolLocal(global_scope, name); return NULL; } @@ -135,23 +132,17 @@ DLFindSymbol(const char *name) void * DLLoadModule(loaderPtr modrec, int flags) { - DLModulePtr dlfile; + void * dlfile; DLModuleList *l; int dlopen_flags; - if ((dlfile = calloc(1, sizeof(DLModuleRec))) == NULL) { - ErrorF("Unable to allocate DLModuleRec\n"); - return NULL; - } - dlfile->handle = modrec->handle; if (flags & LD_FLAG_GLOBAL) dlopen_flags = DLOPEN_LAZY | DLOPEN_GLOBAL; else dlopen_flags = DLOPEN_LAZY; - dlfile->dlhandle = dlopen(modrec->name, dlopen_flags); - if (dlfile->dlhandle == NULL) { + dlfile = dlopen(modrec->name, dlopen_flags); + if (dlfile == NULL) { ErrorF("dlopen: %s\n", dlerror()); - free(dlfile); return NULL; } @@ -166,7 +157,6 @@ DLLoadModule(loaderPtr modrec, int flags) void DLUnloadModule(void *modptr) { - DLModulePtr dlfile = (DLModulePtr) modptr; DLModuleList *l, *p; /* remove it from dlModuleList. */ @@ -185,6 +175,5 @@ DLUnloadModule(void *modptr) p = l; } } - dlclose(dlfile->dlhandle); - free(modptr); + dlclose(modptr); } From ae43d835bdaef96c3c73d7cee5b105f07340833d Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 13 Feb 2008 19:39:49 -0500 Subject: [PATCH 491/552] XACE: Change access modes for some device-related requests. Opening a device is not really "reading" it. Requests that globally configure a device should require "manage" access. --- Xi/chgdctl.c | 2 +- Xi/chgfctl.c | 2 +- Xi/chgkmap.c | 2 +- Xi/closedev.c | 2 +- Xi/opendev.c | 2 +- Xi/setbmap.c | 2 +- Xi/setmmap.c | 2 +- dix/devices.c | 10 +++++----- xkb/xkb.c | 14 +++++++------- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index e7d04a781..30174f496 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -111,7 +111,7 @@ ProcXChangeDeviceControl(ClientPtr client) REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); len = stuff->length - (sizeof(xChangeDeviceControlReq) >> 2); - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) goto out; diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c index 696b74a16..3155e87c2 100644 --- a/Xi/chgfctl.c +++ b/Xi/chgfctl.c @@ -444,7 +444,7 @@ ProcXChangeFeedbackControl(ClientPtr client) REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); len = stuff->length - (sizeof(xChangeFeedbackControlReq) >> 2); - rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (rc != Success) return rc; diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c index df334c11c..3f51648e1 100644 --- a/Xi/chgkmap.c +++ b/Xi/chgkmap.c @@ -106,7 +106,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client) count = stuff->keyCodes * stuff->keySymsPerKeyCode; REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; len = stuff->length - (sizeof(xChangeDeviceKeyMappingReq) >> 2); diff --git a/Xi/closedev.c b/Xi/closedev.c index b2b5f69a6..94b7391fb 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -146,7 +146,7 @@ ProcXCloseDevice(ClientPtr client) REQUEST(xCloseDeviceReq); REQUEST_SIZE_MATCH(xCloseDeviceReq); - rc = dixLookupDevice(&d, stuff->deviceid, client, DixGetAttrAccess); + rc = dixLookupDevice(&d, stuff->deviceid, client, DixUseAccess); if (rc != Success) return rc; diff --git a/Xi/opendev.c b/Xi/opendev.c index 128b1bd9c..acda38530 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -106,7 +106,7 @@ ProcXOpenDevice(ClientPtr client) stuff->deviceid == inputInfo.keyboard->id) return BadDevice; - status = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); + status = dixLookupDevice(&dev, stuff->deviceid, client, DixUseAccess); if (status == BadDevice) { /* not open */ for (dev = inputInfo.off_devices; dev; dev = dev->next) if (dev->id == stuff->deviceid) diff --git a/Xi/setbmap.c b/Xi/setbmap.c index 3035c649e..f05225531 100644 --- a/Xi/setbmap.c +++ b/Xi/setbmap.c @@ -109,7 +109,7 @@ ProcXSetDeviceButtonMapping(ClientPtr client) rep.sequenceNumber = client->sequence; rep.status = MappingSuccess; - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; diff --git a/Xi/setmmap.c b/Xi/setmmap.c index be3d3cb6c..34efde595 100644 --- a/Xi/setmmap.c +++ b/Xi/setmmap.c @@ -98,7 +98,7 @@ ProcXSetDeviceModifierMapping(ClientPtr client) REQUEST(xSetDeviceModifierMappingReq); REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq); - ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); + ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; diff --git a/dix/devices.c b/dix/devices.c index 534a0b9e5..bdcca5aba 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1295,7 +1295,7 @@ DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, } } - rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (rc != Success) return rc; @@ -1435,7 +1435,7 @@ ProcChangeKeyboardMapping(ClientPtr client) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (rc != Success) return rc; } @@ -1472,7 +1472,7 @@ DoSetPointerMapping(ClientPtr client, DeviceIntPtr device, BYTE *map, int n) for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetAttrAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); if (rc != Success) return rc; } @@ -1810,7 +1810,7 @@ ProcChangeKeyboardControl (ClientPtr client) for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { - ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixSetAttrAccess); + ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (ret != Success) return ret; } @@ -1961,7 +1961,7 @@ ProcChangePointerControl(ClientPtr client) for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { if ((mouse->coreEvents || mouse == inputInfo.pointer) && mouse->ptrfeed && mouse->ptrfeed->CtrlProc) { - rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixSetAttrAccess); + rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixManageAccess); if (rc != Success) return rc; } diff --git a/xkb/xkb.c b/xkb/xkb.c index 23e1dc76f..26f2812fe 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -211,7 +211,7 @@ ProcXkbSelectEvents(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess); + CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixUseAccess); if (((stuff->affectWhich&XkbMapNotifyMask)!=0)&&(stuff->affectMap)) { client->mapNotifyMask&= ~stuff->affectMap; @@ -694,7 +694,7 @@ ProcXkbSetControls(ClientPtr client) if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask); for (tmpd = inputInfo.keyboard; tmpd; tmpd = tmpd->next) { @@ -2304,7 +2304,7 @@ ProcXkbSetMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01,stuff->present,XkbAllMapComponentsMask); XkbSetCauseXkbReq(&cause,X_kbSetMap,client); @@ -2618,7 +2618,7 @@ ProcXkbSetCompatMap(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); data = (char *)&stuff[1]; xkbi = dev->key->xkbInfo; @@ -4844,7 +4844,7 @@ ProcXkbSetGeometry(ClientPtr client) if (!(client->xkbClientFlags&_XkbClientInitialized)) return BadAccess; - CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_ATOM_OR_NONE(stuff->name); xkb= dev->key->xkbInfo->desc; @@ -5126,7 +5126,7 @@ ProcXkbGetKbdByName(ClientPtr client) Bool geom_changed; XkbSrvLedInfoPtr old_sli; XkbSrvLedInfoPtr sli; - Mask access_mode = DixGetAttrAccess | DixSetAttrAccess; + Mask access_mode = DixGetAttrAccess | DixManageAccess; REQUEST(xkbGetKbdByNameReq); REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq); @@ -5997,7 +5997,7 @@ xkbExtensionDeviceNotify ed; change= stuff->change; - CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); + CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01,change,XkbXI_AllFeaturesMask); wire= (char *)&stuff[1]; From e99aadbc2635e87543fc9980d8156c3ede83544f Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 13 Feb 2008 19:46:29 -0500 Subject: [PATCH 492/552] xselinux: Add use to permission map for devices. --- Xext/xselinux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 9acc93c61..5aa2ad3fa 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -138,7 +138,7 @@ static struct security_class_mapping map[] = { { "x_selection", { "read", "", "", "", "getattr", "setattr", NULL }}, { "x_cursor", { "read", "write", "destroy", "create", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_client", { "", "", "destroy", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "manage", NULL }}, - { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "", "manage", "", "bell", NULL }}, + { "x_device", { "read", "write", "", "", "getattr", "setattr", "", "", "", "getfocus", "setfocus", "", "", "", "", "", "", "grab", "freeze", "force_cursor", "", "", "", "", "use", "manage", "", "bell", NULL }}, { "x_server", { "record", "", "", "", "getattr", "setattr", "", "", "", "", "", "", "", "", "", "", "", "grab", "", "", "", "", "", "", "", "manage", "debug", NULL }}, { "x_extension", { "", "", "", "", "query", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "use", NULL }}, { "x_event", { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "send", "receive", NULL }}, From 4573cb2ce4b859744118d9a33de3599f033cdd2b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 13 Feb 2008 20:16:56 -0500 Subject: [PATCH 493/552] security: Revise set of permissions granted to untrusted clients. Bug #14480: untrusted access broken on 7.3. --- Xext/security.c | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index 069655964..a3cde2cec 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -70,10 +70,19 @@ static char *SecurityUntrustedExtensions[] = { NULL }; -/* Access modes that untrusted clients can do to trusted stuff */ -static const Mask SecurityAllowedMask = - DixGetAttrAccess | DixListPropAccess | DixGetPropAccess | - DixGetFocusAccess | DixListAccess | DixReceiveAccess; +/* + * Access modes that untrusted clients are allowed on trusted objects. + */ +static const Mask SecurityResourceMask = + DixGetAttrAccess | DixReceiveAccess | DixListPropAccess | + DixGetPropAccess | DixListAccess; +static const Mask SecurityRootWindowExtraMask = + DixReceiveAccess | DixSendAccess | DixAddAccess | DixRemoveAccess; +static const Mask SecurityDeviceMask = + DixGetAttrAccess | DixReceiveAccess | DixGetFocusAccess | + DixGrabAccess | DixSetAttrAccess | DixUseAccess; +static const Mask SecurityServerMask = DixGetAttrAccess | DixGrabAccess; +static const Mask SecurityClientMask = DixGetAttrAccess; /* SecurityAudit @@ -751,11 +760,15 @@ SecurityDevice(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceDeviceAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask; + Mask allowed = SecurityDeviceMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); + if (rec->dev != inputInfo.keyboard) + /* this extension only supports the core keyboard */ + allowed = requested; + if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { SecurityAudit("Security denied client %d keyboard access on request " "%s\n", rec->client->index, @@ -792,7 +805,7 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) SecurityStateRec *subj, *obj; int cid = CLIENT_ID(rec->id); Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask; + Mask allowed = SecurityResourceMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey); @@ -801,11 +814,15 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) if (cid == 0) { if (rec->rtype & RC_DRAWABLE) /* additional operations allowed on root windows */ - allowed |= DixReadAccess|DixSendAccess; + allowed |= SecurityRootWindowExtraMask; else if (rec->rtype == RT_COLORMAP) /* allow access to default colormaps */ allowed = requested; + + else + /* allow read access to other server-owned resources */ + allowed |= DixReadAccess; } if (SecurityDoCheck(subj, obj, requested, allowed) == Success) @@ -816,9 +833,10 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) return; #endif - SecurityAudit("Security: denied client %d access to resource 0x%x " - "of client %d on request %s\n", rec->client->index, rec->id, - cid, SecurityLookupRequestName(rec->client)); + SecurityAudit("Security: denied client %d access %x to resource 0x%x " + "of client %d on request %s\n", rec->client->index, + requested, rec->id, cid, + SecurityLookupRequestName(rec->client)); rec->status = BadAccess; /* deny access */ } @@ -850,7 +868,7 @@ SecurityServer(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceServerAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask; + Mask allowed = SecurityServerMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); @@ -869,7 +887,7 @@ SecurityClient(CallbackListPtr *pcbl, pointer unused, pointer calldata) XaceClientAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask; + Mask allowed = SecurityClientMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); @@ -889,7 +907,7 @@ SecurityProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata) SecurityStateRec *subj, *obj; ATOM name = rec->pProp->propertyName; Mask requested = rec->access_mode; - Mask allowed = SecurityAllowedMask | DixReadAccess; + Mask allowed = SecurityResourceMask | DixReadAccess; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); From b8b7cdf6df3d338c50db670ce4cfd245f9fa8844 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 15 Feb 2008 01:31:46 +1100 Subject: [PATCH 494/552] Silence useless debug spew from XFree86-Misc extension. --- hw/xfree86/dixmods/extmod/xf86misc.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c index 8f4434601..3164d7501 100644 --- a/hw/xfree86/dixmods/extmod/xf86misc.c +++ b/hw/xfree86/dixmods/extmod/xf86misc.c @@ -110,7 +110,8 @@ static unsigned char XF86MiscReqCode = 0; #ifdef DEBUG # define DEBUG_P(x) ErrorF(x"\n"); #else -# define DEBUG_P(x) /**/ +# define DEBUG_P(x) do {} while (0) +} #endif #define MISCERR(x) (miscErrorBase + x) @@ -345,10 +346,10 @@ ProcXF86MiscSetMouseSettings(client) ClientVersion(client, &major, &minor); if (xf86GetVerbosity() > 1) { - ErrorF("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", + DEBUG_P("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", (int)stuff->mousetype, (int)stuff->baudrate, (int)stuff->samplerate, stuff->chordmiddle); - ErrorF(" em3but: %d em3tim: %d res: %d flags: %ld\n", + DEBUG_P(" em3but: %d em3tim: %d res: %d flags: %ld\n", stuff->emulate3buttons, (int)stuff->emulate3timeout, (int)stuff->resolution, (unsigned long)stuff->flags); } @@ -376,7 +377,7 @@ ProcXF86MiscSetMouseSettings(client) return BadAlloc; strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen); if (xf86GetVerbosity() > 1) - ErrorF("SetMouseSettings - device: %s\n",devname); + DEBUG_P("SetMouseSettings - device: %s\n",devname); MiscExtSetMouseDevice(mouse, devname); } } @@ -395,12 +396,12 @@ ProcXF86MiscSetMouseSettings(client) case MISC_RET_BADCOMBO: return MISCERR(XF86MiscBadMouseCombo); case MISC_RET_NOMODULE: return MISCERR(XF86MiscNoModule); default: - ErrorF("Unexpected return from MiscExtApply(POINTER) = %d\n", ret); + DEBUG_P("Unexpected return from MiscExtApply(POINTER) = %d\n", ret); return BadImplementation; } if (xf86GetVerbosity() > 1) - ErrorF("SetMouseSettings - Succeeded\n"); + DEBUG_P("SetMouseSettings - Succeeded\n"); return (client->noClientException); } @@ -417,7 +418,7 @@ ProcXF86MiscSetKbdSettings(client) REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); if (xf86GetVerbosity() > 1) - ErrorF("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", + DEBUG_P("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", (int)stuff->kbdtype, (int)stuff->rate, (int)stuff->delay, stuff->servnumlock); @@ -434,12 +435,12 @@ ProcXF86MiscSetKbdSettings(client) case MISC_RET_BADVAL: return BadValue; case MISC_RET_BADKBDTYPE: return MISCERR(XF86MiscBadKbdType); default: - ErrorF("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret); + DEBUG_P("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret); return BadImplementation; } if (xf86GetVerbosity() > 1) - ErrorF("SetKbdSettings - Succeeded\n"); + DEBUG_P("SetKbdSettings - Succeeded\n"); return (client->noClientException); } @@ -457,7 +458,7 @@ ProcXF86MiscSetGrabKeysState(client) if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) { if (xf86GetVerbosity() > 1) - ErrorF("SetGrabKeysState - %s\n", + DEBUG_P("SetGrabKeysState - %s\n", stuff->enable ? "enabled" : "disabled"); } @@ -493,7 +494,7 @@ ProcXF86MiscSetClientVersion(ClientPtr client) M_SETPRIV(client, pPriv); } if (xf86GetVerbosity() > 1) - ErrorF("SetClientVersion: %i %i\n",stuff->major,stuff->minor); + DEBUG_P("SetClientVersion: %i %i\n",stuff->major,stuff->minor); pPriv->major = stuff->major; pPriv->minor = stuff->minor; From c38feeb1492d9a47379b2e4d77dbadd8c421d17f Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Thu, 14 Feb 2008 18:52:47 +0100 Subject: [PATCH 495/552] Fix typo in commit b8b7cdf6df3d338c50db670ce4cfd245f9fa8844. --- hw/xfree86/dixmods/extmod/xf86misc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c index 3164d7501..d2ee59580 100644 --- a/hw/xfree86/dixmods/extmod/xf86misc.c +++ b/hw/xfree86/dixmods/extmod/xf86misc.c @@ -111,7 +111,6 @@ static unsigned char XF86MiscReqCode = 0; # define DEBUG_P(x) ErrorF(x"\n"); #else # define DEBUG_P(x) do {} while (0) -} #endif #define MISCERR(x) (miscErrorBase + x) From 3e0353c78571890f849a1db47b0540aacc6793bc Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 15 Feb 2008 06:42:48 +1100 Subject: [PATCH 496/552] Bah, macros are hard. --- hw/xfree86/dixmods/extmod/xf86misc.c | 50 +++++++++------------------- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/hw/xfree86/dixmods/extmod/xf86misc.c b/hw/xfree86/dixmods/extmod/xf86misc.c index d2ee59580..8127afdff 100644 --- a/hw/xfree86/dixmods/extmod/xf86misc.c +++ b/hw/xfree86/dixmods/extmod/xf86misc.c @@ -108,7 +108,7 @@ static unsigned char XF86MiscReqCode = 0; #endif #ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); +# define DEBUG_P(x) ErrorF x; #else # define DEBUG_P(x) do {} while (0) #endif @@ -120,8 +120,6 @@ XFree86MiscExtensionInit(void) { ExtensionEntry* extEntry; - DEBUG_P("XFree86MiscExtensionInit"); - if (!xf86GetModInDevEnabled()) return; @@ -154,8 +152,6 @@ ProcXF86MiscQueryVersion(client) xXF86MiscQueryVersionReply rep; register int n; - DEBUG_P("XF86MiscQueryVersion"); - REQUEST_SIZE_MATCH(xXF86MiscQueryVersionReq); rep.type = X_Reply; rep.length = 0; @@ -252,8 +248,6 @@ ProcXF86MiscGetMouseSettings(client) register int n; int devnamelen; - DEBUG_P("XF86MiscGetMouseSettings"); - REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq); rep.type = X_Reply; rep.sequenceNumber = client->sequence; @@ -303,8 +297,6 @@ ProcXF86MiscGetKbdSettings(client) pointer kbd; register int n; - DEBUG_P("XF86MiscGetKbdSettings"); - REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq); rep.type = X_Reply; rep.length = 0; @@ -338,19 +330,17 @@ ProcXF86MiscSetMouseSettings(client) REQUEST(xXF86MiscSetMouseSettingsReq); - DEBUG_P("XF86MiscSetMouseSettings"); - REQUEST_AT_LEAST_SIZE(xXF86MiscSetMouseSettingsReq); ClientVersion(client, &major, &minor); if (xf86GetVerbosity() > 1) { - DEBUG_P("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", + DEBUG_P(("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", (int)stuff->mousetype, (int)stuff->baudrate, - (int)stuff->samplerate, stuff->chordmiddle); - DEBUG_P(" em3but: %d em3tim: %d res: %d flags: %ld\n", + (int)stuff->samplerate, stuff->chordmiddle)); + DEBUG_P((" em3but: %d em3tim: %d res: %d flags: %ld\n", stuff->emulate3buttons, (int)stuff->emulate3timeout, - (int)stuff->resolution, (unsigned long)stuff->flags); + (int)stuff->resolution, (unsigned long)stuff->flags)); } if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (pointer) 0) @@ -376,7 +366,7 @@ ProcXF86MiscSetMouseSettings(client) return BadAlloc; strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen); if (xf86GetVerbosity() > 1) - DEBUG_P("SetMouseSettings - device: %s\n",devname); + DEBUG_P(("SetMouseSettings - device: %s\n",devname)); MiscExtSetMouseDevice(mouse, devname); } } @@ -395,12 +385,12 @@ ProcXF86MiscSetMouseSettings(client) case MISC_RET_BADCOMBO: return MISCERR(XF86MiscBadMouseCombo); case MISC_RET_NOMODULE: return MISCERR(XF86MiscNoModule); default: - DEBUG_P("Unexpected return from MiscExtApply(POINTER) = %d\n", ret); + DEBUG_P(("Unexpected return from MiscExtApply(POINTER) = %d\n", ret)); return BadImplementation; } if (xf86GetVerbosity() > 1) - DEBUG_P("SetMouseSettings - Succeeded\n"); + DEBUG_P(("SetMouseSettings - Succeeded\n")); return (client->noClientException); } @@ -412,14 +402,12 @@ ProcXF86MiscSetKbdSettings(client) pointer kbd; REQUEST(xXF86MiscSetKbdSettingsReq); - DEBUG_P("XF86MiscSetKbdSettings"); - REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); if (xf86GetVerbosity() > 1) - DEBUG_P("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", + DEBUG_P(("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", (int)stuff->kbdtype, (int)stuff->rate, - (int)stuff->delay, stuff->servnumlock); + (int)stuff->delay, stuff->servnumlock)); if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (pointer) 0) return BadAlloc; @@ -434,12 +422,12 @@ ProcXF86MiscSetKbdSettings(client) case MISC_RET_BADVAL: return BadValue; case MISC_RET_BADKBDTYPE: return MISCERR(XF86MiscBadKbdType); default: - DEBUG_P("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret); + DEBUG_P(("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret)); return BadImplementation; } if (xf86GetVerbosity() > 1) - DEBUG_P("SetKbdSettings - Succeeded\n"); + DEBUG_P(("SetKbdSettings - Succeeded\n")); return (client->noClientException); } @@ -451,14 +439,12 @@ ProcXF86MiscSetGrabKeysState(client) xXF86MiscSetGrabKeysStateReply rep; REQUEST(xXF86MiscSetGrabKeysStateReq); - DEBUG_P("XF86MiscSetGrabKeysState"); - REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) { if (xf86GetVerbosity() > 1) - DEBUG_P("SetGrabKeysState - %s\n", - stuff->enable ? "enabled" : "disabled"); + DEBUG_P(("SetGrabKeysState - %s\n", + stuff->enable ? "enabled" : "disabled")); } rep.type = X_Reply; @@ -482,8 +468,6 @@ ProcXF86MiscSetClientVersion(ClientPtr client) MiscPrivPtr pPriv; - DEBUG_P("XF86MiscSetClientVersion"); - REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); if ((pPriv = M_GETPRIV(client)) == NULL) { @@ -493,7 +477,7 @@ ProcXF86MiscSetClientVersion(ClientPtr client) M_SETPRIV(client, pPriv); } if (xf86GetVerbosity() > 1) - DEBUG_P("SetClientVersion: %i %i\n",stuff->major,stuff->minor); + DEBUG_P(("SetClientVersion: %i %i\n",stuff->major,stuff->minor)); pPriv->major = stuff->major; pPriv->minor = stuff->minor; @@ -511,8 +495,6 @@ ProcXF86MiscGetFilePaths(client) register int n; int configlen, modulelen, loglen; - DEBUG_P("XF86MiscGetFilePaths"); - REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); rep.type = X_Reply; rep.sequenceNumber = client->sequence; @@ -559,8 +541,6 @@ ProcXF86MiscPassMessage(client) REQUEST(xXF86MiscPassMessageReq); - DEBUG_P("XF86MiscPassMessage"); - REQUEST_AT_LEAST_SIZE(xXF86MiscPassMessageReq); size = (sizeof(xXF86MiscPassMessageReq) + 3) >> 2; size+= (stuff->typelen + 3) >> 2; From cd78f0d0fc08e4e2339ed09dad1a12802de7729c Mon Sep 17 00:00:00 2001 From: Pierre Willenbrock Date: Thu, 7 Feb 2008 21:28:28 +0100 Subject: [PATCH 497/552] AIGLX: Fix crash after client using GLX_EXT_texture_from_pixmap died. --- GL/glx/glxdri.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 6c1a199f7..e405ee06f 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -185,6 +185,42 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + int i; + + for (i = 0; i < screenInfo.numScreens; i++) { + __GLXDRIscreen * const screen = (__GLXDRIscreen *) + glxGetScreen(screenInfo.screens[i]); + + GLuint lastOverride = screen->lastTexOffsetOverride; + + if (lastOverride) { + __GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride; + int i; + + for (i = 0; i < lastOverride; i++) { + if (texOffsetOverride[i] == private) { + + texOffsetOverride[i] = NULL; + + if (i + 1 == lastOverride) { + lastOverride = 0; + + while (i--) { + if (texOffsetOverride[i]) { + lastOverride = i + 1; + break; + } + } + + screen->lastTexOffsetOverride = lastOverride; + + break; + } + } + } + } + } + (*private->driDrawable.destroyDrawable)(&private->driDrawable); /* If the X window was destroyed, the dri DestroyWindow hook will From 005e31d3de04e7003f84a94d30f2b75a9636266e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 15 Feb 2008 00:01:32 +0000 Subject: [PATCH 498/552] AIGLX: Refactor code common between __glXDRI{drawableDestroy,releaseTexImage}. --- GL/glx/glxdri.c | 107 +++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 66 deletions(-) diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index e405ee06f..304fed2bd 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -180,6 +180,41 @@ __glXDRIenterServer(GLboolean rendering) DRIWakeupHandler(NULL, 0, NULL); } + +static void +__glXDRIdoReleaseTexImage(__GLXDRIscreen *screen, __GLXDRIdrawable *drawable) +{ + GLuint lastOverride = screen->lastTexOffsetOverride; + + if (lastOverride) { + __GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride; + int i; + + for (i = 0; i < lastOverride; i++) { + if (texOffsetOverride[i] == drawable) { + + texOffsetOverride[i] = NULL; + + if (i + 1 == lastOverride) { + lastOverride = 0; + + while (i--) { + if (texOffsetOverride[i]) { + lastOverride = i + 1; + break; + } + } + + screen->lastTexOffsetOverride = lastOverride; + + break; + } + } + } + } +} + + static void __glXDRIdrawableDestroy(__GLXdrawable *drawable) { @@ -188,37 +223,9 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) int i; for (i = 0; i < screenInfo.numScreens; i++) { - __GLXDRIscreen * const screen = (__GLXDRIscreen *) - glxGetScreen(screenInfo.screens[i]); - - GLuint lastOverride = screen->lastTexOffsetOverride; - - if (lastOverride) { - __GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride; - int i; - - for (i = 0; i < lastOverride; i++) { - if (texOffsetOverride[i] == private) { - - texOffsetOverride[i] = NULL; - - if (i + 1 == lastOverride) { - lastOverride = 0; - - while (i--) { - if (texOffsetOverride[i]) { - lastOverride = i + 1; - break; - } - } - - screen->lastTexOffsetOverride = lastOverride; - - break; - } - } - } - } + __glXDRIdoReleaseTexImage((__GLXDRIscreen *) + glxGetScreen(screenInfo.screens[i]), + private); } (*private->driDrawable.destroyDrawable)(&private->driDrawable); @@ -561,41 +568,9 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext, int buffer, __GLXdrawable *pixmap) { - ScreenPtr pScreen = pixmap->pDraw->pScreen; - __GLXDRIdrawable *driDraw = - containerOf(pixmap, __GLXDRIdrawable, base); - __GLXDRIscreen * const screen = - (__GLXDRIscreen *) glxGetScreen(pScreen); - GLuint lastOverride = screen->lastTexOffsetOverride; - - if (lastOverride) { - __GLXDRIdrawable **texOffsetOverride = screen->texOffsetOverride; - int i; - - for (i = 0; i < lastOverride; i++) { - if (texOffsetOverride[i] == driDraw) { - if (screen->texOffsetFinish) - screen->texOffsetFinish((PixmapPtr)pixmap->pDraw); - - texOffsetOverride[i] = NULL; - - if (i + 1 == lastOverride) { - lastOverride = 0; - - while (i--) { - if (texOffsetOverride[i]) { - lastOverride = i + 1; - break; - } - } - - screen->lastTexOffsetOverride = lastOverride; - - break; - } - } - } - } + __glXDRIdoReleaseTexImage((__GLXDRIscreen *) + glxGetScreen(pixmap->pDraw->pScreen), + containerOf(pixmap, __GLXDRIdrawable, base)); return Success; } From b71dc54352bc56a889823040ec19c1d8e118a1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 4 Feb 2008 11:58:24 -0500 Subject: [PATCH 499/552] Add DRI2 module. --- configure.ac | 14 ++ hw/xfree86/Makefile.am | 8 +- hw/xfree86/dri2/Makefile.am | 15 ++ hw/xfree86/dri2/dri2.c | 448 ++++++++++++++++++++++++++++++++++++ hw/xfree86/dri2/dri2.h | 77 +++++++ include/dix-config.h.in | 3 + include/xorg-config.h.in | 3 + include/xorg-server.h.in | 3 + 8 files changed, 569 insertions(+), 2 deletions(-) create mode 100644 hw/xfree86/dri2/Makefile.am create mode 100644 hw/xfree86/dri2/dri2.c create mode 100644 hw/xfree86/dri2/dri2.h diff --git a/configure.ac b/configure.ac index d8b78eadc..10aa24158 100644 --- a/configure.ac +++ b/configure.ac @@ -368,6 +368,7 @@ AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) DRI=no +DRI2=no KDRIVE_HW=no dnl it would be nice to autodetect these *CONS_SUPPORTs case $host_os in @@ -380,6 +381,7 @@ case $host_os in AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console]) DRI=yes + DRI2=yes ;; *netbsd*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) @@ -387,6 +389,7 @@ case $host_os in AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) DRI=yes + DRI2=yes ;; *openbsd*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) @@ -395,6 +398,7 @@ case $host_os in ;; *linux*) DRI=yes + DRI2=yes KDRIVE_HW=yes ;; *solaris*) @@ -535,6 +539,7 @@ AC_ARG_ENABLE(xdmcp, AS_HELP_STRING([--disable-xdmcp], [Build XDMCP ext AC_ARG_ENABLE(xdm-auth-1, AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto]) AC_ARG_ENABLE(glx, AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes]) AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval]) +AC_ARG_ENABLE(dri2, AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: auto)]), [DRI2=$enableval]) AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes]) AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) @@ -857,6 +862,14 @@ if test "x$DRI" = xyes; then AC_SUBST(GL_CFLAGS) fi +AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) +if test "x$DRI2" = xyes; then + # FIXME: Bump the versions once we have releases of these. + AC_DEFINE(DRI2, 1, [Build DRI2 extension]) + PKG_CHECK_MODULES([DRIPROTO], [xf86driproto >= 2.0.3]) + PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.1]) +fi + AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) if test "x$XINERAMA" = xyes; then AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) @@ -2129,6 +2142,7 @@ hw/xfree86/doc/devel/Makefile hw/xfree86/doc/man/Makefile hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile +hw/xfree86/dri2/Makefile hw/xfree86/dummylib/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am index 4afc3a4e5..03c2c3a3f 100644 --- a/hw/xfree86/Makefile.am +++ b/hw/xfree86/Makefile.am @@ -4,6 +4,10 @@ if DRI DRI_SUBDIR = dri endif +if DRI2 +DRI2_SUBDIR = dri2 +endif + if XF86UTILS XF86UTILS_SUBDIR = utils endif @@ -21,11 +25,11 @@ DOC_SUBDIR = doc SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser rac \ ramdac shadowfb vbe vgahw xaa $(MFB_SUBDIR) $(CFB_SUBDIR) \ xf8_16bpp loader dixmods exa modes \ - $(DRI_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) + $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ parser rac ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp \ - xf8_16bpp xf8_32bpp loader dixmods dri exa modes \ + xf8_16bpp xf8_32bpp loader dixmods dri dri2 exa modes \ utils doc bin_PROGRAMS = Xorg diff --git a/hw/xfree86/dri2/Makefile.am b/hw/xfree86/dri2/Makefile.am new file mode 100644 index 000000000..be3cea48f --- /dev/null +++ b/hw/xfree86/dri2/Makefile.am @@ -0,0 +1,15 @@ +libdri2_la_LTLIBRARIES = libdri2.la +libdri2_la_CFLAGS = \ + -DHAVE_XORG_CONFIG_H \ + -I@MESA_SOURCE@/include \ + @DIX_CFLAGS@ @DRIPROTO_CFLAGS@ @LIBDRM_CFLAGS@ \ + -I$(top_srcdir)/hw/xfree86/common \ + -I$(top_srcdir)/hw/xfree86/os-support/bus + +libdri2_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@ +libdri2_ladir = $(moduledir)/extensions +libdri2_la_SOURCES = \ + dri2.c \ + dri2.h + +sdk_HEADERS = dri2.h diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c new file mode 100644 index 000000000..7c703a72c --- /dev/null +++ b/hw/xfree86/dri2/dri2.c @@ -0,0 +1,448 @@ +/* + * Copyright © 2007 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), to deal in the Software without restriction, including without + * limitation the rights to use, copy, modify, merge, publish, distribute, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, provided that the above copyright + * notice(s) and this permission notice appear in all copies of the Soft- + * ware and that both the above copyright notice(s) and this permission + * notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- + * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY + * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN + * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- + * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- + * MANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall + * not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization of + * the copyright holder. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifdef HAVE_XORG_CONFIG_H +#include +#endif + +#include +#include "xf86Module.h" +#include "scrnintstr.h" +#include "windowstr.h" +#include "dri2.h" +#include + +#include "xf86.h" + +static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKey; +static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKey; +static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKey; + +typedef struct _DRI2DrawablePriv { + drm_drawable_t drawable; + unsigned int handle; +} DRI2DrawablePrivRec, *DRI2DrawablePrivPtr; + +typedef struct _DRI2Screen { + int fd; + drmBO sareaBO; + void *sarea; + unsigned int sareaSize; + const char *driverName; + int ddxVersionMajor; + int ddxVersionMinor; + int ddxVersionPatch; + + __DRIEventBuffer *buffer; + int locked; + + DRI2GetPixmapHandleProcPtr getPixmapHandle; + DRI2BeginClipNotifyProcPtr beginClipNotify; + DRI2EndClipNotifyProcPtr endClipNotify; + + ClipNotifyProcPtr ClipNotify; + HandleExposuresProcPtr HandleExposures; +} DRI2ScreenRec, *DRI2ScreenPtr; + +static DRI2ScreenPtr +DRI2GetScreen(ScreenPtr pScreen) +{ + return dixLookupPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey); +} + +static void * +DRI2ScreenAllocEvent(DRI2ScreenPtr ds, size_t size) +{ + unsigned int *pad, mask = ds->buffer->size - 1; + size_t pad_size; + void *p; + + if ((ds->buffer->head & mask) + size > ds->buffer->size) { + /* The requested event size would wrap the buffer, so pad to + * the end and allocate the event from the start. */ + pad_size = ds->buffer->size - (ds->buffer->head & mask); + pad = (unsigned int *) + (ds->buffer->data + (ds->buffer->prealloc & mask)); + *pad = DRI2_EVENT_HEADER(DRI2_EVENT_PAD, pad_size); + ds->buffer->prealloc += pad_size; + } + + p = ds->buffer->data + (ds->buffer->prealloc & mask); + ds->buffer->prealloc += size; + + return p; +} + +static void +DRI2ScreenCommitEvents(DRI2ScreenPtr ds) +{ + ds->buffer->head = ds->buffer->prealloc; +} + +static void +DRI2PostDrawableConfig(DrawablePtr pDraw) +{ + ScreenPtr pScreen = pDraw->pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + DRI2DrawablePrivPtr pPriv; + WindowPtr pWin; + PixmapPtr pPixmap; + BoxPtr pBox; + BoxRec pixmapBox; + int nBox; + int i; + __DRIDrawableConfigEvent *e; + size_t size; + + if (pDraw->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr) pDraw; + pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); + + nBox = REGION_NUM_RECTS(&pWin->clipList); + pBox = REGION_RECTS(&pWin->clipList); + + pPixmap = pScreen->GetWindowPixmap(pWin); + } else { + pPixmap = (PixmapPtr) pDraw; + pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + + pixmapBox.x1 = 0; + pixmapBox.y1 = 0; + pixmapBox.x2 = pDraw->width; + pixmapBox.y2 = pDraw->height; + nBox = 1; + pBox = &pixmapBox; + } + + if (!pPriv) + return; + + size = sizeof *e + nBox * sizeof e->rects[0]; + + e = DRI2ScreenAllocEvent(ds, size); + e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_DRAWABLE_CONFIG, size); + e->drawable = pPriv->drawable; + e->x = pDraw->x - pPixmap->screen_x; + e->y = pDraw->y - pPixmap->screen_y; + e->width = pDraw->width; + e->height = pDraw->height; + + e->num_rects = nBox; + for (i = 0; i < nBox; i++) { + e->rects[i].x1 = pBox->x1 - pPixmap->screen_x; + e->rects[i].y1 = pBox->y1 - pPixmap->screen_y; + e->rects[i].x2 = pBox->x2 - pPixmap->screen_x; + e->rects[i].y2 = pBox->y2 - pPixmap->screen_y; + pBox++; + } +} + +static void +DRI2PostBufferAttach(DrawablePtr pDraw) +{ + ScreenPtr pScreen = pDraw->pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + DRI2DrawablePrivPtr pPriv; + WindowPtr pWin; + PixmapPtr pPixmap; + __DRIBufferAttachEvent *e; + size_t size; + unsigned int handle, flags; + + if (pDraw->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr) pDraw; + pPixmap = pScreen->GetWindowPixmap(pWin); + pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); + } else { + pPixmap = (PixmapPtr) pDraw; + pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + } + + if (!pPriv) + return; + + size = sizeof *e; + + handle = ds->getPixmapHandle(pPixmap, &flags); + if (handle == 0 || handle == pPriv->handle) + return; + + e = DRI2ScreenAllocEvent(ds, size); + e->event_header = DRI2_EVENT_HEADER(DRI2_EVENT_BUFFER_ATTACH, size); + e->drawable = pPriv->drawable; + e->buffer.attachment = DRI_DRAWABLE_BUFFER_FRONT_LEFT; + e->buffer.handle = handle; + e->buffer.pitch = pPixmap->devKind; + e->buffer.cpp = pPixmap->drawable.bitsPerPixel / 8; + e->buffer.flags = flags; + + pPriv->handle = handle; +} + +static void +DRI2ClipNotify(WindowPtr pWin, int dx, int dy) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + if (!ds->locked) { + ds->beginClipNotify(pScreen); + ds->locked = 1; + } + + if (ds->ClipNotify) { + pScreen->ClipNotify = ds->ClipNotify; + pScreen->ClipNotify(pWin, dx, dy); + pScreen->ClipNotify = DRI2ClipNotify; + } + + DRI2PostDrawableConfig(&pWin->drawable); + DRI2PostBufferAttach(&pWin->drawable); +} + +static void +DRI2HandleExposures(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + if (ds->HandleExposures) { + pScreen->HandleExposures = ds->HandleExposures; + pScreen->HandleExposures(pWin); + pScreen->HandleExposures = DRI2HandleExposures; + } + + DRI2ScreenCommitEvents(ds); + + if (ds->locked) { + ds->endClipNotify(pScreen); + ds->locked = 0; + } +} + +void +DRI2CloseScreen(ScreenPtr pScreen) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + pScreen->ClipNotify = ds->ClipNotify; + pScreen->HandleExposures = ds->HandleExposures; + + drmBOUnmap(ds->fd, &ds->sareaBO); + drmBOUnreference(ds->fd, &ds->sareaBO); + + xfree(ds); + dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, NULL); +} + +Bool +DRI2CreateDrawable(ScreenPtr pScreen, + DrawablePtr pDraw, drm_drawable_t *pDrmDrawable) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + WindowPtr pWin; + PixmapPtr pPixmap; + DRI2DrawablePrivPtr pPriv; + DevPrivateKey key; + PrivateRec **devPrivates; + + if (pDraw->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr) pDraw; + devPrivates = &pWin->devPrivates; + key = dri2WindowPrivateKey; + } else { + pPixmap = (PixmapPtr) pDraw; + devPrivates = &pPixmap->devPrivates; + key = dri2PixmapPrivateKey; + } + + pPriv = dixLookupPrivate(devPrivates, key); + if (pPriv == NULL) { + pPriv = xalloc(sizeof *pPriv); + if (drmCreateDrawable(ds->fd, &pPriv->drawable)) + return FALSE; + + dixSetPrivate(devPrivates, key, pPriv); + } + + *pDrmDrawable = pPriv->drawable; + + DRI2PostDrawableConfig(pDraw); + DRI2PostBufferAttach(pDraw); + DRI2ScreenCommitEvents(ds); + + return TRUE; +} + +void +DRI2DestroyDrawable(ScreenPtr pScreen, DrawablePtr pDraw) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + PixmapPtr pPixmap; + WindowPtr pWin; + DRI2DrawablePrivPtr pPriv; + + if (pDraw->type == DRAWABLE_WINDOW) { + pWin = (WindowPtr) pDraw; + pPriv = dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); + dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, NULL); + } else { + pPixmap = (PixmapPtr) pDraw; + pPriv = dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL); + } + + if (pPriv == NULL) + return; + + drmDestroyDrawable(ds->fd, pPriv->drawable); + xfree(pPriv); +} + +Bool +DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName, + int *ddxMajor, int *ddxMinor, int *ddxPatch, + unsigned int *sareaHandle) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + if (ds == NULL) + return FALSE; + + *fd = ds->fd; + *driverName = ds->driverName; + *ddxMajor = ds->ddxVersionMajor; + *ddxMinor = ds->ddxVersionMinor; + *ddxPatch = ds->ddxVersionPatch; + *sareaHandle = ds->sareaBO.handle; + + return TRUE; +} + +static void * +DRI2SetupSAREA(ScreenPtr pScreen, size_t driverSareaSize) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + unsigned long mask; + const size_t event_buffer_size = 32 * 1024; + + ds->sareaSize = + sizeof(*ds->buffer) + event_buffer_size + + driverSareaSize + + sizeof (unsigned int); + + mask = DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_MAPPABLE | + DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_SHAREABLE; + + if (drmBOCreate(ds->fd, ds->sareaSize, 1, NULL, mask, 0, &ds->sareaBO)) + return NULL; + + if (drmBOMap(ds->fd, &ds->sareaBO, + DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE, 0, &ds->sarea)) { + drmBOUnreference(ds->fd, &ds->sareaBO); + return NULL; + } + + xf86DrvMsg(pScreen->myNum, X_INFO, + "[DRI2] Allocated %d byte SAREA, BO handle 0x%08x\n", + ds->sareaSize, ds->sareaBO.handle); + memset(ds->sarea, 0, ds->sareaSize); + + ds->buffer = ds->sarea; + ds->buffer->block_header = + DRI2_SAREA_BLOCK_HEADER(DRI2_SAREA_BLOCK_EVENT_BUFFER, + sizeof *ds->buffer + event_buffer_size); + ds->buffer->size = event_buffer_size; + + return DRI2_SAREA_BLOCK_NEXT(ds->buffer); +} + +void * +DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) +{ + DRI2ScreenPtr ds; + void *p; + + ds = xalloc(sizeof *ds); + if (!ds) + return NULL; + + ds->fd = info->fd; + ds->driverName = info->driverName; + ds->ddxVersionMajor = info->ddxVersionMajor; + ds->ddxVersionMinor = info->ddxVersionMinor; + ds->ddxVersionPatch = info->ddxVersionPatch; + + ds->getPixmapHandle = info->getPixmapHandle; + ds->beginClipNotify = info->beginClipNotify; + ds->endClipNotify = info->endClipNotify; + + ds->ClipNotify = pScreen->ClipNotify; + pScreen->ClipNotify = DRI2ClipNotify; + ds->HandleExposures = pScreen->HandleExposures; + pScreen->HandleExposures = DRI2HandleExposures; + + dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); + + p = DRI2SetupSAREA(pScreen, info->driverSareaSize); + if (p == NULL) { + xfree(ds); + return NULL; + } + + xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n"); + + return p; +} + +static pointer +DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin) +{ + return (pointer) 1; +} + +static XF86ModuleVersionInfo DRI2VersRec = +{ + "dri2", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XORG_VERSION_CURRENT, + 1, 0, 0, + ABI_CLASS_EXTENSION, + ABI_EXTENSION_VERSION, + MOD_CLASS_NONE, + { 0, 0, 0, 0 } +}; + +_X_EXPORT XF86ModuleData dri2ModuleData = { &DRI2VersRec, DRI2Setup, NULL }; + diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h new file mode 100644 index 000000000..65b4c6b76 --- /dev/null +++ b/hw/xfree86/dri2/dri2.h @@ -0,0 +1,77 @@ +/* + * Copyright © 2007 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), to deal in the Software without restriction, including without + * limitation the rights to use, copy, modify, merge, publish, distribute, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, provided that the above copyright + * notice(s) and this permission notice appear in all copies of the Soft- + * ware and that both the above copyright notice(s) and this permission + * notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- + * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY + * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN + * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- + * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- + * MANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall + * not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization of + * the copyright holder. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifndef _DRI2_H_ +#define _DRI2_H_ + +typedef unsigned int (*DRI2GetPixmapHandleProcPtr)(PixmapPtr p, + unsigned int *flags); +typedef void (*DRI2BeginClipNotifyProcPtr)(ScreenPtr pScreen); +typedef void (*DRI2EndClipNotifyProcPtr)(ScreenPtr pScreen); + +typedef struct { + unsigned int version; /* Version of this struct */ + int fd; + size_t driverSareaSize; + const char *driverName; + int ddxVersionMajor, ddxVersionMinor, ddxVersionPatch; + DRI2GetPixmapHandleProcPtr getPixmapHandle; + DRI2BeginClipNotifyProcPtr beginClipNotify; + DRI2EndClipNotifyProcPtr endClipNotify; +} DRI2InfoRec, *DRI2InfoPtr; + +void *DRI2ScreenInit(ScreenPtr pScreen, + DRI2InfoPtr info); + +void DRI2CloseScreen(ScreenPtr pScreen); + +Bool DRI2Connect(ScreenPtr pScreen, + int *fd, + const char **driverName, + int *ddxMajor, + int *ddxMinor, + int *ddxPatch, + unsigned int *sareaHandle); + +void DRI2Lock(ScreenPtr pScreen); +void DRI2Unlock(ScreenPtr pScreen); + +Bool DRI2CreateDrawable(ScreenPtr pScreen, + DrawablePtr pDraw, + drm_drawable_t *pDrmDrawable); + +void DRI2DestroyDrawable(ScreenPtr pScreen, + DrawablePtr pDraw); + +void DRI2ExtensionInit(void); + +#endif diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 068b55170..38639d684 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -436,6 +436,9 @@ #undef XEPHYR_DRI +/* Build DRI2 extension */ +#undef DRI2 + /* Build DBE support */ #undef DBE diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in index b91ea9260..0603eab67 100644 --- a/include/xorg-config.h.in +++ b/include/xorg-config.h.in @@ -54,6 +54,9 @@ /* Building DRI-capable DDX. */ #undef XF86DRI +/* Build DRI2 extension */ +#undef DRI2 + /* Solaris 8 or later? */ #undef __SOL8__ diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in index dc6f1b31f..1d41b4ce6 100644 --- a/include/xorg-server.h.in +++ b/include/xorg-server.h.in @@ -142,6 +142,9 @@ /* Build DRI extension */ #undef XF86DRI +/* Build DRI2 extension */ +#undef DRI2 + /* Build Xorg server */ #undef XORGSERVER From 879515b1399f87a47010532af70f34b9b09e2a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 4 Feb 2008 13:13:35 -0500 Subject: [PATCH 500/552] Add GLX provider for DRI2. --- GL/glx/Makefile.am | 2 + GL/glx/glxdri2.c | 573 +++++++++++++++++++++++++++++++++ GL/glx/glxscreens.c | 26 ++ hw/xfree86/dixmods/glxmodule.c | 3 + 4 files changed, 604 insertions(+) create mode 100644 GL/glx/glxdri2.c diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index 4cf56e89d..e37e499c5 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -25,6 +25,7 @@ INCLUDES = \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ + -I$(top_srcdir)/hw/xfree86/dri2 \ -I$(top_srcdir)/mi @@ -36,6 +37,7 @@ nodist_libglx_la_SOURCES = indirect_size.h \ libglxdri_la_SOURCES = \ glxdri.c \ + glxdri2.c \ extension_string.c \ extension_string.h diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c new file mode 100644 index 000000000..d8df604c2 --- /dev/null +++ b/GL/glx/glxdri2.c @@ -0,0 +1,573 @@ +/* + * Copyright © 2007 Red Hat, Inc + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of Red Hat, + * Inc not be used in advertising or publicity pertaining to + * distribution of the software without specific, written prior + * permission. Red Hat, Inc makes no representations about the + * suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN + * NO EVENT SHALL RED HAT, INC BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#define _XF86DRI_SERVER_ +#include +#include +#include +#include +#include + +#include "glxserver.h" +#include "glxutil.h" +#include "glcontextmodes.h" + +#include "g_disptab.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" +#include "dispatch.h" +#include "extension_string.h" + +#define containerOf(ptr, type, member) \ + (type *)( (char *)ptr - offsetof(type,member) ) + +typedef struct __GLXDRIscreen __GLXDRIscreen; +typedef struct __GLXDRIcontext __GLXDRIcontext; +typedef struct __GLXDRIdrawable __GLXDRIdrawable; + +struct __GLXDRIscreen { + __GLXscreen base; + __DRIscreen driScreen; + void *driver; + int fd; + + xf86EnterVTProc *enterVT; + xf86LeaveVTProc *leaveVT; + + __DRIcopySubBufferExtension *copySubBuffer; + __DRIswapControlExtension *swapControl; + + unsigned char glx_enable_bits[__GLX_EXT_BYTES]; +}; + +struct __GLXDRIcontext { + __GLXcontext base; + __DRIcontext driContext; + drm_context_t hwContext; +}; + +struct __GLXDRIdrawable { + __GLXdrawable base; + __DRIdrawable driDrawable; +}; + +static const char CREATE_NEW_SCREEN_FUNC[] = __DRI2_CREATE_NEW_SCREEN_STRING; + +static void +__glXDRIdrawableDestroy(__GLXdrawable *drawable) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; + + (*private->driDrawable.destroyDrawable)(&private->driDrawable); + + /* If the X window was destroyed, the dri DestroyWindow hook will + * aready have taken care of this, so only call if pDraw isn't NULL. */ + if (drawable->pDraw != NULL) + DRI2DestroyDrawable(drawable->pDraw->pScreen, drawable->pDraw); + + xfree(private); +} + +static GLboolean +__glXDRIdrawableResize(__GLXdrawable *glxPriv) +{ + /* Nothing to do here, the DRI driver asks the server for drawable + * geometry when it sess the SAREA timestamps change.*/ + + return GL_TRUE; +} + +static GLboolean +__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + + (*private->driDrawable.swapBuffers)(&private->driDrawable); + + return TRUE; +} + + +static int +__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval) +{ + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable; + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(baseDrawable->pDraw->pScreen); + + if (screen->swapControl) + screen->swapControl->setSwapInterval(&draw->driDrawable, interval); + + return 0; +} + + +static void +__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate, + int x, int y, int w, int h) +{ + __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(basePrivate->pDraw->pScreen); + + if (screen->copySubBuffer) + screen->copySubBuffer->copySubBuffer(&private->driDrawable, + x, y, w, h); +} + +static void +__glXDRIcontextDestroy(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseContext->pGlxScreen; + + context->driContext.destroyContext(&context->driContext); + drmDestroyContext(screen->fd, context->hwContext); + __glXContextDestroy(&context->base); + xfree(context); +} + +static int +__glXDRIcontextMakeCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; + __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; + + return (*context->driContext.bindContext)(&context->driContext, + &draw->driDrawable, + &read->driDrawable); +} + +static int +__glXDRIcontextLoseCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + + return (*context->driContext.unbindContext)(&context->driContext); +} + +static int +__glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, + unsigned long mask) +{ + __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; + __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; + + /* FIXME: We will need to add DRIcontext::copyContext for this. */ + + (void) dst; + (void) src; + + return FALSE; +} + +static int +__glXDRIcontextForceCurrent(__GLXcontext *baseContext) +{ + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; + __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; + + return (*context->driContext.bindContext)(&context->driContext, + &draw->driDrawable, + &read->driDrawable); +} + +static int +__glXDRIbindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *glxPixmap) +{ + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *pixmap) +{ + return Success; +} + +static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { + __glXDRIbindTexImage, + __glXDRIreleaseTexImage +}; + +static void +__glXDRIscreenDestroy(__GLXscreen *baseScreen) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + + screen->driScreen.destroyScreen(&screen->driScreen); + + dlclose(screen->driver); + + __glXScreenDestroy(baseScreen); + + xfree(screen); +} + +static __GLXcontext * +__glXDRIscreenCreateContext(__GLXscreen *baseScreen, + __GLcontextModes *modes, + __GLXcontext *baseShareContext) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; + __GLXDRIcontext *context, *shareContext; + __DRIcontext *driShare; + + shareContext = (__GLXDRIcontext *) baseShareContext; + if (shareContext) + driShare = &shareContext->driContext; + else + driShare = NULL; + + context = xalloc(sizeof *context); + if (context == NULL) + return NULL; + + memset(context, 0, sizeof *context); + context->base.destroy = __glXDRIcontextDestroy; + context->base.makeCurrent = __glXDRIcontextMakeCurrent; + context->base.loseCurrent = __glXDRIcontextLoseCurrent; + context->base.copy = __glXDRIcontextCopy; + context->base.forceCurrent = __glXDRIcontextForceCurrent; + context->base.textureFromPixmap = &__glXDRItextureFromPixmap; + + if (drmCreateContext(screen->fd, &context->hwContext)) + return GL_FALSE; + + context->driContext.private = + screen->driScreen.createNewContext(&screen->driScreen, + modes, + 0, /* render type */ + driShare, + context->hwContext, + &context->driContext); + + return &context->base; +} + +static __GLXdrawable * +__glXDRIscreenCreateDrawable(__GLXscreen *screen, + DrawablePtr pDraw, + int type, + XID drawId, + __GLcontextModes *modes) +{ + __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen; + __GLXDRIdrawable *private; + GLboolean retval; + drm_drawable_t hwDrawable; + + private = xalloc(sizeof *private); + if (private == NULL) + return NULL; + + memset(private, 0, sizeof *private); + + if (!__glXDrawableInit(&private->base, screen, + pDraw, type, drawId, modes)) { + xfree(private); + return NULL; + } + + private->base.destroy = __glXDRIdrawableDestroy; + private->base.resize = __glXDRIdrawableResize; + private->base.swapBuffers = __glXDRIdrawableSwapBuffers; + private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; + + retval = DRI2CreateDrawable(screen->pScreen, pDraw, &hwDrawable); + + private->driDrawable.private = + (driScreen->driScreen.createNewDrawable)(&driScreen->driScreen, + modes, + &private->driDrawable, + hwDrawable, 0, NULL); + + return &private->base; +} + +static int +getUST(int64_t *ust) +{ + struct timeval tv; + + if (ust == NULL) + return -EFAULT; + + if (gettimeofday(&tv, NULL) == 0) { + ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec; + return 0; + } else { + return -errno; + } +} + +static void __glXReportDamage(__DRIdrawable *driDraw, + int x, int y, + drm_clip_rect_t *rects, int num_rects, + GLboolean front_buffer) +{ + __GLXDRIdrawable *drawable = + containerOf(driDraw, __GLXDRIdrawable, driDrawable); + DrawablePtr pDraw = drawable->base.pDraw; + RegionRec region; + + REGION_INIT(pDraw->pScreen, ®ion, (BoxPtr) rects, num_rects); + REGION_TRANSLATE(pScreen, ®ion, pDraw->x, pDraw->y); + DamageDamageRegion(pDraw, ®ion); + REGION_UNINIT(pDraw->pScreen, ®ion); +} + +/* Table of functions that we export to the driver. */ +static const __DRIinterfaceMethods interface_methods = { + _gl_context_modes_create, + _gl_context_modes_destroy, + + NULL, + + getUST, + NULL, + + __glXReportDamage, +}; + +static const char dri_driver_path[] = DRI_DRIVER_PATH; + +static Bool +glxDRIEnterVT (int index, int flags) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(screenInfo.screens[index]); + + LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n"); + + if (!(*screen->enterVT) (index, flags)) + return FALSE; + + glxResumeClients(); + + return TRUE; +} + +static void +glxDRILeaveVT (int index, int flags) +{ + __GLXDRIscreen *screen = (__GLXDRIscreen *) + glxGetScreen(screenInfo.screens[index]); + + LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n"); + + glxSuspendClients(); + + return (*screen->leaveVT) (index, flags); +} + +static void +initializeExtensions(__GLXDRIscreen *screen) +{ + const __DRIextension **extensions; + int i; + + extensions = screen->driScreen.getExtensions(&screen->driScreen); + for (i = 0; extensions[i]; i++) { +#ifdef __DRI_COPY_SUB_BUFFER + if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) { + screen->copySubBuffer = (__DRIcopySubBufferExtension *) extensions[i]; + __glXEnableExtension(screen->glx_enable_bits, + "GLX_MESA_copy_sub_buffer"); + + LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n"); + } +#endif + +#ifdef __DRI_SWAP_CONTROL + if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) { + screen->swapControl = (__DRIswapControlExtension *) extensions[i]; + __glXEnableExtension(screen->glx_enable_bits, + "GLX_SGI_swap_control"); + __glXEnableExtension(screen->glx_enable_bits, + "GLX_MESA_swap_control"); + + LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n"); + } +#endif + /* Ignore unknown extensions */ + } +} + +static __GLXscreen * +__glXDRIscreenProbe(ScreenPtr pScreen) +{ + __DRI2_CREATE_NEW_SCREEN_FUNC *createNewScreen; + __DRIversion ddx_version; + __DRIversion dri_version; + __DRIversion drm_version; + drmVersionPtr version; + const char *driverName; + __GLXDRIscreen *screen; + char filename[128]; + size_t buffer_size; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + unsigned int sareaHandle; + + screen = xalloc(sizeof *screen); + if (screen == NULL) + return NULL; + memset(screen, 0, sizeof *screen); + + if (!xf86LoaderCheckSymbol("DRI2Connect") || + !DRI2Connect(pScreen, + &screen->fd, + &driverName, + &ddx_version.major, + &ddx_version.minor, + &ddx_version.patch, + &sareaHandle)) { + LogMessage(X_INFO, + "AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum); + return NULL; + } + + screen->base.destroy = __glXDRIscreenDestroy; + screen->base.createContext = __glXDRIscreenCreateContext; + screen->base.createDrawable = __glXDRIscreenCreateDrawable; + screen->base.swapInterval = __glXDRIdrawableSwapInterval; + screen->base.pScreen = pScreen; + + __glXInitExtensionEnableBits(screen->glx_enable_bits); + + /* DRI protocol version. */ + dri_version.major = XF86DRI_MAJOR_VERSION; + dri_version.minor = XF86DRI_MINOR_VERSION; + dri_version.patch = XF86DRI_PATCH_VERSION; + + version = drmGetVersion(screen->fd); + if (version) { + drm_version.major = version->version_major; + drm_version.minor = version->version_minor; + drm_version.patch = version->version_patchlevel; + drmFreeVersion(version); + } + else { + drm_version.major = -1; + drm_version.minor = -1; + drm_version.patch = -1; + } + + snprintf(filename, sizeof filename, "%s/%s_dri.so", + dri_driver_path, driverName); + + screen->driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); + if (screen->driver == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", + filename, dlerror()); + goto handle_error; + } + + createNewScreen = dlsym(screen->driver, CREATE_NEW_SCREEN_FUNC); + if (createNewScreen == NULL) { + LogMessage(X_ERROR, "AIGLX error: dlsym for %s failed (%s)\n", + CREATE_NEW_SCREEN_FUNC, dlerror()); + goto handle_error; + } + + screen->driScreen.private = + (*createNewScreen)(pScreen->myNum, + &screen->driScreen, + &ddx_version, + &dri_version, + &drm_version, + screen->fd, + sareaHandle, + &interface_methods, + &screen->base.fbconfigs); + + if (screen->driScreen.private == NULL) { + LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed"); + goto handle_error; + } + + initializeExtensions(screen); + + __glXScreenInit(&screen->base, pScreen); + + buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); + if (buffer_size > 0) { + if (screen->base.GLXextensions != NULL) { + xfree(screen->base.GLXextensions); + } + + screen->base.GLXextensions = xnfalloc(buffer_size); + (void) __glXGetExtensionString(screen->glx_enable_bits, + screen->base.GLXextensions); + } + + screen->enterVT = pScrn->EnterVT; + pScrn->EnterVT = glxDRIEnterVT; + screen->leaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = glxDRILeaveVT; + + LogMessage(X_INFO, + "AIGLX: Loaded and initialized %s\n", filename); + + return &screen->base; + + handle_error: + if (screen->driver) + dlclose(screen->driver); + + xfree(screen); + + LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); + + return NULL; +} + +__GLXprovider __glXDRI2Provider = { + __glXDRIscreenProbe, + "DRI2", + NULL +}; diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c index 88773a785..6575b271d 100644 --- a/GL/glx/glxscreens.c +++ b/GL/glx/glxscreens.c @@ -280,6 +280,30 @@ void GlxSetVisualConfigs(int nconfigs, * call it. */ } +static void +filterOutNativeConfigs(__GLXscreen *pGlxScreen) +{ + __GLcontextModes *m, *next, *native_modes, **last; + ScreenPtr pScreen = pGlxScreen->pScreen; + int i, depth; + + last = &pGlxScreen->fbconfigs; + for (m = pGlxScreen->fbconfigs; m != NULL; m = next) { + next = m->next; + depth = m->redBits + m->blueBits + m->greenBits; + + for (i = 0; i < pScreen->numVisuals; i++) { + if (pScreen->visuals[i].nplanes == depth) { + *last = m; + last = &m->next; + break; + } + } + } + + *last = NULL; +} + static XID findVisualForConfig(ScreenPtr pScreen, __GLcontextModes *m) { @@ -513,6 +537,8 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) pGlxScreen->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = glxCloseScreen; + filterOutNativeConfigs(pGlxScreen); + i = 0; for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) { m->fbconfigID = FakeClientID(0); diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c index 0ff867de0..a1a088629 100644 --- a/hw/xfree86/dixmods/glxmodule.c +++ b/hw/xfree86/dixmods/glxmodule.c @@ -125,6 +125,9 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) provider = LoaderSymbol("__glXDRIProvider"); if (provider) GlxPushProvider(provider); + provider = LoaderSymbol("__glXDRI2Provider"); + if (provider) + GlxPushProvider(provider); } switch (xf86Info.glxVisuals) { From 0ffb6a3ad010e80fe8f973fc228d549f9dd3effd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 14 Feb 2008 22:20:56 -0500 Subject: [PATCH 501/552] GLX: Implement support for TTM BO based TFP when available. --- GL/glx/glxdri2.c | 60 ++++++++++++++++++++++++++++++++++++++++++ hw/xfree86/dri2/dri2.c | 8 ++++++ hw/xfree86/dri2/dri2.h | 3 +++ 3 files changed, 71 insertions(+) diff --git a/GL/glx/glxdri2.c b/GL/glx/glxdri2.c index d8df604c2..d1c8d417e 100644 --- a/GL/glx/glxdri2.c +++ b/GL/glx/glxdri2.c @@ -75,6 +75,7 @@ struct __GLXDRIscreen { __DRIcopySubBufferExtension *copySubBuffer; __DRIswapControlExtension *swapControl; + __DRItexBufferExtension *texBuffer; unsigned char glx_enable_bits[__GLX_EXT_BYTES]; }; @@ -213,6 +214,55 @@ __glXDRIcontextForceCurrent(__GLXcontext *baseContext) &read->driDrawable); } +#ifdef __DRI_TEX_BUFFER + +#define isPowerOfTwo(n) (((n) & ((n) - 1 )) == 0) + +static int +__glXDRIbindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *glxPixmap) +{ + ScreenPtr pScreen = glxPixmap->pDraw->pScreen; + __GLXDRIscreen * const screen = (__GLXDRIscreen *) glxGetScreen(pScreen); + PixmapPtr pixmap; + __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; + unsigned int flags; + int w, h, target; + + if (screen->texBuffer == NULL) + return Success; + + pixmap = (PixmapPtr) glxPixmap->pDraw; + w = pixmap->drawable.width; + h = pixmap->drawable.height; + + if (!isPowerOfTwo(w) || !isPowerOfTwo(h)) + target = GL_TEXTURE_RECTANGLE_ARB; + else + target = GL_TEXTURE_2D; + + screen->texBuffer->setTexBuffer(&context->driContext, + target, + DRI2GetPixmapHandle(pixmap, &flags), + pixmap->drawable.depth, + pixmap->devKind, + h); + + return Success; +} + +static int +__glXDRIreleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *pixmap) +{ + /* FIXME: Just unbind the texture? */ + return Success; +} + +#else + static int __glXDRIbindTexImage(__GLXcontext *baseContext, int buffer, @@ -229,6 +279,8 @@ __glXDRIreleaseTexImage(__GLXcontext *baseContext, return Success; } +#endif + static __GLXtextureFromPixmap __glXDRItextureFromPixmap = { __glXDRIbindTexImage, __glXDRIreleaseTexImage @@ -434,6 +486,14 @@ initializeExtensions(__GLXDRIscreen *screen) LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n"); } #endif + +#ifdef __DRI_TEX_BUFFER + if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) { + screen->texBuffer = (__DRItexBufferExtension *) extensions[i]; + /* GLX_EXT_texture_from_pixmap is always enabled. */ + LogMessage(X_INFO, "AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n"); + } +#endif /* Ignore unknown extensions */ } } diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 7c703a72c..3bc533ede 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -348,6 +348,14 @@ DRI2Connect(ScreenPtr pScreen, int *fd, const char **driverName, return TRUE; } +unsigned int +DRI2GetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pPixmap->drawable.pScreen); + + return ds->getPixmapHandle(pPixmap, flags); +} + static void * DRI2SetupSAREA(ScreenPtr pScreen, size_t driverSareaSize) { diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h index 65b4c6b76..c687a93f6 100644 --- a/hw/xfree86/dri2/dri2.h +++ b/hw/xfree86/dri2/dri2.h @@ -62,6 +62,9 @@ Bool DRI2Connect(ScreenPtr pScreen, int *ddxPatch, unsigned int *sareaHandle); +unsigned int DRI2GetPixmapHandle(PixmapPtr pPixmap, + unsigned int *flags); + void DRI2Lock(ScreenPtr pScreen); void DRI2Unlock(ScreenPtr pScreen); From a7d936c4ac8e3d7227ecbfe0ddc6cc257b450458 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 11 Feb 2008 16:09:03 -0800 Subject: [PATCH 502/552] XQuartz: Fixed EXTRA_DIST to include localization (cherry picked from commit 1b338c2a9330c85490a7c24d52adf24b124b70e6) --- hw/xquartz/bundle/Makefile.am | 56 +++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 00d540fee..95cfd19f7 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -18,9 +18,59 @@ EXTRA_DIST = \ Info.plist \ X11.icns \ bundle-main.c \ + X11.xcodeproj/project.pbxproj + Dutch.lproj/InfoPlist.strings \ + Dutch.lproj/Localizable.strings \ + Dutch.lproj/main.nib/keyedobjects.nib \ English.lproj/InfoPlist.strings \ English.lproj/Localizable.strings \ - English.lproj/main.nib/classes.nib \ - English.lproj/main.nib/info.nib \ + English.lproj/main.nib/designable.nib \ English.lproj/main.nib/keyedobjects.nib \ - X11.xcodeproj/project.pbxproj + French.lproj/InfoPlist.strings \ + French.lproj/Localizable.strings \ + French.lproj/main.nib/keyedobjects.nib \ + German.lproj/InfoPlist.strings \ + German.lproj/Localizable.strings \ + German.lproj/main.nib/keyedobjects.nib \ + Italian.lproj/InfoPlist.strings \ + Italian.lproj/Localizable.strings \ + Italian.lproj/main.nib/keyedobjects.nib \ + Japanese.lproj/InfoPlist.strings \ + Japanese.lproj/Localizable.strings \ + Japanese.lproj/main.nib/keyedobjects.nib \ + Spanish.lproj/InfoPlist.strings \ + Spanish.lproj/Localizable.strings \ + Spanish.lproj/main.nib/keyedobjects.nib \ + da.lproj/InfoPlist.strings \ + da.lproj/Localizable.strings \ + da.lproj/main.nib/keyedobjects.nib \ + fi.lproj/InfoPlist.strings \ + fi.lproj/Localizable.strings \ + fi.lproj/main.nib/keyedobjects.nib \ + ko.lproj/InfoPlist.strings \ + ko.lproj/Localizable.strings \ + ko.lproj/main.nib/keyedobjects.nib \ + no.lproj/InfoPlist.strings \ + no.lproj/Localizable.strings \ + no.lproj/main.nib/keyedobjects.nib \ + pl.lproj/InfoPlist.strings \ + pl.lproj/Localizable.strings \ + pl.lproj/main.nib/keyedobjects.nib \ + pt.lproj/InfoPlist.strings \ + pt.lproj/Localizable.strings \ + pt.lproj/main.nib/keyedobjects.nib \ + pt_PT.lproj/InfoPlist.strings \ + pt_PT.lproj/Localizable.strings \ + pt_PT.lproj/main.nib/keyedobjects.nib \ + ru.lproj/InfoPlist.strings \ + ru.lproj/Localizable.strings \ + ru.lproj/main.nib/keyedobjects.nib \ + sv.lproj/InfoPlist.strings \ + sv.lproj/Localizable.strings \ + sv.lproj/main.nib/keyedobjects.nib \ + zh_CN.lproj/InfoPlist.strings \ + zh_CN.lproj/Localizable.strings \ + zh_CN.lproj/main.nib/keyedobjects.nib \ + zh_TW.lproj/InfoPlist.strings \ + zh_TW.lproj/Localizable.strings \ + zh_TW.lproj/main.nib/keyedobjects.nib From d103820bb8635c63b34b85b45cad95ed9c152d90 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 16 Feb 2008 00:35:50 -0800 Subject: [PATCH 503/552] Fixed unescaped newline in EXTRA_DIST (cherry picked from commit 567c172c4d400fdfe69e7b096a3877fce5c2de9f) --- hw/xquartz/bundle/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 95cfd19f7..093a102b5 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -18,7 +18,7 @@ EXTRA_DIST = \ Info.plist \ X11.icns \ bundle-main.c \ - X11.xcodeproj/project.pbxproj + X11.xcodeproj/project.pbxproj \ Dutch.lproj/InfoPlist.strings \ Dutch.lproj/Localizable.strings \ Dutch.lproj/main.nib/keyedobjects.nib \ From b95059c20746a71e60ef152bb627e1d5c2210d75 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 16 Feb 2008 01:33:13 -0800 Subject: [PATCH 504/552] Added Xquartz.plist to EXTRA_DIST (cherry picked from commit 70f9495e0c1f1459507064b673fe57b1c90d3c2c) --- hw/xquartz/bundle/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am index 093a102b5..801fdc7d8 100644 --- a/hw/xquartz/bundle/Makefile.am +++ b/hw/xquartz/bundle/Makefile.am @@ -15,6 +15,7 @@ resourcedir=$(libdir)/X11/xserver resource_DATA = Xquartz.plist EXTRA_DIST = \ + $(resource_DATA) \ Info.plist \ X11.icns \ bundle-main.c \ From 70c0592a97c7dc9db0576d32b3bdbe4766520509 Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Sun, 17 Feb 2008 11:21:01 +0100 Subject: [PATCH 505/552] Resize composite overlay window when the root window changes. - This allows some compositing managers to work, even after randr12 has changed the root window size. - Thanks to ajax for figuring out the best place to put this. - Example: - xf86RandR12SetMode() calls EnableDisableFBAccess(). - That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize(). - The final step is the call to PositionWindow(). --- composite/compwindow.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/composite/compwindow.c b/composite/compwindow.c index 579236713..ee0f7d270 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -165,6 +165,29 @@ compCheckRedirect (WindowPtr pWin) return TRUE; } +static int +updateOverlayWindow(ScreenPtr pScreen) +{ + CompScreenPtr cs; + WindowPtr pWin; /* overlay window */ + XID vlist[2]; + + cs = GetCompScreen(pScreen); + if ((pWin = cs->pOverlayWin) != NULL) { + if ((pWin->drawable.width == pScreen->width) && + (pWin->drawable.height == pScreen->height)) + return Success; + + /* Let's resize the overlay window. */ + vlist[0] = pScreen->width; + vlist[1] = pScreen->height; + return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin)); + } + + /* Let's be on the safe side and not assume an overlay window is always allocated. */ + return Success; +} + Bool compPositionWindow (WindowPtr pWin, int x, int y) { @@ -203,6 +226,8 @@ compPositionWindow (WindowPtr pWin, int x, int y) cs->PositionWindow = pScreen->PositionWindow; pScreen->PositionWindow = compPositionWindow; compCheckTree (pWin->drawable.pScreen); + if (updateOverlayWindow(pScreen) != Success) + ret = FALSE; return ret; } From a48cc88ea2674c28b69b8d738b168cbafcf4001f Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Sun, 17 Feb 2008 18:47:28 +0100 Subject: [PATCH 506/552] Fix rotation for multi-monitor situation. - The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find. - Fix bug #13787. --- hw/xfree86/modes/xf86Rotate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index c129d9b92..e2d6295b9 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -580,9 +580,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) } else { - PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, crtc->x, crtc->y); + PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y)); PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc); - + /* * these are the size of the shadow pixmap, which * matches the mode, not the pre-rotated copy in the From e4eb7e5842f0f56f07e9cf3b16249c172d0a975d Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 30 Jan 2008 23:24:14 +1100 Subject: [PATCH 507/552] XKB: Delete xkberrs.c Get rid of the XKB errors code to save a bunch of space. --- include/xkbsrv.h | 3 +-- xkb/Makefile.am | 1 - xkb/xkberrs.c | 37 ------------------------------------- 3 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 xkb/xkberrs.c diff --git a/include/xkbsrv.h b/include/xkbsrv.h index bf386e72d..c7709f727 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -310,8 +310,7 @@ extern CARD32 xkbDebugFlags; #define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t)) #define _XkbFree(p) Xfree(p) -#define _XkbLibError(c,l,d) \ - { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); } +#define _XkbLibError(c,l,d) /* Epoch fail */ #define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff))) #define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c)) #define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d))) diff --git a/xkb/Makefile.am b/xkb/Makefile.am index 78cdf7196..e750d6098 100644 --- a/xkb/Makefile.am +++ b/xkb/Makefile.am @@ -32,7 +32,6 @@ XKBFILE_SRCS = \ xkmread.c \ xkbtext.c \ xkbfmisc.c \ - xkberrs.c \ xkbout.c X11_SRCS = \ diff --git a/xkb/xkberrs.c b/xkb/xkberrs.c deleted file mode 100644 index 3534356c6..000000000 --- a/xkb/xkberrs.c +++ /dev/null @@ -1,37 +0,0 @@ -/************************************************************ - Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. - - Permission to use, copy, modify, and distribute this - software and its documentation for any purpose and without - fee is hereby granted, provided that the above copyright - notice appear in all copies and that both that copyright - notice and this permission notice appear in supporting - documentation, and that the name of Silicon Graphics not be - used in advertising or publicity pertaining to distribution - of the software without specific prior written permission. - Silicon Graphics makes no representation about the suitability - of this software for any purpose. It is provided "as is" - without any express or implied warranty. - - SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON - GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH - THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include - -unsigned _XkbErrCode; -char * _XkbErrLocation= NULL; -unsigned _XkbErrData; From 37867626e314e74031378a8a4ff06f69b899a3b2 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 1 Feb 2008 14:41:04 +1100 Subject: [PATCH 508/552] main(): Remove uncredible failure NO, NO, NO. NO. The only way this could possibly be worse is if you were viewing it in Comic Sans. --- dix/main.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/dix/main.c b/dix/main.c index 9114f00d9..068dae92e 100644 --- a/dix/main.c +++ b/dix/main.c @@ -137,8 +137,6 @@ _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[33]; int connBlockScreenStart; -static int restart = 0; - _X_EXPORT void NotImplemented(xEvent *from, xEvent *to) { @@ -264,13 +262,6 @@ main(int argc, char *argv[], char *envp[]) DarwinHandleGUI(argc, argv, envp); #endif - /* Notice if we're restarted. Probably this is because we jumped through - * an uninitialized pointer */ - if (restart) - FatalError("server restarted. Jumped through uninitialized pointer?\n"); - else - restart = 1; - CheckUserParameters(argc, argv, envp); CheckUserAuthorization(); From 68bd7ac1930b5cffb6657b8d5f5bf8ae58eae8d9 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sun, 3 Feb 2008 23:12:15 +1100 Subject: [PATCH 509/552] XKB: Move headers into the server tree We need to start breaking the XKB API to enforce sanity, so drag whichever headers we need to do so into the server tree, as the client API is set in stone, being part of Xlib. --- hw/dmx/examples/xinput.c | 2 +- hw/dmx/examples/xled.c | 2 +- hw/xfree86/utils/xorgcfg/text-mode.c | 2 +- hw/xfree86/utils/xorgconfig/xorgconfig.c | 2 +- include/xkbsrv.h | 4 +- include/xkbstr.h | 613 +++++++++++++++++++++ xkb/XKBAlloc.c | 2 +- xkb/XKBGAlloc.c | 2 +- xkb/maprules.c | 2 +- xkb/xkb.c | 2 +- xkb/xkb.h | 5 +- xkb/xkbInit.c | 4 +- xkb/xkbSwap.c | 2 +- xkb/xkbUtils.c | 2 +- xkb/xkbfile.h | 480 +++++++++++++++++ xkb/xkbfmisc.c | 4 +- xkb/xkbgeom.h | 655 +++++++++++++++++++++++ xkb/xkbout.c | 6 +- xkb/xkbtext.c | 4 +- xkb/xkmread.c | 4 +- 20 files changed, 1774 insertions(+), 25 deletions(-) create mode 100644 include/xkbstr.h create mode 100644 xkb/xkbfile.h create mode 100644 xkb/xkbgeom.h diff --git a/hw/dmx/examples/xinput.c b/hw/dmx/examples/xinput.c index 74353a93b..b6753e4ec 100644 --- a/hw/dmx/examples/xinput.c +++ b/hw/dmx/examples/xinput.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include "xkbstr.h" #include #include diff --git a/hw/dmx/examples/xled.c b/hw/dmx/examples/xled.c index 270f80511..322dda2f3 100644 --- a/hw/dmx/examples/xled.c +++ b/hw/dmx/examples/xled.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include "xkbstr.h" #include int main(int argc, char **argv) diff --git a/hw/xfree86/utils/xorgcfg/text-mode.c b/hw/xfree86/utils/xorgcfg/text-mode.c index 0b6e65482..c1fa67ed7 100644 --- a/hw/xfree86/utils/xorgcfg/text-mode.c +++ b/hw/xfree86/utils/xorgcfg/text-mode.c @@ -39,7 +39,7 @@ #endif #include #include -#include +#include "xkbstr.h" #include #include "cards.h" #include "config.h" diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c index 30eb83182..d537abac4 100644 --- a/hw/xfree86/utils/xorgconfig/xorgconfig.c +++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c @@ -106,7 +106,7 @@ #include #include -#include +#include "xkbstr.h" #include #define MAX_XKBOPTIONS 5 diff --git a/include/xkbsrv.h b/include/xkbsrv.h index c7709f727..e825f33a0 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -27,7 +27,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBSRV_H_ #define _XKBSRV_H_ -#ifdef XKB_IN_SERVER #define XkbAllocClientMap SrvXkbAllocClientMap #define XkbAllocServerMap SrvXkbAllocServerMap #define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey @@ -52,10 +51,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XkbVirtualModsToReal SrvXkbVirtualModsToReal #define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange #define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges -#endif -#include #include +#include "xkbstr.h" #include "inputstr.h" typedef struct _XkbInterest { diff --git a/include/xkbstr.h b/include/xkbstr.h new file mode 100644 index 000000000..e519e657d --- /dev/null +++ b/include/xkbstr.h @@ -0,0 +1,613 @@ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifndef _XKBSTR_H_ +#define _XKBSTR_H_ + +#include + +#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) +#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) + +#if defined(WORD64) && defined(UNSIGNEDBITFIELDS) +#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\ + (int)(((h)<<8)|(l)&0x7fff)) +#else +#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) +#endif + + /* + * Common data structures and access macros + */ + +typedef struct _XkbStateRec { + unsigned char group; + unsigned char locked_group; + unsigned short base_group; + unsigned short latched_group; + unsigned char mods; + unsigned char base_mods; + unsigned char latched_mods; + unsigned char locked_mods; + unsigned char compat_state; + unsigned char grab_mods; + unsigned char compat_grab_mods; + unsigned char lookup_mods; + unsigned char compat_lookup_mods; + unsigned short ptr_buttons; +} XkbStateRec,*XkbStatePtr; +#define XkbModLocks(s) ((s)->locked_mods) +#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s)) +#define XkbGroupLock(s) ((s)->locked_group) +#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s)) +#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) +#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group) + +typedef struct _XkbMods { + unsigned char mask; /* effective mods */ + unsigned char real_mods; + unsigned short vmods; +} XkbModsRec,*XkbModsPtr; + +typedef struct _XkbKTMapEntry { + Bool active; + unsigned char level; + XkbModsRec mods; +} XkbKTMapEntryRec,*XkbKTMapEntryPtr; + +typedef struct _XkbKeyType { + XkbModsRec mods; + unsigned char num_levels; + unsigned char map_count; + XkbKTMapEntryPtr map; + XkbModsPtr preserve; + Atom name; + Atom * level_names; +} XkbKeyTypeRec, *XkbKeyTypePtr; + +#define XkbNumGroups(g) ((g)&0x0f) +#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0) +#define XkbOutOfRangeGroupAction(g) ((g)&0xc0) +#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4) +#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f)) +#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f)) + + /* + * Structures and access macros used primarily by the server + */ + +typedef struct _XkbBehavior { + unsigned char type; + unsigned char data; +} XkbBehavior; + +#define XkbAnyActionDataSize 7 +typedef struct _XkbAnyAction { + unsigned char type; + unsigned char data[XkbAnyActionDataSize]; +} XkbAnyAction; + +typedef struct _XkbModAction { + unsigned char type; + unsigned char flags; + unsigned char mask; + unsigned char real_mods; + unsigned char vmods1; + unsigned char vmods2; +} XkbModAction; +#define XkbModActionVMods(a) \ + ((short)(((a)->vmods1<<8)|((a)->vmods2))) +#define XkbSetModActionVMods(a,v) \ + (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff)) + +typedef struct _XkbGroupAction { + unsigned char type; + unsigned char flags; + char group_XXX; +} XkbGroupAction; +#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX)) +#define XkbSASetGroup(a,g) ((a)->group_XXX=(g)) + +typedef struct _XkbISOAction { + unsigned char type; + unsigned char flags; + unsigned char mask; + unsigned char real_mods; + char group_XXX; + unsigned char affect; + unsigned char vmods1; + unsigned char vmods2; +} XkbISOAction; + +typedef struct _XkbPtrAction { + unsigned char type; + unsigned char flags; + unsigned char high_XXX; + unsigned char low_XXX; + unsigned char high_YYY; + unsigned char low_YYY; +} XkbPtrAction; +#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX)) +#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY)) +#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX)) +#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY)) + +typedef struct _XkbPtrBtnAction { + unsigned char type; + unsigned char flags; + unsigned char count; + unsigned char button; +} XkbPtrBtnAction; + +typedef struct _XkbPtrDfltAction { + unsigned char type; + unsigned char flags; + unsigned char affect; + char valueXXX; +} XkbPtrDfltAction; +#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX)) +#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff)) + +typedef struct _XkbSwitchScreenAction { + unsigned char type; + unsigned char flags; + char screenXXX; +} XkbSwitchScreenAction; +#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX)) +#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff)) + +typedef struct _XkbCtrlsAction { + unsigned char type; + unsigned char flags; + unsigned char ctrls3; + unsigned char ctrls2; + unsigned char ctrls1; + unsigned char ctrls0; +} XkbCtrlsAction; +#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\ + ((a)->ctrls2=(((c)>>16)&0xff)),\ + ((a)->ctrls1=(((c)>>8)&0xff)),\ + ((a)->ctrls0=((c)&0xff))) +#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\ + (((unsigned int)(a)->ctrls2)<<16)|\ + (((unsigned int)(a)->ctrls1)<<8)|\ + ((unsigned int)((a)->ctrls0))) + +typedef struct _XkbMessageAction { + unsigned char type; + unsigned char flags; + unsigned char message[6]; +} XkbMessageAction; + +typedef struct _XkbRedirectKeyAction { + unsigned char type; + unsigned char new_key; + unsigned char mods_mask; + unsigned char mods; + unsigned char vmods_mask0; + unsigned char vmods_mask1; + unsigned char vmods0; + unsigned char vmods1; +} XkbRedirectKeyAction; + +#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ + ((unsigned int)(a)->vmods0)) +#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ + ((a)->vmods_mask0=((m)&0xff))) +#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\ + ((unsigned int)(a)->vmods_mask0)) +#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ + ((a)->vmods_mask0=((m)&0xff))) + +typedef struct _XkbDeviceBtnAction { + unsigned char type; + unsigned char flags; + unsigned char count; + unsigned char button; + unsigned char device; +} XkbDeviceBtnAction; + +typedef struct _XkbDeviceValuatorAction { + unsigned char type; + unsigned char device; + unsigned char v1_what; + unsigned char v1_ndx; + unsigned char v1_value; + unsigned char v2_what; + unsigned char v2_ndx; + unsigned char v2_value; +} XkbDeviceValuatorAction; + +typedef union _XkbAction { + XkbAnyAction any; + XkbModAction mods; + XkbGroupAction group; + XkbISOAction iso; + XkbPtrAction ptr; + XkbPtrBtnAction btn; + XkbPtrDfltAction dflt; + XkbSwitchScreenAction screen; + XkbCtrlsAction ctrls; + XkbMessageAction msg; + XkbRedirectKeyAction redirect; + XkbDeviceBtnAction devbtn; + XkbDeviceValuatorAction devval; + unsigned char type; +} XkbAction; + +typedef struct _XkbControls { + unsigned char mk_dflt_btn; + unsigned char num_groups; + unsigned char groups_wrap; + XkbModsRec internal; + XkbModsRec ignore_lock; + unsigned int enabled_ctrls; + unsigned short repeat_delay; + unsigned short repeat_interval; + unsigned short slow_keys_delay; + unsigned short debounce_delay; + unsigned short mk_delay; + unsigned short mk_interval; + unsigned short mk_time_to_max; + unsigned short mk_max_speed; + short mk_curve; + unsigned short ax_options; + unsigned short ax_timeout; + unsigned short axt_opts_mask; + unsigned short axt_opts_values; + unsigned int axt_ctrls_mask; + unsigned int axt_ctrls_values; + unsigned char per_key_repeat[XkbPerKeyBitArraySize]; +} XkbControlsRec, *XkbControlsPtr; + +#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask) +#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w)) +#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w)) + +typedef struct _XkbServerMapRec { + unsigned short num_acts; + unsigned short size_acts; + XkbAction *acts; + + XkbBehavior *behaviors; + unsigned short *key_acts; +#if defined(__cplusplus) || defined(c_plusplus) + /* explicit is a C++ reserved word */ + unsigned char *c_explicit; +#else + unsigned char *explicit; +#endif + unsigned char vmods[XkbNumVirtualMods]; + unsigned short *vmodmap; +} XkbServerMapRec, *XkbServerMapPtr; + +#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]]) + + /* + * Structures and access macros used primarily by clients + */ + +typedef struct _XkbSymMapRec { + unsigned char kt_index[XkbNumKbdGroups]; + unsigned char group_info; + unsigned char width; + unsigned short offset; +} XkbSymMapRec, *XkbSymMapPtr; + +typedef struct _XkbClientMapRec { + unsigned char size_types; + unsigned char num_types; + XkbKeyTypePtr types; + + unsigned short size_syms; + unsigned short num_syms; + KeySym *syms; + XkbSymMapPtr key_sym_map; + + unsigned char *modmap; +} XkbClientMapRec, *XkbClientMapPtr; + +#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info) +#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info)) +#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels) +#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width) +#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3]) +#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)]) +#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k)) +#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset) +#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)]) + + /* + * Compatibility structures and access macros + */ + +typedef struct _XkbSymInterpretRec { + KeySym sym; + unsigned char flags; + unsigned char match; + unsigned char mods; + unsigned char virtual_mod; + XkbAnyAction act; +} XkbSymInterpretRec,*XkbSymInterpretPtr; + +typedef struct _XkbCompatMapRec { + XkbSymInterpretPtr sym_interpret; + XkbModsRec groups[XkbNumKbdGroups]; + unsigned short num_si; + unsigned short size_si; +} XkbCompatMapRec, *XkbCompatMapPtr; + +typedef struct _XkbIndicatorMapRec { + unsigned char flags; + unsigned char which_groups; + unsigned char groups; + unsigned char which_mods; + XkbModsRec mods; + unsigned int ctrls; +} XkbIndicatorMapRec, *XkbIndicatorMapPtr; + +#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\ + (((i)->which_groups&&(i)->groups)||\ + ((i)->which_mods&&(i)->mods.mask)||\ + ((i)->ctrls))) +#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\ + ((i)->which_mods)||((i)->ctrls)) + + +typedef struct _XkbIndicatorRec { + unsigned long phys_indicators; + XkbIndicatorMapRec maps[XkbNumIndicators]; +} XkbIndicatorRec,*XkbIndicatorPtr; + +typedef struct _XkbKeyNameRec { + char name[XkbKeyNameLength]; +} XkbKeyNameRec,*XkbKeyNamePtr; + +typedef struct _XkbKeyAliasRec { + char real[XkbKeyNameLength]; + char alias[XkbKeyNameLength]; +} XkbKeyAliasRec,*XkbKeyAliasPtr; + + /* + * Names for everything + */ +typedef struct _XkbNamesRec { + Atom keycodes; + Atom geometry; + Atom symbols; + Atom types; + Atom compat; + Atom vmods[XkbNumVirtualMods]; + Atom indicators[XkbNumIndicators]; + Atom groups[XkbNumKbdGroups]; + XkbKeyNamePtr keys; + XkbKeyAliasPtr key_aliases; + Atom *radio_groups; + Atom phys_symbols; + + unsigned char num_keys; + unsigned char num_key_aliases; + unsigned short num_rg; +} XkbNamesRec,*XkbNamesPtr; + +typedef struct _XkbGeometry *XkbGeometryPtr; + /* + * Tie it all together into one big keyboard description + */ +typedef struct _XkbDesc { + struct _XDisplay * dpy; + unsigned short flags; + unsigned short device_spec; + KeyCode min_key_code; + KeyCode max_key_code; + + XkbControlsPtr ctrls; + XkbServerMapPtr server; + XkbClientMapPtr map; + XkbIndicatorPtr indicators; + XkbNamesPtr names; + XkbCompatMapPtr compat; + XkbGeometryPtr geom; +} XkbDescRec, *XkbDescPtr; +#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g)) +#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g)) +#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g)) +#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k)) +#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k))) +#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k))) +#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k))) +#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k))) +#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n]) +#define XkbKeySymEntry(d,k,sl,g) \ + (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl)))) +#define XkbKeyAction(d,k,n) \ + (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL) +#define XkbKeyActionEntry(d,k,sl,g) \ + (XkbKeyHasActions(d,k)?\ + XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL) + +#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0) +#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1) +#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k)) +#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\ + ((k)<=(d)->max_key_code)) +#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1) + + + /* + * The following structures can be used to track changes + * to a keyboard device + */ +typedef struct _XkbMapChanges { + unsigned short changed; + KeyCode min_key_code; + KeyCode max_key_code; + unsigned char first_type; + unsigned char num_types; + KeyCode first_key_sym; + unsigned char num_key_syms; + KeyCode first_key_act; + unsigned char num_key_acts; + KeyCode first_key_behavior; + unsigned char num_key_behaviors; + KeyCode first_key_explicit; + unsigned char num_key_explicit; + KeyCode first_modmap_key; + unsigned char num_modmap_keys; + KeyCode first_vmodmap_key; + unsigned char num_vmodmap_keys; + unsigned char pad; + unsigned short vmods; +} XkbMapChangesRec,*XkbMapChangesPtr; + +typedef struct _XkbControlsChanges { + unsigned int changed_ctrls; + unsigned int enabled_ctrls_changes; + Bool num_groups_changed; +} XkbControlsChangesRec,*XkbControlsChangesPtr; + +typedef struct _XkbIndicatorChanges { + unsigned int state_changes; + unsigned int map_changes; +} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr; + +typedef struct _XkbNameChanges { + unsigned int changed; + unsigned char first_type; + unsigned char num_types; + unsigned char first_lvl; + unsigned char num_lvls; + unsigned char num_aliases; + unsigned char num_rg; + unsigned char first_key; + unsigned char num_keys; + unsigned short changed_vmods; + unsigned long changed_indicators; + unsigned char changed_groups; +} XkbNameChangesRec,*XkbNameChangesPtr; + +typedef struct _XkbCompatChanges { + unsigned char changed_groups; + unsigned short first_si; + unsigned short num_si; +} XkbCompatChangesRec,*XkbCompatChangesPtr; + +typedef struct _XkbChanges { + unsigned short device_spec; + unsigned short state_changes; + XkbMapChangesRec map; + XkbControlsChangesRec ctrls; + XkbIndicatorChangesRec indicators; + XkbNameChangesRec names; + XkbCompatChangesRec compat; +} XkbChangesRec, *XkbChangesPtr; + + /* + * These data structures are used to construct a keymap from + * a set of components or to list components in the server + * database. + */ +typedef struct _XkbComponentNames { + char * keymap; + char * keycodes; + char * types; + char * compat; + char * symbols; + char * geometry; +} XkbComponentNamesRec, *XkbComponentNamesPtr; + +typedef struct _XkbComponentName { + unsigned short flags; + char * name; +} XkbComponentNameRec,*XkbComponentNamePtr; + +typedef struct _XkbComponentList { + int num_keymaps; + int num_keycodes; + int num_types; + int num_compat; + int num_symbols; + int num_geometry; + XkbComponentNamePtr keymaps; + XkbComponentNamePtr keycodes; + XkbComponentNamePtr types; + XkbComponentNamePtr compat; + XkbComponentNamePtr symbols; + XkbComponentNamePtr geometry; +} XkbComponentListRec, *XkbComponentListPtr; + + /* + * The following data structures describe and track changes to a + * non-keyboard extension device + */ +typedef struct _XkbDeviceLedInfo { + unsigned short led_class; + unsigned short led_id; + unsigned int phys_indicators; + unsigned int maps_present; + unsigned int names_present; + unsigned int state; + Atom names[XkbNumIndicators]; + XkbIndicatorMapRec maps[XkbNumIndicators]; +} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr; + +typedef struct _XkbDeviceInfo { + char * name; + Atom type; + unsigned short device_spec; + Bool has_own_state; + unsigned short supported; + unsigned short unsupported; + + unsigned short num_btns; + XkbAction * btn_acts; + + unsigned short sz_leds; + unsigned short num_leds; + unsigned short dflt_kbd_fb; + unsigned short dflt_led_fb; + XkbDeviceLedInfoPtr leds; +} XkbDeviceInfoRec,*XkbDeviceInfoPtr; + +#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL)) +#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns)) +#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL)) + +typedef struct _XkbDeviceLedChanges { + unsigned short led_class; + unsigned short led_id; + unsigned int defined; /* names or maps changed */ + struct _XkbDeviceLedChanges *next; +} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr; + +typedef struct _XkbDeviceChanges { + unsigned int changed; + unsigned short first_btn; + unsigned short num_btns; + XkbDeviceLedChangesRec leds; +} XkbDeviceChangesRec,*XkbDeviceChangesPtr; + +#endif /* _XKBSTR_H_ */ diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c index f0a1f890e..790aede92 100644 --- a/xkb/XKBAlloc.c +++ b/xkb/XKBAlloc.c @@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "misc.h" #include "inputstr.h" #include -#include +#include "xkbgeom.h" /***===================================================================***/ diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c index 815cc95f5..7a75d200d 100644 --- a/xkb/XKBGAlloc.c +++ b/xkb/XKBGAlloc.c @@ -37,7 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "misc.h" #include "inputstr.h" #include -#include +#include "xkbgeom.h" #ifdef X_NOT_POSIX #define Size_t unsigned int diff --git a/xkb/maprules.c b/xkb/maprules.c index 0fa356ee5..52a1cdc86 100644 --- a/xkb/maprules.c +++ b/xkb/maprules.c @@ -46,7 +46,7 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS #include diff --git a/xkb/xkb.c b/xkb/xkb.c index 26f2812fe..66edcc1fd 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -3870,7 +3870,7 @@ ProcXkbSetNames(ClientPtr client) /***====================================================================***/ -#include +#include "xkbgeom.h" #define XkbSizeCountedString(s) ((s)?((((2+strlen(s))+3)/4)*4):4) diff --git a/xkb/xkb.h b/xkb/xkb.h index 99b60bf5e..bc6c6c954 100644 --- a/xkb/xkb.h +++ b/xkb/xkb.h @@ -1,4 +1,5 @@ -/* #include "XKBfile.h" */ +#ifndef _XKB_H +#define _XKB_H extern int ProcXkbUseExtension(ClientPtr client); extern int ProcXkbSelectEvents(ClientPtr client); @@ -35,3 +36,5 @@ extern Bool XkbCopyKeymap( XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); + +#endif diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 6301a32e7..bb1de9de6 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -48,9 +48,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "property.h" #define XKBSRV_NEED_FILE_FUNCS #include -#include +#include "xkbgeom.h" #include -#include +#include "xkbfile.h" #include "xkb.h" #define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1) diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c index da4c9053b..50b08f46c 100644 --- a/xkb/xkbSwap.c +++ b/xkb/xkbSwap.c @@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "misc.h" #include "inputstr.h" #include -#include +#include "xkbstr.h" #include "extnsionst.h" #include "xkb.h" diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 3cedf825a..67843e9fb 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -42,7 +42,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XKBSRV_NEED_FILE_FUNCS #include -#include +#include "xkbgeom.h" #include "xkb.h" int XkbDisableLockActions = 0; diff --git a/xkb/xkbfile.h b/xkb/xkbfile.h new file mode 100644 index 000000000..d58bec69f --- /dev/null +++ b/xkb/xkbfile.h @@ -0,0 +1,480 @@ +/************************************************************ + Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH + THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ********************************************************/ + +#ifndef _XKBFILE_H_ +#define _XKBFILE_H_ 1 + +/***====================================================================***/ + +#define XkbXKMFile 0 +#define XkbCFile 1 +#define XkbXKBFile 2 +#define XkbMessage 3 + +#define XkbMapDefined (1<<0) +#define XkbStateDefined (1<<1) + +typedef struct _XkbFileInfo { + unsigned type; + unsigned defined; + XkbDescPtr xkb; +} XkbFileInfo,*XkbFileInfoPtr; + +typedef void (*XkbFileAddOnFunc)( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + int /* fileSection */, + void * /* priv */ +); + +/***====================================================================***/ + +#define _XkbSuccess 0 +#define _XkbErrMissingNames 1 +#define _XkbErrMissingTypes 2 +#define _XkbErrMissingReqTypes 3 +#define _XkbErrMissingSymbols 4 +#define _XkbErrMissingVMods 5 +#define _XkbErrMissingIndicators 6 +#define _XkbErrMissingCompatMap 7 +#define _XkbErrMissingSymInterps 8 +#define _XkbErrMissingGeometry 9 +#define _XkbErrIllegalDoodad 10 +#define _XkbErrIllegalTOCType 11 +#define _XkbErrIllegalContents 12 +#define _XkbErrEmptyFile 13 +#define _XkbErrFileNotFound 14 +#define _XkbErrFileCannotOpen 15 +#define _XkbErrBadValue 16 +#define _XkbErrBadMatch 17 +#define _XkbErrBadTypeName 18 +#define _XkbErrBadTypeWidth 19 +#define _XkbErrBadFileType 20 +#define _XkbErrBadFileVersion 21 +#define _XkbErrBadFileFormat 22 +#define _XkbErrBadAlloc 23 +#define _XkbErrBadLength 24 +#define _XkbErrXReqFailure 25 +#define _XkbErrBadImplementation 26 + +extern char * _XkbErrMessages[]; +extern unsigned _XkbErrCode; +extern char * _XkbErrLocation; +extern unsigned _XkbErrData; + +/***====================================================================***/ + +_XFUNCPROTOBEGIN + +extern char * XkbIndentText( + unsigned /* size */ +); + +extern char * XkbAtomText( + Display * /* dpy */, + Atom /* atm */, + unsigned /* format */ +); + +extern char * XkbKeysymText( + KeySym /* sym */, + unsigned /* format */ +); + +extern char * XkbStringText( + char * /* str */, + unsigned /* format */ +); + +extern char * XkbKeyNameText( + char * /* name */, + unsigned /* format */ +); + +extern char * +XkbModIndexText( + unsigned /* ndx */, + unsigned /* format */ +); + +extern char * +XkbModMaskText( + unsigned /* mask */, + unsigned /* format */ +); + +extern char * XkbVModIndexText( + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* ndx */, + unsigned /* format */ +); + +extern char * XkbVModMaskText( + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* modMask */, + unsigned /* mask */, + unsigned /* format */ +); + +extern char * XkbConfigText( + unsigned /* config */, + unsigned /* format */ +); + +extern char * XkbSIMatchText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbIMWhichStateMaskText( + unsigned /* use_which */, + unsigned /* format */ +); + +extern char * XkbAccessXDetailText( + unsigned /* state */, + unsigned /* format */ +); + +extern char * XkbNKNDetailMaskText( + unsigned /* detail */, + unsigned /* format */ +); + +extern char * XkbControlsMaskText( + unsigned /* ctrls */, + unsigned /* format */ +); + +extern char * XkbGeomFPText( + int /* val */, + unsigned /* format */ +); + +extern char * XkbDoodadTypeText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbActionTypeText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbActionText( + Display * /* dpy */, + XkbDescPtr /* xkb */, + XkbAction * /* action */, + unsigned /* format */ +); + +extern char * XkbBehaviorText( + XkbDescPtr /* xkb */, + XkbBehavior * /* behavior */, + unsigned /* format */ +); + +/***====================================================================***/ + +#define _XkbKSLower (1<<0) +#define _XkbKSUpper (1<<1) + +#define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower) +#define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper) +#define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal)) +#define XkbKSIsDeadKey(k) \ + (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound)) + +extern unsigned _XkbKSCheckCase( + KeySym /* sym */ +); + +extern int XkbFindKeycodeByName( + XkbDescPtr /* xkb */, + char * /* name */, + Bool /* use_aliases */ +); + +extern Bool XkbLookupGroupAndLevel( + XkbDescPtr /* xkb */, + int /* key */, + int * /* mods_inout */, + int * /* grp_inout */, + int * /* lvl_rtrn */ +); + +/***====================================================================***/ + +extern char * XkbAtomGetString( + Display * /* dpy */, + Atom /* atm */ +); + +extern Atom XkbInternAtom( + Display * /* dpy */, + char * /* name */, + Bool /* onlyIfExists */ +); + +extern Status XkbChangeKbdDisplay( + Display * /* newDpy */, + XkbFileInfo * /* result */ +); + +extern Atom XkbChangeAtomDisplay( + Display * /* oldDpy */, + Display * /* newDpy */, + Atom /* atm */ +); + +extern void XkbInitAtoms( + Display * /* dpy */ +); + +/***====================================================================***/ + +#ifdef _XKBGEOM_H_ + +#define XkbDW_Unknown 0 +#define XkbDW_Doodad 1 +#define XkbDW_Section 2 +typedef struct _XkbDrawable { + int type; + int priority; + union { + XkbDoodadPtr doodad; + XkbSectionPtr section; + } u; + struct _XkbDrawable * next; +} XkbDrawableRec,*XkbDrawablePtr; + +extern XkbDrawablePtr +XkbGetOrderedDrawables( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */ +); + +extern void +XkbFreeOrderedDrawables( + XkbDrawablePtr /* draw */ +); + +#endif + +/***====================================================================***/ + +extern unsigned XkbConvertGetByNameComponents( + Bool /* toXkm */, + unsigned /* orig */ +); + +extern unsigned XkbConvertXkbComponents( + Bool /* toXkm */, + unsigned /* orig */ +); + +extern Bool XkbDetermineFileType( + XkbFileInfo * /* xkb */, + int /* format */, + int * /* opts_missing */ +); + +extern Bool XkbNameMatchesPattern( + char * /* name */, + char * /* pattern */ +); + +/***====================================================================***/ + +extern Bool XkbWriteXKBKeycodes( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBKeyTypes( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBCompatMap( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBSymbols( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBGeometry( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBSemantics( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBLayout( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBKeymap( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBFile( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteCFile( + FILE * /* file */, + char * /* name */, + XkbFileInfo * /* info */ +); + +extern Bool XkbWriteXKMFile( + FILE * /* file */, + XkbFileInfo * /* result */ +); + +extern Bool XkbWriteToServer( + XkbFileInfo * /* result */ +); + +extern void XkbEnsureSafeMapName( + char * /* name */ +); + +extern Bool XkbWriteXKBKeymapForNames( + FILE * /* file */, + XkbComponentNamesPtr /* names */, + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* want */, + unsigned /* need */ +); + +extern Status XkbMergeFile( + XkbDescPtr /* xkb */, + XkbFileInfo /* finfo */ +); + +/***====================================================================***/ + +extern Bool XkmProbe( + FILE * /* file */ +); + +extern unsigned XkbReadFromServer( + Display * /* dpy */, + unsigned /* need */, + unsigned /* want */, + XkbFileInfo * /* result */ +); + +extern unsigned XkmReadFile( + FILE * /* file */, + unsigned /* need */, + unsigned /* want */, + XkbFileInfo * /* result */ +); + +#ifdef _XKMFORMAT_H_ + +extern Bool XkmReadTOC( + FILE * /* file */, + xkmFileInfo * /* file_info */, + int /* max_toc */, + xkmSectionInfo * /* toc */ +); + +extern xkmSectionInfo *XkmFindTOCEntry( + xkmFileInfo * /* finfo */, + xkmSectionInfo * /* toc */, + unsigned /* type */ +); + +extern Bool XkmReadFileSection( + FILE * /* file */, + xkmSectionInfo * /* toc */, + XkbFileInfo * /* result */, + unsigned * /* loaded_rtrn */ +); + +extern char * XkmReadFileSectionName( + FILE * /* file */, + xkmSectionInfo * /* toc */ +); + +#endif /* _XKMFORMAT_H */ + +_XFUNCPROTOEND + +#endif /* _XKBFILE_H_ */ diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c index 05344b475..06d3519af 100644 --- a/xkb/xkbfmisc.c +++ b/xkb/xkbfmisc.c @@ -42,10 +42,10 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include -#include +#include "xkbgeom.h" #include "xkb.h" unsigned diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h new file mode 100644 index 000000000..a6918b4b9 --- /dev/null +++ b/xkb/xkbgeom.h @@ -0,0 +1,655 @@ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ + +#ifndef _XKBGEOM_H_ +#define _XKBGEOM_H_ + +#include "xkbstr.h" + +#define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias +#define XkbAddGeomColor SrvXkbAddGeomColor +#define XkbAddGeomDoodad SrvXkbAddGeomDoodad +#define XkbAddGeomKey SrvXkbAddGeomKey +#define XkbAddGeomOutline SrvXkbAddGeomOutline +#define XkbAddGeomOverlay SrvXkbAddGeomOverlay +#define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow +#define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey +#define XkbAddGeomProperty SrvXkbAddGeomProperty +#define XkbAddGeomRow SrvXkbAddGeomRow +#define XkbAddGeomSection SrvXkbAddGeomSection +#define XkbAddGeomShape SrvXkbAddGeomShape +#define XkbAllocGeomKeyAliases SrvXkbAllocGeomKeyAliases +#define XkbAllocGeomColors SrvXkbAllocGeomColors +#define XkbAllocGeomDoodads SrvXkbAllocGeomDoodads +#define XkbAllocGeomKeys SrvXkbAllocGeomKeys +#define XkbAllocGeomOutlines SrvXkbAllocGeomOutlines +#define XkbAllocGeomPoints SrvXkbAllocGeomPoints +#define XkbAllocGeomProps SrvXkbAllocGeomProps +#define XkbAllocGeomRows SrvXkbAllocGeomRows +#define XkbAllocGeomSectionDoodads SrvXkbAllocGeomSectionDoodads +#define XkbAllocGeomSections SrvXkbAllocGeomSections +#define XkbAllocGeomOverlays SrvXkbAllocGeomOverlays +#define XkbAllocGeomOverlayRows SrvXkbAllocGeomOverlayRows +#define XkbAllocGeomOverlayKeys SrvXkbAllocGeomOverlayKeys +#define XkbAllocGeomShapes SrvXkbAllocGeomShapes +#define XkbAllocGeometry SrvXkbAllocGeometry +#define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases +#define XkbFreeGeomColors SrvXkbFreeGeomColors +#define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads +#define XkbFreeGeomProperties SrvXkbFreeGeomProperties +#define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys +#define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows +#define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays +#define XkbFreeGeomKeys SrvXkbFreeGeomKeys +#define XkbFreeGeomRows SrvXkbFreeGeomRows +#define XkbFreeGeomSections SrvXkbFreeGeomSections +#define XkbFreeGeomPoints SrvXkbFreeGeomPoints +#define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines +#define XkbFreeGeomShapes SrvXkbFreeGeomShapes +#define XkbFreeGeometry SrvXkbFreeGeometry + +typedef struct _XkbProperty { + char *name; + char *value; +} XkbPropertyRec,*XkbPropertyPtr; + +typedef struct _XkbColor { + unsigned int pixel; + char * spec; +} XkbColorRec,*XkbColorPtr; + +typedef struct _XkbPoint { + short x; + short y; +} XkbPointRec, *XkbPointPtr; + +typedef struct _XkbBounds { + short x1,y1; + short x2,y2; +} XkbBoundsRec, *XkbBoundsPtr; +#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) +#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) + +typedef struct _XkbOutline { + unsigned short num_points; + unsigned short sz_points; + unsigned short corner_radius; + XkbPointPtr points; +} XkbOutlineRec, *XkbOutlinePtr; + +typedef struct _XkbShape { + Atom name; + unsigned short num_outlines; + unsigned short sz_outlines; + XkbOutlinePtr outlines; + XkbOutlinePtr approx; + XkbOutlinePtr primary; + XkbBoundsRec bounds; +} XkbShapeRec, *XkbShapePtr; +#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) + +typedef struct _XkbShapeDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short color_ndx; + unsigned short shape_ndx; +} XkbShapeDoodadRec, *XkbShapeDoodadPtr; +#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) +#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbTextDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + short width; + short height; + unsigned short color_ndx; + char * text; + char * font; +} XkbTextDoodadRec, *XkbTextDoodadPtr; +#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) + +typedef struct _XkbIndicatorDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short shape_ndx; + unsigned short on_color_ndx; + unsigned short off_color_ndx; +} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr; +#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx]) +#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx]) +#define XkbSetIndicatorDoodadOnColor(g,d,c) \ + ((d)->on_color_ndx= (c)-&(g)->colors[0]) +#define XkbSetIndicatorDoodadOffColor(g,d,c) \ + ((d)->off_color_ndx= (c)-&(g)->colors[0]) +#define XkbSetIndicatorDoodadShape(g,d,s) \ + ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbLogoDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short color_ndx; + unsigned short shape_ndx; + char * logo_name; +} XkbLogoDoodadRec, *XkbLogoDoodadPtr; +#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) +#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbAnyDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; +} XkbAnyDoodadRec, *XkbAnyDoodadPtr; + +typedef union _XkbDoodad { + XkbAnyDoodadRec any; + XkbShapeDoodadRec shape; + XkbTextDoodadRec text; + XkbIndicatorDoodadRec indicator; + XkbLogoDoodadRec logo; +} XkbDoodadRec, *XkbDoodadPtr; + +#define XkbUnknownDoodad 0 +#define XkbOutlineDoodad 1 +#define XkbSolidDoodad 2 +#define XkbTextDoodad 3 +#define XkbIndicatorDoodad 4 +#define XkbLogoDoodad 5 + +typedef struct _XkbKey { + XkbKeyNameRec name; + short gap; + unsigned char shape_ndx; + unsigned char color_ndx; +} XkbKeyRec, *XkbKeyPtr; +#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx]) +#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx]) +#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0]) +#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0]) + +typedef struct _XkbRow { + short top; + short left; + unsigned short num_keys; + unsigned short sz_keys; + int vertical; + XkbKeyPtr keys; + XkbBoundsRec bounds; +} XkbRowRec, *XkbRowPtr; + +typedef struct _XkbSection { + Atom name; + unsigned char priority; + short top; + short left; + unsigned short width; + unsigned short height; + short angle; + unsigned short num_rows; + unsigned short num_doodads; + unsigned short num_overlays; + unsigned short sz_rows; + unsigned short sz_doodads; + unsigned short sz_overlays; + XkbRowPtr rows; + XkbDoodadPtr doodads; + XkbBoundsRec bounds; + struct _XkbOverlay *overlays; +} XkbSectionRec, *XkbSectionPtr; + +typedef struct _XkbOverlayKey { + XkbKeyNameRec over; + XkbKeyNameRec under; +} XkbOverlayKeyRec,*XkbOverlayKeyPtr; + +typedef struct _XkbOverlayRow { + unsigned short row_under; + unsigned short num_keys; + unsigned short sz_keys; + XkbOverlayKeyPtr keys; +} XkbOverlayRowRec,*XkbOverlayRowPtr; + +typedef struct _XkbOverlay { + Atom name; + XkbSectionPtr section_under; + unsigned short num_rows; + unsigned short sz_rows; + XkbOverlayRowPtr rows; + XkbBoundsPtr bounds; +} XkbOverlayRec,*XkbOverlayPtr; + +typedef struct _XkbGeometry { + Atom name; + unsigned short width_mm; + unsigned short height_mm; + char * label_font; + XkbColorPtr label_color; + XkbColorPtr base_color; + unsigned short sz_properties; + unsigned short sz_colors; + unsigned short sz_shapes; + unsigned short sz_sections; + unsigned short sz_doodads; + unsigned short sz_key_aliases; + unsigned short num_properties; + unsigned short num_colors; + unsigned short num_shapes; + unsigned short num_sections; + unsigned short num_doodads; + unsigned short num_key_aliases; + XkbPropertyPtr properties; + XkbColorPtr colors; + XkbShapePtr shapes; + XkbSectionPtr sections; + XkbDoodadPtr doodads; + XkbKeyAliasPtr key_aliases; +} XkbGeometryRec; +#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) + +#define XkbGeomPropertiesMask (1<<0) +#define XkbGeomColorsMask (1<<1) +#define XkbGeomShapesMask (1<<2) +#define XkbGeomSectionsMask (1<<3) +#define XkbGeomDoodadsMask (1<<4) +#define XkbGeomKeyAliasesMask (1<<5) +#define XkbGeomAllMask (0x3f) + +typedef struct _XkbGeometrySizes { + unsigned int which; + unsigned short num_properties; + unsigned short num_colors; + unsigned short num_shapes; + unsigned short num_sections; + unsigned short num_doodads; + unsigned short num_key_aliases; +} XkbGeometrySizesRec,*XkbGeometrySizesPtr; + +_XFUNCPROTOBEGIN + +extern XkbPropertyPtr +XkbAddGeomProperty( + XkbGeometryPtr /* geom */, + char * /* name */, + char * /* value */ +); + +extern XkbKeyAliasPtr +XkbAddGeomKeyAlias( + XkbGeometryPtr /* geom */, + char * /* alias */, + char * /* real */ +); + +extern XkbColorPtr +XkbAddGeomColor( + XkbGeometryPtr /* geom */, + char * /* spec */, + unsigned int /* pixel */ +); + +extern XkbOutlinePtr +XkbAddGeomOutline( + XkbShapePtr /* shape */, + int /* sz_points */ +); + +extern XkbShapePtr +XkbAddGeomShape( + XkbGeometryPtr /* geom */, + Atom /* name */, + int /* sz_outlines */ +); + +extern XkbKeyPtr +XkbAddGeomKey( + XkbRowPtr /* row */ +); + +extern XkbRowPtr +XkbAddGeomRow( + XkbSectionPtr /* section */, + int /* sz_keys */ +); + +extern XkbSectionPtr +XkbAddGeomSection( + XkbGeometryPtr /* geom */, + Atom /* name */, + int /* sz_rows */, + int /* sz_doodads */, + int /* sz_overlays */ +); + +extern XkbOverlayPtr +XkbAddGeomOverlay( + XkbSectionPtr /* section */, + Atom /* name */, + int /* sz_rows */ +); + +extern XkbOverlayRowPtr +XkbAddGeomOverlayRow( + XkbOverlayPtr /* overlay */, + int /* row_under */, + int /* sz_keys */ +); + +extern XkbOverlayKeyPtr +XkbAddGeomOverlayKey( + XkbOverlayPtr /* overlay */, + XkbOverlayRowPtr /* row */, + char * /* over */, + char * /* under */ +); + +extern XkbDoodadPtr +XkbAddGeomDoodad( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */, + Atom /* name */ +); + + +extern void +XkbFreeGeomKeyAliases( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomColors( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomDoodads( + XkbDoodadPtr /* doodads */, + int /* nDoodads */, + Bool /* freeAll */ +); + + +extern void +XkbFreeGeomProperties( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlayKeys( + XkbOverlayRowPtr /* row */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlayRows( + XkbOverlayPtr /* overlay */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlays( + XkbSectionPtr /* section */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomKeys( + XkbRowPtr /* row */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomRows( + XkbSectionPtr /* section */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomSections( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + + +extern void +XkbFreeGeomPoints( + XkbOutlinePtr /* outline */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOutlines( + XkbShapePtr /* shape */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomShapes( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeometry( + XkbGeometryPtr /* geom */, + unsigned int /* which */, + Bool /* freeMap */ +); + +extern Status +XkbAllocGeomProps( + XkbGeometryPtr /* geom */, + int /* nProps */ +); + +extern Status +XkbAllocGeomKeyAliases( + XkbGeometryPtr /* geom */, + int /* nAliases */ +); + +extern Status +XkbAllocGeomColors( + XkbGeometryPtr /* geom */, + int /* nColors */ +); + +extern Status +XkbAllocGeomShapes( + XkbGeometryPtr /* geom */, + int /* nShapes */ +); + +extern Status +XkbAllocGeomSections( + XkbGeometryPtr /* geom */, + int /* nSections */ +); + +extern Status +XkbAllocGeomOverlays( + XkbSectionPtr /* section */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomOverlayRows( + XkbOverlayPtr /* overlay */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomOverlayKeys( + XkbOverlayRowPtr /* row */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomDoodads( + XkbGeometryPtr /* geom */, + int /* nDoodads */ +); + +extern Status +XkbAllocGeomSectionDoodads( + XkbSectionPtr /* section */, + int /* nDoodads */ +); + +extern Status +XkbAllocGeomOutlines( + XkbShapePtr /* shape */, + int /* nOL */ +); + +extern Status +XkbAllocGeomRows( + XkbSectionPtr /* section */, + int /* nRows */ +); + +extern Status +XkbAllocGeomPoints( + XkbOutlinePtr /* ol */, + int /* nPts */ +); + +extern Status +XkbAllocGeomKeys( + XkbRowPtr /* row */, + int /* nKeys */ +); + +extern Status +XkbAllocGeometry( + XkbDescPtr /* xkb */, + XkbGeometrySizesPtr /* sizes */ +); + +extern Status +XkbSetGeometry( + Display * /* dpy */, + unsigned /* deviceSpec */, + XkbGeometryPtr /* geom */ +); + +extern Bool +XkbComputeShapeTop( + XkbShapePtr /* shape */, + XkbBoundsPtr /* bounds */ +); + +extern Bool +XkbComputeShapeBounds( + XkbShapePtr /* shape */ +); + +extern Bool +XkbComputeRowBounds( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */, + XkbRowPtr /* row */ +); + +extern Bool +XkbComputeSectionBounds( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */ +); + +extern char * +XkbFindOverlayForKey( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* wanted */, + char * /* under */ +); + +extern Status +XkbGetGeometry( + Display * /* dpy */, + XkbDescPtr /* xkb */ +); + +extern Status +XkbGetNamedGeometry( + Display * /* dpy */, + XkbDescPtr /* xkb */, + Atom /* name */ +); + +_XFUNCPROTOEND + +#endif /* _XKBGEOM_H_ */ diff --git a/xkb/xkbout.c b/xkb/xkbout.c index 8905ef4d3..fc4e43e3f 100644 --- a/xkb/xkbout.c +++ b/xkb/xkbout.c @@ -40,12 +40,12 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include -#include -#include +#include "xkbgeom.h" +#include "xkbfile.h" #define VMOD_HIDE_VALUE 0 #define VMOD_SHOW_VALUE 1 diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c index 4983e2b9e..1520a9f58 100644 --- a/xkb/xkbtext.c +++ b/xkb/xkbtext.c @@ -40,10 +40,10 @@ #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include -#include +#include "xkbgeom.h" /***====================================================================***/ diff --git a/xkb/xkmread.c b/xkb/xkmread.c index c6c18422d..88296188a 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -39,10 +39,10 @@ #include #include "misc.h" #include "inputstr.h" -#include +#include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS #include -#include +#include "xkbgeom.h" Atom XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) From 0f12a448dcbbbf1f40aa98d09c9d25ee511c5bbf Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sun, 3 Feb 2008 23:15:39 +1100 Subject: [PATCH 510/552] XKB: Deprecate XKBSRV_NEED_FILE_FUNCS There's no point in having the function definitions be conditional, so whatever. --- {xkb => include}/xkbfile.h | 0 include/xkbsrv.h | 21 +-------------------- 2 files changed, 1 insertion(+), 20 deletions(-) rename {xkb => include}/xkbfile.h (100%) diff --git a/xkb/xkbfile.h b/include/xkbfile.h similarity index 100% rename from xkb/xkbfile.h rename to include/xkbfile.h diff --git a/include/xkbsrv.h b/include/xkbsrv.h index e825f33a0..df9aefca3 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -124,8 +124,6 @@ typedef struct _XkbEventCause { #define _BEEP_LED_CHANGE 14 #define _BEEP_BOUNCE_REJECT 15 -struct _XkbSrvInfo; /* definition see below */ - typedef struct _XkbFilter { CARD16 keycode; CARD8 what; @@ -317,13 +315,8 @@ extern int DeviceKeyPress,DeviceKeyRelease,DeviceMotionNotify; extern int DeviceButtonPress,DeviceButtonRelease; extern int DeviceEnterNotify,DeviceLeaveNotify; -#ifdef XINPUT #define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress)) #define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease)) -#else -#define _XkbIsPressEvent(t) ((t)==KeyPress) -#define _XkbIsReleaseEvent(t) ((t)==KeyRelease) -#endif #define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\ ((k)<=(c)->curKeySyms.maxKeyCode)) @@ -343,14 +336,6 @@ extern int DeviceEnterNotify,DeviceLeaveNotify; #define False 0 #endif -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif -#endif - _XFUNCPROTOBEGIN extern void XkbUseMsg( @@ -987,10 +972,8 @@ extern void XkbSendNewKeyboardNotify( xkbNewKeyboardNotify * /* pNKN */ ); -#ifdef XKBSRV_NEED_FILE_FUNCS - +#include "xkbfile.h" #include -#include #include #define _XkbListKeymaps 0 @@ -1053,8 +1036,6 @@ extern int _XkbStrCaseCmp( char * /* str2 */ ); -#endif /* XKBSRV_NEED_FILE_FUNCS */ - _XFUNCPROTOEND #define XkbAtomGetString(d,s) NameForAtom(s) From 534fc5140b039a8c98ab715d0a6740d513b41209 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sun, 3 Feb 2008 23:30:22 +1100 Subject: [PATCH 511/552] XKB: Remove a bunch of mad ifdefs We have SEEK_SET and size_t, seriously. Also use DebugF instead of ifdef DEBUG, and ditch a couple of random bits that were never used. --- xkb/XKBGAlloc.c | 8 +---- xkb/XKBMAlloc.c | 4 +-- xkb/XKBMisc.c | 5 +-- xkb/ddxBeep.c | 4 --- xkb/ddxCtrls.c | 23 ------------- xkb/ddxKeyClick.c | 4 --- xkb/ddxList.c | 13 ++----- xkb/ddxLoad.c | 80 +++++++------------------------------------ xkb/maprules.c | 86 ++++++++++++++++++----------------------------- xkb/xkb.c | 2 -- xkb/xkbAccessX.c | 8 ++--- xkb/xkbEvents.c | 34 +++++++------------ xkb/xkbInit.c | 17 +--------- xkb/xkbPrKeyEv.c | 4 +-- xkb/xkbUtils.c | 10 ------ xkb/xkmread.c | 19 ++--------- 16 files changed, 69 insertions(+), 252 deletions(-) diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c index 7a75d200d..94072b8ce 100644 --- a/xkb/XKBGAlloc.c +++ b/xkb/XKBGAlloc.c @@ -39,12 +39,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "xkbgeom.h" -#ifdef X_NOT_POSIX -#define Size_t unsigned int -#else -#define Size_t size_t -#endif - /***====================================================================***/ static void @@ -465,7 +459,7 @@ _XkbGeomAlloc( XPointer * old, unsigned short * num, unsigned short * total, int num_new, - Size_t sz_elem) + size_t sz_elem) { if (num_new<1) return Success; diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c index 9feaf8e93..178b5b89a 100644 --- a/xkb/XKBMAlloc.c +++ b/xkb/XKBMAlloc.c @@ -55,10 +55,8 @@ XkbClientMapPtr map; ((!XkbIsLegalKeycode(xkb->min_key_code))|| (!XkbIsLegalKeycode(xkb->max_key_code))|| (xkb->max_key_codemin_key_code))) { -#ifdef DEBUG -fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n", + DebugF("bad keycode (%d,%d) in XkbAllocClientMap\n", xkb->min_key_code,xkb->max_key_code); -#endif return BadValue; } diff --git a/xkb/XKBMisc.c b/xkb/XKBMisc.c index 0404108a2..85415a4c9 100644 --- a/xkb/XKBMisc.c +++ b/xkb/XKBMisc.c @@ -416,10 +416,7 @@ unsigned changed,tmp; if (((explicit&XkbExplicitAutoRepeatMask)==0)&&(xkb->ctrls)) { CARD8 old; old= xkb->ctrls->per_key_repeat[key/8]; -#ifdef RETURN_SHOULD_REPEAT - if (*XkbKeySymsPtr(xkb,key) != XK_Return) -#endif - xkb->ctrls->per_key_repeat[key/8]|= (1<<(key%8)); + xkb->ctrls->per_key_repeat[key/8]|= (1<<(key%8)); if (changes && (old!=xkb->ctrls->per_key_repeat[key/8])) changes->ctrls.changed_ctrls|= XkbPerKeyRepeatMask; } diff --git a/xkb/ddxBeep.c b/xkb/ddxBeep.c index 331357ded..2faed5818 100644 --- a/xkb/ddxBeep.c +++ b/xkb/ddxBeep.c @@ -139,10 +139,6 @@ Atom name; next= 0; pitch= oldPitch= ctrl->bell_pitch; duration= oldDuration= ctrl->bell_duration; -#ifdef DEBUG - if (xkbDebugFlags>1) - ErrorF("beep: %d (count= %d)\n",xkbInfo->beepType,xkbInfo->beepCount); -#endif name= None; switch (xkbInfo->beepType) { default: diff --git a/xkb/ddxCtrls.c b/xkb/ddxCtrls.c index 0f7f9187f..34ea0bd3f 100644 --- a/xkb/ddxCtrls.c +++ b/xkb/ddxCtrls.c @@ -47,12 +47,6 @@ int realRepeat; realRepeat= ctrl->autoRepeat; if ((dev->kbdfeed)&&(XkbDDXUsesSoftRepeat(dev))) ctrl->autoRepeat= 0; -#ifdef DEBUG -if (xkbDebugFlags&0x4) { - ErrorF("XkbDDXKeybdCtrlProc: setting repeat to %d (real repeat is %d)\n", - ctrl->autoRepeat,realRepeat); -} -#endif if (dev->key && dev->key->xkbInfo && dev->key->xkbInfo->kbdProc) (*dev->key->xkbInfo->kbdProc)(dev,ctrl); ctrl->autoRepeat= realRepeat; @@ -93,23 +87,6 @@ unsigned changed, i; unsigned char *rep_old, *rep_new, *rep_fb; changed= new->enabled_ctrls^old->enabled_ctrls; -#ifdef NOTDEF - if (changed&XkbRepeatKeysMask) { - if (dev->kbdfeed) { - int realRepeat; - - if (new->enabled_ctrls&XkbRepeatKeysMask) - dev->kbdfeed->ctrl.autoRepeat= realRepeat= 1; - else dev->kbdfeed->ctrl.autoRepeat= realRepeat= 0; - - if (XkbDDXUsesSoftRepeat(dev)) - dev->kbdfeed->ctrl.autoRepeat= FALSE; - if (dev->kbdfeed->CtrlProc) - (*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl); - dev->kbdfeed->ctrl.autoRepeat= realRepeat; - } - } -#endif for (rep_old = old->per_key_repeat, rep_new = new->per_key_repeat, rep_fb = dev->kbdfeed->ctrl.autoRepeats, diff --git a/xkb/ddxKeyClick.c b/xkb/ddxKeyClick.c index f48296dbc..51d78f56d 100644 --- a/xkb/ddxKeyClick.c +++ b/xkb/ddxKeyClick.c @@ -42,9 +42,5 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. void XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic) { -#ifdef DEBUG - if (xkbDebugFlags) - ErrorF("Click.\n"); -#endif return; } diff --git a/xkb/ddxList.c b/xkb/ddxList.c index a91a9badf..80e050524 100644 --- a/xkb/ddxList.c +++ b/xkb/ddxList.c @@ -43,14 +43,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif -#endif - #ifdef WIN32 /* from ddxLoad.c */ extern const char* Win32TempDir(); @@ -199,9 +191,8 @@ char tmpname[PATH_MAX]; #ifndef WIN32 in= Popen(buf,"r"); #else -#ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",buf); -#endif + if (xkbDebugFlags) + DebugF("xkbList executes: %s\n",buf); if (System(buf) < 0) ErrorF("Could not invoke keymap compiler\n"); else diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index d79ae7a7b..63122264b 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -50,14 +50,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(AIXV3) || defined(__osf__) || defined(__GNU__) #include -#endif - -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif #endif /* @@ -161,44 +153,19 @@ Win32System(const char *cmdline) #define System(x) Win32System(x) #endif -#ifdef MAKE_XKM_OUTPUT_DIR -/* Borrow trans_mkdir from Xtransutil.c to more safely make directories */ -# undef X11_t -# define TRANS_SERVER -# define PRMSG(lvl,x,a,b,c) \ - if (lvl <= 1) { LogMessage(X_ERROR,x,a,b,c); } else ((void)0) -# include -# ifndef XKM_OUTPUT_DIR_MODE -# define XKM_OUTPUT_DIR_MODE 0755 -# endif -#endif - static void OutputDirectory( char* outdir, size_t size) { #ifndef WIN32 - if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size) -#ifdef MAKE_XKM_OUTPUT_DIR - && (trans_mkdir(XKM_OUTPUT_DIR, XKM_OUTPUT_DIR_MODE) == 0) -#endif - ) + if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size)) { /* if server running as root it *may* be able to write */ /* FIXME: check whether directory is writable at all */ (void) strcpy (outdir, XKM_OUTPUT_DIR); } else -#endif -#ifdef _PATH_VARTMP - if ((strlen(_PATH_VARTMP) + 1) < size) - { - (void) strcpy (outdir, _PATH_VARTMP); - if (outdir[strlen(outdir) - 1] != '/') /* Hi IBM, Digital */ - (void) strcat (outdir, "/"); - } else -#endif -#ifdef WIN32 +#else if (strlen(Win32TempDir()) + 1 < size) { (void) strcpy(outdir, Win32TempDir()); @@ -256,15 +223,10 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file, xkm_output_dir,outFile); } -#ifdef DEBUG if (xkbDebugFlags) { - ErrorF("XkbDDXCompileNamedKeymap compiling keymap using:\n"); - ErrorF(" \"cmd\"\n"); + DebugF("XkbDDXCompileNamedKeymap compiling keymap using:\n"); + DebugF(" \"cmd\"\n"); } -#endif -#ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",cmd); -#endif if (System(cmd)==0) { if (nameRtrn) { strncpy(nameRtrn,outFile,nameRtrnLen); @@ -276,9 +238,7 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; xfree(cmd); return True; } -#ifdef DEBUG - ErrorF("Error compiling keymap (%s)\n",names->keymap); -#endif + DebugF("Error compiling keymap (%s)\n",names->keymap); if (outFile!=NULL) _XkbFree(outFile); if (cmd!=NULL) @@ -371,12 +331,8 @@ char tmpname[PATH_MAX]; if (fclose(out)==0 && System(buf) >= 0) #endif { -#ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",buf); - ErrorF("xkbcomp input:\n"); - XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need); - ErrorF("end xkbcomp input\n"); -#endif + if (xkbDebugFlags) + DebugF("xkb executes: %s\n",buf); if (nameRtrn) { strncpy(nameRtrn,keymap,nameRtrnLen); nameRtrn[nameRtrnLen-1]= '\0'; @@ -385,24 +341,20 @@ char tmpname[PATH_MAX]; xfree (buf); return True; } -#ifdef DEBUG else - ErrorF("Error compiling keymap (%s)\n",keymap); -#endif + DebugF("Error compiling keymap (%s)\n",keymap); #ifdef WIN32 /* remove the temporary file */ unlink(tmpname); #endif } -#ifdef DEBUG else { #ifndef WIN32 - ErrorF("Could not invoke keymap compiler\n"); + DebugF("Could not invoke keymap compiler\n"); #else - ErrorF("Could not open file %s\n", tmpname); + DebugF("Could not open file %s\n", tmpname); #endif } -#endif if (nameRtrn) nameRtrn[0]= '\0'; if (buf != NULL) @@ -477,17 +429,13 @@ unsigned missing; return 0; } else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) { -#ifdef NOISY - ErrorF("Couldn't compile keymap file\n"); -#endif + DebugF("Couldn't compile keymap file\n"); return 0; } } else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, nameRtrn,nameRtrnLen)){ -#ifdef NOISY - ErrorF("Couldn't compile keymap file\n"); -#endif + DebugF("Couldn't compile keymap file\n"); return 0; } file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX); @@ -502,11 +450,9 @@ unsigned missing; (void) unlink (fileName); return 0; } -#ifdef DEBUG else if (xkbDebugFlags) { - ErrorF("Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined); + DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,finfoRtrn->defined); } -#endif fclose(file); (void) unlink (fileName); return (need|want)&(~missing); diff --git a/xkb/maprules.c b/xkb/maprules.c index 52a1cdc86..72e642fbe 100644 --- a/xkb/maprules.c +++ b/xkb/maprules.c @@ -50,16 +50,6 @@ #define XKBSRV_NEED_FILE_FUNCS #include -#ifdef DEBUG -#define PR_DEBUG(s) fprintf(stderr,s) -#define PR_DEBUG1(s,a) fprintf(stderr,s,a) -#define PR_DEBUG2(s,a,b) fprintf(stderr,s,a,b) -#else -#define PR_DEBUG(s) -#define PR_DEBUG1(s,a) -#define PR_DEBUG2(s,a,b) -#endif - /***====================================================================***/ #define DFLT_LINE_SIZE 128 @@ -171,8 +161,8 @@ Bool endOfFile,spacePending,slashPending,inComment; } if (checkbang && ch=='!') { if (line->num_line!=0) { - PR_DEBUG("The '!' legal only at start of line\n"); - PR_DEBUG("Line containing '!' ignored\n"); + DebugF("The '!' legal only at start of line\n"); + DebugF("Line containing '!' ignored\n"); line->num_line= 0; inComment= 0; break; @@ -273,9 +263,7 @@ unsigned present, l_ndx_present, v_ndx_present; register int i; int len, ndx; _Xstrtokparams strtok_buf; -#ifdef DEBUG Bool found; -#endif l_ndx_present = v_ndx_present = present= 0; @@ -284,9 +272,7 @@ Bool found; bzero((char *)remap,sizeof(RemapSpec)); remap->number = len; while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) { -#ifdef DEBUG found= False; -#endif str= NULL; if (strcmp(tok,"=")==0) continue; @@ -299,22 +285,20 @@ Bool found; *end != '\0' || ndx == -1) break; if (ndx < 1 || ndx > XkbNumKbdGroups) { - PR_DEBUG2("Illegal %s index: %d\n", cname[i], ndx); - PR_DEBUG1("Index must be in range 1..%d\n", + DebugF("Illegal %s index: %d\n", cname[i], ndx); + DebugF("Index must be in range 1..%d\n", XkbNumKbdGroups); break; } } else { ndx = 0; } -#ifdef DEBUG found= True; -#endif if (present&(1<num_remap= 0; return; } if ((present&COMPONENT_MASK)==0) { - PR_DEBUG("Mapping needs at least one component\n"); - PR_DEBUG("Illegal mapping ignored\n"); + DebugF("Mapping needs at least one component\n"); + DebugF("Illegal mapping ignored\n"); remap->num_remap= 0; return; } if (((present&COMPONENT_MASK)&(1<num_remap= 0; return; } @@ -434,8 +414,8 @@ Bool append = False; } if (remap->num_remap==0) { - PR_DEBUG("Must have a mapping before first line of data\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Must have a mapping before first line of data\n"); + DebugF("Illegal line of data ignored\n"); return False; } bzero((char *)&tmp,sizeof(FileSpec)); @@ -447,8 +427,8 @@ Bool append = False; continue; } if (nread>remap->num_remap) { - PR_DEBUG("Too many words on a line\n"); - PR_DEBUG1("Extra word \"%s\" ignored\n",tok); + DebugF("Too many words on a line\n"); + DebugF("Extra word \"%s\" ignored\n",tok); continue; } tmp.name[remap->remap[nread].word]= tok; @@ -456,8 +436,8 @@ Bool append = False; append = True; } if (nreadnum_remap) { - PR_DEBUG1("Too few words on a line: %s\n", line->line); - PR_DEBUG("line ignored\n"); + DebugF("Too few words on a line: %s\n", line->line); + DebugF("line ignored\n"); return False; } @@ -903,9 +883,7 @@ XkbRF_AddRule(XkbRF_RulesPtr rules) } if (!rules->rules) { rules->sz_rules= rules->num_rules= 0; -#ifdef DEBUG - fprintf(stderr,"Allocation failure in XkbRF_AddRule\n"); -#endif + DebugF("Allocation failure in XkbRF_AddRule\n"); return NULL; } bzero((char *)&rules->rules[rules->num_rules],sizeof(XkbRF_RuleRec)); @@ -1022,7 +1000,7 @@ XkbRF_AddVarDesc(XkbRF_DescribeVarsPtr vars) } if (!vars->desc) { vars->sz_desc= vars->num_desc= 0; - PR_DEBUG("Allocation failure in XkbRF_AddVarDesc\n"); + DebugF("Allocation failure in XkbRF_AddVarDesc\n"); return NULL; } vars->desc[vars->num_desc].name= NULL; @@ -1059,7 +1037,7 @@ XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name) XkbRF_DescribeVarsRec); } if ((!rules->extra_names)||(!rules->extra)) { - PR_DEBUG("allocation error in extra parts\n"); + DebugF("allocation error in extra parts\n"); rules->sz_extra= rules->num_extra= 0; rules->extra_names= NULL; rules->extra= NULL; @@ -1102,7 +1080,7 @@ int len,headingtype,extra_ndx = 0; } if (extra_ndx<0) { XkbRF_DescribeVarsPtr var; - PR_DEBUG1("Extra heading \"%s\" encountered\n",tok); + DebugF("Extra heading \"%s\" encountered\n",tok); var= XkbRF_AddVarToDescribe(rules,tok); if (var) extra_ndx= var-rules->extra; @@ -1113,20 +1091,20 @@ int len,headingtype,extra_ndx = 0; } if (headingtype == HEAD_NONE) { - PR_DEBUG("Must have a heading before first line of data\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Must have a heading before first line of data\n"); + DebugF("Illegal line of data ignored\n"); continue; } len = strlen(line.line); if ((tmp.name= strtok(line.line, " \t")) == NULL) { - PR_DEBUG("Huh? No token on line\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Huh? No token on line\n"); + DebugF("Illegal line of data ignored\n"); continue; } if (strlen(tmp.name) == len) { - PR_DEBUG("No description found\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("No description found\n"); + DebugF("Illegal line of data ignored\n"); continue; } @@ -1134,8 +1112,8 @@ int len,headingtype,extra_ndx = 0; while ((*tok!='\n')&&isspace(*tok)) tok++; if (*tok == '\0') { - PR_DEBUG("No description found\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("No description found\n"); + DebugF("Illegal line of data ignored\n"); continue; } tmp.desc= tok; diff --git a/xkb/xkb.c b/xkb/xkb.c index 66edcc1fd..bd9a87cf5 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -5784,10 +5784,8 @@ char * str; return status; } else if (length!=0) { -#ifdef DEBUG ErrorF("Internal Error! BadLength in ProcXkbGetDeviceInfo\n"); ErrorF(" Wrote %d fewer bytes than expected\n",length); -#endif return BadLength; } if (stuff->wanted&(~supported)) { diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index d95fbcdde..75b8c5a27 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -130,11 +130,9 @@ xEvent xE; xE.u.u.type = type; xE.u.u.detail = keyCode; xE.u.keyButtonPointer.time = GetTimeInMillis(); -#ifdef DEBUG if (xkbDebugFlags&0x8) { - ErrorF("AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); + DebugF("AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); } -#endif if (_XkbIsPressEvent(type)) XkbDDXKeyClick(keybd,keyCode,TRUE); @@ -533,10 +531,8 @@ KeySym * sym = XkbKeySymsPtr(xkbi->desc,key); ((ctrls->enabled_ctrls&(XkbSlowKeysMask|XkbRepeatKeysMask))== XkbRepeatKeysMask)) { if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,key)) { -#ifdef DEBUG if (xkbDebugFlags&0x10) - ErrorF("Starting software autorepeat...\n"); -#endif + DebugF("Starting software autorepeat...\n"); xkbi->repeatKey = key; xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer, 0, ctrls->repeat_delay, diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index 7643703e4..49725d065 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -813,23 +813,21 @@ XkbSrvInfoPtr xkbi; xkbi= pXDev->key->xkbInfo; if ( pClient->xkbClientFlags & _XkbClientInitialized ) { -#ifdef DEBUG if ((xkbDebugFlags&0x10)&& ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)|| (xE[0].u.u.type==DeviceKeyPress)|| (xE[0].u.u.type == DeviceKeyRelease))) { - ErrorF("XKbFilterWriteEvents:\n"); - ErrorF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); - ErrorF(" XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n", + DebugF("XKbFilterWriteEvents:\n"); + DebugF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); + DebugF(" XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n", XkbLastRepeatEvent,xE, ((XkbLastRepeatEvent!=(pointer)xE)?"True":"False")); - ErrorF(" (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", + DebugF(" (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", pClient->xkbClientFlags, (_XkbWantsDetectableAutoRepeat(pClient)?"True":"False")); - ErrorF(" !IsRelease(%d) %s\n",xE[0].u.u.type, + DebugF(" !IsRelease(%d) %s\n",xE[0].u.u.type, (!_XkbIsReleaseEvent(xE[0].u.u.type))?"True":"False"); } -#endif /* DEBUG */ if ( (XkbLastRepeatEvent==(pointer)xE) && (_XkbWantsDetectableAutoRepeat(pClient)) && (_XkbIsReleaseEvent(xE[0].u.u.type)) ) { @@ -866,13 +864,11 @@ XkbSrvInfoPtr xkbi; if (xE[0].u.u.type == ButtonPress && ((xE[0].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { -#ifdef DEBUG /* If the MouseKeys is pressed, and the "real" mouse is also pressed * when the mouse is released, the server does not behave properly. * Faking a release of the button here solves the problem. */ - ErrorF("Faking release of button %d\n", xE[0].u.u.detail); -#endif + DebugF("Faking release of button %d\n", xE[0].u.u.detail); XkbDDXFakePointerButton(ButtonRelease, xE[0].u.u.detail); } } @@ -881,21 +877,19 @@ XkbSrvInfoPtr xkbi; for (i=0;istate; - ErrorF("XKbFilterWriteEvents (non-XKB):\n"); - ErrorF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state); - ErrorF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, + DebugF("XKbFilterWriteEvents (non-XKB):\n"); + DebugF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state); + DebugF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, s->grab_mods); - ErrorF("compat lookup= 0x%02x, grab= 0x%02x\n", + DebugF("compat lookup= 0x%02x, grab= 0x%02x\n", s->compat_lookup_mods, s->compat_grab_mods); } -#endif if ( (type>=KeyPress)&&(type<=MotionNotify) ) { CARD16 old,new; @@ -924,16 +918,12 @@ XkbSrvInfoPtr xkbi; if (type == ButtonPress && ((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { -#ifdef DEBUG - ErrorF("Faking release of button %d\n", xE[i].u.u.detail); -#endif + DebugF("Faking release of button %d\n", xE[i].u.u.detail); XkbDDXFakePointerButton(ButtonRelease, xE[i].u.u.detail); } else if (type == DeviceButtonPress && ((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { -#ifdef DEBUG - ErrorF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state); -#endif + DebugF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state); XkbDDXFakePointerButton(DeviceButtonRelease, ((deviceKeyButtonPointer*)&xE[i])->state); } } diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index bb1de9de6..2ac51f26c 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -280,10 +280,6 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout, /***====================================================================***/ -#if defined(luna) -#define XKB_DDX_PERMANENT_LOCK 1 -#endif - #include "xkbDflts.h" static Bool @@ -390,15 +386,6 @@ Atom unknown; names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose"); #endif } -#ifdef DEBUG_RADIO_GROUPS - if (names->num_rg<1) { - names->radio_groups= (Atom *)_XkbCalloc(RG_COUNT, sizeof(Atom)); - if (names->radio_groups) { - names->num_rg = RG_COUNT; - names->radio_groups[RG_BOGUS_FUNCTION_GROUP]= CREATE_ATOM("BOGUS"); - } - } -#endif if (xkb->geom!=NULL) names->geometry= xkb->geom->name; else names->geometry= unknown; @@ -771,9 +758,7 @@ XkbSrvLedInfoPtr sli; sli= XkbFindSrvLedInfo(pXDev,XkbDfltXIClass,XkbDfltXIId,0); if (sli && xkbi) XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask); -#ifdef DEBUG - else ErrorF("No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); -#endif + else DebugF("No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); return softRepeat; } diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c index 3fec4f5ca..69c218c8c 100644 --- a/xkb/xkbPrKeyEv.c +++ b/xkb/xkbPrKeyEv.c @@ -56,11 +56,9 @@ int xiEvent; xkbi= keyc->xkbInfo; key= xE->u.u.detail; xiEvent= (xE->u.u.type & EXTENSION_EVENT_BASE); -#ifdef DEBUG if (xkbDebugFlags&0x8) { - ErrorF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); + DebugF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); } -#endif if ( (xkbi->repeatKey==key) && (xE->u.u.type==KeyRelease) && ((xkbi->desc->ctrls->enabled_ctrls&XkbRepeatKeysMask)==0) ) { diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 67843e9fb..28d66b38b 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -211,16 +211,6 @@ KeySym tsyms[XkbMaxSymsPerKey],*syms; XkbMapChangesPtr mc; xkb= pXDev->key->xkbInfo->desc; -#ifdef NOTYET - if (firstmin_key_code) { - if (first>=XkbMinLegalKeyCode) { - xkb->min_key_code= first; - /* 1/12/95 (ef) -- XXX! should zero out the new maps */ - changes->map.changed|= XkbKeycodesMask; -/* generate a NewKeyboard notify here? */ - } - } -#endif if (first+num-1>xkb->max_key_code) { /* 1/12/95 (ef) -- XXX! should allow XKB structures to grow */ num= xkb->max_key_code-first+1; diff --git a/xkb/xkmread.c b/xkb/xkmread.c index 88296188a..2bb02896b 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -40,8 +40,7 @@ #include "misc.h" #include "inputstr.h" #include "xkbstr.h" -#define XKBSRV_NEED_FILE_FUNCS -#include +#include "xkbsrv.h" #include "xkbgeom.h" Atom @@ -52,10 +51,6 @@ XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) return MakeAtom(str,strlen(str),!only_if_exists); } -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - char * _XkbDupString(char *str) { @@ -562,10 +557,8 @@ FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms) register unsigned i; for (i=0;imap->num_types;i++) { if (xkb->map->types[i].name==name) { -#ifdef DEBUG if (xkb->map->types[i].num_levels!=width) - fprintf(stderr,"Group width mismatch between key and type\n"); -#endif + DebugF("Group width mismatch between key and type\n"); return &xkb->map->types[i]; } } @@ -1086,10 +1079,8 @@ unsigned i,size_toc; fread(file_info,SIZEOF(xkmFileInfo),1,file); size_toc= file_info->num_toc; if (size_toc>max_toc) { -#ifdef DEBUG - fprintf(stderr,"Warning! Too many TOC entries; last %d ignored\n", + DebugF("Warning! Too many TOC entries; last %d ignored\n", size_toc-max_toc); -#endif size_toc= max_toc; } for (i=0;ixkb==NULL) result->xkb= XkbAllocKeyboard(); for (i=0;i Date: Sun, 3 Feb 2008 23:43:18 +1100 Subject: [PATCH 512/552] XKB: Remove usage of client-side types Since we're no longer sharing with Xlib, don't pass Displays and XPointers everywhere. --- include/xkbfile.h | 33 +--------------- include/xkbsrv.h | 12 +++--- include/xkbstr.h | 1 - xkb/XKBGAlloc.c | 32 ++++++++-------- xkb/ddxLoad.c | 4 +- xkb/xkbfmisc.c | 11 +++--- xkb/xkbgeom.h | 20 ---------- xkb/xkbout.c | 96 +++++++++++++++++++---------------------------- xkb/xkbtext.c | 56 +++++++++++++-------------- xkb/xkmread.c | 51 ++++++++++++------------- 10 files changed, 119 insertions(+), 197 deletions(-) diff --git a/include/xkbfile.h b/include/xkbfile.h index d58bec69f..e90d7668e 100644 --- a/include/xkbfile.h +++ b/include/xkbfile.h @@ -96,7 +96,6 @@ extern char * XkbIndentText( ); extern char * XkbAtomText( - Display * /* dpy */, Atom /* atm */, unsigned /* format */ ); @@ -129,14 +128,12 @@ XkbModMaskText( ); extern char * XkbVModIndexText( - Display * /* dpy */, XkbDescPtr /* xkb */, unsigned /* ndx */, unsigned /* format */ ); extern char * XkbVModMaskText( - Display * /* dpy */, XkbDescPtr /* xkb */, unsigned /* modMask */, unsigned /* mask */, @@ -189,7 +186,6 @@ extern char * XkbActionTypeText( ); extern char * XkbActionText( - Display * /* dpy */, XkbDescPtr /* xkb */, XkbAction * /* action */, unsigned /* format */ @@ -232,31 +228,12 @@ extern Bool XkbLookupGroupAndLevel( /***====================================================================***/ -extern char * XkbAtomGetString( - Display * /* dpy */, - Atom /* atm */ -); - extern Atom XkbInternAtom( - Display * /* dpy */, char * /* name */, Bool /* onlyIfExists */ ); -extern Status XkbChangeKbdDisplay( - Display * /* newDpy */, - XkbFileInfo * /* result */ -); - -extern Atom XkbChangeAtomDisplay( - Display * /* oldDpy */, - Display * /* newDpy */, - Atom /* atm */ -); - -extern void XkbInitAtoms( - Display * /* dpy */ -); +extern void XkbInitAtoms(void); /***====================================================================***/ @@ -415,7 +392,6 @@ extern void XkbEnsureSafeMapName( extern Bool XkbWriteXKBKeymapForNames( FILE * /* file */, XkbComponentNamesPtr /* names */, - Display * /* dpy */, XkbDescPtr /* xkb */, unsigned /* want */, unsigned /* need */ @@ -432,13 +408,6 @@ extern Bool XkmProbe( FILE * /* file */ ); -extern unsigned XkbReadFromServer( - Display * /* dpy */, - unsigned /* need */, - unsigned /* want */, - XkbFileInfo * /* result */ -); - extern unsigned XkmReadFile( FILE * /* file */, unsigned /* need */, diff --git a/include/xkbsrv.h b/include/xkbsrv.h index df9aefca3..a71150462 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -328,12 +328,10 @@ extern int DeviceEnterNotify,DeviceLeaveNotify; #define IsKeypadKey(s) XkbKSIsKeypad(s) #define Status int -#define XPointer pointer -#define Display struct _XDisplay #ifndef True -#define True 1 -#define False 0 +#define True TRUE +#define False FALSE #endif _XFUNCPROTOBEGIN @@ -1020,11 +1018,11 @@ extern Bool XkbDDXNamesFromRules( ); extern Bool XkbDDXApplyConfig( - XPointer /* cfg_in */, + void * /* cfg_in */, XkbSrvInfoPtr /* xkbi */ ); -extern XPointer XkbDDXPreloadConfig( +extern void *XkbDDXPreloadConfig( char ** /* rulesFileRtrn */, XkbRF_VarDefsPtr /* defs */, XkbComponentNamesPtr /* names */, @@ -1038,6 +1036,6 @@ extern int _XkbStrCaseCmp( _XFUNCPROTOEND -#define XkbAtomGetString(d,s) NameForAtom(s) +#define XkbAtomGetString(s) NameForAtom(s) #endif /* _XKBSRV_H_ */ diff --git a/include/xkbstr.h b/include/xkbstr.h index e519e657d..f390c611c 100644 --- a/include/xkbstr.h +++ b/include/xkbstr.h @@ -418,7 +418,6 @@ typedef struct _XkbGeometry *XkbGeometryPtr; * Tie it all together into one big keyboard description */ typedef struct _XkbDesc { - struct _XDisplay * dpy; unsigned short flags; unsigned short device_spec; KeyCode min_key_code; diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c index 94072b8ce..c37f49a55 100644 --- a/xkb/XKBGAlloc.c +++ b/xkb/XKBGAlloc.c @@ -455,7 +455,7 @@ XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap) /***====================================================================***/ static Status -_XkbGeomAlloc( XPointer * old, +_XkbGeomAlloc( void ** old, unsigned short * num, unsigned short * total, int num_new, @@ -471,8 +471,8 @@ _XkbGeomAlloc( XPointer * old, *total= (*num)+num_new; if ((*old)!=NULL) - (*old)= (XPointer)_XkbRealloc((*old),(*total)*sz_elem); - else (*old)= (XPointer)_XkbCalloc((*total),sz_elem); + (*old)= _XkbRealloc((*old),(*total)*sz_elem); + else (*old)= _XkbCalloc((*total),sz_elem); if ((*old)==NULL) { *total= *num= 0; return BadAlloc; @@ -485,44 +485,44 @@ _XkbGeomAlloc( XPointer * old, return Success; } -#define _XkbAllocProps(g,n) _XkbGeomAlloc((XPointer *)&(g)->properties,\ +#define _XkbAllocProps(g,n) _XkbGeomAlloc((void *)&(g)->properties,\ &(g)->num_properties,&(g)->sz_properties,\ (n),sizeof(XkbPropertyRec)) -#define _XkbAllocColors(g,n) _XkbGeomAlloc((XPointer *)&(g)->colors,\ +#define _XkbAllocColors(g,n) _XkbGeomAlloc((void *)&(g)->colors,\ &(g)->num_colors,&(g)->sz_colors,\ (n),sizeof(XkbColorRec)) -#define _XkbAllocShapes(g,n) _XkbGeomAlloc((XPointer *)&(g)->shapes,\ +#define _XkbAllocShapes(g,n) _XkbGeomAlloc((void *)&(g)->shapes,\ &(g)->num_shapes,&(g)->sz_shapes,\ (n),sizeof(XkbShapeRec)) -#define _XkbAllocSections(g,n) _XkbGeomAlloc((XPointer *)&(g)->sections,\ +#define _XkbAllocSections(g,n) _XkbGeomAlloc((void *)&(g)->sections,\ &(g)->num_sections,&(g)->sz_sections,\ (n),sizeof(XkbSectionRec)) -#define _XkbAllocDoodads(g,n) _XkbGeomAlloc((XPointer *)&(g)->doodads,\ +#define _XkbAllocDoodads(g,n) _XkbGeomAlloc((void *)&(g)->doodads,\ &(g)->num_doodads,&(g)->sz_doodads,\ (n),sizeof(XkbDoodadRec)) -#define _XkbAllocKeyAliases(g,n) _XkbGeomAlloc((XPointer *)&(g)->key_aliases,\ +#define _XkbAllocKeyAliases(g,n) _XkbGeomAlloc((void *)&(g)->key_aliases,\ &(g)->num_key_aliases,&(g)->sz_key_aliases,\ (n),sizeof(XkbKeyAliasRec)) -#define _XkbAllocOutlines(s,n) _XkbGeomAlloc((XPointer *)&(s)->outlines,\ +#define _XkbAllocOutlines(s,n) _XkbGeomAlloc((void *)&(s)->outlines,\ &(s)->num_outlines,&(s)->sz_outlines,\ (n),sizeof(XkbOutlineRec)) -#define _XkbAllocRows(s,n) _XkbGeomAlloc((XPointer *)&(s)->rows,\ +#define _XkbAllocRows(s,n) _XkbGeomAlloc((void *)&(s)->rows,\ &(s)->num_rows,&(s)->sz_rows,\ (n),sizeof(XkbRowRec)) -#define _XkbAllocPoints(o,n) _XkbGeomAlloc((XPointer *)&(o)->points,\ +#define _XkbAllocPoints(o,n) _XkbGeomAlloc((void *)&(o)->points,\ &(o)->num_points,&(o)->sz_points,\ (n),sizeof(XkbPointRec)) -#define _XkbAllocKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\ +#define _XkbAllocKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\ &(r)->num_keys,&(r)->sz_keys,\ (n),sizeof(XkbKeyRec)) -#define _XkbAllocOverlays(s,n) _XkbGeomAlloc((XPointer *)&(s)->overlays,\ +#define _XkbAllocOverlays(s,n) _XkbGeomAlloc((void *)&(s)->overlays,\ &(s)->num_overlays,&(s)->sz_overlays,\ (n),sizeof(XkbOverlayRec)) -#define _XkbAllocOverlayRows(o,n) _XkbGeomAlloc((XPointer *)&(o)->rows,\ +#define _XkbAllocOverlayRows(o,n) _XkbGeomAlloc((void *)&(o)->rows,\ &(o)->num_rows,&(o)->sz_rows,\ (n),sizeof(XkbOverlayRowRec)) -#define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\ +#define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\ &(r)->num_keys,&(r)->sz_keys,\ (n),sizeof(XkbOverlayKeyRec)) diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 63122264b..60a8d443a 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -321,10 +321,10 @@ char tmpname[PATH_MAX]; #ifdef DEBUG if (xkbDebugFlags) { ErrorF("XkbDDXCompileKeymapByNames compiling keymap:\n"); - XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need); + XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need); } #endif - XkbWriteXKBKeymapForNames(out,names,NULL,xkb,want,need); + XkbWriteXKBKeymapForNames(out,names,xkb,want,need); #ifndef WIN32 if (Pclose(out)==0) #else diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c index 06d3519af..4182c3a34 100644 --- a/xkb/xkbfmisc.c +++ b/xkb/xkbfmisc.c @@ -160,7 +160,6 @@ _AddIncl( FILE * file, Bool XkbWriteXKBKeymapForNames( FILE * file, XkbComponentNamesPtr names, - Display * dpy, XkbDescPtr xkb, unsigned want, unsigned need) @@ -233,7 +232,7 @@ XkbFileInfo finfo; if ((xkb!=NULL) && (old_names!=NULL)) { if (wantNames&XkmTypesMask) { if (old_names->types!=None) { - tmp= XkbAtomGetString(dpy,old_names->types); + tmp= XkbAtomGetString(old_names->types); names->types= _XkbDupString(tmp); } else { @@ -243,7 +242,7 @@ XkbFileInfo finfo; } if (wantNames&XkmCompatMapMask) { if (old_names->compat!=None) { - tmp= XkbAtomGetString(dpy,old_names->compat); + tmp= XkbAtomGetString(old_names->compat); names->compat= _XkbDupString(tmp); } else wantDflts|= XkmCompatMapMask; @@ -252,13 +251,13 @@ XkbFileInfo finfo; if (wantNames&XkmSymbolsMask) { if (old_names->symbols==None) return False; - tmp= XkbAtomGetString(dpy,old_names->symbols); + tmp= XkbAtomGetString(old_names->symbols); names->symbols= _XkbDupString(tmp); complete|= XkmSymbolsMask; } if (wantNames&XkmKeyNamesMask) { if (old_names->keycodes!=None) { - tmp= XkbAtomGetString(dpy,old_names->keycodes); + tmp= XkbAtomGetString(old_names->keycodes); names->keycodes= _XkbDupString(tmp); } else wantDflts|= XkmKeyNamesMask; @@ -267,7 +266,7 @@ XkbFileInfo finfo; if (wantNames&XkmGeometryMask) { if (old_names->geometry==None) return False; - tmp= XkbAtomGetString(dpy,old_names->geometry); + tmp= XkbAtomGetString(old_names->geometry); names->geometry= _XkbDupString(tmp); complete|= XkmGeometryMask; wantNames&= ~XkmGeometryMask; diff --git a/xkb/xkbgeom.h b/xkb/xkbgeom.h index a6918b4b9..173affee9 100644 --- a/xkb/xkbgeom.h +++ b/xkb/xkbgeom.h @@ -599,13 +599,6 @@ XkbAllocGeometry( XkbGeometrySizesPtr /* sizes */ ); -extern Status -XkbSetGeometry( - Display * /* dpy */, - unsigned /* deviceSpec */, - XkbGeometryPtr /* geom */ -); - extern Bool XkbComputeShapeTop( XkbShapePtr /* shape */, @@ -637,19 +630,6 @@ XkbFindOverlayForKey( char * /* under */ ); -extern Status -XkbGetGeometry( - Display * /* dpy */, - XkbDescPtr /* xkb */ -); - -extern Status -XkbGetNamedGeometry( - Display * /* dpy */, - XkbDescPtr /* xkb */, - Atom /* name */ -); - _XFUNCPROTOEND #endif /* _XKBGEOM_H_ */ diff --git a/xkb/xkbout.c b/xkb/xkbout.c index fc4e43e3f..b72c05c60 100644 --- a/xkb/xkbout.c +++ b/xkb/xkbout.c @@ -52,7 +52,7 @@ #define VMOD_COMMENT_VALUE 2 static Bool -WriteXKBVModDecl(FILE *file,Display *dpy,XkbDescPtr xkb,int showValue) +WriteXKBVModDecl(FILE *file,XkbDescPtr xkb,int showValue) { register int i,nMods; Atom * vmodNames; @@ -67,7 +67,7 @@ Atom * vmodNames; if ((vmodNames!=NULL)&&(vmodNames[i]!=None)) { if (nMods==0) fprintf(file," virtual_modifiers "); else fprintf(file,","); - fprintf(file,"%s",XkbAtomText(dpy,vmodNames[i],XkbXKBFile)); + fprintf(file,"%s",XkbAtomText(vmodNames[i],XkbXKBFile)); if ((showValue!=VMOD_HIDE_VALUE)&& (xkb->server)&&(xkb->server->vmods[i]!=XkbNoModifierMask)) { if (showValue==VMOD_COMMENT_VALUE) { @@ -92,12 +92,7 @@ Atom * vmodNames; static Bool WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action) { -XkbDescPtr xkb; -Display * dpy; - - xkb= result->xkb; - dpy= xkb->dpy; - fprintf(file,"%s",XkbActionText(dpy,xkb,(XkbAction *)action,XkbXKBFile)); + fprintf(file,"%s",XkbActionText(result->xkb,(XkbAction *)action,XkbXKBFile)); return True; } @@ -114,11 +109,9 @@ XkbWriteXKBKeycodes( FILE * file, Atom kcName; register unsigned i; XkbDescPtr xkb; -Display * dpy; char * alternate; xkb= result->xkb; - dpy= xkb->dpy; if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) { _XkbLibError(_XkbErrMissingNames,"XkbWriteXKBKeycodes",0); return False; @@ -126,7 +119,7 @@ char * alternate; kcName= xkb->names->keycodes; if (kcName!=None) fprintf(file,"xkb_keycodes \"%s\" {\n", - XkbAtomText(dpy,kcName,XkbXKBFile)); + XkbAtomText(kcName,XkbXKBFile)); else fprintf(file,"xkb_keycodes {\n"); fprintf(file," minimum = %d;\n",xkb->min_key_code); fprintf(file," maximum = %d;\n",xkb->max_key_code); @@ -148,7 +141,7 @@ char * alternate; else type= " virtual "; if (xkb->names->indicators[i]!=None) { fprintf(file,"%sindicator %d = \"%s\";\n",type,i+1, - XkbAtomText(dpy,xkb->names->indicators[i],XkbXKBFile)); + XkbAtomText(xkb->names->indicators[i],XkbXKBFile)); } } } @@ -175,14 +168,12 @@ XkbWriteXKBKeyTypes( FILE * file, XkbFileAddOnFunc addOn, void * priv) { -Display * dpy; register unsigned i,n; XkbKeyTypePtr type; XkbKTMapEntryPtr entry; XkbDescPtr xkb; xkb= result->xkb; - dpy= xkb->dpy; if ((!xkb)||(!xkb->map)||(!xkb->map->types)) { _XkbLibError(_XkbErrMissingTypes,"XkbWriteXKBKeyTypes",0); return False; @@ -194,27 +185,27 @@ XkbDescPtr xkb; if ((xkb->names==NULL)||(xkb->names->types==None)) fprintf(file,"xkb_types {\n\n"); else fprintf(file,"xkb_types \"%s\" {\n\n", - XkbAtomText(dpy,xkb->names->types,XkbXKBFile)); - WriteXKBVModDecl(file,dpy,xkb, + XkbAtomText(xkb->names->types,XkbXKBFile)); + WriteXKBVModDecl(file,xkb, (showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE)); type= xkb->map->types; for (i=0;imap->num_types;i++,type++) { fprintf(file," type \"%s\" {\n", - XkbAtomText(dpy,type->name,XkbXKBFile)); + XkbAtomText(type->name,XkbXKBFile)); fprintf(file," modifiers= %s;\n", - XkbVModMaskText(dpy,xkb,type->mods.real_mods,type->mods.vmods, + XkbVModMaskText(xkb,type->mods.real_mods,type->mods.vmods, XkbXKBFile)); entry= type->map; for (n=0;nmap_count;n++,entry++) { char *str; - str=XkbVModMaskText(dpy,xkb,entry->mods.real_mods,entry->mods.vmods, + str=XkbVModMaskText(xkb,entry->mods.real_mods,entry->mods.vmods, XkbXKBFile); fprintf(file," map[%s]= Level%d;\n",str,entry->level+1); if ((type->preserve)&&((type->preserve[n].real_mods)|| (type->preserve[n].vmods))) { fprintf(file," preserve[%s]= ",str); - fprintf(file,"%s;\n",XkbVModMaskText(dpy,xkb, + fprintf(file,"%s;\n",XkbVModMaskText(xkb, type->preserve[n].real_mods, type->preserve[n].vmods, XkbXKBFile)); @@ -226,7 +217,7 @@ XkbDescPtr xkb; if ((*name)==None) continue; fprintf(file," level_name[Level%d]= \"%s\";\n",n+1, - XkbAtomText(dpy,*name,XkbXKBFile)); + XkbAtomText(*name,XkbXKBFile)); } } fprintf(file," };\n"); @@ -248,7 +239,7 @@ WriteXKBIndicatorMap( FILE * file, XkbDescPtr xkb; xkb= result->xkb; - fprintf(file," indicator \"%s\" {\n",XkbAtomGetString(xkb->dpy,name)); + fprintf(file," indicator \"%s\" {\n",XkbAtomGetString(name)); if (led->flags&XkbIM_NoExplicit) fprintf(file," !allowExplicit;\n"); if (led->flags&XkbIM_LEDDrivesKB) @@ -266,7 +257,7 @@ XkbDescPtr xkb; XkbIMWhichStateMaskText(led->which_mods,XkbXKBFile)); } fprintf(file," modifiers= %s;\n", - XkbVModMaskText(xkb->dpy,xkb, + XkbVModMaskText(xkb, led->mods.real_mods,led->mods.vmods, XkbXKBFile)); } @@ -288,13 +279,11 @@ XkbWriteXKBCompatMap( FILE * file, XkbFileAddOnFunc addOn, void * priv) { -Display * dpy; register unsigned i; XkbSymInterpretPtr interp; XkbDescPtr xkb; xkb= result->xkb; - dpy= xkb->dpy; if ((!xkb)||(!xkb->compat)||(!xkb->compat->sym_interpret)) { _XkbLibError(_XkbErrMissingCompatMap,"XkbWriteXKBCompatMap",0); return False; @@ -302,8 +291,8 @@ XkbDescPtr xkb; if ((xkb->names==NULL)||(xkb->names->compat==None)) fprintf(file,"xkb_compatibility {\n\n"); else fprintf(file,"xkb_compatibility \"%s\" {\n\n", - XkbAtomText(dpy,xkb->names->compat,XkbXKBFile)); - WriteXKBVModDecl(file,dpy,xkb, + XkbAtomText(xkb->names->compat,XkbXKBFile)); + WriteXKBVModDecl(file,xkb, (showImplicit?VMOD_COMMENT_VALUE:VMOD_HIDE_VALUE)); fprintf(file," interpret.useModMapMods= AnyLevel;\n"); @@ -318,7 +307,7 @@ XkbDescPtr xkb; XkbModMaskText(interp->mods,XkbXKBFile)); if (interp->virtual_mod!=XkbNoModifier) { fprintf(file," virtualModifier= %s;\n", - XkbVModIndexText(dpy,xkb,interp->virtual_mod,XkbXKBFile)); + XkbVModIndexText(xkb,interp->virtual_mod,XkbXKBFile)); } if (interp->match&XkbSI_LevelOneOnly) fprintf(file," useModMapMods=level1;\n"); @@ -337,7 +326,7 @@ XkbDescPtr xkb; gc= &xkb->compat->groups[i]; if ((gc->real_mods==0)&&(gc->vmods==0)) continue; - fprintf(file," group %d = %s;\n",i+1,XkbVModMaskText(xkb->dpy,xkb, + fprintf(file," group %d = %s;\n",i+1,XkbVModMaskText(xkb, gc->real_mods,gc->vmods, XkbXKBFile)); } @@ -367,7 +356,6 @@ XkbWriteXKBSymbols( FILE * file, XkbFileAddOnFunc addOn, void * priv) { -Display * dpy; register unsigned i,tmp; XkbDescPtr xkb; XkbClientMapPtr map; @@ -377,7 +365,6 @@ Bool showActions; xkb= result->xkb; map= xkb->map; srv= xkb->server; - dpy= xkb->dpy; if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) { _XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0); return False; @@ -389,11 +376,11 @@ Bool showActions; if ((xkb->names==NULL)||(xkb->names->symbols==None)) fprintf(file,"xkb_symbols {\n\n"); else fprintf(file,"xkb_symbols \"%s\" {\n\n", - XkbAtomText(dpy,xkb->names->symbols,XkbXKBFile)); + XkbAtomText(xkb->names->symbols,XkbXKBFile)); for (tmp=i=0;inames->groups[i]!=None) { fprintf(file," name[group%d]=\"%s\";\n",i+1, - XkbAtomText(dpy,xkb->names->groups[i],XkbXKBFile)); + XkbAtomText(xkb->names->groups[i],XkbXKBFile)); tmp++; } } @@ -429,19 +416,19 @@ Bool showActions; if (srv->explicit[i]&(1<types[typeNdx].name, + XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } else if (showImplicit) { fprintf(file,"\n// type[group%d]= \"%s\",",g+1, - XkbAtomText(dpy,map->types[typeNdx].name, + XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } } } else { fprintf(file,"\n%s type= \"%s\",",comment, - XkbAtomText(dpy,map->types[typeNdx].name, + XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } simple= False; @@ -457,13 +444,13 @@ Bool showActions; (xkb->server->vmodmap[i]!=0)) { if ((srv->explicit[i]&XkbExplicitVModMapMask)!=0) { fprintf(file,"\n virtualMods= %s,", - XkbVModMaskText(dpy,xkb,0, + XkbVModMaskText(xkb,0, xkb->server->vmodmap[i], XkbXKBFile)); } else if (showImplicit) { fprintf(file,"\n// virtualMods= %s,", - XkbVModMaskText(dpy,xkb,0, + XkbVModMaskText(xkb,0, xkb->server->vmodmap[i], XkbXKBFile)); } @@ -603,7 +590,6 @@ char * iStr; static Bool WriteXKBDoodad( FILE * file, - Display * dpy, unsigned indent, XkbGeometryPtr geom, XkbDoodadPtr doodad) @@ -615,7 +601,7 @@ XkbColorPtr color; i_str= XkbIndentText(indent); fprintf(file,"%s%s \"%s\" {\n",i_str, XkbDoodadTypeText(doodad->any.type,XkbMessage), - XkbAtomText(dpy,doodad->any.name,XkbMessage)); + XkbAtomText(doodad->any.name,XkbMessage)); fprintf(file,"%s top= %s;\n",i_str, XkbGeomFPText(doodad->any.top,XkbXKBFile)); fprintf(file,"%s left= %s;\n",i_str, @@ -634,7 +620,7 @@ XkbColorPtr color; } shape= XkbShapeDoodadShape(geom,&doodad->shape); fprintf(file,"%s shape= \"%s\";\n",i_str, - XkbAtomText(dpy,shape->name,XkbXKBFile)); + XkbAtomText(shape->name,XkbXKBFile)); break; case XkbTextDoodad: if (doodad->text.angle!=0) { @@ -670,7 +656,7 @@ XkbColorPtr color; fprintf(file,"%s offColor= \"%s\";\n",i_str, XkbStringText(color->spec,XkbXKBFile)); fprintf(file,"%s shape= \"%s\";\n",i_str, - XkbAtomText(dpy,shape->name,XkbXKBFile)); + XkbAtomText(shape->name,XkbXKBFile)); break; case XkbLogoDoodad: fprintf(file,"%s logoName= \"%s\";\n",i_str, @@ -685,7 +671,7 @@ XkbColorPtr color; } shape= XkbLogoDoodadShape(geom,&doodad->logo); fprintf(file,"%s shape= \"%s\";\n",i_str, - XkbAtomText(dpy,shape->name,XkbXKBFile)); + XkbAtomText(shape->name,XkbXKBFile)); break; } fprintf(file,"%s};\n",i_str); @@ -695,7 +681,6 @@ XkbColorPtr color; /*ARGSUSED*/ static Bool WriteXKBOverlay( FILE * file, - Display * dpy, unsigned indent, XkbGeometryPtr geom, XkbOverlayPtr ol) @@ -708,7 +693,7 @@ XkbOverlayKeyPtr key; i_str= XkbIndentText(indent); if (ol->name!=None) { fprintf(file,"%soverlay \"%s\" {\n",i_str, - XkbAtomText(dpy,ol->name,XkbMessage)); + XkbAtomText(ol->name,XkbMessage)); } else fprintf(file,"%soverlay {\n",i_str); for (nOut=r=0,row=ol->rows;rnum_rows;r++,row++) { @@ -730,7 +715,6 @@ XkbOverlayKeyPtr key; static Bool WriteXKBSection( FILE * file, - Display * dpy, XkbSectionPtr s, XkbGeometryPtr geom) { @@ -739,7 +723,7 @@ XkbRowPtr row; int dfltKeyColor = 0; fprintf(file," section \"%s\" {\n", - XkbAtomText(dpy,s->name,XkbXKBFile)); + XkbAtomText(s->name,XkbXKBFile)); if (s->rows&&(s->rows->num_keys>0)) { dfltKeyColor= s->rows->keys[0].color_ndx; fprintf(file," key.color= \"%s\";\n", @@ -788,7 +772,7 @@ int dfltKeyColor = 0; shape= XkbKeyShape(geom,key); fprintf(file,"{ %6s, \"%s\", %3s", XkbKeyNameText(key->name.name,XkbXKBFile), - XkbAtomText(dpy,shape->name,XkbXKBFile), + XkbAtomText(shape->name,XkbXKBFile), XkbGeomFPText(key->gap,XkbXKBFile)); if (key->color_ndx!=dfltKeyColor) { fprintf(file,", color=\"%s\"",XkbKeyColor(geom,key)->spec); @@ -803,17 +787,17 @@ int dfltKeyColor = 0; if (s->doodads!=NULL) { XkbDoodadPtr doodad; for (i=0,doodad=s->doodads;inum_doodads;i++,doodad++) { - WriteXKBDoodad(file,dpy,8,geom,doodad); + WriteXKBDoodad(file,8,geom,doodad); } } if (s->overlays!=NULL) { XkbOverlayPtr ol; for (i=0,ol=s->overlays;inum_overlays;i++,ol++) { - WriteXKBOverlay(file,dpy,8,geom,ol); + WriteXKBOverlay(file,8,geom,ol); } } fprintf(file," }; // End of \"%s\" section\n\n", - XkbAtomText(dpy,s->name,XkbXKBFile)); + XkbAtomText(s->name,XkbXKBFile)); return True; } @@ -825,7 +809,6 @@ XkbWriteXKBGeometry( FILE * file, XkbFileAddOnFunc addOn, void * priv) { -Display * dpy; register unsigned i,n; XkbDescPtr xkb; XkbGeometryPtr geom; @@ -835,12 +818,11 @@ XkbGeometryPtr geom; _XkbLibError(_XkbErrMissingGeometry,"XkbWriteXKBGeometry",0); return False; } - dpy= xkb->dpy; geom= xkb->geom; if (geom->name==None) fprintf(file,"xkb_geometry {\n\n"); else fprintf(file,"xkb_geometry \"%s\" {\n\n", - XkbAtomText(dpy,geom->name,XkbXKBFile)); + XkbAtomText(geom->name,XkbXKBFile)); fprintf(file," width= %s;\n", XkbGeomFPText(geom->width_mm,XkbXKBFile)); fprintf(file," height= %s;\n\n", @@ -889,7 +871,7 @@ XkbGeometryPtr geom; for (shape=geom->shapes,i=0;inum_shapes;i++,shape++) { lastR=0; fprintf(file," shape \"%s\" {", - XkbAtomText(dpy,shape->name,XkbXKBFile)); + XkbAtomText(shape->name,XkbXKBFile)); outline= shape->outlines; if (shape->num_outlines>1) { for (n=0;nnum_outlines;n++,outline++) { @@ -909,13 +891,13 @@ XkbGeometryPtr geom; if (geom->num_sections>0) { XkbSectionPtr section; for (section=geom->sections,i=0;inum_sections;i++,section++){ - WriteXKBSection(file,dpy,section,geom); + WriteXKBSection(file,section,geom); } } if (geom->num_doodads>0) { XkbDoodadPtr doodad; for (i=0,doodad=geom->doodads;inum_doodads;i++,doodad++) { - WriteXKBDoodad(file,dpy,4,geom,doodad); + WriteXKBDoodad(file,4,geom,doodad); } } if (addOn) diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c index 1520a9f58..d08c91589 100644 --- a/xkb/xkbtext.c +++ b/xkb/xkbtext.c @@ -69,11 +69,11 @@ char *rtrn; /***====================================================================***/ char * -XkbAtomText(Display *dpy,Atom atm,unsigned format) +XkbAtomText(Atom atm,unsigned format) { char *rtrn,*tmp; - tmp= XkbAtomGetString(dpy,atm); + tmp= XkbAtomGetString(atm); if (tmp!=NULL) { int len; len= strlen(tmp)+1; @@ -101,7 +101,7 @@ char *rtrn,*tmp; /***====================================================================***/ char * -XkbVModIndexText(Display *dpy,XkbDescPtr xkb,unsigned ndx,unsigned format) +XkbVModIndexText(XkbDescPtr xkb,unsigned ndx,unsigned format) { register int len; register Atom *vmodNames; @@ -116,7 +116,7 @@ char numBuf[20]; if (ndx>=XkbNumVirtualMods) tmp= "illegal"; else if (vmodNames&&(vmodNames[ndx]!=None)) - tmp= XkbAtomGetString(dpy,vmodNames[ndx]); + tmp= XkbAtomGetString(vmodNames[ndx]); if (tmp==NULL) sprintf(tmp=numBuf,"%d",ndx); @@ -135,8 +135,7 @@ char numBuf[20]; } char * -XkbVModMaskText( Display * dpy, - XkbDescPtr xkb, +XkbVModMaskText( XkbDescPtr xkb, unsigned modMask, unsigned mask, unsigned format) @@ -163,7 +162,7 @@ char *str,buf[BUFFER_SIZE]; char *tmp; for (i=0,bit=1;ireal_mods || tmp) { TryCopyStr(buf, - XkbVModMaskText(dpy,xkb,act->real_mods,tmp,XkbXKBFile), + XkbVModMaskText(xkb,act->real_mods,tmp,XkbXKBFile), sz); } else TryCopyStr(buf,"none",sz); @@ -701,7 +700,7 @@ unsigned tmp; /*ARGSUSED*/ static Bool -CopyGroupActionArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyGroupActionArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbGroupAction * act; @@ -726,7 +725,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopyMovePtrArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +CopyMovePtrArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) { XkbPtrAction * act; int x,y; @@ -751,7 +750,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopyPtrBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +CopyPtrBtnArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) { XkbPtrBtnAction * act; char tbuf[32]; @@ -785,7 +784,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopySetPtrDfltArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopySetPtrDfltArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbPtrDfltAction * act; @@ -803,7 +802,7 @@ char tbuf[32]; } static Bool -CopyISOLockArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +CopyISOLockArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) { XkbISOAction * act; char tbuf[64]; @@ -831,7 +830,7 @@ char tbuf[64]; TryCopyStr(buf,"+",sz); } if (tmp) - TryCopyStr(buf,XkbVModMaskText(dpy,xkb,0,tmp,XkbXKBFile),sz); + TryCopyStr(buf,XkbVModMaskText(xkb,0,tmp,XkbXKBFile),sz); } else TryCopyStr(buf,"none",sz); } @@ -865,7 +864,7 @@ char tbuf[64]; /*ARGSUSED*/ static Bool -CopySwitchScreenArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopySwitchScreenArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbSwitchScreenAction * act; @@ -884,7 +883,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopySetLockControlsArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action, +CopySetLockControlsArgs(XkbDescPtr xkb,XkbAction *action, char *buf,int *sz) { XkbCtrlsAction * act; @@ -971,7 +970,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopyActionMessageArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyActionMessageArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbMessageAction * act; @@ -998,7 +997,7 @@ char tbuf[32]; } static Bool -CopyRedirectKeyArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyRedirectKeyArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbRedirectKeyAction * act; @@ -1022,19 +1021,19 @@ unsigned vmods,vmods_mask; return True; if ((act->mods_mask==XkbAllModifiersMask)&& (vmods_mask==XkbAllVirtualModsMask)) { - tmp= XkbVModMaskText(dpy,xkb,act->mods,vmods,XkbXKBFile); + tmp= XkbVModMaskText(xkb,act->mods,vmods,XkbXKBFile); TryCopyStr(buf,",mods=",sz); TryCopyStr(buf,tmp,sz); } else { if ((act->mods_mask&act->mods)||(vmods_mask&vmods)) { - tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&act->mods, + tmp= XkbVModMaskText(xkb,act->mods_mask&act->mods, vmods_mask&vmods,XkbXKBFile); TryCopyStr(buf,",mods= ",sz); TryCopyStr(buf,tmp,sz); } if ((act->mods_mask&(~act->mods))||(vmods_mask&(~vmods))) { - tmp= XkbVModMaskText(dpy,xkb,act->mods_mask&(~act->mods), + tmp= XkbVModMaskText(xkb,act->mods_mask&(~act->mods), vmods_mask&(~vmods),XkbXKBFile); TryCopyStr(buf,",clearMods= ",sz); TryCopyStr(buf,tmp,sz); @@ -1045,7 +1044,7 @@ unsigned vmods,vmods_mask; /*ARGSUSED*/ static Bool -CopyDeviceBtnArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf, +CopyDeviceBtnArgs(XkbDescPtr xkb,XkbAction *action,char *buf, int *sz) { XkbDeviceBtnAction * act; @@ -1078,7 +1077,7 @@ char tbuf[32]; /*ARGSUSED*/ static Bool -CopyOtherArgs(Display *dpy,XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) +CopyOtherArgs(XkbDescPtr xkb,XkbAction *action,char *buf,int *sz) { XkbAnyAction * act; char tbuf[32]; @@ -1096,7 +1095,6 @@ char tbuf[32]; } typedef Bool (*actionCopy)( - Display * /* dpy */, XkbDescPtr /* xkb */, XkbAction * /* action */, char * /* buf */, @@ -1128,7 +1126,7 @@ static actionCopy copyActionArgs[XkbSA_NumActions] = { #define ACTION_SZ 256 char * -XkbActionText(Display *dpy,XkbDescPtr xkb,XkbAction *action,unsigned format) +XkbActionText(XkbDescPtr xkb,XkbAction *action,unsigned format) { char buf[ACTION_SZ],*tmp; int sz; @@ -1145,8 +1143,8 @@ int sz; sprintf(buf,"%s(",XkbActionTypeText(action->type,XkbXKBFile)); sz= ACTION_SZ-strlen(buf)+2; /* room for close paren and NULL */ if (action->type<(unsigned)XkbSA_NumActions) - (*copyActionArgs[action->type])(dpy,xkb,action,buf,&sz); - else CopyOtherArgs(dpy,xkb,action,buf,&sz); + (*copyActionArgs[action->type])(xkb,action,buf,&sz); + else CopyOtherArgs(xkb,action,buf,&sz); TryCopyStr(buf,")",&sz); } tmp= tbGetBuffer(strlen(buf)+1); diff --git a/xkb/xkmread.c b/xkb/xkmread.c index 2bb02896b..1e5b2cb4e 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -44,7 +44,7 @@ #include "xkbgeom.h" Atom -XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) +XkbInternAtom(char *str,Bool only_if_exists) { if (str==NULL) return None; @@ -66,18 +66,18 @@ char *new; /***====================================================================***/ -static XPointer -XkmInsureSize(XPointer oldPtr,int oldCount,int *newCountRtrn,int elemSize) +static void * +XkmInsureSize(void *oldPtr,int oldCount,int *newCountRtrn,int elemSize) { int newCount= *newCountRtrn; if (oldPtr==NULL) { if (newCount==0) return NULL; - oldPtr= (XPointer)_XkbCalloc(newCount,elemSize); + oldPtr= _XkbCalloc(newCount,elemSize); } else if (oldCountnames->vmods[i]= XkbInternAtom(xkb->dpy,name,False); + xkb->names->vmods[i]= XkbInternAtom(name,False); if (changes) changes->names.changed_vmods|= bit; } @@ -244,7 +244,7 @@ XkbDescPtr xkb; return -1; } if (name[0]!='\0') { - xkb->names->keycodes= XkbInternAtom(xkb->dpy,name,False); + xkb->names->keycodes= XkbInternAtom(name,False); } for (pN=&xkb->names->keys[minKC],i=minKC;i<=(int)maxKC;i++,pN++) { @@ -300,7 +300,7 @@ XkbDescPtr xkb; _XkbLibError(_XkbErrBadAlloc,"ReadXkmKeyTypes",0); return -1; } - xkb->names->types= XkbInternAtom(xkb->dpy,buf,False); + xkb->names->types= XkbInternAtom(buf,False); } num_types= XkmGetCARD16(file,&nRead); nRead+= XkmSkipPadding(file,2); @@ -355,7 +355,7 @@ XkbDescPtr xkb; return -1; } if (buf[0]!='\0') { - type->name= XkbInternAtom(xkb->dpy,buf,False); + type->name= XkbInternAtom(buf,False); } else type->name= None; @@ -393,7 +393,7 @@ XkbDescPtr xkb; nRead+= tmp; if (strlen(buf)==0) type->level_names[n]= None; - else type->level_names[n]= XkbInternAtom(xkb->dpy,buf,0); + else type->level_names[n]= XkbInternAtom(buf,0); } } } @@ -437,7 +437,7 @@ XkbCompatMapPtr compat; _XkbLibError(_XkbErrBadAlloc,"ReadXkmCompatMap",0); return -1; } - xkb->names->compat= XkbInternAtom(xkb->dpy,name,False); + xkb->names->compat= XkbInternAtom(name,False); } num_si= XkmGetCARD16(file,&nRead); groups= XkmGetCARD8(file,&nRead); @@ -523,7 +523,7 @@ XkbDescPtr xkb; } nRead+= tmp; if (buf[0]!='\0') - name= XkbInternAtom(xkb->dpy,buf,False); + name= XkbInternAtom(buf,False); else name= None; if ((tmp=fread(&wire,SIZEOF(xkmIndicatorMapDesc),1,file))<1) { _XkbLibError(_XkbErrBadLength,"ReadXkmIndicators",0); @@ -600,7 +600,7 @@ XkbDescPtr xkb; } if ((buf[0]!='\0')&&(xkb->names)) { Atom name; - name= XkbInternAtom(xkb->dpy,buf,0); + name= XkbInternAtom(buf,0); xkb->names->symbols= name; xkb->names->phys_symbols= name; } @@ -611,7 +611,7 @@ XkbDescPtr xkb; nRead+= tmp; if ((buf[0]!='\0')&&(xkb->names)) { Atom name; - name= XkbInternAtom(xkb->dpy,buf,0); + name= XkbInternAtom(buf,0); xkb->names->groups[i]= name; } else xkb->names->groups[i]= None; @@ -654,7 +654,7 @@ XkbDescPtr xkb; for (g=0;g0)) { - typeName[g]= XkbInternAtom(xkb->dpy,buf,1); + typeName[g]= XkbInternAtom(buf,1); nRead+= tmp; } type[g]=FindTypeForKey(xkb,typeName[g],wireMap.width,NULL); @@ -732,7 +732,6 @@ XkbDescPtr xkb; static int ReadXkmGeomDoodad( FILE * file, - Display * dpy, XkbGeometryPtr geom, XkbSectionPtr section) { @@ -745,7 +744,7 @@ int nRead=0; nRead+= XkmGetCountedString(file,buf,100); tmp= fread(&doodadWire,SIZEOF(xkmDoodadDesc),1,file); nRead+= SIZEOF(xkmDoodadDesc)*tmp; - doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(dpy,buf,False)); + doodad= XkbAddGeomDoodad(geom,section,XkbInternAtom(buf,False)); if (!doodad) return nRead; doodad->any.type= doodadWire.any.type; @@ -790,7 +789,6 @@ int nRead=0; static int ReadXkmGeomOverlay( FILE * file, - Display * dpy, XkbGeometryPtr geom, XkbSectionPtr section) { @@ -806,7 +804,7 @@ register int r; nRead+= XkmGetCountedString(file,buf,100); tmp= fread(&olWire,SIZEOF(xkmOverlayDesc),1,file); nRead+= tmp*SIZEOF(xkmOverlayDesc); - ol= XkbAddGeomOverlay(section,XkbInternAtom(dpy,buf,False), + ol= XkbAddGeomOverlay(section,XkbInternAtom(buf,False), olWire.num_rows); if (!ol) return nRead; @@ -833,7 +831,6 @@ register int r; static int ReadXkmGeomSection( FILE * file, - Display * dpy, XkbGeometryPtr geom) { register int i; @@ -845,7 +842,7 @@ char buf[100]; Atom nameAtom; nRead+= XkmGetCountedString(file,buf,100); - nameAtom= XkbInternAtom(dpy,buf,False); + nameAtom= XkbInternAtom(buf,False); tmp= fread(§ionWire,SIZEOF(xkmSectionDesc),1,file); nRead+= SIZEOF(xkmSectionDesc)*tmp; section= XkbAddGeomSection(geom,nameAtom,sectionWire.num_rows, @@ -896,7 +893,7 @@ Atom nameAtom; } if (sectionWire.num_doodads>0) { for (i=0;i0) { for (i=0;ixkb->geom; - geom->name= XkbInternAtom(result->xkb->dpy,buf,False); + geom->name= XkbInternAtom(buf,False); geom->width_mm= wireGeom.width_mm; geom->height_mm= wireGeom.height_mm; nRead+= XkmGetCountedString(file,buf,100); @@ -975,7 +972,7 @@ XkbGeometrySizesRec sizes; XkbOutlinePtr ol; xkmOutlineDesc olWire; nRead+= XkmGetCountedString(file,buf,100); - nameAtom= XkbInternAtom(result->xkb->dpy,buf,False); + nameAtom= XkbInternAtom(buf,False); tmp= fread(&shapeWire,SIZEOF(xkmShapeDesc),1,file); nRead+= tmp*SIZEOF(xkmShapeDesc); shape= XkbAddGeomShape(geom,nameAtom,shapeWire.num_outlines); @@ -1014,7 +1011,7 @@ XkbGeometrySizesRec sizes; } if (wireGeom.num_sections>0) { for (i=0;ixkb->dpy,geom); + tmp= ReadXkmGeomSection(file,geom); nRead+= tmp; if (tmp==0) return nRead; @@ -1022,7 +1019,7 @@ XkbGeometrySizesRec sizes; } if (wireGeom.num_doodads>0) { for (i=0;ixkb->dpy,geom,NULL); + tmp= ReadXkmGeomDoodad(file,geom,NULL); nRead+= tmp; if (tmp==0) return nRead; From ab79110a84b2d299ecae0605fa535edbebd99565 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sun, 3 Feb 2008 23:48:57 +1100 Subject: [PATCH 513/552] XKB: Remove support for pre-built keymaps Don't load prebuilt keymaps anymore. --- include/xkbsrv.h | 7 ---- xkb/ddxLoad.c | 83 +----------------------------------------------- xkb/maprules.c | 4 +-- xkb/xkb.c | 31 ++++++++---------- xkb/xkbInit.c | 21 ++---------- 5 files changed, 18 insertions(+), 128 deletions(-) diff --git a/include/xkbsrv.h b/include/xkbsrv.h index a71150462..60b0eb7e5 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -1022,13 +1022,6 @@ extern Bool XkbDDXApplyConfig( XkbSrvInfoPtr /* xkbi */ ); -extern void *XkbDDXPreloadConfig( - char ** /* rulesFileRtrn */, - XkbRF_VarDefsPtr /* defs */, - XkbComponentNamesPtr /* names */, - DeviceIntPtr /* dev */ -); - extern int _XkbStrCaseCmp( char * /* str1 */, char * /* str2 */ diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 60a8d443a..760119dc9 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -178,74 +178,6 @@ OutputDirectory( } } -static Bool -XkbDDXCompileNamedKeymap( XkbDescPtr xkb, - XkbComponentNamesPtr names, - char * nameRtrn, - int nameRtrnLen) -{ -char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; - - if (names->keymap==NULL) - return False; - strncpy(file,names->keymap,PATH_MAX); file[PATH_MAX-1]= '\0'; - if ((map= strrchr(file,'('))!=NULL) { - char *tmp; - if ((tmp= strrchr(map,')'))!=NULL) { - *map++= '\0'; - *tmp= '\0'; - } - else { - map= NULL; - } - } - if ((outFile= strrchr(file,'/'))!=NULL) - outFile= _XkbDupString(&outFile[1]); - else outFile= _XkbDupString(file); - XkbEnsureSafeMapName(outFile); - OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir)); - - if (XkbBaseDirectory!=NULL) { - char *xkbbasedir = XkbBaseDirectory; - char *xkbbindir = XkbBinDirectory; - - cmd = Xprintf("\"%s" PATHSEPARATOR "xkbcomp\" -w %d \"-R%s\" -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", - xkbbindir, - ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), - xkbbasedir,(map?"-m ":""),(map?map:""), - PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file, - xkm_output_dir,outFile); - } - else { - cmd = Xprintf("xkbcomp -w %d -xkm %s%s -em1 %s -emp %s -eml %s keymap/%s \"%s%s.xkm\"", - ((xkbDebugFlags<2)?1:((xkbDebugFlags>10)?10:(int)xkbDebugFlags)), - (map?"-m ":""),(map?map:""), - PRE_ERROR_MSG,ERROR_PREFIX,POST_ERROR_MSG1,file, - xkm_output_dir,outFile); - } - if (xkbDebugFlags) { - DebugF("XkbDDXCompileNamedKeymap compiling keymap using:\n"); - DebugF(" \"cmd\"\n"); - } - if (System(cmd)==0) { - if (nameRtrn) { - strncpy(nameRtrn,outFile,nameRtrnLen); - nameRtrn[nameRtrnLen-1]= '\0'; - } - if (outFile!=NULL) - _XkbFree(outFile); - if (cmd!=NULL) - xfree(cmd); - return True; - } - DebugF("Error compiling keymap (%s)\n",names->keymap); - if (outFile!=NULL) - _XkbFree(outFile); - if (cmd!=NULL) - xfree(cmd); - return False; -} - static Bool XkbDDXCompileKeymapByNames( XkbDescPtr xkb, XkbComponentNamesPtr names, @@ -418,20 +350,7 @@ unsigned missing; if ((names->keycodes==NULL)&&(names->types==NULL)&& (names->compat==NULL)&&(names->symbols==NULL)&& (names->geometry==NULL)) { - if (names->keymap==NULL) { - bzero(finfoRtrn,sizeof(XkbFileInfo)); - if (xkb && XkbDetermineFileType(finfoRtrn,XkbXKMFile,NULL) && - ((finfoRtrn->defined&need)==need) ) { - finfoRtrn->xkb= xkb; - nameRtrn[0]= '\0'; - return finfoRtrn->defined; - } - return 0; - } - else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) { - DebugF("Couldn't compile keymap file\n"); - return 0; - } + return 0; } else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, nameRtrn,nameRtrnLen)){ diff --git a/xkb/maprules.c b/xkb/maprules.c index 72e642fbe..4c947f004 100644 --- a/xkb/maprules.c +++ b/xkb/maprules.c @@ -459,7 +459,7 @@ Bool append = False; rule->types= _XkbDupString(tmp.name[TYPES]); rule->compat= _XkbDupString(tmp.name[COMPAT]); rule->geometry= _XkbDupString(tmp.name[GEOMETRY]); - rule->keymap= _XkbDupString(tmp.name[KEYMAP]); + rule->keymap= NULL; rule->layout_num = rule->variant_num = 0; for (i = 0; i < nread; i++) { @@ -589,7 +589,6 @@ XkbRF_ApplyRule( XkbRF_RulePtr rule, Apply(rule->types, &names->types); Apply(rule->compat, &names->compat); Apply(rule->geometry, &names->geometry); - Apply(rule->keymap, &names->keymap); } static Bool @@ -1279,7 +1278,6 @@ XkbRF_GroupPtr group; if (rule->types) _XkbFree(rule->types); if (rule->compat) _XkbFree(rule->compat); if (rule->geometry) _XkbFree(rule->geometry); - if (rule->keymap) _XkbFree(rule->keymap); bzero((char *)rule,sizeof(XkbRF_RuleRec)); } _XkbFree(rules->rules); diff --git a/xkb/xkb.c b/xkb/xkb.c index bd9a87cf5..ea5189f2c 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -5157,25 +5157,20 @@ ProcXkbGetKbdByName(ClientPtr client) if (stuff->load) fwant= XkbGBN_AllComponentsMask; else fwant= stuff->want|stuff->need; - if (!names.keymap) { - if ((!names.compat)&& - (fwant&(XkbGBN_CompatMapMask|XkbGBN_IndicatorMapMask))) { - names.compat= _XkbDupString("%"); - } - if ((!names.types)&&(fwant&(XkbGBN_TypesMask))) { - names.types= _XkbDupString("%"); - } - if ((!names.symbols)&&(fwant&XkbGBN_SymbolsMask)) { - names.symbols= _XkbDupString("%"); - } - geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0)); - if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) { - names.geometry= _XkbDupString("%"); - geom_changed= False; - } + if ((!names.compat)&& + (fwant&(XkbGBN_CompatMapMask|XkbGBN_IndicatorMapMask))) { + names.compat= _XkbDupString("%"); } - else { - geom_changed= True; + if ((!names.types)&&(fwant&(XkbGBN_TypesMask))) { + names.types= _XkbDupString("%"); + } + if ((!names.symbols)&&(fwant&XkbGBN_SymbolsMask)) { + names.symbols= _XkbDupString("%"); + } + geom_changed= ((names.geometry!=NULL)&&(strcmp(names.geometry,"%")!=0)); + if ((!names.geometry)&&(fwant&XkbGBN_GeometryMask)) { + names.geometry= _XkbDupString("%"); + geom_changed= False; } bzero(mapFile,PATH_MAX); diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 2ac51f26c..73dd32e35 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -591,7 +591,7 @@ XkbRF_VarDefsRec defs; * generation. Eventually they will be freed at the end of this * function. */ - if (names->keymap) names->keymap = _XkbDupString(names->keymap); + names->keymap = NULL; if (names->keycodes) names->keycodes = _XkbDupString(names->keycodes); if (names->types) names->types = _XkbDupString(names->types); if (names->compat) names->compat = _XkbDupString(names->compat); @@ -602,11 +602,6 @@ XkbRF_VarDefsRec defs; XkbComponentNamesRec rNames; bzero(&rNames,sizeof(XkbComponentNamesRec)); if (XkbDDXNamesFromRules(dev,rules,&defs,&rNames)) { - if (rNames.keymap) { - if (!names->keymap) - names->keymap = rNames.keymap; - else _XkbFree(rNames.keymap); - } if (rNames.keycodes) { if (!names->keycodes) names->keycodes = rNames.keycodes; @@ -637,16 +632,8 @@ XkbRF_VarDefsRec defs; } } - if (names->keymap) { - XkbComponentNamesRec tmpNames; - bzero(&tmpNames,sizeof(XkbComponentNamesRec)); - tmpNames.keymap = names->keymap; - ok = (Bool) XkbDDXLoadKeymapByNames(dev,&tmpNames,XkmAllIndicesMask,0, - &finfo,name,PATH_MAX); - } - if (!(ok && (finfo.xkb!=NULL))) - ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0, - &finfo,name,PATH_MAX); + ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0, + &finfo,name,PATH_MAX); if (ok && (finfo.xkb!=NULL)) { XkbDescPtr xkb; @@ -694,8 +681,6 @@ XkbRF_VarDefsRec defs; pSyms->map= NULL; } - if (names->keymap) _XkbFree(names->keymap); - names->keymap = NULL; if (names->keycodes) _XkbFree(names->keycodes); names->keycodes = NULL; if (names->types) _XkbFree(names->types); From 2d256f098ae05033ad76672d5ebdb9dfa7e6b995 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 16 Feb 2008 19:57:37 +0200 Subject: [PATCH 514/552] XKB: Always set size correctly in XkbCopyKeymap's geometry routines We were forgetting to set the sizes for sections and rows and a couple of other misc bits in XkbCopyKeymap's geometry. Sort that out, and add a couple of clarifying comments along the way. --- xkb/xkbUtils.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 28d66b38b..b3132701d 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -1506,10 +1506,12 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) /* properties */ if (src->geom->num_properties) { if (src->geom->num_properties != dst->geom->sz_properties) { + /* If we've got more properties in the destination than + * the source, run through and free all the excess ones + * first. */ if (src->geom->num_properties < dst->geom->sz_properties) { for (i = src->geom->num_properties, - dprop = dst->geom->properties + - src->geom->num_properties; + dprop = dst->geom->properties + i; i < dst->geom->num_properties; i++, dprop++) { xfree(dprop->name); @@ -1529,6 +1531,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) dst->geom->properties = tmp; } + /* We don't set num_properties as we need it to try and avoid + * too much reallocing. */ dst->geom->sz_properties = src->geom->num_properties; if (dst->geom->sz_properties > dst->geom->num_properties) { @@ -1564,6 +1568,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } } + /* ... which is already src->geom->num_properties. */ dst->geom->num_properties = dst->geom->sz_properties; } else { @@ -1587,8 +1592,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) if (src->geom->num_colors != dst->geom->sz_colors) { if (src->geom->num_colors < dst->geom->sz_colors) { for (i = src->geom->num_colors, - dcolor = dst->geom->colors + - src->geom->num_colors; + dcolor = dst->geom->colors + i; i < dst->geom->num_colors; i++, dcolor++) { xfree(dcolor->spec); @@ -1706,7 +1710,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) } doutline->num_points = soutline->num_points; - doutline->sz_points = soutline->sz_points; + doutline->sz_points = soutline->num_points; } } @@ -1785,6 +1789,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) memset(tmp, 0, src->geom->num_sections * sizeof(XkbSectionRec)); dst->geom->sections = tmp; dst->geom->num_sections = src->geom->num_sections; + dst->geom->sz_sections = src->geom->num_sections; for (i = 0, ssection = src->geom->sections, @@ -1798,6 +1803,8 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies) dsection->rows = tmp; } dsection->num_rows = ssection->num_rows; + dsection->sz_rows = ssection->num_rows; + for (j = 0, srow = ssection->rows, drow = dsection->rows; j < ssection->num_rows; j++, srow++, drow++) { From e5f002eddef1abe324033a3155f01d048536a48d Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 16 Feb 2008 20:00:47 +0200 Subject: [PATCH 515/552] XkbProcessOtherEvent: Don't depend on now-removed header We don't do XKBsrv.h anymore. --- xkb/xkbPrOtherEv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbPrOtherEv.c b/xkb/xkbPrOtherEv.c index d65107cdc..8017903be 100644 --- a/xkb/xkbPrOtherEv.c +++ b/xkb/xkbPrOtherEv.c @@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "misc.h" #include "inputstr.h" -#include +#include "xkbsrv.h" #include #include From fbd776894658e7afb2c55dc8582b2a3efab78a3c Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 16 Feb 2008 20:01:18 +0200 Subject: [PATCH 516/552] XKB: Ditch XkbFileInfo Sorry about the megacommit, but this touches on a lot of stuff. Get rid of XkbFileInfo, which was pretty seriously redundant, and move the only useful thing it had (defined) into XkbDescRec. defined will be removed pretty soon anyway. Is the compat map pointer non-NULL? Then you have a compat map, congratulations! Anyhow, I digress. All functions that took an XkbFileInfoPtr now take an XkbDescPtr, _except_ XkmReadFile, which returns an XkbDescPtr *, because people want to deal in XkbDescPtrs, not XkbDescRecs. --- include/xkbfile.h | 45 +++++-------- include/xkbsrv.h | 2 +- include/xkbstr.h | 1 + xkb/ddxLoad.c | 14 ++-- xkb/xkb.c | 89 +++++++++++++------------ xkb/xkbActions.c | 4 +- xkb/xkbInit.c | 157 +++++++++++++++++--------------------------- xkb/xkbfmisc.c | 98 ++-------------------------- xkb/xkbout.c | 46 +++++-------- xkb/xkmread.c | 161 ++++++---------------------------------------- 10 files changed, 175 insertions(+), 442 deletions(-) diff --git a/include/xkbfile.h b/include/xkbfile.h index e90d7668e..0a6cb18b9 100644 --- a/include/xkbfile.h +++ b/include/xkbfile.h @@ -37,15 +37,9 @@ #define XkbMapDefined (1<<0) #define XkbStateDefined (1<<1) -typedef struct _XkbFileInfo { - unsigned type; - unsigned defined; - XkbDescPtr xkb; -} XkbFileInfo,*XkbFileInfoPtr; - typedef void (*XkbFileAddOnFunc)( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, int /* fileSection */, @@ -277,12 +271,6 @@ extern unsigned XkbConvertXkbComponents( unsigned /* orig */ ); -extern Bool XkbDetermineFileType( - XkbFileInfo * /* xkb */, - int /* format */, - int * /* opts_missing */ -); - extern Bool XkbNameMatchesPattern( char * /* name */, char * /* pattern */ @@ -292,7 +280,7 @@ extern Bool XkbNameMatchesPattern( extern Bool XkbWriteXKBKeycodes( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, @@ -301,7 +289,7 @@ extern Bool XkbWriteXKBKeycodes( extern Bool XkbWriteXKBKeyTypes( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, @@ -310,7 +298,7 @@ extern Bool XkbWriteXKBKeyTypes( extern Bool XkbWriteXKBCompatMap( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, @@ -319,7 +307,7 @@ extern Bool XkbWriteXKBCompatMap( extern Bool XkbWriteXKBSymbols( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, @@ -328,7 +316,7 @@ extern Bool XkbWriteXKBSymbols( extern Bool XkbWriteXKBGeometry( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, @@ -337,7 +325,7 @@ extern Bool XkbWriteXKBGeometry( extern Bool XkbWriteXKBSemantics( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, @@ -346,7 +334,7 @@ extern Bool XkbWriteXKBSemantics( extern Bool XkbWriteXKBLayout( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, @@ -355,7 +343,7 @@ extern Bool XkbWriteXKBLayout( extern Bool XkbWriteXKBKeymap( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* topLevel */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, @@ -364,7 +352,7 @@ extern Bool XkbWriteXKBKeymap( extern Bool XkbWriteXKBFile( FILE * /* file */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, Bool /* showImplicit */, XkbFileAddOnFunc /* addOn */, void * /* priv */ @@ -373,16 +361,16 @@ extern Bool XkbWriteXKBFile( extern Bool XkbWriteCFile( FILE * /* file */, char * /* name */, - XkbFileInfo * /* info */ + XkbDescPtr /* info */ ); extern Bool XkbWriteXKMFile( FILE * /* file */, - XkbFileInfo * /* result */ + XkbDescPtr /* result */ ); extern Bool XkbWriteToServer( - XkbFileInfo * /* result */ + XkbDescPtr /* result */ ); extern void XkbEnsureSafeMapName( @@ -398,8 +386,7 @@ extern Bool XkbWriteXKBKeymapForNames( ); extern Status XkbMergeFile( - XkbDescPtr /* xkb */, - XkbFileInfo /* finfo */ + XkbDescPtr /* xkb */ ); /***====================================================================***/ @@ -412,7 +399,7 @@ extern unsigned XkmReadFile( FILE * /* file */, unsigned /* need */, unsigned /* want */, - XkbFileInfo * /* result */ + XkbDescPtr * /* result */ ); #ifdef _XKMFORMAT_H_ @@ -433,7 +420,7 @@ extern xkmSectionInfo *XkmFindTOCEntry( extern Bool XkmReadFileSection( FILE * /* file */, xkmSectionInfo * /* toc */, - XkbFileInfo * /* result */, + XkbDescPtr /* result */, unsigned * /* loaded_rtrn */ ); diff --git a/include/xkbsrv.h b/include/xkbsrv.h index 60b0eb7e5..ef99e94e7 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -1005,7 +1005,7 @@ extern unsigned int XkbDDXLoadKeymapByNames( XkbComponentNamesPtr /* names */, unsigned int /* want */, unsigned int /* need */, - XkbFileInfoPtr /* finfoRtrn */, + XkbDescPtr * /* finfoRtrn */, char * /* keymapNameRtrn */, int /* keymapNameRtrnLen */ ); diff --git a/include/xkbstr.h b/include/xkbstr.h index f390c611c..214a5543c 100644 --- a/include/xkbstr.h +++ b/include/xkbstr.h @@ -418,6 +418,7 @@ typedef struct _XkbGeometry *XkbGeometryPtr; * Tie it all together into one big keyboard description */ typedef struct _XkbDesc { + unsigned int defined; unsigned short flags; unsigned short device_spec; KeyCode min_key_code; diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 760119dc9..d80ce62b8 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -334,16 +334,16 @@ XkbDDXLoadKeymapByNames( DeviceIntPtr keybd, XkbComponentNamesPtr names, unsigned want, unsigned need, - XkbFileInfo * finfoRtrn, + XkbDescPtr * xkbRtrn, char * nameRtrn, int nameRtrnLen) { -XkbDescPtr xkb; +XkbDescPtr xkb; FILE * file; char fileName[PATH_MAX]; unsigned missing; - bzero(finfoRtrn,sizeof(XkbFileInfo)); + *xkbRtrn = NULL; if ((keybd==NULL)||(keybd->key==NULL)||(keybd->key->xkbInfo==NULL)) xkb= NULL; else xkb= keybd->key->xkbInfo->desc; @@ -353,7 +353,7 @@ unsigned missing; return 0; } else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, - nameRtrn,nameRtrnLen)){ + nameRtrn,nameRtrnLen)){ DebugF("Couldn't compile keymap file\n"); return 0; } @@ -362,15 +362,15 @@ unsigned missing; LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n",fileName); return 0; } - missing= XkmReadFile(file,need,want,finfoRtrn); - if (finfoRtrn->xkb==NULL) { + missing= XkmReadFile(file,need,want,xkbRtrn); + if (*xkbRtrn==NULL) { LogMessage(X_ERROR, "Error loading keymap %s\n",fileName); fclose(file); (void) unlink (fileName); return 0; } else if (xkbDebugFlags) { - DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,finfoRtrn->defined); + DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined); } fclose(file); (void) unlink (fileName); diff --git a/xkb/xkb.c b/xkb/xkb.c index ea5189f2c..b0d2f0d3d 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -5109,7 +5109,6 @@ ProcXkbGetKbdByName(ClientPtr client) { DeviceIntPtr dev; DeviceIntPtr tmpd; - XkbFileInfo finfo; xkbGetKbdByNameReply rep; xkbGetMapReply mrep; xkbGetCompatMapReply crep; @@ -5117,7 +5116,7 @@ ProcXkbGetKbdByName(ClientPtr client) xkbGetNamesReply nrep; xkbGetGeometryReply grep; XkbComponentNamesRec names; - XkbDescPtr xkb; + XkbDescPtr xkb, new; unsigned char * str; char mapFile[PATH_MAX]; unsigned len; @@ -5194,35 +5193,35 @@ ProcXkbGetKbdByName(ClientPtr client) } /* We pass dev in here so we can get the old names out if needed. */ - rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&finfo, + rep.found = XkbDDXLoadKeymapByNames(dev,&names,fwant,fneed,&new, mapFile,PATH_MAX); rep.newKeyboard= False; rep.pad1= rep.pad2= rep.pad3= rep.pad4= 0; stuff->want|= stuff->need; - if (finfo.xkb==NULL) + if (new==NULL) rep.reported= 0; else { if (stuff->load) rep.loaded= True; if (stuff->load || - ((rep.reported&XkbGBN_SymbolsMask) && (finfo.xkb->compat))) { + ((rep.reported&XkbGBN_SymbolsMask) && (new->compat))) { XkbChangesRec changes; bzero(&changes,sizeof(changes)); - XkbUpdateDescActions(finfo.xkb, - finfo.xkb->min_key_code,XkbNumKeys(finfo.xkb), + XkbUpdateDescActions(new, + new->min_key_code,XkbNumKeys(new), &changes); } - if (finfo.xkb->map==NULL) + if (new->map==NULL) rep.reported&= ~(XkbGBN_SymbolsMask|XkbGBN_TypesMask); else if (rep.reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask)) { mrep.type= X_Reply; mrep.deviceID = dev->id; mrep.sequenceNumber= client->sequence; mrep.length = ((SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2); - mrep.minKeyCode = finfo.xkb->min_key_code; - mrep.maxKeyCode = finfo.xkb->max_key_code; + mrep.minKeyCode = new->min_key_code; + mrep.maxKeyCode = new->max_key_code; mrep.present = 0; mrep.totalSyms = mrep.totalActs = mrep.totalKeyBehaviors= mrep.totalKeyExplicit= @@ -5230,7 +5229,7 @@ ProcXkbGetKbdByName(ClientPtr client) if (rep.reported&(XkbGBN_TypesMask|XkbGBN_ClientSymbolsMask)) { mrep.present|= XkbKeyTypesMask; mrep.firstType = 0; - mrep.nTypes = mrep.totalTypes= finfo.xkb->map->num_types; + mrep.nTypes = mrep.totalTypes= new->map->num_types; } else { mrep.firstType = mrep.nTypes= 0; @@ -5238,8 +5237,8 @@ ProcXkbGetKbdByName(ClientPtr client) } if (rep.reported&XkbGBN_ClientSymbolsMask) { mrep.present|= (XkbKeySymsMask|XkbModifierMapMask); - mrep.firstKeySym = mrep.firstModMapKey= finfo.xkb->min_key_code; - mrep.nKeySyms = mrep.nModMapKeys= XkbNumKeys(finfo.xkb); + mrep.firstKeySym = mrep.firstModMapKey= new->min_key_code; + mrep.nKeySyms = mrep.nModMapKeys= XkbNumKeys(new); } else { mrep.firstKeySym= mrep.firstModMapKey= 0; @@ -5249,9 +5248,9 @@ ProcXkbGetKbdByName(ClientPtr client) mrep.present|= XkbAllServerInfoMask; mrep.virtualMods= ~0; mrep.firstKeyAct = mrep.firstKeyBehavior = - mrep.firstKeyExplicit = finfo.xkb->min_key_code; + mrep.firstKeyExplicit = new->min_key_code; mrep.nKeyActs = mrep.nKeyBehaviors = - mrep.nKeyExplicit = XkbNumKeys(finfo.xkb); + mrep.nKeyExplicit = XkbNumKeys(new); } else { mrep.virtualMods= 0; @@ -5259,10 +5258,10 @@ ProcXkbGetKbdByName(ClientPtr client) mrep.firstKeyExplicit = 0; mrep.nKeyActs= mrep.nKeyBehaviors= mrep.nKeyExplicit= 0; } - XkbComputeGetMapReplySize(finfo.xkb,&mrep); + XkbComputeGetMapReplySize(new,&mrep); rep.length+= SIZEOF(xGenericReply)/4+mrep.length; } - if (finfo.xkb->compat==NULL) + if (new->compat==NULL) rep.reported&= ~XkbGBN_CompatMapMask; else if (rep.reported&XkbGBN_CompatMapMask) { crep.type= X_Reply; @@ -5271,11 +5270,11 @@ ProcXkbGetKbdByName(ClientPtr client) crep.length= 0; crep.groups= XkbAllGroupsMask; crep.firstSI= 0; - crep.nSI= crep.nTotalSI= finfo.xkb->compat->num_si; - XkbComputeGetCompatMapReplySize(finfo.xkb->compat,&crep); + crep.nSI= crep.nTotalSI= new->compat->num_si; + XkbComputeGetCompatMapReplySize(new->compat,&crep); rep.length+= SIZEOF(xGenericReply)/4+crep.length; } - if (finfo.xkb->indicators==NULL) + if (new->indicators==NULL) rep.reported&= ~XkbGBN_IndicatorMapMask; else if (rep.reported&XkbGBN_IndicatorMapMask) { irep.type= X_Reply; @@ -5283,28 +5282,28 @@ ProcXkbGetKbdByName(ClientPtr client) irep.sequenceNumber= client->sequence; irep.length= 0; irep.which= XkbAllIndicatorsMask; - XkbComputeGetIndicatorMapReplySize(finfo.xkb->indicators,&irep); + XkbComputeGetIndicatorMapReplySize(new->indicators,&irep); rep.length+= SIZEOF(xGenericReply)/4+irep.length; } - if (finfo.xkb->names==NULL) + if (new->names==NULL) rep.reported&= ~(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask); else if (rep.reported&(XkbGBN_OtherNamesMask|XkbGBN_KeyNamesMask)) { nrep.type= X_Reply; nrep.deviceID= dev->id; nrep.sequenceNumber= client->sequence; nrep.length= 0; - nrep.minKeyCode= finfo.xkb->min_key_code; - nrep.maxKeyCode= finfo.xkb->max_key_code; + nrep.minKeyCode= new->min_key_code; + nrep.maxKeyCode= new->max_key_code; if (rep.reported&XkbGBN_OtherNamesMask) { nrep.which= XkbAllNamesMask; - if (finfo.xkb->map!=NULL) - nrep.nTypes= finfo.xkb->map->num_types; + if (new->map!=NULL) + nrep.nTypes= new->map->num_types; else nrep.nTypes= 0; nrep.nKTLevels= 0; nrep.groupNames= XkbAllGroupsMask; nrep.virtualMods= XkbAllVirtualModsMask; nrep.indicators= XkbAllIndicatorsMask; - nrep.nRadioGroups= finfo.xkb->names->num_rg; + nrep.nRadioGroups= new->names->num_rg; } else { nrep.which= 0; @@ -5317,9 +5316,9 @@ ProcXkbGetKbdByName(ClientPtr client) } if (rep.reported&XkbGBN_KeyNamesMask) { nrep.which|= XkbKeyNamesMask; - nrep.firstKey= finfo.xkb->min_key_code; - nrep.nKeys= XkbNumKeys(finfo.xkb); - nrep.nKeyAliases= finfo.xkb->names->num_key_aliases; + nrep.firstKey= new->min_key_code; + nrep.nKeys= XkbNumKeys(new); + nrep.nKeyAliases= new->names->num_key_aliases; if (nrep.nKeyAliases) nrep.which|= XkbKeyAliasesMask; } @@ -5328,10 +5327,10 @@ ProcXkbGetKbdByName(ClientPtr client) nrep.firstKey= nrep.nKeys= 0; nrep.nKeyAliases= 0; } - XkbComputeGetNamesReplySize(finfo.xkb,&nrep); + XkbComputeGetNamesReplySize(new,&nrep); rep.length+= SIZEOF(xGenericReply)/4+nrep.length; } - if (finfo.xkb->geom==NULL) + if (new->geom==NULL) rep.reported&= ~XkbGBN_GeometryMask; else if (rep.reported&XkbGBN_GeometryMask) { grep.type= X_Reply; @@ -5344,7 +5343,7 @@ ProcXkbGetKbdByName(ClientPtr client) grep.nProperties= grep.nColors= grep.nShapes= 0; grep.nSections= grep.nDoodads= 0; grep.baseColorNdx= grep.labelColorNdx= 0; - XkbComputeGetGeometryReplySize(finfo.xkb->geom,&grep,None); + XkbComputeGetGeometryReplySize(new->geom,&grep,None); rep.length+= SIZEOF(xGenericReply)/4+grep.length; } } @@ -5359,23 +5358,23 @@ ProcXkbGetKbdByName(ClientPtr client) } WriteToClient(client,SIZEOF(xkbGetKbdByNameReply), (char *)&rep); if (reported&(XkbGBN_SymbolsMask|XkbGBN_TypesMask)) - XkbSendMap(client,finfo.xkb,&mrep); + XkbSendMap(client,new,&mrep); if (reported&XkbGBN_CompatMapMask) - XkbSendCompatMap(client,finfo.xkb->compat,&crep); + XkbSendCompatMap(client,new->compat,&crep); if (reported&XkbGBN_IndicatorMapMask) - XkbSendIndicatorMap(client,finfo.xkb->indicators,&irep); + XkbSendIndicatorMap(client,new->indicators,&irep); if (reported&(XkbGBN_KeyNamesMask|XkbGBN_OtherNamesMask)) - XkbSendNames(client,finfo.xkb,&nrep); + XkbSendNames(client,new,&nrep); if (reported&XkbGBN_GeometryMask) - XkbSendGeometry(client,finfo.xkb->geom,&grep,False); + XkbSendGeometry(client,new->geom,&grep,False); if (rep.loaded) { XkbDescPtr old_xkb; xkbNewKeyboardNotify nkn; int i,nG,nTG; old_xkb= xkb; - xkb= finfo.xkb; + xkb= new; dev->key->xkbInfo->desc= xkb; - finfo.xkb= old_xkb; /* so it'll get freed automatically */ + new= old_xkb; /* so it'll get freed automatically */ *xkb->ctrls= *old_xkb->ctrls; for (nG=nTG=0,i=xkb->min_key_code;i<=xkb->max_key_code;i++) { @@ -5419,8 +5418,8 @@ ProcXkbGetKbdByName(ClientPtr client) /* this should be either a MN or an NKN, depending on whether or not * the keycode range changed? */ nkn.deviceID= nkn.oldDeviceID= dev->id; - nkn.minKeyCode= finfo.xkb->min_key_code; - nkn.maxKeyCode= finfo.xkb->max_key_code; + nkn.minKeyCode= new->min_key_code; + nkn.maxKeyCode= new->max_key_code; nkn.oldMinKeyCode= xkb->min_key_code; nkn.oldMaxKeyCode= xkb->max_key_code; nkn.requestMajor= XkbReqCode; @@ -5430,9 +5429,9 @@ ProcXkbGetKbdByName(ClientPtr client) nkn.changed|= XkbNKN_GeometryMask; XkbSendNewKeyboardNotify(dev,&nkn); } - if ((finfo.xkb!=NULL)&&(finfo.xkb!=xkb)) { - XkbFreeKeyboard(finfo.xkb,XkbAllComponentsMask,True); - finfo.xkb= NULL; + if ((new!=NULL)&&(new!=xkb)) { + XkbFreeKeyboard(new,XkbAllComponentsMask,True); + new= NULL; } if (names.keymap) { _XkbFree(names.keymap); names.keymap= NULL; } if (names.keycodes) { _XkbFree(names.keycodes); names.keycodes= NULL; } diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 2aacc8ca6..890cf4250 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -843,7 +843,7 @@ _XkbFilterRedirectKey( XkbSrvInfoPtr xkbi, unsigned keycode, XkbAction * pAction) { -unsigned realMods; +unsigned realMods = 0; xEvent ev; int x,y; XkbStateRec old; @@ -1145,7 +1145,7 @@ void XkbHandleActions(DeviceIntPtr dev,DeviceIntPtr kbd,xEvent *xE,int count) { int key,bit,i; -CARD8 realMods; +CARD8 realMods = 0; XkbSrvInfoPtr xkbi; KeyClassPtr keyc; int changed,sendEvent; diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 73dd32e35..37dd94019 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -88,7 +88,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. typedef struct _SrvXkmInfo { DeviceIntPtr dev; FILE * file; - XkbFileInfo xkbinfo; + XkbDescPtr xkb; } SrvXkmInfo; @@ -125,7 +125,6 @@ typedef struct _SrvXkmInfo { char * XkbBaseDirectory= XKB_BASE_DIRECTORY; char * XkbBinDirectory= XKB_BIN_DIRECTORY; static int XkbWantAccessX= 0; -static XkbFileInfo * _XkbInitFileInfo= NULL; static Bool rulesDefined= False; static char * XkbRulesFile= NULL; @@ -283,10 +282,8 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout, #include "xkbDflts.h" static Bool -XkbInitKeyTypes(XkbDescPtr xkb,SrvXkmInfo *file) +XkbInitKeyTypes(XkbDescPtr xkb) { - if (file->xkbinfo.defined&XkmTypesMask) - return True; initTypeNames(NULL); if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_dflt_types)!=Success) return False; @@ -299,7 +296,7 @@ XkbInitKeyTypes(XkbDescPtr xkb,SrvXkmInfo *file) } static void -XkbInitRadioGroups(XkbSrvInfoPtr xkbi,SrvXkmInfo *file) +XkbInitRadioGroups(XkbSrvInfoPtr xkbi) { xkbi->nRadioGroups = 0; xkbi->radioGroups = NULL; @@ -308,13 +305,11 @@ XkbInitRadioGroups(XkbSrvInfoPtr xkbi,SrvXkmInfo *file) static Status -XkbInitCompatStructs(XkbDescPtr xkb,SrvXkmInfo *file) +XkbInitCompatStructs(XkbDescPtr xkb) { register int i; XkbCompatMapPtr compat; - if (file->xkbinfo.defined&XkmCompatMapMask) - return Success; if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_dfltSI)!=Success) return BadAlloc; compat = xkb->compat; @@ -335,17 +330,17 @@ XkbCompatMapPtr compat; } static void -XkbInitSemantics(XkbDescPtr xkb,SrvXkmInfo *file) +XkbInitSemantics(XkbDescPtr xkb) { - XkbInitKeyTypes(xkb,file); - XkbInitCompatStructs(xkb,file); + XkbInitKeyTypes(xkb); + XkbInitCompatStructs(xkb); return; } /***====================================================================***/ static Status -XkbInitNames(XkbSrvInfoPtr xkbi,SrvXkmInfo *file) +XkbInitNames(XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbNamesPtr names; @@ -363,29 +358,25 @@ Atom unknown; if (names->symbols==None) names->symbols= unknown; if (names->types==None) names->types= unknown; if (names->compat==None) names->compat= unknown; - if ((file->xkbinfo.defined&XkmVirtualModsMask)==0) { - if (names->vmods[vmod_NumLock]==None) - names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock"); - if (names->vmods[vmod_Alt]==None) - names->vmods[vmod_Alt]= CREATE_ATOM("Alt"); - if (names->vmods[vmod_AltGr]==None) - names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch"); - } + if (names->vmods[vmod_NumLock]==None) + names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock"); + if (names->vmods[vmod_Alt]==None) + names->vmods[vmod_Alt]= CREATE_ATOM("Alt"); + if (names->vmods[vmod_AltGr]==None) + names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch"); - if (((file->xkbinfo.defined&XkmIndicatorsMask)==0)|| - ((file->xkbinfo.defined&XkmGeometryMask)==0)) { - initIndicatorNames(NULL,xkb); - if (names->indicators[LED_CAPS-1]==None) - names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock"); - if (names->indicators[LED_NUM-1]==None) - names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock"); - if (names->indicators[LED_SCROLL-1]==None) - names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock"); + initIndicatorNames(NULL,xkb); + if (names->indicators[LED_CAPS-1]==None) + names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock"); + if (names->indicators[LED_NUM-1]==None) + names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock"); + if (names->indicators[LED_SCROLL-1]==None) + names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock"); #ifdef LED_COMPOSE - if (names->indicators[LED_COMPOSE-1]==None) - names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose"); + if (names->indicators[LED_COMPOSE-1]==None) + names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose"); #endif - } + if (xkb->geom!=NULL) names->geometry= xkb->geom->name; else names->geometry= unknown; @@ -393,7 +384,7 @@ Atom unknown; } static Status -XkbInitIndicatorMap(XkbSrvInfoPtr xkbi,SrvXkmInfo *file) +XkbInitIndicatorMap(XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbIndicatorPtr map; @@ -402,27 +393,24 @@ XkbSrvLedInfoPtr sli; xkb= xkbi->desc; if (XkbAllocIndicatorMaps(xkb)!=Success) return BadAlloc; - if ((file->xkbinfo.defined&XkmIndicatorsMask)==0) { - map= xkb->indicators; - map->phys_indicators = PHYS_LEDS; - map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit; - map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked; - map->maps[LED_CAPS-1].mods.mask= LockMask; - map->maps[LED_CAPS-1].mods.real_mods= LockMask; + map= xkb->indicators; + map->phys_indicators = PHYS_LEDS; + map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit; + map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked; + map->maps[LED_CAPS-1].mods.mask= LockMask; + map->maps[LED_CAPS-1].mods.real_mods= LockMask; - map->maps[LED_NUM-1].flags= XkbIM_NoExplicit; - map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked; - map->maps[LED_NUM-1].mods.mask= 0; - map->maps[LED_NUM-1].mods.real_mods= 0; - map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask; + map->maps[LED_NUM-1].flags= XkbIM_NoExplicit; + map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked; + map->maps[LED_NUM-1].mods.mask= 0; + map->maps[LED_NUM-1].mods.real_mods= 0; + map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask; + + map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit; + map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked; + map->maps[LED_SCROLL-1].mods.mask= Mod3Mask; + map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask; -/* Metro Link */ - map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit; - map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked; - map->maps[LED_SCROLL-1].mods.mask= Mod3Mask; - map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask; -/* Metro Link */ - } sli= XkbFindSrvLedInfo(xkbi->device,XkbDfltXIClass,XkbDfltXIId,0); if (sli) XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask); @@ -430,7 +418,7 @@ XkbSrvLedInfoPtr sli; } static Status -XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi,SrvXkmInfo *file) +XkbInitControls(DeviceIntPtr pXDev,XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbControlsPtr ctrls; @@ -440,8 +428,7 @@ XkbControlsPtr ctrls; if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success) FatalError("Couldn't allocate keyboard controls\n"); ctrls= xkb->ctrls; - if ((file->xkbinfo.defined&XkmSymbolsMask)==0) - ctrls->num_groups = 1; + ctrls->num_groups = 1; ctrls->groups_wrap = XkbSetGroupInfo(1,XkbWrapIntoRange,0); ctrls->internal.mask = 0; ctrls->internal.real_mods = 0; @@ -464,29 +451,18 @@ XkbInitDevice(DeviceIntPtr pXDev) int i; XkbSrvInfoPtr xkbi; XkbChangesRec changes; -SrvXkmInfo file; unsigned check; XkbEventCauseRec cause; - file.dev= pXDev; - file.file=NULL; - bzero(&file.xkbinfo,sizeof(XkbFileInfo)); bzero(&changes,sizeof(XkbChangesRec)); pXDev->key->xkbInfo= xkbi= _XkbTypedCalloc(1,XkbSrvInfoRec); if ( xkbi ) { XkbDescPtr xkb; - if ((_XkbInitFileInfo!=NULL)&&(_XkbInitFileInfo->xkb!=NULL)) { - file.xkbinfo= *_XkbInitFileInfo; - xkbi->desc= _XkbInitFileInfo->xkb; - _XkbInitFileInfo= NULL; - } - else { - xkbi->desc= XkbAllocKeyboard(); - if (!xkbi->desc) - FatalError("Couldn't allocate keyboard description\n"); - xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode; - xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode; - } + xkbi->desc= XkbAllocKeyboard(); + if (!xkbi->desc) + FatalError("Couldn't allocate keyboard description\n"); + xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode; + xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode; xkb= xkbi->desc; if (xkb->min_key_code == 0) xkb->min_key_code = pXDev->key->curKeySyms.minKeyCode; @@ -509,32 +485,23 @@ XkbEventCauseRec cause; xkbi->dfltPtrDelta=1; xkbi->device = pXDev; - file.xkbinfo.xkb= xkb; - XkbInitSemantics(xkb,&file); - XkbInitNames(xkbi,&file); - XkbInitRadioGroups(xkbi,&file); + XkbInitSemantics(xkb); + XkbInitNames(xkbi); + XkbInitRadioGroups(xkbi); /* 12/31/94 (ef) -- XXX! Should check if state loaded from file */ bzero(&xkbi->state,sizeof(XkbStateRec)); - XkbInitControls(pXDev,xkbi,&file); + XkbInitControls(pXDev,xkbi); - if (file.xkbinfo.defined&XkmSymbolsMask) - memcpy(pXDev->key->modifierMap,xkb->map->modmap,xkb->max_key_code+1); - else - memcpy(xkb->map->modmap,pXDev->key->modifierMap,xkb->max_key_code+1); + memcpy(xkb->map->modmap,pXDev->key->modifierMap,xkb->max_key_code+1); - XkbInitIndicatorMap(xkbi,&file); + XkbInitIndicatorMap(xkbi); XkbDDXInitDevice(pXDev); - if (!(file.xkbinfo.defined&XkmSymbolsMask)) { - XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb), - &changes); - } - else { - XkbUpdateCoreDescription(pXDev,True); - } + XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb), + &changes); XkbSetCauseUnknown(&cause); XkbUpdateActions(pXDev,xkb->min_key_code, XkbNumKeys(xkb),&changes, &check,&cause); @@ -546,8 +513,6 @@ XkbEventCauseRec cause; pXDev->key->curKeySyms.minKeyCode = xkb->min_key_code; pXDev->key->curKeySyms.maxKeyCode = xkb->max_key_code; } - if (file.file!=NULL) - fclose(file.file); return; } @@ -571,12 +536,12 @@ XkbInitKeyboardDeviceStruct( DeviceIntPtr /*device*/, KeybdCtrl * /*ctrl*/)) { -XkbFileInfo finfo; KeySymsRec tmpSyms,*pSyms; CARD8 tmpMods[XkbMaxLegalKeyCode+1],*pMods; char name[PATH_MAX],*rules; Bool ok=False; XkbRF_VarDefsRec defs; +XkbDescPtr xkb; if ((dev->key!=NULL)||(dev->kbdfeed!=NULL)) return False; @@ -633,13 +598,11 @@ XkbRF_VarDefsRec defs; } ok = (Bool) XkbDDXLoadKeymapByNames(dev,names,XkmAllIndicesMask,0, - &finfo,name,PATH_MAX); + &xkb,name,PATH_MAX); - if (ok && (finfo.xkb!=NULL)) { - XkbDescPtr xkb; + if (ok && (xkb!=NULL)) { KeyCode minKC,maxKC; - xkb= finfo.xkb; minKC= xkb->min_key_code; maxKC= xkb->max_key_code; if (XkbIsLegalKeycode(minKC)&&XkbIsLegalKeycode(maxKC)&&(minKC<=maxKC)&& @@ -669,13 +632,11 @@ XkbRF_VarDefsRec defs; pMods= tmpMods; } } - _XkbInitFileInfo= &finfo; } else { LogMessage(X_WARNING, "Couldn't load XKB keymap, falling back to pre-XKB keymap\n"); } ok= InitKeyboardDeviceStruct((DevicePtr)dev,pSyms,pMods,bellProc,ctrlProc); - _XkbInitFileInfo= NULL; if ((pSyms==&tmpSyms)&&(pSyms->map!=NULL)) { _XkbFree(pSyms->map); pSyms->map= NULL; diff --git a/xkb/xkbfmisc.c b/xkb/xkbfmisc.c index 4182c3a34..866b4b154 100644 --- a/xkb/xkbfmisc.c +++ b/xkb/xkbfmisc.c @@ -146,7 +146,7 @@ XkbWriteSectionFromName(FILE *file,char *sectionName,char *name) /* ARGSUSED */ static void _AddIncl( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, int index, @@ -169,9 +169,6 @@ unsigned complete; XkbNamesPtr old_names; int multi_section; unsigned wantNames,wantConfig,wantDflts; -XkbFileInfo finfo; - - bzero(&finfo,sizeof(XkbFileInfo)); complete= 0; if ((name=names->keymap)==NULL) name= "default"; @@ -187,14 +184,8 @@ XkbFileInfo finfo; if (want==0) return False; - if (xkb!=NULL) { + if (xkb!=NULL) old_names= xkb->names; - finfo.type= 0; - finfo.defined= 0; - finfo.xkb= xkb; - if (!XkbDetermineFileType(&finfo,XkbXKBFile,NULL)) - return False; - } else old_names= NULL; wantConfig= want&(~complete); @@ -304,7 +295,7 @@ XkbFileInfo finfo; wantNames= complete&(~(wantConfig|wantDflts)); name= names->keycodes; if (wantConfig&XkmKeyNamesMask) - XkbWriteXKBKeycodes(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBKeycodes(file,xkb,False,False,_AddIncl,name); else if (wantDflts&XkmKeyNamesMask) fprintf(stderr,"Default symbols not implemented yet!\n"); else if (wantNames&XkmKeyNamesMask) @@ -312,7 +303,7 @@ XkbFileInfo finfo; name= names->types; if (wantConfig&XkmTypesMask) - XkbWriteXKBKeyTypes(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBKeyTypes(file,xkb,False,False,_AddIncl,name); else if (wantDflts&XkmTypesMask) fprintf(stderr,"Default types not implemented yet!\n"); else if (wantNames&XkmTypesMask) @@ -320,7 +311,7 @@ XkbFileInfo finfo; name= names->compat; if (wantConfig&XkmCompatMapMask) - XkbWriteXKBCompatMap(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBCompatMap(file,xkb,False,False,_AddIncl,name); else if (wantDflts&XkmCompatMapMask) fprintf(stderr,"Default interps not implemented yet!\n"); else if (wantNames&XkmCompatMapMask) @@ -328,13 +319,13 @@ XkbFileInfo finfo; name= names->symbols; if (wantConfig&XkmSymbolsMask) - XkbWriteXKBSymbols(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBSymbols(file,xkb,False,False,_AddIncl,name); else if (wantNames&XkmSymbolsMask) XkbWriteSectionFromName(file,"symbols",name); name= names->geometry; if (wantConfig&XkmGeometryMask) - XkbWriteXKBGeometry(file,&finfo,False,False,_AddIncl,name); + XkbWriteXKBGeometry(file,xkb,False,False,_AddIncl,name); else if (wantNames&XkmGeometryMask) XkbWriteSectionFromName(file,"geometry",name); @@ -404,81 +395,6 @@ unsigned rtrn; return rtrn; } -Bool -XkbDetermineFileType(XkbFileInfoPtr finfo,int format,int *opts_missing) -{ -unsigned present; -XkbDescPtr xkb; - - if ((!finfo)||(!finfo->xkb)) - return False; - if (opts_missing) - *opts_missing= 0; - xkb= finfo->xkb; - present= 0; - if ((xkb->names)&&(xkb->names->keys)) present|= XkmKeyNamesMask; - if ((xkb->map)&&(xkb->map->types)) present|= XkmTypesMask; - if (xkb->compat) present|= XkmCompatMapMask; - if ((xkb->map)&&(xkb->map->num_syms>1)) present|= XkmSymbolsMask; - if (xkb->indicators) present|= XkmIndicatorsMask; - if (xkb->geom) present|= XkmGeometryMask; - if (!present) - return False; - else switch (present) { - case XkmKeyNamesMask: - finfo->type= XkmKeyNamesIndex; - finfo->defined= present; - return True; - case XkmTypesMask: - finfo->type= XkmTypesIndex; - finfo->defined= present; - return True; - case XkmCompatMapMask: - finfo->type= XkmCompatMapIndex; - finfo->defined= present; - return True; - case XkmSymbolsMask: - if (format!=XkbXKMFile) { - finfo->type= XkmSymbolsIndex; - finfo->defined= present; - return True; - } - break; - case XkmGeometryMask: - finfo->type= XkmGeometryIndex; - finfo->defined= present; - return True; - } - if ((present&(~XkmSemanticsLegal))==0) { - if ((XkmSemanticsRequired&present)==XkmSemanticsRequired) { - if (opts_missing) - *opts_missing= XkmSemanticsOptional&(~present); - finfo->type= XkmSemanticsFile; - finfo->defined= present; - return True; - } - } - else if ((present&(~XkmLayoutLegal))==0) { - if ((XkmLayoutRequired&present)==XkmLayoutRequired) { - if (opts_missing) - *opts_missing= XkmLayoutOptional&(~present); - finfo->type= XkmLayoutFile; - finfo->defined= present; - return True; - } - } - else if ((present&(~XkmKeymapLegal))==0) { - if ((XkmKeymapRequired&present)==XkmKeymapRequired) { - if (opts_missing) - *opts_missing= XkmKeymapOptional&(~present); - finfo->type= XkmKeymapFile; - finfo->defined= present; - return True; - } - } - return False; -} - /* all latin-1 alphanumerics, plus parens, slash, minus, underscore and */ /* wildcards */ diff --git a/xkb/xkbout.c b/xkb/xkbout.c index b72c05c60..229cc9258 100644 --- a/xkb/xkbout.c +++ b/xkb/xkbout.c @@ -90,9 +90,9 @@ Atom * vmodNames; /***====================================================================***/ static Bool -WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action) +WriteXKBAction(FILE *file,XkbDescPtr xkb,XkbAnyAction *action) { - fprintf(file,"%s",XkbActionText(result->xkb,(XkbAction *)action,XkbXKBFile)); + fprintf(file,"%s",XkbActionText(xkb,(XkbAction *)action,XkbXKBFile)); return True; } @@ -100,7 +100,7 @@ WriteXKBAction(FILE *file,XkbFileInfo *result,XkbAnyAction *action) Bool XkbWriteXKBKeycodes( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, @@ -108,10 +108,8 @@ XkbWriteXKBKeycodes( FILE * file, { Atom kcName; register unsigned i; -XkbDescPtr xkb; char * alternate; - xkb= result->xkb; if ((!xkb)||(!xkb->names)||(!xkb->names->keys)) { _XkbLibError(_XkbErrMissingNames,"XkbWriteXKBKeycodes",0); return False; @@ -155,14 +153,14 @@ char * alternate; } } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmKeyNamesIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmKeyNamesIndex,priv); fprintf(file,"};\n\n"); return True; } Bool XkbWriteXKBKeyTypes( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, @@ -171,9 +169,7 @@ XkbWriteXKBKeyTypes( FILE * file, register unsigned i,n; XkbKeyTypePtr type; XkbKTMapEntryPtr entry; -XkbDescPtr xkb; - xkb= result->xkb; if ((!xkb)||(!xkb->map)||(!xkb->map->types)) { _XkbLibError(_XkbErrMissingTypes,"XkbWriteXKBKeyTypes",0); return False; @@ -223,22 +219,20 @@ XkbDescPtr xkb; fprintf(file," };\n"); } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmTypesIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmTypesIndex,priv); fprintf(file,"};\n\n"); return True; } static Bool WriteXKBIndicatorMap( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Atom name, XkbIndicatorMapPtr led, XkbFileAddOnFunc addOn, void * priv) { -XkbDescPtr xkb; - xkb= result->xkb; fprintf(file," indicator \"%s\" {\n",XkbAtomGetString(name)); if (led->flags&XkbIM_NoExplicit) fprintf(file," !allowExplicit;\n"); @@ -266,14 +260,14 @@ XkbDescPtr xkb; XkbControlsMaskText(led->ctrls,XkbXKBFile)); } if (addOn) - (*addOn)(file,result,False,True,XkmIndicatorsIndex,priv); + (*addOn)(file,xkb,False,True,XkmIndicatorsIndex,priv); fprintf(file," };\n"); return True; } Bool XkbWriteXKBCompatMap( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, @@ -281,9 +275,7 @@ XkbWriteXKBCompatMap( FILE * file, { register unsigned i; XkbSymInterpretPtr interp; -XkbDescPtr xkb; - xkb= result->xkb; if ((!xkb)||(!xkb->compat)||(!xkb->compat->sym_interpret)) { _XkbLibError(_XkbErrMissingCompatMap,"XkbWriteXKBCompatMap",0); return False; @@ -316,7 +308,7 @@ XkbDescPtr xkb; if (interp->flags&XkbSI_AutoRepeat) fprintf(file," repeat= True;\n"); fprintf(file," action= "); - WriteXKBAction(file,result,&interp->act); + WriteXKBAction(file,xkb,&interp->act); fprintf(file,";\n"); fprintf(file," };\n"); } @@ -337,32 +329,30 @@ XkbDescPtr xkb; (map->which_mods!=0)|| (map->mods.real_mods!=0)||(map->mods.vmods!=0)|| (map->ctrls!=0)) { - WriteXKBIndicatorMap(file,result,xkb->names->indicators[i],map, + WriteXKBIndicatorMap(file,xkb,xkb->names->indicators[i],map, addOn,priv); } } } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmCompatMapIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmCompatMapIndex,priv); fprintf(file,"};\n\n"); return True; } Bool XkbWriteXKBSymbols( FILE * file, - XkbFileInfo * result, + XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void * priv) { register unsigned i,tmp; -XkbDescPtr xkb; XkbClientMapPtr map; XkbServerMapPtr srv; Bool showActions; - xkb= result->xkb; map= xkb->map; srv= xkb->server; if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) { @@ -517,7 +507,7 @@ Bool showActions; for (s=0;sxkb; if ((!xkb)||(!xkb->geom)) { _XkbLibError(_XkbErrMissingGeometry,"XkbWriteXKBGeometry",0); return False; @@ -901,7 +889,7 @@ XkbGeometryPtr geom; } } if (addOn) - (*addOn)(file,result,topLevel,showImplicit,XkmGeometryIndex,priv); + (*addOn)(file,xkb,topLevel,showImplicit,XkmGeometryIndex,priv); fprintf(file,"};\n\n"); return True; } diff --git a/xkb/xkmread.c b/xkb/xkmread.c index 1e5b2cb4e..b14a5beda 100644 --- a/xkb/xkmread.c +++ b/xkb/xkmread.c @@ -165,14 +165,12 @@ int count,nRead=0; /***====================================================================***/ static int -ReadXkmVirtualMods(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmVirtualMods(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register unsigned int i,bit; unsigned int bound,named,tmp; int nRead=0; -XkbDescPtr xkb; - xkb= result->xkb; if (XkbAllocServerMap(xkb,XkbVirtualModsMask,0)!=Success) { _XkbLibError(_XkbErrBadAlloc,"ReadXkmVirtualMods",0); return -1; @@ -209,16 +207,14 @@ XkbDescPtr xkb; /***====================================================================***/ static int -ReadXkmKeycodes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmKeycodes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register int i; unsigned minKC,maxKC,nAl; int nRead=0; char name[100]; XkbKeyNamePtr pN; -XkbDescPtr xkb; - xkb= result->xkb; name[0]= '\0'; nRead+= XkmGetCountedString(file,name,100); minKC= XkmGetCARD8(file,&nRead); @@ -276,7 +272,7 @@ XkbDescPtr xkb; /***====================================================================***/ static int -ReadXkmKeyTypes(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmKeyTypes(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register unsigned i,n; unsigned num_types; @@ -287,9 +283,7 @@ xkmKeyTypeDesc wire; XkbKTMapEntryPtr entry; xkmKTMapEntryDesc wire_entry; char buf[100]; -XkbDescPtr xkb; - xkb= result->xkb; if ((tmp= XkmGetCountedString(file,buf,100))<1) { _XkbLibError(_XkbErrBadLength,"ReadXkmKeyTypes",0); return -1; @@ -414,7 +408,7 @@ XkbDescPtr xkb; /***====================================================================***/ static int -ReadXkmCompatMap(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmCompatMap(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register int i; unsigned num_si,groups; @@ -423,10 +417,8 @@ XkbSymInterpretPtr interp; xkmSymInterpretDesc wire; unsigned tmp; int nRead=0; -XkbDescPtr xkb; XkbCompatMapPtr compat; - xkb= result->xkb; if ((tmp= XkmGetCountedString(file,name,100))<1) { _XkbLibError(_XkbErrBadLength,"ReadXkmCompatMap",0); return -1; @@ -492,16 +484,14 @@ XkbCompatMapPtr compat; } static int -ReadXkmIndicators(FILE *file,XkbFileInfo *result,XkbChangesPtr changes) +ReadXkmIndicators(FILE *file,XkbDescPtr xkb,XkbChangesPtr changes) { register unsigned nLEDs; xkmIndicatorMapDesc wire; char buf[100]; unsigned tmp; int nRead=0; -XkbDescPtr xkb; - xkb= result->xkb; if ((xkb->indicators==NULL)&&(XkbAllocIndicatorMaps(xkb)!=Success)) { _XkbLibError(_XkbErrBadAlloc,"indicator rec",0); return -1; @@ -575,16 +565,14 @@ FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms) } static int -ReadXkmSymbols(FILE *file,XkbFileInfo *result) +ReadXkmSymbols(FILE *file,XkbDescPtr xkb) { register int i,g,s,totalVModMaps; xkmKeySymMapDesc wireMap; char buf[100]; unsigned minKC,maxKC,groupNames,tmp; int nRead=0; -XkbDescPtr xkb; - xkb= result->xkb; if ((tmp=XkmGetCountedString(file,buf,100))<1) return -1; nRead+= tmp; @@ -911,7 +899,7 @@ Atom nameAtom; } static int -ReadXkmGeometry(FILE *file,XkbFileInfo *result) +ReadXkmGeometry(FILE *file,XkbDescPtr xkb) { register int i; char buf[100]; @@ -931,11 +919,11 @@ XkbGeometrySizesRec sizes; sizes.num_sections= wireGeom.num_sections; sizes.num_doodads= wireGeom.num_doodads; sizes.num_key_aliases= wireGeom.num_key_aliases; - if (XkbAllocGeometry(result->xkb,&sizes)!=Success) { + if (XkbAllocGeometry(xkb,&sizes)!=Success) { _XkbLibError(_XkbErrBadAlloc,"ReadXkmGeometry",0); return nRead; } - geom= result->xkb->geom; + geom= xkb->geom; geom->name= XkbInternAtom(buf,False); geom->width_mm= wireGeom.width_mm; geom->height_mm= wireGeom.height_mm; @@ -1055,7 +1043,7 @@ int nRead=0; return 1; } -Bool +static Bool XkmReadTOC(FILE *file,xkmFileInfo* file_info,int max_toc,xkmSectionInfo *toc) { unsigned hdr,tmp; @@ -1086,117 +1074,11 @@ unsigned i,size_toc; return 1; } -Bool -XkmReadFileSection( FILE * file, - xkmSectionInfo * toc, - XkbFileInfo * result, - unsigned * loaded_rtrn) -{ -xkmSectionInfo tmpTOC; -int nRead; - - if ((!result)||(!result->xkb)) { - _XkbLibError(_XkbErrBadMatch,"XkmReadFileSection",0); - return 0; - } - fseek(file,toc->offset,SEEK_SET); - fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file); - nRead= SIZEOF(xkmSectionInfo); - if ((tmpTOC.type!=toc->type)||(tmpTOC.format!=toc->format)|| - (tmpTOC.size!=toc->size)||(tmpTOC.offset!=toc->offset)) { - _XkbLibError(_XkbErrIllegalContents,"XkmReadFileSection",0); - return 0; - } - switch (tmpTOC.type) { - case XkmVirtualModsIndex: - nRead+= ReadXkmVirtualMods(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmVirtualModsMask; - break; - case XkmTypesIndex: - nRead+= ReadXkmKeyTypes(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmTypesMask; - break; - case XkmCompatMapIndex: - nRead+= ReadXkmCompatMap(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmCompatMapMask; - break; - case XkmKeyNamesIndex: - nRead+= ReadXkmKeycodes(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmKeyNamesMask; - break; - case XkmSymbolsIndex: - nRead+= ReadXkmSymbols(file,result); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmSymbolsMask; - break; - case XkmIndicatorsIndex: - nRead+= ReadXkmIndicators(file,result,NULL); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmIndicatorsMask; - break; - case XkmGeometryIndex: - nRead+= ReadXkmGeometry(file,result); - if ((loaded_rtrn)&&(nRead>=0)) - *loaded_rtrn|= XkmGeometryMask; - break; - default: - _XkbLibError(_XkbErrBadImplementation, - XkbConfigText(tmpTOC.type,XkbMessage),0); - nRead= 0; - break; - } - if (nRead!=tmpTOC.size) { - _XkbLibError(_XkbErrBadLength,XkbConfigText(tmpTOC.type,XkbMessage), - nRead-tmpTOC.size); - return 0; - } - return (nRead>=0); -} - -char * -XkmReadFileSectionName(FILE *file,xkmSectionInfo *toc) -{ -xkmSectionInfo tmpTOC; -char name[100]; - - if ((!file)||(!toc)) - return 0; - switch (toc->type) { - case XkmVirtualModsIndex: - case XkmIndicatorsIndex: - break; - case XkmTypesIndex: - case XkmCompatMapIndex: - case XkmKeyNamesIndex: - case XkmSymbolsIndex: - case XkmGeometryIndex: - fseek(file,toc->offset,SEEK_SET); - fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file); - if ((tmpTOC.type!=toc->type)||(tmpTOC.format!=toc->format)|| - (tmpTOC.size!=toc->size)||(tmpTOC.offset!=toc->offset)) { - _XkbLibError(_XkbErrIllegalContents,"XkmReadFileSectionName",0); - return 0; - } - if (XkmGetCountedString(file,name,100)>0) - return _XkbDupString(name); - break; - default: - _XkbLibError(_XkbErrBadImplementation, - XkbConfigText(tmpTOC.type,XkbMessage),0); - break; - } - return NULL; -} - /***====================================================================***/ #define MAX_TOC 16 unsigned -XkmReadFile(FILE *file,unsigned need,unsigned want,XkbFileInfo *result) +XkmReadFile(FILE *file,unsigned need,unsigned want,XkbDescPtr *xkb) { register unsigned i; xkmSectionInfo toc[MAX_TOC],tmpTOC; @@ -1211,9 +1093,8 @@ unsigned which= need|want; need&(~fileInfo.present)); return which; } - result->type= fileInfo.type; - if (result->xkb==NULL) - result->xkb= XkbAllocKeyboard(); + if (*xkb==NULL) + *xkb= XkbAllocKeyboard(); for (i=0;i0) { nRead+= tmp; which&= ~(1<defined|= (1<defined|= (1< Date: Tue, 15 Jan 2008 19:43:16 -0800 Subject: [PATCH 517/552] glx: Use glapi sources from the mesa tree With recent mesa HEAD, the glapi sources used only in the xserver glx module are carried in the mesa tree. Previously, these were generated separately and committed to the xserver tree. The build is changed to symlink these files like the other mesa sources. This reduces the chance for mismatches between mesa's glX API and the xserver's glX API. --- GL/glx/.gitignore | 12 +- GL/glx/Makefile.am | 18 +- GL/glx/indirect_dispatch.c | 5889 ------------------------------ GL/glx/indirect_dispatch.h | 1047 ------ GL/glx/indirect_dispatch_swap.c | 6051 ------------------------------- GL/glx/indirect_reqsize.c | 832 ----- GL/glx/indirect_reqsize.h | 121 - GL/glx/indirect_size_get.c | 1206 ------ GL/glx/indirect_size_get.h | 102 - GL/glx/indirect_table.c | 1596 -------- GL/symlink-mesa.sh | 8 + 11 files changed, 27 insertions(+), 16855 deletions(-) delete mode 100644 GL/glx/indirect_dispatch.c delete mode 100644 GL/glx/indirect_dispatch.h delete mode 100644 GL/glx/indirect_dispatch_swap.c delete mode 100644 GL/glx/indirect_reqsize.c delete mode 100644 GL/glx/indirect_reqsize.h delete mode 100644 GL/glx/indirect_size_get.c delete mode 100644 GL/glx/indirect_size_get.h delete mode 100644 GL/glx/indirect_table.c diff --git a/GL/glx/.gitignore b/GL/glx/.gitignore index 5cf6f0a44..c49b54d43 100644 --- a/GL/glx/.gitignore +++ b/GL/glx/.gitignore @@ -1,5 +1,13 @@ -indirect_size.h +glapi.c glcontextmodes.c glcontextmodes.h -glapi.c glthread.c +indirect_dispatch.c +indirect_dispatch.h +indirect_dispatch_swap.c +indirect_reqsize.c +indirect_reqsize.h +indirect_size.h +indirect_size_get.c +indirect_size_get.h +indirect_table.c diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index e37e499c5..377d76019 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -33,7 +33,15 @@ nodist_libglx_la_SOURCES = indirect_size.h \ glapi.c \ glcontextmodes.c \ glcontextmode.h \ - glthread.c + glthread.c \ + indirect_dispatch.c \ + indirect_dispatch.h \ + indirect_dispatch_swap.c \ + indirect_reqsize.c \ + indirect_reqsize.h \ + indirect_size_get.c \ + indirect_size_get.h \ + indirect_table.c libglxdri_la_SOURCES = \ glxdri.c \ @@ -56,15 +64,7 @@ libglx_la_SOURCES = \ glxserver.h \ glxutil.c \ glxutil.h \ - indirect_dispatch.c \ - indirect_dispatch.h \ - indirect_dispatch_swap.c \ indirect_program.c \ - indirect_reqsize.c \ - indirect_reqsize.h \ - indirect_size_get.c \ - indirect_size_get.h \ - indirect_table.c \ indirect_table.h \ indirect_texture_compression.c \ indirect_util.c \ diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c deleted file mode 100644 index 2afd3eb22..000000000 --- a/GL/glx/indirect_dispatch.c +++ /dev/null @@ -1,5889 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * 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 - * IBM, - * AND/OR THEIR 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. - */ - -#include -#include -#include -#include -#include "indirect_size.h" -#include "indirect_size_get.h" -#include "indirect_dispatch.h" -#include "glxserver.h" -#include "glxbyteorder.h" -#include "indirect_util.h" -#include "singlesize.h" -#include "glapitable.h" -#include "glapi.h" -#include "glthread.h" -#include "dispatch.h" - -#define __GLX_PAD(x) (((x) + 3) & ~3) - -typedef struct { - __GLX_PIXEL_3D_HDR; -} __GLXpixel3DHeader; - -extern GLboolean __glXErrorOccured( void ); -extern void __glXClearErrorOccured( void ); - -static const unsigned dummy_answer[2] = {0, 0}; - -int __glXDisp_NewList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_NewList( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_EndList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_EndList( GET_DISPATCH(), () ); - error = Success; - } - - return error; -} - -void __glXDisp_CallList(GLbyte * pc) -{ - CALL_CallList( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_CallLists(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - const GLenum type = *(GLenum *)(pc + 4); - const GLvoid * lists = (const GLvoid *)(pc + 8); - - lists = (const GLvoid *) (pc + 8); - - CALL_CallLists( GET_DISPATCH(), ( - n, - type, - lists - ) ); -} - -int __glXDisp_DeleteLists(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_DeleteLists( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - *(GLsizei *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_GenLists(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLuint retval; - retval = CALL_GenLists( GET_DISPATCH(), ( - *(GLsizei *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_ListBase(GLbyte * pc) -{ - CALL_ListBase( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_Begin(GLbyte * pc) -{ - CALL_Begin( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Bitmap(GLbyte * pc) -{ - const GLubyte * const bitmap = (const GLubyte *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_Bitmap( GET_DISPATCH(), ( - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLfloat *)(pc + 28), - *(GLfloat *)(pc + 32), - *(GLfloat *)(pc + 36), - *(GLfloat *)(pc + 40), - bitmap - ) ); -} - -void __glXDisp_Color3bv(GLbyte * pc) -{ - CALL_Color3bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDisp_Color3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Color3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Color3fv(GLbyte * pc) -{ - CALL_Color3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Color3iv(GLbyte * pc) -{ - CALL_Color3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Color3sv(GLbyte * pc) -{ - CALL_Color3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Color3ubv(GLbyte * pc) -{ - CALL_Color3ubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDisp_Color3uiv(GLbyte * pc) -{ - CALL_Color3uiv( GET_DISPATCH(), ( - (const GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_Color3usv(GLbyte * pc) -{ - CALL_Color3usv( GET_DISPATCH(), ( - (const GLushort *)(pc + 0) - ) ); -} - -void __glXDisp_Color4bv(GLbyte * pc) -{ - CALL_Color4bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDisp_Color4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Color4dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Color4fv(GLbyte * pc) -{ - CALL_Color4fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Color4iv(GLbyte * pc) -{ - CALL_Color4iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Color4sv(GLbyte * pc) -{ - CALL_Color4sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Color4ubv(GLbyte * pc) -{ - CALL_Color4ubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDisp_Color4uiv(GLbyte * pc) -{ - CALL_Color4uiv( GET_DISPATCH(), ( - (const GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_Color4usv(GLbyte * pc) -{ - CALL_Color4usv( GET_DISPATCH(), ( - (const GLushort *)(pc + 0) - ) ); -} - -void __glXDisp_EdgeFlagv(GLbyte * pc) -{ - CALL_EdgeFlagv( GET_DISPATCH(), ( - (const GLboolean *)(pc + 0) - ) ); -} - -void __glXDisp_End(GLbyte * pc) -{ - CALL_End( GET_DISPATCH(), () ); -} - -void __glXDisp_Indexdv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_Indexdv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Indexfv(GLbyte * pc) -{ - CALL_Indexfv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Indexiv(GLbyte * pc) -{ - CALL_Indexiv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Indexsv(GLbyte * pc) -{ - CALL_Indexsv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3bv(GLbyte * pc) -{ - CALL_Normal3bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Normal3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3fv(GLbyte * pc) -{ - CALL_Normal3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3iv(GLbyte * pc) -{ - CALL_Normal3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Normal3sv(GLbyte * pc) -{ - CALL_Normal3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_RasterPos2dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos2fv(GLbyte * pc) -{ - CALL_RasterPos2fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos2iv(GLbyte * pc) -{ - CALL_RasterPos2iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos2sv(GLbyte * pc) -{ - CALL_RasterPos2sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_RasterPos3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos3fv(GLbyte * pc) -{ - CALL_RasterPos3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos3iv(GLbyte * pc) -{ - CALL_RasterPos3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos3sv(GLbyte * pc) -{ - CALL_RasterPos3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_RasterPos4dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos4fv(GLbyte * pc) -{ - CALL_RasterPos4fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos4iv(GLbyte * pc) -{ - CALL_RasterPos4iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_RasterPos4sv(GLbyte * pc) -{ - CALL_RasterPos4sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Rectdv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Rectdv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0), - (const GLdouble *)(pc + 16) - ) ); -} - -void __glXDisp_Rectfv(GLbyte * pc) -{ - CALL_Rectfv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Rectiv(GLbyte * pc) -{ - CALL_Rectiv( GET_DISPATCH(), ( - (const GLint *)(pc + 0), - (const GLint *)(pc + 8) - ) ); -} - -void __glXDisp_Rectsv(GLbyte * pc) -{ - CALL_Rectsv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_TexCoord1dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_TexCoord1dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord1fv(GLbyte * pc) -{ - CALL_TexCoord1fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord1iv(GLbyte * pc) -{ - CALL_TexCoord1iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord1sv(GLbyte * pc) -{ - CALL_TexCoord1sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_TexCoord2dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord2fv(GLbyte * pc) -{ - CALL_TexCoord2fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord2iv(GLbyte * pc) -{ - CALL_TexCoord2iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord2sv(GLbyte * pc) -{ - CALL_TexCoord2sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_TexCoord3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord3fv(GLbyte * pc) -{ - CALL_TexCoord3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord3iv(GLbyte * pc) -{ - CALL_TexCoord3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord3sv(GLbyte * pc) -{ - CALL_TexCoord3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_TexCoord4dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord4fv(GLbyte * pc) -{ - CALL_TexCoord4fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord4iv(GLbyte * pc) -{ - CALL_TexCoord4iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_TexCoord4sv(GLbyte * pc) -{ - CALL_TexCoord4sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_Vertex2dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex2fv(GLbyte * pc) -{ - CALL_Vertex2fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex2iv(GLbyte * pc) -{ - CALL_Vertex2iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex2sv(GLbyte * pc) -{ - CALL_Vertex2sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Vertex3dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex3fv(GLbyte * pc) -{ - CALL_Vertex3fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex3iv(GLbyte * pc) -{ - CALL_Vertex3iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex3sv(GLbyte * pc) -{ - CALL_Vertex3sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Vertex4dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex4fv(GLbyte * pc) -{ - CALL_Vertex4fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex4iv(GLbyte * pc) -{ - CALL_Vertex4iv( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_Vertex4sv(GLbyte * pc) -{ - CALL_Vertex4sv( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_ClipPlane(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_ClipPlane( GET_DISPATCH(), ( - *(GLenum *)(pc + 32), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_ColorMaterial(GLbyte * pc) -{ - CALL_ColorMaterial( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_CullFace(GLbyte * pc) -{ - CALL_CullFace( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Fogf(GLbyte * pc) -{ - CALL_Fogf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_Fogfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLfloat * params; - - params = (const GLfloat *) (pc + 4); - - CALL_Fogfv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_Fogi(GLbyte * pc) -{ - CALL_Fogi( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -void __glXDisp_Fogiv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLint * params; - - params = (const GLint *) (pc + 4); - - CALL_Fogiv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_FrontFace(GLbyte * pc) -{ - CALL_FrontFace( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Hint(GLbyte * pc) -{ - CALL_Hint( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_Lightf(GLbyte * pc) -{ - CALL_Lightf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Lightfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_Lightfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_Lighti(GLbyte * pc) -{ - CALL_Lighti( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_Lightiv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_Lightiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_LightModelf(GLbyte * pc) -{ - CALL_LightModelf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_LightModelfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLfloat * params; - - params = (const GLfloat *) (pc + 4); - - CALL_LightModelfv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_LightModeli(GLbyte * pc) -{ - CALL_LightModeli( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -void __glXDisp_LightModeliv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLint * params; - - params = (const GLint *) (pc + 4); - - CALL_LightModeliv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_LineStipple(GLbyte * pc) -{ - CALL_LineStipple( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLushort *)(pc + 4) - ) ); -} - -void __glXDisp_LineWidth(GLbyte * pc) -{ - CALL_LineWidth( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_Materialf(GLbyte * pc) -{ - CALL_Materialf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Materialfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_Materialfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_Materiali(GLbyte * pc) -{ - CALL_Materiali( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_Materialiv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_Materialiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_PointSize(GLbyte * pc) -{ - CALL_PointSize( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_PolygonMode(GLbyte * pc) -{ - CALL_PolygonMode( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_PolygonStipple(GLbyte * pc) -{ - const GLubyte * const mask = (const GLubyte *) (pc + 20); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_PolygonStipple( GET_DISPATCH(), ( - mask - ) ); -} - -void __glXDisp_Scissor(GLbyte * pc) -{ - CALL_Scissor( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ) ); -} - -void __glXDisp_ShadeModel(GLbyte * pc) -{ - CALL_ShadeModel( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_TexParameterf(GLbyte * pc) -{ - CALL_TexParameterf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_TexParameterfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_TexParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexParameteri(GLbyte * pc) -{ - CALL_TexParameteri( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_TexParameteriv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_TexParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexImage1D(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 52); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexImage1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLint *)(pc + 24), - *(GLint *)(pc + 28), - *(GLsizei *)(pc + 32), - *(GLint *)(pc + 40), - *(GLenum *)(pc + 44), - *(GLenum *)(pc + 48), - pixels - ) ); -} - -void __glXDisp_TexImage2D(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 52); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexImage2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLint *)(pc + 24), - *(GLint *)(pc + 28), - *(GLsizei *)(pc + 32), - *(GLsizei *)(pc + 36), - *(GLint *)(pc + 40), - *(GLenum *)(pc + 44), - *(GLenum *)(pc + 48), - pixels - ) ); -} - -void __glXDisp_TexEnvf(GLbyte * pc) -{ - CALL_TexEnvf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_TexEnvfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_TexEnvfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexEnvi(GLbyte * pc) -{ - CALL_TexEnvi( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_TexEnviv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_TexEnviv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexGend(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_TexGend( GET_DISPATCH(), ( - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12), - *(GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_TexGendv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLdouble * params; - -#ifdef __GLX_ALIGN64 - const GLuint compsize = __glTexGendv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - params = (const GLdouble *) (pc + 8); - - CALL_TexGendv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexGenf(GLbyte * pc) -{ - CALL_TexGenf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_TexGenfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_TexGenfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_TexGeni(GLbyte * pc) -{ - CALL_TexGeni( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_TexGeniv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_TexGeniv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_InitNames(GLbyte * pc) -{ - CALL_InitNames( GET_DISPATCH(), () ); -} - -void __glXDisp_LoadName(GLbyte * pc) -{ - CALL_LoadName( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_PassThrough(GLbyte * pc) -{ - CALL_PassThrough( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_PopName(GLbyte * pc) -{ - CALL_PopName( GET_DISPATCH(), () ); -} - -void __glXDisp_PushName(GLbyte * pc) -{ - CALL_PushName( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_DrawBuffer(GLbyte * pc) -{ - CALL_DrawBuffer( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Clear(GLbyte * pc) -{ - CALL_Clear( GET_DISPATCH(), ( - *(GLbitfield *)(pc + 0) - ) ); -} - -void __glXDisp_ClearAccum(GLbyte * pc) -{ - CALL_ClearAccum( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLfloat *)(pc + 12) - ) ); -} - -void __glXDisp_ClearIndex(GLbyte * pc) -{ - CALL_ClearIndex( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_ClearColor(GLbyte * pc) -{ - CALL_ClearColor( GET_DISPATCH(), ( - *(GLclampf *)(pc + 0), - *(GLclampf *)(pc + 4), - *(GLclampf *)(pc + 8), - *(GLclampf *)(pc + 12) - ) ); -} - -void __glXDisp_ClearStencil(GLbyte * pc) -{ - CALL_ClearStencil( GET_DISPATCH(), ( - *(GLint *)(pc + 0) - ) ); -} - -void __glXDisp_ClearDepth(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_ClearDepth( GET_DISPATCH(), ( - *(GLclampd *)(pc + 0) - ) ); -} - -void __glXDisp_StencilMask(GLbyte * pc) -{ - CALL_StencilMask( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_ColorMask(GLbyte * pc) -{ - CALL_ColorMask( GET_DISPATCH(), ( - *(GLboolean *)(pc + 0), - *(GLboolean *)(pc + 1), - *(GLboolean *)(pc + 2), - *(GLboolean *)(pc + 3) - ) ); -} - -void __glXDisp_DepthMask(GLbyte * pc) -{ - CALL_DepthMask( GET_DISPATCH(), ( - *(GLboolean *)(pc + 0) - ) ); -} - -void __glXDisp_IndexMask(GLbyte * pc) -{ - CALL_IndexMask( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_Accum(GLbyte * pc) -{ - CALL_Accum( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_Disable(GLbyte * pc) -{ - CALL_Disable( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_Enable(GLbyte * pc) -{ - CALL_Enable( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_PopAttrib(GLbyte * pc) -{ - CALL_PopAttrib( GET_DISPATCH(), () ); -} - -void __glXDisp_PushAttrib(GLbyte * pc) -{ - CALL_PushAttrib( GET_DISPATCH(), ( - *(GLbitfield *)(pc + 0) - ) ); -} - -void __glXDisp_MapGrid1d(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_MapGrid1d( GET_DISPATCH(), ( - *(GLint *)(pc + 16), - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_MapGrid1f(GLbyte * pc) -{ - CALL_MapGrid1f( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_MapGrid2d(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_MapGrid2d( GET_DISPATCH(), ( - *(GLint *)(pc + 32), - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLint *)(pc + 36), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24) - ) ); -} - -void __glXDisp_MapGrid2f(GLbyte * pc) -{ - CALL_MapGrid2f( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLint *)(pc + 12), - *(GLfloat *)(pc + 16), - *(GLfloat *)(pc + 20) - ) ); -} - -void __glXDisp_EvalCoord1dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_EvalCoord1dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_EvalCoord1fv(GLbyte * pc) -{ - CALL_EvalCoord1fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_EvalCoord2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_EvalCoord2dv( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_EvalCoord2fv(GLbyte * pc) -{ - CALL_EvalCoord2fv( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_EvalMesh1(GLbyte * pc) -{ - CALL_EvalMesh1( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_EvalPoint1(GLbyte * pc) -{ - CALL_EvalPoint1( GET_DISPATCH(), ( - *(GLint *)(pc + 0) - ) ); -} - -void __glXDisp_EvalMesh2(GLbyte * pc) -{ - CALL_EvalMesh2( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16) - ) ); -} - -void __glXDisp_EvalPoint2(GLbyte * pc) -{ - CALL_EvalPoint2( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -void __glXDisp_AlphaFunc(GLbyte * pc) -{ - CALL_AlphaFunc( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLclampf *)(pc + 4) - ) ); -} - -void __glXDisp_BlendFunc(GLbyte * pc) -{ - CALL_BlendFunc( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_LogicOp(GLbyte * pc) -{ - CALL_LogicOp( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_StencilFunc(GLbyte * pc) -{ - CALL_StencilFunc( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLuint *)(pc + 8) - ) ); -} - -void __glXDisp_StencilOp(GLbyte * pc) -{ - CALL_StencilOp( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8) - ) ); -} - -void __glXDisp_DepthFunc(GLbyte * pc) -{ - CALL_DepthFunc( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_PixelZoom(GLbyte * pc) -{ - CALL_PixelZoom( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_PixelTransferf(GLbyte * pc) -{ - CALL_PixelTransferf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_PixelTransferi(GLbyte * pc) -{ - CALL_PixelTransferi( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -int __glXDisp_PixelStoref(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_PixelStoref( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_PixelStorei(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_PixelStorei( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -void __glXDisp_PixelMapfv(GLbyte * pc) -{ - const GLsizei mapsize = *(GLsizei *)(pc + 4); - - CALL_PixelMapfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - mapsize, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_PixelMapuiv(GLbyte * pc) -{ - const GLsizei mapsize = *(GLsizei *)(pc + 4); - - CALL_PixelMapuiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - mapsize, - (const GLuint *)(pc + 8) - ) ); -} - -void __glXDisp_PixelMapusv(GLbyte * pc) -{ - const GLsizei mapsize = *(GLsizei *)(pc + 4); - - CALL_PixelMapusv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - mapsize, - (const GLushort *)(pc + 8) - ) ); -} - -void __glXDisp_ReadBuffer(GLbyte * pc) -{ - CALL_ReadBuffer( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_CopyPixels(GLbyte * pc) -{ - CALL_CopyPixels( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLenum *)(pc + 16) - ) ); -} - -void __glXDisp_DrawPixels(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 36); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_DrawPixels( GET_DISPATCH(), ( - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLenum *)(pc + 28), - *(GLenum *)(pc + 32), - pixels - ) ); -} - -int __glXDisp_GetBooleanv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetBooleanv_size(pname); - GLboolean answerBuffer[200]; - GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetBooleanv( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetClipPlane(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLdouble equation[4]; - CALL_GetClipPlane( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - equation - ) ); - __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetDoublev(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetDoublev_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetDoublev( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetError(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_GetError( GET_DISPATCH(), () ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_GetFloatv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetFloatv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetFloatv( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetIntegerv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetIntegerv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetIntegerv( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetLightfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetLightfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetLightfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetLightiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetLightiv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetLightiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMapdv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = *(GLenum *)(pc + 0); - const GLenum query = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMapdv_size(target,query); - GLdouble answerBuffer[200]; - GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapdv( GET_DISPATCH(), ( - target, - query, - v - ) ); - __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMapfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = *(GLenum *)(pc + 0); - const GLenum query = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMapfv_size(target,query); - GLfloat answerBuffer[200]; - GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapfv( GET_DISPATCH(), ( - target, - query, - v - ) ); - __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMapiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = *(GLenum *)(pc + 0); - const GLenum query = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMapiv_size(target,query); - GLint answerBuffer[200]; - GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapiv( GET_DISPATCH(), ( - target, - query, - v - ) ); - __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMaterialfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMaterialfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMaterialiv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMaterialiv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetPixelMapfv_size(map); - GLfloat answerBuffer[200]; - GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapfv( GET_DISPATCH(), ( - map, - values - ) ); - __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetPixelMapuiv_size(map); - GLuint answerBuffer[200]; - GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapuiv( GET_DISPATCH(), ( - map, - values - ) ); - __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = *(GLenum *)(pc + 0); - - const GLuint compsize = __glGetPixelMapusv_size(map); - GLushort answerBuffer[200]; - GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapusv( GET_DISPATCH(), ( - map, - values - ) ); - __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexEnvfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexEnvfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexEnviv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexEnviv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexGendv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexGendv_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGendv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexGenfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGenfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexGeniv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGeniv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetTexParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 8); - - const GLuint compsize = __glGetTexLevelParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 8); - - const GLuint compsize = __glGetTexLevelParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsEnabled(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsEnabled( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_IsList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsList( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_DepthRange(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_DepthRange( GET_DISPATCH(), ( - *(GLclampd *)(pc + 0), - *(GLclampd *)(pc + 8) - ) ); -} - -void __glXDisp_Frustum(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 48); - pc -= 4; - } -#endif - - CALL_Frustum( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24), - *(GLdouble *)(pc + 32), - *(GLdouble *)(pc + 40) - ) ); -} - -void __glXDisp_LoadIdentity(GLbyte * pc) -{ - CALL_LoadIdentity( GET_DISPATCH(), () ); -} - -void __glXDisp_LoadMatrixf(GLbyte * pc) -{ - CALL_LoadMatrixf( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_LoadMatrixd(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 128); - pc -= 4; - } -#endif - - CALL_LoadMatrixd( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MatrixMode(GLbyte * pc) -{ - CALL_MatrixMode( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_MultMatrixf(GLbyte * pc) -{ - CALL_MultMatrixf( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_MultMatrixd(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 128); - pc -= 4; - } -#endif - - CALL_MultMatrixd( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_Ortho(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 48); - pc -= 4; - } -#endif - - CALL_Ortho( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24), - *(GLdouble *)(pc + 32), - *(GLdouble *)(pc + 40) - ) ); -} - -void __glXDisp_PopMatrix(GLbyte * pc) -{ - CALL_PopMatrix( GET_DISPATCH(), () ); -} - -void __glXDisp_PushMatrix(GLbyte * pc) -{ - CALL_PushMatrix( GET_DISPATCH(), () ); -} - -void __glXDisp_Rotated(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Rotated( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16), - *(GLdouble *)(pc + 24) - ) ); -} - -void __glXDisp_Rotatef(GLbyte * pc) -{ - CALL_Rotatef( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8), - *(GLfloat *)(pc + 12) - ) ); -} - -void __glXDisp_Scaled(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Scaled( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16) - ) ); -} - -void __glXDisp_Scalef(GLbyte * pc) -{ - CALL_Scalef( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Translated(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Translated( GET_DISPATCH(), ( - *(GLdouble *)(pc + 0), - *(GLdouble *)(pc + 8), - *(GLdouble *)(pc + 16) - ) ); -} - -void __glXDisp_Translatef(GLbyte * pc) -{ - CALL_Translatef( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_Viewport(GLbyte * pc) -{ - CALL_Viewport( GET_DISPATCH(), ( - *(GLint *)(pc + 0), - *(GLint *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ) ); -} - -void __glXDisp_BindTexture(GLbyte * pc) -{ - CALL_BindTexture( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_Indexubv(GLbyte * pc) -{ - CALL_Indexubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDisp_PolygonOffset(GLbyte * pc) -{ - CALL_PolygonOffset( GET_DISPATCH(), ( - *(GLfloat *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResident( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - residences - ) ); - __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResident( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - residences - ) ); - __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_CopyTexImage1D(GLbyte * pc) -{ - CALL_CopyTexImage1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLint *)(pc + 24) - ) ); -} - -void __glXDisp_CopyTexImage2D(GLbyte * pc) -{ - CALL_CopyTexImage2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLint *)(pc + 28) - ) ); -} - -void __glXDisp_CopyTexSubImage1D(GLbyte * pc) -{ - CALL_CopyTexSubImage1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20) - ) ); -} - -void __glXDisp_CopyTexSubImage2D(GLbyte * pc) -{ - CALL_CopyTexSubImage2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLint *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLsizei *)(pc + 28) - ) ); -} - -int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteTextures( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteTextures( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTextures( GET_DISPATCH(), ( - n, - textures - ) ); - __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTextures( GET_DISPATCH(), ( - n, - textures - ) ); - __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTexture( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTexture( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_PrioritizeTextures(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_PrioritizeTextures( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - (const GLclampf *)(pc + 4) - ) ); -} - -void __glXDisp_TexSubImage1D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexSubImage1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLint *)(pc + 24), - *(GLint *)(pc + 28), - *(GLsizei *)(pc + 36), - *(GLenum *)(pc + 44), - *(GLenum *)(pc + 48), - pixels - ) ); -} - -void __glXDisp_TexSubImage2D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexSubImage2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLint *)(pc + 24), - *(GLint *)(pc + 28), - *(GLint *)(pc + 32), - *(GLsizei *)(pc + 36), - *(GLsizei *)(pc + 40), - *(GLenum *)(pc + 44), - *(GLenum *)(pc + 48), - pixels - ) ); -} - -void __glXDisp_BlendColor(GLbyte * pc) -{ - CALL_BlendColor( GET_DISPATCH(), ( - *(GLclampf *)(pc + 0), - *(GLclampf *)(pc + 4), - *(GLclampf *)(pc + 8), - *(GLclampf *)(pc + 12) - ) ); -} - -void __glXDisp_BlendEquation(GLbyte * pc) -{ - CALL_BlendEquation( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_ColorTable(GLbyte * pc) -{ - const GLvoid * const table = (const GLvoid *) (pc + 40); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_ColorTable( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLenum *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 32), - *(GLenum *)(pc + 36), - table - ) ); -} - -void __glXDisp_ColorTableParameterfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_ColorTableParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_ColorTableParameteriv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_ColorTableParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_CopyColorTable(GLbyte * pc) -{ - CALL_CopyColorTable( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ) ); -} - -int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetColorTableParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetColorTableParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetColorTableParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetColorTableParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_ColorSubTable(GLbyte * pc) -{ - const GLvoid * const data = (const GLvoid *) (pc + 40); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_ColorSubTable( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 32), - *(GLenum *)(pc + 36), - data - ) ); -} - -void __glXDisp_CopyColorSubTable(GLbyte * pc) -{ - CALL_CopyColorSubTable( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLsizei *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ) ); -} - -void __glXDisp_ConvolutionFilter1D(GLbyte * pc) -{ - const GLvoid * const image = (const GLvoid *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_ConvolutionFilter1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLenum *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 36), - *(GLenum *)(pc + 40), - image - ) ); -} - -void __glXDisp_ConvolutionFilter2D(GLbyte * pc) -{ - const GLvoid * const image = (const GLvoid *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_ConvolutionFilter2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 20), - *(GLenum *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLsizei *)(pc + 32), - *(GLenum *)(pc + 36), - *(GLenum *)(pc + 40), - image - ) ); -} - -void __glXDisp_ConvolutionParameterf(GLbyte * pc) -{ - CALL_ConvolutionParameterf( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_ConvolutionParameterfv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLfloat * params; - - params = (const GLfloat *) (pc + 8); - - CALL_ConvolutionParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_ConvolutionParameteri(GLbyte * pc) -{ - CALL_ConvolutionParameteri( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8) - ) ); -} - -void __glXDisp_ConvolutionParameteriv(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 4); - const GLint * params; - - params = (const GLint *) (pc + 8); - - CALL_ConvolutionParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); -} - -void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc) -{ - CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16) - ) ); -} - -void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc) -{ - CALL_CopyConvolutionFilter2D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20) - ) ); -} - -int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetConvolutionParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetConvolutionParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetConvolutionParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetConvolutionParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetHistogramParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetHistogramParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetHistogramParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetHistogramParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMinmaxParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMinmaxParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMinmaxParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetMinmaxParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_Histogram(GLbyte * pc) -{ - CALL_Histogram( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLsizei *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLboolean *)(pc + 12) - ) ); -} - -void __glXDisp_Minmax(GLbyte * pc) -{ - CALL_Minmax( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLboolean *)(pc + 8) - ) ); -} - -void __glXDisp_ResetHistogram(GLbyte * pc) -{ - CALL_ResetHistogram( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_ResetMinmax(GLbyte * pc) -{ - CALL_ResetMinmax( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_TexImage3D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); - __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexImage3D( GET_DISPATCH(), ( - *(GLenum *)(pc + 36), - *(GLint *)(pc + 40), - *(GLint *)(pc + 44), - *(GLsizei *)(pc + 48), - *(GLsizei *)(pc + 52), - *(GLsizei *)(pc + 56), - *(GLint *)(pc + 64), - *(GLenum *)(pc + 68), - *(GLenum *)(pc + 72), - pixels - ) ); -} - -void __glXDisp_TexSubImage3D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); - __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) ); - - CALL_TexSubImage3D( GET_DISPATCH(), ( - *(GLenum *)(pc + 36), - *(GLint *)(pc + 40), - *(GLint *)(pc + 44), - *(GLint *)(pc + 48), - *(GLint *)(pc + 52), - *(GLsizei *)(pc + 60), - *(GLsizei *)(pc + 64), - *(GLsizei *)(pc + 68), - *(GLenum *)(pc + 76), - *(GLenum *)(pc + 80), - pixels - ) ); -} - -void __glXDisp_CopyTexSubImage3D(GLbyte * pc) -{ - CALL_CopyTexSubImage3D( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLint *)(pc + 20), - *(GLint *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLsizei *)(pc + 32) - ) ); -} - -void __glXDisp_ActiveTextureARB(GLbyte * pc) -{ - CALL_ActiveTextureARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 8), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord1svARB(GLbyte * pc) -{ - CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 16), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord2svARB(GLbyte * pc) -{ - CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 24), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord3svARB(GLbyte * pc) -{ - CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 32), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_MultiTexCoord4svARB(GLbyte * pc) -{ - CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_SampleCoverageARB(GLbyte * pc) -{ - CALL_SampleCoverageARB( GET_DISPATCH(), ( - *(GLclampf *)(pc + 0), - *(GLboolean *)(pc + 4) - ) ); -} - -void __glXDisp_CompressedTexImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 20); - - CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLint *)(pc + 16), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDisp_CompressedTexImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 24); - - CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLint *)(pc + 20), - imageSize, - (const GLvoid *)(pc + 28) - ) ); -} - -void __glXDisp_CompressedTexImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 28); - - CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLint *)(pc + 24), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 20); - - CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLenum *)(pc + 16), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 28); - - CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLenum *)(pc + 24), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 36); - - CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 32), - imageSize, - (const GLvoid *)(pc + 40) - ) ); -} - -int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetProgramivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribdvARB_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribfvARB_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramStringARB(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 8); - - CALL_ProgramStringARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - len, - (const GLvoid *)(pc + 12) - ) ); -} - -void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1fvARB(GLbyte * pc) -{ - CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1svARB(GLbyte * pc) -{ - CALL_VertexAttrib1svARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2fvARB(GLbyte * pc) -{ - CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2svARB(GLbyte * pc) -{ - CALL_VertexAttrib2svARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3fvARB(GLbyte * pc) -{ - CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3svARB(GLbyte * pc) -{ - CALL_VertexAttrib3svARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLushort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4bvARB(GLbyte * pc) -{ - CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4fvARB(GLbyte * pc) -{ - CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ivARB(GLbyte * pc) -{ - CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4svARB(GLbyte * pc) -{ - CALL_VertexAttrib4svARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4uivARB(GLbyte * pc) -{ - CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4usvARB(GLbyte * pc) -{ - CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLushort *)(pc + 4) - ) ); -} - -void __glXDisp_BeginQueryARB(GLbyte * pc) -{ - CALL_BeginQueryARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteQueriesARB( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -void __glXDisp_EndQueryARB(GLbyte * pc) -{ - CALL_EndQueryARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenQueriesARB( GET_DISPATCH(), ( - n, - ids - ) ); - __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryObjectivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryObjectuivARB_size(pname); - GLuint answerBuffer[200]; - GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsQueryARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_DrawBuffersARB(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DrawBuffersARB( GET_DISPATCH(), ( - n, - (const GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_SampleMaskSGIS(GLbyte * pc) -{ - CALL_SampleMaskSGIS( GET_DISPATCH(), ( - *(GLclampf *)(pc + 0), - *(GLboolean *)(pc + 4) - ) ); -} - -void __glXDisp_SamplePatternSGIS(GLbyte * pc) -{ - CALL_SamplePatternSGIS( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -void __glXDisp_PointParameterfEXT(GLbyte * pc) -{ - CALL_PointParameterfEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_PointParameterfvEXT(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLfloat * params; - - params = (const GLfloat *) (pc + 4); - - CALL_PointParameterfvEXT( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc) -{ - CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( - (const GLint *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3svEXT(GLbyte * pc) -{ - CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( - (const GLshort *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc) -{ - CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( - (const GLuint *)(pc + 0) - ) ); -} - -void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( - (const GLushort *)(pc + 0) - ) ); -} - -void __glXDisp_FogCoorddvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_FogCoorddvEXT( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_FogCoordfvEXT(GLbyte * pc) -{ - CALL_FogCoordfvEXT( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc) -{ - CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12) - ) ); -} - -void __glXDisp_WindowPos3fvMESA(GLbyte * pc) -{ - CALL_WindowPos3fvMESA( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - residences - ) ); - __glXSendReply(cl->client, residences, n, 1, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_BindProgramNV(GLbyte * pc) -{ - CALL_BindProgramNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -int __glXDisp_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteProgramsNV( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; -} - -void __glXDisp_ExecuteProgramNV(GLbyte * pc) -{ - CALL_ExecuteProgramNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - -int __glXDisp_GenProgramsNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenProgramsNV( GET_DISPATCH(), ( - n, - programs - ) ); - __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramParameterdvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramParameterfvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetProgramivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetTrackMatrixivNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribdvNV_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribfvNV_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsProgramNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsProgramNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_LoadProgramNV(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 8); - - CALL_LoadProgramNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - len, - (const GLubyte *)(pc + 12) - ) ); -} - -void __glXDisp_ProgramParameters4dvNV(GLbyte * pc) -{ - const GLuint num = *(GLuint *)(pc + 8); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramParameters4dvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - num, - (const GLdouble *)(pc + 12) - ) ); -} - -void __glXDisp_ProgramParameters4fvNV(GLbyte * pc) -{ - const GLuint num = *(GLuint *)(pc + 8); - - CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - num, - (const GLfloat *)(pc + 12) - ) ); -} - -void __glXDisp_RequestResidentProgramsNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_TrackMatrixNV(GLbyte * pc) -{ - CALL_TrackMatrixNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12) - ) ); -} - -void __glXDisp_VertexAttrib1dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1fvNV(GLbyte * pc) -{ - CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1svNV(GLbyte * pc) -{ - CALL_VertexAttrib1svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2fvNV(GLbyte * pc) -{ - CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2svNV(GLbyte * pc) -{ - CALL_VertexAttrib2svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3fvNV(GLbyte * pc) -{ - CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3svNV(GLbyte * pc) -{ - CALL_VertexAttrib3svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4fvNV(GLbyte * pc) -{ - CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4svNV(GLbyte * pc) -{ - CALL_VertexAttrib4svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc) -{ - CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttribs1dvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs1fvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs1svNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs1svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLshort *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs2dvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs2fvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs2svNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs2svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLshort *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs3dvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs3fvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs3svNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs3svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLshort *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs4dvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs4dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs4fvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs4fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs4svNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs4svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLshort *)(pc + 8) - ) ); -} - -void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 4); - - CALL_VertexAttribs4ubvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - n, - (const GLubyte *)(pc + 8) - ) ); -} - -void __glXDisp_PointParameteriNV(GLbyte * pc) -{ - CALL_PointParameteriNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4) - ) ); -} - -void __glXDisp_PointParameterivNV(GLbyte * pc) -{ - const GLenum pname = *(GLenum *)(pc + 0); - const GLint * params; - - params = (const GLint *) (pc + 4); - - CALL_PointParameterivNV( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc) -{ - CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = *(GLsizei *)(pc + 4); - - GLdouble params[4]; - CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - len, - (const GLubyte *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = *(GLsizei *)(pc + 4); - - GLfloat params[4]; - CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - len, - (const GLubyte *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 36); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 32), - len, - (const GLubyte *)(pc + 40), - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 4); - - CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - len, - (const GLubyte *)(pc + 24), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc) -{ - CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4) - ) ); -} - -void __glXDisp_BindFramebufferEXT(GLbyte * pc) -{ - CALL_BindFramebufferEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_BindRenderbufferEXT(GLbyte * pc) -{ - CALL_BindRenderbufferEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc) -{ - CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12) - ) ); -} - -void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16) - ) ); -} - -void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16) - ) ); -} - -void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLint *)(pc + 20) - ) ); -} - -int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenFramebuffersEXT( GET_DISPATCH(), ( - n, - framebuffers - ) ); - __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( - n, - renderbuffers - ) ); - __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_GenerateMipmapEXT(GLbyte * pc) -{ - CALL_GenerateMipmapEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsFramebufferEXT( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_RenderbufferStorageEXT(GLbyte * pc) -{ - CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) - ) ); -} - diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h deleted file mode 100644 index e81c382f0..000000000 --- a/GL/glx/indirect_dispatch.h +++ /dev/null @@ -1,1047 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * 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 - * IBM, - * AND/OR THEIR 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. - */ - -#if !defined( _INDIRECT_DISPATCH_H_ ) -# define _INDIRECT_DISPATCH_H_ - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define HIDDEN __attribute__((visibility("hidden"))) -# else -# define HIDDEN -# endif -struct __GLXclientStateRec; - -extern HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc); -extern HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc); -extern HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc); -extern HIDDEN void __glXDisp_SampleCoverageARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SampleCoverageARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc); -extern HIDDEN void __glXDisp_BeginQueryARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BeginQueryARB(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc); -extern HIDDEN void __glXDisp_PointParameteriNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointParameteriNV(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc); -extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Histogram(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Histogram(GLbyte * pc); -extern HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); -extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc); -extern HIDDEN void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color3uiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc); -extern HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Indexubv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc); -extern HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexImage3D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc); -extern HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color3ubv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModeliv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib1svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc); -extern HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc); -extern HIDDEN void __glXDisp_BlendColor(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc); -extern HIDDEN void __glXDisp_Scalef(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); -extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc); -extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc); -extern HIDDEN void __glXDisp_Viewport(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); -extern HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexImage3DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc); -extern HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc); -extern HIDDEN void __glXDisp_PointSize(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointSize(GLbyte * pc); -extern HIDDEN void __glXDisp_PopName(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PopName(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); -extern HIDDEN void __glXDisp_TexEnvi(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc); -extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Scaled(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Scaled(GLbyte * pc); -extern HIDDEN void __glXDisp_CallLists(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); -extern HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc); -extern HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Rotated(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); -extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc); -extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_GenerateMipmapEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc); -extern HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc); -extern HIDDEN void __glXDisp_Scissor(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Scissor(GLbyte * pc); -extern HIDDEN void __glXDisp_Fogf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Fogf(GLbyte * pc); -extern HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4usv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc); -extern HIDDEN void __glXDisp_Fogi(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Fogi(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc); -extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc); -extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RenderbufferStorageEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorTable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc); -extern HIDDEN void __glXDisp_Accum(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Accum(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc); -extern HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ClearStencil(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc); -extern HIDDEN void __glXDisp_ClearIndex(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc); -extern HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc); -extern HIDDEN void __glXDisp_PushMatrix(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LoadProgramNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadProgramNV(GLbyte * pc); -extern HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc); -extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_End(GLbyte * pc); -extern HIDDEN void __glXDispSwap_End(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); -extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc); -extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_BlendEquation(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc); -extern HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Indexdv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc); -extern HIDDEN void __glXDisp_PushName(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PushName(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord1svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_EndQueryARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EndQueryARB(GLbyte * pc); -extern HIDDEN void __glXDisp_DepthMask(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc); -extern HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4bv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc); -extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc); -extern HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); -extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc); -extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc); -extern HIDDEN void __glXDisp_PointParameterivNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PointParameterivNV(GLbyte * pc); -extern HIDDEN void __glXDisp_BlendFunc(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc); -extern HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color4uiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc); -extern HIDDEN void __glXDisp_BindFramebufferEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindFramebufferEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_PushAttrib(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc); -extern HIDDEN void __glXDisp_WindowPos3fvMESA(GLbyte * pc); -extern HIDDEN void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc); -extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc); -extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc); -extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Frustum(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc); -extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexEnvf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc); -extern HIDDEN void __glXDisp_Lightfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc); -extern HIDDEN void __glXDisp_ClearDepth(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc); -extern HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Lightiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib2dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Rectdv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Materialiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexGeni(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGenf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGend(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGend(GLbyte * pc); -extern HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Color4sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc); -extern HIDDEN int __glXDisp_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsProgramNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PixelZoom(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc); -extern HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc); -extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SamplePatternSGIS(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SamplePatternSGIS(GLbyte * pc); -extern HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); -extern HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc); -extern HIDDEN int __glXDisp_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc); -extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexImage1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc); -extern HIDDEN void __glXDisp_FrontFace(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc); -extern HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); -extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Lightf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Lightf(GLbyte * pc); -extern HIDDEN void __glXDisp_MatrixMode(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc); -extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Lighti(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Lighti(GLbyte * pc); -extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc); -extern HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TrackMatrixNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TrackMatrixNV(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ClearColor(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc); -extern HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc); -extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc); -extern HIDDEN void __glXDisp_Map1d(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Map1d(GLbyte * pc); -extern HIDDEN void __glXDisp_Map1f(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Map1f(GLbyte * pc); -extern HIDDEN void __glXDisp_CompressedTexImage2DARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TexImage2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramParameters4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Fogiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc); -extern HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Clear(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc); -extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc); -extern HIDDEN void __glXDisp_Ortho(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc); -extern HIDDEN void __glXDisp_ListBase(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ListBase(GLbyte * pc); -extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc); -extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_CallList(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Rectiv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc); -extern HIDDEN void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc); -extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc); -extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_LineWidth(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc); -extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc); -extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); -extern HIDDEN void __glXDisp_Materialfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc); -extern HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); -extern HIDDEN void __glXDisp_Color3iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramParameters4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc); -extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc); -extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc); -extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Map2d(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Map2d(GLbyte * pc); -extern HIDDEN void __glXDisp_Map2f(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc); -extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc); -extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_Materialf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Materialf(GLbyte * pc); -extern HIDDEN void __glXDisp_Materiali(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Materiali(GLbyte * pc); -extern HIDDEN void __glXDisp_Indexsv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord4svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModelfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc); -extern HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc); -extern HIDDEN int __glXDisp_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Translated(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Translated(GLbyte * pc); -extern HIDDEN void __glXDisp_Translatef(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Translatef(GLbyte * pc); -extern HIDDEN void __glXDisp_StencilMask(GLbyte * pc); -extern HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc); -extern HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc); -extern HIDDEN void __glXDisp_LoadName(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LoadName(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc); -extern HIDDEN void __glXDisp_CullFace(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CullFace(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_StencilFunc(GLbyte * pc); -extern HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyPixels(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc); -extern HIDDEN void __glXDisp_Rectsv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc); -extern HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc); -extern HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc); -extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc); -extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc); -extern HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc); -extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc); -extern HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc); -extern HIDDEN void __glXDisp_BindProgramNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_BindProgramNV(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc); -extern HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc); -extern HIDDEN void __glXDisp_PopAttrib(GLbyte * pc); -extern HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc); -extern HIDDEN void __glXDisp_Fogfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc); -extern HIDDEN void __glXDisp_InitNames(GLbyte * pc); -extern HIDDEN void __glXDispSwap_InitNames(GLbyte * pc); -extern HIDDEN void __glXDisp_Normal3sv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc); -extern HIDDEN void __glXDisp_Minmax(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Minmax(GLbyte * pc); -extern HIDDEN void __glXDisp_FogCoorddvEXT(GLbyte * pc); -extern HIDDEN void __glXDispSwap_FogCoorddvEXT(GLbyte * pc); -extern HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Hint(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Hint(GLbyte * pc); -extern HIDDEN void __glXDisp_Color4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib2svARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc); -extern HIDDEN int __glXDisp_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc); -extern HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc); -extern HIDDEN void __glXDisp_Begin(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Begin(GLbyte * pc); -extern HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Rectfv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc); -extern HIDDEN void __glXDisp_LightModelf(GLbyte * pc); -extern HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc); -extern HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_Disable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Disable(GLbyte * pc); -extern HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc); -extern HIDDEN int __glXDisp_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_ColorMask(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc); -extern HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc); -extern HIDDEN void __glXDisp_Enable(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Enable(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc); -extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc); -extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc); -extern HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc); -extern HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc); -extern HIDDEN int __glXDisp_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN int __glXDispSwap_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *); -extern HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc); - -# undef HIDDEN - -#endif /* !defined( _INDIRECT_DISPATCH_H_ ) */ diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c deleted file mode 100644 index f137cbe98..000000000 --- a/GL/glx/indirect_dispatch_swap.c +++ /dev/null @@ -1,6051 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * 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 - * IBM, - * AND/OR THEIR 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. - */ - -#include -#include -#include -#include -#include "indirect_size.h" -#include "indirect_size_get.h" -#include "indirect_dispatch.h" -#include "glxserver.h" -#include "glxbyteorder.h" -#include "indirect_util.h" -#include "singlesize.h" -#include "glapitable.h" -#include "glapi.h" -#include "glthread.h" -#include "dispatch.h" - -#define __GLX_PAD(x) (((x) + 3) & ~3) - -typedef struct { - __GLX_PIXEL_3D_HDR; -} __GLXpixel3DHeader; - -extern GLboolean __glXErrorOccured( void ); -extern void __glXClearErrorOccured( void ); - -static const unsigned dummy_answer[2] = {0, 0}; - -static GLsizei -bswap_CARD32( const void * src ) -{ - union { uint32_t dst; GLsizei ret; } x; - x.dst = bswap_32( *(uint32_t *) src ); - return x.ret; -} - -static GLshort -bswap_CARD16( const void * src ) -{ - union { uint16_t dst; GLshort ret; } x; - x.dst = bswap_16( *(uint16_t *) src ); - return x.ret; -} - -static GLenum -bswap_ENUM( const void * src ) -{ - union { uint32_t dst; GLenum ret; } x; - x.dst = bswap_32( *(uint32_t *) src ); - return x.ret; -} - -static GLdouble -bswap_FLOAT64( const void * src ) -{ - union { uint64_t dst; GLdouble ret; } x; - x.dst = bswap_64( *(uint64_t *) src ); - return x.ret; -} - -static GLfloat -bswap_FLOAT32( const void * src ) -{ - union { uint32_t dst; GLfloat ret; } x; - x.dst = bswap_32( *(uint32_t *) src ); - return x.ret; -} - -static void * -bswap_16_array( uint16_t * src, unsigned count ) -{ - unsigned i; - - for ( i = 0 ; i < count ; i++ ) { - uint16_t temp = bswap_16( src[i] ); - src[i] = temp; - } - - return src; -} - -static void * -bswap_32_array( uint32_t * src, unsigned count ) -{ - unsigned i; - - for ( i = 0 ; i < count ; i++ ) { - uint32_t temp = bswap_32( src[i] ); - src[i] = temp; - } - - return src; -} - -static void * -bswap_64_array( uint64_t * src, unsigned count ) -{ - unsigned i; - - for ( i = 0 ; i < count ; i++ ) { - uint64_t temp = bswap_64( src[i] ); - src[i] = temp; - } - - return src; -} - -int __glXDispSwap_NewList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_NewList( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_EndList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_EndList( GET_DISPATCH(), () ); - error = Success; - } - - return error; -} - -void __glXDispSwap_CallList(GLbyte * pc) -{ - CALL_CallList( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_CallLists(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - const GLenum type = (GLenum )bswap_ENUM ( pc + 4 ); - const GLvoid * lists; - - switch(type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_2_BYTES: - case GL_3_BYTES: - case GL_4_BYTES: - lists = (const GLvoid *) (pc + 8); break; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - lists = (const GLvoid *) bswap_16_array( (uint16_t *) (pc + 8), n ); break; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - lists = (const GLvoid *) bswap_32_array( (uint32_t *) (pc + 8), n ); break; - default: - return; - } - - CALL_CallLists( GET_DISPATCH(), ( - n, - type, - lists - ) ); -} - -int __glXDispSwap_DeleteLists(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_DeleteLists( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (GLsizei )bswap_CARD32 ( pc + 4 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenLists(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLuint retval; - retval = CALL_GenLists( GET_DISPATCH(), ( - (GLsizei )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_ListBase(GLbyte * pc) -{ - CALL_ListBase( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Begin(GLbyte * pc) -{ - CALL_Begin( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Bitmap(GLbyte * pc) -{ - const GLubyte * const bitmap = (const GLubyte *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_Bitmap( GET_DISPATCH(), ( - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLfloat )bswap_FLOAT32( pc + 28 ), - (GLfloat )bswap_FLOAT32( pc + 32 ), - (GLfloat )bswap_FLOAT32( pc + 36 ), - (GLfloat )bswap_FLOAT32( pc + 40 ), - bitmap - ) ); -} - -void __glXDispSwap_Color3bv(GLbyte * pc) -{ - CALL_Color3bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Color3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Color3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3fv(GLbyte * pc) -{ - CALL_Color3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3iv(GLbyte * pc) -{ - CALL_Color3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3sv(GLbyte * pc) -{ - CALL_Color3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3ubv(GLbyte * pc) -{ - CALL_Color3ubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Color3uiv(GLbyte * pc) -{ - CALL_Color3uiv( GET_DISPATCH(), ( - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color3usv(GLbyte * pc) -{ - CALL_Color3usv( GET_DISPATCH(), ( - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Color4bv(GLbyte * pc) -{ - CALL_Color4bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Color4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Color4dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4fv(GLbyte * pc) -{ - CALL_Color4fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4iv(GLbyte * pc) -{ - CALL_Color4iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4sv(GLbyte * pc) -{ - CALL_Color4sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4ubv(GLbyte * pc) -{ - CALL_Color4ubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Color4uiv(GLbyte * pc) -{ - CALL_Color4uiv( GET_DISPATCH(), ( - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Color4usv(GLbyte * pc) -{ - CALL_Color4usv( GET_DISPATCH(), ( - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_EdgeFlagv(GLbyte * pc) -{ - CALL_EdgeFlagv( GET_DISPATCH(), ( - (const GLboolean *)(pc + 0) - ) ); -} - -void __glXDispSwap_End(GLbyte * pc) -{ - CALL_End( GET_DISPATCH(), () ); -} - -void __glXDispSwap_Indexdv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_Indexdv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_Indexfv(GLbyte * pc) -{ - CALL_Indexfv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_Indexiv(GLbyte * pc) -{ - CALL_Indexiv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_Indexsv(GLbyte * pc) -{ - CALL_Indexsv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_Normal3bv(GLbyte * pc) -{ - CALL_Normal3bv( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_Normal3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Normal3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Normal3fv(GLbyte * pc) -{ - CALL_Normal3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Normal3iv(GLbyte * pc) -{ - CALL_Normal3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Normal3sv(GLbyte * pc) -{ - CALL_Normal3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_RasterPos2dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_RasterPos2fv(GLbyte * pc) -{ - CALL_RasterPos2fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_RasterPos2iv(GLbyte * pc) -{ - CALL_RasterPos2iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_RasterPos2sv(GLbyte * pc) -{ - CALL_RasterPos2sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_RasterPos3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_RasterPos3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos3fv(GLbyte * pc) -{ - CALL_RasterPos3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos3iv(GLbyte * pc) -{ - CALL_RasterPos3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos3sv(GLbyte * pc) -{ - CALL_RasterPos3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_RasterPos4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_RasterPos4dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_RasterPos4fv(GLbyte * pc) -{ - CALL_RasterPos4fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_RasterPos4iv(GLbyte * pc) -{ - CALL_RasterPos4iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_RasterPos4sv(GLbyte * pc) -{ - CALL_RasterPos4sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Rectdv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Rectdv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 16), 2 ) - ) ); -} - -void __glXDispSwap_Rectfv(GLbyte * pc) -{ - CALL_Rectfv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 2 ) - ) ); -} - -void __glXDispSwap_Rectiv(GLbyte * pc) -{ - CALL_Rectiv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 8), 2 ) - ) ); -} - -void __glXDispSwap_Rectsv(GLbyte * pc) -{ - CALL_Rectsv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord1dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_TexCoord1dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_TexCoord1fv(GLbyte * pc) -{ - CALL_TexCoord1fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_TexCoord1iv(GLbyte * pc) -{ - CALL_TexCoord1iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_TexCoord1sv(GLbyte * pc) -{ - CALL_TexCoord1sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_TexCoord2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_TexCoord2dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord2fv(GLbyte * pc) -{ - CALL_TexCoord2fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord2iv(GLbyte * pc) -{ - CALL_TexCoord2iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord2sv(GLbyte * pc) -{ - CALL_TexCoord2sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_TexCoord3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_TexCoord3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_TexCoord3fv(GLbyte * pc) -{ - CALL_TexCoord3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_TexCoord3iv(GLbyte * pc) -{ - CALL_TexCoord3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_TexCoord3sv(GLbyte * pc) -{ - CALL_TexCoord3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_TexCoord4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_TexCoord4dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_TexCoord4fv(GLbyte * pc) -{ - CALL_TexCoord4fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_TexCoord4iv(GLbyte * pc) -{ - CALL_TexCoord4iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_TexCoord4sv(GLbyte * pc) -{ - CALL_TexCoord4sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Vertex2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_Vertex2dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_Vertex2fv(GLbyte * pc) -{ - CALL_Vertex2fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_Vertex2iv(GLbyte * pc) -{ - CALL_Vertex2iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_Vertex2sv(GLbyte * pc) -{ - CALL_Vertex2sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_Vertex3dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Vertex3dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Vertex3fv(GLbyte * pc) -{ - CALL_Vertex3fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Vertex3iv(GLbyte * pc) -{ - CALL_Vertex3iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Vertex3sv(GLbyte * pc) -{ - CALL_Vertex3sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_Vertex4dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Vertex4dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Vertex4fv(GLbyte * pc) -{ - CALL_Vertex4fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Vertex4iv(GLbyte * pc) -{ - CALL_Vertex4iv( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_Vertex4sv(GLbyte * pc) -{ - CALL_Vertex4sv( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_ClipPlane(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_ClipPlane( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 32 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_ColorMaterial(GLbyte * pc) -{ - CALL_ColorMaterial( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_CullFace(GLbyte * pc) -{ - CALL_CullFace( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Fogf(GLbyte * pc) -{ - CALL_Fogf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_Fogfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) ); - - CALL_Fogfv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_Fogi(GLbyte * pc) -{ - CALL_Fogi( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_Fogiv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) ); - - CALL_Fogiv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_FrontFace(GLbyte * pc) -{ - CALL_FrontFace( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Hint(GLbyte * pc) -{ - CALL_Hint( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_Lightf(GLbyte * pc) -{ - CALL_Lightf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_Lightfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) ); - - CALL_Lightfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_Lighti(GLbyte * pc) -{ - CALL_Lighti( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_Lightiv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) ); - - CALL_Lightiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_LightModelf(GLbyte * pc) -{ - CALL_LightModelf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_LightModelfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) ); - - CALL_LightModelfv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_LightModeli(GLbyte * pc) -{ - CALL_LightModeli( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_LightModeliv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) ); - - CALL_LightModeliv( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_LineStipple(GLbyte * pc) -{ - CALL_LineStipple( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLushort)bswap_CARD16 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_LineWidth(GLbyte * pc) -{ - CALL_LineWidth( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ) - ) ); -} - -void __glXDispSwap_Materialf(GLbyte * pc) -{ - CALL_Materialf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_Materialfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) ); - - CALL_Materialfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_Materiali(GLbyte * pc) -{ - CALL_Materiali( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_Materialiv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) ); - - CALL_Materialiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_PointSize(GLbyte * pc) -{ - CALL_PointSize( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ) - ) ); -} - -void __glXDispSwap_PolygonMode(GLbyte * pc) -{ - CALL_PolygonMode( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_PolygonStipple(GLbyte * pc) -{ - const GLubyte * const mask = (const GLubyte *) (pc + 20); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_PolygonStipple( GET_DISPATCH(), ( - mask - ) ); -} - -void __glXDispSwap_Scissor(GLbyte * pc) -{ - CALL_Scissor( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ) - ) ); -} - -void __glXDispSwap_ShadeModel(GLbyte * pc) -{ - CALL_ShadeModel( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_TexParameterf(GLbyte * pc) -{ - CALL_TexParameterf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexParameterfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) ); - - CALL_TexParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexParameteri(GLbyte * pc) -{ - CALL_TexParameteri( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexParameteriv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) ); - - CALL_TexParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexImage1D(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 52); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexImage1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 32 ), - (GLint )bswap_CARD32 ( pc + 40 ), - (GLenum )bswap_ENUM ( pc + 44 ), - (GLenum )bswap_ENUM ( pc + 48 ), - pixels - ) ); -} - -void __glXDispSwap_TexImage2D(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 52); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexImage2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 32 ), - (GLsizei )bswap_CARD32 ( pc + 36 ), - (GLint )bswap_CARD32 ( pc + 40 ), - (GLenum )bswap_ENUM ( pc + 44 ), - (GLenum )bswap_ENUM ( pc + 48 ), - pixels - ) ); -} - -void __glXDispSwap_TexEnvf(GLbyte * pc) -{ - CALL_TexEnvf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexEnvfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) ); - - CALL_TexEnvfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexEnvi(GLbyte * pc) -{ - CALL_TexEnvi( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexEnviv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) ); - - CALL_TexEnviv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexGend(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_TexGend( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 8 ), - (GLenum )bswap_ENUM ( pc + 12 ), - (GLdouble)bswap_FLOAT64( pc + 0 ) - ) ); -} - -void __glXDispSwap_TexGendv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLdouble * params; - -#ifdef __GLX_ALIGN64 - const GLuint compsize = __glTexGendv_size(pname); - const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) ); - - CALL_TexGendv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexGenf(GLbyte * pc) -{ - CALL_TexGenf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexGenfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) ); - - CALL_TexGenfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_TexGeni(GLbyte * pc) -{ - CALL_TexGeni( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_TexGeniv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) ); - - CALL_TexGeniv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_InitNames(GLbyte * pc) -{ - CALL_InitNames( GET_DISPATCH(), () ); -} - -void __glXDispSwap_LoadName(GLbyte * pc) -{ - CALL_LoadName( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_PassThrough(GLbyte * pc) -{ - CALL_PassThrough( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ) - ) ); -} - -void __glXDispSwap_PopName(GLbyte * pc) -{ - CALL_PopName( GET_DISPATCH(), () ); -} - -void __glXDispSwap_PushName(GLbyte * pc) -{ - CALL_PushName( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_DrawBuffer(GLbyte * pc) -{ - CALL_DrawBuffer( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Clear(GLbyte * pc) -{ - CALL_Clear( GET_DISPATCH(), ( - (GLbitfield)bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ClearAccum(GLbyte * pc) -{ - CALL_ClearAccum( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ), - (GLfloat )bswap_FLOAT32( pc + 12 ) - ) ); -} - -void __glXDispSwap_ClearIndex(GLbyte * pc) -{ - CALL_ClearIndex( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ) - ) ); -} - -void __glXDispSwap_ClearColor(GLbyte * pc) -{ - CALL_ClearColor( GET_DISPATCH(), ( - (GLclampf)bswap_FLOAT32( pc + 0 ), - (GLclampf)bswap_FLOAT32( pc + 4 ), - (GLclampf)bswap_FLOAT32( pc + 8 ), - (GLclampf)bswap_FLOAT32( pc + 12 ) - ) ); -} - -void __glXDispSwap_ClearStencil(GLbyte * pc) -{ - CALL_ClearStencil( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ClearDepth(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_ClearDepth( GET_DISPATCH(), ( - (GLclampd)bswap_FLOAT64( pc + 0 ) - ) ); -} - -void __glXDispSwap_StencilMask(GLbyte * pc) -{ - CALL_StencilMask( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ColorMask(GLbyte * pc) -{ - CALL_ColorMask( GET_DISPATCH(), ( - *(GLboolean *)(pc + 0), - *(GLboolean *)(pc + 1), - *(GLboolean *)(pc + 2), - *(GLboolean *)(pc + 3) - ) ); -} - -void __glXDispSwap_DepthMask(GLbyte * pc) -{ - CALL_DepthMask( GET_DISPATCH(), ( - *(GLboolean *)(pc + 0) - ) ); -} - -void __glXDispSwap_IndexMask(GLbyte * pc) -{ - CALL_IndexMask( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Accum(GLbyte * pc) -{ - CALL_Accum( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_Disable(GLbyte * pc) -{ - CALL_Disable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_Enable(GLbyte * pc) -{ - CALL_Enable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_PopAttrib(GLbyte * pc) -{ - CALL_PopAttrib( GET_DISPATCH(), () ); -} - -void __glXDispSwap_PushAttrib(GLbyte * pc) -{ - CALL_PushAttrib( GET_DISPATCH(), ( - (GLbitfield)bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_MapGrid1d(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_MapGrid1d( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ) - ) ); -} - -void __glXDispSwap_MapGrid1f(GLbyte * pc) -{ - CALL_MapGrid1f( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_MapGrid2d(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_MapGrid2d( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 32 ), - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 36 ), - (GLdouble)bswap_FLOAT64( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 24 ) - ) ); -} - -void __glXDispSwap_MapGrid2f(GLbyte * pc) -{ - CALL_MapGrid2f( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLfloat )bswap_FLOAT32( pc + 16 ), - (GLfloat )bswap_FLOAT32( pc + 20 ) - ) ); -} - -void __glXDispSwap_EvalCoord1dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_EvalCoord1dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_EvalCoord1fv(GLbyte * pc) -{ - CALL_EvalCoord1fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_EvalCoord2dv(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_EvalCoord2dv( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_EvalCoord2fv(GLbyte * pc) -{ - CALL_EvalCoord2fv( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_EvalMesh1(GLbyte * pc) -{ - CALL_EvalMesh1( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_EvalPoint1(GLbyte * pc) -{ - CALL_EvalPoint1( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ) - ) ); -} - -void __glXDispSwap_EvalMesh2(GLbyte * pc) -{ - CALL_EvalMesh2( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_EvalPoint2(GLbyte * pc) -{ - CALL_EvalPoint2( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_AlphaFunc(GLbyte * pc) -{ - CALL_AlphaFunc( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLclampf)bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_BlendFunc(GLbyte * pc) -{ - CALL_BlendFunc( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_LogicOp(GLbyte * pc) -{ - CALL_LogicOp( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_StencilFunc(GLbyte * pc) -{ - CALL_StencilFunc( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLuint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_StencilOp(GLbyte * pc) -{ - CALL_StencilOp( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ) - ) ); -} - -void __glXDispSwap_DepthFunc(GLbyte * pc) -{ - CALL_DepthFunc( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_PixelZoom(GLbyte * pc) -{ - CALL_PixelZoom( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_PixelTransferf(GLbyte * pc) -{ - CALL_PixelTransferf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_PixelTransferi(GLbyte * pc) -{ - CALL_PixelTransferi( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -int __glXDispSwap_PixelStoref(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_PixelStoref( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_PixelStorei(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - CALL_PixelStorei( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); - error = Success; - } - - return error; -} - -void __glXDispSwap_PixelMapfv(GLbyte * pc) -{ - const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_PixelMapfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - mapsize, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_PixelMapuiv(GLbyte * pc) -{ - const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_PixelMapuiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - mapsize, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_PixelMapusv(GLbyte * pc) -{ - const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_PixelMapusv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - mapsize, - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_ReadBuffer(GLbyte * pc) -{ - CALL_ReadBuffer( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_CopyPixels(GLbyte * pc) -{ - CALL_CopyPixels( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLenum )bswap_ENUM ( pc + 16 ) - ) ); -} - -void __glXDispSwap_DrawPixels(GLbyte * pc) -{ - const GLvoid * const pixels = (const GLvoid *) (pc + 36); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_DrawPixels( GET_DISPATCH(), ( - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLenum )bswap_ENUM ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - pixels - ) ); -} - -int __glXDispSwap_GetBooleanv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetBooleanv_size(pname); - GLboolean answerBuffer[200]; - GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetBooleanv( GET_DISPATCH(), ( - pname, - params - ) ); - __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetClipPlane(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLdouble equation[4]; - CALL_GetClipPlane( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - equation - ) ); - (void) bswap_64_array( (uint64_t *) equation, 4 ); - __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetDoublev(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetDoublev_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetDoublev( GET_DISPATCH(), ( - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetError(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_GetError( GET_DISPATCH(), () ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetFloatv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetFloatv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetFloatv( GET_DISPATCH(), ( - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetIntegerv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetIntegerv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetIntegerv( GET_DISPATCH(), ( - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetLightfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetLightfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetLightfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetLightiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetLightiv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetLightiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMapdv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); - const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMapdv_size(target,query); - GLdouble answerBuffer[200]; - GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapdv( GET_DISPATCH(), ( - target, - query, - v - ) ); - (void) bswap_64_array( (uint64_t *) v, compsize ); - __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMapfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); - const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMapfv_size(target,query); - GLfloat answerBuffer[200]; - GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapfv( GET_DISPATCH(), ( - target, - query, - v - ) ); - (void) bswap_32_array( (uint32_t *) v, compsize ); - __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMapiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum target = (GLenum )bswap_ENUM ( pc + 0 ); - const GLenum query = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMapiv_size(target,query); - GLint answerBuffer[200]; - GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (v == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMapiv( GET_DISPATCH(), ( - target, - query, - v - ) ); - (void) bswap_32_array( (uint32_t *) v, compsize ); - __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMaterialfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMaterialfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMaterialfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMaterialiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMaterialiv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMaterialiv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetPixelMapfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetPixelMapfv_size(map); - GLfloat answerBuffer[200]; - GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapfv( GET_DISPATCH(), ( - map, - values - ) ); - (void) bswap_32_array( (uint32_t *) values, compsize ); - __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetPixelMapuiv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetPixelMapuiv_size(map); - GLuint answerBuffer[200]; - GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapuiv( GET_DISPATCH(), ( - map, - values - ) ); - (void) bswap_32_array( (uint32_t *) values, compsize ); - __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetPixelMapusv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum map = (GLenum )bswap_ENUM ( pc + 0 ); - - const GLuint compsize = __glGetPixelMapusv_size(map); - GLushort answerBuffer[200]; - GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); - - if (values == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetPixelMapusv( GET_DISPATCH(), ( - map, - values - ) ); - (void) bswap_16_array( (uint16_t *) values, compsize ); - __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexEnvfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexEnvfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexEnvfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexEnviv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexEnviv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexEnviv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexGendv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexGendv_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGendv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexGenfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexGenfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGenfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexGeniv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexGeniv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexGeniv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetTexParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 ); - - const GLuint compsize = __glGetTexLevelParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexLevelParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 8 ); - - const GLuint compsize = __glGetTexLevelParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetTexLevelParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsEnabled(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsEnabled( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsList(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsList( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_DepthRange(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 16); - pc -= 4; - } -#endif - - CALL_DepthRange( GET_DISPATCH(), ( - (GLclampd)bswap_FLOAT64( pc + 0 ), - (GLclampd)bswap_FLOAT64( pc + 8 ) - ) ); -} - -void __glXDispSwap_Frustum(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 48); - pc -= 4; - } -#endif - - CALL_Frustum( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 24 ), - (GLdouble)bswap_FLOAT64( pc + 32 ), - (GLdouble)bswap_FLOAT64( pc + 40 ) - ) ); -} - -void __glXDispSwap_LoadIdentity(GLbyte * pc) -{ - CALL_LoadIdentity( GET_DISPATCH(), () ); -} - -void __glXDispSwap_LoadMatrixf(GLbyte * pc) -{ - CALL_LoadMatrixf( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) - ) ); -} - -void __glXDispSwap_LoadMatrixd(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 128); - pc -= 4; - } -#endif - - CALL_LoadMatrixd( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 ) - ) ); -} - -void __glXDispSwap_MatrixMode(GLbyte * pc) -{ - CALL_MatrixMode( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_MultMatrixf(GLbyte * pc) -{ - CALL_MultMatrixf( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 ) - ) ); -} - -void __glXDispSwap_MultMatrixd(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 128); - pc -= 4; - } -#endif - - CALL_MultMatrixd( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 ) - ) ); -} - -void __glXDispSwap_Ortho(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 48); - pc -= 4; - } -#endif - - CALL_Ortho( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 24 ), - (GLdouble)bswap_FLOAT64( pc + 32 ), - (GLdouble)bswap_FLOAT64( pc + 40 ) - ) ); -} - -void __glXDispSwap_PopMatrix(GLbyte * pc) -{ - CALL_PopMatrix( GET_DISPATCH(), () ); -} - -void __glXDispSwap_PushMatrix(GLbyte * pc) -{ - CALL_PushMatrix( GET_DISPATCH(), () ); -} - -void __glXDispSwap_Rotated(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 32); - pc -= 4; - } -#endif - - CALL_Rotated( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ), - (GLdouble)bswap_FLOAT64( pc + 24 ) - ) ); -} - -void __glXDispSwap_Rotatef(GLbyte * pc) -{ - CALL_Rotatef( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ), - (GLfloat )bswap_FLOAT32( pc + 12 ) - ) ); -} - -void __glXDispSwap_Scaled(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Scaled( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ) - ) ); -} - -void __glXDispSwap_Scalef(GLbyte * pc) -{ - CALL_Scalef( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_Translated(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_Translated( GET_DISPATCH(), ( - (GLdouble)bswap_FLOAT64( pc + 0 ), - (GLdouble)bswap_FLOAT64( pc + 8 ), - (GLdouble)bswap_FLOAT64( pc + 16 ) - ) ); -} - -void __glXDispSwap_Translatef(GLbyte * pc) -{ - CALL_Translatef( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_Viewport(GLbyte * pc) -{ - CALL_Viewport( GET_DISPATCH(), ( - (GLint )bswap_CARD32 ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ) - ) ); -} - -void __glXDispSwap_BindTexture(GLbyte * pc) -{ - CALL_BindTexture( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_Indexubv(GLbyte * pc) -{ - CALL_Indexubv( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_PolygonOffset(GLbyte * pc) -{ - CALL_PolygonOffset( GET_DISPATCH(), ( - (GLfloat )bswap_FLOAT32( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResident( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - residences - ) ); - __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResident( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - residences - ) ); - __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_CopyTexImage1D(GLbyte * pc) -{ - CALL_CopyTexImage1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ) - ) ); -} - -void __glXDispSwap_CopyTexImage2D(GLbyte * pc) -{ - CALL_CopyTexImage2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ) - ) ); -} - -void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc) -{ - CALL_CopyTexSubImage1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ) - ) ); -} - -void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc) -{ - CALL_CopyTexSubImage2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ) - ) ); -} - -int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteTextures( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteTextures( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTextures( GET_DISPATCH(), ( - n, - textures - ) ); - (void) bswap_32_array( (uint32_t *) textures, n ); - __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTextures( GET_DISPATCH(), ( - n, - textures - ) ); - (void) bswap_32_array( (uint32_t *) textures, n ); - __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTexture( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTexture( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_PrioritizeTextures(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_PrioritizeTextures( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - (const GLclampf *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_TexSubImage1D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexSubImage1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 36 ), - (GLenum )bswap_ENUM ( pc + 44 ), - (GLenum )bswap_ENUM ( pc + 48 ), - pixels - ) ); -} - -void __glXDispSwap_TexSubImage2D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 52); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexSubImage2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLint )bswap_CARD32 ( pc + 28 ), - (GLint )bswap_CARD32 ( pc + 32 ), - (GLsizei )bswap_CARD32 ( pc + 36 ), - (GLsizei )bswap_CARD32 ( pc + 40 ), - (GLenum )bswap_ENUM ( pc + 44 ), - (GLenum )bswap_ENUM ( pc + 48 ), - pixels - ) ); -} - -void __glXDispSwap_BlendColor(GLbyte * pc) -{ - CALL_BlendColor( GET_DISPATCH(), ( - (GLclampf)bswap_FLOAT32( pc + 0 ), - (GLclampf)bswap_FLOAT32( pc + 4 ), - (GLclampf)bswap_FLOAT32( pc + 8 ), - (GLclampf)bswap_FLOAT32( pc + 12 ) - ) ); -} - -void __glXDispSwap_BlendEquation(GLbyte * pc) -{ - CALL_BlendEquation( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ColorTable(GLbyte * pc) -{ - const GLvoid * const table = (const GLvoid *) (pc + 40); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_ColorTable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - (GLenum )bswap_ENUM ( pc + 36 ), - table - ) ); -} - -void __glXDispSwap_ColorTableParameterfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) ); - - CALL_ColorTableParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_ColorTableParameteriv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) ); - - CALL_ColorTableParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_CopyColorTable(GLbyte * pc) -{ - CALL_CopyColorTable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ) - ) ); -} - -int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetColorTableParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetColorTableParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetColorTableParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetColorTableParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetColorTableParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_ColorSubTable(GLbyte * pc) -{ - const GLvoid * const data = (const GLvoid *) (pc + 40); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_ColorSubTable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - (GLenum )bswap_ENUM ( pc + 36 ), - data - ) ); -} - -void __glXDispSwap_CopyColorSubTable(GLbyte * pc) -{ - CALL_CopyColorSubTable( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLsizei )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc) -{ - const GLvoid * const image = (const GLvoid *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_ConvolutionFilter1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 36 ), - (GLenum )bswap_ENUM ( pc + 40 ), - image - ) ); -} - -void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc) -{ - const GLvoid * const image = (const GLvoid *) (pc + 44); - __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_ConvolutionFilter2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 32 ), - (GLenum )bswap_ENUM ( pc + 36 ), - (GLenum )bswap_ENUM ( pc + 40 ), - image - ) ); -} - -void __glXDispSwap_ConvolutionParameterf(GLbyte * pc) -{ - CALL_ConvolutionParameterf( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLfloat )bswap_FLOAT32( pc + 8 ) - ) ); -} - -void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) ); - - CALL_ConvolutionParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_ConvolutionParameteri(GLbyte * pc) -{ - CALL_ConvolutionParameteri( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ) - ) ); -} - -void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) ); - - CALL_ConvolutionParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); -} - -void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc) -{ - CALL_CopyConvolutionFilter1D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc) -{ - CALL_CopyConvolutionFilter2D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ) - ) ); -} - -int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetConvolutionParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetConvolutionParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetConvolutionParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetConvolutionParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetHistogramParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetHistogramParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetHistogramParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetHistogramParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetHistogramParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMinmaxParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMinmaxParameterfv_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMinmaxParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetMinmaxParameteriv_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_Histogram(GLbyte * pc) -{ - CALL_Histogram( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLsizei )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - *(GLboolean *)(pc + 12) - ) ); -} - -void __glXDispSwap_Minmax(GLbyte * pc) -{ - CALL_Minmax( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - *(GLboolean *)(pc + 8) - ) ); -} - -void __glXDispSwap_ResetHistogram(GLbyte * pc) -{ - CALL_ResetHistogram( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_ResetMinmax(GLbyte * pc) -{ - CALL_ResetMinmax( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_TexImage3D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 76); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80); - __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexImage3D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 36 ), - (GLint )bswap_CARD32 ( pc + 40 ), - (GLint )bswap_CARD32 ( pc + 44 ), - (GLsizei )bswap_CARD32 ( pc + 48 ), - (GLsizei )bswap_CARD32 ( pc + 52 ), - (GLsizei )bswap_CARD32 ( pc + 56 ), - (GLint )bswap_CARD32 ( pc + 64 ), - (GLenum )bswap_ENUM ( pc + 68 ), - (GLenum )bswap_ENUM ( pc + 72 ), - pixels - ) ); -} - -void __glXDispSwap_TexSubImage3D(GLbyte * pc) -{ - const CARD32 ptr_is_null = *(CARD32 *)(pc + 84); - const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88); - __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc); - - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) ); - CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) ); - - CALL_TexSubImage3D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 36 ), - (GLint )bswap_CARD32 ( pc + 40 ), - (GLint )bswap_CARD32 ( pc + 44 ), - (GLint )bswap_CARD32 ( pc + 48 ), - (GLint )bswap_CARD32 ( pc + 52 ), - (GLsizei )bswap_CARD32 ( pc + 60 ), - (GLsizei )bswap_CARD32 ( pc + 64 ), - (GLsizei )bswap_CARD32 ( pc + 68 ), - (GLenum )bswap_ENUM ( pc + 76 ), - (GLenum )bswap_ENUM ( pc + 80 ), - pixels - ) ); -} - -void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc) -{ - CALL_CopyTexSubImage3D( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLsizei )bswap_CARD32 ( pc + 32 ) - ) ); -} - -void __glXDispSwap_ActiveTextureARB(GLbyte * pc) -{ - CALL_ActiveTextureARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_MultiTexCoord1dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 8 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord1fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord1ivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc) -{ - CALL_MultiTexCoord1svARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_MultiTexCoord2dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 16 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord2fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord2ivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc) -{ - CALL_MultiTexCoord2svARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_MultiTexCoord3dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 24 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord3fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord3ivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc) -{ - CALL_MultiTexCoord3svARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_MultiTexCoord4dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 32 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc) -{ - CALL_MultiTexCoord4fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc) -{ - CALL_MultiTexCoord4ivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc) -{ - CALL_MultiTexCoord4svARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_SampleCoverageARB(GLbyte * pc) -{ - CALL_SampleCoverageARB( GET_DISPATCH(), ( - (GLclampf)bswap_FLOAT32( pc + 0 ), - *(GLboolean *)(pc + 4) - ) ); -} - -void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); - - CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 24 ); - - CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ), - imageSize, - (const GLvoid *)(pc + 28) - ) ); -} - -void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); - - CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); - - CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLenum )bswap_ENUM ( pc + 16 ), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); - - CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 36 ); - - CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - imageSize, - (const GLvoid *)(pc + 40) - ) ); -} - -int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetProgramivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribdvARB_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribfvARB_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramStringARB(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); - - CALL_ProgramStringARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - len, - (const GLvoid *)(pc + 12) - ) ); -} - -void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) -{ - CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc) -{ - CALL_VertexAttrib1svARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) -{ - CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc) -{ - CALL_VertexAttrib2svARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) -{ - CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc) -{ - CALL_VertexAttrib3svARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc) -{ - CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) -{ - CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc) -{ - CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc) -{ - CALL_VertexAttrib4svARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc) -{ - CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc) -{ - CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_BeginQueryARB(GLbyte * pc) -{ - CALL_BeginQueryARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteQueriesARB( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; -} - -void __glXDispSwap_EndQueryARB(GLbyte * pc) -{ - CALL_EndQueryARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenQueriesARB( GET_DISPATCH(), ( - n, - ids - ) ); - (void) bswap_32_array( (uint32_t *) ids, n ); - __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryObjectivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryObjectuivARB_size(pname); - GLuint answerBuffer[200]; - GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsQueryARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_DrawBuffersARB(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DrawBuffersARB( GET_DISPATCH(), ( - n, - (const GLenum *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_SampleMaskSGIS(GLbyte * pc) -{ - CALL_SampleMaskSGIS( GET_DISPATCH(), ( - (GLclampf)bswap_FLOAT32( pc + 0 ), - *(GLboolean *)(pc + 4) - ) ); -} - -void __glXDispSwap_SamplePatternSGIS(GLbyte * pc) -{ - CALL_SamplePatternSGIS( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -void __glXDispSwap_PointParameterfEXT(GLbyte * pc) -{ - CALL_PointParameterfEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLfloat )bswap_FLOAT32( pc + 4 ) - ) ); -} - -void __glXDispSwap_PointParameterfvEXT(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLfloat * params; - - params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfvEXT_size(pname) ); - - CALL_PointParameterfvEXT( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( - (const GLbyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 24); - pc -= 4; - } -#endif - - CALL_SecondaryColor3dvEXT( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3fvEXT( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc) -{ - CALL_SecondaryColor3ivEXT( GET_DISPATCH(), ( - (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc) -{ - CALL_SecondaryColor3svEXT( GET_DISPATCH(), ( - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), ( - (const GLubyte *)(pc + 0) - ) ); -} - -void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc) -{ - CALL_SecondaryColor3uivEXT( GET_DISPATCH(), ( - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc) -{ - CALL_SecondaryColor3usvEXT( GET_DISPATCH(), ( - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_FogCoorddvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_FogCoorddvEXT( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_FogCoordfvEXT(GLbyte * pc) -{ - CALL_FogCoordfvEXT( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc) -{ - CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLenum )bswap_ENUM ( pc + 12 ) - ) ); -} - -void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc) -{ - CALL_WindowPos3fvMESA( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -int __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreProgramsResidentNV( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - residences - ) ); - __glXSendReplySwap(cl->client, residences, n, 1, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_BindProgramNV(GLbyte * pc) -{ - CALL_BindProgramNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -int __glXDispSwap_DeleteProgramsNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteProgramsNV( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; -} - -void __glXDispSwap_ExecuteProgramNV(GLbyte * pc) -{ - CALL_ExecuteProgramNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -int __glXDispSwap_GenProgramsNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenProgramsNV( GET_DISPATCH(), ( - n, - programs - ) ); - (void) bswap_32_array( (uint32_t *) programs, n ); - __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramParameterdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramParameterdvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramParameterfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramParameterfvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetProgramivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetTrackMatrixivNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 1 ); - __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribdvNV_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribfvNV_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsProgramNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsProgramNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_LoadProgramNV(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); - - CALL_LoadProgramNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - len, - (const GLubyte *)(pc + 12) - ) ); -} - -void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc) -{ - const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramParameters4dvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - num, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 12), 0 ) - ) ); -} - -void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc) -{ - const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); - - CALL_ProgramParameters4fvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - num, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 12), 0 ) - ) ); -} - -void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_RequestResidentProgramsNV( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_TrackMatrixNV(GLbyte * pc) -{ - CALL_TrackMatrixNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLenum )bswap_ENUM ( pc + 12 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) -{ - CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc) -{ - CALL_VertexAttrib1svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) -{ - CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc) -{ - CALL_VertexAttrib2svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) -{ - CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc) -{ - CALL_VertexAttrib3svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) -{ - CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc) -{ - CALL_VertexAttrib4svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) -{ - CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs1dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs1fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs1svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs2dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs2fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs2svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs3dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs3fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs3svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_VertexAttribs4dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs4fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs4svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 ) - ) ); -} - -void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_VertexAttribs4ubvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - n, - (const GLubyte *)(pc + 8) - ) ); -} - -void __glXDispSwap_PointParameteriNV(GLbyte * pc) -{ - CALL_PointParameteriNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_PointParameterivNV(GLbyte * pc) -{ - const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 ); - const GLint * params; - - params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterivNV_size(pname) ); - - CALL_PointParameterivNV( GET_DISPATCH(), ( - pname, - params - ) ); -} - -void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc) -{ - CALL_ActiveStencilFaceEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - - GLdouble params[4]; - CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - len, - (const GLubyte *)(pc + 8), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - - GLfloat params[4]; - CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - len, - (const GLubyte *)(pc + 8), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 36 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 32 ), - len, - (const GLubyte *)(pc + 40), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - -void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - len, - (const GLubyte *)(pc + 24), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc) -{ - CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ) - ) ); -} - -void __glXDispSwap_BindFramebufferEXT(GLbyte * pc) -{ - CALL_BindFramebufferEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc) -{ - CALL_BindRenderbufferEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc) -{ - CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ) - ) ); -} - -void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ) - ) ); -} - -int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenFramebuffersEXT( GET_DISPATCH(), ( - n, - framebuffers - ) ); - (void) bswap_32_array( (uint32_t *) framebuffers, n ); - __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenRenderbuffersEXT( GET_DISPATCH(), ( - n, - renderbuffers - ) ); - (void) bswap_32_array( (uint32_t *) renderbuffers, n ); - __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc) -{ - CALL_GenerateMipmapEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 1 ); - __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 1 ); - __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsFramebufferEXT( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc) -{ - CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ) - ) ); -} - diff --git a/GL/glx/indirect_reqsize.c b/GL/glx/indirect_reqsize.c deleted file mode 100644 index 954eecd97..000000000 --- a/GL/glx/indirect_reqsize.c +++ /dev/null @@ -1,832 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * 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 - * IBM, - * AND/OR THEIR 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. - */ - - -#include -#include "glxserver.h" -#include "glxbyteorder.h" -#include "indirect_size.h" -#include "indirect_reqsize.h" - -#define __GLX_PAD(x) (((x) + 3) & ~3) - -#if defined(__CYGWIN__) || defined(__MINGW32__) -# undef HAVE_ALIAS -#endif -#ifdef HAVE_ALIAS -# define ALIAS2(from,to) \ - GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ - __attribute__ ((alias( # to ))); -# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) -#else -# define ALIAS(from,to) \ - GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ - { return __glX ## to ## ReqSize( pc, swap ); } -#endif - - -int -__glXCallListsReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 0); - GLenum type = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - n = bswap_32(n); - type = bswap_32(type); - } - - compsize = __glCallLists_size(type); - return __GLX_PAD((compsize * n)); -} - -int -__glXBitmapReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLsizei width = *(GLsizei *) (pc + 20); - GLsizei height = *(GLsizei *) (pc + 24); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - width = bswap_32(width); - height = bswap_32(height); - } - - return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXFogfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 0); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glFogfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXLightfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glLightfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXLightModelfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 0); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glLightModelfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXMaterialfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glMaterialfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - } - - return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glTexParameterfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXTexImage1DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 32); - GLenum format = *(GLenum *) (pc + 44); - GLenum type = *(GLenum *) (pc + 48); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexImage2DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 32); - GLsizei height = *(GLsizei *) (pc + 36); - GLenum format = *(GLenum *) (pc + 44); - GLenum type = *(GLenum *) (pc + 48); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glTexEnvfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXTexGendvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glTexGendv_size(pname); - return __GLX_PAD((compsize * 8)); -} - -int -__glXTexGenfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glTexGenfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei mapsize = *(GLsizei *) (pc + 4); - - if (swap) { - mapsize = bswap_32(mapsize); - } - - return __GLX_PAD((mapsize * 4)); -} - -int -__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei mapsize = *(GLsizei *) (pc + 4); - - if (swap) { - mapsize = bswap_32(mapsize); - } - - return __GLX_PAD((mapsize * 2)); -} - -int -__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLsizei width = *(GLsizei *) (pc + 20); - GLsizei height = *(GLsizei *) (pc + 24); - GLenum format = *(GLenum *) (pc + 28); - GLenum type = *(GLenum *) (pc + 32); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - width = bswap_32(width); - height = bswap_32(height); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, 0, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 0); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 4) + (n * 4)); -} - -int -__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 36); - GLenum format = *(GLenum *) (pc + 44); - GLenum type = *(GLenum *) (pc + 48); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 36); - GLsizei height = *(GLsizei *) (pc + 40); - GLenum format = *(GLenum *) (pc + 44); - GLenum type = *(GLenum *) (pc + 48); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXColorTableReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 28); - GLenum format = *(GLenum *) (pc + 32); - GLenum type = *(GLenum *) (pc + 36); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glColorTableParameterfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXColorSubTableReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei count = *(GLsizei *) (pc + 28); - GLenum format = *(GLenum *) (pc + 32); - GLenum type = *(GLenum *) (pc + 36); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - count = bswap_32(count); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, count, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 28); - GLenum format = *(GLenum *) (pc + 36); - GLenum type = *(GLenum *) (pc + 40); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, 1, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = 0; - GLint skip_images = 0; - GLint skip_rows = *(GLint *) (pc + 8); - GLint alignment = *(GLint *) (pc + 16); - GLenum target = *(GLenum *) (pc + 20); - GLsizei width = *(GLsizei *) (pc + 28); - GLsizei height = *(GLsizei *) (pc + 32); - GLenum format = *(GLenum *) (pc + 36); - GLenum type = *(GLenum *) (pc + 40); - - if (swap) { - row_length = bswap_32(row_length); - skip_rows = bswap_32(skip_rows); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, 1, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 4); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glConvolutionParameterfv_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXTexImage3DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = *(GLint *) (pc + 8); - GLint skip_rows = *(GLint *) (pc + 16); - GLint skip_images = *(GLint *) (pc + 20); - GLint alignment = *(GLint *) (pc + 32); - GLenum target = *(GLenum *) (pc + 36); - GLsizei width = *(GLsizei *) (pc + 48); - GLsizei height = *(GLsizei *) (pc + 52); - GLsizei depth = *(GLsizei *) (pc + 56); - GLenum format = *(GLenum *) (pc + 68); - GLenum type = *(GLenum *) (pc + 72); - - if (swap) { - row_length = bswap_32(row_length); - image_height = bswap_32(image_height); - skip_rows = bswap_32(skip_rows); - skip_images = bswap_32(skip_images); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - depth = bswap_32(depth); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, depth, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap) -{ - GLint row_length = *(GLint *) (pc + 4); - GLint image_height = *(GLint *) (pc + 8); - GLint skip_rows = *(GLint *) (pc + 16); - GLint skip_images = *(GLint *) (pc + 20); - GLint alignment = *(GLint *) (pc + 32); - GLenum target = *(GLenum *) (pc + 36); - GLsizei width = *(GLsizei *) (pc + 60); - GLsizei height = *(GLsizei *) (pc + 64); - GLsizei depth = *(GLsizei *) (pc + 68); - GLenum format = *(GLenum *) (pc + 76); - GLenum type = *(GLenum *) (pc + 80); - - if (swap) { - row_length = bswap_32(row_length); - image_height = bswap_32(image_height); - skip_rows = bswap_32(skip_rows); - skip_images = bswap_32(skip_images); - alignment = bswap_32(alignment); - target = bswap_32(target); - width = bswap_32(width); - height = bswap_32(height); - depth = bswap_32(depth); - format = bswap_32(format); - type = bswap_32(type); - } - - return __glXImageSize(format, type, target, width, height, depth, - image_height, row_length, skip_images, - skip_rows, alignment); -} - -int -__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei imageSize = *(GLsizei *) (pc + 20); - - if (swap) { - imageSize = bswap_32(imageSize); - } - - return __GLX_PAD(imageSize); -} - -int -__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei imageSize = *(GLsizei *) (pc + 24); - - if (swap) { - imageSize = bswap_32(imageSize); - } - - return __GLX_PAD(imageSize); -} - -int -__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei imageSize = *(GLsizei *) (pc + 28); - - if (swap) { - imageSize = bswap_32(imageSize); - } - - return __GLX_PAD(imageSize); -} - -int -__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei imageSize = *(GLsizei *) (pc + 36); - - if (swap) { - imageSize = bswap_32(imageSize); - } - - return __GLX_PAD(imageSize); -} - -int -__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei len = *(GLsizei *) (pc + 8); - - if (swap) { - len = bswap_32(len); - } - - return __GLX_PAD(len); -} - -int -__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 0); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 4)); -} - -int -__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap) -{ - GLenum pname = *(GLenum *) (pc + 0); - GLsizei compsize; - - if (swap) { - pname = bswap_32(pname); - } - - compsize = __glPointParameterfvEXT_size(pname); - return __GLX_PAD((compsize * 4)); -} - -int -__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLuint num = *(GLuint *) (pc + 8); - - if (swap) { - num = bswap_32(num); - } - - return __GLX_PAD((num * 32)); -} - -int -__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLuint num = *(GLuint *) (pc + 8); - - if (swap) { - num = bswap_32(num); - } - - return __GLX_PAD((num * 16)); -} - -int -__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 8)); -} - -int -__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 16)); -} - -int -__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 24)); -} - -int -__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 12)); -} - -int -__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 6)); -} - -int -__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei n = *(GLsizei *) (pc + 4); - - if (swap) { - n = bswap_32(n); - } - - return __GLX_PAD((n * 32)); -} - -int -__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap) -{ - GLsizei len = *(GLsizei *) (pc + 4); - - if (swap) { - len = bswap_32(len); - } - - return __GLX_PAD(len); -} - -ALIAS(Fogiv, Fogfv) - ALIAS(Lightiv, Lightfv) - ALIAS(LightModeliv, LightModelfv) - ALIAS(Materialiv, Materialfv) - ALIAS(TexParameteriv, TexParameterfv) - ALIAS(TexEnviv, TexEnvfv) - ALIAS(TexGeniv, TexGenfv) - ALIAS(PixelMapuiv, PixelMapfv) - ALIAS(ColorTableParameteriv, ColorTableParameterfv) - ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) - ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB) - ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB) - ALIAS(LoadProgramNV, ProgramStringARB) - ALIAS(RequestResidentProgramsNV, DrawBuffersARB) - ALIAS(VertexAttribs1fvNV, PixelMapfv) - ALIAS(VertexAttribs1svNV, PixelMapusv) - ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV) - ALIAS(VertexAttribs2svNV, PixelMapfv) - ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV) - ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV) - ALIAS(VertexAttribs4ubvNV, PixelMapfv) - ALIAS(PointParameterivNV, PointParameterfvEXT) - ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB) - ALIAS(DeleteFramebuffersEXT, DrawBuffersARB) - ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB) diff --git a/GL/glx/indirect_reqsize.h b/GL/glx/indirect_reqsize.h deleted file mode 100644 index 26211ee5c..000000000 --- a/GL/glx/indirect_reqsize.h +++ /dev/null @@ -1,121 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * 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 - * IBM, - * AND/OR THEIR 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. - */ - -#if !defined( _INDIRECT_REQSIZE_H_ ) -# define _INDIRECT_REQSIZE_H_ - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define HIDDEN __attribute__((visibility("hidden"))) -# else -# define HIDDEN -# endif - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif - -extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap); -extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap); - -# undef HIDDEN -# undef PURE - -#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */ diff --git a/GL/glx/indirect_size_get.c b/GL/glx/indirect_size_get.c deleted file mode 100644 index e7eaf97cb..000000000 --- a/GL/glx/indirect_size_get.c +++ /dev/null @@ -1,1206 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2004 - * 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 - * IBM, - * AND/OR THEIR 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. - */ - - -#include -#include "indirect_size_get.h" -#include "glxserver.h" -#include "indirect_util.h" -#include "indirect_size.h" - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif - -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define INTERNAL __attribute__((visibility("internal"))) -# else -# define INTERNAL -# endif - - -#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) -# undef HAVE_ALIAS -#endif -#ifdef HAVE_ALIAS -# define ALIAS2(from,to) \ - INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ - __attribute__ ((alias( # to ))); -# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) -#else -# define ALIAS(from,to) \ - INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ - { return __gl ## to ## _size( e ); } -#endif - - -INTERNAL PURE FASTCALL GLint -__glCallLists_size(GLenum e) -{ - switch (e) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return 1; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_2_BYTES: - return 2; - case GL_3_BYTES: - return 3; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_4_BYTES: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glFogfv_size(GLenum e) -{ - switch (e) { - case GL_FOG_INDEX: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_MODE: - case GL_FOG_OFFSET_VALUE_SGIX: - case GL_FOG_DISTANCE_MODE_NV: - return 1; - case GL_FOG_COLOR: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glLightfv_size(GLenum e) -{ - switch (e) { - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - return 1; - case GL_SPOT_DIRECTION: - return 3; - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glLightModelfv_size(GLenum e) -{ - switch (e) { - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LIGHT_MODEL_COLOR_CONTROL: -/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ - return 1; - case GL_LIGHT_MODEL_AMBIENT: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMaterialfv_size(GLenum e) -{ - switch (e) { - case GL_SHININESS: - return 1; - case GL_COLOR_INDEXES: - return 3; - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - case GL_AMBIENT_AND_DIFFUSE: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexParameterfv_size(GLenum e) -{ - switch (e) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: -/* case GL_SHADOW_AMBIENT_SGIX:*/ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_CLIPMAP_FRAME_SGIX: - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - case GL_GENERATE_MIPMAP: -/* case GL_GENERATE_MIPMAP_SGIS:*/ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_TEXTURE_LOD_BIAS: -/* case GL_TEXTURE_LOD_BIAS_EXT:*/ - case GL_DEPTH_TEXTURE_MODE: -/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_MODE: -/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_FUNC: -/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - case GL_TEXTURE_CLIPMAP_CENTER_SGIX: - case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: - return 2; - case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: - return 3; - case GL_TEXTURE_BORDER_COLOR: - case GL_POST_TEXTURE_FILTER_BIAS_SGIX: - case GL_POST_TEXTURE_FILTER_SCALE_SGIX: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexEnvfv_size(GLenum e) -{ - switch (e) { - case GL_ALPHA_SCALE: - case GL_TEXTURE_ENV_MODE: - case GL_TEXTURE_LOD_BIAS: - case GL_COMBINE_RGB: - case GL_COMBINE_ALPHA: - case GL_RGB_SCALE: - case GL_SOURCE0_RGB: - case GL_SOURCE1_RGB: - case GL_SOURCE2_RGB: - case GL_SOURCE3_RGB_NV: - case GL_SOURCE0_ALPHA: - case GL_SOURCE1_ALPHA: - case GL_SOURCE2_ALPHA: - case GL_SOURCE3_ALPHA_NV: - case GL_OPERAND0_RGB: - case GL_OPERAND1_RGB: - case GL_OPERAND2_RGB: - case GL_OPERAND3_RGB_NV: - case GL_OPERAND0_ALPHA: - case GL_OPERAND1_ALPHA: - case GL_OPERAND2_ALPHA: - case GL_OPERAND3_ALPHA_NV: - case GL_COORD_REPLACE_ARB: -/* case GL_COORD_REPLACE_NV:*/ - return 1; - case GL_TEXTURE_ENV_COLOR: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glTexGendv_size(GLenum e) -{ - switch (e) { - case GL_TEXTURE_GEN_MODE: - return 1; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMap1d_size(GLenum e) -{ - switch (e) { - case GL_MAP1_INDEX: - case GL_MAP1_TEXTURE_COORD_1: - return 1; - case GL_MAP1_TEXTURE_COORD_2: - return 2; - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_VERTEX_3: - return 3; - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_4: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glMap2d_size(GLenum e) -{ - switch (e) { - case GL_MAP2_INDEX: - case GL_MAP2_TEXTURE_COORD_1: - return 1; - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_VERTEX_3: - return 3; - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetBooleanv_size(GLenum e) -{ - switch (e) { - case GL_CURRENT_INDEX: - case GL_CURRENT_RASTER_INDEX: - case GL_CURRENT_RASTER_POSITION_VALID: - case GL_CURRENT_RASTER_DISTANCE: - case GL_POINT_SMOOTH: - case GL_POINT_SIZE: - case GL_SMOOTH_POINT_SIZE_GRANULARITY: - case GL_LINE_SMOOTH: - case GL_LINE_WIDTH: - case GL_LINE_WIDTH_GRANULARITY: - case GL_LINE_STIPPLE: - case GL_LINE_STIPPLE_PATTERN: - case GL_LINE_STIPPLE_REPEAT: - case GL_LIST_MODE: - case GL_MAX_LIST_NESTING: - case GL_LIST_BASE: - case GL_LIST_INDEX: - case GL_POLYGON_SMOOTH: - case GL_POLYGON_STIPPLE: - case GL_EDGE_FLAG: - case GL_CULL_FACE: - case GL_CULL_FACE_MODE: - case GL_FRONT_FACE: - case GL_LIGHTING: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_SHADE_MODEL: - case GL_COLOR_MATERIAL_FACE: - case GL_COLOR_MATERIAL_PARAMETER: - case GL_COLOR_MATERIAL: - case GL_FOG: - case GL_FOG_INDEX: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_MODE: - case GL_DEPTH_TEST: - case GL_DEPTH_WRITEMASK: - case GL_DEPTH_CLEAR_VALUE: - case GL_DEPTH_FUNC: - case GL_STENCIL_TEST: - case GL_STENCIL_CLEAR_VALUE: - case GL_STENCIL_FUNC: - case GL_STENCIL_VALUE_MASK: - case GL_STENCIL_FAIL: - case GL_STENCIL_PASS_DEPTH_FAIL: - case GL_STENCIL_PASS_DEPTH_PASS: - case GL_STENCIL_REF: - case GL_STENCIL_WRITEMASK: - case GL_MATRIX_MODE: - case GL_NORMALIZE: - case GL_MODELVIEW_STACK_DEPTH: - case GL_PROJECTION_STACK_DEPTH: - case GL_TEXTURE_STACK_DEPTH: - case GL_ATTRIB_STACK_DEPTH: - case GL_CLIENT_ATTRIB_STACK_DEPTH: - case GL_ALPHA_TEST: - case GL_ALPHA_TEST_FUNC: - case GL_ALPHA_TEST_REF: - case GL_DITHER: - case GL_BLEND_DST: - case GL_BLEND_SRC: - case GL_BLEND: - case GL_LOGIC_OP_MODE: - case GL_LOGIC_OP: - case GL_AUX_BUFFERS: - case GL_DRAW_BUFFER: - case GL_READ_BUFFER: - case GL_SCISSOR_TEST: - case GL_INDEX_CLEAR_VALUE: - case GL_INDEX_WRITEMASK: - case GL_INDEX_MODE: - case GL_RGBA_MODE: - case GL_DOUBLEBUFFER: - case GL_STEREO: - case GL_RENDER_MODE: - case GL_PERSPECTIVE_CORRECTION_HINT: - case GL_POINT_SMOOTH_HINT: - case GL_LINE_SMOOTH_HINT: - case GL_POLYGON_SMOOTH_HINT: - case GL_FOG_HINT: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_Q: - case GL_PIXEL_MAP_I_TO_I: - case GL_PIXEL_MAP_I_TO_I_SIZE: - case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: - case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: - case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: - case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: - case GL_PIXEL_MAP_A_TO_A_SIZE: - case GL_UNPACK_SWAP_BYTES: - case GL_UNPACK_LSB_FIRST: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_ALIGNMENT: - case GL_PACK_SWAP_BYTES: - case GL_PACK_LSB_FIRST: - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_ALIGNMENT: - case GL_MAP_COLOR: - case GL_MAP_STENCIL: - case GL_INDEX_SHIFT: - case GL_INDEX_OFFSET: - case GL_RED_SCALE: - case GL_RED_BIAS: - case GL_ZOOM_X: - case GL_ZOOM_Y: - case GL_GREEN_SCALE: - case GL_GREEN_BIAS: - case GL_BLUE_SCALE: - case GL_BLUE_BIAS: - case GL_ALPHA_SCALE: - case GL_ALPHA_BIAS: - case GL_DEPTH_SCALE: - case GL_DEPTH_BIAS: - case GL_MAX_EVAL_ORDER: - case GL_MAX_LIGHTS: - case GL_MAX_CLIP_PLANES: - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_PIXEL_MAP_TABLE: - case GL_MAX_ATTRIB_STACK_DEPTH: - case GL_MAX_MODELVIEW_STACK_DEPTH: - case GL_MAX_NAME_STACK_DEPTH: - case GL_MAX_PROJECTION_STACK_DEPTH: - case GL_MAX_TEXTURE_STACK_DEPTH: - case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: - case GL_SUBPIXEL_BITS: - case GL_INDEX_BITS: - case GL_RED_BITS: - case GL_GREEN_BITS: - case GL_BLUE_BITS: - case GL_ALPHA_BITS: - case GL_DEPTH_BITS: - case GL_STENCIL_BITS: - case GL_ACCUM_RED_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_ALPHA_BITS: - case GL_NAME_STACK_DEPTH: - case GL_AUTO_NORMAL: - case GL_MAP1_COLOR_4: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - case GL_MAP1_GRID_SEGMENTS: - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_POLYGON_OFFSET_UNITS: - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - case GL_BLEND_EQUATION: -/* case GL_BLEND_EQUATION_EXT:*/ - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_SEPARABLE_2D: - case GL_MAX_CONVOLUTION_WIDTH: -/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ - case GL_MAX_CONVOLUTION_HEIGHT: -/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ - case GL_POST_CONVOLUTION_RED_SCALE: -/* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_GREEN_SCALE: -/* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_BLUE_SCALE: -/* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_ALPHA_SCALE: -/* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_RED_BIAS: -/* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_GREEN_BIAS: -/* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_BLUE_BIAS: -/* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_ALPHA_BIAS: -/* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ - case GL_HISTOGRAM: - case GL_MINMAX: - case GL_POLYGON_OFFSET_FACTOR: - case GL_RESCALE_NORMAL: -/* case GL_RESCALE_NORMAL_EXT:*/ - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_BINDING_3D: - case GL_PACK_SKIP_IMAGES: - case GL_PACK_IMAGE_HEIGHT: - case GL_UNPACK_SKIP_IMAGES: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_TEXTURE_3D: - case GL_MAX_3D_TEXTURE_SIZE: - case GL_VERTEX_ARRAY: - case GL_NORMAL_ARRAY: - case GL_COLOR_ARRAY: - case GL_INDEX_ARRAY: - case GL_TEXTURE_COORD_ARRAY: - case GL_EDGE_FLAG_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_TYPE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMAL_ARRAY_STRIDE: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_ARRAY_STRIDE: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_EDGE_FLAG_ARRAY_STRIDE: - case GL_MULTISAMPLE: -/* case GL_MULTISAMPLE_ARB:*/ - case GL_SAMPLE_ALPHA_TO_COVERAGE: -/* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ - case GL_SAMPLE_ALPHA_TO_ONE: -/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ - case GL_SAMPLE_COVERAGE: -/* case GL_SAMPLE_COVERAGE_ARB:*/ - case GL_SAMPLE_BUFFERS: -/* case GL_SAMPLE_BUFFERS_ARB:*/ - case GL_SAMPLES: -/* case GL_SAMPLES_ARB:*/ - case GL_SAMPLE_COVERAGE_VALUE: -/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ - case GL_SAMPLE_COVERAGE_INVERT: -/* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ - case GL_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - case GL_BLEND_DST_RGB: - case GL_BLEND_SRC_RGB: - case GL_BLEND_DST_ALPHA: - case GL_BLEND_SRC_ALPHA: - case GL_COLOR_TABLE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_ELEMENTS_INDICES: - case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: - case GL_OCCLUSION_TEST_HP: - case GL_OCCLUSION_TEST_RESULT_HP: - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_CURRENT_FOG_COORD: - case GL_FOG_COORDINATE_ARRAY_TYPE: - case GL_FOG_COORDINATE_ARRAY_STRIDE: - case GL_FOG_COORD_ARRAY: - case GL_COLOR_SUM_ARB: - case GL_SECONDARY_COLOR_ARRAY_SIZE: - case GL_SECONDARY_COLOR_ARRAY_TYPE: - case GL_SECONDARY_COLOR_ARRAY_STRIDE: - case GL_SECONDARY_COLOR_ARRAY: - case GL_ACTIVE_TEXTURE: -/* case GL_ACTIVE_TEXTURE_ARB:*/ - case GL_CLIENT_ACTIVE_TEXTURE: -/* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ - case GL_MAX_TEXTURE_UNITS: -/* case GL_MAX_TEXTURE_UNITS_ARB:*/ - case GL_MAX_RENDERBUFFER_SIZE_EXT: - case GL_TEXTURE_COMPRESSION_HINT: -/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ - case GL_TEXTURE_RECTANGLE_ARB: -/* case GL_TEXTURE_RECTANGLE_NV:*/ - case GL_TEXTURE_BINDING_RECTANGLE_ARB: -/* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ - case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: -/* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ - case GL_MAX_TEXTURE_LOD_BIAS: - case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_MAX_SHININESS_NV: - case GL_MAX_SPOT_EXPONENT_NV: - case GL_TEXTURE_CUBE_MAP: -/* case GL_TEXTURE_CUBE_MAP_ARB:*/ - case GL_TEXTURE_BINDING_CUBE_MAP: -/* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ - case GL_MAX_CUBE_MAP_TEXTURE_SIZE: -/* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ - case GL_MULTISAMPLE_FILTER_HINT_NV: - case GL_FOG_DISTANCE_MODE_NV: - case GL_VERTEX_PROGRAM_ARB: - case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: - case GL_MAX_PROGRAM_MATRICES_ARB: - case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: - case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: - case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: - case GL_PROGRAM_ERROR_POSITION_ARB: - case GL_DEPTH_CLAMP_NV: - case GL_NUM_COMPRESSED_TEXTURE_FORMATS: -/* case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/ - case GL_MAX_VERTEX_UNITS_ARB: - case GL_ACTIVE_VERTEX_UNITS_ARB: - case GL_WEIGHT_SUM_UNITY_ARB: - case GL_VERTEX_BLEND_ARB: - case GL_CURRENT_WEIGHT_ARB: - case GL_WEIGHT_ARRAY_TYPE_ARB: - case GL_WEIGHT_ARRAY_STRIDE_ARB: - case GL_WEIGHT_ARRAY_SIZE_ARB: - case GL_WEIGHT_ARRAY_ARB: - case GL_PACK_INVERT_MESA: - case GL_STENCIL_BACK_FUNC_ATI: - case GL_STENCIL_BACK_FAIL_ATI: - case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI: - case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI: - case GL_FRAGMENT_PROGRAM_ARB: - case GL_MAX_DRAW_BUFFERS_ARB: -/* case GL_MAX_DRAW_BUFFERS_ATI:*/ - case GL_DRAW_BUFFER0_ARB: -/* case GL_DRAW_BUFFER0_ATI:*/ - case GL_DRAW_BUFFER1_ARB: -/* case GL_DRAW_BUFFER1_ATI:*/ - case GL_DRAW_BUFFER2_ARB: -/* case GL_DRAW_BUFFER2_ATI:*/ - case GL_DRAW_BUFFER3_ARB: -/* case GL_DRAW_BUFFER3_ATI:*/ - case GL_DRAW_BUFFER4_ARB: -/* case GL_DRAW_BUFFER4_ATI:*/ - case GL_DRAW_BUFFER5_ARB: -/* case GL_DRAW_BUFFER5_ATI:*/ - case GL_DRAW_BUFFER6_ARB: -/* case GL_DRAW_BUFFER6_ATI:*/ - case GL_DRAW_BUFFER7_ARB: -/* case GL_DRAW_BUFFER7_ATI:*/ - case GL_DRAW_BUFFER8_ARB: -/* case GL_DRAW_BUFFER8_ATI:*/ - case GL_DRAW_BUFFER9_ARB: -/* case GL_DRAW_BUFFER9_ATI:*/ - case GL_DRAW_BUFFER10_ARB: -/* case GL_DRAW_BUFFER10_ATI:*/ - case GL_DRAW_BUFFER11_ARB: -/* case GL_DRAW_BUFFER11_ATI:*/ - case GL_DRAW_BUFFER12_ARB: -/* case GL_DRAW_BUFFER12_ATI:*/ - case GL_DRAW_BUFFER13_ARB: -/* case GL_DRAW_BUFFER13_ATI:*/ - case GL_DRAW_BUFFER14_ARB: -/* case GL_DRAW_BUFFER14_ATI:*/ - case GL_DRAW_BUFFER15_ARB: -/* case GL_DRAW_BUFFER15_ATI:*/ - case GL_BLEND_EQUATION_ALPHA_EXT: - case GL_MATRIX_PALETTE_ARB: - case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: - case GL_MAX_PALETTE_MATRICES_ARB: - case GL_CURRENT_PALETTE_MATRIX_ARB: - case GL_MATRIX_INDEX_ARRAY_ARB: - case GL_CURRENT_MATRIX_INDEX_ARB: - case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: - case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: - case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: - case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT: - case GL_POINT_SPRITE_ARB: -/* case GL_POINT_SPRITE_NV:*/ - case GL_POINT_SPRITE_R_MODE_NV: - case GL_MAX_VERTEX_ATTRIBS_ARB: - case GL_MAX_TEXTURE_COORDS_ARB: - case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: - case GL_DEPTH_BOUNDS_TEST_EXT: - case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT: - case GL_STENCIL_TEST_TWO_SIDE_EXT: - case GL_ACTIVE_STENCIL_FACE_EXT: - case GL_TEXTURE_BINDING_1D_ARRAY_EXT: - case GL_TEXTURE_BINDING_2D_ARRAY_EXT: - case GL_DRAW_FRAMEBUFFER_BINDING_EXT: - case GL_RENDERBUFFER_BINDING_EXT: - case GL_READ_FRAMEBUFFER_BINDING_EXT: - case GL_MAX_COLOR_ATTACHMENTS_EXT: - case GL_RASTER_POSITION_UNCLIPPED_IBM: - return 1; - case GL_SMOOTH_POINT_SIZE_RANGE: - case GL_LINE_WIDTH_RANGE: - case GL_POLYGON_MODE: - case GL_DEPTH_RANGE: - case GL_MAX_VIEWPORT_DIMS: - case GL_MAP1_GRID_DOMAIN: - case GL_MAP2_GRID_SEGMENTS: - case GL_ALIASED_POINT_SIZE_RANGE: - case GL_ALIASED_LINE_WIDTH_RANGE: - case GL_DEPTH_BOUNDS_EXT: - return 2; - case GL_CURRENT_NORMAL: - return 3; - case GL_CURRENT_COLOR: - case GL_CURRENT_TEXTURE_COORDS: - case GL_CURRENT_RASTER_COLOR: - case GL_CURRENT_RASTER_TEXTURE_COORDS: - case GL_CURRENT_RASTER_POSITION: - case GL_LIGHT_MODEL_AMBIENT: - case GL_FOG_COLOR: - case GL_ACCUM_CLEAR_VALUE: - case GL_VIEWPORT: - case GL_SCISSOR_BOX: - case GL_COLOR_CLEAR_VALUE: - case GL_COLOR_WRITEMASK: - case GL_MAP2_GRID_DOMAIN: - case GL_BLEND_COLOR: -/* case GL_BLEND_COLOR_EXT:*/ - case GL_CURRENT_SECONDARY_COLOR: - return 4; - case GL_MODELVIEW_MATRIX: - case GL_PROJECTION_MATRIX: - case GL_TEXTURE_MATRIX: - case GL_MODELVIEW0_ARB: - case GL_COLOR_MATRIX: - case GL_MODELVIEW1_ARB: - case GL_CURRENT_MATRIX_ARB: - case GL_MODELVIEW2_ARB: - case GL_MODELVIEW3_ARB: - case GL_MODELVIEW4_ARB: - case GL_MODELVIEW5_ARB: - case GL_MODELVIEW6_ARB: - case GL_MODELVIEW7_ARB: - case GL_MODELVIEW8_ARB: - case GL_MODELVIEW9_ARB: - case GL_MODELVIEW10_ARB: - case GL_MODELVIEW11_ARB: - case GL_MODELVIEW12_ARB: - case GL_MODELVIEW13_ARB: - case GL_MODELVIEW14_ARB: - case GL_MODELVIEW15_ARB: - case GL_MODELVIEW16_ARB: - case GL_MODELVIEW17_ARB: - case GL_MODELVIEW18_ARB: - case GL_MODELVIEW19_ARB: - case GL_MODELVIEW20_ARB: - case GL_MODELVIEW21_ARB: - case GL_MODELVIEW22_ARB: - case GL_MODELVIEW23_ARB: - case GL_MODELVIEW24_ARB: - case GL_MODELVIEW25_ARB: - case GL_MODELVIEW26_ARB: - case GL_MODELVIEW27_ARB: - case GL_MODELVIEW28_ARB: - case GL_MODELVIEW29_ARB: - case GL_MODELVIEW30_ARB: - case GL_MODELVIEW31_ARB: - case GL_TRANSPOSE_CURRENT_MATRIX_ARB: - return 16; - case GL_FOG_COORDINATE_SOURCE: - case GL_COMPRESSED_TEXTURE_FORMATS: - return __glGetBooleanv_variable_size(e); - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetTexParameterfv_size(GLenum e) -{ - switch (e) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: -/* case GL_SHADOW_AMBIENT_SGIX:*/ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_CLIPMAP_FRAME_SGIX: - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - case GL_GENERATE_MIPMAP: -/* case GL_GENERATE_MIPMAP_SGIS:*/ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_TEXTURE_LOD_BIAS: -/* case GL_TEXTURE_LOD_BIAS_EXT:*/ - case GL_DEPTH_TEXTURE_MODE: -/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_MODE: -/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_FUNC: -/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - case GL_TEXTURE_CLIPMAP_CENTER_SGIX: - case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: - return 2; - case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: - return 3; - case GL_TEXTURE_BORDER_COLOR: - case GL_POST_TEXTURE_FILTER_BIAS_SGIX: - case GL_POST_TEXTURE_FILTER_SCALE_SGIX: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetTexLevelParameterfv_size(GLenum e) -{ - switch (e) { - case GL_TEXTURE_WIDTH: - case GL_TEXTURE_HEIGHT: - case GL_TEXTURE_COMPONENTS: - case GL_TEXTURE_BORDER: - case GL_TEXTURE_RED_SIZE: -/* case GL_TEXTURE_RED_SIZE_EXT:*/ - case GL_TEXTURE_GREEN_SIZE: -/* case GL_TEXTURE_GREEN_SIZE_EXT:*/ - case GL_TEXTURE_BLUE_SIZE: -/* case GL_TEXTURE_BLUE_SIZE_EXT:*/ - case GL_TEXTURE_ALPHA_SIZE: -/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ - case GL_TEXTURE_LUMINANCE_SIZE: -/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ - case GL_TEXTURE_INTENSITY_SIZE: -/* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ - case GL_TEXTURE_DEPTH: - case GL_TEXTURE_INDEX_SIZE_EXT: - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: -/* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ - case GL_TEXTURE_COMPRESSED: -/* case GL_TEXTURE_COMPRESSED_ARB:*/ - case GL_TEXTURE_DEPTH_SIZE: -/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glColorTableParameterfv_size(GLenum e) -{ - switch (e) { - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetColorTableParameterfv_size(GLenum e) -{ - switch (e) { - case GL_COLOR_TABLE_FORMAT: -/* case GL_COLOR_TABLE_FORMAT_EXT:*/ - case GL_COLOR_TABLE_WIDTH: -/* case GL_COLOR_TABLE_WIDTH_EXT:*/ - case GL_COLOR_TABLE_RED_SIZE: -/* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ - case GL_COLOR_TABLE_GREEN_SIZE: -/* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ - case GL_COLOR_TABLE_BLUE_SIZE: -/* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ - case GL_COLOR_TABLE_ALPHA_SIZE: -/* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ - case GL_COLOR_TABLE_LUMINANCE_SIZE: -/* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ - case GL_COLOR_TABLE_INTENSITY_SIZE: -/* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ - return 1; - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glConvolutionParameterfv_size(GLenum e) -{ - switch (e) { - case GL_CONVOLUTION_BORDER_MODE: -/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ - return 1; - case GL_CONVOLUTION_FILTER_SCALE: -/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ - case GL_CONVOLUTION_FILTER_BIAS: -/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ - case GL_CONVOLUTION_BORDER_COLOR: -/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetConvolutionParameterfv_size(GLenum e) -{ - switch (e) { - case GL_CONVOLUTION_BORDER_MODE: -/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ - case GL_CONVOLUTION_FORMAT: -/* case GL_CONVOLUTION_FORMAT_EXT:*/ - case GL_CONVOLUTION_WIDTH: -/* case GL_CONVOLUTION_WIDTH_EXT:*/ - case GL_CONVOLUTION_HEIGHT: -/* case GL_CONVOLUTION_HEIGHT_EXT:*/ - case GL_MAX_CONVOLUTION_WIDTH: -/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ - case GL_MAX_CONVOLUTION_HEIGHT: -/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ - return 1; - case GL_CONVOLUTION_FILTER_SCALE: -/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ - case GL_CONVOLUTION_FILTER_BIAS: -/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ - case GL_CONVOLUTION_BORDER_COLOR: -/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ - return 4; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetHistogramParameterfv_size(GLenum e) -{ - switch (e) { - case GL_HISTOGRAM_WIDTH: - case GL_HISTOGRAM_FORMAT: - case GL_HISTOGRAM_RED_SIZE: - case GL_HISTOGRAM_GREEN_SIZE: - case GL_HISTOGRAM_BLUE_SIZE: - case GL_HISTOGRAM_ALPHA_SIZE: - case GL_HISTOGRAM_LUMINANCE_SIZE: - case GL_HISTOGRAM_SINK: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetMinmaxParameterfv_size(GLenum e) -{ - switch (e) { - case GL_MINMAX_FORMAT: - case GL_MINMAX_SINK: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetProgramivARB_size(GLenum e) -{ - switch (e) { - case GL_PROGRAM_LENGTH_ARB: - case GL_PROGRAM_BINDING_ARB: - case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEX_INDIRECTIONS_ARB: - case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: - case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: - case GL_PROGRAM_FORMAT_ARB: - case GL_PROGRAM_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEMPORARIES_ARB: - case GL_MAX_PROGRAM_TEMPORARIES_ARB: - case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: - case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: - case GL_PROGRAM_PARAMETERS_ARB: - case GL_MAX_PROGRAM_PARAMETERS_ARB: - case GL_PROGRAM_NATIVE_PARAMETERS_ARB: - case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: - case GL_PROGRAM_ATTRIBS_ARB: - case GL_MAX_PROGRAM_ATTRIBS_ARB: - case GL_PROGRAM_NATIVE_ATTRIBS_ARB: - case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: - case GL_PROGRAM_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: - case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: - case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: - case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: - case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: - case GL_MAX_PROGRAM_CALL_DEPTH_NV: - case GL_MAX_PROGRAM_IF_DEPTH_NV: - case GL_MAX_PROGRAM_LOOP_DEPTH_NV: - case GL_MAX_PROGRAM_LOOP_COUNT_NV: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetVertexAttribdvARB_size(GLenum e) -{ - switch (e) { - case GL_VERTEX_PROGRAM_ARB: - case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: - case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: - case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: - case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: - case GL_CURRENT_VERTEX_ATTRIB_ARB: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetQueryObjectivARB_size(GLenum e) -{ - switch (e) { - case GL_QUERY_RESULT_ARB: - case GL_QUERY_RESULT_AVAILABLE_ARB: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetQueryivARB_size(GLenum e) -{ - switch (e) { - case GL_QUERY_COUNTER_BITS_ARB: - case GL_CURRENT_QUERY_ARB: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glPointParameterfvEXT_size(GLenum e) -{ - switch (e) { - case GL_POINT_SIZE_MIN: -/* case GL_POINT_SIZE_MIN_ARB:*/ -/* case GL_POINT_SIZE_MIN_SGIS:*/ - case GL_POINT_SIZE_MAX: -/* case GL_POINT_SIZE_MAX_ARB:*/ -/* case GL_POINT_SIZE_MAX_SGIS:*/ - case GL_POINT_FADE_THRESHOLD_SIZE: -/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ -/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ - case GL_POINT_SPRITE_R_MODE_NV: - case GL_POINT_SPRITE_COORD_ORIGIN: - return 1; - case GL_POINT_DISTANCE_ATTENUATION: -/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ -/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ - return 3; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetProgramivNV_size(GLenum e) -{ - switch (e) { - case GL_PROGRAM_LENGTH_NV: - case GL_PROGRAM_TARGET_NV: - case GL_PROGRAM_RESIDENT_NV: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetVertexAttribdvNV_size(GLenum e) -{ - switch (e) { - case GL_ATTRIB_ARRAY_SIZE_NV: - case GL_ATTRIB_ARRAY_STRIDE_NV: - case GL_ATTRIB_ARRAY_TYPE_NV: - case GL_CURRENT_ATTRIB_NV: - return 1; - default: - return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetFramebufferAttachmentParameterivEXT_size(GLenum e) -{ - switch (e) { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: - return 1; - default: - return 0; - } -} - -ALIAS(Fogiv, Fogfv) - ALIAS(Lightiv, Lightfv) - ALIAS(LightModeliv, LightModelfv) - ALIAS(Materialiv, Materialfv) - ALIAS(TexParameteriv, TexParameterfv) - ALIAS(TexEnviv, TexEnvfv) - ALIAS(TexGenfv, TexGendv) - ALIAS(TexGeniv, TexGendv) - ALIAS(Map1f, Map1d) - ALIAS(Map2f, Map2d) - ALIAS(GetDoublev, GetBooleanv) - ALIAS(GetFloatv, GetBooleanv) - ALIAS(GetIntegerv, GetBooleanv) - ALIAS(GetLightfv, Lightfv) - ALIAS(GetLightiv, Lightfv) - ALIAS(GetMaterialfv, Materialfv) - ALIAS(GetMaterialiv, Materialfv) - ALIAS(GetTexEnvfv, TexEnvfv) - ALIAS(GetTexEnviv, TexEnvfv) - ALIAS(GetTexGendv, TexGendv) - ALIAS(GetTexGenfv, TexGendv) - ALIAS(GetTexGeniv, TexGendv) - ALIAS(GetTexParameteriv, GetTexParameterfv) - ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv) - ALIAS(ColorTableParameteriv, ColorTableParameterfv) - ALIAS(GetColorTableParameteriv, GetColorTableParameterfv) - ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) - ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv) - ALIAS(GetHistogramParameteriv, GetHistogramParameterfv) - ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv) - ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB) - ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB) - ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB) - ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV) - ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV) - ALIAS(PointParameterivNV, PointParameterfvEXT) -# undef PURE -# undef FASTCALL -# undef INTERNAL diff --git a/GL/glx/indirect_size_get.h b/GL/glx/indirect_size_get.h deleted file mode 100644 index 4fcb55b4e..000000000 --- a/GL/glx/indirect_size_get.h +++ /dev/null @@ -1,102 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2004 - * 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 - * IBM, - * AND/OR THEIR 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. - */ - -#if !defined( _INDIRECT_SIZE_GET_H_ ) -# define _INDIRECT_SIZE_GET_H_ - -/** - * \file - * Prototypes for functions used to determine the number of data elements in - * various GLX protocol messages. - * - * \author Ian Romanick - */ - -# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif - -# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif - -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) -# define INTERNAL __attribute__((visibility("internal"))) -# else -# define INTERNAL -# endif - -extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint -__glGetConvolutionParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint -__glGetConvolutionParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum); -extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum); -extern INTERNAL PURE FASTCALL GLint -__glGetFramebufferAttachmentParameterivEXT_size(GLenum); - -# undef PURE -# undef FASTCALL -# undef INTERNAL - -#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */ diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c deleted file mode 100644 index cb3202605..000000000 --- a/GL/glx/indirect_table.c +++ /dev/null @@ -1,1596 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005, 2006 - * 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 - * IBM, - * AND/OR THEIR 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. - */ - -#include -#include "glxserver.h" -#include "glxext.h" -#include "indirect_dispatch.h" -#include "indirect_reqsize.h" -#include "g_disptab.h" -#include "indirect_table.h" - -/*****************************************************************/ -/* tree depth = 3 */ -static const int_fast16_t Single_dispatch_tree[24] = { - /* [0] -> opcode range [0, 256], node depth 1 */ - 2, - 5, - 13, - 16, - EMPTY_LEAF, - - /* [5] -> opcode range [0, 64], node depth 2 */ - 2, - LEAF(0), - LEAF(16), - 10, - EMPTY_LEAF, - - /* [10] -> opcode range [32, 48], node depth 3 */ - 1, - LEAF(32), - EMPTY_LEAF, - - /* [13] -> opcode range [64, 128], node depth 2 */ - 1, - EMPTY_LEAF, - LEAF(40), - - /* [16] -> opcode range [128, 192], node depth 2 */ - 2, - LEAF(72), - LEAF(88), - 21, - EMPTY_LEAF, - - /* [21] -> opcode range [160, 176], node depth 3 */ - 1, - LEAF(104), - EMPTY_LEAF, - -}; - -static const void *Single_function_table[112][2] = { - /* [ 0] = 0 */ {NULL, NULL}, - /* [ 1] = 1 */ {__glXDisp_Render, __glXDispSwap_Render}, - /* [ 2] = 2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge}, - /* [ 3] = 3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext}, - /* [ 4] = 4 */ {__glXDisp_DestroyContext, __glXDispSwap_DestroyContext}, - /* [ 5] = 5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent}, - /* [ 6] = 6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect}, - /* [ 7] = 7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion}, - /* [ 8] = 8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL}, - /* [ 9] = 9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX}, - /* [ 10] = 10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext}, - /* [ 11] = 11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers}, - /* [ 12] = 12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont}, - /* [ 13] = 13 */ {__glXDisp_CreateGLXPixmap, __glXDispSwap_CreateGLXPixmap}, - /* [ 14] = 14 */ {__glXDisp_GetVisualConfigs, __glXDispSwap_GetVisualConfigs}, - /* [ 15] = 15 */ {__glXDisp_DestroyGLXPixmap, __glXDispSwap_DestroyGLXPixmap}, - /* [ 16] = 16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate}, - /* [ 17] = 17 */ {__glXDisp_VendorPrivateWithReply, __glXDispSwap_VendorPrivateWithReply}, - /* [ 18] = 18 */ {__glXDisp_QueryExtensionsString, __glXDispSwap_QueryExtensionsString}, - /* [ 19] = 19 */ {__glXDisp_QueryServerString, __glXDispSwap_QueryServerString}, - /* [ 20] = 20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo}, - /* [ 21] = 21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs}, - /* [ 22] = 22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap}, - /* [ 23] = 23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap}, - /* [ 24] = 24 */ {__glXDisp_CreateNewContext, __glXDispSwap_CreateNewContext}, - /* [ 25] = 25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext}, - /* [ 26] = 26 */ {__glXDisp_MakeContextCurrent, __glXDispSwap_MakeContextCurrent}, - /* [ 27] = 27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer}, - /* [ 28] = 28 */ {__glXDisp_DestroyPbuffer, __glXDispSwap_DestroyPbuffer}, - /* [ 29] = 29 */ {__glXDisp_GetDrawableAttributes, __glXDispSwap_GetDrawableAttributes}, - /* [ 30] = 30 */ {__glXDisp_ChangeDrawableAttributes, __glXDispSwap_ChangeDrawableAttributes}, - /* [ 31] = 31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow}, - /* [ 32] = 32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow}, - /* [ 33] = 33 */ {NULL, NULL}, - /* [ 34] = 34 */ {NULL, NULL}, - /* [ 35] = 35 */ {NULL, NULL}, - /* [ 36] = 36 */ {NULL, NULL}, - /* [ 37] = 37 */ {NULL, NULL}, - /* [ 38] = 38 */ {NULL, NULL}, - /* [ 39] = 39 */ {NULL, NULL}, - /* [ 40] = 96 */ {NULL, NULL}, - /* [ 41] = 97 */ {NULL, NULL}, - /* [ 42] = 98 */ {NULL, NULL}, - /* [ 43] = 99 */ {NULL, NULL}, - /* [ 44] = 100 */ {NULL, NULL}, - /* [ 45] = 101 */ {__glXDisp_NewList, __glXDispSwap_NewList}, - /* [ 46] = 102 */ {__glXDisp_EndList, __glXDispSwap_EndList}, - /* [ 47] = 103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists}, - /* [ 48] = 104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists}, - /* [ 49] = 105 */ {__glXDisp_FeedbackBuffer, __glXDispSwap_FeedbackBuffer}, - /* [ 50] = 106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer}, - /* [ 51] = 107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode}, - /* [ 52] = 108 */ {__glXDisp_Finish, __glXDispSwap_Finish}, - /* [ 53] = 109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref}, - /* [ 54] = 110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei}, - /* [ 55] = 111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels}, - /* [ 56] = 112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv}, - /* [ 57] = 113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane}, - /* [ 58] = 114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev}, - /* [ 59] = 115 */ {__glXDisp_GetError, __glXDispSwap_GetError}, - /* [ 60] = 116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv}, - /* [ 61] = 117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv}, - /* [ 62] = 118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv}, - /* [ 63] = 119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv}, - /* [ 64] = 120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv}, - /* [ 65] = 121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv}, - /* [ 66] = 122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv}, - /* [ 67] = 123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv}, - /* [ 68] = 124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv}, - /* [ 69] = 125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv}, - /* [ 70] = 126 */ {__glXDisp_GetPixelMapuiv, __glXDispSwap_GetPixelMapuiv}, - /* [ 71] = 127 */ {__glXDisp_GetPixelMapusv, __glXDispSwap_GetPixelMapusv}, - /* [ 72] = 128 */ {__glXDisp_GetPolygonStipple, __glXDispSwap_GetPolygonStipple}, - /* [ 73] = 129 */ {__glXDisp_GetString, __glXDispSwap_GetString}, - /* [ 74] = 130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv}, - /* [ 75] = 131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv}, - /* [ 76] = 132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv}, - /* [ 77] = 133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv}, - /* [ 78] = 134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv}, - /* [ 79] = 135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage}, - /* [ 80] = 136 */ {__glXDisp_GetTexParameterfv, __glXDispSwap_GetTexParameterfv}, - /* [ 81] = 137 */ {__glXDisp_GetTexParameteriv, __glXDispSwap_GetTexParameteriv}, - /* [ 82] = 138 */ {__glXDisp_GetTexLevelParameterfv, __glXDispSwap_GetTexLevelParameterfv}, - /* [ 83] = 139 */ {__glXDisp_GetTexLevelParameteriv, __glXDispSwap_GetTexLevelParameteriv}, - /* [ 84] = 140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled}, - /* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList}, - /* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush}, - /* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident}, - /* [ 88] = 144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures}, - /* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures}, - /* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture}, - /* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable}, - /* [ 92] = 148 */ {__glXDisp_GetColorTableParameterfv, __glXDispSwap_GetColorTableParameterfv}, - /* [ 93] = 149 */ {__glXDisp_GetColorTableParameteriv, __glXDispSwap_GetColorTableParameteriv}, - /* [ 94] = 150 */ {__glXDisp_GetConvolutionFilter, __glXDispSwap_GetConvolutionFilter}, - /* [ 95] = 151 */ {__glXDisp_GetConvolutionParameterfv, __glXDispSwap_GetConvolutionParameterfv}, - /* [ 96] = 152 */ {__glXDisp_GetConvolutionParameteriv, __glXDispSwap_GetConvolutionParameteriv}, - /* [ 97] = 153 */ {__glXDisp_GetSeparableFilter, __glXDispSwap_GetSeparableFilter}, - /* [ 98] = 154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram}, - /* [ 99] = 155 */ {__glXDisp_GetHistogramParameterfv, __glXDispSwap_GetHistogramParameterfv}, - /* [ 100] = 156 */ {__glXDisp_GetHistogramParameteriv, __glXDispSwap_GetHistogramParameteriv}, - /* [ 101] = 157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax}, - /* [ 102] = 158 */ {__glXDisp_GetMinmaxParameterfv, __glXDispSwap_GetMinmaxParameterfv}, - /* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv, __glXDispSwap_GetMinmaxParameteriv}, - /* [ 104] = 160 */ {__glXDisp_GetCompressedTexImageARB, __glXDispSwap_GetCompressedTexImageARB}, - /* [ 105] = 161 */ {__glXDisp_DeleteQueriesARB, __glXDispSwap_DeleteQueriesARB}, - /* [ 106] = 162 */ {__glXDisp_GenQueriesARB, __glXDispSwap_GenQueriesARB}, - /* [ 107] = 163 */ {__glXDisp_IsQueryARB, __glXDispSwap_IsQueryARB}, - /* [ 108] = 164 */ {__glXDisp_GetQueryivARB, __glXDispSwap_GetQueryivARB}, - /* [ 109] = 165 */ {__glXDisp_GetQueryObjectivARB, __glXDispSwap_GetQueryObjectivARB}, - /* [ 110] = 166 */ {__glXDisp_GetQueryObjectuivARB, __glXDispSwap_GetQueryObjectuivARB}, - /* [ 111] = 167 */ {NULL, NULL}, -}; - -const struct __glXDispatchInfo Single_dispatch_info = { - 8, - Single_dispatch_tree, - Single_function_table, - NULL, - NULL -}; - -/*****************************************************************/ -/* tree depth = 8 */ -static const int_fast16_t Render_dispatch_tree[95] = { - /* [0] -> opcode range [0, 8192], node depth 1 */ - 2, - 5, - 31, - 54, - EMPTY_LEAF, - - /* [5] -> opcode range [0, 2048], node depth 2 */ - 1, - 8, - EMPTY_LEAF, - - /* [8] -> opcode range [0, 1024], node depth 3 */ - 1, - 11, - EMPTY_LEAF, - - /* [11] -> opcode range [0, 512], node depth 4 */ - 1, - 14, - EMPTY_LEAF, - - /* [14] -> opcode range [0, 256], node depth 5 */ - 4, - LEAF(0), - LEAF(16), - LEAF(32), - LEAF(48), - LEAF(64), - LEAF(80), - LEAF(96), - LEAF(112), - LEAF(128), - LEAF(144), - LEAF(160), - LEAF(176), - LEAF(192), - LEAF(208), - LEAF(224), - EMPTY_LEAF, - - /* [31] -> opcode range [2048, 4096], node depth 2 */ - 1, - 34, - EMPTY_LEAF, - - /* [34] -> opcode range [2048, 3072], node depth 3 */ - 1, - 37, - EMPTY_LEAF, - - /* [37] -> opcode range [2048, 2560], node depth 4 */ - 1, - 40, - EMPTY_LEAF, - - /* [40] -> opcode range [2048, 2304], node depth 5 */ - 1, - 43, - EMPTY_LEAF, - - /* [43] -> opcode range [2048, 2176], node depth 6 */ - 1, - 46, - EMPTY_LEAF, - - /* [46] -> opcode range [2048, 2112], node depth 7 */ - 1, - 49, - EMPTY_LEAF, - - /* [49] -> opcode range [2048, 2080], node depth 8 */ - 2, - LEAF(240), - LEAF(248), - LEAF(256), - EMPTY_LEAF, - - /* [54] -> opcode range [4096, 6144], node depth 2 */ - 1, - 57, - EMPTY_LEAF, - - /* [57] -> opcode range [4096, 5120], node depth 3 */ - 1, - 60, - EMPTY_LEAF, - - /* [60] -> opcode range [4096, 4608], node depth 4 */ - 1, - 63, - EMPTY_LEAF, - - /* [63] -> opcode range [4096, 4352], node depth 5 */ - 4, - LEAF(264), - LEAF(280), - 80, - EMPTY_LEAF, - EMPTY_LEAF, - LEAF(296), - LEAF(312), - LEAF(328), - LEAF(344), - EMPTY_LEAF, - 83, - 86, - EMPTY_LEAF, - 89, - 92, - EMPTY_LEAF, - - /* [80] -> opcode range [4128, 4144], node depth 6 */ - 1, - LEAF(360), - EMPTY_LEAF, - - /* [83] -> opcode range [4256, 4272], node depth 6 */ - 1, - EMPTY_LEAF, - LEAF(368), - - /* [86] -> opcode range [4272, 4288], node depth 6 */ - 1, - LEAF(376), - EMPTY_LEAF, - - /* [89] -> opcode range [4304, 4320], node depth 6 */ - 1, - EMPTY_LEAF, - LEAF(384), - - /* [92] -> opcode range [4320, 4336], node depth 6 */ - 1, - LEAF(392), - EMPTY_LEAF, - -}; - -static const void *Render_function_table[400][2] = { - /* [ 0] = 0 */ {NULL, NULL}, - /* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList}, - /* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists}, - /* [ 3] = 3 */ {__glXDisp_ListBase, __glXDispSwap_ListBase}, - /* [ 4] = 4 */ {__glXDisp_Begin, __glXDispSwap_Begin}, - /* [ 5] = 5 */ {__glXDisp_Bitmap, __glXDispSwap_Bitmap}, - /* [ 6] = 6 */ {__glXDisp_Color3bv, __glXDispSwap_Color3bv}, - /* [ 7] = 7 */ {__glXDisp_Color3dv, __glXDispSwap_Color3dv}, - /* [ 8] = 8 */ {__glXDisp_Color3fv, __glXDispSwap_Color3fv}, - /* [ 9] = 9 */ {__glXDisp_Color3iv, __glXDispSwap_Color3iv}, - /* [ 10] = 10 */ {__glXDisp_Color3sv, __glXDispSwap_Color3sv}, - /* [ 11] = 11 */ {__glXDisp_Color3ubv, __glXDispSwap_Color3ubv}, - /* [ 12] = 12 */ {__glXDisp_Color3uiv, __glXDispSwap_Color3uiv}, - /* [ 13] = 13 */ {__glXDisp_Color3usv, __glXDispSwap_Color3usv}, - /* [ 14] = 14 */ {__glXDisp_Color4bv, __glXDispSwap_Color4bv}, - /* [ 15] = 15 */ {__glXDisp_Color4dv, __glXDispSwap_Color4dv}, - /* [ 16] = 16 */ {__glXDisp_Color4fv, __glXDispSwap_Color4fv}, - /* [ 17] = 17 */ {__glXDisp_Color4iv, __glXDispSwap_Color4iv}, - /* [ 18] = 18 */ {__glXDisp_Color4sv, __glXDispSwap_Color4sv}, - /* [ 19] = 19 */ {__glXDisp_Color4ubv, __glXDispSwap_Color4ubv}, - /* [ 20] = 20 */ {__glXDisp_Color4uiv, __glXDispSwap_Color4uiv}, - /* [ 21] = 21 */ {__glXDisp_Color4usv, __glXDispSwap_Color4usv}, - /* [ 22] = 22 */ {__glXDisp_EdgeFlagv, __glXDispSwap_EdgeFlagv}, - /* [ 23] = 23 */ {__glXDisp_End, __glXDispSwap_End}, - /* [ 24] = 24 */ {__glXDisp_Indexdv, __glXDispSwap_Indexdv}, - /* [ 25] = 25 */ {__glXDisp_Indexfv, __glXDispSwap_Indexfv}, - /* [ 26] = 26 */ {__glXDisp_Indexiv, __glXDispSwap_Indexiv}, - /* [ 27] = 27 */ {__glXDisp_Indexsv, __glXDispSwap_Indexsv}, - /* [ 28] = 28 */ {__glXDisp_Normal3bv, __glXDispSwap_Normal3bv}, - /* [ 29] = 29 */ {__glXDisp_Normal3dv, __glXDispSwap_Normal3dv}, - /* [ 30] = 30 */ {__glXDisp_Normal3fv, __glXDispSwap_Normal3fv}, - /* [ 31] = 31 */ {__glXDisp_Normal3iv, __glXDispSwap_Normal3iv}, - /* [ 32] = 32 */ {__glXDisp_Normal3sv, __glXDispSwap_Normal3sv}, - /* [ 33] = 33 */ {__glXDisp_RasterPos2dv, __glXDispSwap_RasterPos2dv}, - /* [ 34] = 34 */ {__glXDisp_RasterPos2fv, __glXDispSwap_RasterPos2fv}, - /* [ 35] = 35 */ {__glXDisp_RasterPos2iv, __glXDispSwap_RasterPos2iv}, - /* [ 36] = 36 */ {__glXDisp_RasterPos2sv, __glXDispSwap_RasterPos2sv}, - /* [ 37] = 37 */ {__glXDisp_RasterPos3dv, __glXDispSwap_RasterPos3dv}, - /* [ 38] = 38 */ {__glXDisp_RasterPos3fv, __glXDispSwap_RasterPos3fv}, - /* [ 39] = 39 */ {__glXDisp_RasterPos3iv, __glXDispSwap_RasterPos3iv}, - /* [ 40] = 40 */ {__glXDisp_RasterPos3sv, __glXDispSwap_RasterPos3sv}, - /* [ 41] = 41 */ {__glXDisp_RasterPos4dv, __glXDispSwap_RasterPos4dv}, - /* [ 42] = 42 */ {__glXDisp_RasterPos4fv, __glXDispSwap_RasterPos4fv}, - /* [ 43] = 43 */ {__glXDisp_RasterPos4iv, __glXDispSwap_RasterPos4iv}, - /* [ 44] = 44 */ {__glXDisp_RasterPos4sv, __glXDispSwap_RasterPos4sv}, - /* [ 45] = 45 */ {__glXDisp_Rectdv, __glXDispSwap_Rectdv}, - /* [ 46] = 46 */ {__glXDisp_Rectfv, __glXDispSwap_Rectfv}, - /* [ 47] = 47 */ {__glXDisp_Rectiv, __glXDispSwap_Rectiv}, - /* [ 48] = 48 */ {__glXDisp_Rectsv, __glXDispSwap_Rectsv}, - /* [ 49] = 49 */ {__glXDisp_TexCoord1dv, __glXDispSwap_TexCoord1dv}, - /* [ 50] = 50 */ {__glXDisp_TexCoord1fv, __glXDispSwap_TexCoord1fv}, - /* [ 51] = 51 */ {__glXDisp_TexCoord1iv, __glXDispSwap_TexCoord1iv}, - /* [ 52] = 52 */ {__glXDisp_TexCoord1sv, __glXDispSwap_TexCoord1sv}, - /* [ 53] = 53 */ {__glXDisp_TexCoord2dv, __glXDispSwap_TexCoord2dv}, - /* [ 54] = 54 */ {__glXDisp_TexCoord2fv, __glXDispSwap_TexCoord2fv}, - /* [ 55] = 55 */ {__glXDisp_TexCoord2iv, __glXDispSwap_TexCoord2iv}, - /* [ 56] = 56 */ {__glXDisp_TexCoord2sv, __glXDispSwap_TexCoord2sv}, - /* [ 57] = 57 */ {__glXDisp_TexCoord3dv, __glXDispSwap_TexCoord3dv}, - /* [ 58] = 58 */ {__glXDisp_TexCoord3fv, __glXDispSwap_TexCoord3fv}, - /* [ 59] = 59 */ {__glXDisp_TexCoord3iv, __glXDispSwap_TexCoord3iv}, - /* [ 60] = 60 */ {__glXDisp_TexCoord3sv, __glXDispSwap_TexCoord3sv}, - /* [ 61] = 61 */ {__glXDisp_TexCoord4dv, __glXDispSwap_TexCoord4dv}, - /* [ 62] = 62 */ {__glXDisp_TexCoord4fv, __glXDispSwap_TexCoord4fv}, - /* [ 63] = 63 */ {__glXDisp_TexCoord4iv, __glXDispSwap_TexCoord4iv}, - /* [ 64] = 64 */ {__glXDisp_TexCoord4sv, __glXDispSwap_TexCoord4sv}, - /* [ 65] = 65 */ {__glXDisp_Vertex2dv, __glXDispSwap_Vertex2dv}, - /* [ 66] = 66 */ {__glXDisp_Vertex2fv, __glXDispSwap_Vertex2fv}, - /* [ 67] = 67 */ {__glXDisp_Vertex2iv, __glXDispSwap_Vertex2iv}, - /* [ 68] = 68 */ {__glXDisp_Vertex2sv, __glXDispSwap_Vertex2sv}, - /* [ 69] = 69 */ {__glXDisp_Vertex3dv, __glXDispSwap_Vertex3dv}, - /* [ 70] = 70 */ {__glXDisp_Vertex3fv, __glXDispSwap_Vertex3fv}, - /* [ 71] = 71 */ {__glXDisp_Vertex3iv, __glXDispSwap_Vertex3iv}, - /* [ 72] = 72 */ {__glXDisp_Vertex3sv, __glXDispSwap_Vertex3sv}, - /* [ 73] = 73 */ {__glXDisp_Vertex4dv, __glXDispSwap_Vertex4dv}, - /* [ 74] = 74 */ {__glXDisp_Vertex4fv, __glXDispSwap_Vertex4fv}, - /* [ 75] = 75 */ {__glXDisp_Vertex4iv, __glXDispSwap_Vertex4iv}, - /* [ 76] = 76 */ {__glXDisp_Vertex4sv, __glXDispSwap_Vertex4sv}, - /* [ 77] = 77 */ {__glXDisp_ClipPlane, __glXDispSwap_ClipPlane}, - /* [ 78] = 78 */ {__glXDisp_ColorMaterial, __glXDispSwap_ColorMaterial}, - /* [ 79] = 79 */ {__glXDisp_CullFace, __glXDispSwap_CullFace}, - /* [ 80] = 80 */ {__glXDisp_Fogf, __glXDispSwap_Fogf}, - /* [ 81] = 81 */ {__glXDisp_Fogfv, __glXDispSwap_Fogfv}, - /* [ 82] = 82 */ {__glXDisp_Fogi, __glXDispSwap_Fogi}, - /* [ 83] = 83 */ {__glXDisp_Fogiv, __glXDispSwap_Fogiv}, - /* [ 84] = 84 */ {__glXDisp_FrontFace, __glXDispSwap_FrontFace}, - /* [ 85] = 85 */ {__glXDisp_Hint, __glXDispSwap_Hint}, - /* [ 86] = 86 */ {__glXDisp_Lightf, __glXDispSwap_Lightf}, - /* [ 87] = 87 */ {__glXDisp_Lightfv, __glXDispSwap_Lightfv}, - /* [ 88] = 88 */ {__glXDisp_Lighti, __glXDispSwap_Lighti}, - /* [ 89] = 89 */ {__glXDisp_Lightiv, __glXDispSwap_Lightiv}, - /* [ 90] = 90 */ {__glXDisp_LightModelf, __glXDispSwap_LightModelf}, - /* [ 91] = 91 */ {__glXDisp_LightModelfv, __glXDispSwap_LightModelfv}, - /* [ 92] = 92 */ {__glXDisp_LightModeli, __glXDispSwap_LightModeli}, - /* [ 93] = 93 */ {__glXDisp_LightModeliv, __glXDispSwap_LightModeliv}, - /* [ 94] = 94 */ {__glXDisp_LineStipple, __glXDispSwap_LineStipple}, - /* [ 95] = 95 */ {__glXDisp_LineWidth, __glXDispSwap_LineWidth}, - /* [ 96] = 96 */ {__glXDisp_Materialf, __glXDispSwap_Materialf}, - /* [ 97] = 97 */ {__glXDisp_Materialfv, __glXDispSwap_Materialfv}, - /* [ 98] = 98 */ {__glXDisp_Materiali, __glXDispSwap_Materiali}, - /* [ 99] = 99 */ {__glXDisp_Materialiv, __glXDispSwap_Materialiv}, - /* [ 100] = 100 */ {__glXDisp_PointSize, __glXDispSwap_PointSize}, - /* [ 101] = 101 */ {__glXDisp_PolygonMode, __glXDispSwap_PolygonMode}, - /* [ 102] = 102 */ {__glXDisp_PolygonStipple, __glXDispSwap_PolygonStipple}, - /* [ 103] = 103 */ {__glXDisp_Scissor, __glXDispSwap_Scissor}, - /* [ 104] = 104 */ {__glXDisp_ShadeModel, __glXDispSwap_ShadeModel}, - /* [ 105] = 105 */ {__glXDisp_TexParameterf, __glXDispSwap_TexParameterf}, - /* [ 106] = 106 */ {__glXDisp_TexParameterfv, __glXDispSwap_TexParameterfv}, - /* [ 107] = 107 */ {__glXDisp_TexParameteri, __glXDispSwap_TexParameteri}, - /* [ 108] = 108 */ {__glXDisp_TexParameteriv, __glXDispSwap_TexParameteriv}, - /* [ 109] = 109 */ {__glXDisp_TexImage1D, __glXDispSwap_TexImage1D}, - /* [ 110] = 110 */ {__glXDisp_TexImage2D, __glXDispSwap_TexImage2D}, - /* [ 111] = 111 */ {__glXDisp_TexEnvf, __glXDispSwap_TexEnvf}, - /* [ 112] = 112 */ {__glXDisp_TexEnvfv, __glXDispSwap_TexEnvfv}, - /* [ 113] = 113 */ {__glXDisp_TexEnvi, __glXDispSwap_TexEnvi}, - /* [ 114] = 114 */ {__glXDisp_TexEnviv, __glXDispSwap_TexEnviv}, - /* [ 115] = 115 */ {__glXDisp_TexGend, __glXDispSwap_TexGend}, - /* [ 116] = 116 */ {__glXDisp_TexGendv, __glXDispSwap_TexGendv}, - /* [ 117] = 117 */ {__glXDisp_TexGenf, __glXDispSwap_TexGenf}, - /* [ 118] = 118 */ {__glXDisp_TexGenfv, __glXDispSwap_TexGenfv}, - /* [ 119] = 119 */ {__glXDisp_TexGeni, __glXDispSwap_TexGeni}, - /* [ 120] = 120 */ {__glXDisp_TexGeniv, __glXDispSwap_TexGeniv}, - /* [ 121] = 121 */ {__glXDisp_InitNames, __glXDispSwap_InitNames}, - /* [ 122] = 122 */ {__glXDisp_LoadName, __glXDispSwap_LoadName}, - /* [ 123] = 123 */ {__glXDisp_PassThrough, __glXDispSwap_PassThrough}, - /* [ 124] = 124 */ {__glXDisp_PopName, __glXDispSwap_PopName}, - /* [ 125] = 125 */ {__glXDisp_PushName, __glXDispSwap_PushName}, - /* [ 126] = 126 */ {__glXDisp_DrawBuffer, __glXDispSwap_DrawBuffer}, - /* [ 127] = 127 */ {__glXDisp_Clear, __glXDispSwap_Clear}, - /* [ 128] = 128 */ {__glXDisp_ClearAccum, __glXDispSwap_ClearAccum}, - /* [ 129] = 129 */ {__glXDisp_ClearIndex, __glXDispSwap_ClearIndex}, - /* [ 130] = 130 */ {__glXDisp_ClearColor, __glXDispSwap_ClearColor}, - /* [ 131] = 131 */ {__glXDisp_ClearStencil, __glXDispSwap_ClearStencil}, - /* [ 132] = 132 */ {__glXDisp_ClearDepth, __glXDispSwap_ClearDepth}, - /* [ 133] = 133 */ {__glXDisp_StencilMask, __glXDispSwap_StencilMask}, - /* [ 134] = 134 */ {__glXDisp_ColorMask, __glXDispSwap_ColorMask}, - /* [ 135] = 135 */ {__glXDisp_DepthMask, __glXDispSwap_DepthMask}, - /* [ 136] = 136 */ {__glXDisp_IndexMask, __glXDispSwap_IndexMask}, - /* [ 137] = 137 */ {__glXDisp_Accum, __glXDispSwap_Accum}, - /* [ 138] = 138 */ {__glXDisp_Disable, __glXDispSwap_Disable}, - /* [ 139] = 139 */ {__glXDisp_Enable, __glXDispSwap_Enable}, - /* [ 140] = 140 */ {NULL, NULL}, - /* [ 141] = 141 */ {__glXDisp_PopAttrib, __glXDispSwap_PopAttrib}, - /* [ 142] = 142 */ {__glXDisp_PushAttrib, __glXDispSwap_PushAttrib}, - /* [ 143] = 143 */ {__glXDisp_Map1d, __glXDispSwap_Map1d}, - /* [ 144] = 144 */ {__glXDisp_Map1f, __glXDispSwap_Map1f}, - /* [ 145] = 145 */ {__glXDisp_Map2d, __glXDispSwap_Map2d}, - /* [ 146] = 146 */ {__glXDisp_Map2f, __glXDispSwap_Map2f}, - /* [ 147] = 147 */ {__glXDisp_MapGrid1d, __glXDispSwap_MapGrid1d}, - /* [ 148] = 148 */ {__glXDisp_MapGrid1f, __glXDispSwap_MapGrid1f}, - /* [ 149] = 149 */ {__glXDisp_MapGrid2d, __glXDispSwap_MapGrid2d}, - /* [ 150] = 150 */ {__glXDisp_MapGrid2f, __glXDispSwap_MapGrid2f}, - /* [ 151] = 151 */ {__glXDisp_EvalCoord1dv, __glXDispSwap_EvalCoord1dv}, - /* [ 152] = 152 */ {__glXDisp_EvalCoord1fv, __glXDispSwap_EvalCoord1fv}, - /* [ 153] = 153 */ {__glXDisp_EvalCoord2dv, __glXDispSwap_EvalCoord2dv}, - /* [ 154] = 154 */ {__glXDisp_EvalCoord2fv, __glXDispSwap_EvalCoord2fv}, - /* [ 155] = 155 */ {__glXDisp_EvalMesh1, __glXDispSwap_EvalMesh1}, - /* [ 156] = 156 */ {__glXDisp_EvalPoint1, __glXDispSwap_EvalPoint1}, - /* [ 157] = 157 */ {__glXDisp_EvalMesh2, __glXDispSwap_EvalMesh2}, - /* [ 158] = 158 */ {__glXDisp_EvalPoint2, __glXDispSwap_EvalPoint2}, - /* [ 159] = 159 */ {__glXDisp_AlphaFunc, __glXDispSwap_AlphaFunc}, - /* [ 160] = 160 */ {__glXDisp_BlendFunc, __glXDispSwap_BlendFunc}, - /* [ 161] = 161 */ {__glXDisp_LogicOp, __glXDispSwap_LogicOp}, - /* [ 162] = 162 */ {__glXDisp_StencilFunc, __glXDispSwap_StencilFunc}, - /* [ 163] = 163 */ {__glXDisp_StencilOp, __glXDispSwap_StencilOp}, - /* [ 164] = 164 */ {__glXDisp_DepthFunc, __glXDispSwap_DepthFunc}, - /* [ 165] = 165 */ {__glXDisp_PixelZoom, __glXDispSwap_PixelZoom}, - /* [ 166] = 166 */ {__glXDisp_PixelTransferf, __glXDispSwap_PixelTransferf}, - /* [ 167] = 167 */ {__glXDisp_PixelTransferi, __glXDispSwap_PixelTransferi}, - /* [ 168] = 168 */ {__glXDisp_PixelMapfv, __glXDispSwap_PixelMapfv}, - /* [ 169] = 169 */ {__glXDisp_PixelMapuiv, __glXDispSwap_PixelMapuiv}, - /* [ 170] = 170 */ {__glXDisp_PixelMapusv, __glXDispSwap_PixelMapusv}, - /* [ 171] = 171 */ {__glXDisp_ReadBuffer, __glXDispSwap_ReadBuffer}, - /* [ 172] = 172 */ {__glXDisp_CopyPixels, __glXDispSwap_CopyPixels}, - /* [ 173] = 173 */ {__glXDisp_DrawPixels, __glXDispSwap_DrawPixels}, - /* [ 174] = 174 */ {__glXDisp_DepthRange, __glXDispSwap_DepthRange}, - /* [ 175] = 175 */ {__glXDisp_Frustum, __glXDispSwap_Frustum}, - /* [ 176] = 176 */ {__glXDisp_LoadIdentity, __glXDispSwap_LoadIdentity}, - /* [ 177] = 177 */ {__glXDisp_LoadMatrixf, __glXDispSwap_LoadMatrixf}, - /* [ 178] = 178 */ {__glXDisp_LoadMatrixd, __glXDispSwap_LoadMatrixd}, - /* [ 179] = 179 */ {__glXDisp_MatrixMode, __glXDispSwap_MatrixMode}, - /* [ 180] = 180 */ {__glXDisp_MultMatrixf, __glXDispSwap_MultMatrixf}, - /* [ 181] = 181 */ {__glXDisp_MultMatrixd, __glXDispSwap_MultMatrixd}, - /* [ 182] = 182 */ {__glXDisp_Ortho, __glXDispSwap_Ortho}, - /* [ 183] = 183 */ {__glXDisp_PopMatrix, __glXDispSwap_PopMatrix}, - /* [ 184] = 184 */ {__glXDisp_PushMatrix, __glXDispSwap_PushMatrix}, - /* [ 185] = 185 */ {__glXDisp_Rotated, __glXDispSwap_Rotated}, - /* [ 186] = 186 */ {__glXDisp_Rotatef, __glXDispSwap_Rotatef}, - /* [ 187] = 187 */ {__glXDisp_Scaled, __glXDispSwap_Scaled}, - /* [ 188] = 188 */ {__glXDisp_Scalef, __glXDispSwap_Scalef}, - /* [ 189] = 189 */ {__glXDisp_Translated, __glXDispSwap_Translated}, - /* [ 190] = 190 */ {__glXDisp_Translatef, __glXDispSwap_Translatef}, - /* [ 191] = 191 */ {__glXDisp_Viewport, __glXDispSwap_Viewport}, - /* [ 192] = 192 */ {__glXDisp_PolygonOffset, __glXDispSwap_PolygonOffset}, - /* [ 193] = 193 */ {__glXDisp_DrawArrays, __glXDispSwap_DrawArrays}, - /* [ 194] = 194 */ {__glXDisp_Indexubv, __glXDispSwap_Indexubv}, - /* [ 195] = 195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable}, - /* [ 196] = 196 */ {__glXDisp_CopyColorSubTable, __glXDispSwap_CopyColorSubTable}, - /* [ 197] = 197 */ {__glXDisp_ActiveTextureARB, __glXDispSwap_ActiveTextureARB}, - /* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dvARB, __glXDispSwap_MultiTexCoord1dvARB}, - /* [ 199] = 199 */ {__glXDisp_MultiTexCoord1fvARB, __glXDispSwap_MultiTexCoord1fvARB}, - /* [ 200] = 200 */ {__glXDisp_MultiTexCoord1ivARB, __glXDispSwap_MultiTexCoord1ivARB}, - /* [ 201] = 201 */ {__glXDisp_MultiTexCoord1svARB, __glXDispSwap_MultiTexCoord1svARB}, - /* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dvARB, __glXDispSwap_MultiTexCoord2dvARB}, - /* [ 203] = 203 */ {__glXDisp_MultiTexCoord2fvARB, __glXDispSwap_MultiTexCoord2fvARB}, - /* [ 204] = 204 */ {__glXDisp_MultiTexCoord2ivARB, __glXDispSwap_MultiTexCoord2ivARB}, - /* [ 205] = 205 */ {__glXDisp_MultiTexCoord2svARB, __glXDispSwap_MultiTexCoord2svARB}, - /* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dvARB, __glXDispSwap_MultiTexCoord3dvARB}, - /* [ 207] = 207 */ {__glXDisp_MultiTexCoord3fvARB, __glXDispSwap_MultiTexCoord3fvARB}, - /* [ 208] = 208 */ {__glXDisp_MultiTexCoord3ivARB, __glXDispSwap_MultiTexCoord3ivARB}, - /* [ 209] = 209 */ {__glXDisp_MultiTexCoord3svARB, __glXDispSwap_MultiTexCoord3svARB}, - /* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dvARB, __glXDispSwap_MultiTexCoord4dvARB}, - /* [ 211] = 211 */ {__glXDisp_MultiTexCoord4fvARB, __glXDispSwap_MultiTexCoord4fvARB}, - /* [ 212] = 212 */ {__glXDisp_MultiTexCoord4ivARB, __glXDispSwap_MultiTexCoord4ivARB}, - /* [ 213] = 213 */ {__glXDisp_MultiTexCoord4svARB, __glXDispSwap_MultiTexCoord4svARB}, - /* [ 214] = 214 */ {__glXDisp_CompressedTexImage1DARB, __glXDispSwap_CompressedTexImage1DARB}, - /* [ 215] = 215 */ {__glXDisp_CompressedTexImage2DARB, __glXDispSwap_CompressedTexImage2DARB}, - /* [ 216] = 216 */ {__glXDisp_CompressedTexImage3DARB, __glXDispSwap_CompressedTexImage3DARB}, - /* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1DARB, __glXDispSwap_CompressedTexSubImage1DARB}, - /* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2DARB, __glXDispSwap_CompressedTexSubImage2DARB}, - /* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3DARB, __glXDispSwap_CompressedTexSubImage3DARB}, - /* [ 220] = 220 */ {NULL, NULL}, - /* [ 221] = 221 */ {NULL, NULL}, - /* [ 222] = 222 */ {NULL, NULL}, - /* [ 223] = 223 */ {NULL, NULL}, - /* [ 224] = 224 */ {NULL, NULL}, - /* [ 225] = 225 */ {NULL, NULL}, - /* [ 226] = 226 */ {NULL, NULL}, - /* [ 227] = 227 */ {NULL, NULL}, - /* [ 228] = 228 */ {NULL, NULL}, - /* [ 229] = 229 */ {__glXDisp_SampleCoverageARB, __glXDispSwap_SampleCoverageARB}, - /* [ 230] = 230 */ {__glXDisp_WindowPos3fvMESA, __glXDispSwap_WindowPos3fvMESA}, - /* [ 231] = 231 */ {__glXDisp_BeginQueryARB, __glXDispSwap_BeginQueryARB}, - /* [ 232] = 232 */ {__glXDisp_EndQueryARB, __glXDispSwap_EndQueryARB}, - /* [ 233] = 233 */ {__glXDisp_DrawBuffersARB, __glXDispSwap_DrawBuffersARB}, - /* [ 234] = 234 */ {NULL, NULL}, - /* [ 235] = 235 */ {NULL, NULL}, - /* [ 236] = 236 */ {NULL, NULL}, - /* [ 237] = 237 */ {NULL, NULL}, - /* [ 238] = 238 */ {NULL, NULL}, - /* [ 239] = 239 */ {NULL, NULL}, - /* [ 240] = 2048 */ {__glXDisp_SampleMaskSGIS, __glXDispSwap_SampleMaskSGIS}, - /* [ 241] = 2049 */ {__glXDisp_SamplePatternSGIS, __glXDispSwap_SamplePatternSGIS}, - /* [ 242] = 2050 */ {NULL, NULL}, - /* [ 243] = 2051 */ {NULL, NULL}, - /* [ 244] = 2052 */ {NULL, NULL}, - /* [ 245] = 2053 */ {__glXDisp_ColorTable, __glXDispSwap_ColorTable}, - /* [ 246] = 2054 */ {__glXDisp_ColorTableParameterfv, __glXDispSwap_ColorTableParameterfv}, - /* [ 247] = 2055 */ {__glXDisp_ColorTableParameteriv, __glXDispSwap_ColorTableParameteriv}, - /* [ 248] = 2056 */ {__glXDisp_CopyColorTable, __glXDispSwap_CopyColorTable}, - /* [ 249] = 2057 */ {NULL, NULL}, - /* [ 250] = 2058 */ {NULL, NULL}, - /* [ 251] = 2059 */ {NULL, NULL}, - /* [ 252] = 2060 */ {NULL, NULL}, - /* [ 253] = 2061 */ {NULL, NULL}, - /* [ 254] = 2062 */ {NULL, NULL}, - /* [ 255] = 2063 */ {NULL, NULL}, - /* [ 256] = 2064 */ {NULL, NULL}, - /* [ 257] = 2065 */ {__glXDisp_PointParameterfEXT, __glXDispSwap_PointParameterfEXT}, - /* [ 258] = 2066 */ {__glXDisp_PointParameterfvEXT, __glXDispSwap_PointParameterfvEXT}, - /* [ 259] = 2067 */ {NULL, NULL}, - /* [ 260] = 2068 */ {NULL, NULL}, - /* [ 261] = 2069 */ {NULL, NULL}, - /* [ 262] = 2070 */ {NULL, NULL}, - /* [ 263] = 2071 */ {NULL, NULL}, - /* [ 264] = 4096 */ {__glXDisp_BlendColor, __glXDispSwap_BlendColor}, - /* [ 265] = 4097 */ {__glXDisp_BlendEquation, __glXDispSwap_BlendEquation}, - /* [ 266] = 4098 */ {NULL, NULL}, - /* [ 267] = 4099 */ {__glXDisp_TexSubImage1D, __glXDispSwap_TexSubImage1D}, - /* [ 268] = 4100 */ {__glXDisp_TexSubImage2D, __glXDispSwap_TexSubImage2D}, - /* [ 269] = 4101 */ {__glXDisp_ConvolutionFilter1D, __glXDispSwap_ConvolutionFilter1D}, - /* [ 270] = 4102 */ {__glXDisp_ConvolutionFilter2D, __glXDispSwap_ConvolutionFilter2D}, - /* [ 271] = 4103 */ {__glXDisp_ConvolutionParameterf, __glXDispSwap_ConvolutionParameterf}, - /* [ 272] = 4104 */ {__glXDisp_ConvolutionParameterfv, __glXDispSwap_ConvolutionParameterfv}, - /* [ 273] = 4105 */ {__glXDisp_ConvolutionParameteri, __glXDispSwap_ConvolutionParameteri}, - /* [ 274] = 4106 */ {__glXDisp_ConvolutionParameteriv, __glXDispSwap_ConvolutionParameteriv}, - /* [ 275] = 4107 */ {__glXDisp_CopyConvolutionFilter1D, __glXDispSwap_CopyConvolutionFilter1D}, - /* [ 276] = 4108 */ {__glXDisp_CopyConvolutionFilter2D, __glXDispSwap_CopyConvolutionFilter2D}, - /* [ 277] = 4109 */ {__glXDisp_SeparableFilter2D, __glXDispSwap_SeparableFilter2D}, - /* [ 278] = 4110 */ {__glXDisp_Histogram, __glXDispSwap_Histogram}, - /* [ 279] = 4111 */ {__glXDisp_Minmax, __glXDispSwap_Minmax}, - /* [ 280] = 4112 */ {__glXDisp_ResetHistogram, __glXDispSwap_ResetHistogram}, - /* [ 281] = 4113 */ {__glXDisp_ResetMinmax, __glXDispSwap_ResetMinmax}, - /* [ 282] = 4114 */ {__glXDisp_TexImage3D, __glXDispSwap_TexImage3D}, - /* [ 283] = 4115 */ {__glXDisp_TexSubImage3D, __glXDispSwap_TexSubImage3D}, - /* [ 284] = 4116 */ {NULL, NULL}, - /* [ 285] = 4117 */ {__glXDisp_BindTexture, __glXDispSwap_BindTexture}, - /* [ 286] = 4118 */ {__glXDisp_PrioritizeTextures, __glXDispSwap_PrioritizeTextures}, - /* [ 287] = 4119 */ {__glXDisp_CopyTexImage1D, __glXDispSwap_CopyTexImage1D}, - /* [ 288] = 4120 */ {__glXDisp_CopyTexImage2D, __glXDispSwap_CopyTexImage2D}, - /* [ 289] = 4121 */ {__glXDisp_CopyTexSubImage1D, __glXDispSwap_CopyTexSubImage1D}, - /* [ 290] = 4122 */ {__glXDisp_CopyTexSubImage2D, __glXDispSwap_CopyTexSubImage2D}, - /* [ 291] = 4123 */ {__glXDisp_CopyTexSubImage3D, __glXDispSwap_CopyTexSubImage3D}, - /* [ 292] = 4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT}, - /* [ 293] = 4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT}, - /* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bvEXT, __glXDispSwap_SecondaryColor3bvEXT}, - /* [ 295] = 4127 */ {__glXDisp_SecondaryColor3svEXT, __glXDispSwap_SecondaryColor3svEXT}, - /* [ 296] = 4176 */ {NULL, NULL}, - /* [ 297] = 4177 */ {NULL, NULL}, - /* [ 298] = 4178 */ {NULL, NULL}, - /* [ 299] = 4179 */ {NULL, NULL}, - /* [ 300] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV}, - /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, - /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, - /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, - /* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB}, - /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, - /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, - /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, - /* [ 308] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV}, - /* [ 309] = 4189 */ {__glXDisp_VertexAttrib1svARB, __glXDispSwap_VertexAttrib1svARB}, - /* [ 310] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB}, - /* [ 311] = 4191 */ {__glXDisp_VertexAttrib3svARB, __glXDispSwap_VertexAttrib3svARB}, - /* [ 312] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB}, - /* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB}, - /* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB}, - /* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB}, - /* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB}, - /* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB}, - /* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB}, - /* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dvARB, __glXDispSwap_VertexAttrib3dvARB}, - /* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dvARB, __glXDispSwap_VertexAttrib4dvARB}, - /* [ 321] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB}, - /* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV}, - /* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV}, - /* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV}, - /* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV}, - /* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV}, - /* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV}, - /* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV}, - /* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV}, - /* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV}, - /* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV}, - /* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV}, - /* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV}, - /* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV}, - /* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB}, - /* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB}, - /* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB}, - /* [ 338] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV}, - /* [ 339] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV}, - /* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT}, - /* [ 341] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV}, - /* [ 342] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV}, - /* [ 343] = 4223 */ {NULL, NULL}, - /* [ 344] = 4224 */ {NULL, NULL}, - /* [ 345] = 4225 */ {NULL, NULL}, - /* [ 346] = 4226 */ {NULL, NULL}, - /* [ 347] = 4227 */ {NULL, NULL}, - /* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT}, - /* [ 349] = 4229 */ {NULL, NULL}, - /* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB}, - /* [ 351] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB}, - /* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB}, - /* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB}, - /* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB}, - /* [ 355] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB}, - /* [ 356] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB}, - /* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB}, - /* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB}, - /* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB}, - /* [ 360] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT}, - /* [ 361] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT}, - /* [ 362] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT}, - /* [ 363] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT}, - /* [ 364] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT}, - /* [ 365] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT}, - /* [ 366] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT}, - /* [ 367] = 4135 */ {NULL, NULL}, - /* [ 368] = 4264 */ {NULL, NULL}, - /* [ 369] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV}, - /* [ 370] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV}, - /* [ 371] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV}, - /* [ 372] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV}, - /* [ 373] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV}, - /* [ 374] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV}, - /* [ 375] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV}, - /* [ 376] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV}, - /* [ 377] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV}, - /* [ 378] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV}, - /* [ 379] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV}, - /* [ 380] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV}, - /* [ 381] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV}, - /* [ 382] = 4278 */ {NULL, NULL}, - /* [ 383] = 4279 */ {NULL, NULL}, - /* [ 384] = 4312 */ {NULL, NULL}, - /* [ 385] = 4313 */ {NULL, NULL}, - /* [ 386] = 4314 */ {NULL, NULL}, - /* [ 387] = 4315 */ {NULL, NULL}, - /* [ 388] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT}, - /* [ 389] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT}, - /* [ 390] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT}, - /* [ 391] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT}, - /* [ 392] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT}, - /* [ 393] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT}, - /* [ 394] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT}, - /* [ 395] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT}, - /* [ 396] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT}, - /* [ 397] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT}, - /* [ 398] = 4326 */ {NULL, NULL}, - /* [ 399] = 4327 */ {NULL, NULL}, -}; - -static const int_fast16_t Render_size_table[400][2] = { - /* [ 0] = 0 */ { 0, ~0}, - /* [ 1] = 1 */ { 8, ~0}, - /* [ 2] = 2 */ { 12, 0}, - /* [ 3] = 3 */ { 8, ~0}, - /* [ 4] = 4 */ { 8, ~0}, - /* [ 5] = 5 */ { 48, 1}, - /* [ 6] = 6 */ { 8, ~0}, - /* [ 7] = 7 */ { 28, ~0}, - /* [ 8] = 8 */ { 16, ~0}, - /* [ 9] = 9 */ { 16, ~0}, - /* [ 10] = 10 */ { 12, ~0}, - /* [ 11] = 11 */ { 8, ~0}, - /* [ 12] = 12 */ { 16, ~0}, - /* [ 13] = 13 */ { 12, ~0}, - /* [ 14] = 14 */ { 8, ~0}, - /* [ 15] = 15 */ { 36, ~0}, - /* [ 16] = 16 */ { 20, ~0}, - /* [ 17] = 17 */ { 20, ~0}, - /* [ 18] = 18 */ { 12, ~0}, - /* [ 19] = 19 */ { 8, ~0}, - /* [ 20] = 20 */ { 20, ~0}, - /* [ 21] = 21 */ { 12, ~0}, - /* [ 22] = 22 */ { 8, ~0}, - /* [ 23] = 23 */ { 4, ~0}, - /* [ 24] = 24 */ { 12, ~0}, - /* [ 25] = 25 */ { 8, ~0}, - /* [ 26] = 26 */ { 8, ~0}, - /* [ 27] = 27 */ { 8, ~0}, - /* [ 28] = 28 */ { 8, ~0}, - /* [ 29] = 29 */ { 28, ~0}, - /* [ 30] = 30 */ { 16, ~0}, - /* [ 31] = 31 */ { 16, ~0}, - /* [ 32] = 32 */ { 12, ~0}, - /* [ 33] = 33 */ { 20, ~0}, - /* [ 34] = 34 */ { 12, ~0}, - /* [ 35] = 35 */ { 12, ~0}, - /* [ 36] = 36 */ { 8, ~0}, - /* [ 37] = 37 */ { 28, ~0}, - /* [ 38] = 38 */ { 16, ~0}, - /* [ 39] = 39 */ { 16, ~0}, - /* [ 40] = 40 */ { 12, ~0}, - /* [ 41] = 41 */ { 36, ~0}, - /* [ 42] = 42 */ { 20, ~0}, - /* [ 43] = 43 */ { 20, ~0}, - /* [ 44] = 44 */ { 12, ~0}, - /* [ 45] = 45 */ { 36, ~0}, - /* [ 46] = 46 */ { 20, ~0}, - /* [ 47] = 47 */ { 20, ~0}, - /* [ 48] = 48 */ { 12, ~0}, - /* [ 49] = 49 */ { 12, ~0}, - /* [ 50] = 50 */ { 8, ~0}, - /* [ 51] = 51 */ { 8, ~0}, - /* [ 52] = 52 */ { 8, ~0}, - /* [ 53] = 53 */ { 20, ~0}, - /* [ 54] = 54 */ { 12, ~0}, - /* [ 55] = 55 */ { 12, ~0}, - /* [ 56] = 56 */ { 8, ~0}, - /* [ 57] = 57 */ { 28, ~0}, - /* [ 58] = 58 */ { 16, ~0}, - /* [ 59] = 59 */ { 16, ~0}, - /* [ 60] = 60 */ { 12, ~0}, - /* [ 61] = 61 */ { 36, ~0}, - /* [ 62] = 62 */ { 20, ~0}, - /* [ 63] = 63 */ { 20, ~0}, - /* [ 64] = 64 */ { 12, ~0}, - /* [ 65] = 65 */ { 20, ~0}, - /* [ 66] = 66 */ { 12, ~0}, - /* [ 67] = 67 */ { 12, ~0}, - /* [ 68] = 68 */ { 8, ~0}, - /* [ 69] = 69 */ { 28, ~0}, - /* [ 70] = 70 */ { 16, ~0}, - /* [ 71] = 71 */ { 16, ~0}, - /* [ 72] = 72 */ { 12, ~0}, - /* [ 73] = 73 */ { 36, ~0}, - /* [ 74] = 74 */ { 20, ~0}, - /* [ 75] = 75 */ { 20, ~0}, - /* [ 76] = 76 */ { 12, ~0}, - /* [ 77] = 77 */ { 40, ~0}, - /* [ 78] = 78 */ { 12, ~0}, - /* [ 79] = 79 */ { 8, ~0}, - /* [ 80] = 80 */ { 12, ~0}, - /* [ 81] = 81 */ { 8, 2}, - /* [ 82] = 82 */ { 12, ~0}, - /* [ 83] = 83 */ { 8, 3}, - /* [ 84] = 84 */ { 8, ~0}, - /* [ 85] = 85 */ { 12, ~0}, - /* [ 86] = 86 */ { 16, ~0}, - /* [ 87] = 87 */ { 12, 4}, - /* [ 88] = 88 */ { 16, ~0}, - /* [ 89] = 89 */ { 12, 5}, - /* [ 90] = 90 */ { 12, ~0}, - /* [ 91] = 91 */ { 8, 6}, - /* [ 92] = 92 */ { 12, ~0}, - /* [ 93] = 93 */ { 8, 7}, - /* [ 94] = 94 */ { 12, ~0}, - /* [ 95] = 95 */ { 8, ~0}, - /* [ 96] = 96 */ { 16, ~0}, - /* [ 97] = 97 */ { 12, 8}, - /* [ 98] = 98 */ { 16, ~0}, - /* [ 99] = 99 */ { 12, 9}, - /* [100] = 100 */ { 8, ~0}, - /* [101] = 101 */ { 12, ~0}, - /* [102] = 102 */ { 24, 10}, - /* [103] = 103 */ { 20, ~0}, - /* [104] = 104 */ { 8, ~0}, - /* [105] = 105 */ { 16, ~0}, - /* [106] = 106 */ { 12, 11}, - /* [107] = 107 */ { 16, ~0}, - /* [108] = 108 */ { 12, 12}, - /* [109] = 109 */ { 56, 13}, - /* [110] = 110 */ { 56, 14}, - /* [111] = 111 */ { 16, ~0}, - /* [112] = 112 */ { 12, 15}, - /* [113] = 113 */ { 16, ~0}, - /* [114] = 114 */ { 12, 16}, - /* [115] = 115 */ { 20, ~0}, - /* [116] = 116 */ { 12, 17}, - /* [117] = 117 */ { 16, ~0}, - /* [118] = 118 */ { 12, 18}, - /* [119] = 119 */ { 16, ~0}, - /* [120] = 120 */ { 12, 19}, - /* [121] = 121 */ { 4, ~0}, - /* [122] = 122 */ { 8, ~0}, - /* [123] = 123 */ { 8, ~0}, - /* [124] = 124 */ { 4, ~0}, - /* [125] = 125 */ { 8, ~0}, - /* [126] = 126 */ { 8, ~0}, - /* [127] = 127 */ { 8, ~0}, - /* [128] = 128 */ { 20, ~0}, - /* [129] = 129 */ { 8, ~0}, - /* [130] = 130 */ { 20, ~0}, - /* [131] = 131 */ { 8, ~0}, - /* [132] = 132 */ { 12, ~0}, - /* [133] = 133 */ { 8, ~0}, - /* [134] = 134 */ { 8, ~0}, - /* [135] = 135 */ { 8, ~0}, - /* [136] = 136 */ { 8, ~0}, - /* [137] = 137 */ { 12, ~0}, - /* [138] = 138 */ { 8, ~0}, - /* [139] = 139 */ { 8, ~0}, - /* [140] = 140 */ { 0, ~0}, - /* [141] = 141 */ { 4, ~0}, - /* [142] = 142 */ { 8, ~0}, - /* [143] = 143 */ { 28, 20}, - /* [144] = 144 */ { 20, 21}, - /* [145] = 145 */ { 48, 22}, - /* [146] = 146 */ { 32, 23}, - /* [147] = 147 */ { 24, ~0}, - /* [148] = 148 */ { 16, ~0}, - /* [149] = 149 */ { 44, ~0}, - /* [150] = 150 */ { 28, ~0}, - /* [151] = 151 */ { 12, ~0}, - /* [152] = 152 */ { 8, ~0}, - /* [153] = 153 */ { 20, ~0}, - /* [154] = 154 */ { 12, ~0}, - /* [155] = 155 */ { 16, ~0}, - /* [156] = 156 */ { 8, ~0}, - /* [157] = 157 */ { 24, ~0}, - /* [158] = 158 */ { 12, ~0}, - /* [159] = 159 */ { 12, ~0}, - /* [160] = 160 */ { 12, ~0}, - /* [161] = 161 */ { 8, ~0}, - /* [162] = 162 */ { 16, ~0}, - /* [163] = 163 */ { 16, ~0}, - /* [164] = 164 */ { 8, ~0}, - /* [165] = 165 */ { 12, ~0}, - /* [166] = 166 */ { 12, ~0}, - /* [167] = 167 */ { 12, ~0}, - /* [168] = 168 */ { 12, 24}, - /* [169] = 169 */ { 12, 25}, - /* [170] = 170 */ { 12, 26}, - /* [171] = 171 */ { 8, ~0}, - /* [172] = 172 */ { 24, ~0}, - /* [173] = 173 */ { 40, 27}, - /* [174] = 174 */ { 20, ~0}, - /* [175] = 175 */ { 52, ~0}, - /* [176] = 176 */ { 4, ~0}, - /* [177] = 177 */ { 68, ~0}, - /* [178] = 178 */ {132, ~0}, - /* [179] = 179 */ { 8, ~0}, - /* [180] = 180 */ { 68, ~0}, - /* [181] = 181 */ {132, ~0}, - /* [182] = 182 */ { 52, ~0}, - /* [183] = 183 */ { 4, ~0}, - /* [184] = 184 */ { 4, ~0}, - /* [185] = 185 */ { 36, ~0}, - /* [186] = 186 */ { 20, ~0}, - /* [187] = 187 */ { 28, ~0}, - /* [188] = 188 */ { 16, ~0}, - /* [189] = 189 */ { 28, ~0}, - /* [190] = 190 */ { 16, ~0}, - /* [191] = 191 */ { 20, ~0}, - /* [192] = 192 */ { 12, ~0}, - /* [193] = 193 */ { 16, 28}, - /* [194] = 194 */ { 8, ~0}, - /* [195] = 195 */ { 44, 29}, - /* [196] = 196 */ { 24, ~0}, - /* [197] = 197 */ { 8, ~0}, - /* [198] = 198 */ { 16, ~0}, - /* [199] = 199 */ { 12, ~0}, - /* [200] = 200 */ { 12, ~0}, - /* [201] = 201 */ { 12, ~0}, - /* [202] = 202 */ { 24, ~0}, - /* [203] = 203 */ { 16, ~0}, - /* [204] = 204 */ { 16, ~0}, - /* [205] = 205 */ { 12, ~0}, - /* [206] = 206 */ { 32, ~0}, - /* [207] = 207 */ { 20, ~0}, - /* [208] = 208 */ { 20, ~0}, - /* [209] = 209 */ { 16, ~0}, - /* [210] = 210 */ { 40, ~0}, - /* [211] = 211 */ { 24, ~0}, - /* [212] = 212 */ { 24, ~0}, - /* [213] = 213 */ { 16, ~0}, - /* [214] = 214 */ { 28, 30}, - /* [215] = 215 */ { 32, 31}, - /* [216] = 216 */ { 36, 32}, - /* [217] = 217 */ { 28, 33}, - /* [218] = 218 */ { 36, 34}, - /* [219] = 219 */ { 44, 35}, - /* [220] = 220 */ { 0, ~0}, - /* [221] = 221 */ { 0, ~0}, - /* [222] = 222 */ { 0, ~0}, - /* [223] = 223 */ { 0, ~0}, - /* [224] = 224 */ { 0, ~0}, - /* [225] = 225 */ { 0, ~0}, - /* [226] = 226 */ { 0, ~0}, - /* [227] = 227 */ { 0, ~0}, - /* [228] = 228 */ { 0, ~0}, - /* [229] = 229 */ { 12, ~0}, - /* [230] = 230 */ { 16, ~0}, - /* [231] = 231 */ { 12, ~0}, - /* [232] = 232 */ { 8, ~0}, - /* [233] = 233 */ { 8, 36}, - /* [234] = 234 */ { 0, ~0}, - /* [235] = 235 */ { 0, ~0}, - /* [236] = 236 */ { 0, ~0}, - /* [237] = 237 */ { 0, ~0}, - /* [238] = 238 */ { 0, ~0}, - /* [239] = 239 */ { 0, ~0}, - /* [240] = 2048 */ { 12, ~0}, - /* [241] = 2049 */ { 8, ~0}, - /* [242] = 2050 */ { 0, ~0}, - /* [243] = 2051 */ { 0, ~0}, - /* [244] = 2052 */ { 0, ~0}, - /* [245] = 2053 */ { 44, 37}, - /* [246] = 2054 */ { 12, 38}, - /* [247] = 2055 */ { 12, 39}, - /* [248] = 2056 */ { 24, ~0}, - /* [249] = 2057 */ { 0, ~0}, - /* [250] = 2058 */ { 0, ~0}, - /* [251] = 2059 */ { 0, ~0}, - /* [252] = 2060 */ { 0, ~0}, - /* [253] = 2061 */ { 0, ~0}, - /* [254] = 2062 */ { 0, ~0}, - /* [255] = 2063 */ { 0, ~0}, - /* [256] = 2064 */ { 0, ~0}, - /* [257] = 2065 */ { 12, ~0}, - /* [258] = 2066 */ { 8, 40}, - /* [259] = 2067 */ { 0, ~0}, - /* [260] = 2068 */ { 0, ~0}, - /* [261] = 2069 */ { 0, ~0}, - /* [262] = 2070 */ { 0, ~0}, - /* [263] = 2071 */ { 0, ~0}, - /* [264] = 4096 */ { 20, ~0}, - /* [265] = 4097 */ { 8, ~0}, - /* [266] = 4098 */ { 0, ~0}, - /* [267] = 4099 */ { 60, 41}, - /* [268] = 4100 */ { 60, 42}, - /* [269] = 4101 */ { 48, 43}, - /* [270] = 4102 */ { 48, 44}, - /* [271] = 4103 */ { 16, ~0}, - /* [272] = 4104 */ { 12, 45}, - /* [273] = 4105 */ { 16, ~0}, - /* [274] = 4106 */ { 12, 46}, - /* [275] = 4107 */ { 24, ~0}, - /* [276] = 4108 */ { 28, ~0}, - /* [277] = 4109 */ { 32, 47}, - /* [278] = 4110 */ { 20, ~0}, - /* [279] = 4111 */ { 16, ~0}, - /* [280] = 4112 */ { 8, ~0}, - /* [281] = 4113 */ { 8, ~0}, - /* [282] = 4114 */ { 84, 48}, - /* [283] = 4115 */ { 92, 49}, - /* [284] = 4116 */ { 0, ~0}, - /* [285] = 4117 */ { 12, ~0}, - /* [286] = 4118 */ { 8, 50}, - /* [287] = 4119 */ { 32, ~0}, - /* [288] = 4120 */ { 36, ~0}, - /* [289] = 4121 */ { 28, ~0}, - /* [290] = 4122 */ { 36, ~0}, - /* [291] = 4123 */ { 40, ~0}, - /* [292] = 4124 */ { 8, ~0}, - /* [293] = 4125 */ { 12, ~0}, - /* [294] = 4126 */ { 8, ~0}, - /* [295] = 4127 */ { 12, ~0}, - /* [296] = 4176 */ { 0, ~0}, - /* [297] = 4177 */ { 0, ~0}, - /* [298] = 4178 */ { 0, ~0}, - /* [299] = 4179 */ { 0, ~0}, - /* [300] = 4180 */ { 12, ~0}, - /* [301] = 4181 */ { 28, ~0}, - /* [302] = 4182 */ { 8, 51}, - /* [303] = 4183 */ { 16, 52}, - /* [304] = 4184 */ { 28, ~0}, - /* [305] = 4185 */ { 44, ~0}, - /* [306] = 4186 */ { 16, 53}, - /* [307] = 4187 */ { 16, 54}, - /* [308] = 4188 */ { 20, ~0}, - /* [309] = 4189 */ { 12, ~0}, - /* [310] = 4190 */ { 12, ~0}, - /* [311] = 4191 */ { 16, ~0}, - /* [312] = 4192 */ { 16, ~0}, - /* [313] = 4193 */ { 12, ~0}, - /* [314] = 4194 */ { 16, ~0}, - /* [315] = 4195 */ { 20, ~0}, - /* [316] = 4196 */ { 24, ~0}, - /* [317] = 4197 */ { 16, ~0}, - /* [318] = 4198 */ { 24, ~0}, - /* [319] = 4199 */ { 32, ~0}, - /* [320] = 4200 */ { 40, ~0}, - /* [321] = 4201 */ { 12, ~0}, - /* [322] = 4202 */ { 12, 55}, - /* [323] = 4203 */ { 12, 56}, - /* [324] = 4204 */ { 12, 57}, - /* [325] = 4205 */ { 12, 58}, - /* [326] = 4206 */ { 12, 59}, - /* [327] = 4207 */ { 12, 60}, - /* [328] = 4208 */ { 12, 61}, - /* [329] = 4209 */ { 12, 62}, - /* [330] = 4210 */ { 12, 63}, - /* [331] = 4211 */ { 12, 64}, - /* [332] = 4212 */ { 12, 65}, - /* [333] = 4213 */ { 12, 66}, - /* [334] = 4214 */ { 12, 67}, - /* [335] = 4215 */ { 28, ~0}, - /* [336] = 4216 */ { 44, ~0}, - /* [337] = 4217 */ { 16, 68}, - /* [338] = 4218 */ { 28, 69}, - /* [339] = 4219 */ { 44, 70}, - /* [340] = 4220 */ { 8, ~0}, - /* [341] = 4221 */ { 12, ~0}, - /* [342] = 4222 */ { 8, 71}, - /* [343] = 4223 */ { 0, ~0}, - /* [344] = 4224 */ { 0, ~0}, - /* [345] = 4225 */ { 0, ~0}, - /* [346] = 4226 */ { 0, ~0}, - /* [347] = 4227 */ { 0, ~0}, - /* [348] = 4228 */ { 12, ~0}, - /* [349] = 4229 */ { 0, ~0}, - /* [350] = 4230 */ { 12, ~0}, - /* [351] = 4231 */ { 24, ~0}, - /* [352] = 4232 */ { 12, ~0}, - /* [353] = 4233 */ { 16, ~0}, - /* [354] = 4234 */ { 24, ~0}, - /* [355] = 4235 */ { 12, ~0}, - /* [356] = 4236 */ { 16, ~0}, - /* [357] = 4237 */ { 24, ~0}, - /* [358] = 4238 */ { 16, ~0}, - /* [359] = 4239 */ { 24, ~0}, - /* [360] = 4128 */ { 16, ~0}, - /* [361] = 4129 */ { 16, ~0}, - /* [362] = 4130 */ { 28, ~0}, - /* [363] = 4131 */ { 8, ~0}, - /* [364] = 4132 */ { 12, ~0}, - /* [365] = 4133 */ { 16, ~0}, - /* [366] = 4134 */ { 20, ~0}, - /* [367] = 4135 */ { 0, ~0}, - /* [368] = 4264 */ { 0, ~0}, - /* [369] = 4265 */ { 12, ~0}, - /* [370] = 4266 */ { 12, ~0}, - /* [371] = 4267 */ { 16, ~0}, - /* [372] = 4268 */ { 16, ~0}, - /* [373] = 4269 */ { 12, ~0}, - /* [374] = 4270 */ { 16, ~0}, - /* [375] = 4271 */ { 20, ~0}, - /* [376] = 4272 */ { 24, ~0}, - /* [377] = 4273 */ { 16, ~0}, - /* [378] = 4274 */ { 24, ~0}, - /* [379] = 4275 */ { 32, ~0}, - /* [380] = 4276 */ { 40, ~0}, - /* [381] = 4277 */ { 12, ~0}, - /* [382] = 4278 */ { 0, ~0}, - /* [383] = 4279 */ { 0, ~0}, - /* [384] = 4312 */ { 0, ~0}, - /* [385] = 4313 */ { 0, ~0}, - /* [386] = 4314 */ { 0, ~0}, - /* [387] = 4315 */ { 0, ~0}, - /* [388] = 4316 */ { 12, ~0}, - /* [389] = 4317 */ { 8, 72}, - /* [390] = 4318 */ { 20, ~0}, - /* [391] = 4319 */ { 12, ~0}, - /* [392] = 4320 */ { 8, 73}, - /* [393] = 4321 */ { 24, ~0}, - /* [394] = 4322 */ { 24, ~0}, - /* [395] = 4323 */ { 28, ~0}, - /* [396] = 4324 */ { 20, ~0}, - /* [397] = 4325 */ { 8, ~0}, - /* [398] = 4326 */ { 0, ~0}, - /* [399] = 4327 */ { 0, ~0}, -}; - -static const gl_proto_size_func Render_size_func_table[74] = { - __glXCallListsReqSize, - __glXBitmapReqSize, - __glXFogfvReqSize, - __glXFogivReqSize, - __glXLightfvReqSize, - __glXLightivReqSize, - __glXLightModelfvReqSize, - __glXLightModelivReqSize, - __glXMaterialfvReqSize, - __glXMaterialivReqSize, - __glXPolygonStippleReqSize, - __glXTexParameterfvReqSize, - __glXTexParameterivReqSize, - __glXTexImage1DReqSize, - __glXTexImage2DReqSize, - __glXTexEnvfvReqSize, - __glXTexEnvivReqSize, - __glXTexGendvReqSize, - __glXTexGenfvReqSize, - __glXTexGenivReqSize, - __glXMap1dReqSize, - __glXMap1fReqSize, - __glXMap2dReqSize, - __glXMap2fReqSize, - __glXPixelMapfvReqSize, - __glXPixelMapuivReqSize, - __glXPixelMapusvReqSize, - __glXDrawPixelsReqSize, - __glXDrawArraysReqSize, - __glXColorSubTableReqSize, - __glXCompressedTexImage1DARBReqSize, - __glXCompressedTexImage2DARBReqSize, - __glXCompressedTexImage3DARBReqSize, - __glXCompressedTexSubImage1DARBReqSize, - __glXCompressedTexSubImage2DARBReqSize, - __glXCompressedTexSubImage3DARBReqSize, - __glXDrawBuffersARBReqSize, - __glXColorTableReqSize, - __glXColorTableParameterfvReqSize, - __glXColorTableParameterivReqSize, - __glXPointParameterfvEXTReqSize, - __glXTexSubImage1DReqSize, - __glXTexSubImage2DReqSize, - __glXConvolutionFilter1DReqSize, - __glXConvolutionFilter2DReqSize, - __glXConvolutionParameterfvReqSize, - __glXConvolutionParameterivReqSize, - __glXSeparableFilter2DReqSize, - __glXTexImage3DReqSize, - __glXTexSubImage3DReqSize, - __glXPrioritizeTexturesReqSize, - __glXRequestResidentProgramsNVReqSize, - __glXLoadProgramNVReqSize, - __glXProgramParameters4fvNVReqSize, - __glXProgramParameters4dvNVReqSize, - __glXVertexAttribs1svNVReqSize, - __glXVertexAttribs2svNVReqSize, - __glXVertexAttribs3svNVReqSize, - __glXVertexAttribs4svNVReqSize, - __glXVertexAttribs1fvNVReqSize, - __glXVertexAttribs2fvNVReqSize, - __glXVertexAttribs3fvNVReqSize, - __glXVertexAttribs4fvNVReqSize, - __glXVertexAttribs1dvNVReqSize, - __glXVertexAttribs2dvNVReqSize, - __glXVertexAttribs3dvNVReqSize, - __glXVertexAttribs4dvNVReqSize, - __glXVertexAttribs4ubvNVReqSize, - __glXProgramStringARBReqSize, - __glXProgramNamedParameter4fvNVReqSize, - __glXProgramNamedParameter4dvNVReqSize, - __glXPointParameterivNVReqSize, - __glXDeleteRenderbuffersEXTReqSize, - __glXDeleteFramebuffersEXTReqSize, -}; - -const struct __glXDispatchInfo Render_dispatch_info = { - 13, - Render_dispatch_tree, - Render_function_table, - Render_size_table, - Render_size_func_table -}; - -/*****************************************************************/ -/* tree depth = 12 */ -static const int_fast16_t VendorPriv_dispatch_tree[152] = { - /* [0] -> opcode range [0, 131072], node depth 1 */ - 2, - 5, - EMPTY_LEAF, - 119, - EMPTY_LEAF, - - /* [5] -> opcode range [0, 32768], node depth 2 */ - 1, - 8, - EMPTY_LEAF, - - /* [8] -> opcode range [0, 16384], node depth 3 */ - 1, - 11, - EMPTY_LEAF, - - /* [11] -> opcode range [0, 8192], node depth 4 */ - 2, - 16, - EMPTY_LEAF, - 78, - EMPTY_LEAF, - - /* [16] -> opcode range [0, 2048], node depth 5 */ - 2, - 21, - EMPTY_LEAF, - 36, - EMPTY_LEAF, - - /* [21] -> opcode range [0, 512], node depth 6 */ - 1, - 24, - EMPTY_LEAF, - - /* [24] -> opcode range [0, 256], node depth 7 */ - 1, - 27, - EMPTY_LEAF, - - /* [27] -> opcode range [0, 128], node depth 8 */ - 1, - 30, - EMPTY_LEAF, - - /* [30] -> opcode range [0, 64], node depth 9 */ - 1, - 33, - EMPTY_LEAF, - - /* [33] -> opcode range [0, 32], node depth 10 */ - 1, - LEAF(0), - EMPTY_LEAF, - - /* [36] -> opcode range [1024, 1536], node depth 6 */ - 2, - 41, - EMPTY_LEAF, - 53, - 67, - - /* [41] -> opcode range [1024, 1152], node depth 7 */ - 1, - 44, - EMPTY_LEAF, - - /* [44] -> opcode range [1024, 1088], node depth 8 */ - 1, - 47, - EMPTY_LEAF, - - /* [47] -> opcode range [1024, 1056], node depth 9 */ - 1, - 50, - EMPTY_LEAF, - - /* [50] -> opcode range [1024, 1040], node depth 10 */ - 1, - LEAF(16), - EMPTY_LEAF, - - /* [53] -> opcode range [1280, 1408], node depth 7 */ - 1, - 56, - EMPTY_LEAF, - - /* [56] -> opcode range [1280, 1344], node depth 8 */ - 2, - 61, - LEAF(24), - EMPTY_LEAF, - 64, - - /* [61] -> opcode range [1280, 1296], node depth 9 */ - 1, - EMPTY_LEAF, - LEAF(40), - - /* [64] -> opcode range [1328, 1344], node depth 9 */ - 1, - LEAF(48), - EMPTY_LEAF, - - /* [67] -> opcode range [1408, 1536], node depth 7 */ - 1, - 70, - EMPTY_LEAF, - - /* [70] -> opcode range [1408, 1472], node depth 8 */ - 1, - 73, - EMPTY_LEAF, - - /* [73] -> opcode range [1408, 1440], node depth 9 */ - 2, - EMPTY_LEAF, - LEAF(56), - LEAF(64), - EMPTY_LEAF, - - /* [78] -> opcode range [4096, 6144], node depth 5 */ - 2, - 83, - EMPTY_LEAF, - 101, - EMPTY_LEAF, - - /* [83] -> opcode range [4096, 4608], node depth 6 */ - 1, - 86, - EMPTY_LEAF, - - /* [86] -> opcode range [4096, 4352], node depth 7 */ - 1, - 89, - EMPTY_LEAF, - - /* [89] -> opcode range [4096, 4224], node depth 8 */ - 1, - 92, - EMPTY_LEAF, - - /* [92] -> opcode range [4096, 4160], node depth 9 */ - 1, - 95, - EMPTY_LEAF, - - /* [95] -> opcode range [4096, 4128], node depth 10 */ - 1, - 98, - EMPTY_LEAF, - - /* [98] -> opcode range [4096, 4112], node depth 11 */ - 1, - LEAF(72), - EMPTY_LEAF, - - /* [101] -> opcode range [5120, 5632], node depth 6 */ - 1, - 104, - EMPTY_LEAF, - - /* [104] -> opcode range [5120, 5376], node depth 7 */ - 1, - 107, - EMPTY_LEAF, - - /* [107] -> opcode range [5120, 5248], node depth 8 */ - 1, - 110, - EMPTY_LEAF, - - /* [110] -> opcode range [5120, 5184], node depth 9 */ - 1, - EMPTY_LEAF, - 113, - - /* [113] -> opcode range [5152, 5184], node depth 10 */ - 1, - 116, - EMPTY_LEAF, - - /* [116] -> opcode range [5152, 5168], node depth 11 */ - 1, - LEAF(80), - EMPTY_LEAF, - - /* [119] -> opcode range [65536, 98304], node depth 2 */ - 1, - 122, - EMPTY_LEAF, - - /* [122] -> opcode range [65536, 81920], node depth 3 */ - 1, - 125, - EMPTY_LEAF, - - /* [125] -> opcode range [65536, 73728], node depth 4 */ - 1, - 128, - EMPTY_LEAF, - - /* [128] -> opcode range [65536, 69632], node depth 5 */ - 1, - 131, - EMPTY_LEAF, - - /* [131] -> opcode range [65536, 67584], node depth 6 */ - 1, - 134, - EMPTY_LEAF, - - /* [134] -> opcode range [65536, 66560], node depth 7 */ - 1, - 137, - EMPTY_LEAF, - - /* [137] -> opcode range [65536, 66048], node depth 8 */ - 1, - 140, - EMPTY_LEAF, - - /* [140] -> opcode range [65536, 65792], node depth 9 */ - 1, - 143, - EMPTY_LEAF, - - /* [143] -> opcode range [65536, 65664], node depth 10 */ - 1, - 146, - EMPTY_LEAF, - - /* [146] -> opcode range [65536, 65600], node depth 11 */ - 1, - 149, - EMPTY_LEAF, - - /* [149] -> opcode range [65536, 65568], node depth 12 */ - 1, - LEAF(88), - EMPTY_LEAF, - -}; - -static const void *VendorPriv_function_table[104][2] = { - /* [ 0] = 0 */ {NULL, NULL}, - /* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT}, - /* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT}, - /* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT}, - /* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT}, - /* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT}, - /* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT}, - /* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT}, - /* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT}, - /* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT}, - /* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT}, - /* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT}, - /* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT}, - /* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT}, - /* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT}, - /* [ 15] = 15 */ {NULL, NULL}, - /* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT}, - /* [ 17] = 1025 */ {NULL, NULL}, - /* [ 18] = 1026 */ {NULL, NULL}, - /* [ 19] = 1027 */ {NULL, NULL}, - /* [ 20] = 1028 */ {NULL, NULL}, - /* [ 21] = 1029 */ {NULL, NULL}, - /* [ 22] = 1030 */ {NULL, NULL}, - /* [ 23] = 1031 */ {NULL, NULL}, - /* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB}, - /* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB}, - /* [ 26] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV}, - /* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV}, - /* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV}, - /* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB}, - /* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV}, - /* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV}, - /* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV}, - /* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB}, - /* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB}, - /* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB}, - /* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB}, - /* [ 37] = 1309 */ {NULL, NULL}, - /* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV}, - /* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV}, - /* [ 40] = 1288 */ {NULL, NULL}, - /* [ 41] = 1289 */ {NULL, NULL}, - /* [ 42] = 1290 */ {NULL, NULL}, - /* [ 43] = 1291 */ {NULL, NULL}, - /* [ 44] = 1292 */ {NULL, NULL}, - /* [ 45] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV}, - /* [ 46] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV}, - /* [ 47] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV}, - /* [ 48] = 1328 */ {NULL, NULL}, - /* [ 49] = 1329 */ {NULL, NULL}, - /* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT}, - /* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT}, - /* [ 52] = 1332 */ {NULL, NULL}, - /* [ 53] = 1333 */ {NULL, NULL}, - /* [ 54] = 1334 */ {NULL, NULL}, - /* [ 55] = 1335 */ {NULL, NULL}, - /* [ 56] = 1416 */ {NULL, NULL}, - /* [ 57] = 1417 */ {NULL, NULL}, - /* [ 58] = 1418 */ {NULL, NULL}, - /* [ 59] = 1419 */ {NULL, NULL}, - /* [ 60] = 1420 */ {NULL, NULL}, - /* [ 61] = 1421 */ {NULL, NULL}, - /* [ 62] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT}, - /* [ 63] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT}, - /* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT}, - /* [ 65] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT}, - /* [ 66] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT}, - /* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT}, - /* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT}, - /* [ 69] = 1429 */ {NULL, NULL}, - /* [ 70] = 1430 */ {NULL, NULL}, - /* [ 71] = 1431 */ {NULL, NULL}, - /* [ 72] = 4096 */ {NULL, NULL}, - /* [ 73] = 4097 */ {NULL, NULL}, - /* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI}, - /* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI}, - /* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI}, - /* [ 77] = 4101 */ {NULL, NULL}, - /* [ 78] = 4102 */ {NULL, NULL}, - /* [ 79] = 4103 */ {NULL, NULL}, - /* [ 80] = 5152 */ {NULL, NULL}, - /* [ 81] = 5153 */ {NULL, NULL}, - /* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA}, - /* [ 83] = 5155 */ {NULL, NULL}, - /* [ 84] = 5156 */ {NULL, NULL}, - /* [ 85] = 5157 */ {NULL, NULL}, - /* [ 86] = 5158 */ {NULL, NULL}, - /* [ 87] = 5159 */ {NULL, NULL}, - /* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI}, - /* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI}, - /* [ 90] = 65538 */ {NULL, NULL}, - /* [ 91] = 65539 */ {NULL, NULL}, - /* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX}, - /* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX}, - /* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX}, - /* [ 95] = 65543 */ {__glXDisp_CreateGLXPbufferSGIX, __glXDispSwap_CreateGLXPbufferSGIX}, - /* [ 96] = 65544 */ {__glXDisp_DestroyGLXPbufferSGIX, __glXDispSwap_DestroyGLXPbufferSGIX}, - /* [ 97] = 65545 */ {__glXDisp_ChangeDrawableAttributesSGIX, __glXDispSwap_ChangeDrawableAttributesSGIX}, - /* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, __glXDispSwap_GetDrawableAttributesSGIX}, - /* [ 99] = 65547 */ {NULL, NULL}, - /* [ 100] = 65548 */ {NULL, NULL}, - /* [ 101] = 65549 */ {NULL, NULL}, - /* [ 102] = 65550 */ {NULL, NULL}, - /* [ 103] = 65551 */ {NULL, NULL}, -}; - -const struct __glXDispatchInfo VendorPriv_dispatch_info = { - 17, - VendorPriv_dispatch_tree, - VendorPriv_function_table, - NULL, - NULL -}; - diff --git a/GL/symlink-mesa.sh b/GL/symlink-mesa.sh index 0cfe1c9b6..af9adbd94 100755 --- a/GL/symlink-mesa.sh +++ b/GL/symlink-mesa.sh @@ -229,6 +229,14 @@ symlink_glx() { action indirect_size.h action glcontextmodes.c action glcontextmodes.h + action indirect_dispatch.c + action indirect_dispatch.h + action indirect_dispatch_swap.c + action indirect_reqsize.c + action indirect_reqsize.h + action indirect_size_get.c + action indirect_size_get.h + action indirect_table.c src_dir src/mesa/glapi From 1bec6ad8977cefa49cc297a310f5eb0b7cd0b8bc Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 18 Feb 2008 17:46:04 +1030 Subject: [PATCH 518/552] xfree86: plug memory leak in xf86LogInit() xf86LogInit allocates a piece of memory, stores it in lf. LogInit() will then effectively strdup it, but lf is never freed again. Signed-off-by: Peter Hutterer --- hw/xfree86/common/xf86Helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 1368d04ab..0d2471aa1 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1353,7 +1353,7 @@ xf86ErrorF(const char *format, ...) void xf86LogInit() { - char *lf; + char *lf = NULL; #define LOGSUFFIX ".log" #define LOGOLDSUFFIX ".old" @@ -1377,6 +1377,8 @@ xf86LogInit() #undef LOGSUFFIX #undef LOGOLDSUFFIX + + free(lf); } void From 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 18 Feb 2008 17:52:37 +1030 Subject: [PATCH 519/552] xfree86: plug memory leak in InitPathList. All the failure paths were very diligent in freeing the "fullpath" temporary string, but the success case was not. All the content only got strdup()d, so it's not live memory anymore. Signed-off-by: Peter Hutterer --- hw/xfree86/loader/loadmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 650dcf35c..7f3bbe49c 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -177,6 +177,7 @@ InitPathList(const char *path) } if (list) list[n] = NULL; + xfree(fullpath); return list; } From 3abce3ea2b1f43bd111664d4a57e5ccd282acab0 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 18 Feb 2008 18:13:10 +1030 Subject: [PATCH 520/552] xfree86: plug a memory leak in xf86LoadModules. LoadModule() returns the only reference to a fresh piece of memory (a ModuleDescPtr). Sadly, xf86LoadModules dropped the return value on the floor leaking memory for each module it loaded. Signed-off-by: Peter Hutterer --- hw/xfree86/common/xf86Init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 41cf1d17c..0d90b9d43 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1922,6 +1922,7 @@ xf86LoadModules(char **list, pointer *optlist) int i; char *name; Bool failed = FALSE; + ModuleDescPtr desc; if (!list) return TRUE; @@ -1945,11 +1946,15 @@ xf86LoadModules(char **list, pointer *optlist) else opt = NULL; - if (!LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin)) { + desc = LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, + &errmin); + if (!desc) { LoaderErrorMsg(NULL, name, errmaj, errmin); failed = TRUE; } xfree(name); + xfree(desc->name); + xfree(desc); } return !failed; } From 6cbaf15e6109ba77819c4070f5b46c78237ec460 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Feb 2008 12:02:22 +1030 Subject: [PATCH 521/552] xfree86: guard against NULL-pointer dereferences in xf86LoadModules. Should have been part of 3abce3ea2b1f43bd111664d4a57e5ccd282acab0, but I forgot to git-update-index before I committed. Thanks to Bill Crawford for pointing it out. --- hw/xfree86/common/xf86Init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 0d90b9d43..7bcfdff40 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1951,10 +1951,11 @@ xf86LoadModules(char **list, pointer *optlist) if (!desc) { LoaderErrorMsg(NULL, name, errmaj, errmin); failed = TRUE; + } else { + xfree(desc->name); + xfree(desc); } xfree(name); - xfree(desc->name); - xfree(desc); } return !failed; } From 5f5ec5db35e82ddd9659763875e5d6c63cf1b691 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 19 Feb 2008 00:00:11 -0800 Subject: [PATCH 522/552] XQuartz: unsetenv("DISPLAY") before startx if X11.app can't connect to it. Also fix casting to silence warning. (cherry picked from commit a5cbf78471ec6e6ad672dc00118fc7edbd6ddc7c) --- hw/xquartz/bundle/bundle-main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/xquartz/bundle/bundle-main.c b/hw/xquartz/bundle/bundle-main.c index 54d01368d..e97770a55 100644 --- a/hw/xquartz/bundle/bundle-main.c +++ b/hw/xquartz/bundle/bundle-main.c @@ -45,6 +45,7 @@ static char *command_from_prefs(const char *key, const char *default_value); int main(int argc, char **argv) { Display *display; + const char *s; size_t i; fprintf(stderr, "X11.app: main(): argc=%d\n", argc); @@ -72,7 +73,12 @@ int main(int argc, char **argv) { } /* Start the server */ - fprintf(stderr, "X11.app: Could not connect to server. Starting X server."); + if(s = getenv("DISPLAY")) { + fprintf(stderr, "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s); + unsetenv("DISPLAY"); + } else { + fprintf(stderr, "X11.app: Could not connect to server (DISPLAY is not set). Starting X server.\n"); + } return execute(command_from_prefs("startx_script", DEFAULT_STARTX)); } @@ -93,7 +99,7 @@ static int execute(const char *command) { fprintf(stderr, "\targv[%d] = %s\n", s - newargv, *s); } - execvp (newargv[0], (const char **) newargv); + execvp (newargv[0], (char * const *) newargv); perror ("X11.app: Couldn't exec."); return(1); } From 67a78e84a81571cedaf7fd214a21ce1bbdc4fb3b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 19 Feb 2008 21:31:50 +1030 Subject: [PATCH 523/552] Revert "xfree86: plug a memory leak in xf86LoadModules." This reverts commit 3abce3ea2b1f43bd111664d4a57e5ccd282acab0 and 6cbaf15e6109ba77819c4070f5b46c78237ec460. The memory returned to xf86LoadModule was allocated in doLoadModule, which calls the respective module's PreInit. As it turns out, input and output drivers store a pointer to the module elswhere, so freeing it in xf86LoadModule is a bad idea. For further reference: hw/xfree86/common/xf86Helper.c Input drivers: xf86InputDriverList[blah]->module = module; Output drivers: xf86DriverList[blah]->module = module; Unloading the module would not look pretty then. --- hw/xfree86/common/xf86Init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 7bcfdff40..41cf1d17c 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1922,7 +1922,6 @@ xf86LoadModules(char **list, pointer *optlist) int i; char *name; Bool failed = FALSE; - ModuleDescPtr desc; if (!list) return TRUE; @@ -1946,14 +1945,9 @@ xf86LoadModules(char **list, pointer *optlist) else opt = NULL; - desc = LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, - &errmin); - if (!desc) { + if (!LoadModule(name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin)) { LoaderErrorMsg(NULL, name, errmaj, errmin); failed = TRUE; - } else { - xfree(desc->name); - xfree(desc); } xfree(name); } From 5cb9e15562a32c1f102d94d5e15d5fd298baff3f Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 20 Feb 2008 10:36:06 -0800 Subject: [PATCH 524/552] EXA: Fix Render acceleration in copy and tiling cases. Code shuffling in a634c9b03494ba80aeec28be19662ac96657cc23 broke this by leaving pSrcPixmap = NULL. --- exa/exa_render.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/exa/exa_render.c b/exa/exa_render.c index a510e54f6..6df2a23c8 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -587,7 +587,6 @@ exaComposite(CARD8 op, int ret = -1; Bool saveSrcRepeat = pSrc->repeat; Bool saveMaskRepeat = pMask ? pMask->repeat : 0; - PixmapPtr pSrcPixmap = NULL; RegionRec region; /* We currently don't support acceleration of gradients, or other pictures @@ -624,7 +623,9 @@ exaComposite(CARD8 op, if (ret == 1) goto done; } - else if (pSrcPixmap && !pSrc->repeat && !pSrc->transform) + else if (pSrc->pDrawable != NULL && + !pSrc->repeat && + !pSrc->transform) { xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; @@ -644,7 +645,9 @@ exaComposite(CARD8 op, REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); goto done; } - else if (pSrcPixmap && !pSrc->transform && + else if (pSrc->pDrawable != NULL && + pSrc->pDrawable->type == DRAWABLE_PIXMAP && + !pSrc->transform && pSrc->repeatType == RepeatNormal) { DDXPointRec srcOrg; @@ -671,10 +674,11 @@ exaComposite(CARD8 op, width, height)) goto done; - srcOrg.x = (xSrc - xDst) % pSrcPixmap->drawable.width; - srcOrg.y = (ySrc - yDst) % pSrcPixmap->drawable.height; + srcOrg.x = (xSrc - xDst) % pSrc->pDrawable->width; + srcOrg.y = (ySrc - yDst) % pSrc->pDrawable->height; - ret = exaFillRegionTiled(pDst->pDrawable, ®ion, pSrcPixmap, + ret = exaFillRegionTiled(pDst->pDrawable, ®ion, + (PixmapPtr)pSrc->pDrawable, &srcOrg, FB_ALLONES, GXcopy); REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); From 7c2f0a8befb310707ea923dbcdfde84521e52c88 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 15 Feb 2008 19:17:40 -0500 Subject: [PATCH 525/552] Remove COMPOSITE ifdefs around WindowRec bitfield as it has no ABI effect. --- dix/window.c | 2 -- include/windowstr.h | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dix/window.c b/dix/window.c index b896ef742..70e32fbcf 100644 --- a/dix/window.c +++ b/dix/window.c @@ -290,9 +290,7 @@ SetWindowToDefaults(WindowPtr pWin) pWin->deliverableEvents = 0; pWin->dontPropagate = 0; pWin->forcedBS = FALSE; -#ifdef COMPOSITE pWin->redirectDraw = RedirectDrawNone; -#endif } static void diff --git a/include/windowstr.h b/include/windowstr.h index 4359481cd..a16132458 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -158,9 +158,7 @@ typedef struct _Window { unsigned viewable:1; /* realized && InputOutput */ unsigned dontPropagate:3;/* index into DontPropagateMasks */ unsigned forcedBS:1; /* system-supplied backingStore */ -#ifdef COMPOSITE - unsigned redirectDraw:2; /* rendering is redirected from here */ -#endif + unsigned redirectDraw:2; /* COMPOSITE rendering redirect */ } WindowRec; /* From f343265a289724c81017f089c024a7618267c4e3 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 15 Feb 2008 19:53:45 -0500 Subject: [PATCH 526/552] XACE: Make the default window background state configurable per-window. To recap: the original XC-SECURITY extension disallowed background "None" if the window was untrusted. XACE 1.0 preserved this check as a hook function. XACE pre-2.0 removed the hook and first abolished background "None entirely, then restored it as a global on/off switch in response to Bug #13683. Now it's back to being per-window, via a flag instead of a hook function. --- Xext/security.c | 5 +++++ Xext/xace.h | 4 ++-- dix/window.c | 9 +++++---- include/windowstr.h | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Xext/security.c b/Xext/security.c index a3cde2cec..27ef38205 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -810,6 +810,11 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey); + /* disable background None for untrusted windows */ + if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW)) + if (subj->haveState && subj->trustLevel != XSecurityClientTrusted) + ((WindowPtr)rec->res)->forcedBG = TRUE; + /* special checks for server-owned resources */ if (cid == 0) { if (rec->rtype & RC_DRAWABLE) diff --git a/Xext/xace.h b/Xext/xace.h index 2016ca322..1f07d9fd2 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "property.h" /* Default window background */ -#define XaceBackgroundNoneState None +#define XaceBackgroundNoneState(w) ((w)->forcedBG ? BackgroundPixel : None) /* security hooks */ /* Constants used to identify the available security hooks @@ -100,7 +100,7 @@ extern void XaceCensorImage( #else /* XACE */ /* Default window background */ -#define XaceBackgroundNoneState None +#define XaceBackgroundNoneState(w) None /* Define calls away when XACE is not being built. */ diff --git a/dix/window.c b/dix/window.c index 70e32fbcf..9975b5eec 100644 --- a/dix/window.c +++ b/dix/window.c @@ -291,6 +291,7 @@ SetWindowToDefaults(WindowPtr pWin) pWin->dontPropagate = 0; pWin->forcedBS = FALSE; pWin->redirectDraw = RedirectDrawNone; + pWin->forcedBG = FALSE; } static void @@ -702,8 +703,8 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, return NullWindow; } - pWin->backgroundState = XaceBackgroundNoneState; - pWin->background.pixel = 0; + pWin->backgroundState = XaceBackgroundNoneState(pWin); + pWin->background.pixel = pScreen->whitePixel; pWin->borderIsPixel = pParent->borderIsPixel; pWin->border = pParent->border; @@ -1014,8 +1015,8 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) if (!pWin->parent) MakeRootTile(pWin); else { - pWin->backgroundState = XaceBackgroundNoneState; - pWin->background.pixel = 0; + pWin->backgroundState = XaceBackgroundNoneState(pWin); + pWin->background.pixel = pScreen->whitePixel; } } else if (pixID == ParentRelative) diff --git a/include/windowstr.h b/include/windowstr.h index a16132458..e06a2f1bd 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -159,6 +159,7 @@ typedef struct _Window { unsigned dontPropagate:3;/* index into DontPropagateMasks */ unsigned forcedBS:1; /* system-supplied backingStore */ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */ + unsigned forcedBG:1; /* must have an opaque background */ } WindowRec; /* From 437c78ef9ff1177e04b3d6781b5805d89b2ab81a Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Thu, 21 Feb 2008 15:29:27 +0100 Subject: [PATCH 527/552] [Xephyr/GL] don't crash when the host returns a NULL server string --- hw/kdrive/ephyr/ephyrglxext.c | 14 ++++++++++++-- hw/kdrive/ephyr/ephyrhostglx.c | 9 +++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/hw/kdrive/ephyr/ephyrglxext.c b/hw/kdrive/ephyr/ephyrglxext.c index 381c9d7ed..43a634d24 100644 --- a/hw/kdrive/ephyr/ephyrglxext.c +++ b/hw/kdrive/ephyr/ephyrglxext.c @@ -362,7 +362,7 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc) ClientPtr client = a_cl->client; xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) a_pc; xGLXQueryServerStringReply reply; - char *server_string=NULL ; + char *server_string=NULL, *buf=NULL; int length=0 ; EPHYR_LOG ("enter\n") ; @@ -379,9 +379,15 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc) reply.sequenceNumber = client->sequence ; reply.length = __GLX_PAD (length) >> 2 ; reply.n = length ; + buf = xcalloc (reply.length << 2, 1); + if (!buf) { + EPHYR_LOG_ERROR ("failed to allocate string\n;"); + return BadAlloc; + } + memcpy (buf, server_string, length); WriteToClient(client, sz_xGLXQueryServerStringReply, (char*)&reply); - WriteToClient(client, (int)length, server_string); + WriteToClient(client, (int)(reply.length << 2), server_string); res = Success ; @@ -391,6 +397,10 @@ out: xfree (server_string) ; server_string = NULL; } + if (buf) { + xfree (buf); + buf = NULL; + } return res ; } diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c index 5d9a482e8..f5db5be16 100644 --- a/hw/kdrive/ephyr/ephyrhostglx.c +++ b/hw/kdrive/ephyr/ephyrhostglx.c @@ -151,6 +151,7 @@ ephyrHostGLXGetStringFromServer (int a_screen_number, { Bool is_ok=FALSE ; Display *dpy = hostx_get_display () ; + int default_screen = DefaultScreen (dpy); xGLXGenericGetStringReq *req=NULL; xGLXSingleReply reply; int length=0, numbytes=0, major_opcode=0, get_string_op=0; @@ -188,13 +189,17 @@ ephyrHostGLXGetStringFromServer (int a_screen_number, GetReq (GLXGenericGetString, req); req->reqType = major_opcode; req->glxCode = get_string_op; - req->for_whom = DefaultScreen (dpy); + req->for_whom = default_screen; req->name = a_string_name; _XReply (dpy, (xReply *)&reply, 0, False); length = reply.length * 4; - numbytes = reply.size; + if (!length) { + numbytes = 0; + } else { + numbytes = reply.size; + } EPHYR_LOG ("going to get a string of size:%d\n", numbytes) ; *a_string = (char *) Xmalloc (numbytes +1); From c14fd2a5cb3f45d5c4502e09f55f5e3732c5e698 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Thu, 21 Feb 2008 15:33:02 +0100 Subject: [PATCH 528/552] [Xephyr/GL] properly route expose event on GL drawables When an expose event happens on an host GL window paired with an internal drawable, route that expose event to the clients listening to the expose event on the internal drawable. --- hw/kdrive/ephyr/ephyr.c | 51 +++++++++++++++++++++++++++++++-- hw/kdrive/ephyr/ephyrdriext.c | 24 +++++++++++++--- hw/kdrive/ephyr/ephyrdriext.h | 10 +++++++ hw/kdrive/ephyr/hostx.c | 54 +++++++++++++++++++++++++++++------ hw/kdrive/ephyr/hostx.h | 7 ++++- 5 files changed, 130 insertions(+), 16 deletions(-) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 6ec95d631..738704e40 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -841,6 +841,37 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs = ephyrWarpCursor }; +/** + * find if the remote window denoted by a_remote + * is paired with an internal Window within the Xephyr server. + * If the remove window is paired with an internal window, send an + * expose event to the client insterested in the internal window expose event. + * + * Pairing happens when a drawable inside Xephyr is associated with + * a GL surface in a DRI environment. + * Look at the function ProcXF86DRICreateDrawable in ephyrdriext.c to + * know a paired window is created. + * + * This is useful to make GL drawables (only windows for now) handle + * expose events and send those events to clients. + */ +static void +ephyrExposePairedWindow (int a_remote) +{ + EphyrWindowPair *pair = NULL; + RegionRec reg; + ScreenPtr screen; + + if (!findWindowPairFromRemote (a_remote, &pair)) { + EPHYR_LOG ("did not find a pair for this window\n"); + return; + } + screen = pair->local->drawable.pScreen; + REGION_NULL (screen, ®); + REGION_COPY (screen, ®, &pair->local->clipList); + screen->WindowExposures (pair->local, ®, NullRegion); + REGION_UNINIT (screen, ®); +} void ephyrPoll(void) @@ -861,9 +892,13 @@ ephyrPoll(void) if (ephyrCurScreen != ev.data.mouse_motion.screen) { EPHYR_LOG ("warping mouse cursor:%d\n", ephyrCurScreen) ; - ephyrWarpCursor(screenInfo.screens[ev.data.mouse_motion.screen], - ev.data.mouse_motion.x, - ev.data.mouse_motion.y ); + if (ev.data.mouse_motion.screen >= 0) + { + ephyrWarpCursor + (screenInfo.screens[ev.data.mouse_motion.screen], + ev.data.mouse_motion.x, + ev.data.mouse_motion.y ); + } } else { @@ -913,6 +948,16 @@ ephyrPoll(void) KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE); break; + case EPHYR_EV_EXPOSE: + /* + * We only receive expose events when the expose event have + * be generated for a drawable that is a host X window managed + * by Xephyr. Host X windows managed by Xephyr exists for instance + * when Xephyr is asked to create a GL drawable in a DRI environment. + */ + ephyrExposePairedWindow (ev.data.expose.window); + break; + default: break; } diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index 1b9dce5c8..fafe56d1f 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -59,10 +59,6 @@ #define _HAVE_XALLOC_DECLS #include "ephyrlog.h" -typedef struct { - WindowPtr local ; - int remote ; -} EphyrWindowPair; typedef struct { int foo; @@ -950,6 +946,26 @@ findWindowPairFromLocal (WindowPtr a_local, return FALSE ; } +Bool +findWindowPairFromRemote (int a_remote, + EphyrWindowPair **a_pair) +{ + int i=0 ; + + EPHYR_RETURN_VAL_IF_FAIL (a_pair, FALSE) ; + + for (i=0; i < NUM_WINDOW_PAIRS; i++) { + if (window_pairs[i].remote == a_remote) { + *a_pair = &window_pairs[i] ; + EPHYR_LOG ("found (%p, %d)\n", + (*a_pair)->local, + (*a_pair)->remote) ; + return TRUE ; + } + } + return FALSE ; +} + static Bool createHostPeerWindow (const WindowPtr a_win, int *a_peer_win) diff --git a/hw/kdrive/ephyr/ephyrdriext.h b/hw/kdrive/ephyr/ephyrdriext.h index 66af833b9..01c9421fb 100644 --- a/hw/kdrive/ephyr/ephyrdriext.h +++ b/hw/kdrive/ephyr/ephyrdriext.h @@ -27,6 +27,16 @@ */ #ifndef __EPHYRDRIEXT_H__ #define __EPHYRDRIEXT_H__ + +typedef struct { + WindowPtr local ; + int remote ; +} EphyrWindowPair; + Bool ephyrDRIExtensionInit (ScreenPtr a_screen) ; + +Bool findWindowPairFromRemote (int a_remote, + EphyrWindowPair **a_pair); + #endif /*__EPHYRDRIEXT_H__*/ diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index a5413b876..ae1bb4bf9 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -839,16 +839,38 @@ hostx_load_keymap(void) static struct EphyrHostScreen * host_screen_from_window (Window w) { - int index; + int index = 0; + struct EphyrHostScreen *result = NULL; +#if 0 + unsigned int num_children = 0; + Window root = None, parent = None, *children = NULL; +#endif for (index = 0 ; index < HostX.n_screens ; index++) { if (HostX.screens[index].win == w) { - return &HostX.screens[index]; + result = &HostX.screens[index]; + goto out; } } - return NULL; +#if 0 + XQueryTree (hostx_get_display (), w, &root, &parent, + &children, &num_children); + if (parent == root || parent == None) + goto out; + result = host_screen_from_window (parent); +#endif + +out: +#if 0 + if (children) + { + XFree (children); + children = NULL; + } +#endif + return result; } int @@ -870,9 +892,19 @@ hostx_get_event(EphyrHostXEvent *ev) { struct EphyrHostScreen *host_screen = host_screen_from_window (xev.xexpose.window); - hostx_paint_rect (host_screen->info, 0, 0, 0, 0, - host_screen->win_width, - host_screen->win_height); + if (host_screen) + { + hostx_paint_rect (host_screen->info, 0, 0, 0, 0, + host_screen->win_width, + host_screen->win_height); + } + else + { + EPHYR_LOG_ERROR ("failed to get host screen\n"); + ev->type = EPHYR_EV_EXPOSE; + ev->data.expose.window = xev.xexpose.window; + return 1; + } } return 0; @@ -1113,12 +1145,18 @@ hostx_create_window (int a_screen_number, visual_info->screen), visual_info->visual, AllocNone) ; - winmask = CWColormap; + attrs.event_mask = ButtonPressMask + |ButtonReleaseMask + |PointerMotionMask + |KeyPressMask + |KeyReleaseMask + |ExposureMask; + winmask = CWColormap|CWEventMask; win = XCreateWindow (dpy, hostx_get_window (a_screen_number), a_geometry->x, a_geometry->y, a_geometry->width, a_geometry->height, 0, - visual_info->depth, InputOutput, + visual_info->depth, CopyFromParent, visual_info->visual, winmask, &attrs) ; if (win == None) { EPHYR_LOG_ERROR ("failed to create peer window\n") ; diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h index 3caa466a7..f72cfe700 100644 --- a/hw/kdrive/ephyr/hostx.h +++ b/hw/kdrive/ephyr/hostx.h @@ -47,7 +47,8 @@ typedef enum EphyrHostXEventType EPHYR_EV_MOUSE_PRESS, EPHYR_EV_MOUSE_RELEASE, EPHYR_EV_KEY_PRESS, - EPHYR_EV_KEY_RELEASE + EPHYR_EV_KEY_RELEASE, + EPHYR_EV_EXPOSE } EphyrHostXEventType; @@ -87,6 +88,10 @@ struct EphyrHostXEvent int scancode; } key_down; + struct expose { + int window; + } expose; + } data; int key_state; From a4202b898f07dd733590ae5adb21e48775369781 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 22 Feb 2008 18:22:58 +0100 Subject: [PATCH 529/552] XKB: Actually use the keymap we compile at startup During XkbInitKeyboardDevice, we compiled a keymap and promptly threw it away; brief inspection revealed the embarassingly simple problem. Sorry. --- xkb/xkbInit.c | 116 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 39 deletions(-) diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 37dd94019..2b5f1fb68 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -138,6 +138,8 @@ static char * XkbLayoutUsed= NULL; static char * XkbVariantUsed= NULL; static char * XkbOptionsUsed= NULL; +static XkbDescPtr xkb_cached_map = NULL; + _X_EXPORT Bool noXkbExtension= XKB_DFLT_DISABLED; static Bool XkbWantRulesProp= XKB_DFLT_RULES_PROP; @@ -284,6 +286,9 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout, static Bool XkbInitKeyTypes(XkbDescPtr xkb) { + if (xkb->defined & XkmTypesMask) + return True; + initTypeNames(NULL); if (XkbAllocClientMap(xkb,XkbKeyTypesMask,num_dflt_types)!=Success) return False; @@ -310,6 +315,9 @@ XkbInitCompatStructs(XkbDescPtr xkb) register int i; XkbCompatMapPtr compat; + if (xkb->defined & XkmCompatMapMask) + return True; + if (XkbAllocCompatMap(xkb,XkbAllCompatMask,num_dfltSI)!=Success) return BadAlloc; compat = xkb->compat; @@ -358,28 +366,33 @@ Atom unknown; if (names->symbols==None) names->symbols= unknown; if (names->types==None) names->types= unknown; if (names->compat==None) names->compat= unknown; - if (names->vmods[vmod_NumLock]==None) - names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock"); - if (names->vmods[vmod_Alt]==None) - names->vmods[vmod_Alt]= CREATE_ATOM("Alt"); - if (names->vmods[vmod_AltGr]==None) - names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch"); + if (!(xkb->defined & XkmVirtualModsMask)) { + if (names->vmods[vmod_NumLock]==None) + names->vmods[vmod_NumLock]= CREATE_ATOM("NumLock"); + if (names->vmods[vmod_Alt]==None) + names->vmods[vmod_Alt]= CREATE_ATOM("Alt"); + if (names->vmods[vmod_AltGr]==None) + names->vmods[vmod_AltGr]= CREATE_ATOM("ModeSwitch"); + } - initIndicatorNames(NULL,xkb); - if (names->indicators[LED_CAPS-1]==None) - names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock"); - if (names->indicators[LED_NUM-1]==None) - names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock"); - if (names->indicators[LED_SCROLL-1]==None) - names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock"); + if (!(xkb->defined & XkmIndicatorsMask)) { + initIndicatorNames(NULL,xkb); + if (names->indicators[LED_CAPS-1]==None) + names->indicators[LED_CAPS-1] = CREATE_ATOM("Caps Lock"); + if (names->indicators[LED_NUM-1]==None) + names->indicators[LED_NUM-1] = CREATE_ATOM("Num Lock"); + if (names->indicators[LED_SCROLL-1]==None) + names->indicators[LED_SCROLL-1] = CREATE_ATOM("Scroll Lock"); #ifdef LED_COMPOSE - if (names->indicators[LED_COMPOSE-1]==None) - names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose"); + if (names->indicators[LED_COMPOSE-1]==None) + names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose"); #endif + } if (xkb->geom!=NULL) names->geometry= xkb->geom->name; else names->geometry= unknown; + return Success; } @@ -393,27 +406,31 @@ XkbSrvLedInfoPtr sli; xkb= xkbi->desc; if (XkbAllocIndicatorMaps(xkb)!=Success) return BadAlloc; - map= xkb->indicators; - map->phys_indicators = PHYS_LEDS; - map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit; - map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked; - map->maps[LED_CAPS-1].mods.mask= LockMask; - map->maps[LED_CAPS-1].mods.real_mods= LockMask; - map->maps[LED_NUM-1].flags= XkbIM_NoExplicit; - map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked; - map->maps[LED_NUM-1].mods.mask= 0; - map->maps[LED_NUM-1].mods.real_mods= 0; - map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask; + if (!(xkb->defined & XkmIndicatorsMask)) { + map= xkb->indicators; + map->phys_indicators = PHYS_LEDS; + map->maps[LED_CAPS-1].flags= XkbIM_NoExplicit; + map->maps[LED_CAPS-1].which_mods= XkbIM_UseLocked; + map->maps[LED_CAPS-1].mods.mask= LockMask; + map->maps[LED_CAPS-1].mods.real_mods= LockMask; - map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit; - map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked; - map->maps[LED_SCROLL-1].mods.mask= Mod3Mask; - map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask; + map->maps[LED_NUM-1].flags= XkbIM_NoExplicit; + map->maps[LED_NUM-1].which_mods= XkbIM_UseLocked; + map->maps[LED_NUM-1].mods.mask= 0; + map->maps[LED_NUM-1].mods.real_mods= 0; + map->maps[LED_NUM-1].mods.vmods= vmod_NumLockMask; + + map->maps[LED_SCROLL-1].flags= XkbIM_NoExplicit; + map->maps[LED_SCROLL-1].which_mods= XkbIM_UseLocked; + map->maps[LED_SCROLL-1].mods.mask= Mod3Mask; + map->maps[LED_SCROLL-1].mods.real_mods= Mod3Mask; + } sli= XkbFindSrvLedInfo(xkbi->device,XkbDfltXIClass,XkbDfltXIId,0); if (sli) XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask); + return Success; } @@ -428,7 +445,8 @@ XkbControlsPtr ctrls; if (XkbAllocControls(xkb,XkbAllControlsMask)!=Success) FatalError("Couldn't allocate keyboard controls\n"); ctrls= xkb->ctrls; - ctrls->num_groups = 1; + if (!(xkb->defined & XkmSymbolsMask)) + ctrls->num_groups = 1; ctrls->groups_wrap = XkbSetGroupInfo(1,XkbWrapIntoRange,0); ctrls->internal.mask = 0; ctrls->internal.real_mods = 0; @@ -458,11 +476,18 @@ XkbEventCauseRec cause; pXDev->key->xkbInfo= xkbi= _XkbTypedCalloc(1,XkbSrvInfoRec); if ( xkbi ) { XkbDescPtr xkb; - xkbi->desc= XkbAllocKeyboard(); - if (!xkbi->desc) - FatalError("Couldn't allocate keyboard description\n"); - xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode; - xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode; + + if (xkb_cached_map) { + xkbi->desc = xkb_cached_map; + xkb_cached_map = NULL; + } + else { + xkbi->desc= XkbAllocKeyboard(); + if (!xkbi->desc) + FatalError("Couldn't allocate keyboard description\n"); + xkbi->desc->min_key_code = pXDev->key->curKeySyms.minKeyCode; + xkbi->desc->max_key_code = pXDev->key->curKeySyms.maxKeyCode; + } xkb= xkbi->desc; if (xkb->min_key_code == 0) xkb->min_key_code = pXDev->key->curKeySyms.minKeyCode; @@ -494,14 +519,23 @@ XkbEventCauseRec cause; XkbInitControls(pXDev,xkbi); - memcpy(xkb->map->modmap,pXDev->key->modifierMap,xkb->max_key_code+1); + if (xkb->defined & XkmSymbolsMask) + memcpy(pXDev->key->modifierMap, xkb->map->modmap, + xkb->max_key_code + 1); + else + memcpy(xkb->map->modmap, pXDev->key->modifierMap, + xkb->max_key_code + 1); XkbInitIndicatorMap(xkbi); XkbDDXInitDevice(pXDev); - XkbUpdateKeyTypesFromCore(pXDev,xkb->min_key_code,XkbNumKeys(xkb), - &changes); + if (xkb->defined & XkmSymbolsMask) + XkbUpdateKeyTypesFromCore(pXDev, xkb->min_key_code, + XkbNumKeys(xkb), &changes); + else + XkbUpdateCoreDescription(pXDev, True); + XkbSetCauseUnknown(&cause); XkbUpdateActions(pXDev,xkb->min_key_code, XkbNumKeys(xkb),&changes, &check,&cause); @@ -632,11 +666,15 @@ XkbDescPtr xkb; pMods= tmpMods; } } + /* Store the map here so we can pick it back up in XkbInitDevice. + * Sigh. */ + xkb_cached_map = xkb; } else { LogMessage(X_WARNING, "Couldn't load XKB keymap, falling back to pre-XKB keymap\n"); } ok= InitKeyboardDeviceStruct((DevicePtr)dev,pSyms,pMods,bellProc,ctrlProc); + xkb_cached_map = NULL; if ((pSyms==&tmpSyms)&&(pSyms->map!=NULL)) { _XkbFree(pSyms->map); pSyms->map= NULL; From ee21aba6be0078949204e315ddfffd99de60c2f1 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 24 Dec 2007 13:13:19 -0500 Subject: [PATCH 530/552] Fix Xinerama's consolidated visual handling. Formerly the code claimed it could only handle up to 256 visuals, which was true. Also true, but not explicitly stated, was that it could only handle visuals with VID < 256. If you have enough screens, and subsystems that add lots of visuals, you can easily run off the end. (Made worse because we allocate visual IDs from the same pool as XIDs.) If your app then chooses a visual > 256, then the Xinerama code would throw BadMatch on CreateColormap and your app wouldn't start. With this change, PanoramiXVisualTable is gone. Other subsystems that were using it as a translation table between each screen's visuals now use a PanoramiXTranslateVisual() helper. --- Xext/panoramiX.c | 252 +++++++++++++++++++------------------ Xext/panoramiXprocs.c | 7 +- Xext/panoramiXsrv.h | 2 +- Xext/saver.c | 3 +- hw/dmx/glxProxy/glxcmds.c | 11 +- hw/xfree86/loader/extsym.c | 2 - 6 files changed, 138 insertions(+), 139 deletions(-) diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 75277beaa..d8ec588aa 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -81,9 +81,6 @@ static DepthPtr PanoramiXDepths; static int PanoramiXNumVisuals; static VisualPtr PanoramiXVisuals; -/* We support at most 256 visuals */ -_X_EXPORT XID *PanoramiXVisualTable = NULL; - _X_EXPORT unsigned long XRC_DRAWABLE; _X_EXPORT unsigned long XRT_WINDOW; _X_EXPORT unsigned long XRT_PIXMAP; @@ -702,143 +699,133 @@ Bool PanoramiXCreateConnectionBlock(void) return TRUE; } -extern -void PanoramiXConsolidate(void) +/* + * This isn't just memcmp(), bitsPerRGBValue is skipped. markv made that + * change way back before xf86 4.0, but the comment for _why_ is a bit + * opaque, so I'm not going to question it for now. + * + * This is probably better done as a screen hook so DBE/EVI/GLX can add + * their own tests, and adding privates to VisualRec so they don't have to + * do their own back-mapping. + */ +static Bool +VisualsEqual(VisualPtr a, VisualPtr b) { - int i, j, k; - VisualPtr pVisual, pVisual2; - ScreenPtr pScreen, pScreen2; - DepthPtr pDepth, pDepth2; - PanoramiXRes *root, *defmap, *saver; - Bool foundDepth, missingDepth; + return ((a->class == b->class) && + (a->ColormapEntries == b->ColormapEntries) && + (a->nplanes == b->nplanes) && + (a->redMask == b->redMask) && + (a->greenMask == b->greenMask) && + (a->blueMask == b->blueMask) && + (a->offsetRed == b->offsetRed) && + (a->offsetGreen == b->offsetGreen) && + (a->offsetBlue == b->offsetBlue)); +} - if(!PanoramiXVisualTable) - PanoramiXVisualTable = xcalloc(256 * MAXSCREENS, sizeof(XID)); +static void +PanoramiXMaybeAddDepth(DepthPtr pDepth) +{ + ScreenPtr pScreen; + int j, k; + Bool found = FALSE; - pScreen = screenInfo.screens[0]; - pVisual = pScreen->visuals; - pDepth = pScreen->allowedDepths; - - PanoramiXNumDepths = 0; - PanoramiXDepths = xcalloc(pScreen->numDepths,sizeof(DepthRec)); - PanoramiXNumVisuals = 0; - PanoramiXVisuals = xcalloc(pScreen->numVisuals,sizeof(VisualRec)); - - for (i = 0; i < pScreen->numDepths; i++, pDepth++) { - missingDepth = FALSE; - for (j = 1; j < PanoramiXNumScreens; j++) { - pScreen2 = screenInfo.screens[j]; - pDepth2 = pScreen2->allowedDepths; - - foundDepth = FALSE; - for (k = 0; k < pScreen2->numDepths; k++, pDepth2++) { - if(pDepth2->depth == pDepth->depth) { - foundDepth = TRUE; - break; - } - } - - if(!foundDepth) { - missingDepth = TRUE; - break; - } - } - - if(!missingDepth) { - PanoramiXDepths[PanoramiXNumDepths].depth = pDepth->depth; - PanoramiXDepths[PanoramiXNumDepths].numVids = 0; - if(pDepth->numVids) - PanoramiXDepths[PanoramiXNumDepths].vids = - xalloc(sizeof(VisualID) * pDepth->numVids); - else - PanoramiXDepths[PanoramiXNumDepths].vids = NULL; - PanoramiXNumDepths++; - } + for (j = 1; j < PanoramiXNumScreens; j++) { + pScreen = screenInfo.screens[j]; + for (k = 0; k < pScreen->numDepths; k++) { + if (pScreen->allowedDepths[k].depth == pDepth->depth) { + found = TRUE; + break; + } + } } - for (i = 0; i < pScreen->numVisuals; i++, pVisual++) { - PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = pVisual->vid; + if (!found) + return; - /* check if the visual exists on all screens */ - for (j = 1; j < PanoramiXNumScreens; j++) { - pScreen2 = screenInfo.screens[j]; + j = PanoramiXNumDepths; + PanoramiXNumDepths++; + PanoramiXDepths = xrealloc(PanoramiXDepths, + PanoramiXNumDepths * sizeof(DepthRec)); + PanoramiXDepths[j].depth = pDepth->depth; + PanoramiXDepths[j].numVids = 0; + /* XXX suboptimal, should grow these dynamically */ + if(pDepth->numVids) + PanoramiXDepths[j].vids = xalloc(sizeof(VisualID) * pDepth->numVids); + else + PanoramiXDepths[j].vids = NULL; +} +static void +PanoramiXMaybeAddVisual(VisualPtr pVisual) +{ + ScreenPtr pScreen; + VisualPtr candidate = NULL; + int j, k; + Bool found = FALSE; + + for (j = 1; j < PanoramiXNumScreens; j++) { + pScreen = screenInfo.screens[j]; + found = FALSE; + + candidate = pScreen->visuals; + for (k = 0; k < pScreen->numVisuals; k++) { + candidate++; + if (VisualsEqual(pVisual, candidate) #ifdef GLXPROXY - pVisual2 = glxMatchVisual(pScreen, pVisual, pScreen2); - if (pVisual2) { - PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = - pVisual2->vid; - continue; - } else if (glxMatchVisual(pScreen, pVisual, pScreen)) { - PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = 0; - break; - } + && glxMatchVisual(screenInfo.screens[0], pVisual, pScreen) #endif - pVisual2 = pScreen2->visuals; - - for (k = 0; k < pScreen2->numVisuals; k++, pVisual2++) { - if ((pVisual->class == pVisual2->class) && - (pVisual->ColormapEntries == pVisual2->ColormapEntries) && - (pVisual->nplanes == pVisual2->nplanes) && - (pVisual->redMask == pVisual2->redMask) && - (pVisual->greenMask == pVisual2->greenMask) && - (pVisual->blueMask == pVisual2->blueMask) && - (pVisual->offsetRed == pVisual2->offsetRed) && - (pVisual->offsetGreen == pVisual2->offsetGreen) && - (pVisual->offsetBlue == pVisual2->offsetBlue)) - { - /* We merely assign the first visual that matches. OpenGL - will need to get involved at some point if you want - match GLX visuals */ - PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j] = - pVisual2->vid; - break; - } - } - } - - /* if it doesn't exist on all screens we can't use it */ - for (j = 0; j < PanoramiXNumScreens; j++) { - if (!PanoramiXVisualTable[(pVisual->vid * MAXSCREENS) + j]) { - PanoramiXVisualTable[pVisual->vid * MAXSCREENS] = 0; + ) { + found = TRUE; break; } } - /* if it does, make sure it's in the list of supported depths and visuals */ - if(PanoramiXVisualTable[pVisual->vid * MAXSCREENS]) { - PanoramiXVisuals[PanoramiXNumVisuals].vid = pVisual->vid; - PanoramiXVisuals[PanoramiXNumVisuals].class = pVisual->class; - PanoramiXVisuals[PanoramiXNumVisuals].bitsPerRGBValue = pVisual->bitsPerRGBValue; - PanoramiXVisuals[PanoramiXNumVisuals].ColormapEntries = pVisual->ColormapEntries; - PanoramiXVisuals[PanoramiXNumVisuals].nplanes = pVisual->nplanes; - PanoramiXVisuals[PanoramiXNumVisuals].redMask = pVisual->redMask; - PanoramiXVisuals[PanoramiXNumVisuals].greenMask = pVisual->greenMask; - PanoramiXVisuals[PanoramiXNumVisuals].blueMask = pVisual->blueMask; - PanoramiXVisuals[PanoramiXNumVisuals].offsetRed = pVisual->offsetRed; - PanoramiXVisuals[PanoramiXNumVisuals].offsetGreen = pVisual->offsetGreen; - PanoramiXVisuals[PanoramiXNumVisuals].offsetBlue = pVisual->offsetBlue; - PanoramiXNumVisuals++; + if (!found) + return; + } - for (j = 0; j < PanoramiXNumDepths; j++) { - if (PanoramiXDepths[j].depth == pVisual->nplanes) { - PanoramiXDepths[j].vids[PanoramiXDepths[j].numVids] = pVisual->vid; - PanoramiXDepths[j].numVids++; - break; - } - } - } - } + /* found a matching visual on all screens, add it to the subset list */ + j = PanoramiXNumVisuals; + PanoramiXNumVisuals++; + PanoramiXVisuals = xrealloc(PanoramiXVisuals, + PanoramiXNumVisuals * sizeof(VisualRec)); + memcpy(&PanoramiXVisuals[j], pVisual, sizeof(VisualRec)); - root = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + for (k = 0; k < PanoramiXNumDepths; k++) { + if (PanoramiXDepths[k].depth == pVisual->nplanes) { + PanoramiXDepths[k].vids[PanoramiXDepths[k].numVids] = pVisual->vid; + PanoramiXDepths[k].numVids++; + break; + } + } +} + +extern void +PanoramiXConsolidate(void) +{ + int i; + PanoramiXRes *root, *defmap, *saver; + ScreenPtr pScreen = screenInfo.screens[0]; + DepthPtr pDepth = pScreen->allowedDepths; + VisualPtr pVisual = pScreen->visuals; + + PanoramiXNumDepths = 0; + PanoramiXNumVisuals = 0; + + for (i = 0; i < pScreen->numDepths; i++) + PanoramiXMaybeAddDepth(pDepth++); + + for (i = 0; i < pScreen->numVisuals; i++) + PanoramiXMaybeAddVisual(pVisual++); + + root = xalloc(sizeof(PanoramiXRes)); root->type = XRT_WINDOW; - defmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + defmap = xalloc(sizeof(PanoramiXRes)); defmap->type = XRT_COLORMAP; - saver = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)); + saver = xalloc(sizeof(PanoramiXRes)); saver->type = XRT_WINDOW; - for (i = 0; i < PanoramiXNumScreens; i++) { root->info[i].id = WindowTable[i]->drawable.id; root->u.win.class = InputOutput; @@ -854,6 +841,31 @@ void PanoramiXConsolidate(void) AddResource(defmap->info[0].id, XRT_COLORMAP, defmap); } +_X_EXPORT VisualID +PanoramiXTranslateVisualID(int screen, VisualID orig) +{ + VisualPtr pVisual = NULL; + int i, j; + + for (i = 0; i < PanoramiXNumVisuals; i++) { + if (orig == PanoramiXVisuals[i].vid) { + pVisual = &PanoramiXVisuals[i]; + break; + } + } + + if (!pVisual) + return 0; + + /* found the original, now translate it relative to the backend screen */ + for (i = 0; i < PanoramiXNumScreens; i++) + for (j = 0; j < screenInfo.screens[i]->numVisuals; j++) + if (VisualsEqual(pVisual, &screenInfo.screens[i]->visuals[j])) + return screenInfo.screens[i]->visuals[j].vid; + + return 0; +} + /* * PanoramiXResetProc() diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index f9a579625..d19b3039a 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -150,7 +150,7 @@ int PanoramiXCreateWindow(ClientPtr client) if (cmap) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; if ( orig_visual != CopyFromParent ) - stuff->visual = PanoramiXVisualTable[(orig_visual*MAXSCREENS) + j]; + stuff->visual = PanoramiXTranslateVisualID(j, orig_visual); result = (*SavedProcVector[X_CreateWindow])(client); if(result != Success) break; } @@ -2077,9 +2077,6 @@ int PanoramiXCreateColormap(ClientPtr client) client, stuff->window, XRT_WINDOW, DixReadAccess))) return BadWindow; - if(!stuff->visual || (stuff->visual > 255)) - return BadValue; - if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) return BadAlloc; @@ -2092,7 +2089,7 @@ int PanoramiXCreateColormap(ClientPtr client) FOR_NSCREENS_BACKWARD(j){ stuff->mid = newCmap->info[j].id; stuff->window = win->info[j].id; - stuff->visual = PanoramiXVisualTable[(orig_visual * MAXSCREENS) + j]; + stuff->visual = PanoramiXTranslateVisualID(j, orig_visual); result = (* SavedProcVector[X_CreateColormap])(client); if(result != Success) break; } diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h index ae9024418..6d556e963 100644 --- a/Xext/panoramiXsrv.h +++ b/Xext/panoramiXsrv.h @@ -12,8 +12,8 @@ extern int PanoramiXNumScreens; extern PanoramiXData *panoramiXdataPtr; extern int PanoramiXPixWidth; extern int PanoramiXPixHeight; -extern XID *PanoramiXVisualTable; +extern VisualID PanoramiXTranslateVisualID(int screen, VisualID orig); extern void PanoramiXConsolidate(void); extern Bool PanoramiXCreateConnectionBlock(void); extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int); diff --git a/Xext/saver.c b/Xext/saver.c index 9a6dd7757..feab972e2 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -1346,8 +1346,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[i].id; if (orig_visual != CopyFromParent) - stuff->visualID = - PanoramiXVisualTable[(orig_visual*MAXSCREENS) + i]; + stuff->visualID = PanoramiXTranslateVisualID(i, orig_visual); status = ScreenSaverSetAttributes(client); } diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c index 6771cf1de..85e0f8701 100644 --- a/hw/dmx/glxProxy/glxcmds.c +++ b/hw/dmx/glxProxy/glxcmds.c @@ -66,7 +66,6 @@ #ifdef PANORAMIX #include "panoramiXsrv.h" -extern XID *PanoramiXVisualTable; #endif extern __GLXFBConfig **__glXFBConfigs; @@ -2824,14 +2823,8 @@ int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc) #ifdef PANORAMIX else if (!noPanoramiXExtension) { /* convert the associated visualId to the panoramix one */ - for (v=0; v<255; v++) { - if ( PanoramiXVisualTable[ v * MAXSCREENS + screen ] == - associatedVisualId ) { - associatedVisualId = v; - break; - } - } - pFBConfig->associatedVisualId = associatedVisualId; + pFBConfig->associatedVisualId = + PanoramiXTranslateVisualID(screen, v); } #endif } diff --git a/hw/xfree86/loader/extsym.c b/hw/xfree86/loader/extsym.c index e09e9c084..1bdff9482 100644 --- a/hw/xfree86/loader/extsym.c +++ b/hw/xfree86/loader/extsym.c @@ -44,7 +44,6 @@ extern RESTYPE ShmSegType, ShmPixType; extern Bool noPanoramiXExtension; extern int PanoramiXNumScreens; extern PanoramiXData *panoramiXdataPtr; -extern XID *PanoramiXVisualTable; extern unsigned long XRT_WINDOW; extern unsigned long XRT_PIXMAP; extern unsigned long XRT_GC; @@ -69,7 +68,6 @@ _X_HIDDEN void *extLookupTab[] = { SYMFUNC(XineramaDeleteResource) SYMVAR(PanoramiXNumScreens) SYMVAR(panoramiXdataPtr) - SYMVAR(PanoramiXVisualTable) SYMVAR(XRT_WINDOW) SYMVAR(XRT_PIXMAP) SYMVAR(XRT_GC) From 24bebdded44a9e184455b4fee7800257fee81efb Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 24 Dec 2007 15:07:49 -0500 Subject: [PATCH 531/552] fbFillRegionTiled() is now dead code. Only ever called from the old PaintWindow* screen hooks, but those are gone now. As a pleasant side effect, fb loses its #ifdef PANORAMIX. --- fb/fb.h | 5 ---- fb/fbwindow.c | 65 --------------------------------------------- fb/wfbrename.h | 1 - hw/kdrive/src/kaa.c | 12 --------- 4 files changed, 83 deletions(-) diff --git a/fb/fb.h b/fb/fb.h index 5b56d96a2..01000d79c 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -2087,11 +2087,6 @@ fbFillRegionSolid (DrawablePtr pDrawable, FbBits and, FbBits xor); -void -fbFillRegionTiled (DrawablePtr pDrawable, - RegionPtr pRegion, - PixmapPtr pTile); - pixman_image_t *image_from_pict (PicturePtr pict, Bool has_clip); void free_pixman_pict (PicturePtr, pixman_image_t *); diff --git a/fb/fbwindow.c b/fb/fbwindow.c index 89f601f29..f6fe8aa83 100644 --- a/fb/fbwindow.c +++ b/fb/fbwindow.c @@ -250,68 +250,3 @@ fbFillRegionSolid (DrawablePtr pDrawable, fbFinishAccess (pDrawable); } - -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#endif - -void -fbFillRegionTiled (DrawablePtr pDrawable, - RegionPtr pRegion, - PixmapPtr pTile) -{ - FbBits *dst; - FbStride dstStride; - int dstBpp; - int dstXoff, dstYoff; - FbBits *tile; - FbStride tileStride; - int tileBpp; - int tileXoff, tileYoff; /* XXX assumed to be zero */ - int tileWidth, tileHeight; - int n = REGION_NUM_RECTS(pRegion); - BoxPtr pbox = REGION_RECTS(pRegion); - int xRot = pDrawable->x; - int yRot = pDrawable->y; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) - { - int index = pDrawable->pScreen->myNum; - if(&WindowTable[index]->drawable == pDrawable) - { - xRot -= panoramiXdataPtr[index].x; - yRot -= panoramiXdataPtr[index].y; - } - } -#endif - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); - fbGetDrawable (&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); - tileWidth = pTile->drawable.width; - tileHeight = pTile->drawable.height; - xRot += dstXoff; - yRot += dstYoff; - - while (n--) - { - fbTile (dst + (pbox->y1 + dstYoff) * dstStride, - dstStride, - (pbox->x1 + dstXoff) * dstBpp, - (pbox->x2 - pbox->x1) * dstBpp, - pbox->y2 - pbox->y1, - tile, - tileStride, - tileWidth * dstBpp, - tileHeight, - GXcopy, - FB_ALLONES, - dstBpp, - xRot * dstBpp, - yRot - (pbox->y1 + dstYoff)); - pbox++; - } - - fbFinishAccess (&pTile->drawable); - fbFinishAccess (pDrawable); -} diff --git a/fb/wfbrename.h b/fb/wfbrename.h index 93822442f..dc0528559 100644 --- a/fb/wfbrename.h +++ b/fb/wfbrename.h @@ -79,7 +79,6 @@ #define fbExpandDirectColors wfbExpandDirectColors #define fbFill wfbFill #define fbFillRegionSolid wfbFillRegionSolid -#define fbFillRegionTiled wfbFillRegionTiled #define fbFillSpans wfbFillSpans #define fbFixCoordModePrevious wfbFixCoordModePrevious #define fbGCFuncs wfbGCFuncs diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index e75b08399..db09e9dba 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -996,18 +996,6 @@ kaaFillRegionSolid (DrawablePtr pDrawable, kaaDrawableDirty (pDrawable); } -#if 0 -static void -kaaFillRegionTiled (DrawablePtr pDrawable, - RegionPtr pRegion, - Pixmap pTile) -{ - else - { - kaaWaitSync -} -#endif - Bool kaaDrawInit (ScreenPtr pScreen, KaaScreenInfoPtr pScreenInfo) From 060a66b6e2feddba43ed207b6fcf2cf1f7fe39fd Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 24 Dec 2007 15:55:58 -0500 Subject: [PATCH 532/552] Normalize swapped dispatch for Fixes{ChangeSaveSet,SelectSelectionInput} --- xfixes/saveset.c | 2 +- xfixes/select.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xfixes/saveset.c b/xfixes/saveset.c index e6e297638..31664ab65 100755 --- a/xfixes/saveset.c +++ b/xfixes/saveset.c @@ -72,5 +72,5 @@ SProcXFixesChangeSaveSet(ClientPtr client) swaps(&stuff->length, n); swapl(&stuff->window, n); - return ProcXFixesChangeSaveSet(client); + return (*ProcXFixesVector[stuff->xfixesReqType])(client); } diff --git a/xfixes/select.c b/xfixes/select.c index 415257ec1..12a165fd0 100755 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -224,7 +224,7 @@ SProcXFixesSelectSelectionInput (ClientPtr client) swapl(&stuff->window, n); swapl(&stuff->selection, n); swapl(&stuff->eventMask, n); - return ProcXFixesSelectSelectionInput(client); + return (*ProcXFixesVector[stuff->xfixesReqType])(client); } void From 69f782676797744815ff76b8a11b11178066f501 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 22 Feb 2008 16:04:35 -0500 Subject: [PATCH 533/552] Match Xephyr DRI definitions to the ones in xf86dri.h --- hw/kdrive/ephyr/XF86dri.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/kdrive/ephyr/XF86dri.c b/hw/kdrive/ephyr/XF86dri.c index c11da0634..506d7bed8 100644 --- a/hw/kdrive/ephyr/XF86dri.c +++ b/hw/kdrive/ephyr/XF86dri.c @@ -385,7 +385,7 @@ Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext) context, hHWContext ); } -Bool XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context) +GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid context) { Display * const dpy = (Display *) ndpy; XExtDisplayInfo *info = find_display (dpy); @@ -406,7 +406,7 @@ Bool XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen, __DRIid conte return True; } -Bool +GLboolean XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen, __DRIid drawable, drm_drawable_t * hHWDrawable) { @@ -437,7 +437,7 @@ XF86DRICreateDrawable (__DRInativeDisplay * ndpy, int screen, return True; } -Bool XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen, +GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen, __DRIid drawable ) { Display * const dpy = (Display *) ndpy; From 347db49ebe4596db16455ea8a1a608cfa826c5c7 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 22 Feb 2008 16:05:33 -0500 Subject: [PATCH 534/552] s/via/openchrome/ in the autoconfig logic. Xorg's via driver is effectively dead anyway. --- hw/xfree86/common/xf86AutoConfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index c6e197216..da6c3f38d 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -184,7 +184,7 @@ videoPtrToDriverName(struct pci_device *dev) case 0x3d3d: return "glint"; case 0x1023: return "trident"; case 0x100c: return "tseng"; - case 0x1106: return "via"; + case 0x1106: return "openchrome"; case 0x15ad: return "vmware"; default: break; } From e6a4cde16dc99ea02ac93da1d1b9517b1073d159 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 22 Feb 2008 18:36:29 -0500 Subject: [PATCH 535/552] Use the client-side XKB headers for the config utilities --- hw/xfree86/utils/xorgcfg/text-mode.c | 2 +- hw/xfree86/utils/xorgconfig/xorgconfig.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/utils/xorgcfg/text-mode.c b/hw/xfree86/utils/xorgcfg/text-mode.c index c1fa67ed7..0b6e65482 100644 --- a/hw/xfree86/utils/xorgcfg/text-mode.c +++ b/hw/xfree86/utils/xorgcfg/text-mode.c @@ -39,7 +39,7 @@ #endif #include #include -#include "xkbstr.h" +#include #include #include "cards.h" #include "config.h" diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c index d537abac4..30eb83182 100644 --- a/hw/xfree86/utils/xorgconfig/xorgconfig.c +++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c @@ -106,7 +106,7 @@ #include #include -#include "xkbstr.h" +#include #include #define MAX_XKBOPTIONS 5 From 6dc369028d3ca741de57ad78febf2f5f82e0696e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 23 Feb 2008 00:01:02 -0800 Subject: [PATCH 536/552] XQuartz: Quit now properly warns the user (cherry picked from commit ed3d7b3959c2a0cb63e37210455bcc6cf195b807) --- .../English.lproj/main.nib/designable.nib | 42 +++++++++--------- .../English.lproj/main.nib/keyedobjects.nib | Bin 35529 -> 35571 bytes 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib index b5cfcf682..ea3a0daa8 100644 --- a/hw/xquartz/bundle/English.lproj/main.nib/designable.nib +++ b/hw/xquartz/bundle/English.lproj/main.nib/designable.nib @@ -2,14 +2,14 @@ 1050 - 9B18 + 9C31 639 - 949 - 343.00 + 949.26 + 352.00 YES + - YES @@ -448,7 +448,7 @@ 3 2 - {{479, 459}, {481, 345}} + {{319, 294}, {481, 345}} 1350041600 X11 Preferences NSPanel @@ -993,7 +993,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 {481, 345} - {{0, 0}, {1920, 1178}} + {{0, 0}, {1440, 878}} {213, 129} {3.40282e+38, 3.40282e+38} x11_prefs @@ -1001,7 +1001,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 11 2 - {{537, 554}, {454, 311}} + {{361, 362}, {454, 311}} 1350041600 X11 Application Menu NSPanel @@ -1355,7 +1355,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 {454, 311} - {{0, 0}, {1920, 1178}} + {{0, 0}, {1440, 878}} {320, 262} x11_apps @@ -1865,14 +1865,6 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 300332 - - - quit: - - - - 300333 - menu @@ -1881,6 +1873,14 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 300334 + + + terminate: + + + + 300336 + @@ -3075,6 +3075,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 545.ImportedFromIB2 56.IBPluginDependency 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect 57.IBPluginDependency 57.ImportedFromIB2 57.editorWindowContentRectSynchronizationRect @@ -3168,11 +3169,11 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 {{100, 746}, {155, 33}} com.apple.InterfaceBuilder.CocoaPlugin - {{537, 554}, {454, 311}} + {{537, 545}, {454, 311}} com.apple.InterfaceBuilder.CocoaPlugin - {{537, 554}, {454, 311}} + {{537, 545}, {454, 311}} {{433, 406}, {486, 327}} @@ -3194,7 +3195,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 {320, 240} com.apple.InterfaceBuilder.CocoaPlugin - {{0, 1114}, {336, 20}} + {{0, 836}, {336, 20}} com.apple.InterfaceBuilder.CocoaPlugin {{67, 819}, {336, 20}} @@ -3319,6 +3320,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 com.apple.InterfaceBuilder.CocoaPlugin + {{12, 633}, {218, 203}} com.apple.InterfaceBuilder.CocoaPlugin {{79, 616}, {218, 203}} @@ -3354,7 +3356,7 @@ d2hpY2ggbWF5IHByZXZlbnQgWDExIGFwcGxpY2F0aW9ucyBmcm9tIGxhdW5jaGluZy4 - 300334 + 300336 diff --git a/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/English.lproj/main.nib/keyedobjects.nib index 5223c9a95ecc5ed438a02c3f6aff0a65e6f8360f..f60dcbacb0385caa8292cd06bd178d709632566b 100644 GIT binary patch literal 35571 zcmdSC2YggT*FQcp_wL=z-Mh(dde4S*(hI4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z=P~C+=l$3Yv0kz7#GZ`{j~gGC9{*l^W_(Wk_X+PNyq_>8AuXXSp&`+cn4VaY zSe|$?sYg;^Qb>{`X-d-kq)kaDl5UPINq#LkC^?lG5IbO{s5( zK^LSBOdXc$NKH@8N}ZFMow_)6Nos!T%GA~L721n>)84c%?MHoSf9gm5>0la2-=jlm zFda@q=xF*81yrYy8kEoo8cCz6gT~T$nn=geaWsuG%Bi9g=@dGR&Y&4Ilg^@Z=v=yh z=FmknkLJ^5^b1-@i)b-jPdC!dbSvFXchWud8@i8{(f#xwJxnXJU^aq{VxcUI=?pT=2n%O+7R6$ilf|(_mfSAUpv-DVRJzzi zHib=Vrxtz6ve;}kmn~qqERQW=OWAT(zzSIrTf^3}61I_TVcXbOY!})=BHMb;dep zHCUIeYu4{pqt#?JTlcI7R*Ut>YUAw~1pXZF%)9WeygTo~dvR~xhx>3}-kaAHhfQP#(s0j`$cJ&LepYkL3xxy_v@;x47gJ_+*~WXYfyX7N5iC@r8U5|BNr? zpYs)b6<@>G@eO=4|B`>jck!?JUj7{~=RfenypkW|$NA5^me=umewJV0m-tnFgWuwR z@H_l2|C|4txAG^VgLp=`33uTkUJ~7er|2oXL~rrBctgA;1_*yKSOkh7@xB-?Ld0nC zvCsq*SeU{tqJ>k$izJaE(!_WngiA~kQ^j4@uR2`)uL9^iF$EfG>A*$s<Yh&X0=`IRJ+w)^{x6|9Z(gjQXNyr)z7L{)v0=QR$Wk6)OFRU x?x_c=MLlu3xt@2qySlkNT|HcVTt2RTu7R$Ab}B)8+Wn#bjYr`B{{OFQ)IXEdOm+YO From 4b50e71bf127c8e0f289e3b76c786f0398effe65 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 24 Feb 2008 20:25:13 -0500 Subject: [PATCH 537/552] Bug #13736: Fix %bx in VBEGetPixelClock to match spec. Reported by Yannick Henault. --- hw/xfree86/vbe/vbe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c index 06559bbd5..8af1727cc 100644 --- a/hw/xfree86/vbe/vbe.c +++ b/hw/xfree86/vbe/vbe.c @@ -1019,7 +1019,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock) /* Input: AX := 4F0Bh VBE Get Pixel Clock - BL := 01h Get Pixel Clock + BL := 00h Get Pixel Clock ECX := pixel clock in units of Hz DX := mode number @@ -1030,7 +1030,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock) pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f0b; - pVbe->pInt10->bx = 0x01; + pVbe->pInt10->bx = 0x00; pVbe->pInt10->cx = clock; pVbe->pInt10->dx = mode; xf86ExecX86int10(pVbe->pInt10); From f19f7b8e53ed6609fc1fdd272de5521417946209 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 25 Feb 2008 17:07:07 -0300 Subject: [PATCH 538/552] Clean some garbage caused when pciaccess was merged: FindPCIVideoInfo() function isn't need anymore. xf86scanpci() is being called only once so we don't need permanent (static) variables there. restorePciState() is not used for now (until we find why multiple cards aren't working). --- hw/xfree86/common/xf86pciBus.c | 241 ++++++++++++++++---------------- hw/xfree86/os-support/bus/Pci.c | 13 +- 2 files changed, 118 insertions(+), 136 deletions(-) diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index 13e13e980..d5ae75b3a 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -107,127 +107,6 @@ xf86FormatPciBusNumber(int busnum, char *buffer) sprintf(buffer, "%d@%d", busnum & 0x00ff, busnum >> 8); } -static void -FindPCIVideoInfo(void) -{ - int i = 0, k; - int num = 0; - struct pci_device *info; - struct pci_device_iterator *iter; - - - if (!xf86scanpci()) { - xf86PciVideoInfo = NULL; - return; - } - - iter = pci_slot_match_iterator_create(& xf86IsolateDevice); - while ((info = pci_device_next(iter)) != NULL) { - if (PCIINFOCLASSES(info->device_class)) { - num++; - xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo, - (sizeof(struct pci_device *) - * (num + 1))); - xf86PciVideoInfo[num] = NULL; - xf86PciVideoInfo[num - 1] = info; - - pci_device_probe(info); - info->user_data = 0; - } - } - - - /* If we haven't found a primary device try a different heuristic */ - if (primaryBus.type == BUS_NONE && num) { - for (i = 0; i < num; i++) { - uint16_t command; - - info = xf86PciVideoInfo[i]; - pci_device_cfg_read_u16(info, & command, 4); - - if ((command & PCI_CMD_MEM_ENABLE) - && ((num == 1) || IS_VGA(info->device_class))) { - if (primaryBus.type == BUS_NONE) { - primaryBus.type = BUS_PCI; - primaryBus.id.pci = info; - } else { - xf86Msg(X_NOTICE, - "More than one possible primary device found\n"); - primaryBus.type ^= (BusType)(-1); - } - } - } - } - - /* Print a summary of the video devices found */ - for (k = 0; k < num; k++) { - const char *vendorname = NULL, *chipname = NULL; - const char *prim = " "; - Bool memdone = FALSE, iodone = FALSE; - - - info = xf86PciVideoInfo[k]; - - vendorname = pci_device_get_vendor_name( info ); - chipname = pci_device_get_device_name( info ); - - if ((!vendorname || !chipname) && - !PCIALWAYSPRINTCLASSES(info->device_class)) - continue; - - if (xf86IsPrimaryPci(info)) - prim = "*"; - - xf86Msg( X_PROBED, "PCI:%s(%u@%u:%u:%u) ", prim, info->domain, - info->bus, info->dev, info->func ); - - if (vendorname) - xf86ErrorF("%s ", vendorname); - else - xf86ErrorF("unknown vendor (0x%04x) ", info->vendor_id); - - if (chipname) - xf86ErrorF("%s ", chipname); - else - xf86ErrorF("unknown chipset (0x%04x) ", info->device_id); - - xf86ErrorF("rev %d", info->revision); - - for (i = 0; i < 6; i++) { - struct pci_mem_region * r = & info->regions[i]; - - if ( r->size && ! r->is_IO ) { - if (!memdone) { - xf86ErrorF(", Mem @ "); - memdone = TRUE; - } else - xf86ErrorF(", "); - xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); - } - } - - for (i = 0; i < 6; i++) { - struct pci_mem_region * r = & info->regions[i]; - - if ( r->size && r->is_IO ) { - if (!iodone) { - xf86ErrorF(", I/O @ "); - iodone = TRUE; - } else - xf86ErrorF(", "); - xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); - } - } - - if ( info->rom_size ) { - xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size); - } - - xf86ErrorF("\n"); - } -} - - /* * IO enable/disable related routines for PCI */ @@ -401,10 +280,10 @@ savePciState( struct pci_device * dev, pciSavePtr ptr ) } /* move to OS layer */ +#if 0 static void restorePciState( struct pci_device * dev, pciSavePtr ptr) { -#if 0 int i; /* disable card before setting anything */ @@ -419,8 +298,8 @@ restorePciState( struct pci_device * dev, pciSavePtr ptr) } pci_device_cfg_write_u32(dev, ptr->command, PCI_CMD_STAT_REG); -#endif } +#endif /* move to OS layer */ static void @@ -470,7 +349,121 @@ restorePciBusState(BusAccPtr ptr) void xf86PciProbe(void) { - FindPCIVideoInfo(); + int i = 0, k; + int num = 0; + struct pci_device *info; + struct pci_device_iterator *iter; + + + if (!xf86scanpci()) { + xf86PciVideoInfo = NULL; + return; + } + + iter = pci_slot_match_iterator_create(& xf86IsolateDevice); + while ((info = pci_device_next(iter)) != NULL) { + if (PCIINFOCLASSES(info->device_class)) { + num++; + xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo, + (sizeof(struct pci_device *) + * (num + 1))); + xf86PciVideoInfo[num] = NULL; + xf86PciVideoInfo[num - 1] = info; + + pci_device_probe(info); + info->user_data = 0; + } + } + + + /* If we haven't found a primary device try a different heuristic */ + if (primaryBus.type == BUS_NONE && num) { + for (i = 0; i < num; i++) { + uint16_t command; + + info = xf86PciVideoInfo[i]; + pci_device_cfg_read_u16(info, & command, 4); + + if ((command & PCI_CMD_MEM_ENABLE) + && ((num == 1) || IS_VGA(info->device_class))) { + if (primaryBus.type == BUS_NONE) { + primaryBus.type = BUS_PCI; + primaryBus.id.pci = info; + } else { + xf86Msg(X_NOTICE, + "More than one possible primary device found\n"); + primaryBus.type ^= (BusType)(-1); + } + } + } + } + + /* Print a summary of the video devices found */ + for (k = 0; k < num; k++) { + const char *vendorname = NULL, *chipname = NULL; + const char *prim = " "; + Bool memdone = FALSE, iodone = FALSE; + + + info = xf86PciVideoInfo[k]; + + vendorname = pci_device_get_vendor_name( info ); + chipname = pci_device_get_device_name( info ); + + if ((!vendorname || !chipname) && + !PCIALWAYSPRINTCLASSES(info->device_class)) + continue; + + if (xf86IsPrimaryPci(info)) + prim = "*"; + + xf86Msg( X_PROBED, "PCI:%s(%u@%u:%u:%u) ", prim, info->domain, + info->bus, info->dev, info->func ); + + if (vendorname) + xf86ErrorF("%s ", vendorname); + else + xf86ErrorF("unknown vendor (0x%04x) ", info->vendor_id); + + if (chipname) + xf86ErrorF("%s ", chipname); + else + xf86ErrorF("unknown chipset (0x%04x) ", info->device_id); + + xf86ErrorF("rev %d", info->revision); + + for (i = 0; i < 6; i++) { + struct pci_mem_region * r = & info->regions[i]; + + if ( r->size && ! r->is_IO ) { + if (!memdone) { + xf86ErrorF(", Mem @ "); + memdone = TRUE; + } else + xf86ErrorF(", "); + xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); + } + } + + for (i = 0; i < 6; i++) { + struct pci_mem_region * r = & info->regions[i]; + + if ( r->size && r->is_IO ) { + if (!iodone) { + xf86ErrorF(", I/O @ "); + iodone = TRUE; + } else + xf86ErrorF(", "); + xf86ErrorF("0x%08lx/%ld", r->base_addr, r->size); + } + } + + if ( info->rom_size ) { + xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", info->rom_size); + } + + xf86ErrorF("\n"); + } } void diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c index a34ed99d0..1ca0bd07a 100644 --- a/hw/xfree86/os-support/bus/Pci.c +++ b/hw/xfree86/os-support/bus/Pci.c @@ -268,18 +268,7 @@ pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS addr) _X_EXPORT Bool xf86scanpci(void) { - static Bool done = FALSE; - static Bool success = FALSE; - - /* - * if we haven't found PCI devices checking for pci_devp may - * result in an endless recursion if platform/OS specific PCI - * bus probing code calls this function from with in it. - */ - if (done) - return success; - - done = TRUE; + Bool success = FALSE; success = (pci_system_init() == 0); pciInit(); From 9727db88d57089be6483104de435626cdbad883a Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 25 Feb 2008 17:08:07 -0300 Subject: [PATCH 539/552] No more "-scanpci" given that we already have it in libpciaccess. (Yeah, lets nuke dead code!) --- hw/xfree86/common/Makefile.am | 2 +- hw/xfree86/common/xf86DoScanPci.c | 147 --------------------------- hw/xfree86/common/xf86Init.c | 5 - hw/xfree86/common/xf86PciInfo.h | 5 +- hw/xfree86/common/xf86Priv.h | 4 - hw/xfree86/doc/devel/Registry | 1 - hw/xfree86/doc/man/Xorg.man.pre | 7 -- hw/xfree86/doc/man/xorg.conf.man.pre | 6 +- hw/xfree86/dummylib/Makefile.am | 2 +- hw/xfree86/modes/Makefile.am | 2 +- hw/xgl/glx/xglxorg.c | 2 - 11 files changed, 7 insertions(+), 176 deletions(-) delete mode 100644 hw/xfree86/common/xf86DoScanPci.c diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index c060b73f0..4f0a2d6b3 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -31,7 +31,7 @@ BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ xf86Cursor.c xf86cvt.c xf86DGA.c xf86DPMS.c \ - xf86DoProbe.c xf86DoScanPci.c xf86Events.c \ + xf86DoProbe.c xf86Events.c \ xf86Globals.c xf86AutoConfig.c \ xf86MiscExt.c xf86Option.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ diff --git a/hw/xfree86/common/xf86DoScanPci.c b/hw/xfree86/common/xf86DoScanPci.c deleted file mode 100644 index 51892f041..000000000 --- a/hw/xfree86/common/xf86DoScanPci.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) 1999-2002 by The XFree86 Project, Inc. - * - * 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, sublicense, - * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. - * - * Except as contained in this notice, the name of the copyright holder(s) - * and author(s) shall not be used in advertising or otherwise to promote - * the sale, use or other dealings in this Software without prior written - * authorization from the copyright holder(s) and author(s). - */ - -/* - * Finish setting up the server. - * Call the functions from the scanpci module. - */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include "os.h" -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86Pci.h" -#include "Pci.h" -#include "xf86_OSproc.h" - -static void ScanPciDisplayPCICardInfo(void); - -void -ScanPciDisplayPCICardInfo(void) -{ - struct pci_id_match match; - struct pci_device_iterator *iter; - const struct pci_device *dev; - - xf86EnableIO(); - - if (! xf86scanpci()) { - xf86MsgVerb(X_NONE, 0, "No PCI info available\n"); - return; - } - xf86MsgVerb(X_NONE, 0, - "Probing for PCI devices (Bus:Device:Function)\n\n"); - - iter = pci_id_match_iterator_create(NULL); - while ((dev = pci_device_next(iter)) != NULL) { - const char *svendorname = NULL, *subsysname = NULL; - const char *vendorname = NULL, *devicename = NULL; - - - xf86MsgVerb(X_NONE, 0, "(%d:%d:%d) ", - PCI_MAKE_BUS(dev->domain, dev->bus), dev->dev, dev->func); - - /* - * Lookup as much as we can about the device. - */ - match.vendor_id = dev->vendor_id; - match.device_id = dev->device_id; - match.subvendor_id = (dev->subvendor_id != 0) - ? dev->subvendor_id : PCI_MATCH_ANY; - match.subdevice_id = (dev->subdevice_id != 0) - ? dev->subdevice_id : PCI_MATCH_ANY; - match.device_class = 0; - match.device_class_mask = 0; - - pci_get_strings(& match, & vendorname, & devicename, - & svendorname, & subsysname); - - if ((dev->subvendor_id != 0) || (dev->subdevice_id != 0)) { - xf86MsgVerb(X_NONE, 0, "%s %s (0x%04x / 0x%04x) using ", - (svendorname == NULL) ? "unknown vendor" : svendorname, - (subsysname == NULL) ? "unknown card" : subsysname, - dev->subvendor_id, dev->subdevice_id); - } - - xf86MsgVerb(X_NONE, 0, "%s %s (0x%04x / 0x%04x)\n", - (vendorname == NULL) ? "unknown vendor" : vendorname, - (devicename == NULL) ? "unknown chip" : devicename, - dev->vendor_id, dev->device_id); - } - - pci_iterator_destroy(iter); -} - - -void DoScanPci(int argc, char **argv, int i) -{ - int j,skip,globalVerbose; - - /* - * first we need to finish setup of the OS so that we can call other - * functions in the server - */ - OsInit(); - - /* - * The old verbosity processing that was here isn't useful anymore, but - * for compatibility purposes, ignore verbosity changes after the -scanpci - * flag. - */ - globalVerbose = xf86Verbose; - - /* - * next we process the arguments that are remaining on the command line, - * so that things like the module path can be set there - */ - for ( j = i+1; j < argc; j++ ) { - if ((skip = ddxProcessArgument(argc, argv, j))) - j += (skip - 1); - } - - /* - * Was the verbosity level increased? If so, set it back. - */ - if (xf86Verbose > globalVerbose) - xf86SetVerbosity(globalVerbose); - - ScanPciDisplayPCICardInfo(); - - /* - * That's it; we really should clean things up, but a simple - * exit seems to be all we need. - */ - exit(0); -} diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 41cf1d17c..7121b027b 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1668,10 +1668,6 @@ ddxProcessArgument(int argc, char **argv, int i) return 1; } #endif - if (!strcmp(argv[i], "-scanpci")) - { - DoScanPci(argc, argv, i); - } if (!strcmp(argv[i], "-probe")) { xf86DoProbe = TRUE; @@ -1734,7 +1730,6 @@ ddxUseMsg() ErrorF("-config file specify a configuration file, relative to the\n"); ErrorF(" "__XCONFIGFILE__" search path, only root can use absolute\n"); ErrorF("-probeonly probe for devices, then exit\n"); - ErrorF("-scanpci execute the scanpci module and exit\n"); ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-logverbose [n] verbose log messages\n"); ErrorF("-quiet minimal startup messages\n"); diff --git a/hw/xfree86/common/xf86PciInfo.h b/hw/xfree86/common/xf86PciInfo.h index 0630cfa82..356c7db4d 100644 --- a/hw/xfree86/common/xf86PciInfo.h +++ b/hw/xfree86/common/xf86PciInfo.h @@ -40,9 +40,8 @@ * or for non-video devices unless they're needed by a driver or elsewhere. * A comprehensive set of PCI vendor, device and subsystem data is * auto-generated from the ../etc/pci.ids file using the pciids2c.pl script, - * and is used in both the scanpci module and the scanpci utility. Don't - * modify the pci.ids file. If new/corrected entries are required, add them - * to ../etc/extrapci.ids. + * and is used in scanpci utility. Don't modify the pci.ids file. If + * new/corrected entries are required, add them to ../etc/extrapci.ids. */ #ifndef _XF86_PCIINFO_H diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 32801cb3f..fb9ecaea8 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -155,10 +155,6 @@ Bool xf86PathIsSafe(const char *path); extern DisplayModeRec xf86DefaultModes []; -/* xf86DoScanPci.c */ - -void DoScanPci(int argc, char **argv, int i); - /* xf86DoProbe.c */ void DoProbe(void); void DoConfigure(void); diff --git a/hw/xfree86/doc/devel/Registry b/hw/xfree86/doc/devel/Registry index d76622157..1fec230e8 100644 --- a/hw/xfree86/doc/devel/Registry +++ b/hw/xfree86/doc/devel/Registry @@ -75,7 +75,6 @@ rendition s3 s3virge savage -scanpci shadow shadowfb siliconmotion diff --git a/hw/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre index c950e326b..405efda55 100644 --- a/hw/xfree86/doc/man/Xorg.man.pre +++ b/hw/xfree86/doc/man/Xorg.man.pre @@ -378,13 +378,6 @@ and .B \-ggamma options. .TP 8 -.B \-scanpci -When this option is specified, the -.B __xservername__ -server scans the PCI bus, and prints out some information about each -device that was detected. See also scanpci(__appmansuffix__) -and pcitweak(__appmansuffix__). -.TP 8 .BI \-screen " screen-name" Use the __xconfigfile__(__filemansuffix__) file .B Screen diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre index 96f30c4bd..9f3980879 100644 --- a/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/hw/xfree86/doc/man/xorg.conf.man.pre @@ -994,10 +994,8 @@ In multi-head configurations, or when using a secondary graphics card in a single-head configuration, this entry is mandatory. Its main purpose is to make an unambiguous connection between the device section and the hardware it is representing. -This information can usually be found by running the __xservername__ server -with the -.B \-scanpci -command line option. +This information can usually be found by running the pciaccess tool +scanpci. .TP 7 .BI "Screen " number This option is mandatory for cards where a single PCI entity can drive more diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am index ad3f1ea12..85a1d03dd 100644 --- a/hw/xfree86/dummylib/Makefile.am +++ b/hw/xfree86/dummylib/Makefile.am @@ -1,6 +1,6 @@ # libdummy.a contains just those bits used in the server itself # libdummy-nonserver.a contains additional routines normally found in the -# server for use in building the utilities like scanpci & the config tools +# server for use in building the utilities like config tools noinst_LIBRARIES = libdummy-nonserver.a diff --git a/hw/xfree86/modes/Makefile.am b/hw/xfree86/modes/Makefile.am index 1f82068b3..6ee85757a 100644 --- a/hw/xfree86/modes/Makefile.am +++ b/hw/xfree86/modes/Makefile.am @@ -16,7 +16,7 @@ libxf86modes_a_SOURCES = \ INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ - -I$(srcdir)/../scanpci -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ + -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \ -I$(srcdir)/../dixmods/extmod diff --git a/hw/xgl/glx/xglxorg.c b/hw/xgl/glx/xglxorg.c index 984c50ee2..1d6fc9a30 100644 --- a/hw/xgl/glx/xglxorg.c +++ b/hw/xgl/glx/xglxorg.c @@ -253,8 +253,6 @@ xglxArgRec xorgUidArgs[] = { xglxArgRec xorgArgs[] = { ARG (xglxProcessXorgWaitExitArgument, "-probeonly", " probe for devices, then exit"), - ARG (xglxProcessXorgWaitExitArgument, "-scanpci", - " execute the scanpci module and exit"), XORG_UARG ("-verbose", " [n] verbose startup messages", 2), XORG_UARG ("-logverbose", " [n] verbose log messages", 2), XORG_UARG ("-quiet", " minimal startup messages", 1), From 7c582dd6de27d2f4fedf73319d2dea2bfb240efa Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 25 Feb 2008 17:31:37 -0300 Subject: [PATCH 540/552] remove lnxPciInit() unused function. --- hw/xfree86/os-support/linux/lnx_pci.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/xfree86/os-support/linux/lnx_pci.c b/hw/xfree86/os-support/linux/lnx_pci.c index 53818f2dc..8eedfa49f 100644 --- a/hw/xfree86/os-support/linux/lnx_pci.c +++ b/hw/xfree86/os-support/linux/lnx_pci.c @@ -25,8 +25,6 @@ #define PCIADDR_FMT "%lx" #endif -int lnxPciInit(void); - struct pci_dev { unsigned int domain; unsigned int bus; @@ -139,14 +137,6 @@ static struct pci_dev *xf86OSLinuxGetPciDevs(void) { return ret; } -/* not to be confused with linuxPciInit (i.e. ARCH_PCI_INIT), found in - * os-support/bus/linuxPci.c. */ -int lnxPciInit(void) { - if (!xf86OSLinuxPCIDevs) - xf86OSLinuxPCIDevs = xf86OSLinuxGetPciDevs(); - return xf86OSLinuxNumPciDevs; -} - /* Query the kvirt address (64bit) of a BAR range from size for a given TAG */ unsigned long xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base) From 81272f7ec9a3465e1d102c2ce627a45f92268857 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 25 Feb 2008 17:39:33 -0300 Subject: [PATCH 541/552] Some doc clean up: clean up legacy things in os-support/bus/Pci.c. Put InitOutput() comment to its right place. --- hw/xfree86/common/xf86Init.c | 14 +++---- hw/xfree86/os-support/bus/Pci.c | 69 --------------------------------- 2 files changed, 6 insertions(+), 77 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 7121b027b..d1603c081 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -198,13 +198,6 @@ xf86CreateRootWindow(WindowPtr pWin) } -/* - * InitOutput -- - * Initialize screenInfo for all actually accessible framebuffers. - * That includes vt-manager setup, querying all possible devices and - * collecting the pixmap formats. - */ - static void PostConfigInit(void) { @@ -467,7 +460,12 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) return foundScreen; } - +/* + * InitOutput -- + * Initialize screenInfo for all actually accessible framebuffers. + * That includes vt-manager setup, querying all possible devices and + * collecting the pixmap formats. + */ void InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) { diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c index 1ca0bd07a..2d3f748e7 100644 --- a/hw/xfree86/os-support/bus/Pci.c +++ b/hw/xfree86/os-support/bus/Pci.c @@ -1,64 +1,3 @@ -/* - * Pci.c - New server PCI access functions - * - * The XFree86 server PCI access functions have been reimplemented as a - * framework that allows each supported platform/OS to have their own - * platform/OS specific pci driver. - * - * All of the public PCI access functions exported to the other parts of - * the server are declared in Pci.h and defined herein. These include: - * pciInit() - Initialize PCI access functions - * pciReadLong() - Read a 32 bit value from a device's cfg space - * pciReadWord() - Read a 16 bit value from a device's cfg space - * pciReadByte() - Read an 8 bit value from a device's cfg space - * pciWriteLong() - Write a 32 bit value to a device's cfg space - * pciWriteWord() - Write a 16 bit value to a device's cfg space - * pciWriteByte() - Write an 8 bit value to a device's cfg space - * pciSetBitsLong() - Write a 32 bit value against a mask - * pciSetBitsByte() - Write an 8 bit value against a mask - * pciTag() - Return tag for a given PCI bus, device, & - * function - * pciBusAddrToHostAddr() - Convert a PCI address to a host address - * xf86scanpci() - Return info about all PCI devices - * xf86MapDomainMemory() - Like xf86MapPciMem() but can handle - * domain/host address translation - * xf86MapLegacyIO() - Maps PCI I/O spaces - * - * The actual PCI backend driver is selected by the pciInit() function - * (see below) using either compile time definitions, run-time checks, - * or both. - * - * Certain generic functions are provided that make the implementation - * of certain well behaved platforms (e.g. those supporting PCI config - * mechanism 1 or some thing close to it) very easy. - * - * Less well behaved platforms/OS's can roll their own functions. - * - * To add support for another platform/OS, add a call to fooPciInit() within - * pciInit() below under the correct compile time definition or run-time - * conditional. - * - * The fooPciInit() procedure must do three things: - * 1) Initialize the pciBusTable[] for all primary PCI buses including - * the per domain PCI access functions (readLong, writeLong, - * addrBusToHost, and addrHostToBus). - * - * 2) Add entries to pciBusTable[] for configured secondary buses. This - * step may be skipped if a platform is using the generic findFirst/ - * findNext functions because these procedures will automatically - * discover and add secondary buses dynamically. - * - * 3) Overide default settings for global PCI access functions if - * required. These include pciFindFirstFP, pciFindNextFP, - * Of course, if you choose not to use one of the generic - * functions, you will need to provide a platform specifc replacement. - * - * Gary Barton - * Concurrent Computer Corporation - * garyb@gate.net - * - */ - /* * Copyright 1998 by Concurrent Computer Corporation * @@ -197,14 +136,6 @@ #include -#if 0 -#include -#include -#include -#include -#include -#endif - #define PCI_MFDEV_SUPPORT 1 /* Include PCI multifunction device support */ #define PCI_BRIDGE_SUPPORT 1 /* Include support for PCI-to-PCI bridges */ From a9050d54249ed9f54c6fe59143b846c9c7548f59 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 25 Feb 2008 18:10:18 -0300 Subject: [PATCH 542/552] Jesus, pciInit() was called 32 times in my machine without need! xf86scanpci() will always call pciInit() before any other function, so there's no need to guarantee it after. --- hw/xfree86/os-support/bus/Pci.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c index 2d3f748e7..8b21fad59 100644 --- a/hw/xfree86/os-support/bus/Pci.c +++ b/hw/xfree86/os-support/bus/Pci.c @@ -154,11 +154,6 @@ int pciMaxBusNum = MAX_PCI_BUSES; static void pciInit(void) { - static int pciInitialized = 0; - - if (!pciInitialized) { - pciInitialized = 1; - /* XXX */ #if defined(DEBUGPCI) if (DEBUGPCI >= xf86Verbose) { @@ -167,7 +162,6 @@ pciInit(void) #endif ARCH_PCI_INIT(); - } } _X_EXPORT ADDRESS @@ -175,8 +169,6 @@ pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) { int bus = PCI_BUS_FROM_TAG(tag); - pciInit(); - if ((bus >= 0) && (bus < pciNumBuses) && pciBusInfo[bus] && pciBusInfo[bus]->funcs->pciAddrBusToHost) return (*pciBusInfo[bus]->funcs->pciAddrBusToHost)(tag, type, addr); From c46f7b62d2bf9f35937cfef98325ed904895396a Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 25 Feb 2008 18:14:08 -0300 Subject: [PATCH 543/552] Fine, we don't need pciInit() anymore. Nuke, nuke, nuke... --- hw/xfree86/os-support/bus/Pci.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/hw/xfree86/os-support/bus/Pci.c b/hw/xfree86/os-support/bus/Pci.c index 8b21fad59..064533c77 100644 --- a/hw/xfree86/os-support/bus/Pci.c +++ b/hw/xfree86/os-support/bus/Pci.c @@ -148,22 +148,6 @@ _X_EXPORT int pciNumBuses = 0; /* Actual number of PCI buses */ int pciMaxBusNum = MAX_PCI_BUSES; -/* - * pciInit - choose correct platform/OS specific PCI init routine - */ -static void -pciInit(void) -{ - /* XXX */ -#if defined(DEBUGPCI) - if (DEBUGPCI >= xf86Verbose) { - xf86Verbose = DEBUGPCI; - } -#endif - - ARCH_PCI_INIT(); -} - _X_EXPORT ADDRESS pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) { @@ -194,7 +178,16 @@ xf86scanpci(void) Bool success = FALSE; success = (pci_system_init() == 0); - pciInit(); + + /* XXX */ +#if defined(DEBUGPCI) + if (DEBUGPCI >= xf86Verbose) { + xf86Verbose = DEBUGPCI; + } +#endif + + /* choose correct platform/OS specific PCI init routine */ + ARCH_PCI_INIT(); return success; } From dcc077c753137f37aa58231f1df3c4adb92b2c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 26 Feb 2008 12:13:06 +0100 Subject: [PATCH 544/552] AIGLX: Switch to server context for calling DamageDamageRegion(). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=14518 . --- GL/glx/glxdri.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 304fed2bd..f51a5310d 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -798,10 +798,14 @@ static void __glXReportDamage(__DRIdrawable *driDraw, DrawablePtr pDraw = drawable->base.pDraw; RegionRec region; + __glXenterServer(GL_FALSE); + REGION_INIT(pDraw->pScreen, ®ion, (BoxPtr) rects, num_rects); REGION_TRANSLATE(pScreen, ®ion, pDraw->x, pDraw->y); DamageDamageRegion(pDraw, ®ion); REGION_UNINIT(pDraw->pScreen, ®ion); + + __glXleaveServer(GL_FALSE); } /* Table of functions that we export to the driver. */ From d12b7b6632fb4cf41d2e28c7792eaa503f25404a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 27 Feb 2008 07:08:00 +1000 Subject: [PATCH 545/552] xf86Crtc: add higher level modesetting entry point. For kernel modesetting work we need a bigger stick to beat the modesetting path --- hw/xfree86/modes/xf86Crtc.c | 3 +++ hw/xfree86/modes/xf86Crtc.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 4ecf4b3d7..266e08195 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -236,6 +236,9 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int saved_x, saved_y; Rotation saved_rotation; + if (crtc->funcs->set_mode_major) + return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y); + crtc->enabled = xf86CrtcInUse (crtc); if (!crtc->enabled) diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index 62d85bbc9..cc045b229 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -206,6 +206,13 @@ typedef struct _xf86CrtcFuncs { */ void (*destroy) (xf86CrtcPtr crtc); + + /** + * Less fine-grained mode setting entry point for kernel modesetting + */ + Bool + (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode, + Rotation rotation, int x, int y); } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr; struct _xf86Crtc { From c8e979b3b800e4c58be454daa0213285d4ee6510 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 26 Feb 2008 21:34:22 -0500 Subject: [PATCH 546/552] security: Register resource names in the server-side name registry. --- Xext/security.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Xext/security.c b/Xext/security.c index 27ef38205..cd67120d9 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1105,6 +1105,8 @@ SecurityExtensionInit(INITARGS) return; RTEventClient |= RC_NEVERRETAIN; + RegisterResourceName(SecurityAuthorizationResType, "SecurityAuthorization"); + RegisterResourceName(RTEventClient, "SecurityEventClient"); /* Allocate the private storage */ if (!dixRequestPrivate(stateKey, sizeof(SecurityStateRec))) From 4632ea22580c31d44b0786321668d9e78f02900e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 26 Feb 2008 22:00:52 -0500 Subject: [PATCH 547/552] xselinux: Rip out the selection code in advance of polyinstantiation support. This resolves an issue where BadWindow errors were being thrown. --- Xext/xselinux.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 5aa2ad3fa..60ec8d494 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -951,42 +951,11 @@ static void SELinuxSelectionState(CallbackListPtr *pcbl, pointer unused, pointer calldata) { SelectionInfoRec *rec = calldata; - SELinuxSubjectRec *subj; - SELinuxObjectRec *obj; switch (rec->kind) { case SelectionSetOwner: - /* save off the "real" owner of the selection */ - rec->selection->alt_client = rec->selection->client; - rec->selection->alt_window = rec->selection->window; - - /* figure out the new label for the content */ - subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); - obj = dixLookupPrivate(&rec->selection->devPrivates, objectKey); - sidput(obj->sid); - - if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SELECTION, - &obj->sid) < 0) { - ErrorF("SELinux: a compute_create call failed!\n"); - obj->sid = unlabeled_sid; - } - break; - case SelectionGetOwner: - /* restore the real owner */ - rec->selection->window = rec->selection->alt_window; - break; - case SelectionConvertSelection: - /* redirect the convert request if necessary */ - if (securityManager && securityManager != rec->client) { - rec->selection->client = securityManager; - rec->selection->window = securityWindow; - } else { - rec->selection->client = rec->selection->alt_client; - rec->selection->window = rec->selection->alt_window; - } - break; default: break; } From 3f0681fb0b2d0744c2ef892883ae5359b43a4a9a Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 26 Feb 2008 23:14:29 -0500 Subject: [PATCH 548/552] xselinux: Stub out selection protocol requests. --- Xext/xselinux.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ Xext/xselinux.h | 3 +++ 2 files changed, 55 insertions(+) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 60ec8d494..d3fe86b3a 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -1282,6 +1282,24 @@ ProcSELinuxGetWindowContext(ClientPtr client) return client->noClientException; } +static int +ProcSELinuxSetSelectionCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetSelectionCreateContext(ClientPtr client) +{ + return Success; +} + +static int +ProcSELinuxGetSelectionContext(ClientPtr client) +{ + return Success; +} + static int ProcSELinuxDispatch(ClientPtr client) { @@ -1313,6 +1331,12 @@ ProcSELinuxDispatch(ClientPtr client) return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: return ProcSELinuxGetWindowContext(client); + case X_SELinuxSetSelectionCreateContext: + return ProcSELinuxSetSelectionCreateContext(client); + case X_SELinuxGetSelectionCreateContext: + return ProcSELinuxGetSelectionCreateContext(client); + case X_SELinuxGetSelectionContext: + return ProcSELinuxGetSelectionContext(client); default: return BadRequest; } @@ -1420,6 +1444,28 @@ SProcSELinuxGetWindowContext(ClientPtr client) return ProcSELinuxGetWindowContext(client); } +static int +SProcSELinuxSetSelectionCreateContext(ClientPtr client) +{ + REQUEST(SELinuxSetCreateContextReq); + int n; + + REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); + swaps(&stuff->context_len, n); + return ProcSELinuxSetSelectionCreateContext(client); +} + +static int +SProcSELinuxGetSelectionContext(ClientPtr client) +{ + REQUEST(SELinuxGetContextReq); + int n; + + REQUEST_SIZE_MATCH(SELinuxGetContextReq); + swapl(&stuff->id, n); + return ProcSELinuxGetSelectionContext(client); +} + static int SProcSELinuxDispatch(ClientPtr client) { @@ -1455,6 +1501,12 @@ SProcSELinuxDispatch(ClientPtr client) return ProcSELinuxGetWindowCreateContext(client); case X_SELinuxGetWindowContext: return SProcSELinuxGetWindowContext(client); + case X_SELinuxSetSelectionCreateContext: + return SProcSELinuxSetSelectionCreateContext(client); + case X_SELinuxGetSelectionCreateContext: + return ProcSELinuxGetSelectionCreateContext(client); + case X_SELinuxGetSelectionContext: + return SProcSELinuxGetSelectionContext(client); default: return BadRequest; } diff --git a/Xext/xselinux.h b/Xext/xselinux.h index 7eeea5046..480276154 100644 --- a/Xext/xselinux.h +++ b/Xext/xselinux.h @@ -43,6 +43,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define X_SELinuxSetWindowCreateContext 10 #define X_SELinuxGetWindowCreateContext 11 #define X_SELinuxGetWindowContext 12 +#define X_SELinuxSetSelectionCreateContext 13 +#define X_SELinuxGetSelectionCreateContext 14 +#define X_SELinuxGetSelectionContext 15 typedef struct { CARD8 reqType; From 2257e20900460d85254734b595238e7ad5ee55c8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 27 Feb 2008 17:15:28 +1030 Subject: [PATCH 549/552] dix: set dev->key to NULL after freeing it in CloseDevice. (Bug #12830) Otherwise XkbRemoveResourceClient may try to dereference it lateron. X.Org Bug 12830 --- dix/devices.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dix/devices.c b/dix/devices.c index bdcca5aba..4b20655c6 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -529,6 +529,7 @@ CloseDevice(DeviceIntPtr dev) xfree(dev->key->curKeySyms.map); xfree(dev->key->modifierKeyMap); xfree(dev->key); + dev->key = NULL; } if (dev->valuator) { From d74b0327e8355546e6b41e8ce684f461d65fa9dc Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Wed, 27 Feb 2008 09:48:10 +0100 Subject: [PATCH 550/552] [Xephyr/GL] unbreak the build Don't touch Xephyr DRI stuff when not compiling in a DRI environment. --- hw/kdrive/ephyr/ephyr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 738704e40..e95001dcd 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -841,6 +841,7 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs = ephyrWarpCursor }; +#ifdef XEPHYR_DRI /** * find if the remote window denoted by a_remote * is paired with an internal Window within the Xephyr server. @@ -872,6 +873,7 @@ ephyrExposePairedWindow (int a_remote) screen->WindowExposures (pair->local, ®, NullRegion); REGION_UNINIT (screen, ®); } +#endif /*XEPHYR_DRI*/ void ephyrPoll(void) @@ -948,6 +950,7 @@ ephyrPoll(void) KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE); break; +#ifdef XEPHYR_DRI case EPHYR_EV_EXPOSE: /* * We only receive expose events when the expose event have @@ -957,6 +960,7 @@ ephyrPoll(void) */ ephyrExposePairedWindow (ev.data.expose.window); break; +#endif /*XEPHYR_DRI*/ default: break; From 43e46a654fa7cf69f0c8bcb7f583008d96a98686 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 27 Feb 2008 16:58:21 +0000 Subject: [PATCH 551/552] Fix context sharing between direct/indirect contexts --- GL/glx/glxdri.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index f51a5310d..613ac05f1 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -614,6 +614,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, else driShare = NULL; + if (baseShareContext && baseShareContext->isDirect) + return NULL; + context = xalloc(sizeof *context); if (context == NULL) return NULL; @@ -649,6 +652,11 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, hwContext, &context->driContext); + if (context->driContext.private == NULL) { + xfree(context); + return NULL; + } + return &context->base; } From 41aea6194bd29ab34cc166b3fd90eee64299ddf8 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 27 Feb 2008 17:06:27 +0000 Subject: [PATCH 552/552] More checking for failed contexts/drawables --- GL/glx/glxdri.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 613ac05f1..f9b28e427 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -653,6 +653,9 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, &context->driContext); if (context->driContext.private == NULL) { + __glXenterServer(GL_FALSE); + retval = DRIDestroyContext(baseScreen->pScreen, context->hwContextID); + __glXleaveServer(GL_FALSE); xfree(context); return NULL; } @@ -703,6 +706,14 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen, &private->driDrawable, hwDrawable, 0, NULL); + if (private->driDrawable.private == NULL) { + __glXenterServer(GL_FALSE); + DRIDestroyDrawable(screen->pScreen, serverClient, pDraw); + __glXleaveServer(GL_FALSE); + xfree(private); + return NULL; + } + return &private->base; }