From 150eabc4c8a08c81c48493583f922a1240b7e91c Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 8 Sep 2006 15:11:04 -0400 Subject: [PATCH 001/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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/454] 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 512bac25ec0e980968b93a2ebe88bd89bf99b697 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 6 Nov 2007 14:52:03 +0000 Subject: [PATCH 198/454] DIX: XKB: Set xkbInfo to NULL as well as freeing it (bug #10639) XkbRemoveResourceClient wants to access xkbInfo if it exists, so make sure we NULL it after freeing it. It doesn't make much sense to move the RemoveResourceClient call first, as there's not much point in notifying clients while we're shutting the server down anyway. --- dix/devices.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dix/devices.c b/dix/devices.c index 9798b97a6..3855c2b8b 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -528,6 +528,7 @@ CloseDevice(DeviceIntPtr dev) if (dev->key->xkbInfo) XkbFreeInfo(dev->key->xkbInfo); #endif + dev->key->xkbInfo = NULL; xfree(dev->key->curKeySyms.map); xfree(dev->key->modifierKeyMap); xfree(dev->key); From fda832772b3e630037bf1b822534996154a50861 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 6 Nov 2007 15:05:06 +0000 Subject: [PATCH 199/454] .gitignore: Ignore build directories Ignore directories people might use for building. --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 27132c0f9..6abca3b1a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ Makefile.in *.a *.o *~ +.*.swp +obj* +build* aclocal.m4 autom4te.cache compile @@ -298,4 +301,3 @@ mfb/mfbteblack.c mfb/mfbtewhite.c mfb/mfbtileC.c mfb/mfbtileG.c -.*.swp From 66fe554a59bb7de37354b618945cd5f30d78250d Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 6 Nov 2007 18:57:09 +0000 Subject: [PATCH 200/454] COPYING: Collapse 'canonical license' into one statement For a few of us, the license statement is identical, and the only variant is the copyright. For these, aggregate the copyrights, and only list the license once. Put this at the top, and note that this is more or less our agreed canonical license. --- COPYING | 200 ++++++++++++-------------------------------------------- 1 file changed, 42 insertions(+), 158 deletions(-) diff --git a/COPYING b/COPYING index 097ef984f..2b464e0d4 100644 --- a/COPYING +++ b/COPYING @@ -1,3 +1,45 @@ +The following is the 'standard copyright' agreed upon by most contributors, +and is currently the canonical license, though a modification is currently +under discussion. Copyright holders of new code should use this license +statement where possible, and append their name to this list. Please sort +by surname for people, and by the full name for other entities (e.g. +Juliusz Chroboczek sorts before Intel Corporation sorts before Daniel +Stone). + +Copyright © 2000-2001 Juliusz Chroboczek +Copyright © 2006-2007 Intel Corporation +Copyright © 2006 Nokia Corporation +Copyright © 1999 Keith Packard +Copyright © 2005-2007 Daniel Stone +Copyright © 2006 Luc Verhaegen + +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 (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 NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS 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. + + + + +The following licenses are 'legacy': usually MIT/X11 licenses with the name +of the copyright holder(s) in the license statement, but also some BSD-like +licenses. + + Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -1058,27 +1100,6 @@ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Copyright © 2003-2005 Keith Packard, Daniel Stone - -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 names of Keith Packard and Daniel Stone not be -used in advertising or publicity pertaining to distribution of the software -without specific, written prior permission. Keith Packard and Daniel Stone -make no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. - -KEITH PACKARD AND DANIEL STONE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, -IN NO EVENT SHALL KEITH PACKARD OR DANIEL STONE 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. - - Copyright © 1999 Keith Packard Copyright © 2000 Compaq Computer Corporation Copyright © 2002 MontaVista Software Inc. @@ -2357,54 +2378,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Copyright (c) 1999 by Keith Packard -Copyright © 2006 Intel Corporation -Copyright 2006 Luc Verhaegen. - -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 (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 NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS 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. - - -Copyright (c) 2000-2001 by Juliusz Chroboczek -Copyright (c) 1999 by Keith Packard - -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 AUTHORS OR COPYRIGHT HOLDERS -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. - - Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany Copyright 1992 by David Dawes Copyright 1992 by Jim Tsillas @@ -2622,92 +2595,3 @@ 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. - - -Copyright © 2006 Daniel Stone - -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 (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 NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS 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. - - -Copyright © 2006-2007 Daniel Stone - -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 (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 NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS 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. - - -Copyright © 2007 Daniel Stone - -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 (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 NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS 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. - - -Copyright © 1999 Keith Packard -Copyright © 2006 Nokia Corporation - -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 make no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -THE AUTHORS DISCLAIM 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. - From e717409bae355df9a617a226f12fbb8c54ae77e5 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 6 Nov 2007 21:36:13 +0000 Subject: [PATCH 201/454] DIX/getevents: Document GetMaximumEventsNum() a little better Note that the number returned by GMEN can _never_ change, and be a little more explicit about the figure for repeats. --- dix/getevents.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dix/getevents.c b/dix/getevents.c index ffcdf174e..3754c72f4 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -207,11 +207,13 @@ updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, * * Should be used in DIX as: * xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + * + * This MUST be absolutely constant, from init until exit. */ _X_EXPORT int GetMaximumEventsNum(void) { /* Two base events -- core and device, plus valuator events. Multiply - * by two if we're doing key repeats. */ + * by two if we're doing non-XKB key repeats. */ int ret = 2 + MAX_VALUATOR_EVENTS; #ifdef XKB From 950f9995d11aff2c51139b34fb27eba594f2bd20 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Wed, 7 Nov 2007 18:43:16 +0100 Subject: [PATCH 202/454] Xnest: fix lib dependancy to make libtool happy This fixes an undefined symbol error happening when compiling the server with the --disable-xv configure switch. Basically, xnest was linking against @XSERVER_LIBS@ and @XNEST_LIBS@ and the order of the libraries given to the linker at the end of the process was bogus. * configure.ac: make XNEST_LIBS contain the $XSERVER_LIBS re-ordered in such a way that the linker finds the symbols of all the libs contained in $XNEST_LIBS. * hw/xnest/Makefile.am: don't link against @XSERVER_LIBS@ anymore because XNEST_LIBS contains the right thing. --- configure.ac | 2 +- hw/xnest/Makefile.am | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index a09a5c2bc..df70ae931 100644 --- a/configure.ac +++ b/configure.ac @@ -1219,7 +1219,7 @@ AC_MSG_RESULT([$XNEST]) AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) if test "x$XNEST" = xyes; then - XNEST_LIBS="$CONFIG_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB" + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $DIX_LIB $OS_LIB $CONFIG_LIB" XNEST_SYS_LIBS="$XNESTMODULES_LIBS" AC_SUBST([XNEST_LIBS]) AC_SUBST([XNEST_SYS_LIBS]) diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am index 92f840c97..8601b2988 100644 --- a/hw/xnest/Makefile.am +++ b/hw/xnest/Makefile.am @@ -50,8 +50,7 @@ libfbcmap_a_CFLAGS = $(AM_CFLAGS) XNEST_LIBS = \ @XNEST_LIBS@ \ - libfbcmap.a \ - $(XSERVER_LIBS) + libfbcmap.a Xnest_SOURCES = $(SRCS) From 26e1fc7b42de850d69fba89703ffddd36480b997 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Wed, 7 Nov 2007 18:48:23 +0100 Subject: [PATCH 203/454] Xephyr: don't use Xv or GL when those are disabled. --- configure.ac | 3 ++ hw/kdrive/ephyr/Makefile.am | 62 ++++++++++++++++++++++++------------- hw/kdrive/ephyr/ephyr.c | 2 -- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index df70ae931..1b4580127 100644 --- a/configure.ac +++ b/configure.ac @@ -1855,10 +1855,13 @@ if test "$KDRIVE" = yes; then XEPHYR_DRI=no if test x$XEPHYR = xyes -a x$DRI = xyes; then XEPHYR_DRI=yes + XEPHYR_DRI_LIBS=-lGL + AC_SUBST(XEPHYR_DRI_LIBS) fi if test x$XEPHYR_DRI = xyes ; then AC_DEFINE(XEPHYR_DRI,1,[enable DRI extension in xephyr]) fi + AM_CONDITIONAL(XEPHYR_HAS_DRI, [test x$XEPHYR_DRI = xyes]) # Xephyr needs nanosleep() which is in librt on Solaris AC_CHECK_FUNC([nanosleep], [], diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am index 604e22eaa..d025c201c 100644 --- a/hw/kdrive/ephyr/Makefile.am +++ b/hw/kdrive/ephyr/Makefile.am @@ -3,47 +3,65 @@ INCLUDES = \ @KDRIVE_CFLAGS@ \ -I$(srcdir)/../../../exa -noinst_LIBRARIES = libxephyr-hostx.a libxephyr-hostxv.a libxephyr.a +if XV + LIBXEPHYR_HOSTXV=libxephyr-hostxv.a +else + LIBXEPHYR_HOSTXV= +endif + +if XEPHYR_HAS_DRI + LIBXEPHYR_HOSTDRI=libxephyr-hostdri.a +else + LIBXEPHYR_HOSTDRI= +endif + +noinst_LIBRARIES = libxephyr-hostx.a $(LIBXEPHYR_HOSTXV) $(LIBXEPHYR_HOSTDRI) libxephyr.a bin_PROGRAMS = Xephyr - libxephyr_hostx_a_SOURCES = \ hostx.c \ hostx.h -libxephyr_hostx_a_INCLUDES = @XEPHYR_INCS@ +libxephyr_hostxv_a_INCLUDES = @XEPHYR_INCS@ +if XV libxephyr_hostxv_a_SOURCES= \ ephyrhostvideo.c \ ephyrhostvideo.h +endif + +if XEPHYR_HAS_DRI + +libxephyr_hostdri_a_SOURCES= \ +ephyrdriext.c \ +ephyrdri.c \ +ephyrdri.h \ +XF86dri.c \ +ephyrglxext.c \ +ephyrglxext.h \ +ephyrhostglx.c \ +ephyrhostglx.h + +libxephyr_hostdri_a_CFLAGS= \ +-I$(top_srcdir) \ +@LIBDRM_CFLAGS@ \ +@DRIPROTO_CFLAGS@ + +endif libxephyr_a_SOURCES = \ ephyr.c \ ephyr_draw.c \ ephyrvideo.c \ - XF86dri.c \ - ephyrdriext.c \ - ephyrdri.c \ - ephyrdri.h \ - ephyrglxext.c \ - ephyrglxext.h \ - ephyrhostglx.c \ - ephyrhostglx.h \ - ephyrhostproxy.c \ - ephyrhostproxy.h \ - ephyrhostproxy.c \ - ephyrproxyext.c \ - ephyrproxyext.h \ os.c \ hostx.h \ ephyr.h \ ephyrlog.h libxephyr_a_CFLAGS = \ -@LIBDRM_CFLAGS@ \ -I$(top_srcdir) \ -@DRIPROTO_CFLAGS@ +@LIBDRM_CFLAGS@ Xephyr_SOURCES = \ ephyrinit.c @@ -51,17 +69,19 @@ Xephyr_SOURCES = \ Xephyr_LDADD = \ libxephyr.a \ libxephyr-hostx.a \ - libxephyr-hostxv.a \ + $(LIBXEPHYR_HOSTXV) \ + $(LIBXEPHYR_HOSTDRI) \ ../../../exa/libexa.la \ @KDRIVE_LIBS@ \ @XEPHYR_LIBS@ \ @LIBDRM_LIBS@ \ - -lGL + @XEPHYR_DRI_LIBS@ Xephyr_DEPENDENCIES = \ libxephyr.a \ libxephyr-hostx.a \ - libxephyr-hostxv.a \ + $(LIBXEPHYR_HOSTXV) \ + $(LIBXEPHYR_HOSTDRI) \ @KDRIVE_LOCAL_LIBS@ relink: diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 52f5dcf60..282b52868 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -36,7 +36,6 @@ #include "ephyrdri.h" #include "ephyrdriext.h" #include "ephyrglxext.h" -#include "ephyrproxyext.h" #endif /*XEPHYR_DRI*/ extern int KdTsPhyScreen; @@ -640,7 +639,6 @@ ephyrInitScreen (ScreenPtr pScreen) if (!ephyrNoDRI) { ephyrDRIExtensionInit (pScreen) ; ephyrHijackGLXExtension () ; - ephyrProxyExtensionInit ("ATIFGLRXDRI") ; } #endif From 9bee1c6912817f65bbb8cf4078f0ad016d9d51cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Wed, 7 Nov 2007 18:56:45 +0100 Subject: [PATCH 204/454] EXA: Disable problematic optimization of dest pixmap migration by default. Also add some code comments about these optimizations. --- exa/exa_migration.c | 33 +++++++++++++++++++++++++-------- exa/exa_priv.h | 1 + hw/xfree86/exa/exa.man.pre | 6 ++++++ hw/xfree86/exa/examodule.c | 8 ++++++++ 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/exa/exa_migration.c b/exa/exa_migration.c index d69526b7f..d3646b0b6 100644 --- a/exa/exa_migration.c +++ b/exa/exa_migration.c @@ -153,22 +153,39 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst); if (migrate->as_dst) { - RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); + ExaScreenPriv (pPixmap->drawable.pScreen); - if (REGION_NIL(pending_damage)) { - static Bool firsttime = TRUE; + /* XXX: The pending damage region will be marked as damaged after the + * operation, so it should serve as an upper bound for the region that + * needs to be synchronized for the operation. Unfortunately, this + * causes corruption in some cases, e.g. when starting compiz. See + * https://bugs.freedesktop.org/show_bug.cgi?id=12916 . + */ + if (pExaScr->optimize_migration) { + RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); - if (firsttime) { - ErrorF("%s: Pending damage region empty!\n", __func__); - firsttime = FALSE; + if (REGION_NIL(pending_damage)) { + static Bool firsttime = TRUE; + + if (firsttime) { + ErrorF("%s: Pending damage region empty!\n", __func__); + firsttime = FALSE; + } } + + REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage); } - REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage); - + /* The caller may provide a region to be subtracted from the calculated + * dirty region. This is to avoid migration of bits that don't + * contribute to the result of the operation. + */ if (migrate->pReg) REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg); } else { + /* The caller may restrict the region to be migrated for source pixmaps + * to what's relevant for the operation. + */ if (migrate->pReg) REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg); } diff --git a/exa/exa_priv.h b/exa/exa_priv.h index a69536372..7656a0278 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -119,6 +119,7 @@ typedef struct { enum ExaMigrationHeuristic migration; Bool checkDirtyCorrectness; unsigned disableFbCount; + Bool optimize_migration; } ExaScreenPrivRec, *ExaScreenPrivPtr; /* diff --git a/hw/xfree86/exa/exa.man.pre b/hw/xfree86/exa/exa.man.pre index 31e1cfe34..14859bc8f 100644 --- a/hw/xfree86/exa/exa.man.pre +++ b/hw/xfree86/exa/exa.man.pre @@ -31,6 +31,12 @@ Disables acceleration of downloading of pixmap data from the framebuffer. Not usable with drivers which rely on DownloadFromScreen succeeding. Default: No. .TP +.BI "Option \*qEXAOptimizeMigration\*q \*q" boolean \*q +Enables an additional optimization for migration of destination pixmaps. This +may improve performance in some cases (e.g. when switching virtual desktops with +no compositing manager) but causes corruption in others (e.g. when starting +compiz). Default: No. +.TP .BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q Chooses an alternate pixmap migration heuristic, for debugging purposes. The default is intended to be the best performing one for general use, though others diff --git a/hw/xfree86/exa/examodule.c b/hw/xfree86/exa/examodule.c index 4dce58fd8..ceead8219 100644 --- a/hw/xfree86/exa/examodule.c +++ b/hw/xfree86/exa/examodule.c @@ -50,6 +50,7 @@ typedef enum { EXAOPT_NO_COMPOSITE, EXAOPT_NO_UTS, EXAOPT_NO_DFS, + EXAOPT_OPTIMIZE_MIGRATION } EXAOpts; static const OptionInfoRec EXAOptions[] = { @@ -61,6 +62,8 @@ static const OptionInfoRec EXAOptions[] = { OPTV_BOOLEAN, {0}, FALSE }, { EXAOPT_NO_DFS, "EXANoDownloadFromScreen", OPTV_BOOLEAN, {0}, FALSE }, + { EXAOPT_OPTIMIZE_MIGRATION, "EXAOptimizeMigration", + OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -144,6 +147,11 @@ exaDDXDriverInit(ScreenPtr pScreen) heuristicName); } } + + pExaScr->optimize_migration = + xf86ReturnOptValBool(pScreenPriv->options, + EXAOPT_OPTIMIZE_MIGRATION, + FALSE); } if (xf86IsOptionSet(pScreenPriv->options, EXAOPT_NO_COMPOSITE)) { From 0e9ef65fa583bf2393dd0fda82df6f092387b425 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 7 Nov 2007 16:33:10 -0800 Subject: [PATCH 205/454] Don't frob timers unless SmartSchedule is running --- os/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os/utils.c b/os/utils.c index 322814669..ae96a4176 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1520,6 +1520,8 @@ SmartScheduleStopTimer (void) #ifdef SMART_SCHEDULE_POSSIBLE struct itimerval timer; + if (SmartScheduleDisable) + return; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = 0; timer.it_value.tv_sec = 0; @@ -1534,6 +1536,8 @@ SmartScheduleStartTimer (void) #ifdef SMART_SCHEDULE_POSSIBLE struct itimerval timer; + if (SmartScheduleDisable) + return; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = SmartScheduleInterval * 1000; timer.it_value.tv_sec = 0; From 476a9d85f819f454a6901ccb7eb028d1c563c341 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Thu, 8 Nov 2007 09:11:05 +0100 Subject: [PATCH 206/454] Xephyr: do not AM_CONDITIONAL inside a shell if branch --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1b4580127..cd78dc42e 100644 --- a/configure.ac +++ b/configure.ac @@ -1861,7 +1861,6 @@ if test "$KDRIVE" = yes; then if test x$XEPHYR_DRI = xyes ; then AC_DEFINE(XEPHYR_DRI,1,[enable DRI extension in xephyr]) fi - AM_CONDITIONAL(XEPHYR_HAS_DRI, [test x$XEPHYR_DRI = xyes]) # Xephyr needs nanosleep() which is in librt on Solaris AC_CHECK_FUNC([nanosleep], [], @@ -1919,6 +1918,7 @@ AM_CONDITIONAL(KDRIVEFBDEV, [test "x$XFBDEV" = xyes]) AM_CONDITIONAL(XSDLSERVER, [test x"$XSDL" = xyes]) AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes]) +AM_CONDITIONAL(XEPHYR_HAS_DRI, [test x$XEPHYR_DRI = xyes]) AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers) From 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Thu, 8 Nov 2007 16:32:42 -0500 Subject: [PATCH 207/454] 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 208/454] 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 209/454] 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 169f83e366f678ac5441ad21beb84c9b8c65d28e Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sun, 4 Nov 2007 19:14:10 -0800 Subject: [PATCH 210/454] Disable deferred updates in xp_init to fix performance problems -- thanks to Eric Gouriou for pointing out the issue --- hw/darwin/quartz/xpr/xprScreen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 709e6e8cc..886ef343f 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -228,7 +228,7 @@ xprDisplayInit(void) else darwinScreensFound = 1; - if (xp_init(XP_IN_BACKGROUND) != Success) + if (xp_init(XP_IN_BACKGROUND | XP_NO_DEFERRED_UPDATES) != Success) FatalError("Could not initialize the Xplugin library."); xp_select_events(XP_EVENT_DISPLAY_CHANGED From 154fb6417e5d0bae5191984beac5ce045ce754bb Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sat, 3 Nov 2007 05:34:19 -0700 Subject: [PATCH 211/454] Initial support for Spaces -- if you use Expose to drag an X11 window to another Space, it will work correctly (as opposed to just leaving a ghost window). We accomplish this by listening for the notification from Xplugin that our window has been moved, and then we ask X11 to move the window to the new location. --- hw/darwin/quartz/xpr/xprFrame.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index c395f0743..aa38845f6 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -67,6 +67,7 @@ static inline xp_error xprConfigureWindow(xp_window_id id, unsigned int mask, const xp_window_changes *values) { + // ErrorF("xprConfigureWindow()\n"); if (!no_configure_window) return xp_configure_window(id, mask, values); else @@ -184,7 +185,7 @@ xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY) wc.x = newX; wc.y = newY; - + // ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY); xprConfigureWindow((xp_window_id) wid, XP_ORIGIN, &wc); } From 67e96be13cdb45be31db121ce216295cd9496d20 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Mon, 5 Nov 2007 20:01:34 -0800 Subject: [PATCH 212/454] Fixed logic error that prevent JIS (Japanese) keyboard layouts from being detected. --- hw/darwin/quartz/quartzKeyboard.c | 51 +++++++++++++------------------ 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index b580a8e84..40b5e92f7 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -222,36 +222,27 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) KeySym *k; TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource(); - if (currentKeyLayoutRef) - { - CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData); - if (currentKeyLayoutDataRef) - chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef); - } - - if(chr_data == NULL) { - KLGetCurrentKeyboardLayout (&key_layout); - KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data); - - if (chr_data != NULL) - { - is_uchr = 1; - keyboard_type = LMGetKbdType (); - } - else - { - KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data); - - if (chr_data == NULL) - { - ErrorF ( "Couldn't get uchr or kchr resource\n"); - return FALSE; - } - - is_uchr = 0; - num_keycodes = 128; - } - } + keyboard_type = LMGetKbdType (); + if (currentKeyLayoutRef) { + CFDataRef currentKeyLayoutDataRef = (CFDataRef )TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData); + if (currentKeyLayoutDataRef) chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef); + } + + if (chr_data == NULL) { + KLGetCurrentKeyboardLayout (&key_layout); + KLGetKeyboardLayoutProperty (key_layout, kKLuchrData, &chr_data); + } + + if (chr_data == NULL) { + KLGetKeyboardLayoutProperty (key_layout, kKLKCHRData, &chr_data); + is_uchr = 0; + num_keycodes = 128; + } + + if (chr_data == NULL) { + ErrorF ( "Couldn't get uchr or kchr resource\n"); + return FALSE; + } /* Scan the keycode range for the Unicode character that each key produces in the four shift states. Then convert that to From a6ac9002956767fefa37aac95513e21ac5246d15 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Mon, 5 Nov 2007 20:25:10 -0800 Subject: [PATCH 213/454] formatting cleanup --- hw/darwin/quartz/quartzKeyboard.c | 103 +++++++++--------------------- 1 file changed, 31 insertions(+), 72 deletions(-) diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index 40b5e92f7..b40d81e21 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -1,8 +1,7 @@ /* quartzKeyboard.c - Code to build a keymap using the Carbon Keyboard Layout API, - which is supported on Mac OS X 10.2 and newer. + Code to build a keymap using the Carbon Keyboard Layout API. Copyright (c) 2003, 2007 Apple Inc. @@ -150,15 +149,11 @@ unsigned int DarwinModeSystemKeymapSeed (void) { static unsigned int seed; - static KeyboardLayoutRef last_key_layout; KeyboardLayoutRef key_layout; KLGetCurrentKeyboardLayout (&key_layout); - - if (key_layout != last_key_layout) - seed++; - + if (key_layout != last_key_layout) seed++; last_key_layout = key_layout; return seed; @@ -190,10 +185,8 @@ macroman2ucs (unsigned char c) 0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7, }; - if (c < 128) - return c; - else - return table[c - 128]; + if (c < 128) return c; + else return table[c - 128]; } static KeySym @@ -202,10 +195,7 @@ make_dead_key (KeySym in) int i; for (i = 0; i < sizeof (dead_keys) / sizeof (dead_keys[0]); i++) - { - if (dead_keys[i].normal == in) - return dead_keys[i].dead; - } + if (dead_keys[i].normal == in) return dead_keys[i].dead; return in; } @@ -249,53 +239,39 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) an X11 keysym (which may just the bit that says "this is Unicode" if it can't find the real symbol.) */ - for (i = 0; i < num_keycodes; i++) - { + for (i = 0; i < num_keycodes; i++) { static const int mods[4] = {0, MOD_SHIFT, MOD_OPTION, MOD_OPTION | MOD_SHIFT}; k = info->keyMap + i * GLYPHS_PER_KEY; - for (j = 0; j < 4; j++) - { - if (is_uchr) - { + for (j = 0; j < 4; j++) { + if (is_uchr) { UniChar s[8]; UniCharCount len; - UInt32 dead_key_state, extra_dead; + UInt32 dead_key_state = 0, extra_dead = 0; - dead_key_state = 0; err = UCKeyTranslate (chr_data, i, kUCKeyActionDown, mods[j] >> 8, keyboard_type, 0, &dead_key_state, 8, &len, s); - if (err != noErr) - continue; + if (err != noErr) continue; - if (len == 0 && dead_key_state != 0) - { + if (len == 0 && dead_key_state != 0) { /* Found a dead key. Work out which one it is, but remembering that it's dead. */ - - extra_dead = 0; err = UCKeyTranslate (chr_data, i, kUCKeyActionDown, mods[j] >> 8, keyboard_type, kUCKeyTranslateNoDeadKeysMask, &extra_dead, 8, &len, s); - if (err != noErr) - continue; + if (err != noErr) continue; } - if (len > 0 && s[0] != 0x0010) - { + if (len > 0 && s[0] != 0x0010) { k[j] = ucs2keysym (s[0]); - - if (dead_key_state != 0) - k[j] = make_dead_key (k[j]); + if (dead_key_state != 0) k[j] = make_dead_key (k[j]); } - } - else - { - UInt32 c, state = 0; + } else { // kchr + UInt32 c, state = 0, state2 = 0; UInt16 code; code = i | mods[j]; @@ -307,67 +283,50 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) us the actual dead character. */ if (state != 0) - { - UInt32 state2 = 0; c = KeyTranslate (chr_data, code | 128, &state2); - } /* Characters seem to be in MacRoman encoding. */ - if (c != 0 && c != 0x0010) - { + if (c != 0 && c != 0x0010) { k[j] = ucs2keysym (macroman2ucs (c & 255)); - if (state != 0) - k[j] = make_dead_key (k[j]); + if (state != 0) k[j] = make_dead_key (k[j]); } } } - - if (k[3] == k[2]) - k[3] = NoSymbol; - if (k[2] == k[1]) - k[2] = NoSymbol; - if (k[1] == k[0]) - k[1] = NoSymbol; - if (k[0] == k[2] && k[1] == k[3]) - k[2] = k[3] = NoSymbol; + + if (k[3] == k[2]) k[3] = NoSymbol; + if (k[2] == k[1]) k[2] = NoSymbol; + if (k[1] == k[0]) k[1] = NoSymbol; + if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol; } /* Fix up some things that are normally missing.. */ - if (HACK_MISSING) - { - for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++) - { + if (HACK_MISSING) { + for (i = 0; i < sizeof (known_keys) / sizeof (known_keys[0]); i++) { k = info->keyMap + known_keys[i].keycode * GLYPHS_PER_KEY; - if (k[0] == NoSymbol && k[1] == NoSymbol + if (k[0] == NoSymbol && k[1] == NoSymbol && k[2] == NoSymbol && k[3] == NoSymbol) - { - k[0] = known_keys[i].keysym; - } + k[0] = known_keys[i].keysym; } } /* And some more things. We find the right symbols for the numeric keypad, but not the KP_ keysyms. So try to convert known keycodes. */ - if (HACK_KEYPAD) - { + if (HACK_KEYPAD) { for (i = 0; i < sizeof (known_numeric_keys) - / sizeof (known_numeric_keys[0]); i++) - { + / sizeof (known_numeric_keys[0]); i++) { k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY; if (k[0] == known_numeric_keys[i].normal) - { k[0] = known_numeric_keys[i].keypad; - } } } - if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef); - + if(currentKeyLayoutRef) CFRelease(currentKeyLayoutRef); + return TRUE; } From d68bd5510437c1fd3850e020f7cd90901fae8e1b Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 8 Nov 2007 20:08:49 -0800 Subject: [PATCH 214/454] fixing GLX in Xquartz --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cd78dc42e..1df8874db 100644 --- a/configure.ac +++ b/configure.ac @@ -1746,7 +1746,8 @@ return 0;} # LDFLAGS=$save_LDFLAGS # ]) xorg_cv_AGL_framework=no - DARWIN_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB" + 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 $DARWIN_GLX_LIBS $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]) From ce7cfbe261b7fd4fcd09d1a4a61344d1555a71f2 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 8 Nov 2007 20:10:51 -0800 Subject: [PATCH 215/454] Fixed check to refer to DarwinApp, not all Darwin targets --- mi/miinitext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mi/miinitext.c b/mi/miinitext.c index b40e8bde3..6fa180b2f 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -672,7 +672,7 @@ InitVisualWrap() { miResetInitVisuals(); #ifdef GLXEXT -#ifdef __DARWIN__ +#ifdef INXDARWINAPP DarwinGlxWrapInitVisuals(&miInitVisualsProc); #endif #endif From 50dac9b2cb3b40810fb79253adc0265a838a497b Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 7 Nov 2007 01:35:48 -0800 Subject: [PATCH 216/454] Fixed Spaces issue, correctly -- dragging an X window from one Space to another in Expose mode now works. --- hw/darwin/darwin.h | 3 +- hw/darwin/quartz/quartz.c | 87 ++++++++++++-------- hw/darwin/quartz/quartz.h | 1 + miext/rootless/rootless.h | 2 + miext/rootless/rootlessWindow.c | 138 +++++++++++++++++++++++++++++++- 5 files changed, 191 insertions(+), 40 deletions(-) diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index 70ce57e01..e63385882 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -131,7 +131,6 @@ enum { = LASTEvent+1, // (from X.h list of event names) kXDarwinUpdateButtons, // update state of mouse buttons 2 and up kXDarwinScrollWheel, // scroll wheel event - /* * Quartz-specific events -- not used in IOKit mode */ @@ -142,6 +141,8 @@ enum { kXDarwinReadPasteboard, // copy Mac OS X pasteboard into X cut buffer kXDarwinWritePasteboard, // copy X cut buffer onto Mac OS X pasteboard kXDarwinBringAllToFront, // bring all X windows to front + kXDarwinToggleFullscreen, // Enable/Disable fullscreen mode + kXDarwinSetRootless, // Set rootless mode /* * AppleWM events */ diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 25061a8b3..29f54de51 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -342,8 +342,22 @@ void DarwinModeProcessEvent( xEvent *xe) { switch (xe->u.u.type) { + case kXDarwinControllerNotify: + AppleWMSendEvent(AppleWMControllerNotify, + AppleWMControllerNotifyMask, + xe->u.clientMessage.u.l.longs0, + xe->u.clientMessage.u.l.longs1); + break; + + case kXDarwinPasteboardNotify: + AppleWMSendEvent(AppleWMPasteboardNotify, + AppleWMPasteboardNotifyMask, + xe->u.clientMessage.u.l.longs0, + xe->u.clientMessage.u.l.longs1); + break; case kXDarwinActivate: + ErrorF("kXDarwinActivate\n"); QuartzShow(xe->u.keyButtonPointer.rootX, xe->u.keyButtonPointer.rootY); AppleWMSendEvent(AppleWMActivationNotify, @@ -352,12 +366,48 @@ void DarwinModeProcessEvent( break; case kXDarwinDeactivate: + ErrorF("kXDarwinDeactivate\n"); AppleWMSendEvent(AppleWMActivationNotify, AppleWMActivationNotifyMask, AppleWMIsInactive, 0); QuartzHide(); break; + case kXDarwinDisplayChanged: + ErrorF("kXDarwinDisplayChanged\n"); + QuartzUpdateScreens(); + break; + + case kXDarwinWindowState: + ErrorF("kXDarwinWindowState\n"); + RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0, + xe->u.clientMessage.u.l.longs1); + break; + + case kXDarwinWindowMoved: + ErrorF("kXDarwinWindowMoved\n"); + RootlessNativeWindowMoved (xe->u.clientMessage.u.l.longs0); + break; + + case kXDarwinToggleFullscreen: +#ifdef DARWIN_DDX_MISSING + if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot); + else if (quartzHasRoot) QuartzHide(); + else QuartzShow(); +#else + ErrorF("kXDarwinToggleFullscreen not implemented\n"); +#endif + break; + + case kXDarwinSetRootless: +#ifdef DARWIN_DDX_MISSING + QuartzSetRootless(xe->u.clientMessage.u.l.longs0); + if (!quartzEnableRootless && !quartzHasRoot) QuartzHide(); +#else + ErrorF("kXDarwinSetRootless not implemented\n"); +#endif + break; + case kXDarwinSetRootClip: QuartzSetRootClip((BOOL)xe->u.clientMessage.u.l.longs0); break; @@ -374,46 +424,13 @@ void DarwinModeProcessEvent( QuartzWritePasteboard(); break; - /* - * AppleWM events - */ - case kXDarwinControllerNotify: - AppleWMSendEvent(AppleWMControllerNotify, - AppleWMControllerNotifyMask, - xe->u.clientMessage.u.l.longs0, - xe->u.clientMessage.u.l.longs1); - break; - - case kXDarwinPasteboardNotify: - AppleWMSendEvent(AppleWMPasteboardNotify, - AppleWMPasteboardNotifyMask, - xe->u.clientMessage.u.l.longs0, - xe->u.clientMessage.u.l.longs1); - break; - - case kXDarwinDisplayChanged: - QuartzUpdateScreens(); - break; - case kXDarwinBringAllToFront: + ErrorF("kXDarwinBringAllToFront\n"); RootlessOrderAllWindows(); break; - case kXDarwinWindowState: - ErrorF("kXDarwinWindowState\n"); - break; - case kXDarwinWindowMoved: { - WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0; - short x = xe->u.clientMessage.u.l.longs1, - y = xe->u.clientMessage.u.l.longs2; - ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y); - RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove); - } - break; - default: - ErrorF("Unknown application defined event type %d.\n", - xe->u.u.type); + ErrorF("Unknown application defined event type %d.\n", xe->u.u.type); } } diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h index fa7499df1..172f3239b 100644 --- a/hw/darwin/quartz/quartz.h +++ b/hw/darwin/quartz/quartz.h @@ -122,6 +122,7 @@ typedef struct _QuartzModeProcs { } QuartzModeProcsRec, *QuartzModeProcsPtr; extern QuartzModeProcsPtr quartzProcs; +extern int quartzHasRoot, quartzEnableRootless; Bool QuartzLoadDisplayBundle(const char *dpyBundleName); diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h index d9fdb6adb..b4a5b2a3d 100644 --- a/miext/rootless/rootless.h +++ b/miext/rootless/rootless.h @@ -74,6 +74,8 @@ typedef struct _RootlessWindowRec { unsigned int is_drawing :1; // Currently drawing? unsigned int is_reorder_pending :1; + unsigned int is_offscreen :1; + unsigned int is_obscured :1; } RootlessWindowRec, *RootlessWindowPtr; diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 4a3c0f6ae..eb736b7f7 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -36,13 +36,23 @@ #include /* For NULL */ #include /* For CHAR_BIT */ #include +#ifdef __APPLE__ +//#include +#include +#include "mi.h" +#include "pixmapstr.h" +#include "windowstr.h" +#include +//#include +extern int darwinMainScreenX, darwinMainScreenY; +#endif +#include "fb.h" + +#define AppleWMNumWindowLevels 5 #include "rootlessCommon.h" #include "rootlessWindow.h" -#include "fb.h" - - #ifdef ROOTLESS_GLOBAL_COORDS #define SCREEN_TO_GLOBAL_X \ (dixScreenOrigins[pScreen->myNum].x + rootlessGlobalOffsetX) @@ -53,6 +63,127 @@ #define SCREEN_TO_GLOBAL_Y 0 #endif +#define DEFINE_ATOM_HELPER(func,atom_name) \ + static Atom func (void) { \ + static unsigned int generation; \ + static Atom atom; \ + if (generation != serverGeneration) { \ + generation = serverGeneration; \ + atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \ + } \ + return atom; \ + } + +DEFINE_ATOM_HELPER (xa_native_screen_origin, "_NATIVE_SCREEN_ORIGIN") +DEFINE_ATOM_HELPER (xa_native_window_id, "_NATIVE_WINDOW_ID") +DEFINE_ATOM_HELPER (xa_apple_no_order_in, "_APPLE_NO_ORDER_IN") + +static Bool no_configure_window; +static Bool windows_hidden; +// TODO - abstract xp functions + +static const int normal_window_levels[AppleWMNumWindowLevels+1] = { + 0, 3, 4, 5, LONG_MIN + 30, LONG_MIN + 29, +}; +static const int rooted_window_levels[AppleWMNumWindowLevels+1] = { + 202, 203, 204, 205, 201, 200 +}; + +static inline int +configure_window (xp_window_id id, unsigned int mask, + const xp_window_changes *values) +{ + if (!no_configure_window) + return xp_configure_window (id, mask, values); + else + return XP_Success; +} + +/*static inline unsigned long +current_time_in_seconds (void) +{ + unsigned long t = 0; + + t += currentTime.milliseconds / 1000; + t += currentTime.months * 4294967; + + return t; + } */ + +static inline Bool +rootlessHasRoot (ScreenPtr pScreen) +{ + return WINREC (WindowTable[pScreen->myNum]) != NULL; +} + +void +RootlessNativeWindowStateChanged (xp_window_id id, unsigned int state) +{ + WindowPtr pWin; + RootlessWindowRec *winRec; + + pWin = xprGetXWindow (id); + if (pWin == NULL) return; + + winRec = WINREC (pWin); + if (winRec == NULL) return; + + winRec->is_offscreen = ((state & XP_WINDOW_STATE_OFFSCREEN) != 0); + winRec->is_obscured = ((state & XP_WINDOW_STATE_OBSCURED) != 0); + // pWin->rootlessUnhittable = winRec->is_offscreen; +} + +void +RootlessNativeWindowMoved (WindowPtr pWin) +{ + xp_box bounds; + int sx, sy; + XID vlist[2]; + Mask mask; + ClientPtr client; + RootlessWindowRec *winRec = WINREC(pWin); + + if (xp_get_window_bounds (winRec->wid, &bounds) != Success) return; + + sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; + sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY; + + /* Fake up a ConfigureWindow packet to resize the window to the current bounds. */ + + vlist[0] = (INT16) bounds.x1 - sx; + vlist[1] = (INT16) bounds.y1 - sy; + mask = CWX | CWY; + + /* pretend we're the owner of the window! */ + client = LookupClient (pWin->drawable.id, NullClient); + + /* Don't want to do anything to the physical window (avoids + notification-response feedback loops) */ + + no_configure_window = TRUE; + ConfigureWindow (pWin, mask, vlist, client); + no_configure_window = FALSE; +} + +/* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */ +static void +set_screen_origin (WindowPtr pWin) +{ + long data[2]; + + if (!IsRoot (pWin)) + return; + + /* FIXME: move this to an extension? */ + + data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x + + darwinMainScreenX); + data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y + + darwinMainScreenY); + + ChangeWindowProperty (pWin, xa_native_screen_origin (), XA_INTEGER, + 32, PropModeReplace, 2, data, TRUE); +} /* * RootlessCreateWindow @@ -565,7 +696,6 @@ RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) RL_DEBUG_MSG("restackwindow end\n"); } - /* * Specialized window copy procedures */ From b34d2ffc38002f7c4980c138f57e9a828cd79c37 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 7 Nov 2007 01:56:37 -0800 Subject: [PATCH 217/454] formatting changes. --- hw/darwin/apple/X11Application.m | 264 +++++++++++++++---------------- 1 file changed, 129 insertions(+), 135 deletions(-) diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m index 6b235ad0b..0a080db40 100644 --- a/hw/darwin/apple/X11Application.m +++ b/hw/darwin/apple/X11Application.m @@ -183,116 +183,111 @@ static void message_kit_thread (SEL selector, NSObject *arg) { } - (void) sendEvent:(NSEvent *)e { - NSEventType type; - BOOL for_appkit, for_x; - - type = [e type]; - - /* By default pass down the responder chain and to X. */ - for_appkit = YES; - for_x = YES; - - switch (type) { - case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown: - case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: - if ([e window] != nil) { - /* Pointer event has a window. Probably something for the kit. */ - - for_x = NO; - - if (_x_active) [self activateX:NO]; - } else if ([self modalWindow] == nil) { - /* Must be an X window. Tell appkit it doesn't have focus. */ - - for_appkit = NO; - - if ([self isActive]) { - [self deactivate]; - - if (!_x_active && quartzProcs->IsX11Window([e window], [e windowNumber])) - [self activateX:YES]; - } - } - break; + NSEventType type; + BOOL for_appkit, for_x; + + type = [e type]; + + /* By default pass down the responder chain and to X. */ + for_appkit = YES; + for_x = YES; + + switch (type) { + case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown: + case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: + if ([e window] != nil) { + /* Pointer event has an (AppKit) window. Probably something for the kit. */ + for_x = NO; + if (_x_active) [self activateX:NO]; + } else if ([self modalWindow] == nil) { + /* Must be an X window. Tell appkit it doesn't have focus. */ + for_appkit = NO; - case NSKeyDown: case NSKeyUp: - if (_x_active) { - static int swallow_up; + if ([self isActive]) { + [self deactivate]; - /* No kit window is focused, so send it to X. */ + if (!_x_active && quartzProcs->IsX11Window([e window], + [e windowNumber])) + [self activateX:YES]; + } + } + break; + + case NSKeyDown: case NSKeyUp: + if (_x_active) { + static int swallow_up; + + /* No kit window is focused, so send it to X. */ + for_appkit = NO; + if (type == NSKeyDown) { + /* Before that though, see if there are any global + shortcuts bound to it. */ - for_appkit = NO; - - if (type == NSKeyDown) { - /* Before that though, see if there are any global - shortcuts bound to it. */ - - if (X11EnableKeyEquivalents - && [[self mainMenu] performKeyEquivalent:e]) { - swallow_up = [e keyCode]; - for_x = NO; - } else if (!quartzEnableRootless + if (X11EnableKeyEquivalents + && [[self mainMenu] performKeyEquivalent:e]) { + swallow_up = [e keyCode]; + for_x = NO; + } else if (!quartzEnableRootless && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask) && ([e keyCode] == 0 /*a*/ - || [e keyCode] == 53 /*Esc*/)) { - swallow_up = 0; - for_x = NO; + || [e keyCode] == 53 /*Esc*/)) { + swallow_up = 0; + for_x = NO; #ifdef DARWIN_DDX_MISSING - QuartzMessageServerThread (kXDarwinToggleFullscreen, 0); + QuartzMessageServerThread (kXDarwinToggleFullscreen, 0); #endif - } - } else { - /* If we saw a key equivalent on the down, don't pass - the up through to X. */ - - if (swallow_up != 0 && [e keyCode] == swallow_up) { - swallow_up = 0; - for_x = NO; - } + } + } else { + /* If we saw a key equivalent on the down, don't pass + the up through to X. */ + + if (swallow_up != 0 && [e keyCode] == swallow_up) { + swallow_up = 0; + for_x = NO; } } - else for_x = NO; - break; - - case NSFlagsChanged: - /* For the l33t X users who remap modifier keys to normal keysyms. */ - if (!_x_active) - for_x = NO; - break; - - case NSAppKitDefined: - switch ([e subtype]) { - case NSApplicationActivatedEventType: - for_x = NO; - if ([self modalWindow] == nil) { - for_appkit = NO; - - /* FIXME: hack to avoid having to pass the event to appkit, - which would cause it to raise one of its windows. */ - _appFlags._active = YES; - - [self activateX:YES]; - if ([e data2] & 0x10) X11ApplicationSetFrontProcess(); - } - break; - - case 18: /* ApplicationDidReactivate */ - if (quartzHasRoot) for_appkit = NO; - break; - - case NSApplicationDeactivatedEventType: - for_x = NO; - [self activateX:NO]; - break; + } else for_x = NO; + break; + + case NSFlagsChanged: + /* For the l33t X users who remap modifier keys to normal keysyms. */ + if (!_x_active) for_x = NO; + break; + + case NSAppKitDefined: + switch ([e subtype]) { + case NSApplicationActivatedEventType: + for_x = NO; + if ([self modalWindow] == nil) { + for_appkit = NO; + + /* FIXME: hack to avoid having to pass the event to appkit, + which would cause it to raise one of its windows. */ + _appFlags._active = YES; + + [self activateX:YES]; + if ([e data2] & 0x10) X11ApplicationSetFrontProcess(); } break; - default: break; /* for gcc */ + case 18: /* ApplicationDidReactivate */ + if (quartzHasRoot) for_appkit = NO; + break; + + case NSApplicationDeactivatedEventType: + for_x = NO; + [self activateX:NO]; + break; } - - if (for_appkit) [super sendEvent:e]; - if (for_x) send_nsevent (type, e); + break; + + default: break; /* for gcc */ + } + + if (for_appkit) [super sendEvent:e]; + + if (for_x) send_nsevent (type, e); } - (void) set_window_menu:(NSArray *)list { @@ -596,52 +591,51 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { CFPreferencesAppSynchronize (kCFPreferencesCurrentApplication); } -- (void) read_defaults { - const char *tem; - - quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP - default:quartzUseSysBeep]; - quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS - default:quartzEnableRootless]; +- (void) read_defaults +{ + const char *tem; + + quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP + default:quartzUseSysBeep]; + quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS + default:quartzEnableRootless]; #ifdef DARWIN_DDX_MISSING - quartzFullscreenDisableHotkeys = ![self prefs_get_boolean: - @PREFS_FULLSCREEN_HOTKEYS default: - !quartzFullscreenDisableHotkeys]; - quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS - default:quartzXpluginOptions]; + quartzFullscreenDisableHotkeys = ![self prefs_get_boolean: + @PREFS_FULLSCREEN_HOTKEYS default: + !quartzFullscreenDisableHotkeys]; + quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS + default:quartzXpluginOptions]; #endif - - darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META - default:darwinSwapAltMeta]; - darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS - default:darwinFakeButtons]; - if (darwinFakeButtons) { - const char *fake2, *fake3; - - fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL]; - fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL]; - - if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2); - if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3); - - } - X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS - default:X11EnableKeyEquivalents]; + darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META + default:darwinSwapAltMeta]; + darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS + default:darwinFakeButtons]; + if (darwinFakeButtons) { + const char *fake2, *fake3; + + fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL]; + fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL]; + + if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2); + if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3); + } - darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP - default:darwinSyncKeymap]; + X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS + default:X11EnableKeyEquivalents]; - tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL]; - - if (tem != NULL) darwinKeymapFile = strdup (tem); - else darwinKeymapFile = NULL; + darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP + default:darwinSyncKeymap]; - darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH - default:darwinDesiredDepth]; + tem = [self prefs_get_string:@PREFS_KEYMAP_FILE default:NULL]; + if (tem != NULL) darwinKeymapFile = strdup (tem); + else darwinKeymapFile = NULL; - enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO - default:false]; + darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH + default:darwinDesiredDepth]; + + enable_stereo = [self prefs_get_boolean:@PREFS_ENABLE_STEREO + default:false]; } /* This will end up at the end of the responder chain. */ From 9a8abcfa6d6d0cdc17be02a3443a7e116eb07d07 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 7 Nov 2007 02:22:39 -0800 Subject: [PATCH 218/454] Fixed focus problem (clicking on an X11 window that sits behind an Aqua window would not always bring it to the top of the stack. --- hw/darwin/apple/X11Application.m | 2 ++ hw/darwin/quartz/xpr/xpr.h | 3 +++ hw/darwin/quartz/xpr/xprFrame.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m index 0a080db40..84e295b4a 100644 --- a/hw/darwin/apple/X11Application.m +++ b/hw/darwin/apple/X11Application.m @@ -201,6 +201,8 @@ static void message_kit_thread (SEL selector, NSObject *arg) { if (_x_active) [self activateX:NO]; } else if ([self modalWindow] == nil) { /* Must be an X window. Tell appkit it doesn't have focus. */ + WindowPtr pWin = xprGetXWindowFromAppKit([e windowNumber]); + if (pWin) RootlessReorderWindow(pWin); for_appkit = NO; if ([self isActive]) { diff --git a/hw/darwin/quartz/xpr/xpr.h b/hw/darwin/quartz/xpr/xpr.h index 73a88c03d..46baac78f 100644 --- a/hw/darwin/quartz/xpr/xpr.h +++ b/hw/darwin/quartz/xpr/xpr.h @@ -38,6 +38,9 @@ void AppleDRIExtensionInit(void); void xprAppleWMInit(void); Bool xprInit(ScreenPtr pScreen); Bool xprIsX11Window(void *nsWindow, int windowNumber); +WindowPtr xprGetX11Window(xp_window_id wid); +WindowPtr xprGetXWindowFromAppKit(int windowNumber); + void xprHideWindows(Bool hide); Bool QuartzInitCursor(ScreenPtr pScreen); diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index aa38845f6..ddb6d2dda 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -424,6 +424,37 @@ xprGetXWindow(xp_window_id wid) return winRec != NULL ? winRec->win : NULL; } +/* + * Given the id of a physical window, try to find the top-level (or root) + * X window that it represents. + */ +WindowPtr +xprGetXWindowFromAppKit(int windowNumber) +{ + RootlessWindowRec *winRec; + Bool ret; + xp_window_id wid; + + if (window_hash == NULL) + return FALSE; + + /* need to lock, since this function can be called by any thread */ + + pthread_mutex_lock(&window_hash_mutex); + + if (xp_lookup_native_window(windowNumber, &wid)) + ret = xprGetXWindow(wid) != NULL; + else + ret = FALSE; + + pthread_mutex_unlock(&window_hash_mutex); + + if (!ret) return NULL; + winRec = x_hash_table_lookup(window_hash, (void *) wid, NULL); + + return winRec != NULL ? winRec->win : NULL; +} + /* * The windowNumber is an AppKit window number. Returns TRUE if xpr is From 05d5b9baa05a4ba14a4383d8a981bc327d99290c Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 7 Nov 2007 02:28:49 -0800 Subject: [PATCH 219/454] removed debugging output --- hw/darwin/quartz/quartz.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 29f54de51..762a84b75 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -357,7 +357,7 @@ void DarwinModeProcessEvent( break; case kXDarwinActivate: - ErrorF("kXDarwinActivate\n"); + // ErrorF("kXDarwinActivate\n"); QuartzShow(xe->u.keyButtonPointer.rootX, xe->u.keyButtonPointer.rootY); AppleWMSendEvent(AppleWMActivationNotify, @@ -366,7 +366,7 @@ void DarwinModeProcessEvent( break; case kXDarwinDeactivate: - ErrorF("kXDarwinDeactivate\n"); + // ErrorF("kXDarwinDeactivate\n"); AppleWMSendEvent(AppleWMActivationNotify, AppleWMActivationNotifyMask, AppleWMIsInactive, 0); @@ -374,18 +374,18 @@ void DarwinModeProcessEvent( break; case kXDarwinDisplayChanged: - ErrorF("kXDarwinDisplayChanged\n"); + // ErrorF("kXDarwinDisplayChanged\n"); QuartzUpdateScreens(); break; case kXDarwinWindowState: - ErrorF("kXDarwinWindowState\n"); + // ErrorF("kXDarwinWindowState\n"); RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0, xe->u.clientMessage.u.l.longs1); break; case kXDarwinWindowMoved: - ErrorF("kXDarwinWindowMoved\n"); + // ErrorF("kXDarwinWindowMoved\n"); RootlessNativeWindowMoved (xe->u.clientMessage.u.l.longs0); break; @@ -395,7 +395,7 @@ void DarwinModeProcessEvent( else if (quartzHasRoot) QuartzHide(); else QuartzShow(); #else - ErrorF("kXDarwinToggleFullscreen not implemented\n"); + // ErrorF("kXDarwinToggleFullscreen not implemented\n"); #endif break; @@ -404,7 +404,7 @@ void DarwinModeProcessEvent( QuartzSetRootless(xe->u.clientMessage.u.l.longs0); if (!quartzEnableRootless && !quartzHasRoot) QuartzHide(); #else - ErrorF("kXDarwinSetRootless not implemented\n"); + // ErrorF("kXDarwinSetRootless not implemented\n"); #endif break; @@ -425,7 +425,7 @@ void DarwinModeProcessEvent( break; case kXDarwinBringAllToFront: - ErrorF("kXDarwinBringAllToFront\n"); + // ErrorF("kXDarwinBringAllToFront\n"); RootlessOrderAllWindows(); break; From b4d14484056e6f4a7374fc1acf3f223be4bd116f Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 7 Nov 2007 03:10:52 -0800 Subject: [PATCH 220/454] Undo some last-minute breakage in xpr.h --- hw/darwin/quartz/xpr/xpr.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/darwin/quartz/xpr/xpr.h b/hw/darwin/quartz/xpr/xpr.h index 46baac78f..bd8e63e61 100644 --- a/hw/darwin/quartz/xpr/xpr.h +++ b/hw/darwin/quartz/xpr/xpr.h @@ -38,8 +38,6 @@ void AppleDRIExtensionInit(void); void xprAppleWMInit(void); Bool xprInit(ScreenPtr pScreen); Bool xprIsX11Window(void *nsWindow, int windowNumber); -WindowPtr xprGetX11Window(xp_window_id wid); -WindowPtr xprGetXWindowFromAppKit(int windowNumber); void xprHideWindows(Bool hide); From bd269d0d783d418ef99363478fdf849fd89eed76 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 7 Nov 2007 03:55:08 -0800 Subject: [PATCH 221/454] Fix for off-by-one error in menu bar height calculation -- props to Nicholas Riley! --- hw/darwin/apple/X11Application.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m index 84e295b4a..38675a38e 100644 --- a/hw/darwin/apple/X11Application.m +++ b/hw/darwin/apple/X11Application.m @@ -819,7 +819,7 @@ void X11ApplicationMain (int argc, const char *argv[], /* Calculate the height of the menubar so we can avoid it. */ aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - - NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1; + NSMaxY([[NSScreen mainScreen] visibleFrame]); if (!create_thread (server_thread, server_arg)) { ErrorF("can't create secondary thread\n"); From 338c1aedbdf3964e542947140f7c50d58542cf12 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 7 Nov 2007 03:56:44 -0800 Subject: [PATCH 222/454] formatting fixes --- hw/darwin/apple/X11Application.m | 66 +++++++++++++++----------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/apple/X11Application.m index 38675a38e..461ca3926 100644 --- a/hw/darwin/apple/X11Application.m +++ b/hw/darwin/apple/X11Application.m @@ -789,44 +789,40 @@ environment?", @"Startup xinitrc dialog"); void X11ApplicationMain (int argc, const char *argv[], void (*server_thread) (void *), void *server_arg) { - NSAutoreleasePool *pool; - + 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 + selector:@selector (became_key:) + name:NSWindowDidBecomeKeyNotification object:nil]; + check_xinitrc (); - 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]) - - NSMaxY([[NSScreen mainScreen] visibleFrame]); - - if (!create_thread (server_thread, server_arg)) { - ErrorF("can't create secondary thread\n"); - exit(1); - } - - [NSApp run]; + /* + * 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 */ } From f2a3728868376a3646832d4af3a29549ce0b8f5d Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 8 Nov 2007 18:49:05 -0800 Subject: [PATCH 223/454] Patch to rootless code that should fix many crashes. Credit to Ken Thomases at CodeWeavers for the patch. From his description: Fix a display bug with the X server. The Generic Rootless extension installs overrides for certain GC (graphics context) operations. Within these overrides, they temporarily uninstall themselves, perform their work, and then reinstall themselves. Except sometimes they would return early and wouldn't reinstall themselves when they should. Now they do in all cases. Fix a bug in RootlessCopyWindow where early returns could leave the screen's dispatch table entry for CopyWindow unwrapped. We think that this is another case (hopefully the last) of the rootless drawing bug. --- miext/rootless/rootlessGC.c | 50 +++++++++++++++++++++------------ miext/rootless/rootlessWindow.c | 5 ++-- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c index b26f52c54..7e0778e17 100644 --- a/miext/rootless/rootlessGC.c +++ b/miext/rootless/rootlessGC.c @@ -413,10 +413,12 @@ static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) #define GC_IS_ROOT(pDst) ((pDst)->type == DRAWABLE_WINDOW \ && IsRoot ((WindowPtr) (pDst))) -#define GC_SKIP_ROOT(pDst) \ +#define GC_SKIP_ROOT(pDst, pGC) \ do { \ - if (GC_IS_ROOT (pDst)) \ + if (GC_IS_ROOT (pDst)) { \ + GCOP_WRAP(pGC); \ return; \ + } \ } while (0) @@ -426,7 +428,7 @@ RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("fill spans start "); if (nInit <= 0) { @@ -482,7 +484,7 @@ RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, int nspans, int sorted) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("set spans start "); if (nspans <= 0) { @@ -533,7 +535,7 @@ RootlessPutImage(DrawablePtr dst, GCPtr pGC, BoxRec box; GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("put image start "); RootlessStartDrawing((WindowPtr) dst); @@ -565,7 +567,10 @@ RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, GCOP_UNWRAP(pGC); if (GC_IS_ROOT(dst) || GC_IS_ROOT(pSrc)) + { + GCOP_WRAP(pGC); return NULL; /* nothing exposed */ + } RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst); @@ -615,7 +620,10 @@ static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, GCOP_UNWRAP(pGC); if (GC_IS_ROOT(dst) || GC_IS_ROOT(pSrc)) + { + GCOP_WRAP(pGC); return NULL; /* nothing exposed */ + } RL_DEBUG_MSG("copy plane start "); @@ -652,7 +660,7 @@ static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("polypoint start "); RootlessStartDrawing((WindowPtr) dst); @@ -746,7 +754,7 @@ static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("poly lines start "); RootlessStartDrawing((WindowPtr) dst); @@ -821,7 +829,7 @@ static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, int nseg, xSegment *pSeg) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("poly segment start (win 0x%x)", dst); RootlessStartDrawing((WindowPtr) dst); @@ -892,7 +900,7 @@ static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, int nRects, xRectangle *pRects) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("poly rectangle start "); RootlessStartDrawing((WindowPtr) dst); @@ -953,7 +961,7 @@ static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("poly arc start "); RootlessStartDrawing((WindowPtr) dst); @@ -1009,7 +1017,7 @@ static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)", dst, pGC->fillStyle); @@ -1083,7 +1091,7 @@ static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)", dst, pGC->fillStyle); @@ -1138,7 +1146,7 @@ static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("fill arc start "); if (narcsInit > 0) { @@ -1193,7 +1201,7 @@ static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("imagetext8 start "); if (count > 0) { @@ -1247,7 +1255,10 @@ static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, GCOP_UNWRAP(pGC); if (GC_IS_ROOT(dst)) + { + GCOP_WRAP(pGC); return 0; + } RL_DEBUG_MSG("polytext8 start "); @@ -1285,7 +1296,7 @@ static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("imagetext16 start "); if (count > 0) { @@ -1339,7 +1350,10 @@ static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, GCOP_UNWRAP(pGC); if (GC_IS_ROOT(dst)) + { + GCOP_WRAP(pGC); return 0; + } RL_DEBUG_MSG("polytext16 start "); @@ -1378,7 +1392,7 @@ static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, { GC_SAVE(pGC); GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("imageglyph start "); if (nglyphInit > 0) { @@ -1439,7 +1453,7 @@ static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, CharInfoPtr *ppci, pointer pglyphBase) { GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("polyglyph start "); RootlessStartDrawing((WindowPtr) dst); @@ -1485,7 +1499,7 @@ RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, BoxRec box; GCOP_UNWRAP(pGC); - GC_SKIP_ROOT(dst); + GC_SKIP_ROOT(dst, pGC); RL_DEBUG_MSG("push pixels start "); RootlessStartDrawing((WindowPtr) dst); diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index eb736b7f7..89c02f8c7 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -836,13 +836,13 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) top = TopLevelParent(pWin); if (top == NULL) { RL_DEBUG_MSG("no parent\n"); - return; + goto out; } winRec = WINREC(top); if (winRec == NULL) { RL_DEBUG_MSG("not framed\n"); - return; + goto out; } /* Move region to window local coords */ @@ -865,6 +865,7 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RootlessDamageRegion(pWin, prgnSrc); } +out: REGION_UNINIT(pScreen, &rgnDst); fbValidateDrawable(&pWin->drawable); From f48087b6c33c1f84bf2cfc0744b1c38697321c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 9 Nov 2007 05:49:26 -0500 Subject: [PATCH 224/454] Regenerate GLX dispatch code for recent gl_API.xml changes (#12935). --- GL/glx/indirect_dispatch.c | 25 ------------------------- GL/glx/indirect_dispatch.h | 4 ---- GL/glx/indirect_dispatch_swap.c | 25 ------------------------- GL/glx/indirect_size_get.c | 4 ++++ GL/glx/indirect_table.c | 2 +- 5 files changed, 5 insertions(+), 55 deletions(-) diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c index 00a9f9659..2afd3eb22 100644 --- a/GL/glx/indirect_dispatch.c +++ b/GL/glx/indirect_dispatch.c @@ -5169,31 +5169,6 @@ void __glXDisp_LoadProgramNV(GLbyte * pc) ) ); } -void __glXDisp_ProgramParameter4dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramParameter4fvNV(GLbyte * pc) -{ - CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - void __glXDisp_ProgramParameters4dvNV(GLbyte * pc) { const GLuint num = *(GLuint *)(pc + 8); diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h index bb39638fd..e81c382f0 100644 --- a/GL/glx/indirect_dispatch.h +++ b/GL/glx/indirect_dispatch.h @@ -149,8 +149,6 @@ extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientState 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_ProgramParameter4dvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc); extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc); extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc); extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc); @@ -425,8 +423,6 @@ 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_ProgramParameter4fvNV(GLbyte * pc); -extern HIDDEN void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc); extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc); extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc); diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c index c0bb71cc4..f137cbe98 100644 --- a/GL/glx/indirect_dispatch_swap.c +++ b/GL/glx/indirect_dispatch_swap.c @@ -5325,31 +5325,6 @@ void __glXDispSwap_LoadProgramNV(GLbyte * pc) ) ); } -void __glXDispSwap_ProgramParameter4dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramParameter4dvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc) -{ - CALL_ProgramParameter4fvNV( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc) { const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 ); diff --git a/GL/glx/indirect_size_get.c b/GL/glx/indirect_size_get.c index 928571440..f64fb7ece 100644 --- a/GL/glx/indirect_size_get.c +++ b/GL/glx/indirect_size_get.c @@ -652,6 +652,10 @@ __glGetBooleanv_size(GLenum e) 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:*/ diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c index 3da1f437c..cb3202605 100644 --- a/GL/glx/indirect_table.c +++ b/GL/glx/indirect_table.c @@ -644,7 +644,7 @@ static const void *Render_function_table[400][2] = { /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, - /* [ 304] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV}, + /* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB}, /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, From b092856baba5bd43b23950f23236b5cc3ce78c1e Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Fri, 9 Nov 2007 14:45:02 -0500 Subject: [PATCH 225/454] 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 226/454] 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 f7dd0c72b8f861f4d5443a43d1013e3fe3db43ca Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Mon, 12 Nov 2007 15:11:03 +0100 Subject: [PATCH 227/454] Only clear crtc of output if it is the one we're actually working on. Upon recreation of the RandR internal data structures in RRCrtcNotify() the crtc of an output could be NULLed if the crtc was shared (cloned) between two outputs and one of them got another crtc assigned. --- randr/rrcrtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index db5007e28..43cfb2923 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -150,7 +150,8 @@ RRCrtcNotify (RRCrtcPtr crtc, break; if (i == numOutputs) { - crtc->outputs[j]->crtc = NULL; + if (crtc->outputs[j]->crtc == crtc) + crtc->outputs[j]->crtc = NULL; RROutputChanged (crtc->outputs[j], FALSE); RRCrtcChanged (crtc, FALSE); } From f207e69d62bc04c7f254347b03e6d8fa8b569d66 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Wed, 14 Nov 2007 12:23:29 -0500 Subject: [PATCH 228/454] 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 cecac794451b793871f297b91a11d3b52eeb6d1b Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 8 Nov 2007 17:25:36 -0500 Subject: [PATCH 229/454] Don't sleep(1) at server exit. --- hw/xfree86/common/xf86Init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index bf577e6ad..d4f01d311 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1307,7 +1307,7 @@ AbortDDX() /* * try to restore the original video state */ -#ifdef HAS_USL_VTS +#if defined(HAS_USL_VTS) && !defined(linux) /* Need the sleep when starting X from within another X session */ sleep(1); #endif From c3897ca7099fc007b4134a8fabd4c707f99f2ac7 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 9 Nov 2007 13:55:32 -0500 Subject: [PATCH 230/454] Add -pogo option for init/teardown performance testing. --- os/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os/utils.c b/os/utils.c index ae96a4176..d46a756f2 100644 --- a/os/utils.c +++ b/os/utils.c @@ -933,6 +933,10 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } + else if (strcmp(argv[i], "-pogo") == 0) + { + dispatchException = DE_TERMINATE; + } else if ( strcmp( argv[i], "-pn") == 0) PartialNetwork = TRUE; else if ( strcmp( argv[i], "-nopn") == 0) From 3dde66f96b9b8431381871cf85266da3ec57a0d4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 14 Nov 2007 15:10:59 -0500 Subject: [PATCH 231/454] Start 1.4.99 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1df8874db..8a1f88c93 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.0.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +AC_INIT([xorg-server], 1.4.99.1, [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 4c9cc82fc4461d180ae2c2fbe50e7f98b0777f91 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Thu, 15 Nov 2007 01:46:11 -0200 Subject: [PATCH 232/454] For some reason "-nozap" appeared twice. Weird. --- hw/kdrive/src/kdrive.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 8c4342eaa..5376f19db 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -632,11 +632,6 @@ KdProcessArgument (int argc, char **argv, int i) kdDontZap = TRUE; return 1; } - if (!strcmp (argv[i], "-nozap")) - { - kdDontZap = TRUE; - return 1; - } if (!strcmp (argv[i], "-3button")) { kdEmulateMiddleButton = FALSE; From 2c01a49bf0a407bd5510bb9ceb4ef86a2cc36be9 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 15 Nov 2007 13:32:59 -0500 Subject: [PATCH 233/454] Don't sleep(1) at exit on any platform. --- hw/xfree86/common/xf86Init.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index d4f01d311..b5ee21d19 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1307,10 +1307,6 @@ AbortDDX() /* * try to restore the original video state */ -#if defined(HAS_USL_VTS) && !defined(linux) - /* Need the sleep when starting X from within another X session */ - sleep(1); -#endif #ifdef DPMSExtension /* Turn screens back on */ if (DPMSPowerLevel != DPMSModeOn) DPMSSet(DPMSModeOn); From 0706e5e790060fbf046cfaff295b78806b7841c6 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 15 Nov 2007 14:15:09 -0500 Subject: [PATCH 234/454] Eliminate some redundancy in autoconfiguration. We already synthesize Monitor and Module sections for you, no need to specify them explicitly in the fake config buffer. --- hw/xfree86/common/xf86AutoConfig.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index c5998bfb8..c6e197216 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -43,16 +43,6 @@ /* Sections for the default built-in configuration. */ -#define BUILTIN_MODULE_SECTION \ - "Section \"Module\"\n" \ - "\tLoad\t\"extmod\"\n" \ - "\tLoad\t\"dbe\"\n" \ - "\tLoad\t\"glx\"\n" \ - "\tLoad\t\"freetype\"\n" \ - "\tLoad\t\"record\"\n" \ - "\tLoad\t\"dri\"\n" \ - "EndSection\n\n" - #define BUILTIN_DEVICE_NAME \ "\"Builtin Default %s Device %d\"" @@ -68,14 +58,6 @@ BUILTIN_DEVICE_SECTION_PRE \ BUILTIN_DEVICE_SECTION_POST -#define BUILTIN_MONITOR_NAME \ - "\"Builtin Default Monitor\"" - -#define BUILTIN_MONITOR_SECTION \ - "Section \"Monitor\"\n" \ - "\tIdentifier\t" BUILTIN_MONITOR_NAME "\n" \ - "EndSection\n\n" - #define BUILTIN_SCREEN_NAME \ "\"Builtin Default %s Screen %d\"" @@ -83,7 +65,6 @@ "Section \"Screen\"\n" \ "\tIdentifier\t" BUILTIN_SCREEN_NAME "\n" \ "\tDevice\t" BUILTIN_DEVICE_NAME "\n" \ - "\tMonitor\t" BUILTIN_MONITOR_NAME "\n" \ "EndSection\n\n" #define BUILTIN_LAYOUT_SECTION_PRE \ @@ -220,9 +201,6 @@ xf86AutoConfig(void) driver = chooseVideoDriver(); - AppendToConfig(BUILTIN_MODULE_SECTION); - AppendToConfig(BUILTIN_MONITOR_SECTION); - if (driver) { snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION_PRE, driver, 0, driver); From c67b9c5fc33002b13a2360929a37f24169710f64 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 15 Nov 2007 14:24:36 -0500 Subject: [PATCH 235/454] Clean up some garbage in driver enumeration. --- configure.ac | 2 -- hw/xfree86/common/xf86Config.c | 19 +++---------------- hw/xfree86/common/xf86Helper.c | 3 --- include/xorg-server.h.in | 6 ------ 4 files changed, 3 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index 8a1f88c93..35b7f0ffc 100644 --- a/configure.ac +++ b/configure.ac @@ -1518,8 +1518,6 @@ dnl has it in libc), or if libdl is needed to get it. AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module]) - AC_DEFINE(DRIVERS, {}, [Built-in output drivers (none)]) - AC_DEFINE(IDRIVERS, {}, [Built-in input drivers (none)]) AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file]) AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path]) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 638027432..e74c590ee 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -538,14 +538,8 @@ fixup_video_driver_list(char **drivers) } } - -/* - * Generate a compiled-in list of driver names. This is used to produce a - * consistent probe order. For the loader server, we also look for vendor- - * provided modules, pre-pending them to our own list. - */ static char ** -GenerateDriverlist(char * dirname, char * drivernames) +GenerateDriverlist(char * dirname) { char **ret; const char *subdirs[] = { dirname, NULL }; @@ -559,20 +553,13 @@ GenerateDriverlist(char * dirname, char * drivernames) return ret; } - char ** xf86DriverlistFromCompile(void) { static char **driverlist = NULL; - static Bool generated = FALSE; - /* This string is modified in-place */ - static char drivernames[] = DRIVERS; - - if (!generated) { - generated = TRUE; - driverlist = GenerateDriverlist("drivers", drivernames); - } + if (!driverlist) + driverlist = GenerateDriverlist("drivers"); return driverlist; } diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 1ef79730c..d37875c35 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1492,9 +1492,6 @@ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) } -#define MAXDRIVERS 64 /* A >hack<, to be sure ... */ - - _X_EXPORT int xf86MatchDevice(const char *drivername, GDevPtr **sectlist) { diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in index 2a0a5f5e2..f38213117 100644 --- a/include/xorg-server.h.in +++ b/include/xorg-server.h.in @@ -31,9 +31,6 @@ /* Build DPMS extension */ #undef DPMSExtension -/* Built-in output drivers */ -#undef DRIVERS - /* Build GLX extension */ #undef GLXEXT @@ -46,9 +43,6 @@ /* Support SHM */ #undef HAS_SHM -/* Built-in input drivers */ -#undef IDRIVERS - /* Support IPv6 for TCP connections */ #undef IPv6 From 01cfba75229f4b9bf1e4fe80814931acdacde14c Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 15 Nov 2007 14:27:03 -0500 Subject: [PATCH 236/454] Nuke the debugging allocator. This has never been hooked up in the modular build, and can not possibly have built since before 6.7. Clearly no one's using it. --- os/Makefile.am | 3 - os/xalloc.c | 816 ------------------------------------------------- 2 files changed, 819 deletions(-) delete mode 100644 os/xalloc.c diff --git a/os/Makefile.am b/os/Makefile.am index d2a989782..8ed12e47a 100644 --- a/os/Makefile.am +++ b/os/Makefile.am @@ -2,9 +2,6 @@ noinst_LTLIBRARIES = libos.la libcwrapper.la AM_CFLAGS = $(DIX_CFLAGS) -# FIXME: Add support for these in configure.ac -INTERNALMALLOC_SRCS = xalloc.c - SECURERPC_SRCS = rpcauth.c XCSECURITY_SRCS = secauth.c XDMCP_SRCS = xdmcp.c diff --git a/os/xalloc.c b/os/xalloc.c deleted file mode 100644 index e5f39465b..000000000 --- a/os/xalloc.c +++ /dev/null @@ -1,816 +0,0 @@ -#define FATALERRORS 1 -/* -Copyright (C) 1995 Pascal Haible. 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 -PASCAL HAIBLE 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 Pascal Haible shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from -Pascal Haible. -*/ - - -/* Only used if INTERNAL_MALLOC is defined - * - otherwise xalloc() in utils.c is used - */ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifdef INTERNAL_MALLOC - -#include /* for malloc() etc. */ - -#include -#include "misc.h" -#include - -#ifdef XALLOC_LOG -#include -#endif - -extern Bool Must_have_memory; - -/* - ***** New malloc approach for the X server ***** - * Pascal Haible 1995 - * - * Some statistics about memory allocation of the X server - * The test session included several clients of different size, including - * xv, emacs and xpaint with a new canvas of 3000x2000, zoom 5. - * All clients were running together. - * A protocolling version of Xalloc recorded 318917 allocating actions - * (191573 Xalloc, 85942 XNFalloc, 41438 Xrealloc, 279727 Xfree). - * Results grouped by size, excluding the next lower size - * (i.e. size=32 means 16=11k) are mmapped on xalloc, and unmapped on xfree, - * so we don't need any free lists etc. - * As this needs 2 system calls, we only do this for the quite - * infrequent large (>=11k) blocks. - * - instead of reinventing the wheel, we use system malloc for medium - * sized blocks (>256, <11k). - * - for small blocks (<=256) we use an other approach: - * As we need many small blocks, and most ones for a short time, - * we don't go through the system malloc: - * for each fixed sizes a seperate list of free blocks is kept. - * to KISS (Keep it Small and Simple), we don't free them - * (not freeing a block of 32 bytes won't be worse than having fragmented - * a larger area on allocation). - * This way, we (almost) allways have a fitting free block right at hand, - * and don't have to walk any lists. - */ - -/* - * structure layout of a allocated block - * unsigned long size: - * rounded up netto size for small and medium blocks - * brutto size == mmap'ed area for large blocks - * unsigned long DEBUG ? MAGIC : unused - * .... data - * ( unsigned long MAGIC2 ) only if SIZE_TAIL defined - * - */ - -/* use otherwise unused long in the header to store a magic */ -/* shouldn't this be removed for production release ? */ -#define XALLOC_DEBUG - -#ifdef XALLOC_DEBUG -/* Xfree fills the memory with a certain pattern (currently 0xF0) */ -/* this should really be removed for production release! */ -#define XFREE_ERASES -#endif - -/* this must be a multiple of SIZE_STEPS below */ -#define MAX_SMALL 264 /* quite many blocks of 264 */ - -#define MIN_LARGE (11*1024) -/* worst case is 25% loss with a page size of 4k */ - -/* SIZE_STEPS defines the granularity of size of small blocks - - * this makes blocks align to that, too! */ -#define SIZE_STEPS (sizeof(double)) -#define SIZE_HEADER (2*sizeof(long)) /* = sizeof(double) for 32bit */ -#ifdef XALLOC_DEBUG -#if defined(__sparc__) -#define SIZE_TAIL (2*sizeof(long)) /* = sizeof(double) for 32bit */ -#else -#define SIZE_TAIL (sizeof(long)) -#endif -#endif - -#undef TAIL_SIZE -#ifdef SIZE_TAIL -#define TAIL_SIZE SIZE_TAIL -#else -#define TAIL_SIZE 0 -#endif - -#if defined (_LP64) || \ - defined(__alpha__) || defined(__alpha) || \ - defined(__ia64__) || defined(ia64) || \ - defined(__sparc64__) || \ - defined(__s390x__) || \ - defined(__amd64__) || defined(amd64) || \ - defined(__powerpc64__) || \ - (defined(sgi) && _MIPS_SZLONG == 64)) -#define MAGIC 0x1404196414071968 -#define MAGIC_FREE 0x1506196615061966 -#define MAGIC2 0x2515207525182079 -#else -#define MAGIC 0x14071968 -#define MAGIC_FREE 0x15061966 -#define MAGIC2 0x25182079 -#endif - -/* To get some statistics about memory allocation */ - -#ifdef XALLOC_LOG -#define XALLOC_LOG_FILE "/tmp/Xalloc.log" /* unsecure... */ -#define LOG_BODY(_body) \ - { FILE *f; \ - f = fopen(XALLOC_LOG_FILE, "a"); \ - if (NULL!=f) { \ - _body; \ - fclose(f); \ - } \ - } -#if defined(linux) && defined(__i386__) -#define LOG_ALLOC(_fun, _size, _ret) \ - { unsigned long *from; \ - __asm__("movl %%ebp,%0" : /*OUT*/ "=r" (from) : /*IN*/ ); \ - LOG_BODY(fprintf(f, "%s\t%i\t%p\t[%lu]\n", _fun, _size, _ret, *(from+1))) \ - } -#else -#define LOG_ALLOC(_fun, _size, _ret) \ - LOG_BODY(fprintf(f, "%s\t%i\t%p\n", _fun, _size, _ret)) -#endif -#define LOG_REALLOC(_fun, _ptr, _size, _ret) \ - LOG_BODY(fprintf(f, "%s\t%p\t%i\t%p\n", _fun, _ptr, _size, _ret)) -#define LOG_FREE(_fun, _ptr) \ - LOG_BODY(fprintf(f, "%s\t%p\n", _fun, _ptr)) -#else -#define LOG_ALLOC(_fun, _size, _ret) -#define LOG_REALLOC(_fun, _ptr, _size, _ret) -#define LOG_FREE(_fun, _ptr) -#endif /* XALLOC_LOG */ - -static unsigned long *free_lists[MAX_SMALL/SIZE_STEPS]; - -/* - * systems that support it should define HAS_MMAP_ANON or MMAP_DEV_ZERO - * and include the appropriate header files for - * mmap(), munmap(), PROT_READ, PROT_WRITE, MAP_PRIVATE, - * PAGE_SIZE or _SC_PAGESIZE (and MAP_ANON for HAS_MMAP_ANON). - * - * systems that don't support MAP_ANON fall through to the 2 fold behaviour - */ - -#if defined(linux) -#define HAS_MMAP_ANON -#include -#include -#include /* PAGE_SIZE */ -#define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */ -#define HAS_GETPAGESIZE -#endif /* linux */ - -#if defined(__GNU__) -#define HAS_MMAP_ANON -#include -#include -#include /* PAGE_SIZE */ -#define HAS_SC_PAGESIZE -#define HAS_GETPAGESIZE -#endif /* __GNU__ */ - -#if defined(CSRG_BASED) -#define HAS_MMAP_ANON -#define HAS_GETPAGESIZE -#include -#include -#endif /* CSRG_BASED */ - -#if defined(DGUX) -#define HAS_GETPAGESIZE -#define MMAP_DEV_ZERO -#include -#include -#include -#endif /* DGUX */ - -#if defined(SVR4) && !defined(DGUX) -#define MMAP_DEV_ZERO -#include -#include -#include -#endif /* SVR4 && !DGUX */ - -#if defined(sun) && !defined(SVR4) /* SunOS */ -#define MMAP_DEV_ZERO /* doesn't SunOS have MAP_ANON ?? */ -#define HAS_GETPAGESIZE -#include -#include -#endif /* sun && !SVR4 */ - -#ifdef XNO_SYSCONF -#undef _SC_PAGESIZE -#endif - -#if defined(HAS_MMAP_ANON) || defined (MMAP_DEV_ZERO) -static int pagesize; -#endif - -#ifdef MMAP_DEV_ZERO -static int devzerofd = -1; -#include -#endif - -/* - * empty trap function for gdb. Breakpoint here - * to find who tries to free a free area - */ -void XfreeTrap(void) -{ -} - -_X_EXPORT void * -Xalloc (unsigned long amount) -{ - register unsigned long *ptr; - int indx; - - /* sanity checks */ - - /* zero size requested */ - if (amount == 0) { - LOG_ALLOC("Xalloc=0", amount, 0); - return NULL; - } - /* negative size (or size > 2GB) - what do we do? */ - if ((long)amount < 0) { - /* Diagnostic */ -#ifdef FATALERRORS - FatalError("Xalloc: Xalloc(<0)\n"); -#else - ErrorF("Xalloc warning: Xalloc(<0) ignored..\n"); -#endif - LOG_ALLOC("Xalloc<0", amount, 0); - return NULL; - } - - /* alignment check */ -#if defined(__alpha__) || defined(__alpha) || \ - defined(__sparc__) || \ - defined(__mips__) || \ - defined(__powerpc__) || \ - defined(__arm32__) || \ - defined(__ia64__) || defined(ia64) || \ - defined(__s390x__) || defined(__s390__) - amount = (amount + (sizeof(long)-1)) & ~(sizeof(long)-1); -#endif - - if (amount <= MAX_SMALL) { - /* - * small block - */ - /* pick a ready to use small chunk */ - indx = (amount-1) / SIZE_STEPS; - ptr = free_lists[indx]; - if (NULL == ptr) { - /* list empty - get 20 or 40 more */ - /* amount = size rounded up */ - amount = (indx+1) * SIZE_STEPS; - ptr = (unsigned long *)calloc(1,(amount+SIZE_HEADER+TAIL_SIZE) - * (amount<100 ? 40 : 20)); - if (NULL!=ptr) { - int i; - unsigned long *p1, *p2; - p1 = 0; - p2 = (unsigned long *)((char *)ptr + SIZE_HEADER); - for (i=0; i<(amount<100 ? 40 : 20); i++) { - p1 = p2; - p1[-2] = amount; -#ifdef XALLOC_DEBUG - p1[-1] = MAGIC_FREE; -#endif /* XALLOC_DEBUG */ -#ifdef SIZE_TAIL - *(unsigned long *)((unsigned char *)p1 + amount) = MAGIC2; -#endif /* SIZE_TAIL */ - p2 = (unsigned long *)((char *)p1 + SIZE_HEADER + amount + TAIL_SIZE); - *(unsigned long **)p1 = p2; - } - /* last one has no next one */ - *(unsigned long **)p1 = NULL; - /* put the second in the list */ - free_lists[indx] = (unsigned long *)((char *)ptr + SIZE_HEADER + amount + TAIL_SIZE + SIZE_HEADER); - /* take the fist one */ - ptr = (unsigned long *)((char *)ptr + SIZE_HEADER); - LOG_ALLOC("Xalloc-S", amount, ptr); - ptr[-1] = MAGIC; - return (void *)ptr; - } /* else fall through to 'Out of memory' */ - } else { - /* take that piece of mem out of the list */ - free_lists[indx] = *((unsigned long **)ptr); - /* already has size (and evtl. magic) filled in */ -#ifdef XALLOC_DEBUG - ptr[-1] = MAGIC; -#endif /* XALLOC_DEBUG */ - LOG_ALLOC("Xalloc-S", amount, ptr); - return (void *)ptr; - } - -#if defined(HAS_MMAP_ANON) || defined(MMAP_DEV_ZERO) - } else if (amount >= MIN_LARGE) { - /* - * large block - */ - /* mmapped malloc */ - /* round up amount */ - amount += SIZE_HEADER + TAIL_SIZE; - /* round up brutto amount to a multiple of the page size */ - amount = (amount + pagesize-1) & ~(pagesize-1); -#ifdef MMAP_DEV_ZERO - ptr = (unsigned long *)mmap((caddr_t)0, - (size_t)amount, - PROT_READ | PROT_WRITE, - MAP_PRIVATE, - devzerofd, - (off_t)0); -#else - ptr = (unsigned long *)mmap((caddr_t)0, - (size_t)amount, - PROT_READ | PROT_WRITE, - MAP_ANON | MAP_PRIVATE, - -1, - (off_t)0); -#endif - if (-1!=(long)ptr) { - ptr[0] = amount - SIZE_HEADER - TAIL_SIZE; -#ifdef XALLOC_DEBUG - ptr[1] = MAGIC; -#endif /* XALLOC_DEBUG */ -#ifdef SIZE_TAIL - ((unsigned long *)((char *)ptr + amount - TAIL_SIZE))[0] = MAGIC2; -#endif /* SIZE_TAIL */ - ptr = (unsigned long *)((char *)ptr + SIZE_HEADER); - LOG_ALLOC("Xalloc-L", amount, ptr); - return (void *)ptr; - } /* else fall through to 'Out of memory' */ -#endif /* HAS_MMAP_ANON || MMAP_DEV_ZERO */ - } else { - /* - * medium sized block - */ - /* 'normal' malloc() */ - ptr=(unsigned long *)calloc(1,amount+SIZE_HEADER+TAIL_SIZE); - if (ptr != (unsigned long *)NULL) { - ptr[0] = amount; -#ifdef XALLOC_DEBUG - ptr[1] = MAGIC; -#endif /* XALLOC_DEBUG */ -#ifdef SIZE_TAIL - *(unsigned long *)((char *)ptr + amount + SIZE_HEADER) = MAGIC2; -#endif /* SIZE_TAIL */ - ptr = (unsigned long *)((char *)ptr + SIZE_HEADER); - LOG_ALLOC("Xalloc-M", amount, ptr); - return (void *)ptr; - } - } - if (Must_have_memory) - FatalError("Out of memory"); - LOG_ALLOC("Xalloc-oom", amount, 0); - return NULL; -} - -/***************** - * XNFalloc - * "no failure" realloc, alternate interface to Xalloc w/o Must_have_memory - *****************/ - -_X_EXPORT pointer -XNFalloc (unsigned long amount) -{ - register pointer ptr; - - /* zero size requested */ - if (amount == 0) { - LOG_ALLOC("XNFalloc=0", amount, 0); - return NULL; - } - /* negative size (or size > 2GB) - what do we do? */ - if ((long)amount < 0) { - /* Diagnostic */ -#ifdef FATALERRORS - FatalError("Xalloc: XNFalloc(<0)\n"); -#else - ErrorF("Xalloc warning: XNFalloc(<0) ignored..\n"); -#endif - LOG_ALLOC("XNFalloc<0", amount, 0); - return (unsigned long *)NULL; - } - ptr = Xalloc(amount); - if (!ptr) - { - FatalError("Out of memory"); - } - return ptr; -} - -/***************** - * Xcalloc - *****************/ - -_X_EXPORT pointer -Xcalloc (unsigned long amount) -{ - pointer ret; - - ret = Xalloc (amount); - if (ret != 0 -#if defined(HAS_MMAP_ANON) || defined(MMAP_DEV_ZERO) - && (amount < MIN_LARGE) /* mmaped anonymous mem is already cleared */ -#endif - ) - bzero ((char *) ret, (int) amount); - return ret; -} - -/***************** - * XNFcalloc - *****************/ -_X_EXPORT void * -XNFcalloc (unsigned long amount) -{ - pointer ret; - - ret = XNFalloc (amount); - if (ret != 0 -#if defined(HAS_MMAP_ANON) || defined(MMAP_DEV_ZERO) - && (amount < MIN_LARGE) /* mmaped anonymous mem is already cleared */ -#endif - ) - bzero ((char *) ret, (int) amount); - return ret; -} - -/***************** - * Xrealloc - *****************/ - -_X_EXPORT void * -Xrealloc (pointer ptr, unsigned long amount) -{ - register unsigned long *new_ptr; - - /* zero size requested */ - if (amount == 0) { - if (ptr) - Xfree(ptr); - LOG_REALLOC("Xrealloc=0", ptr, amount, 0); - return NULL; - } - /* negative size (or size > 2GB) - what do we do? */ - if ((long)amount < 0) { - /* Diagnostic */ -#ifdef FATALERRORS - FatalError("Xalloc: Xrealloc(<0)\n"); -#else - ErrorF("Xalloc warning: Xrealloc(<0) ignored..\n"); -#endif - if (ptr) - Xfree(ptr); /* ?? */ - LOG_REALLOC("Xrealloc<0", ptr, amount, 0); - return NULL; - } - - new_ptr = Xalloc(amount); - if ( (new_ptr) && (ptr) ) { - unsigned long old_size; - old_size = ((unsigned long *)ptr)[-2]; -#ifdef XALLOC_DEBUG - if (MAGIC != ((unsigned long *)ptr)[-1]) { - if (MAGIC_FREE == ((unsigned long *)ptr)[-1]) { -#ifdef FATALERRORS - XfreeTrap(); - FatalError("Xalloc error: range already freed in Xrealloc() :-(\n"); -#else - ErrorF("Xalloc error: range already freed in Xrealloc() :-(\a\n"); - sleep(5); - XfreeTrap(); -#endif - LOG_REALLOC("Xalloc error: ranged already freed in Xrealloc() :-(", - ptr, amount, 0); - return NULL; - } -#ifdef FATALERRORS - XfreeTrap(); - FatalError("Xalloc error: header corrupt in Xrealloc() :-(\n"); -#else - ErrorF("Xalloc error: header corrupt in Xrealloc() :-(\n"); - XfreeTrap(); -#endif - LOG_REALLOC("Xalloc error: header corrupt in Xrealloc() :-(", - ptr, amount, 0); - return NULL; - } -#endif /* XALLOC_DEBUG */ - /* copy min(old size, new size) */ - memcpy((char *)new_ptr, (char *)ptr, (amount < old_size ? amount : old_size)); - } - if (ptr) - Xfree(ptr); - if (new_ptr) { - LOG_REALLOC("Xrealloc", ptr, amount, new_ptr); - return (void *)new_ptr; - } - if (Must_have_memory) - FatalError("Out of memory"); - LOG_REALLOC("Xrealloc", ptr, amount, 0); - return NULL; -} - -/***************** - * XNFrealloc - * "no failure" realloc, alternate interface to Xrealloc w/o Must_have_memory - *****************/ - -_X_EXPORT void * -XNFrealloc (pointer ptr, unsigned long amount) -{ - if (( ptr = (pointer)Xrealloc( ptr, amount ) ) == NULL) - { - FatalError( "Out of memory" ); - } - return ptr; -} - -/***************** - * Xfree - * calls free - *****************/ - -_X_EXPORT void -Xfree(pointer ptr) -{ - unsigned long size; - unsigned long *pheader; - - /* free(NULL) IS valid :-( - and widely used throughout the server.. */ - if (!ptr) - return; - - pheader = (unsigned long *)((char *)ptr - SIZE_HEADER); -#ifdef XALLOC_DEBUG - if (MAGIC != pheader[1]) { - /* Diagnostic */ - if (MAGIC_FREE == pheader[1]) { -#ifdef FATALERRORS - XfreeTrap(); - FatalError("Xalloc error: range already freed in Xrealloc() :-(\n"); -#else - ErrorF("Xalloc error: range already freed in Xrealloc() :-(\a\n"); - sleep(5); - XfreeTrap(); -#endif - LOG_FREE("Xalloc error: ranged already freed in Xrealloc() :-(", ptr); - return; - } -#ifdef FATALERRORS - XfreeTrap(); - FatalError("Xalloc error: Header corrupt in Xfree() :-(\n"); -#else - ErrorF("Xalloc error: Header corrupt in Xfree() :-(\n"); - XfreeTrap(); -#endif - LOG_FREE("Xalloc error: Header corrupt in Xfree() :-(", ptr); - return; - } -#endif /* XALLOC_DEBUG */ - - size = pheader[0]; - if (size <= MAX_SMALL) { - int indx; - /* - * small block - */ -#ifdef SIZE_TAIL - if (MAGIC2 != *(unsigned long *)((char *)ptr + size)) { - /* Diagnostic */ -#ifdef FATALERRORS - XfreeTrap(); - FatalError("Xalloc error: Tail corrupt in Xfree() for small block (adr=0x%x, val=0x%x)\n",(char *)ptr + size,*(unsigned long *)((char *)ptr + size)); -#else - ErrorF("Xalloc error: Tail corrupt in Xfree() for small block (adr=0x%x, val=0x%x)\n",(char *)ptr + size,*(unsigned long *)((char *)ptr + size)); - XfreeTrap(); -#endif - LOG_FREE("Xalloc error: Tail corrupt in Xfree() for small block", ptr); - return; - } -#endif /* SIZE_TAIL */ - -#ifdef XFREE_ERASES - memset(ptr,0xF0,size); -#endif /* XFREE_ERASES */ -#ifdef XALLOC_DEBUG - pheader[1] = MAGIC_FREE; -#endif - /* put this small block at the head of the list */ - indx = (size-1) / SIZE_STEPS; - *(unsigned long **)(ptr) = free_lists[indx]; - free_lists[indx] = (unsigned long *)ptr; - LOG_FREE("Xfree", ptr); - return; - -#if defined(HAS_MMAP_ANON) || defined(MMAP_DEV_ZERO) - } else if (size >= MIN_LARGE) { - /* - * large block - */ -#ifdef SIZE_TAIL - if (MAGIC2 != ((unsigned long *)((char *)ptr + size))[0]) { - /* Diagnostic */ -#ifdef FATALERRORS - XfreeTrap(); - FatalError("Xalloc error: Tail corrupt in Xfree() for big block (adr=0x%x, val=0x%x)\n",(char *)ptr+size,((unsigned long *)((char *)ptr + size))[0]); -#else - ErrorF("Xalloc error: Tail corrupt in Xfree() for big block (adr=0x%x, val=0x%x)\n",(char *)ptr+size,((unsigned long *)((char *)ptr + size))[0]); - XfreeTrap(); -#endif - LOG_FREE("Xalloc error: Tail corrupt in Xfree() for big block", ptr); - return; - } - size += SIZE_TAIL; -#endif /* SIZE_TAIL */ - - LOG_FREE("Xfree", ptr); - size += SIZE_HEADER; - munmap((caddr_t)pheader, (size_t)size); - /* no need to clear - mem is inaccessible after munmap.. */ -#endif /* HAS_MMAP_ANON */ - - } else { - /* - * medium sized block - */ -#ifdef SIZE_TAIL - if (MAGIC2 != *(unsigned long *)((char *)ptr + size)) { - /* Diagnostic */ -#ifdef FATALERRORS - XfreeTrap(); - FatalError("Xalloc error: Tail corrupt in Xfree() for medium block (adr=0x%x, val=0x%x)\n",(char *)ptr + size,*(unsigned long *)((char *)ptr + size)); -#else - ErrorF("Xalloc error: Tail corrupt in Xfree() for medium block (adr=0x%x, val=0x%x)\n",(char *)ptr + size,*(unsigned long *)((char *)ptr + size)); - XfreeTrap(); -#endif - LOG_FREE("Xalloc error: Tail corrupt in Xfree() for medium block", ptr); - return; - } -#endif /* SIZE_TAIL */ - -#ifdef XFREE_ERASES - memset(pheader,0xF0,size+SIZE_HEADER); -#endif /* XFREE_ERASES */ -#ifdef XALLOC_DEBUG - pheader[1] = MAGIC_FREE; -#endif - - LOG_FREE("Xfree", ptr); - free((char *)pheader); - } -} - -void -OsInitAllocator (void) -{ - static Bool beenhere = FALSE; - - if (beenhere) - return; - beenhere = TRUE; - -#if defined(HAS_MMAP_ANON) || defined (MMAP_DEV_ZERO) - pagesize = -1; -#if defined(_SC_PAGESIZE) || defined(HAS_SC_PAGESIZE) - pagesize = sysconf(_SC_PAGESIZE); -#endif -#ifdef _SC_PAGE_SIZE - if (pagesize == -1) - pagesize = sysconf(_SC_PAGE_SIZE); -#endif -#ifdef HAS_GETPAGESIZE - if (pagesize == -1) - pagesize = getpagesize(); -#endif -#ifdef PAGE_SIZE - if (pagesize == -1) - pagesize = PAGE_SIZE; -#endif - if (pagesize == -1) - FatalError("OsInitAllocator: Cannot determine page size\n"); -#endif - - /* set up linked lists of free blocks */ - bzero ((char *) free_lists, MAX_SMALL/SIZE_STEPS*sizeof(unsigned long *)); - -#ifdef MMAP_DEV_ZERO - /* open /dev/zero on systems that have mmap, but not MAP_ANON */ - if (devzerofd < 0) { - if ((devzerofd = open("/dev/zero", O_RDWR, 0)) < 0) - FatalError("OsInitAllocator: Cannot open /dev/zero (errno=%d)\n", - errno); - } -#endif - -#ifdef XALLOC_LOG - /* reset the log file to zero length */ - { - FILE *f; - f = fopen(XALLOC_LOG_FILE, "w"); - if (NULL!=f) - fclose(f); - } -#endif -} - -#else /* !INTERNAL_MALLOC */ -/* This is to avoid an empty .o */ -static int no_internal_xalloc; -#endif /* INTERNAL_MALLOC */ From e1ff14a9246e12d42ce8ca5afbe3b957333a5620 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 15 Nov 2007 14:45:49 -0500 Subject: [PATCH 237/454] Delete some dead code in X -configure. --- hw/xfree86/common/xf86Configure.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 0cf445cdb..536f89700 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -372,9 +372,6 @@ configureDeviceSection (int screennum) char identifier[16]; OptionInfoPtr p; int i = 0; -#ifdef DO_FBDEV_PROBE - Bool foundFBDEV = FALSE; -#endif parsePrologue (XF86ConfDevicePtr, XF86ConfDeviceRec) /* Move device info to parser structure */ @@ -443,32 +440,6 @@ configureDeviceSection (int screennum) } } -#ifdef DO_FBDEV_PROBE - /* Crude mechanism to auto-detect fbdev (os dependent) */ - /* Skip it for now. Options list it anyway, and we can't - * determine which screen/driver this belongs too anyway. */ - { - int fd; - - fd = open("/dev/fb0", 0); - if (fd != -1) { - foundFBDEV = TRUE; - close(fd); - } - } - - if (foundFBDEV) { - XF86OptionPtr fbdev; - - fbdev = xf86confmalloc(sizeof(XF86OptionRec)); - memset((XF86OptionPtr)fbdev,0,sizeof(XF86OptionRec)); - fbdev->opt_name = "UseFBDev"; - fbdev->opt_val = "ON"; - ptr->dev_option_lst = (XF86OptionPtr)xf86addListItem( - (glp)ptr->dev_option_lst, (glp)fbdev); - } -#endif - return ptr; } From 6bc50de02108f822977fc7545da81fce95ea7ff4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 15 Nov 2007 15:03:58 -0500 Subject: [PATCH 238/454] Simplify system resource range setup. osRes only existed to get copied into Acc. Waste of effort. --- hw/xfree86/common/xf86Bus.c | 23 +++-------------------- hw/xfree86/common/xf86Bus.h | 1 - 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 3dc08f8a2..599f7a46e 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -75,7 +75,6 @@ static resPtr AccReducers = NULL; /* resource lists */ resPtr Acc = NULL; -resPtr osRes = NULL; /* predefined special resources */ _X_EXPORT resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END}; @@ -1357,28 +1356,12 @@ xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex) void xf86ResourceBrokerInit(void) { -#if 0 - resPtr resPci; -#endif - - osRes = NULL; + Acc = NULL; /* Get the ranges used exclusively by the system */ - osRes = xf86AccResFromOS(osRes); - xf86MsgVerb(X_INFO, 3, "OS-reported resource ranges:\n"); - xf86PrintResList(3, osRes); - - /* Bus dep initialization */ -#if 0 - resPci = ResourceBrokerInitPci(&osRes); - Acc = xf86JoinResLists(xf86DupResList(osRes), resPci); -#else - Acc = xf86DupResList( osRes ); -#endif - - xf86MsgVerb(X_INFO, 3, "All system resource ranges:\n"); + Acc = xf86AccResFromOS(Acc); + xf86MsgVerb(X_INFO, 3, "System resource ranges:\n"); xf86PrintResList(3, Acc); - } #define MEM_ALIGN (1024 * 1024) diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h index 5ea5cc8e1..489ee3459 100644 --- a/hw/xfree86/common/xf86Bus.h +++ b/hw/xfree86/common/xf86Bus.h @@ -132,7 +132,6 @@ extern int xf86NumEntities; extern xf86AccessRec AccessNULL; extern BusRec primaryBus; extern resPtr Acc; -extern resPtr osRes; extern resPtr ResRange; extern BusAccPtr xf86BusAccInfo; From f797c96845a3fab37cda6839ebecf9ac5401fd6e Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Thu, 15 Nov 2007 12:12:02 -0800 Subject: [PATCH 239/454] Save pixmap allocation hints into the PixmapRec. --- afb/afbpixmap.c | 1 + cfb/cfbpixmap.c | 1 + fb/fb.h | 3 ++- fb/fb24_32.c | 2 +- fb/fbpixmap.c | 7 +++++-- hw/dmx/dmxpixmap.c | 1 + hw/xfree86/xf4bpp/ppcPixmap.c | 1 + hw/xgl/xglpixmap.c | 1 + hw/xnest/Pixmap.c | 1 + hw/xwin/winpixmap.c | 1 + include/pixmapstr.h | 1 + mfb/mfbpixmap.c | 1 + 12 files changed, 17 insertions(+), 4 deletions(-) diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c index d15d86114..c6196182d 100644 --- a/afb/afbpixmap.c +++ b/afb/afbpixmap.c @@ -105,6 +105,7 @@ afbCreatePixmap(pScreen, width, height, depth, usage_hint) pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = datasize ? (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; + pPixmap->usage_hint = usage_hint; return(pPixmap); } diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index a7be7cc1b..f5a9a41ef 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -99,6 +99,7 @@ cfbCreatePixmap (pScreen, width, height, depth, usage_hint) pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = datasize ? (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; + pPixmap->usage_hint = usage_hint; return pPixmap; } diff --git a/fb/fb.h b/fb/fb.h index 380e2e118..5c01c56c8 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -1621,7 +1621,8 @@ fbPictureInit (ScreenPtr pScreen, */ PixmapPtr -fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp); +fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp, + unsigned usage_hint); PixmapPtr fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth, diff --git a/fb/fb24_32.c b/fb/fb24_32.c index 00b739b25..a03726b8d 100644 --- a/fb/fb24_32.c +++ b/fb/fb24_32.c @@ -548,7 +548,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel) pOldTile->drawable.width, pOldTile->drawable.height, pOldTile->drawable.depth, - bitsPerPixel); + bitsPerPixel, 0); if (!pNewTile) return 0; fbGetDrawable (&pOldTile->drawable, diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c index cddab3ee3..b9c93ea96 100644 --- a/fb/fbpixmap.c +++ b/fb/fbpixmap.c @@ -29,7 +29,8 @@ #include "fb.h" PixmapPtr -fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) +fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp, + unsigned usage_hint) { PixmapPtr pPixmap; size_t datasize; @@ -76,6 +77,8 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) pPixmap->screen_y = 0; #endif + pPixmap->usage_hint = usage_hint; + return pPixmap; } @@ -89,7 +92,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth, if (bpp == 32 && depth <= 24) bpp = fbGetScreenPrivate(pScreen)->pix32bpp; #endif - return fbCreatePixmapBpp (pScreen, width, height, depth, bpp); + return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint); } Bool diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c index acc08c38a..29162f971 100644 --- a/hw/dmx/dmxpixmap.c +++ b/hw/dmx/dmxpixmap.c @@ -116,6 +116,7 @@ PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, pPixmap->drawable.height = height; pPixmap->devKind = PixmapBytePad(width, bpp); pPixmap->refcnt = 1; + pPixmap->usage_hint = usage_hint; pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap); pPixPriv->pixmap = (Pixmap)0; diff --git a/hw/xfree86/xf4bpp/ppcPixmap.c b/hw/xfree86/xf4bpp/ppcPixmap.c index 241217bf4..73524c3fc 100644 --- a/hw/xfree86/xf4bpp/ppcPixmap.c +++ b/hw/xfree86/xf4bpp/ppcPixmap.c @@ -123,6 +123,7 @@ xf4bppCreatePixmap( pScreen, width, height, depth, usage_hint ) pPixmap->devPrivate.ptr = (pointer) (((CARD8*)pPixmap) + pScreen->totalPixmapSize); bzero( (char *) pPixmap->devPrivate.ptr, size ) ; + pPixmap->usage_hint = usage_hint; return pPixmap ; } diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c index 8c54d64fc..fe2a7b1c0 100644 --- a/hw/xgl/xglpixmap.c +++ b/hw/xgl/xglpixmap.c @@ -254,6 +254,7 @@ xglCreatePixmap (ScreenPtr pScreen, pPixmap->devKind = 0; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = 0; + pPixmap->usage_hint = usage_hint; pPixmapPriv = XGL_GET_PIXMAP_PRIV (pPixmap); diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index 1f420015a..922975262 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -58,6 +58,7 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, pPixmap->devKind = PixmapBytePad(width, depth); pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr = (pointer)((char *)pPixmap + pScreen->totalPixmapSize); + pPixmap->usage_hint = usage_hint; if (width && height) xnestPixmapPriv(pPixmap)->pixmap = XCreatePixmap(xnestDisplay, diff --git a/hw/xwin/winpixmap.c b/hw/xwin/winpixmap.c index 994eeb89a..07020eee0 100644 --- a/hw/xwin/winpixmap.c +++ b/hw/xwin/winpixmap.c @@ -98,6 +98,7 @@ winCreatePixmapNativeGDI (ScreenPtr pScreen, pPixmap->devKind = 0; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = NULL; + pPixmap->usage_hint = usage_hint; /* Pixmap privates are allocated by AllocatePixmap */ pPixmapPriv = winGetPixmapPriv (pPixmap); diff --git a/include/pixmapstr.h b/include/pixmapstr.h index 459488226..dc03cf202 100644 --- a/include/pixmapstr.h +++ b/include/pixmapstr.h @@ -90,6 +90,7 @@ typedef struct _Pixmap { short screen_x; short screen_y; #endif + unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */ } PixmapRec; #endif /* PIXMAPSTRUCT_H */ diff --git a/mfb/mfbpixmap.c b/mfb/mfbpixmap.c index 438e9ab57..377398534 100644 --- a/mfb/mfbpixmap.c +++ b/mfb/mfbpixmap.c @@ -104,6 +104,7 @@ mfbCreatePixmap (pScreen, width, height, depth, usage_hint) pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = datasize ? (pointer)((char *)pPixmap + pScreen->totalPixmapSize) : NULL; + pPixmap->usage_hint = usage_hint; return pPixmap; } From 8d0cd1cd2c57ee5a2fc4d577d8182d66369f0617 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Thu, 15 Nov 2007 12:16:36 -0800 Subject: [PATCH 240/454] Fix a really dumb typo. --- include/scrnintstr.h | 2 +- render/render.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 383ee80e1..bad0e51a9 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -202,7 +202,7 @@ typedef void (* ClipNotifyProcPtr)( /* pixmap will be the backing pixmap for a redirected window */ #define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2 /* pixmap will contain a glyph */ -#define CREATE_PIMXAP_USAGE_GLYPH_PICTURE 3 +#define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3 typedef PixmapPtr (* CreatePixmapProcPtr)( ScreenPtr /*pScreen*/, diff --git a/render/render.c b/render/render.c index 3a9d24a02..ca6e62f50 100644 --- a/render/render.c +++ b/render/render.c @@ -1203,7 +1203,7 @@ ProcRenderAddGlyphs (ClientPtr client) pDstPix = (pScreen->CreatePixmap) (pScreen, width, height, depth, - CREATE_PIMXAP_USAGE_GLYPH_PICTURE); + CREATE_PIXMAP_USAGE_GLYPH_PICTURE); GlyphPicture (glyph)[screen] = pDst = CreatePicture (0, &pDstPix->drawable, From 70e50fa51f05663f289eeeea4521e737e8e24bca Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 15 Nov 2007 17:00:37 -0500 Subject: [PATCH 241/454] Allocate RRCrtcRecs with calloc. --- randr/rrcrtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 43cfb2923..4a7275bbf 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -72,7 +72,7 @@ RRCrtcCreate (ScreenPtr pScreen, void *devPrivate) return FALSE; pScrPriv->crtcs = crtcs; - crtc = xalloc (sizeof (RRCrtcRec)); + crtc = xcalloc (1, sizeof (RRCrtcRec)); if (!crtc) return NULL; crtc->id = FakeClientID (0); From 20fd4783247b1b93d9675dc36768dd1ed59ba2d3 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 15 Nov 2007 17:01:33 -0500 Subject: [PATCH 242/454] Small static cleanups on dix/ --- dix/atom.c | 2 -- dix/dispatch.c | 4 ++-- dix/events.c | 4 ++-- include/dix.h | 13 ------------- 4 files changed, 4 insertions(+), 19 deletions(-) diff --git a/dix/atom.c b/dix/atom.c index 6ae3e31df..c968c1e5a 100644 --- a/dix/atom.c +++ b/dix/atom.c @@ -209,5 +209,3 @@ InitAtoms(void) if (lastAtom != XA_LAST_PREDEFINED) AtomError (); } - - diff --git a/dix/dispatch.c b/dix/dispatch.c index 8c76eb12e..c356aed30 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -249,7 +249,7 @@ UpdateCurrentTimeIf(void) currentTime = systime; } -void +static void InitSelections(void) { if (CurrentSelections) @@ -3836,7 +3836,7 @@ ProcInitialConnection(ClientPtr client) return (client->noClientException); } -int +static int SendConnSetup(ClientPtr client, char *reason) { xWindowRoot *root; diff --git a/dix/events.c b/dix/events.c index 12c299a3b..85f42b31e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1184,7 +1184,7 @@ FreezeThaw(DeviceIntPtr dev, Bool frozen) dev->public.processInputProc = dev->public.realInputProc; } -void +static void ComputeFreezes(void) { DeviceIntPtr replayDev = syncEvents.replayDev; @@ -1268,7 +1268,7 @@ ScreenRestructured (ScreenPtr pScreen) } #endif -void +static void CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) { GrabPtr grab = thisDev->grab; diff --git a/include/dix.h b/include/dix.h index 6a67d14dd..c987548bf 100644 --- a/include/dix.h +++ b/include/dix.h @@ -158,8 +158,6 @@ extern void UpdateCurrentTime(void); extern void UpdateCurrentTimeIf(void); -extern void InitSelections(void); - extern void FlushClientCaches(XID /*id*/); extern int dixDestroyPixmap( @@ -187,10 +185,6 @@ extern void DeleteWindowFromAnySelections( extern void MarkClientException( ClientPtr /*client*/); -extern int SendConnSetup( - ClientPtr /*client*/, - char* /*reason*/); - #if defined(DDXBEFORERESET) extern void ddxBeforeReset (void); #endif @@ -362,13 +356,6 @@ extern void EnqueueEvent( DeviceIntPtr /* device */, int /* count */); -extern void ComputeFreezes(void); - -extern void CheckGrabForSyncs( - DeviceIntPtr /* dev */, - Bool /* thisMode */, - Bool /* otherMode */); - extern void ActivatePointerGrab( DeviceIntPtr /* mouse */, GrabPtr /* grab */, From 514ba4ca727f0b1076bc67500617722203d34daa Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 16 Nov 2007 19:53:11 -0500 Subject: [PATCH 243/454] Bug #1612: Use a stronger PRNG. Currently just reads from /dev/urandom, and only on Linux. --- configure.ac | 6 ++++++ include/dix-config.h.in | 3 +++ os/auth.c | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/configure.ac b/configure.ac index 35b7f0ffc..7d43216c8 100644 --- a/configure.ac +++ b/configure.ac @@ -175,6 +175,12 @@ fi AC_CHECK_FUNC([dlopen], [], AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl")) +case $host_os in + linux*) + AC_DEFINE(HAVE_URANDOM, 1, [Has /dev/urandom]) ;; + *) ;; +esac + dnl Checks for library functions. AC_FUNC_VPRINTF AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \ diff --git a/include/dix-config.h.in b/include/dix-config.h.in index d105e511c..d0333878f 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -240,6 +240,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Have /dev/urandom */ +#undef HAVE_URANDOM + /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF diff --git a/os/auth.c b/os/auth.c index b2a145f89..fa3ba7924 100644 --- a/os/auth.c +++ b/os/auth.c @@ -325,6 +325,20 @@ GenerateAuthorization( return -1; } +#ifdef HAVE_URANDOM + +void +GenerateRandomData (int len, char *buf) +{ + int fd; + + fd = open("/dev/urandom", O_RDONLY); + read(fd, buf, len); + close(fd); +} + +#else /* !HAVE_URANDOM */ + /* A random number generator that is more unpredictable than that shipped with some systems. This code is taken from the C standard. */ @@ -362,4 +376,6 @@ GenerateRandomData (int len, char *buf) /* XXX add getrusage, popen("ps -ale") */ } +#endif /* HAVE_URANDOM */ + #endif /* XCSECURITY */ From c89b543198d5ec56ff025bdd6bb7229523478e58 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 17 Nov 2007 18:20:49 +1000 Subject: [PATCH 244/454] exa: set driverPriv to NULL before it might get used later with garbage --- exa/exa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exa/exa.c b/exa/exa.c index 1f85d8ef0..4ed1a1ad3 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -257,6 +257,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); + pExaPixmap->driverPriv = NULL; bpp = pPixmap->drawable.bitsPerPixel; From a969db091cab16a448f82782e85b3dd19c81627a Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 17 Nov 2007 22:34:47 +0100 Subject: [PATCH 245/454] XKB: Don't ring the bell when we don't have a BellProc (bug #13246) --- xkb/xkbEvents.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index e11b60918..bf3e828f3 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -405,7 +405,8 @@ XID winID = 0; if ((force||(xkbi->desc->ctrls->enabled_ctrls&XkbAudibleBellMask))&& (!eventOnly)) { - (*kbd->kbdfeed->BellProc)(percent,kbd,(pointer)pCtrl,class); + if (kbd->kbdfeed->BellProc) + (*kbd->kbdfeed->BellProc)(percent,kbd,(pointer)pCtrl,class); } interest = kbd->xkb_interest; if ((!interest)||(force)) From 748cfbc820f8cdeb544c54a6db495fecf2e2457b Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sat, 17 Nov 2007 21:23:05 -0500 Subject: [PATCH 246/454] Disinfect mi/ of mfb. --- mi/mipushpxl.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/mi/mipushpxl.c b/mi/mipushpxl.c index 3695f30da..6fc57db11 100644 --- a/mi/mipushpxl.c +++ b/mi/mipushpxl.c @@ -53,11 +53,26 @@ SOFTWARE. #include "scrnintstr.h" #include "pixmapstr.h" #include "regionstr.h" -#include "../mfb/maskbits.h" #include "mi.h" +#include "servermd.h" #define NPT 128 +/* These were stolen from mfb. They don't really belong here. */ +#define LONG2CHARSSAMEORDER(x) ((MiBits)(x)) +#define LONG2CHARSDIFFORDER( x ) ( ( ( ( x ) & (MiBits)0x000000FF ) << 0x18 ) \ + | ( ( ( x ) & (MiBits)0x0000FF00 ) << 0x08 ) \ + | ( ( ( x ) & (MiBits)0x00FF0000 ) >> 0x08 ) \ + | ( ( ( x ) & (MiBits)0xFF000000 ) >> 0x18 ) ) + + +#define PGSZB 4 +#define PPW (PGSZB<<3) /* assuming 8 bits per byte */ +#define PGSZ PPW +#define PLST (PPW-1) +#define PIM PLST +#define PWSH 5 + /* miPushPixels -- squeegees the fill style of pGC through pBitMap * into pDrawable. pBitMap is a stencil (dx by dy of it is used, it may * be bigger) which is placed on the drawable at xOrg, yOrg. Where a 1 bit @@ -94,7 +109,7 @@ miPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg) DDXPointRec pt[NPT], ptThisLine; int width[NPT]; #if 1 - PixelType startmask; + MiBits startmask; if (screenInfo.bitmapBitOrder == IMAGE_BYTE_ORDER) if (screenInfo.bitmapBitOrder == LSBFirst) startmask = (MiBits)(-1) ^ From d15339a92c4d689d2ab8a86e4f10107f3e45eff8 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sat, 17 Nov 2007 22:12:10 -0500 Subject: [PATCH 247/454] Bug #9725: Don't look in root's $HOME for config files, that's just confusing. --- hw/xfree86/common/xf86Config.c | 1 - hw/xfree86/parser/cpconfig.c | 2 +- hw/xfree86/parser/scan.c | 9 --------- hw/xfree86/utils/xorgcfg/config.h | 1 - hw/xwin/winconfig.c | 1 - 5 files changed, 1 insertion(+), 13 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index e74c590ee..f58e2a70f 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -93,7 +93,6 @@ extern DeviceAssocRec mouse_assoc; "/etc/X11/%R," "%P/etc/X11/%R," \ "%E," "%F," \ "/etc/X11/%F," "%P/etc/X11/%F," \ - "%D/%X," \ "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \ "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ "%P/etc/X11/%X," \ diff --git a/hw/xfree86/parser/cpconfig.c b/hw/xfree86/parser/cpconfig.c index 46a5a8b56..0347f7d2a 100644 --- a/hw/xfree86/parser/cpconfig.c +++ b/hw/xfree86/parser/cpconfig.c @@ -62,7 +62,7 @@ xrealloc (void *p, int size) #endif #define CONFPATH "%A,%R,/etc/X11/%R,%P/etc/X11/%R,%E,%F,/etc/X11/%F," \ - "%P/etc/X11/%F,%D/%X,/etc/X11/%X,/etc/%X,%P/etc/X11/%X.%H," \ + "%P/etc/X11/%F,/etc/X11/%X,/etc/%X,%P/etc/X11/%X.%H," \ "%P/etc/X11/%X,%P/lib/X11/%X.%H,%P/lib/X11/%X" int diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c index e7989d107..36061c889 100644 --- a/hw/xfree86/parser/scan.c +++ b/hw/xfree86/parser/scan.c @@ -558,7 +558,6 @@ xf86pathIsSafe(const char *path) * %E config file environment ($XORGCONFIG) as an absolute path * %F config file environment ($XORGCONFIG) as a relative path * %G config file environment ($XORGCONFIG) as a safe path - * %D $HOME * %P projroot * %M major version number * %% % @@ -703,14 +702,6 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, } else BAIL_OUT; break; - case 'D': - if (!home) - home = getenv("HOME"); - if (home && xf86pathIsAbsolute(home)) - APPEND_STR(home); - else - BAIL_OUT; - break; case 'P': if (projroot && xf86pathIsAbsolute(projroot)) APPEND_STR(projroot); diff --git a/hw/xfree86/utils/xorgcfg/config.h b/hw/xfree86/utils/xorgcfg/config.h index b5baba465..ea12e8879 100644 --- a/hw/xfree86/utils/xorgcfg/config.h +++ b/hw/xfree86/utils/xorgcfg/config.h @@ -101,7 +101,6 @@ extern int config_mode; "/etc/X11/%R," "%P/etc/X11/%R," \ "%E," "%F," \ "/etc/X11/%F," "%P/etc/X11/%F," \ - "%D/%X," \ "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \ "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ "%P/etc/X11/%X," \ diff --git a/hw/xwin/winconfig.c b/hw/xwin/winconfig.c index a68ead266..38966bf96 100644 --- a/hw/xwin/winconfig.c +++ b/hw/xwin/winconfig.c @@ -49,7 +49,6 @@ "/etc/X11/%R," "%P/etc/X11/%R," \ "%E," "%F," \ "/etc/X11/%F," "%P/etc/X11/%F," \ - "%D/%X," \ "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \ "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ "%P/etc/X11/%X," \ From fac7e7e4e1809e865b9b3cf5b7eb69ba9d3a3759 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 18 Nov 2007 11:39:26 -0500 Subject: [PATCH 248/454] Document the requirement for interleaved code and declarations. --- doc/c-extensions | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/c-extensions b/doc/c-extensions index db2ba7d77..e1b222b9f 100644 --- a/doc/c-extensions +++ b/doc/c-extensions @@ -30,3 +30,4 @@ The server will not build if your toolchain does not support these extensions. struct foo bar = { .baz = quux, .brian = "dog" }; * variadic macros: macros with a variable number of arguments, e.g.: #define DebugF(x, ...) /**/ + * interleaved code and declarations: { foo = TRUE; int bar; do_stuff(); } From a46c30c3be33ffb304a885503c8aaa78396ed3d9 Mon Sep 17 00:00:00 2001 From: Jernej Azarija Date: Sun, 18 Nov 2007 11:44:36 -0500 Subject: [PATCH 249/454] Bug #12531: RRModesForScreen can fail to allocate. --- randr/rrmode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/randr/rrmode.c b/randr/rrmode.c index 11175810c..f060d2294 100644 --- a/randr/rrmode.c +++ b/randr/rrmode.c @@ -165,6 +165,8 @@ RRModesForScreen (ScreenPtr pScreen, int *num_ret) int num_screen_modes = 0; screen_modes = xalloc ((num_modes ? num_modes : 1) * sizeof (RRModePtr)); + if (!screen_modes) + return NULL; /* * Add modes from all outputs From ee2d4626dca6e0d4fc6f524e5de4bdefa2ed43df Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Sun, 18 Nov 2007 11:56:31 -0500 Subject: [PATCH 250/454] Bug #12932: Use DEFAULT_DPI in randr1.2 instead of hardcoded 96. --- hw/xfree86/modes/xf86Crtc.c | 6 +++--- hw/xfree86/modes/xf86RandR12.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index bb416fddc..dc49861d4 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -704,9 +704,9 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height) mm_height = output->mm_height; if (!mm_height) - mm_height = 203; /* 768 pixels at 96dpi */ + mm_height = (768 * 25.4) / DEFAULT_DPI; /* - * Pick a mode closest to 96dpi + * Pick a mode closest to DEFAULT_DPI */ for (mode = output->probed_modes; mode; mode = mode->next) { @@ -721,7 +721,7 @@ xf86DefaultMode (xf86OutputPtr output, int width, int height) /* yes, use VDisplay here, not xf86ModeHeight */ dpi = (mode->VDisplay * 254) / (mm_height * 10); - diff = dpi - 96; + diff = dpi - DEFAULT_DPI; diff = diff < 0 ? -diff : diff; if (target_mode == NULL || (preferred > target_preferred) || (preferred == target_preferred && diff < target_diff)) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index fe21717f1..c1a06b296 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -450,10 +450,10 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) else { /* - * Otherwise, just set the screen to 96dpi + * Otherwise, just set the screen to DEFAULT_DPI */ - mmWidth = width * 25.4 / 96; - mmHeight = height * 25.4 / 96; + mmWidth = width * 25.4 / DEFAULT_DPI; + mmHeight = height * 25.4 / DEFAULT_DPI; } } xf86DrvMsg(pScrn->scrnIndex, X_INFO, From db9ae863536fff80b5463d99e71dc47ae587980d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 18 Nov 2007 11:57:01 -0500 Subject: [PATCH 251/454] Bump DEFAULT_DPI to 96. 75 is just nonsense. --- hw/xfree86/common/xf86Priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index 3da102f5d..4723f5aba 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -120,7 +120,7 @@ extern RootWinPropPtr *xf86RegisteredPropertiesTable; #define DEFAULT_LOG_VERBOSE 3 #endif #ifndef DEFAULT_DPI -#define DEFAULT_DPI 75 +#define DEFAULT_DPI 96 #endif #define DEFAULT_UNRESOLVED TRUE From ea9c63e93b9bb731796e8a8de2d127e6cc720076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 19 Nov 2007 15:53:49 +0100 Subject: [PATCH 252/454] DEFAULT_DPI was undefined here. --- hw/xfree86/modes/xf86Crtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index dc49861d4..653042c85 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -36,6 +36,7 @@ #include "xf86DDC.h" #include "xf86Crtc.h" #include "xf86Modes.h" +#include "xf86Priv.h" #include "xf86RandR12.h" #include "X11/extensions/render.h" #define DPMS_SERVER From a95bb52b4366d85fc049130c60af5c9e727c565b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 19 Nov 2007 16:34:38 -0500 Subject: [PATCH 253/454] 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 254/454] 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 255/454] 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 be0cbe5a330f62cef47fffbc49e83b5e1637b7d0 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 20 Nov 2007 15:39:49 +0100 Subject: [PATCH 256/454] kaa: update kaaCreatePixmap to support the new usage_int --- hw/kdrive/src/kaa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index 9cf9bf201..027163024 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -314,7 +314,7 @@ kaaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) } } - pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp); + pPixmap = fbCreatePixmapBpp (pScreen, w, h, depth, bpp, usage_hint); if (!pPixmap) return NULL; pKaaPixmap = KaaGetPixmapPriv(pPixmap); From 709c1a70c8c6a9e132bf0d92f78a12be72beee51 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 20 Nov 2007 15:18:02 -0500 Subject: [PATCH 257/454] 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 258/454] 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 259/454] 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 260/454] 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 261/454] 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 262/454] 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 263/454] 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 264/454] 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 265/454] 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 266/454] 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 267/454] 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 268/454] 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 269/454] 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 270/454] 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 271/454] 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 272/454] 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 273/454] 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 274/454] 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 275/454] 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 276/454] 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 277/454] 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 278/454] 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 279/454] 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 280/454] 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 281/454] 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 282/454] 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 283/454] 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 284/454] 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 285/454] 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 286/454] 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 287/454] 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 288/454] 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 289/454] 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 290/454] 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 291/454] 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 292/454] 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 293/454] 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 294/454] 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 295/454] 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 296/454] 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 297/454] 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 298/454] 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 299/454] 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 300/454] 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 2f387d913aa76f1b6d21d8e2698be165301c6bc1 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 20 Nov 2007 18:27:12 -0800 Subject: [PATCH 301/454] Enable use of /dev/urandom on Solaris as well --- configure.ac | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 7d43216c8..f8c8fe403 100644 --- a/configure.ac +++ b/configure.ac @@ -172,12 +172,19 @@ b = bswap16(a); fi fi +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. AC_CHECK_FUNC([dlopen], [], AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl")) case $host_os in linux*) AC_DEFINE(HAVE_URANDOM, 1, [Has /dev/urandom]) ;; + solaris*) + # Solaris 8 with patches, or Solaris 9 or later have /dev/urandom + if test -r /dev/urandom ; then + AC_DEFINE(HAVE_URANDOM, 1, [Has /dev/urandom]) + fi ;; *) ;; esac @@ -1314,9 +1321,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" XORG_LIBS="$COMPOSITE_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" -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. - PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS" XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" From a55ec1a9f4b62139dc5e5462d79d47b330c27c79 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 20 Nov 2007 18:31:03 -0800 Subject: [PATCH 302/454] Restore checks for __i386 where needed for Sun compilers on Solaris --- hw/xfree86/os-support/bus/Pci.h | 2 +- hw/xfree86/os-support/solaris/sun_bios.c | 4 ++-- hw/xfree86/os-support/solaris/sun_init.c | 11 ++++------- hw/xfree86/os-support/solaris/sun_vid.c | 12 ++++++------ hw/xfree86/os-support/xf86_OSlib.h | 6 +++--- hw/xfree86/utils/xorgconfig/xorgconfig.c | 2 +- include/servermd.h | 2 +- mi/micoord.h | 2 +- 8 files changed, 19 insertions(+), 22 deletions(-) diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h index 6bd0eb7fc..0abb34f98 100644 --- a/hw/xfree86/os-support/bus/Pci.h +++ b/hw/xfree86/os-support/bus/Pci.h @@ -210,7 +210,7 @@ # define ARCH_PCI_INIT ia64linuxPciInit # endif # define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper -#elif defined(__i386__) +#elif defined(__i386__) || defined(__i386) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit # else diff --git a/hw/xfree86/os-support/solaris/sun_bios.c b/hw/xfree86/os-support/solaris/sun_bios.c index 1223dcd68..1fae9759c 100644 --- a/hw/xfree86/os-support/solaris/sun_bios.c +++ b/hw/xfree86/os-support/solaris/sun_bios.c @@ -26,7 +26,7 @@ #include #endif -#ifdef __i386__ +#if defined(__i386__) || defined(__i386) #define _NEED_SYSI86 #endif #include "xf86.h" @@ -66,7 +66,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, Offset += Base & (psize - 1); Base &= ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1); -#if defined(__i386__) && !defined(__SOL8__) +#if (defined(__i386__) || defined(__i386)) && !defined(__SOL8__) if (Base >= 0xA0000 && Base + mlen < 0xFFFFF && xf86Info.vtno >= 0) sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno); else diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c index c7fac524f..1f389cb40 100644 --- a/hw/xfree86/os-support/solaris/sun_init.c +++ b/hw/xfree86/os-support/solaris/sun_init.c @@ -29,7 +29,7 @@ #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" -#if defined(__i386__) || defined(__x86) +#if defined(__i386__) || defined(__i386) || defined(__x86) # include #endif @@ -40,7 +40,7 @@ static int VTnum = -1; static int xf86StartVT = -1; #endif -#if defined(__SOL8__) || !defined(__i386__) +#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386)) static char fb_dev[PATH_MAX] = "/dev/fb"; #else static char fb_dev[PATH_MAX] = "/dev/console"; @@ -209,11 +209,8 @@ xf86CloseConsole(void) #ifdef HAS_USL_VTS struct vt_mode VT; #endif -#if defined(__SOL8__) || !defined(__i386__) - int tmp; -#endif -#if !defined(__i386__) && !defined(__x86) +#if !defined(__i386__) && !defined(__i386) && !defined(__x86) if (!xf86DoProbe && !xf86DoConfigure) { int fd; @@ -332,7 +329,7 @@ xf86ProcessArgument(int argc, char **argv, int i) #endif /* HAS_USL_VTS */ -#if defined(__SOL8__) || !defined(__i386__) +#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386)) if ((i + 1) < argc) { if (!strcmp(argv[i], "-dev")) { diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c index 494b2cfbf..e7b529ccb 100644 --- a/hw/xfree86/os-support/solaris/sun_vid.c +++ b/hw/xfree86/os-support/solaris/sun_vid.c @@ -28,7 +28,7 @@ #include /* get __x86 definition if not set by compiler */ -#if defined(__i386__) || defined(__x86) +#if defined(__i386__) || defined(__i386) || defined(__x86) #define _NEED_SYSI86 #endif #include "xf86.h" @@ -148,14 +148,14 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) /* I/O Permissions section */ /***************************************************************************/ -#if defined(__i386__) || defined(__x86) +#if defined(__i386__) || defined(__i386) || defined(__x86) static Bool ExtendedEnabled = FALSE; #endif _X_EXPORT Bool xf86EnableIO(void) { -#if defined(__i386__) || defined(__x86) +#if defined(__i386__) || defined(__i386) || defined(__x86) if (ExtendedEnabled) return TRUE; @@ -171,7 +171,7 @@ xf86EnableIO(void) _X_EXPORT void xf86DisableIO(void) { -#if defined(__i386__) || defined(__x86) +#if defined(__i386__) || defined(__i386) || defined(__x86) if(!ExtendedEnabled) return; @@ -188,7 +188,7 @@ xf86DisableIO(void) _X_EXPORT Bool xf86DisableInterrupts(void) { -#if defined(__i386__) || defined(__x86) +#if defined(__i386__) || defined(__i386) || defined(__x86) if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0)) return FALSE; @@ -207,7 +207,7 @@ _X_EXPORT Bool xf86DisableInterrupts(void) _X_EXPORT void xf86EnableInterrupts(void) { -#if defined(__i386__) || defined(__x86) +#if defined(__i386__) || defined(__i386) || defined(__x86) if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0)) return; diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h index 662dbaace..77f2253e9 100644 --- a/hw/xfree86/os-support/xf86_OSlib.h +++ b/hw/xfree86/os-support/xf86_OSlib.h @@ -140,7 +140,7 @@ typedef signed long xf86ssize_t; # endif /* SVR4 && !sun */ /* V86SC_IOPL was moved to on Solaris 7 and later */ # if defined(sun) && defined (SVR4) /* Solaris? */ -# if defined(__i386__) || defined(__x86) /* on x86 or x64? */ +# if defined(__i386__) || defined(__i386) || defined(__x86) /* on x86 or x64? */ # if !defined(V86SC_IOPL) /* Solaris 7 or later? */ # include /* Nope */ # endif @@ -148,7 +148,7 @@ typedef signed long xf86ssize_t; # else # include /* Not solaris */ # endif /* sun && i386 && SVR4 */ -# if defined(sun) && (defined (__i386__) || defined(__x86)) && defined (SVR4) +# if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4) # include # endif # endif /* _NEED_SYSI86 */ @@ -224,7 +224,7 @@ typedef signed long xf86ssize_t; # define POSIX_TTY # endif -# if defined(sun) && defined (__i386__) && defined (SVR4) && !defined(__SOL8__) +# if defined(sun) && (defined (__i386__) || defined(__i386)) && defined (SVR4) && !defined(__SOL8__) # define USE_VT_SYSREQ # define VT_SYSREQ_DEFAULT TRUE # endif diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c index efabc9d1f..30eb83182 100644 --- a/hw/xfree86/utils/xorgconfig/xorgconfig.c +++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c @@ -631,7 +631,7 @@ mouse_configuration(void) { config_emulate3buttons = 0; printf("\n"); -#if (defined(sun) && (defined(__i386__) || defined(__x86))) +#if (defined(sun) && (defined(__i386) || defined(__x86))) /* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse, but PS/2 mice default to /dev/kdmouse */ if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) { diff --git a/include/servermd.h b/include/servermd.h index 2616bfed6..2f511dabe 100644 --- a/include/servermd.h +++ b/include/servermd.h @@ -444,7 +444,7 @@ SOFTWARE. #endif /* luna */ -#if (defined(SVR4) && defined(__i386__)) || \ +#if (defined(SVR4) && (defined(__i386__) || (defined(__i386)))) || \ defined(__alpha__) || defined(__alpha) || \ defined(__i386__) || defined(__QNX__) || \ defined(__s390x__) || defined(__s390__) diff --git a/mi/micoord.h b/mi/micoord.h index 16a244b96..16d086117 100644 --- a/mi/micoord.h +++ b/mi/micoord.h @@ -46,7 +46,7 @@ #if defined(mips) || defined(sgi) || \ defined(sparc) || defined(__sparc64__) || \ defined(__alpha) || defined(__alpha__) || \ - defined(__i386__) || defined(__ia64__) || \ + defined(__i386__) || defined(__i386) || defined(__ia64__) || \ defined(__s390x__) || defined(__s390__) || \ defined(__amd64__) || defined(amd64) || defined(__amd64) #define GetHighWord(x) (((int) (x)) >> 16) From bcbaf2a0ce34b6c5e41d2831b8b87dbd0617a89b Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 21 Nov 2007 19:51:14 -0800 Subject: [PATCH 303/454] Darwin: Dead code removal, Code cleanup, Added launcher Imported changes from xorg-server-1.2-apple to make master more current wrt file layout, build system changes, and dead code removal. --- GL/Makefile.am | 8 +- GL/apple/Makefile.am | 11 +- configure.ac | 219 +- dix/main.c | 2 +- hw/Makefile.am | 12 +- hw/darwin/Makefile.am | 336 +-- hw/darwin/README.apple | 35 - hw/darwin/XDarwin.man | 203 -- hw/darwin/{apple => }/Xquartz.man | 0 hw/darwin/apple/X11.xcodeproj/project.pbxproj | 49 +- hw/darwin/bundle/Dutch.lproj/Credits.rtf | 168 -- .../bundle/Dutch.lproj/Localizable.strings | Bin 1426 -> 0 bytes .../Dutch.lproj/MainMenu.nib/classes.nib | 72 - .../Dutch.lproj/MainMenu.nib/objects.nib | Bin 22024 -> 0 bytes hw/darwin/bundle/Dutch.lproj/Makefile.am | 35 - .../bundle/Dutch.lproj/XDarwinHelp.html.cpp | 101 - hw/darwin/bundle/English.lproj/Credits.rtf | 168 -- .../English.lproj/InfoPlist.strings.cpp | 4 - .../bundle/English.lproj/Localizable.strings | 22 - .../English.lproj/MainMenu.nib/classes.nib | 72 - .../English.lproj/MainMenu.nib/objects.nib | Bin 20829 -> 0 bytes hw/darwin/bundle/English.lproj/Makefile.am | 35 - .../bundle/English.lproj/XDarwinHelp.html.cpp | 94 - hw/darwin/bundle/French.lproj/Credits.rtf | 166 -- .../bundle/French.lproj/Localizable.strings | Bin 1492 -> 0 bytes .../French.lproj/MainMenu.nib/classes.nib | 72 - .../French.lproj/MainMenu.nib/objects.nib | Bin 21114 -> 0 bytes hw/darwin/bundle/French.lproj/Makefile.am | 38 - .../bundle/French.lproj/XDarwinHelp.html.cpp | 99 - hw/darwin/bundle/German.lproj/Credits.rtf | 168 -- .../bundle/German.lproj/Localizable.strings | Bin 1458 -> 0 bytes .../German.lproj/MainMenu.nib/classes.nib | 72 - .../German.lproj/MainMenu.nib/objects.nib | Bin 21182 -> 0 bytes hw/darwin/bundle/German.lproj/Makefile.am | 36 - .../bundle/German.lproj/XDarwinHelp.html.cpp | 94 - hw/darwin/bundle/Info.plist | 66 - hw/darwin/bundle/Japanese.lproj/Credits.rtf | 193 -- .../bundle/Japanese.lproj/Localizable.strings | Bin 1152 -> 0 bytes .../Japanese.lproj/MainMenu.nib/classes.nib | 72 - .../Japanese.lproj/MainMenu.nib/objects.nib | Bin 21854 -> 0 bytes hw/darwin/bundle/Japanese.lproj/Makefile.am | 37 - .../Japanese.lproj/XDarwinHelp.html.cpp | 141 - hw/darwin/bundle/Makefile.am | 38 - hw/darwin/bundle/Portuguese.lproj/Credits.rtf | 171 -- .../Portuguese.lproj/Localizable.strings | Bin 1504 -> 0 bytes .../Portuguese.lproj/MainMenu.nib/classes.nib | 72 - .../Portuguese.lproj/MainMenu.nib/objects.nib | Bin 21112 -> 0 bytes hw/darwin/bundle/Portuguese.lproj/Makefile.am | 36 - .../Portuguese.lproj/XDarwinHelp.html.cpp | 209 -- hw/darwin/bundle/Spanish.lproj/Credits.rtf | 168 -- .../bundle/Spanish.lproj/Localizable.strings | Bin 1480 -> 0 bytes .../Spanish.lproj/MainMenu.nib/classes.nib | 72 - .../Spanish.lproj/MainMenu.nib/objects.nib | Bin 20952 -> 0 bytes hw/darwin/bundle/Spanish.lproj/Makefile.am | 36 - .../bundle/Spanish.lproj/XDarwinHelp.html.cpp | 109 - hw/darwin/bundle/Swedish.lproj/Credits.rtf | 168 -- .../bundle/Swedish.lproj/Localizable.strings | Bin 1464 -> 0 bytes .../Swedish.lproj/MainMenu.nib/classes.nib | 72 - .../Swedish.lproj/MainMenu.nib/objects.nib | Bin 20858 -> 0 bytes hw/darwin/bundle/Swedish.lproj/Makefile.am | 36 - .../bundle/Swedish.lproj/XDarwinHelp.html.cpp | 101 - hw/darwin/bundle/XDarwin.icns | Bin 69465 -> 0 bytes hw/darwin/bundle/ko.lproj/Credits.rtf | 168 -- hw/darwin/bundle/ko.lproj/Localizable.strings | Bin 1332 -> 0 bytes .../bundle/ko.lproj/MainMenu.nib/classes.nib | 72 - .../bundle/ko.lproj/MainMenu.nib/objects.nib | Bin 21433 -> 0 bytes hw/darwin/bundle/ko.lproj/Makefile.am | 37 - .../bundle/ko.lproj/XDarwinHelp.html.cpp | 94 - hw/darwin/bundle/startXClients.cpp | 22 - hw/darwin/darwin.c | 42 +- hw/darwin/darwin.h | 3 +- hw/darwin/iokit/Makefile.am | 17 - hw/darwin/iokit/xfIOKit.c | 773 ----- hw/darwin/iokit/xfIOKit.h | 56 - hw/darwin/iokit/xfIOKitCursor.c | 736 ----- hw/darwin/iokit/xfIOKitStartup.c | 131 - hw/darwin/quartz/Makefile.am | 60 +- hw/darwin/{apple => quartz}/X11Application.h | 0 hw/darwin/{apple => quartz}/X11Application.m | 6 +- hw/darwin/{apple => quartz}/X11Controller.h | 0 hw/darwin/{apple => quartz}/X11Controller.m | 0 hw/darwin/quartz/XApplication.h | 46 - hw/darwin/quartz/XApplication.m | 46 - .../quartz/XDarwin.pbproj/project.pbxproj | 2519 ----------------- hw/darwin/quartz/XDarwinStartup.c | 163 -- hw/darwin/quartz/XDarwinStartup.man | 74 - hw/darwin/quartz/XServer.h | 136 - hw/darwin/quartz/XServer.m | 1538 ---------- hw/darwin/quartz/applewm.c | 24 +- hw/darwin/quartz/quartz.c | 19 +- hw/darwin/quartz/quartz.h | 2 - hw/darwin/quartz/quartzCocoa.m | 74 +- hw/darwin/quartz/quartzCommon.h | 5 +- hw/darwin/quartz/quartzStartup.c | 247 +- hw/darwin/quartz/xpr/appledri.c | 2 +- hw/darwin/quartz/xpr/x-hook.c | 1 + hw/darwin/quartz/xpr/xprCursor.c | 3 +- hw/darwin/quartz/xpr/xprScreen.c | 11 +- hw/darwin/utils/Makefile.am | 4 +- include/dix-config.h.in | 3 + mi/miinitext.c | 23 +- miext/rootless/rootlessCommon.h | 4 + miext/rootless/rootlessWindow.h | 3 + 103 files changed, 341 insertions(+), 11011 deletions(-) delete mode 100644 hw/darwin/README.apple delete mode 100644 hw/darwin/XDarwin.man rename hw/darwin/{apple => }/Xquartz.man (100%) delete mode 100644 hw/darwin/bundle/Dutch.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/Dutch.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/Dutch.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/Dutch.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/Dutch.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/English.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp delete mode 100644 hw/darwin/bundle/English.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/English.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/French.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/French.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/French.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/German.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/German.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/German.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/Info.plist delete mode 100644 hw/darwin/bundle/Japanese.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/Japanese.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/Japanese.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/Makefile.am delete mode 100644 hw/darwin/bundle/Portuguese.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/Portuguese.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/Portuguese.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/Spanish.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/Spanish.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/Spanish.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/Spanish.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/Spanish.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/Swedish.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/Swedish.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/Swedish.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/Swedish.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/Swedish.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/XDarwin.icns delete mode 100644 hw/darwin/bundle/ko.lproj/Credits.rtf delete mode 100644 hw/darwin/bundle/ko.lproj/Localizable.strings delete mode 100644 hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib delete mode 100644 hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib delete mode 100644 hw/darwin/bundle/ko.lproj/Makefile.am delete mode 100644 hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp delete mode 100644 hw/darwin/bundle/startXClients.cpp delete mode 100644 hw/darwin/iokit/Makefile.am delete mode 100644 hw/darwin/iokit/xfIOKit.c delete mode 100644 hw/darwin/iokit/xfIOKit.h delete mode 100644 hw/darwin/iokit/xfIOKitCursor.c delete mode 100644 hw/darwin/iokit/xfIOKitStartup.c rename hw/darwin/{apple => quartz}/X11Application.h (100%) rename hw/darwin/{apple => quartz}/X11Application.m (99%) rename hw/darwin/{apple => quartz}/X11Controller.h (100%) rename hw/darwin/{apple => quartz}/X11Controller.m (100%) delete mode 100644 hw/darwin/quartz/XApplication.h delete mode 100644 hw/darwin/quartz/XApplication.m delete mode 100644 hw/darwin/quartz/XDarwin.pbproj/project.pbxproj delete mode 100644 hw/darwin/quartz/XDarwinStartup.c delete mode 100644 hw/darwin/quartz/XDarwinStartup.man delete mode 100644 hw/darwin/quartz/XServer.h delete mode 100644 hw/darwin/quartz/XServer.m diff --git a/GL/Makefile.am b/GL/Makefile.am index 38cef7b39..29d03f2d6 100644 --- a/GL/Makefile.am +++ b/GL/Makefile.am @@ -1,7 +1,9 @@ -if XDARWIN -DARWIN_SUBDIRS = apple +if XQUARTZ +XQUARTZ_SUBDIRS = apple endif -SUBDIRS = glx mesa $(DARWIN_SUBDIRS) + +SUBDIRS = glx mesa $(XQUARTZ_SUBDIRS) +DIST_SUBDIRS = glx mesa apple WINDOWS_EXTRAS = \ windows/ChangeLog \ diff --git a/GL/apple/Makefile.am b/GL/apple/Makefile.am index 2b2d10cbc..6f0b68d5f 100644 --- a/GL/apple/Makefile.am +++ b/GL/apple/Makefile.am @@ -1,8 +1,9 @@ -AM_CFLAGS = -I$(top_srcdir) \ - -I$(top_srcdir)/hw/darwin/quartz \ - -I$(top_srcdir)/GL/glx \ - -I$(top_srcdir)/hw/darwin/quartz/cr \ - -I$(top_srcdir)/GL/include +AM_CPPFLAGS = \ + -I$(top_srcdir) \ + -I$(top_srcdir)/GL/glx \ + -I$(top_srcdir)/GL/include \ + -I$(top_srcdir)/hw/darwin/quartz \ + -I$(top_srcdir)/hw/darwin/quartz/cr if HAVE_AGL_FRAMEWORK noinst_LIBRARIES = libAGLcore.a diff --git a/configure.ac b/configure.ac index f8c8fe403..b81d786f0 100644 --- a/configure.ac +++ b/configure.ac @@ -101,8 +101,6 @@ AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) -AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], []) - dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"]) @@ -470,10 +468,13 @@ 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="${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}" ]. - [ APPLE_APPLICATIONS_DIR="${bindir}/Applications" ]) +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="/Applications/Utilities" ]) + +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" ], @@ -546,10 +547,10 @@ AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no]) AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) -AC_ARG_ENABLE(xdarwin, AS_HELP_STRING([--enable-xdarwin], [Build XDarwin server (default: auto)]), [XDARWIN=$enableval], [XDARWIN=auto]) -AC_ARG_ENABLE(xdarwinapp, AS_HELP_STRING([--enable-xdarwinapp], [Build XDarwin.app server (default: no)]), [XDARWINAPP=$enableval], [XDARWINAPP=no]) -AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--disable-xquartz], [Build Xquartz server on Darwin (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) -AC_ARG_ENABLE(x11app, AS_HELP_STRING([--enable-x11app], [Build Apple's X11.app wrapper for Xquartz (default: no)]), [X11APP=$enableval], [X11APP=no]) +AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) +AC_ARG_ENABLE(x11app, AS_HELP_STRING([--enable-x11app], [Build Apple's X11.app for Xquartz (default: auto)]), [X11APP=$enableval], [X11APP=auto]) +AC_ARG_WITH(x11app-archs, AS_HELP_STRING([--with-x11app-archs=ARCHS], [Architectures to build X11.app for, space delimeted (default: "ppc i386")]), [X11APP_ARCHS=$enableval], [X11APP_ARCHS="ppc i386"]) +AC_SUBST([X11APP_ARCHS]) AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no]) AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no]) @@ -1155,58 +1156,6 @@ dnl --------------------------------------------------------------------------- dnl DDX section. dnl --------------------------------------------------------------------------- -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 $CWRAP_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]) - - dnl Xvfb DDX AC_MSG_CHECKING([whether to build Xvfb DDX]) @@ -1712,35 +1661,25 @@ AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes]) AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) dnl Darwin / OS X DDX -AC_MSG_CHECKING([whether to build XDarwin (Mac OS X) DDX]) -if test "x$XDARWIN" = xauto; then - case $host_os in - darwin*) XDARWIN="yes" ;; - *) XDARWIN="no" ;; - esac +if test "X$XQUARTZ" = Xauto; then + AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[ + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -framework Carbon" + AC_LINK_IFELSE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}], + [xorg_cv_Carbon_framework=yes], + [xorg_cv_Carbon_framework=no]) + LDFLAGS=$save_LDFLAGS]) + + if test "X$xorg_cv_Carbon_framework" = Xyes; then + XQUARTZ=yes + else + XQUARTZ=no + fi fi -AC_MSG_RESULT([$XDARWIN]) -if test "x$XDARWIN" = xyes; then - if test "X$XQUARTZ" = Xauto; then - AC_CACHE_CHECK([for Carbon framework],xorg_cv_Carbon_framework,[ - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -framework Carbon" - AC_LINK_IFELSE([char FSFindFolder(); -int main() { -FSFindFolder(); -return 0;} - ],[xorg_cv_Carbon_framework=yes], - [xorg_cv_Carbon_framework=no]) - LDFLAGS=$save_LDFLAGS]) - if test "X$xorg_cv_Carbon_framework" = Xyes; then - AC_DEFINE([DARWIN_WITH_QUARTZ],[1], - [Have Quartz]) - XQUARTZ=yes - else - XQUARTZ=no - fi - 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 @@ -1755,11 +1694,11 @@ return 0;} # ]) 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 $DARWIN_GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB" + 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} -D__DARWIN__" + CFLAGS="${CFLAGS} -D__DARWIN__ -DROOTLESS_WORKAROUND" PLIST_VERSION_STRING=$PACKAGE_VERSION AC_SUBST([PLIST_VERSION_STRING]) PLIST_VENDOR_WEB=$VENDOR_WEB @@ -1780,7 +1719,38 @@ return 0;} 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 + 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 + 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. OBJC='$(CC)' OBJCLD='$(CCLD)' @@ -1794,9 +1764,59 @@ AC_SUBST([OBJCFLAGS]) _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(XDARWIN, [test "x$XDARWIN" = xyes]) -AM_CONDITIONAL(XDARWINAPP, [test "x$XDARWINAPP" = xyes]) AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes]) +AM_CONDITIONAL(X11APP,[test "X$X11APP" = 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 $CWRAP_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]) dnl kdrive DDX @@ -2144,19 +2164,8 @@ hw/xgl/glxext/module/Makefile hw/xnest/Makefile hw/xwin/Makefile hw/darwin/Makefile -hw/darwin/bundle/Makefile -hw/darwin/bundle/Dutch.lproj/Makefile -hw/darwin/bundle/English.lproj/Makefile -hw/darwin/bundle/French.lproj/Makefile -hw/darwin/bundle/German.lproj/Makefile -hw/darwin/bundle/Japanese.lproj/Makefile -hw/darwin/bundle/Portuguese.lproj/Makefile -hw/darwin/bundle/Spanish.lproj/Makefile -hw/darwin/bundle/Swedish.lproj/Makefile -hw/darwin/bundle/ko.lproj/Makefile -hw/darwin/iokit/Makefile hw/darwin/quartz/Makefile -hw/darwin/utils/Makefile +hw/darwin/quartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ati/Makefile hw/kdrive/chips/Makefile diff --git a/dix/main.c b/dix/main.c index e5c557800..eea7eed3e 100644 --- a/dix/main.c +++ b/dix/main.c @@ -256,10 +256,10 @@ main(int argc, char *argv[], char *envp[]) PrinterInitGlobals(); #endif +#ifdef XQUARTZ /* Quartz support on Mac OS X requires that the Cocoa event loop be in * the main thread. This allows the X server main to be called again * from another thread. */ -#if defined(__DARWIN__) && defined(DARWIN_WITH_QUARTZ) DarwinHandleGUI(argc, argv, envp); #endif diff --git a/hw/Makefile.am b/hw/Makefile.am index 30662ccdd..0e65f7106 100644 --- a/hw/Makefile.am +++ b/hw/Makefile.am @@ -1,10 +1,6 @@ if DMX -if XDARWIN -# Darwin does not need the dmx subdir -else DMX_SUBDIRS = dmx endif -endif if XORG XORG_SUBDIRS = xfree86 @@ -34,19 +30,19 @@ if XPRINT XPRINT_SUBDIRS = xprint endif -if XDARWIN -XDARWIN_SUBDIRS = darwin +if XQUARTZ +XQUARTZ_SUBDIRS = darwin endif SUBDIRS = \ $(XORG_SUBDIRS) \ $(XGL_SUBDIRS) \ $(XWIN_SUBDIRS) \ - $(XDARWIN_SUBDIRS) \ + $(XQUARTZ_SUBDIRS) \ $(XVFB_SUBDIRS) \ $(XNEST_SUBDIRS) \ $(DMX_SUBDIRS) \ - $(KDRIVE_SUBDIRS) \ + $(KDRIVE_SUBDIRS) \ $(XPRINT_SUBDIRS) DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl xprint diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index 71b976777..cd3f7f47b 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -1,290 +1,106 @@ -noinst_LIBRARIES = libdarwinShared.a -libdarwin_XINPUT_SRCS = darwinXinput.c +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) \ + -DINXQUARTZ \ + -DUSE_NEW_CLUT \ + -DXFree86Server \ + -I$(top_srcdir)/miext/rootless -AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -AM_CPPFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -INCLUDES = @XORG_INCS@ -I../../miext/rootless +SUBDIRS = quartz utils -DEFS = @DEFS@ -DUSE_NEW_CLUT - -if XQUARTZ -XQUARTZ_SUBDIRS = quartz -XQUARTZ_PROGS = Xquartz -XQUARTZ_HOOK = xquartz-install-hook -endif - -if XDARWINAPP -XDARWINAPP_SUBDIRS = bundle -XDARWINAPP_HOOK = xdarwinapp-install-hook -endif - -SUBDIRS = \ - iokit \ - $(XQUARTZ_SUBDIRS) \ - $(XDARWINAPP_SUBDIRS) \ - utils \ - . - -libdarwinShared_a_SOURCES = darwin.c \ - darwinEvents.c \ - darwinKeyboard.c \ - $(darwin_XINPUT_SRCS) - -# bin_PROGRAMS = XDarwin Xquartz -bin_PROGRAMS = $(XQUARTZ_PROGS) - -#XDarwin_SOURCES = \ -# $(top_srcdir)/fb/fbcmap_mi.c \ -# $(top_srcdir)/mi/miinitext.c \ -# $(top_srcdir)/Xi/stubs.c +bin_PROGRAMS = Xquartz +man1_MANS = Xquartz.man Xquartz_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c \ - $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/Xi/stubs.c \ - apple/X11Application.m \ - apple/X11Controller.m \ - quartz/Preferences.m \ - quartz/applewm.c \ - quartz/keysym2ucs.c \ - quartz/pseudoramiX.c \ - quartz/quartz.c \ - quartz/quartzAudio.c \ - quartz/quartzCocoa.m \ - quartz/quartzKeyboard.c \ - quartz/quartzPasteboard.c \ - quartz/quartzStartup.c \ - quartz/xpr/appledri.c \ - quartz/xpr/dri.c \ - quartz/xpr/xprAppleWM.c \ - quartz/xpr/xprCursor.c \ - quartz/xpr/xprFrame.c \ - quartz/xpr/xprScreen.c \ - quartz/xpr/x-hash.c \ - quartz/xpr/x-hook.c \ - quartz/xpr/x-list.c + darwin.c \ + darwinEvents.c \ + darwinKeyboard.c \ + darwinXinput.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ + $(top_srcdir)/mi/miinitext.c -DARWIN_LIBS = \ +# 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)/config/libconfig.a \ + $(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 \ - @DARWIN_LIBS@ \ + $(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 \ - ./libdarwinShared.a \ - $(XSERVER_LIBS) - -#XDARWIN_LIBS = \ -# $(DARWIN_LIBS) \ -# ./iokit/libiokit.a -XQUARTZ_LIBS = \ - $(DARWIN_LIBS) - -#XDarwin_DEPENDENCIES = $(XDARWIN_LIBS) -#XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS) - -Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS) -Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin - -#XDarwin_LDFLAGS = \ -# -XCClinker -Objc \ -# -Wl,-u,_miDCInitialize \ -# -Wl,-framework,IOKit + $(DARWIN_LIBS) $(XSERVER_LIBS) -lXplugin Xquartz_LDFLAGS = \ - -XCClinker -Objc \ - -Wl,-u,_miDCInitialize \ - -Wl,-framework,Carbon \ - -Wl,-framework,OpenGL \ - -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib \ - -Wl,-framework,Cocoa \ - -Wl,-framework,CoreAudio \ - -Wl,-framework,IOKit + -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 -#XDarwin_CFLAGS = -DINXDARWIN -Xquartz_CFLAGS = -DINXQUARTZ -DHAS_CG_MACH_PORT -DHAS_KL_API -DHAVE_XORG_CONFIG_H - -if XQUARTZ -DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server - -bin_SCRIPTS = x11app +if X11APP +bin_SCRIPTS = x11app x11launcher x11app: - cd apple && xcodebuild CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)" -endif + cd apple && xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)" -if XDARWINAPP -macosdir = $(darwinappdir)/Contents/MacOS +x11launcher: + cd launcher && xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)" -macos_PROGRAMS = XDarwinApp -darwinappdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app +x11app-install: + cd apple && xcodebuild install DSTROOT=$(DESTDIR) INSTALL_PATH=$(prefix) DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" -XDarwinApp_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c \ - $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/Xi/stubs.c +x11launcher-install: + cd launcher && xcodebuild install DSTROOT=$(DESTDIR) INSTALL_PATH=$(APPLE_APPLICATIONS_DIR) DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" -XDARWINAPP_LIBS = \ - $(DARWIN_LIBS) \ - ./quartz/XApplication.o \ - ./libdarwinShared.a \ - ./quartz/libXQuartz.a \ - $(XSERVER_LIBS) +x11app-clean: + rm -rf apple/build -XDarwinApp_DEPENDENCIES = $(XDARWINAPP_LIBS) -XDarwinApp_LDADD = $(XDARWINAPP_LIBS) $(XSERVER_SYS_LIBS) +x11launcher-clean: + rm -rf launcher/build -XDarwinApp_LDFLAGS = \ - -XCClinker -Objc \ - -Wl,-u,_miDCInitialize \ - -Wl,-framework,Carbon \ - -Wl,-framework,ApplicationServices \ - -Wl,-framework,Cocoa \ - -Wl,-framework,CoreAudio \ - -Wl,-framework,IOKit - -XDarwinApp_CFLAGS = -DINXDARWINAPP - -crplugindir = $(darwinappdir)/Contents/Resources/cr.bundle/Contents/MacOS -crplugin_LTLIBRARIES = cr.la -cr_la_SOURCES = \ - quartz/cr/crAppleWM.m \ - quartz/cr/crFrame.m \ - quartz/cr/crScreen.m \ - quartz/fullscreen/quartzCursor.c \ - quartz/cr/XView.m - -cr_la_LIBADD = \ - $(top_builddir)/miext/rootless/librootless.la \ - $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ - $(top_builddir)/miext/rootless/accel/librlAccel.la - -cr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ - -lpixman-1 \ - -Wl,-framework,Cocoa \ - -Wl,-framework,Carbon \ - -XCClinker -ObjC \ - -XCClinker -bundle_loader -XCClinker XDarwinApp \ - -module -avoid-version -no-undefined -cr_la_DEPENDENCIES = XDarwinApp - -fullscreenplugindir = $(darwinappdir)/Contents/Resources/fullscreen.bundle/Contents/MacOS -fullscreenplugin_LTLIBRARIES = fullscreen.la -fullscreen_la_SOURCES = \ - quartz/fullscreen/fullscreen.c \ - quartz/fullscreen/quartzCursor.c - -fullscreen_la_LIBADD = \ - $(top_builddir)/miext/shadow/libshadow.la - -fullscreen_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ - -XCClinker -bundle_loader -XCClinker XDarwinApp \ - -module -avoid-version -no-undefined -fullscreen_la_DEPENDENCIES = XDarwinApp - -if GLX -glxMesaplugindir = $(darwinappdir)/Contents/Resources/glxMesa.bundle/Contents/MacOS -glxMesaplugin_LTLIBRARIES = glxMesa.la -glxMesa_la_SOURCES = -glxMesa_la_LIBADD = \ - $(top_builddir)/GL/glx/libglx.la \ - $(top_builddir)/GL/mesa/libGLcore.la -glxMesa_la_LDFLAGS = -shrext '' \ - -Wl,-framework,AGL \ - -Wl,-framework,OpenGL \ - -XCClinker -ObjC \ - -XCClinker -bundle_loader -XCClinker XDarwinApp \ - -module -avoid-version -no-undefined -glxMesa_la_DEPENDENCIES = XDarwinApp -endif - -if HAVE_XPLUGIN - -xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS -xprplugin_LTLIBRARIES = xpr.la -xpr_la_SOURCES = \ - quartz/xpr/appledri.c \ - quartz/xpr/dri.c \ - quartz/xpr/xprAppleWM.c \ - quartz/xpr/xprCursor.c \ - quartz/xpr/xprFrame.c \ - quartz/xpr/xprScreen.c \ - quartz/xpr/x-hash.c \ - quartz/xpr/x-hook.c \ - quartz/xpr/x-list.c - -xpr_la_LIBADD = \ - $(top_builddir)/miext/rootless/librootless.la \ - $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ - $(top_builddir)/miext/rootless/accel/librlAccel.la - -xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ - -lpixman-1 \ - -lXplugin \ - -XCClinker -bundle_loader -XCClinker XDarwinApp \ - -module -avoid-version -no-undefined -xpr_la_DEPENDENCIES = XDarwinApp +install-data-hook: x11app-install x11launcher-install +clean-local: x11app-clean x11launcher-clean endif -if HAVE_AGL_FRAMEWORK -glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS -glxCGLplugin_LTLIBRARIES = glxCGL.la -glxCGL_la_SOURCES = -glxCGL_la_LIBADD = \ - $(top_builddir)/GL/glx/glxext.o \ - $(top_builddir)/GL/glx/libglx.a \ - $(top_builddir)/GL/apple/libAGLcore.a -glxCGL_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \ - -Wl,-framework,AGL \ - -Wl,-framework,OpenGL \ - -XCClinker -ObjC \ - -XCClinker -bundle_loader -XCClinker XDarwinApp \ - -module -avoid-version -no-undefined -glxCGL_la_DEPENDENCIES = XDarwinApp - - -glxAGLplugindir = $(darwinappdir)/Contents/Resources/glxAGL.bundle/Contents/MacOS -glxAGLplugin_LTLIBRARIES = glxAGL.la -glxAGL_la_SOURCES = -glxAGL_la_LIBADD = \ - $(top_builddir)/GL/glx/glxext.o \ - $(top_builddir)/GL/glx/libglx.a \ - $(top_builddir)/GL/apple/libAGLcore.a -glxAGL_la_LDFLAGS = -shrext '' \ - -Wl,-framework,AGL \ - -Wl,-framework,OpenGL \ - -XCClinker -ObjC \ - -XCClinker -bundle_loader -XCClinker XDarwinApp \ - -module -avoid-version -no-undefined -glxAGL_la_DEPENDENCIES = XDarwinApp - - - -endif -endif - -#man1_MANS = XDarwin.man - -#uninstall-hook: -# rm -rf $(DESTDIR)$(macosdir)/XDarwin - -install-data-hook: $(XQUARTZ_HOOK) $(XDARWINAPP_HOOK) - -xquartz-install-hook:: - cd apple && xcodebuild install CFLAGS="$(XSERVERCFLAGS_CFLAGS)" LDFLAGS="$(XSERVERCFLAGS_LIBS)" - -xdarwinapp-install hook: - mv $(DESTDIR)$(macosdir)/XDarwinApp $(DESTDIR)$(macosdir)/XDarwin - EXTRA_DIST = \ - darwin.c \ + Xquartz.man \ darwinClut8.h \ - darwinEvents.c \ darwin.h \ - darwinKeyboard.c \ darwinKeyboard.h \ - darwinXinput.c \ - XDarwin.man + apple/Info.plist \ + apple/X11.icns \ + apple/bundle-main.c \ + apple/English.lproj/InfoPlist.strings \ + apple/English.lproj/Localizable.strings \ + apple/English.lproj/main.nib/classes.nib \ + apple/English.lproj/main.nib/info.nib \ + apple/English.lproj/main.nib/keyedobjects.nib \ + apple/X11.xcodeproj/project.pbxproj \ + launcher/bundle-main.c \ + launcher/Info.plist \ + launcher/X11.icns \ + launcher/X11.xcodeproj/project.pbxproj diff --git a/hw/darwin/README.apple b/hw/darwin/README.apple deleted file mode 100644 index 229ab17ad..000000000 --- a/hw/darwin/README.apple +++ /dev/null @@ -1,35 +0,0 @@ -This directory contains a port of the XDarwin code to the modular X.org -codebase to be compiled on Darwin/OS X; this would not have been possible -without the help of Torrey Lyons and Peter O'Gorman, to whom I am -grateful for their patches, time and moral support. - -The server builds 4 targets: - -* XDarwin: this server runs on Darwin systems without Quartz - (i.e. non-OS X); it has not been well-tested. - -* XDarwinApp: this builds XDarwin.app, which is a full X server using - Quartz. It has loadable module support for AGL and CGL, and well as - fullscreen and rootless support. - -* Xquartz: this server runs on Quartz-based systems, and is meant to - work with X11.app - -* x11app: this builds a version of Apple's X11.app using patches by - Torrey Lyons; most, but not all, functionality of Apple's original - X11.app is present in this release. - -Known issues: - -* AGL and CGL support for 3D indirect acceleration does not work; - indirect.c has been rewritten, but not yet integrated into this source tree. - -* Fullscreen mode does not work; I don't know why. - -* Some features in X11.app are not yet implemented; these are marked - with #ifdef DARWIN_DDX_MISSING in the code. - -* The build system code could probably be cleaned up slightly. - -Any patches or code contributions would be most welcome and may be -sent to me at bbyer@apple.com. diff --git a/hw/darwin/XDarwin.man b/hw/darwin/XDarwin.man deleted file mode 100644 index 6fc9aec0f..000000000 --- a/hw/darwin/XDarwin.man +++ /dev/null @@ -1,203 +0,0 @@ -.TH XDARWIN 1 __vendorversion__ -.SH NAME -XDarwin \- X window system server for Darwin operating system -.SH SYNOPSIS -.B XDarwin -[ options ] ... -.SH DESCRIPTION -#ifdef DARWIN_WITH_QUARTZ -.I XDarwin -is the X window server for Mac OS X and the Darwin operating system -provided by the X.Org Foundation. -.I XDarwin -can run in three different modes. On Mac OS X, -.I XDarwin -runs in parallel with Aqua in full screen or rootless modes. These modes -are called Quartz modes, named after the Quartz 2D compositing engine used -by Aqua. XDarwin can also be run from the Darwin text console in IOKit mode. -.PP -When running from the console, -.I XDarwin -acts as the window server and uses IOKit services to access the display -framebuffer, mouse and keyboard and to provide a layer of hardware -abstraction. In console mode, -.I XDarwin -will normally be started by the \fIxdm(1)\fP display manager or by a script -that runs the program \fIxinit(1)\fP. -.PP -When running with the Mac OS X Aqua GUI, -.I XDarwin -will normally be started by launching from the Finder, but it may also be -started from the command line with the \fB\-quartz\fP, \fB\-fullscreen\fP, or -\fB\-rootless\fP options. Note that the defaults for various command line -options are set by the -.I XDarwin -application preferences in the Quartz modes. -.PP -In full screen Quartz mode, when the X Window System is active, it takes over -the entire screen. CoreGraphics is used to capture and draw to the screen. The -.I XDarwin -application allows easy switching between the Mac OS X and X window -desktops. More information is available in the Help menu of the -.I XDarwin -application. -.PP -In rootless mode, the X window system and Aqua share your display. The root -window of the X11 display is the size of the screen and contains all the -other windows. The X11 root window is not displayed in rootless mode as Aqua -handles the desktop background. -#else -.I XDarwin -is the X window server for Mac OS X and the Darwin operating system -provided by the X.Org Foundation. This version of -.I XDarwin -can only be started from the Darwin text console. The Mac OS X Aqua GUI, if -present, must be shut down. -.I XDarwin -uses IOKit services to access the display -framebuffer, mouse and keyboard and to provide a layer of hardware -abstraction. -.I XDarwin -will normally be started by the \fIxdm(1)\fP display manager or by a script -that runs the program \fIxinit(1)\fP. -#endif -.SH OPTIONS -.PP -In addition to the normal server options described in the \fIXserver(1)\fP -manual page, \fIXDarwin\fP accepts the following command line switches: -.TP 8 -.B \-fakebuttons -Emulates a 3 button mouse using modifier keys. By default, the Command modifier -is used to emulate button 2 and Option is used for button 3. Thus, clicking the -first mouse button while holding down Command will act like clicking -button 2. Holding down Option will simulate button 3. -.TP 8 -.B \-nofakebuttons -Do not emulate a 3 button mouse. This is the default. -.TP 8 -.B "\-fakemouse2 \fImodifiers\fP" -Change the modifier keys used to emulate the second mouse button. By default, -Command is used to emulate the second button. Any combination of the following -modifier names may be used: Shift, Option, Control, Command, Fn. For example, -.B \-fakemouse2 """Option,Shift"" -will set holding Option, Shift and clicking on button one as equivalent to -clicking the second mouse button. -.TP 8 -.B "\-fakemouse3 \fImodifiers\fP" -Change the modifier keys used to emulate the third mouse button. By default, -Option is used to emulate the third button. Any combination of the following -modifier names may be used: Shift, Option, Control, Command, Fn. For example, -.B \-fakemouse3 """Control,Shift"" -will set holding Control, Shift and clicking on button one as equivalent to -clicking the third mouse button. -.TP 8 -.B "\-keymap \fIfile\fP" -On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. -The default is to read this keymapping from USA.keymapping. With this option -the keymapping will be read from \fIfile\fP instead. If the file's path is -not specified, it will be searched for in Library/Keyboards/ underneath the -following directories (in order): ~, /, /Network, /System. -.TP 8 -.B \-nokeymap -On startup \fIXDarwin\fP translates a Darwin keymapping into an X keymap. -With this option XDarwin queries the kernel for the current keymapping -instead of reading it from a file. This will often fail on newer kernels. -#ifdef DARWIN_WITH_QUARTZ -.TP 8 -.B "\-size \fIwidth\fP \fIheight\fP" -Sets the screen resolution for the X server to use. -Ignored in rootless mode. -.TP 8 -.B "\-depth \fIdepth\fP" -Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits -per pixel are supported. -Ignored in rootless mode. -.TP 8 -.B "\-refresh \fIrate\fP" -Gives the refresh rate to use in Hz. For LCD displays this should be 0. -Ignored in rootless mode. -.TP 8 -.B \-fullscreen -Run full screen in parallel with Mac OS X Aqua GUI. -.TP 8 -.B \-rootless -Run rootless inside Mac OS X Aqua GUI. -.TP 8 -.B \-quartz -Run in parallel with the Mac OS X Aqua GUI using the default mode. -#else -.TP 8 -.B "\-size \fIwidth\fP \fIheight\fP" -Sets the screen resolution for the X server to use. -.TP 8 -.B "\-depth \fIdepth\fP" -Specifies the color bit depth to use. Currently only 8, 15, and 24 color bits -per pixel are supported. -.TP 8 -.B "\-refresh \fIrate\fP" -Gives the refresh rate to use in Hz. For LCD displays this should be 0. -#endif -.TP 8 -.B \-showconfig -Print out the server version and patchlevel. -.TP 8 -.B \-version -Same as \fB\-showconfig\fP. -.SH "SEE ALSO" -.PP -X(__miscmansuffix__), Xorg(1), Xserver(1), xdm(1), xinit(1) -.SH BUGS -.I XDarwin -and this man page still have many limitations. Some of the more obvious -ones are: -.br -- The display mode cannot be changed once the X server has started. -.br -- A screen saver is not supported. -.PP -.SH AUTHORS -XFree86 was originally ported to Mac OS X Server by John Carmack. Dave -Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0. -Torrey T. Lyons improved and integrated this code into the XFree86 -Project's mainline for the 4.0.2 release. -.PP -The following members of the XonX Team contributed to the following -releases (in alphabetical order): -.TP 4 -XFree86 4.1.0: -.br -Rob Braun - Darwin x86 support -.br -Torrey T. Lyons - Project Lead -.br -Andreas Monitzer - Cocoa version of XDarwin front end -.br -Gregory Robert Parker - Original Quartz implementation -.br -Christoph Pfisterer - Dynamic shared X libraries -.br -Toshimitsu Tanaka - Japanese localization -.TP 4 -XFree86 4.2.0: -.br -Rob Braun - Darwin x86 support -.br -Pablo Di Noto - Spanish localization -.br -Paul Edens - Dutch localization -.br -Kyunghwan Kim - Korean localization -.br -Mario Klebsch - Non-US keyboard support -.br -Torrey T. Lyons - Project Lead -.br -Andreas Monitzer - German localization -.br -Patrik Montgomery - Swedish localization -.br -Greg Parker - Rootless support -.br -Toshimitsu Tanaka - Japanese localization -.br -Olivier Verdier - French localization diff --git a/hw/darwin/apple/Xquartz.man b/hw/darwin/Xquartz.man similarity index 100% rename from hw/darwin/apple/Xquartz.man rename to hw/darwin/Xquartz.man diff --git a/hw/darwin/apple/X11.xcodeproj/project.pbxproj b/hw/darwin/apple/X11.xcodeproj/project.pbxproj index 2fef99ba0..27cab8d06 100644 --- a/hw/darwin/apple/X11.xcodeproj/project.pbxproj +++ b/hw/darwin/apple/X11.xcodeproj/project.pbxproj @@ -195,41 +195,40 @@ 527F24090B5D8FFC007840A7 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { - DSTROOT = "$(DSTROOT)"; - SKIP_INSTALL = YES; + INSTALL_MODE_FLAG = "a+rX"; }; name = Development; }; 527F240A0B5D8FFC007840A7 /* Deployment */ = { isa = XCBuildConfiguration; buildSettings = { - DSTROOT = "$(DSTROOT)"; - SKIP_INSTALL = YES; + INSTALL_MODE_FLAG = "a+rX"; }; name = Deployment; }; 527F240B0B5D8FFC007840A7 /* Default */ = { isa = XCBuildConfiguration; buildSettings = { - DSTROOT = "$(DSTROOT)"; - SKIP_INSTALL = YES; + INSTALL_MODE_FLAG = "a+rX"; }; name = Default; }; 527F24230B5D938C007840A7 /* Development */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(NATIVE_ARCH_32_BIT)"; COPY_PHASE_STRIP = NO; - DSTROOT = "$(DSTROOT)"; FRAMEWORK_SEARCH_PATHS = ""; GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = $DSTROOT/Applications/Utilties; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = "$(CFLAGS)"; - OTHER_LDFLAGS = "$(LDFLAGS)"; + INSTALL_PATH = /usr/X11; + LIBRARY_SEARCH_PATHS = /usr/X11/lib; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ( + "-lXau", + "-lxcb", + "-lX11", + ); OTHER_REZFLAGS = ""; PRODUCT_NAME = X11; SECTORDER_FLAGS = ""; @@ -246,15 +245,18 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; - DSTROOT = "$(DSTROOT)"; FRAMEWORK_SEARCH_PATHS = ""; GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = $DSTROOT/Applications/Utilties; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = "$(CFLAGS)"; - OTHER_LDFLAGS = "$(LDFLAGS)"; + INSTALL_PATH = /usr/X11; + LIBRARY_SEARCH_PATHS = /usr/X11/lib; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ( + "-lXau", + "-lxcb", + "-lX11", + ); OTHER_REZFLAGS = ""; PRODUCT_NAME = X11; SECTORDER_FLAGS = ""; @@ -270,15 +272,18 @@ 527F24250B5D938C007840A7 /* Default */ = { isa = XCBuildConfiguration; buildSettings = { - DSTROOT = "$(DSTROOT)"; FRAMEWORK_SEARCH_PATHS = ""; GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Info.plist; - INSTALL_PATH = $DSTROOT/Applications/Utilties; - LIBRARY_SEARCH_PATHS = ""; - OTHER_CFLAGS = "$(CFLAGS)"; - OTHER_LDFLAGS = "$(LDFLAGS)"; + INSTALL_PATH = /usr/X11; + LIBRARY_SEARCH_PATHS = /usr/X11/lib; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ( + "-lXau", + "-lxcb", + "-lX11", + ); OTHER_REZFLAGS = ""; PRODUCT_NAME = X11; SECTORDER_FLAGS = ""; diff --git a/hw/darwin/bundle/Dutch.lproj/Credits.rtf b/hw/darwin/bundle/Dutch.lproj/Credits.rtf deleted file mode 100644 index 5858e5933..000000000 --- a/hw/darwin/bundle/Dutch.lproj/Credits.rtf +++ /dev/null @@ -1,168 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; -} -{\colortbl;\red255\green255\blue255;} -\vieww9000\viewh9000\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Contributors to Xorg Foundation Release: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Kaleb KEITHLEY\ - -\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\f1\b \cf0 Contributors to XFree86 4.4: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Harper\ - -\f2\i Rootless acceleration and Apple-WM extension -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Additional XonX Contributors to XFree86 4.3: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Fabr\'92cio Luis de Castro\ - -\f2\i Portuguese localization -\f0\i0 \ -Michael Oland\ - -\f2\i New XDarwin icon -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Contributors to XFree86 4.2: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Pablo Di Noto\ - -\f2\i Spanish localization -\f0\i0 \ -Paul Edens\ - -\f2\i Dutch localization -\f0\i0 \ -Kyunghwan Kim\ - -\f2\i Korean localization -\f0\i0 \ -Mario Klebsch\ - -\f2\i Non-US keyboard support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i German localization -\f0\i0 \ -Patrik Montgomery\ - -\f2\i Swedish localization -\f0\i0 \ -Greg Parker\ - -\f2\i Rootless support -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -Olivier Verdier\ - -\f2\i French localization -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Devin Poolman and Zero G Software, Inc.\ - -\f2\i Installer -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Team Members\ -Contributing to XFree86 4.1: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Cocoa version of XDarwin front end -\f0\i0 \ -Greg Parker\ - -\f2\i Original Quartz implementation -\f0\i0 \ -Christoph Pfisterer\ - -\f2\i Dynamic shared libraries -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Tiago Ribeiro\ - -\f2\i XDarwin icon -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 History: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Carmack\ - -\f2\i Original XFree86 port to Mac OS X Server -\f0\i0 \ -Dave Zarzycki\ - -\f2\i XFree86 4.0 port to Darwin 1.0 -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/hw/darwin/bundle/Dutch.lproj/Localizable.strings b/hw/darwin/bundle/Dutch.lproj/Localizable.strings deleted file mode 100644 index 6abd9107299ea24f4724f2fe30c513968b74e8cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1426 zcmb7^TW`}q5QV?z{EAUj38|uX(yD-3ArxA80<|b0^6JE!3pjS90nOOSIw3;v zV#zx@GiS~@vp;_ka*l9MMahIYLPExbh=c_{aKs2tIC2UWWTX@b8B>IUlAHx8Gdry) znv5}9gpxT9;Uf_fga?KQBZMir)hZDjDKP=UIU$_}(-|Y)ljCr_;srMd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pluxhv@+|8VULq z3vFh6)D*FZsChUz6cGTbL-N$pnp8d$MHsAJQ(xRuCzS1$OkIoQ9EeJ z0=Xn8Vf6`w{Vn#JyYgD6QEo|qN4nUM283zX$?sL$x3<#&p||bTlldYy(fhY~<6u46$JX$a0+x0#W2uphjWS=5i zEC}ylcL+j1;F#EnY`j2t-&iR>1Eu<9ZqaS$OokX<4W{*Lf_foux`wQv#{ zidtkp7Rdha6G7b{z7WWUA-pfHMYcd7><$ZL2a)v?=qW+=?*iGHOT-h%t`~!mg#@za z5mpL>pCeNRJs?A;K=v83Tg7-}7Ybw>ZW4WwT`dq+{7^_h|2Bc_4TJ+?6f#{jB5M{1 zcSePLs((kwV1AcCmO|Dlko|tXKzig}Dx%14637lA>o3sL3)wHk2gtnQ9%PdQvKJAy z34$%)khlrijRIlszX_!0^xugS$f|_|Gj10MR)IkFIWiJkK{zgu{So0m1rmtxbD<#9 z#Aaka5Xd$mv`_wALtcUGugK052a$bWpr<#or9$FshCq1pXJRNa zQeYXvNrCJogq>m}vZz4zCc?(n5Cqh!pMMfGsgkXpP z$gUBeA)6|Y34~9?LS*xV1YJH7eUN=yNUY;saSgJV*n(`PKtespV*3zwiC2(K5D34U zB9Q$Z*+7A8xo+=|REwjmoQ5MEy* zT97pfWWSv)(9;(gb($S?;c|piVhFPN!i#LMn24}UAo~K@5+$W|W>=3Jv)r+IZ zE)aw@!U+*a)*zOXlGjcb $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp diff --git a/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index 4b8e6f5cb..000000000 --- a/hw/darwin/bundle/Dutch.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,101 +0,0 @@ - - -XDarwin Help - - -
-

XDarwin X Server for Mac OS X

- X_VENDOR_NAME X_VERSION
- Release Date: X_REL_DATE -
-

Inhoud

-
    -
  1. Belangrijke Informatie
  2. -
  3. Gebruik
  4. -
  5. Instellen van het Path
  6. -
  7. Voorkeursinstellingen
  8. -
  9. Licentie
  10. -
-
-

Belangrijke Informatie

-
-
-#if X_PRE_RELEASE -Dit is een pre-release van XDarwin, waarvoor geen ondersteuning beschikbaar is. Rapporteren van bugs en aanleveren van patches kan op de XonX project pagina bij SourceForge. Kijk alvorens een bug te rapporteren in een pre-release eerst of een nieuwe versie beschikbaar is bij XonX of de X_VENDOR_LINK. -#else -Als de server ouder is dan 6-12 maanden, of als uw hardware nieuwer is dan de bovenstaande datum, kijk dan of een nieuwe versie beschikbaar is voor u een probleem aanmeldt. Rapporteren van bugs en aanleveren van patches kan op de XonX project pagina bij SourceForge. -#endif -
-
-Deze software is beschikbaar gesteld onder de voorwaarden van de MIT X11 / X Consortium Licentie en is beschikbaar 'AS IS',zonder enige garantie. Lees s.v.p. de Licentie voor gebruik.
- -

Gebruik

-

XDarwin is een open-source X server van het X Window Systeem. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin werkt op Mac OS X in schermvullende of rootless modus.

-

Het X window systeem in schermvullende modus neemt het hele beeldscherm in beslag. U schakelt terug naar de Mac OS X desktop door de toesten Command-Option-A in te drukken. Deze toetsencombinatie kunt u veranderen in de Voorkeuren. Op de Mac OS X desktop klikt u op de XDarwin icoon in de Dock om weer naar het X window systeem te schakelen. (In de Voorkeuren kunt er voor kiezen om een apart XDarwin schakelpaneel te gebruiken op de Mac OS X desktop.)

-

In rootless modus verschijnen het X window systeem en Aqua (de Mac OS X desktop) tegelijk op het scherm. Het achtergrondscherm van X11, waarbinnen alle X11 vensters vallen, is net zo groot als het gehele scherm, maar het achtergrondscherm zelf is onzichtbaar.

- -

Meerknopsmuis emulatie

-

Voor veel X11 programma's hebt u een 3-knops muis nodig. Met een 1-knops muis kunt u een 3-knops muis nabootsen door een toets in te drukken terwijl u klikt met de muis. Het instellen hiervan kan bij Voorkeuren, "Meerknopsmuis emulatie" in "Algemeen". Emulatie is standaard ingeschakeld: ingedrukt houden van de "command" toets terwijl u klikt emuleert knop 2, ingedrukt houden van "option" emuleert knop 3. Deze toetsen kunt u dus wijzigen in de Voorkeuren. Let op: als u xmodmap gebruikt om de indeling van het toetsenbord te wijzigen, moet u toch de oorspronkelijke toetsen op het toetsenbord gebruiken voor deze functie.

- -

Instellen van het Path

-

Het path is de lijst van directories waarin gezocht wordt naar commando's. De X11 commando's staan in de directory /usr/X11R6/bin, die dus aan uw path moet worden toegevoegd. XDarwin doet dit automatisch voor u en kan extra directories toevoegen waarin u commando's hebt geïnstalleerd.

- -

Ervaren gebruikers zullen het path al correct hebben ingesteld in de configuratiebestanden voor hun shell. In dat geval kunt u XDarwin via de Voorkeuren vertellen het path niet te wijzigen. XDarwin start de eerste X11 clients binnen de standaard login shell van de gebruiker (bij de Voorkeuren kunt u een afwijkende shell opgeven). Het instellen van het path is afhankelijk van de shell. Zie hiervoor de man pages voor de shell.

- -

Het kan handig zijn de manualpages voor X11 toe te voegen aan de lijst waarin gezocht wordt als u documentatie opvraagt. De manualpages voor X11 staan in /usr/X11R6/man en de MANPATH environment variable bevat de lijst van directories waarin naar documentatie wordt gezocht.

- -

Voorkeursinstellingen

-

Een aantal instellingen kan worden gewijzigd door "Voorkeuren..." te kiezen in het "XDarwin" menu. Wijzigingen van de instellingen genoemd onder "Start" gaan pas in als u XDarwin opnieuw hebt gestart. Een wijziging van de overige instellingen is direct effectief. Hier onder vindt u de verschillende mogelijkheden beschreven:

- -

Algemeen

-
    -
  • Gebruik systeempiep voor X11: Als u dit inschakelt wordt het Mac OS X waarschuwingssignaal ook gebruikt door X11, anders gebruikt X11 een simpele pieptoon (dit is de standaardinstelling).
  • -
  • Wijzigen muis-versnelling door X11 mogelijk: In een standaard X window systeem kan de window manager de muis-versnelling aanpassen. Dit kan verwarrend zijn omdat de snelheid onder X11 dan verschillend kan zijn van de snelheid die u in Mac OS X bij Systeemvoorkeuren hebt ingesteld. Om verwarring te voorkomen is de standaardinstelling dat X11 de versnelling niet kan wijzigen.
  • -
  • Meerknopsmuis emulatie: Dit is hierboven beschreven bij Gebruik. Als emulatie is ingeschakeld moet u de gekozen toetsen ingedrukt houden terwijl u met de muis klikt om de tweede en derde muisknop na te bootsen.
  • -
- -

Start

-
    -
  • Standaard modus: Hier kiest u de standaard scherm-modus: schermvullend of rootless (hierboven beschreven bij Gebruik). U kunt ook kiezen tijdens het starten van XDarwin, zie de optie hieronder.
  • -
  • Kies scherm-modus tijdens start: Dit is standaard ingeschakeld zodat u tijdens het starten van XDarwin kunt kiezen tussen schermvullend en rootless scherm-modus. Als u dit uitschakelt start XDarwin in de standaard modus zonder u iets te vragen.
  • -
  • X11 scherm nummer: Met X11 kunnen meerdere schermen worden aangestuurd door verschillende X servers op dezelfde computer. Als u meerdere X servers tegelijk wilt gebruiken stelt u hier het scherm nummer in dat door XDarwin wordt gebruikt.
  • -
  • Xinerama multi-monitor ondersteuning mogelijk: XDarwin ondersteunt het gebruik van meerdere monitoren met Xinerama, waarbij elke monitor wordt gezien als deel van één groot rechthoekig scherm. U kunt Xinerama hier uitschakelen, maar XDarwin werkt op dit moment zonder Xinerama niet goed met meerdere monitoren. Als u maar 1 monitor gebruikt is deze instelling automatisch uitgeschakeld.
  • -
  • Toetsenbordindeling-bestand: Een toetsenbordindeling-bestand wordt bij het starten geladen en omgezet naar een X11 toetsenbordindeling. Voor verschillende talen vindt u toetsenbordindelingen in de directory /System/Library/Keyboards.
  • -
  • Bij starten eerste X11 clients: Als XDarwin start, wordt xinit uitgevoerd om de X window manager en andere X clients te starten (zie "man xinit"). Voordat XDarwin xinit uitvoert voegt het de opgegeven directories toe aan het path. Standaard wordt alleen /usr/X11R6/bin toegevoegd. U kunt meerdere directories opgeven, gescheiden door een dubbelepunt. X clients worden gestart met de standaard login shell van de gebruiker met gebruik van de configuratiebestanden voor die shell. U kunt een afwijkende shell opgeven.
  • -
- -

Schermvullend

-
    -
  • Toetscombinatie knop: Klik op deze knop om de toetscombinatie te wijzigen waarmee u tussen de Mac OS X desktop en X11 schakelt. Als toetscombinatie kunt u elke combinatie gebruiken van de shift, control, command en option toetsen samen met één normale toets.
  • -
  • Klikken op icoon in Dock schakelt naar X11: Hiermee is een klik op de XDarwin icoon in de Dock voldoende om naar X11 te schakelen. In sommige versies van Mac OS X verdwijnt soms de cursor als u deze mogelijkheid gebruikt en daarna terugkeert naar de Mac OS X desktop.
  • -
  • Toon help bij schermvullend starten: Hiermee wordt een inleidend scherm getoond als XDarwin schermvullend start.
  • -
  • Kleurdiepte: In de schermvullende modus kan X11 een andere kleurdiepte gebruiken dan Aqua (en de Mac OS X desktop). Als u "Huidig" kiest, neemt XDarwin bij het starten de kleurdiepte over van Aqua. U kunt ook kiezen voor 8, 15 of 24 bits.
  • -
- -

Licentie

-The main license for XDarwin is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. -

X Consortium License

-

Copyright (C) 1996 X Consortium

-

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 X CONSORTIUM 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 X Consortium 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 X Consortium.

-

X Window System is a trademark of X Consortium, Inc.

- - - diff --git a/hw/darwin/bundle/English.lproj/Credits.rtf b/hw/darwin/bundle/English.lproj/Credits.rtf deleted file mode 100644 index 34408e78c..000000000 --- a/hw/darwin/bundle/English.lproj/Credits.rtf +++ /dev/null @@ -1,168 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; -} -{\colortbl;\red255\green255\blue255;} -\vieww5160\viewh6300\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Contributors to Xorg Foundation Release: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Kaleb KEITHLEY\ - -\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\f1\b \cf0 Contributors to XFree86 4.4: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Harper\ - -\f2\i Rootless acceleration and Apple-WM extension -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Additional XonX Contributors to XFree86 4.3: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Fabr\'92cio Luis de Castro\ - -\f2\i Portuguese localization -\f0\i0 \ -Michael Oland\ - -\f2\i New XDarwin icon -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Contributors to XFree86 4.2: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Pablo Di Noto\ - -\f2\i Spanish localization -\f0\i0 \ -Paul Edens\ - -\f2\i Dutch localization -\f0\i0 \ -Kyunghwan Kim\ - -\f2\i Korean localization -\f0\i0 \ -Mario Klebsch\ - -\f2\i Non-US keyboard support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i German localization -\f0\i0 \ -Patrik Montgomery\ - -\f2\i Swedish localization -\f0\i0 \ -Greg Parker\ - -\f2\i Rootless support -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -Olivier Verdier\ - -\f2\i French localization -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Devin Poolman and Zero G Software, Inc.\ - -\f2\i Installer -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Team Members\ -Contributing to XFree86 4.1: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Cocoa version of XDarwin front end -\f0\i0 \ -Greg Parker\ - -\f2\i Original Quartz implementation -\f0\i0 \ -Christoph Pfisterer\ - -\f2\i Dynamic shared libraries -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Tiago Ribeiro\ - -\f2\i XDarwin icon -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 History: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Carmack\ - -\f2\i Original XFree86 port to Mac OS X Server -\f0\i0 \ -Dave Zarzycki\ - -\f2\i XFree86 4.0 port to Darwin 1.0 -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp b/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp deleted file mode 100644 index 268b80091..000000000 --- a/hw/darwin/bundle/English.lproj/InfoPlist.strings.cpp +++ /dev/null @@ -1,4 +0,0 @@ -/* English versions of the Info.plist keys; used by most localizations. */ -/* Most of these are set in the target application settings. */ - -NSHumanReadableCopyright = __quote__ X_VENDOR_NAME X_VERSION __quote__; diff --git a/hw/darwin/bundle/English.lproj/Localizable.strings b/hw/darwin/bundle/English.lproj/Localizable.strings deleted file mode 100644 index 6f6487902..000000000 --- a/hw/darwin/bundle/English.lproj/Localizable.strings +++ /dev/null @@ -1,22 +0,0 @@ -/* English localized versions of strings used by the Mac OS X front end. */ - -/* Title of alert panel */ -"Quit X server?" = "Quit X server?"; - -/* Text of alert panel */ -"Quitting the X server will terminate any running X Window System programs." = "Quitting the X server will terminate any running X Window System programs."; - -/* Quit */ -"Quit" = "Quit"; - -/* Cancel */ -"Cancel" = "Cancel"; - -/* Default keymapping file */ -"USA.keymapping" = "USA.keymapping"; - -/* Default switch string */ -"Cmd-Opt-a" = "Cmd-Opt-a"; - -/* Button title when changing switch key */ -"Press key" = "Press key"; diff --git a/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib deleted file mode 100644 index 77f345a4e..000000000 --- a/hw/darwin/bundle/English.lproj/MainMenu.nib/classes.nib +++ /dev/null @@ -1,72 +0,0 @@ -{ - IBClasses = ( - { - ACTIONS = {showHelp = id; }; - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; - CLASS = Preferences; - LANGUAGE = ObjC; - OUTLETS = { - addToPathButton = id; - addToPathField = id; - button2ModifiersMatrix = id; - button3ModifiersMatrix = id; - depthButton = id; - displayField = id; - dockSwitchButton = id; - fakeButton = id; - keymapFileField = id; - modeMatrix = id; - modeWindowButton = id; - mouseAccelChangeButton = id; - startupHelpButton = id; - switchKeyButton = id; - systemBeepButton = id; - useDefaultShellMatrix = id; - useOtherShellField = id; - useXineramaButton = id; - window = id; - }; - SUPERCLASS = NSObject; - }, - { - CLASS = XApplication; - LANGUAGE = ObjC; - OUTLETS = {preferences = id; xserver = id; }; - SUPERCLASS = NSApplication; - }, - { - ACTIONS = { - bringAllToFront = id; - closeHelpAndShow = id; - itemSelected = id; - nextWindow = id; - previousWindow = id; - showAction = id; - showSwitchPanel = id; - startFullScreen = id; - startRootless = id; - }; - CLASS = XServer; - LANGUAGE = ObjC; - OUTLETS = { - dockMenu = NSMenu; - helpWindow = NSWindow; - modeWindow = NSWindow; - startFullScreenButton = NSButton; - startRootlessButton = NSButton; - startupHelpButton = NSButton; - startupModeButton = NSButton; - switchWindow = NSPanel; - windowMenu = NSMenu; - windowSeparator = NSMenuItem; - }; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/English.lproj/MainMenu.nib/objects.nib deleted file mode 100644 index ebbfd8317de285c8bf5ff9931149263c4ca48cfa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20829 zcmeHveS8!}w&_2c@&dwzPz_fZx>g zupP54rY&(S%POp^|7T5Ic!_0|)YVT@BQ1J3s2Z@0AfHoLKi%Iz#rZ4Z){1zn9jwyY z+S=Mi_al3s5;gq|A$6=__!om^b*rnFkIUNg2ue|1{kW)U>R}KN$LnF!&_kE3h_7mI zEd_wz$6~Pm54zLyIk=xOXS z%cp6r`K$|CivYmNCuFU*HsAG=ZAt4yJ#6+_*8Wdc!A+Nq2>h%N0Qv(!R|0+lQ3!wr zLGZ&hV1OUO5Cj##VvXG`7Jv@c0Uh~vEN1z%(LgvpV4V|*Xc~1=i||qu$%aj`s7cf}3ha$*y|KuC4_YLa+c-FhPR=_}6#ukl?|N*>>DolgS%6kj0w^ zh%IZ^rYU{MYHKST?+*vmki9+@+aS<;^pP}D8wjBRc5EZTUunl;F~*RsKz0&9-X+)L zF}odpZ>?@;@ph_JJQSIYY$w&CdrCTmwY9ZcAYiSQLhhbYl}V=B49l!;f-6E1d(*F(Ai%Q_0JJSn%r`o$4bZ6r4P0+!U(PgfV26E!sytb8!Oy(ZOo-Wb^E{*tRV76_?V-_17v)vIg#cvwgqN~!_EkYJS*jE8S|GgN-tcpRJ zrfH)`kEUTL)$bty=8MH*b1QoLS|@xTz*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2QrOQ q#+9{kq>Sr9{v5LN+mWqphq$$+t>>h1zC*qM diff --git a/hw/darwin/bundle/English.lproj/Makefile.am b/hw/darwin/bundle/English.lproj/Makefile.am deleted file mode 100644 index 45587086f..000000000 --- a/hw/darwin/bundle/English.lproj/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -BINDIR = ${bindir} -include $(top_srcdir)/cpprules.in -XINITDIR = $(libdir)/X11/xinit -XDEFS = \ - -DX_VERSION="$(PLIST_VERSION_STRING)" \ - -DX_PRE_RELEASE="$(PRE)" \ - -DX_REL_DATE="$(XORG_DATE)" \ - -DX_VENDOR_NAME="$(VENDOR_STRING)" \ - -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" - -resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources - -Englishlprojdir = $(resourcesdir)/English.lproj -Englishlproj_DATA = \ - XDarwinHelp.html \ - InfoPlist.strings \ - Credits.rtf Localizable.strings - -Englishlprojnibdir = $(Englishlprojdir)/MainMenu.nib -Englishlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib - -InfoPlist.strings: InfoPlist.strings.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp \ - InfoPlist.strings.cpp diff --git a/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index db33670d9..000000000 --- a/hw/darwin/bundle/English.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,94 +0,0 @@ - - -XDarwin Help - - -
-

XDarwin X Server for Mac OS X

- X_VENDOR_NAME X_VERSION
- Release Date: X_REL_DATE -
-

Contents

-
    -
  1. Important Notice
  2. -
  3. Usage
  4. -
  5. Setting Your Path
  6. -
  7. User Preferences
  8. -
  9. License
  10. -
-
-

Important Notice

-
-
-#if X_PRE_RELEASE -This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from XonX or the X_VENDOR_LINK. -#else -If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. -#endif -
-
-This software is distributed under the terms of the MIT X11 / X Consortium License and is provided AS IS, with no warranty. Please read the License before using.
- -

Usage

-

XDarwin is a freely redistributable open-source X server for the X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.

-

In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)

-

In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.

-

Multi-Button Mouse Emulation

-

Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.

- -

Setting Your Path

-

Your path is the list of directories to be searched for executable commands. The X11 commands are located in /usr/X11R6/bin, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.

-

More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.

-

In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

- -

User Preferences

-

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

-

General

-
    -
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.
  • -
  • Allow X11 to change mouse acceleration: In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.
  • -
  • Multi-Button Mouse Emulation: This is described above under Usage. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.
  • -
-

Start Up

-
    -
  • Default Mode: If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.
  • -
  • Show mode pick panel on startup: By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.
  • -
  • X11 Display number: X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.
  • -
  • Allow Xinerama multiple monitor support: XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.
  • -
  • Keymapping File: A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in /System/Library/Keyboards.
  • -
  • Starting First X11 Clients: When XDarwin is started from the Finder, it will run xinit to launch the X window manager and other X clients. (See "man xinit" for more information.) Before XDarwin runs xinit it will add the specified directories to the user's path. By default only /usr/X11R6/bin is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.
  • -
-

Full Screen

-
    -
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • -
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • -
  • Show help on startup: This will show an introductory splash screen when XDarwin is started in full screen mode.
  • -
  • Color bit depth: In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.
  • -
- -

License

-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. -

X Consortium License

-

Copyright (C) 1996 X Consortium

-

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 X CONSORTIUM 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 X Consortium 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 X Consortium.

-

X Window System is a trademark of X Consortium, Inc.

- - diff --git a/hw/darwin/bundle/French.lproj/Credits.rtf b/hw/darwin/bundle/French.lproj/Credits.rtf deleted file mode 100644 index 17e0a0d70..000000000 --- a/hw/darwin/bundle/French.lproj/Credits.rtf +++ /dev/null @@ -1,166 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; -} -{\colortbl;\red255\green255\blue255;} -\vieww5160\viewh4480\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Contributors to Xorg Foundation Release: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Kaleb KEITHLEY\ - -\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\f1\b \cf0 Contributors to XFree86 4.4: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Harper\ - -\f2\i Rootless acceleration and Apple-WM extension -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Additional XonX Contributors to XFree86 4.3: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Fabr\'92cio Luis de Castro\ - -\f2\i Portuguese localization -\f0\i0 \ -Michael Oland\ - -\f2\i New XDarwin icon -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 \ -Participants \'88 XonX pour XFree86 4.2 : -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Version pour Darwin x86 -\f0\i0 \ -Pablo Di Noto\ - -\f2\i Traduction en espagnol -\f0\i0 \ -Paul Edens\ - -\f2\i Traduction en allemand -\f0\i0 \ -Kyunghwan Kim\ - -\f2\i Traduction en cor\'8een -\f0\i0 \ -Mario Klebsch\ - -\f2\i Claviers non-US -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Direction du projet -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Traduction en allemand -\f0\i0 \ -Patrik Montgomery\ - -\f2\i Traduction en su\'8edois -\f0\i0 \ -Greg Parker\ - -\f2\i Version \'c7 rootless \'c8 -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Traduction en japonais -\f0\i0 \ -Olivier Verdier\ - -\f2\i Traduction en fran\'8dais -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Remerciements : -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Devin Poolman et Zero G Software, Inc.\ - -\f2\i Installeur -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Participants \'88 XonX pour XFree86 4.2 : -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Version pour Darwin x86 -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Direction du projet -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Version Cocoa de l'interface de XDarwin -\f0\i0 \ -Greg Parker\ - -\f2\i Impl\'8ementation initiale sur Quartz -\f0\i0 \ -Christoph Pfisterer\ - -\f2\i Librairies partag\'8ees dynamiquement -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Traduction en japonais -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Remerciements : -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Tiago Ribeiro\ - Ic\'99ne -\f2\i XDarwin -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Historique : -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Carmack\ - -\f2\i Premi\'8fre adaptation de XFree86 sur Mac OS X Server -\f0\i0 \ -Dave Zarzycki\ - -\f2\i Adaptation de Free86 4.0 pour Darwin 1.0 -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Int\'8egration dans le projet XFree86 pour la version 4.0.2} \ No newline at end of file diff --git a/hw/darwin/bundle/French.lproj/Localizable.strings b/hw/darwin/bundle/French.lproj/Localizable.strings deleted file mode 100644 index 21c4a99c166c844ba08c7e1b29fb9985a8c3638e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1492 zcma)+TW`}q5QV?z{)$!Ar;6H1ins(J6iRsl6%;Ocb?nUrd`W$2lK%LDX1tCaLj_OP zdUs~doO5O#e&KVD;XOH)l#msMn2eBsm^JrUA`Ev}athXDq!bu378nXja@M3Q^>0Pt zBIfKdl&r8AJ`xaOxM7N6hG9Xjxk`-Ij_@#?<8$IroiTIBEH8M*7{iVbpN+;Y$q7g( z@R@1d+~M?DvBf7MAZM%ieCAZ7M8sHpt`)QNSg^t)c3FSm^WlhrfVsway>6dyhhd1v z5W|Q81BUnvxWs3~bN6@5Q$~!rO{sMou0;`1K^WT* zkYb4sai@Hy(wLfG(V^kv4W}4hV>+)&y%)7bpZ0Y{?lMT!D^5CyEIX}UYyZD^O6QN( z4WfTrQR<0Cv367AN;D?WlhIyPq4I*74dfR_a?h$$Q~Xz5yFH>L-~U>A9Jdf1#AgGlZH|X3YG- ze5-6dAFbAp>3Xc(l`+alO}DKqgzX6jwE9 zzcOWl_t*DrW!XaFYT-|&^0D__PxcWN>ZH#q&wGL7~dmcP%FqbydaQO>5!iQ#P3}TzgUW Iwylx=1_&(k`2YX_ diff --git a/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib deleted file mode 100644 index 77f345a4e..000000000 --- a/hw/darwin/bundle/French.lproj/MainMenu.nib/classes.nib +++ /dev/null @@ -1,72 +0,0 @@ -{ - IBClasses = ( - { - ACTIONS = {showHelp = id; }; - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; - CLASS = Preferences; - LANGUAGE = ObjC; - OUTLETS = { - addToPathButton = id; - addToPathField = id; - button2ModifiersMatrix = id; - button3ModifiersMatrix = id; - depthButton = id; - displayField = id; - dockSwitchButton = id; - fakeButton = id; - keymapFileField = id; - modeMatrix = id; - modeWindowButton = id; - mouseAccelChangeButton = id; - startupHelpButton = id; - switchKeyButton = id; - systemBeepButton = id; - useDefaultShellMatrix = id; - useOtherShellField = id; - useXineramaButton = id; - window = id; - }; - SUPERCLASS = NSObject; - }, - { - CLASS = XApplication; - LANGUAGE = ObjC; - OUTLETS = {preferences = id; xserver = id; }; - SUPERCLASS = NSApplication; - }, - { - ACTIONS = { - bringAllToFront = id; - closeHelpAndShow = id; - itemSelected = id; - nextWindow = id; - previousWindow = id; - showAction = id; - showSwitchPanel = id; - startFullScreen = id; - startRootless = id; - }; - CLASS = XServer; - LANGUAGE = ObjC; - OUTLETS = { - dockMenu = NSMenu; - helpWindow = NSWindow; - modeWindow = NSWindow; - startFullScreenButton = NSButton; - startRootlessButton = NSButton; - startupHelpButton = NSButton; - startupModeButton = NSButton; - switchWindow = NSPanel; - windowMenu = NSMenu; - windowSeparator = NSMenuItem; - }; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/French.lproj/MainMenu.nib/objects.nib deleted file mode 100644 index 109d5cc6fb00f79c5559401c10bae587688f22b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21114 zcmeHvdw3L8miW0%5<(I}5)%;Aq1BZPia-M5EM!*R!Vif+qk=p;-PNR|)74X5&12S; zIib3K85Kn1jQAGD*LcOxSpgj#0c9LDJbJ%#tGc_olMK51 z+dqEaXY&rp-pVP|R)!^iL{lYi1NQhxXJd6;FRt}W9e-opZIVx$=+(Rk z@9TPgt;Z^XSlntdAsW$?2CHyzlkOTzUGr-_9!-@)OIVZ6t}2={E*uWZKCdP#AtPq! zOkQQ`x?WQ2xkV27mF2UghH%iUNyxrx(tFEtAP@-1W9jG1bs<}btPWk@Lv~x^@D%`h zb93MEvJ_e-g`$$%?+r!Vb0&J#<#Nc-o162KKn-2j`_y`-M>TIw00WXOVU_&exiy_-y7`PN5aA|x)JVyWY9NFg^3k-B!FG_Zw zAO(ZhiNDABh+gz}sZQ9^)3_$xCCiOD>>M=a1Av}Gh|;uYDT)@9A`zN)Uae=c64EM~ zTK-AToi}2XZ$Taa3;=+03Ah2G-~$=_;Dzf!1uula4-$aR0=;$SgErO%Z8=6Prn}_P zK$vdPdqpC$wIT=y`m;u(acn|wZU$plOyAjZv7S4x`Ulo1<<=-uK!PAF0|_*c!3W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*YVg!lM$2%Iwn!t*$?f8(eAjZ@x) zE#)VW-Nh3KKj#Q%`|>RaUvt{1!mj1Wjv!mXFF`hiBb@5P7b7(BFtSTHvd0h_`Eq2{ zycpReei-2#NA^0xhkQ7)|HF}$D10}}_OaTx|CZa%7bV z_i@TL!NdGoWOF#uG5-I{>k!s*g!_>FkfW;v*)KW5N5}#kSsqdBAhP)!T{+0^@n&%_Cl%GYon^S&^DID1g2>ba< z2w!o8Gf{psvKCI6B&Kq74M6rAj_d%!MotMZHjh*46ZY{A1mssEo5_*Agz$Sl7+Ebx zcpRCVPeb-AzJ~EUWV1QKPmx{25e^`$=g4+k%I`onf+OrjHkVI9W^!cDBK(S@3y>L{ z(pT(9d;v1zo??>dhkwk`bs@5i{PR^D;X`B+rxY{`w;B2 diff --git a/hw/darwin/bundle/French.lproj/Makefile.am b/hw/darwin/bundle/French.lproj/Makefile.am deleted file mode 100644 index 656ba5c0d..000000000 --- a/hw/darwin/bundle/French.lproj/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -BINDIR = ${bindir} -include $(top_srcdir)/cpprules.in -XINITDIR = $(libdir)/X11/xinit - -XDEFS = \ - -DX_VERSION="$(PLIST_VERSION_STRING)" \ - -DX_PRE_RELEASE="$(PRE)" \ - -DX_REL_DATE="$(XORG_DATE)" \ - -DX_VENDOR_NAME="$(VENDOR_STRING)" \ - -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" - - -resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources - -Frenchlprojdir = $(resourcesdir)/French.lproj - -Frenchlproj_DATA = \ - XDarwinHelp.html \ - InfoPlist.strings \ - Credits.rtf Localizable.strings - -Frenchlprojnibdir = $(Frenchlprojdir)/MainMenu.nib -Frenchlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib - -InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp diff --git a/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index 512416b1b..000000000 --- a/hw/darwin/bundle/French.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,99 +0,0 @@ - - -XDarwin Help - - -
-

XDarwin X Server pour Mac OS X

- X_VENDOR_NAME X_VERSION
- Date : X_REL_DATE -
-

Sommaire

-
    -
  1. Avertissement
  2. -
  3. Utilisation
  4. -
  5. Chemins d'accès
  6. -
  7. Préférences
  8. -
  9. Licence
  10. -
-
-

Avertissement

-
-
-#if PRE_RELEASE -Ceci est une pré-version de XDarwin et ne fait par conséquent l'objet d'aucun support client. Les bogues peuvent être signalés et des patches peuvent être soumis sur la -page du projet XonX chez SourceForge. Veuillez prendre connaissance de la dernière version sur XonX ou le X_VENDOR_LINK avant de signaler un bogue d'une pré-version. -#else -Si le serveur date de plus de 6-12 mois ou si votre matériel est plus récent que la date indiquée ci-dessus, veuillez vous procurer une version plus récente avant de signaler toute anomalie. Les bogues peuvent être signalés et des patches peuvent être soumis sur la page du projet XonX chez SourceForge. -#endif -
-
-Ce logiciel est distribué sous la -Licence du Consortium X/X11 du MIT et est fourni TEL QUEL, sans garanties. Veuillez prendre connaissance de la Licence avant toute utilisation.
- -

Utilisation

-

XDarwin est une X server libre et distribuable sans contrainte du X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin fonctionne sous Mac OS X en mode « rootless » ou plein écran.

-

Lorsque le système X window est actif en mode plein écran, il prend en charge la totalité de l'écran. Il est possible de revenir sur le bureau de Mac OS X en appuyant sur Commande-Option-A. Cette combinaison de touches peut être modifiée dans les préférences. Pour revenir dans X window, cliquer sur l'icône de XDarwin dans le Dock de Mac OS X. (Un réglage des préférences permet d'effectuer cette opération en cliquant dans une fenêtre flottante au lieu de l'icône du Dock)

-

En mode « rootless », X window system et Aqua utilisent le même affichage. La fenêtre-mère de l'affichage X11 est de la taille de l'écran et contient toutes les autre fenêtres. En mode « rootless » cette fenêtre-mère n'est pas affichée car Aqua gère le fond d'écran.

-

Émulation de souris à plusieurs boutons

-

Le fonctionnement de la plupart des applications X11 repose sur l'utilisation d'une souris à 3 boutons. Il est possible d'émuler une souris à 3 boutons avec un seul bouton en appuyant sur des touches de modification. Ceci est réglé dans la section "Émulation de souris à plusieurs boutons" de l'onglet "Général" des préférences. L'émulation est activée par défaut. Dans ce cas, cliquer en appuyant simultanément sur la touche "commande" simulera le bouton du milieu. Cliquer en appuyant simultanément sur la touche "option" simulera le bouton de droite. Les préférences permettent de régler n'importe quelle combinaison de touches de modification pour émuler les boutons du milieu et de droite. Notez que même si les touches de modifications sont mises en correspondance avec d'autres touches par xmodmap, ce sont les touches originelles spécifiées dans les préférences qui assureront l'émulation d'une souris à plusieurs boutons. - -

Réglage du chemin d'accès

-

Le chemin d'accès est une liste de répertoires utilisés pour la recherche d'exécutables. Les commandes X11 sont situées dans /usr/X11R6/bin, qui doit être ajouté à votre chemin d'accès. XDarwin fait cela par défaut, et peut également ajouter d'autres répertoires dans lesquels vous auriez installé d'autre commandes unix.

-

Les utilisateurs plus expérimentés auront déjà réglé leur chemin d'accès correctement par le biais des fichiers d'initialisation de leur shell. Dans ce cas, il est possible de demander à XDarwin de ne pas modifier le chemin d'accès initial. XDarwin lance les premiers clients X11 dans le shell d'ouverture de session par défaut. (Un shell de remplacement peut être spécifié dans les préférences.) La façon de régler le chemin d'accès dépend du shell utilisé. Ceci est documenté dans les pages "man" du shell.

-

De plus, il est possible d'ajouter les pages "man" de X11 à la liste des pages recherchées pour la documentation "man". Les pages "man" X11 se trouvent dans /usr/X11R6/man et la variable d'environnement MANPATH contient la liste des répertoires dans lesquels chercher.

- - -

Préférences

-

Un certain nombre d'options peuvent être réglées dans les préférences. On accède aux préférences en choisissant "Préférences..." dans le menu "XDarwin". Les options décrites comme options de démarrage ne prendront pas effet avant le redémarrage de XDarwin. Les autres options prennent immédiatement effet. Les différentes options sont détaillées ci-après :

-

Général

-
    -
  • Utiliser le bip d'alerte Système dans X11 : Cocher cette option pour que le son d'alerte standard de Mac OS X soit utilisé à la place du son d'alerte de X11. L'option n'est pas cochée ar défaut. Dans ce cas, un simple signal sonore est utilisé.
  • -
  • Autoriser X11 à changer la vitesse de la souris : Dans une implémentation classique du sytème X window, le gestionnaire de fenêtres peut modifier la vitesse de la souris. Cela peut s'avérer déroutant puisque le réglage de la vitesse de la souris peut être différent dans les préférences de Mac OS X et dans le gestionnaire X window. Par défaut, X11 n'est pas autorisé à changer la vitesse de la souris.
  • -
  • Émulation de souris à plusieurs boutons : Ceci est décrit ci-dessus à la rubrique Usage. Lorsque l'émulation est activée, il suffit d'appuyer simultanément sur les touches modificatrices sélectionnées et sur le bouton de la souris afin d'émuler les boutons du milieu et de droite.
  • -
-

Démarrage

-
    -
  • Mode par défaut : Le mode spécifié à cet endroit sera utilisé si l'utilisateur ne l'indique pas au démarrage.
  • -
  • Choix du mode d'affichage au démarrage Par défaut, une fenêtre de dialogue est affichée au démarrage de XDarwin pour permettre à l'utilisateur de choisir entre le mode plein écran et le mode « rootless ». Si cette option est désactivée, le mode par défaut sera automatiquement utilisé.
  • -
  • Numéro d'affichage (Display) X11 offre la possibilité de plusieurs serveurs X sur un ordinateur. L'utilisateur doit spécifier ici le numéro d'affichage utilisé par XDarwin dans le cas où plusieurs serveurs X seraient en service simultanément.
  • -
  • Autoriser la prise en charge Xinerama de plusieurs moniteurs : XDarwin peut être utilisé avec plusieurs moniteur avec Xinerama, qui considère les différents moniteurs comme des parties d'un écran rectugulaire plus grand. Cette option permet de désactiver Xinerama mais XDarwin ne prend alors pour l'instant pas correctement en charge l'affichage sur plusieurs écrans. Si il n'y a qu'un seul moniteur, Xinerama est automatiquement désactivé.
  • -
  • Fichier clavier : Un fichier de correspondance de clavier est lu au démarrage puis transformé en un fihcier de correspondance clavier pour X11. Les fichiers de correspondance clavier, disponibles pour de nombreuses langues, se trouvent dans /System/Library/Keyboards.
  • -
  • Démarrage des premiers clients X11 : Lorsque XDarwin est démarré à partir du Finder, il lance xinit qui lance à son tour le gestionnaire X window ainsi que d'autres clients X. (Voir "man xinit" pour plus d'informations.) Avant de lancer xinit, XDarwin ajoute les répertoires ainsi spécifiés au chemin d'accès de l'utilisateur. Par défaut, seul /usr/X11R6/bin est ajouté. Il est possible d'ajouter d'autres répertoires en les séparants à l'aide de deux points (:). Les clients X sont démarrés à partir du shell par défaut de l'utilisateur. Ainsi, le fichier d'initialisation de shell de l'utilisateur est lu. Un autre shell peut éventuellement être spécifié.
  • -
-

Plein écran

-
    -
  • Combinaison de touches : Appuyer sur ce bouton, puis appuyer sur une ou plusieurs touches modificatrices suivies d'une touche ordinaire. Cette combinaison de touche servira à commuter entre Aqua et X11.
  • -
  • Basculer dans X11 en cliquant sur l'icône du Dock : Cette option permet de passer dans X11 en cliquant dans l'icône de XDarwin dans le Dock. Sur certaines versions de Mac OS X, la commutation en utilisant le Dock peut faire disparaître le curseur lors du retour dans Aqua.
  • -
  • Afficher l'aide du mode plein écran au démarrage : Permet l'affichage d'une fenêtre d'introduction lorsque XDarwin est démarré en mode plein écran.
  • -
  • Profondeur de couleur : En mode plein écran, l'affichage X11 peut utiliser une autre profondeur de couleur que celle employée par Aqua. Si "Actuelle" est choisi, XDarwin utilisera la même profondeur de couleur qu'Aqua. Les autres choix sont 8 (256 couleurs), 15 (milliers de couleurs) et 24 bits (millions de couleurs).
  • -
- -

Licence

-The main license for XDarwin is one based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. -

X Consortium License

-

Copyright (C) 1996 X Consortium

-

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 X CONSORTIUM 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 X Consortium 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 X Consortium.

-

X Window System is a trademark of X Consortium, Inc.

- - - diff --git a/hw/darwin/bundle/German.lproj/Credits.rtf b/hw/darwin/bundle/German.lproj/Credits.rtf deleted file mode 100644 index 34408e78c..000000000 --- a/hw/darwin/bundle/German.lproj/Credits.rtf +++ /dev/null @@ -1,168 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; -} -{\colortbl;\red255\green255\blue255;} -\vieww5160\viewh6300\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Contributors to Xorg Foundation Release: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Kaleb KEITHLEY\ - -\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\f1\b \cf0 Contributors to XFree86 4.4: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Harper\ - -\f2\i Rootless acceleration and Apple-WM extension -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Additional XonX Contributors to XFree86 4.3: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Fabr\'92cio Luis de Castro\ - -\f2\i Portuguese localization -\f0\i0 \ -Michael Oland\ - -\f2\i New XDarwin icon -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Contributors to XFree86 4.2: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Pablo Di Noto\ - -\f2\i Spanish localization -\f0\i0 \ -Paul Edens\ - -\f2\i Dutch localization -\f0\i0 \ -Kyunghwan Kim\ - -\f2\i Korean localization -\f0\i0 \ -Mario Klebsch\ - -\f2\i Non-US keyboard support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i German localization -\f0\i0 \ -Patrik Montgomery\ - -\f2\i Swedish localization -\f0\i0 \ -Greg Parker\ - -\f2\i Rootless support -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -Olivier Verdier\ - -\f2\i French localization -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Devin Poolman and Zero G Software, Inc.\ - -\f2\i Installer -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Team Members\ -Contributing to XFree86 4.1: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Cocoa version of XDarwin front end -\f0\i0 \ -Greg Parker\ - -\f2\i Original Quartz implementation -\f0\i0 \ -Christoph Pfisterer\ - -\f2\i Dynamic shared libraries -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Tiago Ribeiro\ - -\f2\i XDarwin icon -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 History: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Carmack\ - -\f2\i Original XFree86 port to Mac OS X Server -\f0\i0 \ -Dave Zarzycki\ - -\f2\i XFree86 4.0 port to Darwin 1.0 -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/hw/darwin/bundle/German.lproj/Localizable.strings b/hw/darwin/bundle/German.lproj/Localizable.strings deleted file mode 100644 index 5db6306ec3bd77993bc49f3b2fc37deff236e60f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1458 zcma)+TW{Jx5QV>Ie#HpoDJnK3O;r(9Rgzv_S|t^&%BzjnKx-SzmjLg z>kOYgLct1y@D+~*!aXyDIYLOLwF(47LV$yCj?17%b;g`eWEc!@dBYT8#{!pBbC+az z#N@clwQpAAbXl>*CBP$NtN2`eO6?P2a62h@MTk;EE}iyjDIoWIB^&=Oa5(gtO!1huOcgrqI3zrmY@UCCgW;N*SVK z-jHvUnp3fBRXDKmo*}|Jgdrc4Ya26S)`}5)<=N_B)v!6&3|e>$JMCTR{=aC7+8d1% ztoChmqWVNSOQDEj&GGb4bW+Pzrs^ffdbZ9_{R`NzMVPTyjSR7JWc}56#Obi$satP5 zGmFk{z1?TWo`pQKs`-DS)E@nO%SxqErNYbjMm%)z#TZ4{=Dbm~dKHbvjhD98n3Gpb2)CIpW>~&+Lq(@Cc*0pC3h<`BS2Ipja)7@4t zDaf_^OVMp^`gn46QK9+Wt#sHaL+*$P7;#TZ!3eK~;M85a->u>+bYodBH?MPB^CjBb dZqVhCk1nc;vj&fKfFW0RRd)>|r|zy9`~zUs>>B_8 diff --git a/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib deleted file mode 100644 index 77f345a4e..000000000 --- a/hw/darwin/bundle/German.lproj/MainMenu.nib/classes.nib +++ /dev/null @@ -1,72 +0,0 @@ -{ - IBClasses = ( - { - ACTIONS = {showHelp = id; }; - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; - CLASS = Preferences; - LANGUAGE = ObjC; - OUTLETS = { - addToPathButton = id; - addToPathField = id; - button2ModifiersMatrix = id; - button3ModifiersMatrix = id; - depthButton = id; - displayField = id; - dockSwitchButton = id; - fakeButton = id; - keymapFileField = id; - modeMatrix = id; - modeWindowButton = id; - mouseAccelChangeButton = id; - startupHelpButton = id; - switchKeyButton = id; - systemBeepButton = id; - useDefaultShellMatrix = id; - useOtherShellField = id; - useXineramaButton = id; - window = id; - }; - SUPERCLASS = NSObject; - }, - { - CLASS = XApplication; - LANGUAGE = ObjC; - OUTLETS = {preferences = id; xserver = id; }; - SUPERCLASS = NSApplication; - }, - { - ACTIONS = { - bringAllToFront = id; - closeHelpAndShow = id; - itemSelected = id; - nextWindow = id; - previousWindow = id; - showAction = id; - showSwitchPanel = id; - startFullScreen = id; - startRootless = id; - }; - CLASS = XServer; - LANGUAGE = ObjC; - OUTLETS = { - dockMenu = NSMenu; - helpWindow = NSWindow; - modeWindow = NSWindow; - startFullScreenButton = NSButton; - startRootlessButton = NSButton; - startupHelpButton = NSButton; - startupModeButton = NSButton; - switchWindow = NSPanel; - windowMenu = NSMenu; - windowSeparator = NSMenuItem; - }; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/German.lproj/MainMenu.nib/objects.nib deleted file mode 100644 index 28fff8920ea44119c220f947d734caeac56c97ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21182 zcmeHvdwdjC(rBF_36F%3AOsN~ExIZ$1QP`LSalO#D<2ZU0by6Y>}2L7X*1IkdwL-9 zxr-HgdUe(Pb|bWjvVfv263wTsyNV#<;uCzrx;~E2^?4TsUA&8g$J}3??w<5a0_wf@ z`{Vw84!>qP=TW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J*NRW7EWE2%iarRmc=UzDqVo>_K>2Aao*|Cnh2rA&{*)S&Y3(kVlg( z6sr&(6cJ=Gf$SlKlpy~Us};y9k+q9y$i@i_3`e$Bu%!aoZe+g{2wRX{BFNjuelF^e zX#&}!2)`3ckR=4N!^nOmK1A3p$XCj0#L3BaWb4|Y)qJq6WX9wv@o+peT@S_h;yC>@ G*Z&42ZzR6} diff --git a/hw/darwin/bundle/German.lproj/Makefile.am b/hw/darwin/bundle/German.lproj/Makefile.am deleted file mode 100644 index 17af414ec..000000000 --- a/hw/darwin/bundle/German.lproj/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -BINDIR = ${bindir} -include $(top_srcdir)/cpprules.in -XINITDIR = $(libdir)/X11/xinit -XDEFS = \ - -DX_VERSION="$(PLIST_VERSION_STRING)" \ - -DX_PRE_RELEASE="$(PRE)" \ - -DX_REL_DATE="$(XORG_DATE)" \ - -DX_VENDOR_NAME="$(VENDOR_STRING)" \ - -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" - -resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources - -Germanlprojdir = $(resourcesdir)/German.lproj - -Germanlproj_DATA = \ - XDarwinHelp.html \ - InfoPlist.strings \ - Credits.rtf Localizable.strings - -Germanlprojnibdir = $(Germanlprojdir)/MainMenu.nib -Germanlprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib - -InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp diff --git a/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index db33670d9..000000000 --- a/hw/darwin/bundle/German.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,94 +0,0 @@ - - -XDarwin Help - - -
-

XDarwin X Server for Mac OS X

- X_VENDOR_NAME X_VERSION
- Release Date: X_REL_DATE -
-

Contents

-
    -
  1. Important Notice
  2. -
  3. Usage
  4. -
  5. Setting Your Path
  6. -
  7. User Preferences
  8. -
  9. License
  10. -
-
-

Important Notice

-
-
-#if X_PRE_RELEASE -This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from XonX or the X_VENDOR_LINK. -#else -If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. -#endif -
-
-This software is distributed under the terms of the MIT X11 / X Consortium License and is provided AS IS, with no warranty. Please read the License before using.
- -

Usage

-

XDarwin is a freely redistributable open-source X server for the X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.

-

In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)

-

In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.

-

Multi-Button Mouse Emulation

-

Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.

- -

Setting Your Path

-

Your path is the list of directories to be searched for executable commands. The X11 commands are located in /usr/X11R6/bin, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.

-

More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.

-

In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

- -

User Preferences

-

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

-

General

-
    -
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.
  • -
  • Allow X11 to change mouse acceleration: In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.
  • -
  • Multi-Button Mouse Emulation: This is described above under Usage. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.
  • -
-

Start Up

-
    -
  • Default Mode: If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.
  • -
  • Show mode pick panel on startup: By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.
  • -
  • X11 Display number: X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.
  • -
  • Allow Xinerama multiple monitor support: XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.
  • -
  • Keymapping File: A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in /System/Library/Keyboards.
  • -
  • Starting First X11 Clients: When XDarwin is started from the Finder, it will run xinit to launch the X window manager and other X clients. (See "man xinit" for more information.) Before XDarwin runs xinit it will add the specified directories to the user's path. By default only /usr/X11R6/bin is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.
  • -
-

Full Screen

-
    -
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • -
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • -
  • Show help on startup: This will show an introductory splash screen when XDarwin is started in full screen mode.
  • -
  • Color bit depth: In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.
  • -
- -

License

-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. -

X Consortium License

-

Copyright (C) 1996 X Consortium

-

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 X CONSORTIUM 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 X Consortium 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 X Consortium.

-

X Window System is a trademark of X Consortium, Inc.

- - diff --git a/hw/darwin/bundle/Info.plist b/hw/darwin/bundle/Info.plist deleted file mode 100644 index bfef48d26..000000000 --- a/hw/darwin/bundle/Info.plist +++ /dev/null @@ -1,66 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - x11app - - CFBundleTypeName - X11 Application - CFBundleTypeOSTypes - - **** - - CFBundleTypeRole - Viewer - - - CFBundleTypeExtensions - - tool - * - - CFBundleTypeName - UNIX Application - CFBundleTypeOSTypes - - **** - - CFBundleTypeRole - Viewer - - - CFBundleExecutable - XDarwin - CFBundleGetInfoString - XDarwin 1.4.0, X.Org Foundation - CFBundleIconFile - XDarwin.icns - CFBundleIdentifier - org.x.XDarwin - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - XDarwin - CFBundlePackageType - APPL - CFBundleShortVersionString - XDarwin 1.4.0 - CFBundleSignature - ???? - CFBundleVersion - - NSHelpFile - XDarwinHelp.html - NSMainNibFile - MainMenu - NSPrincipalClass - XApplication - - diff --git a/hw/darwin/bundle/Japanese.lproj/Credits.rtf b/hw/darwin/bundle/Japanese.lproj/Credits.rtf deleted file mode 100644 index cf9eae207..000000000 --- a/hw/darwin/bundle/Japanese.lproj/Credits.rtf +++ /dev/null @@ -1,193 +0,0 @@ -{\rtf1\mac\ansicpg10001\cocoartf102 -{\fonttbl\f0\fnil\fcharset78 HiraKakuPro-W3;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Bold; -\f3\fswiss\fcharset77 Helvetica-Oblique;} -{\colortbl;\red255\green255\blue255;} -\vieww13980\viewh11160\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\fs24 \cf0 \'82\'b1\'82\'cc\'90\'bb\'95\'69\'82\'cd -\f1 XFree86 -\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 -\f1 (http://www.xfree86.org/) -\f0 \'82\'a8\'82\'e6\'82\'d1\'82\'bb\'82\'cc\'8d\'76\'8c\'a3\'8e\'d2\'82\'c9\'82\'e6\'82\'c1\'82\'c4\'8a\'4a\'94\'ad\'82\'b3\'82\'ea\'82\'bd\'83\'5c\'83\'74\'83\'67\'83\'45\'83\'46\'83\'41\'82\'f0\'8a\'dc\'82\'f1\'82\'c5\'82\'a2\'82\'dc\'82\'b7\'81\'42\'8e\'9f\'82\'cc\'90\'6c\'81\'58\'82\'cd Darwin -\f1 /Mac OS X -\f0 \'82\'cc\'83\'54\'83\'7c\'81\'5b\'83\'67\'82\'c9\'8d\'76\'8c\'a3\'82\'b5\'82\'dc\'82\'b5\'82\'bd\'81\'42 -\f1 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f2\b \cf0 Contributors to Xorg Foundation Release: -\f1\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Kaleb KEITHLEY\ - -\f0 \'8d\'b6\'89\'45\'82\'cc Ctrl,Alt(Option),Meta(Command) \'82\'a8\'82\'e6\'82\'d1 Shift \'83\'4c\'81\'5b\'82\'cc\'93\'ae\'8d\'ec -\f1 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f2\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Contributors to XFree86 4.4: -\f1\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Harper -\f3\i \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f0\i0 \cf0 \'83\'8b\'81\'5b\'83\'67\'83\'8c\'83\'58 \'83\'41\'83\'4e\'83\'5a\'83\'89\'83\'8c\'81\'5b\'83\'56\'83\'87\'83\'93 \'82\'a8\'82\'e6\'82\'d1 Apple-WM \'8a\'67\'92\'a3 -\f1 \ -Torrey T. Lyons\ - -\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f2\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Additional XonX Contributors to XFree86 4.3: -\f1\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Fabr\'92cio Luis de Castro\ - -\f0 \'83\'7c\'83\'8b\'83\'67\'83\'4b\'83\'8b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -Michael Oland\ - -\f0 \'90\'56\'82\'b5\'82\'a2 -\f1 XDarwin -\f0 \'83\'41\'83\'43\'83\'52\'83\'93 -\f1 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f2\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Contributors to XFree86 4.2: -\f1\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - Darwin x86 -\f3\i -\f0\i0 \'83\'54\'83\'7c\'81\'5b\'83\'67 -\f1 \ -Pablo Di Noto\ - -\f3\i -\f0\i0 \'83\'58\'83\'79\'83\'43\'83\'93\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -Paul Edens\ - -\f3\i -\f0\i0 \'83\'49\'83\'89\'83\'93\'83\'5f\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -Kyunghwan Kim\ - -\f3\i -\f0\i0 \'8a\'d8\'8d\'91\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -Mario Klebsch\ - -\f0 \'94\'f1US\'83\'4c\'81\'5b\'83\'7b\'81\'5b\'83\'68 \'83\'54\'83\'7c\'81\'5b\'83\'67 -\f1 \ -Torrey T. Lyons\ - -\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b -\f1 \ -Andreas Monitzer\ - -\f0 \'83\'68\'83\'43\'83\'63\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -Patrik Montgomery\ - -\f3\i -\f0\i0 \'83\'58\'83\'45\'83\'46\'81\'5b\'83\'66\'83\'93\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -Greg Parker\ - -\f0 \'83\'8b\'81\'5b\'83\'67\'83\'8c\'83\'58 \'83\'54\'83\'7c\'81\'5b\'83\'67 -\f1 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f0 \cf0 \'93\'63\'92\'86 \'8f\'72\'8c\'f5 -\f1 \ - -\f0 \'93\'fa\'96\'7b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -Olivier Verdier\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f3\i \cf0 -\f0\i0 \'83\'74\'83\'89\'83\'93\'83\'58\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f2\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Special Thanks: -\f1\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Devin Poolman and Zero G Software, Inc.\ - -\f3\i -\f0\i0 \'83\'43\'83\'93\'83\'58\'83\'67\'81\'5b\'83\'89 -\f1 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f2\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Team Members\ -Contributing to XFree86 4.1: -\f1\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - Darwin x86 -\f0 \'83\'54\'83\'7c\'81\'5b\'83\'67 -\f1 \ -Torrey T. Lyons\ - -\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67 \'83\'8a\'81\'5b\'83\'5f\'81\'5b -\f1 \ -Andreas Monitzer\ - Cocoa -\f0 \'94\'c5 XDarwin \'83\'74\'83\'8d\'83\'93\'83\'67\'83\'47\'83\'93\'83\'68 -\f1 \ -Greg Parker\ - -\f0 \'8d\'c5\'8f\'89\'82\'cc Quartz \'83\'43\'83\'93\'83\'76\'83\'8a\'83\'81\'83\'93\'83\'67 -\f1 \ -Christoph Pfisterer\ - -\f0 \'8b\'a4\'97\'4c\'83\'89\'83\'43\'83\'75\'83\'89\'83\'8a -\f1 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f0 \cf0 \'93\'63\'92\'86 \'8f\'72\'8c\'f5 -\f1 \ - -\f0 \'93\'fa\'96\'7b\'8c\'ea\'83\'8d\'81\'5b\'83\'4a\'83\'89\'83\'43\'83\'59 -\f1 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f2\b \cf0 Special Thanks: -\f1\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Tiago Ribeiro\ - XDarwin -\f0 \'83\'41\'83\'43\'83\'52\'83\'93 -\f1 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f2\b \cf0 History: -\f1\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Carmack\ - -\f0 XFree86 \'82\'cc Mac OS X Server \'82\'d6\'82\'cc\'8d\'c5\'8f\'89\'82\'cc\'88\'da\'90\'41 -\f1 \ -Dave Zarzycki\ - XFree86 4.0 -\f0 \'82\'f0 Darwin 1.0 \'82\'c9\'88\'da\'90\'41 -\f1 \ -Torrey T. Lyons\ - XFree86 4.0.2 -\f0 \'83\'76\'83\'8d\'83\'57\'83\'46\'83\'4e\'83\'67\'82\'d6\'82\'cc\'93\'9d\'8d\'87} \ No newline at end of file diff --git a/hw/darwin/bundle/Japanese.lproj/Localizable.strings b/hw/darwin/bundle/Japanese.lproj/Localizable.strings deleted file mode 100644 index c5c26d61a29501613b8879fcad648cb985433a52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1152 zcmb7^v2N2)6ox-B7T$rYs8gk;XF>>s5N*W(qNPf!l+jJD6ARmk>}x`h=*R=`9+g-+ z!9%dIA~7Mv#99$_j}zN9EfS-z?>Xl`-|yeQ7i_VC;Ryj#0#YnF7DLR00Rb@)Z?Ft8 zyuy-^6EPtr$1owpkmJaRNEzvAp*?)X33CjNvG#mMzyQNOJq*VfLNe{;Fj!KCbTMqO z#oAKYI>$UF!(zG19qwURukNgF9TMS)bxNtpEB9)B=hbF$RoCHwLTgGLe&=kt-$ObW z9$@HrjdCs*@>wqA{oC!mchZ+rc_B|1x9M=7wT1%AYn}Fg^WBnLP04d<>M_iSh*iB) zor%^2`ef8KPdTF?C9V4TK7D-}GGT_H$6UR#Bud4zACVD|kkhUAJ{U_V>5|PqddL^~ zDIes!d|lC5+`5+8jTW)mfzt2VlZwA5-m2QseFxY}ZZ=P=YB`f{@=HF-k5-ReEFl2} zu{!n=%bY|rFs=B7O5JB+rSFIykLX@`znc12mae?L>G}k{s`L1FjXFfkC PpQJD0-c31@-O`aiN^;Gl diff --git a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib deleted file mode 100644 index 77f345a4e..000000000 --- a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/classes.nib +++ /dev/null @@ -1,72 +0,0 @@ -{ - IBClasses = ( - { - ACTIONS = {showHelp = id; }; - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; - CLASS = Preferences; - LANGUAGE = ObjC; - OUTLETS = { - addToPathButton = id; - addToPathField = id; - button2ModifiersMatrix = id; - button3ModifiersMatrix = id; - depthButton = id; - displayField = id; - dockSwitchButton = id; - fakeButton = id; - keymapFileField = id; - modeMatrix = id; - modeWindowButton = id; - mouseAccelChangeButton = id; - startupHelpButton = id; - switchKeyButton = id; - systemBeepButton = id; - useDefaultShellMatrix = id; - useOtherShellField = id; - useXineramaButton = id; - window = id; - }; - SUPERCLASS = NSObject; - }, - { - CLASS = XApplication; - LANGUAGE = ObjC; - OUTLETS = {preferences = id; xserver = id; }; - SUPERCLASS = NSApplication; - }, - { - ACTIONS = { - bringAllToFront = id; - closeHelpAndShow = id; - itemSelected = id; - nextWindow = id; - previousWindow = id; - showAction = id; - showSwitchPanel = id; - startFullScreen = id; - startRootless = id; - }; - CLASS = XServer; - LANGUAGE = ObjC; - OUTLETS = { - dockMenu = NSMenu; - helpWindow = NSWindow; - modeWindow = NSWindow; - startFullScreenButton = NSButton; - startRootlessButton = NSButton; - startupHelpButton = NSButton; - startupModeButton = NSButton; - switchWindow = NSPanel; - windowMenu = NSMenu; - windowSeparator = NSMenuItem; - }; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Japanese.lproj/MainMenu.nib/objects.nib deleted file mode 100644 index 3570027061b3b12dfe7d4ae20fa960832b55660a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21854 zcmeHvdw3K@_UNg}14u$3ks#nJ;C`}-fC-8&8zBJ~Ws!)4Rao@mFlk^UnTazKf!+NH zXQrp+A-X#zO~NCDSAYZpE=qWVEBiz7v4XljY7xDi2g*-DSzQf}x!J9X8E!#rxzBD8~wnH$0eKR9;?TS z@QEyUEiBUCfIpyD8B^}|I7{`HH&@7(d}`XYu&Bu6vO8w63YiT`n^I6#R${kVJ$9!< z@hdX3FHrSbqsu)WrvqfUTVc@{r^DlNmfS4M$%RD^*`>KR%W`UA(Im-T=5!QGE~p5| zs{;ONkkj(>^YdpKA03Se0HY2G@`yGiq|({Q`C5GPn|*$)(DPswfz>}Xl%Yu>$7!%f*!a&odCwmXWQ zbF)*5=DR&oX}0DKv@ES`KCnu|N)1hGSo@wUlpn-8r%y;-2R@EM{H zHj0)9wS~(xY-~BOPQy)6IECP9SkZjoP+P@j4I4D9*St$pS{5&(FTO3BcZ25LN5t^% zXH2LN9uj1&B$O9=6BimmYFksqi(5hUT-%-#rZWCGCt5Pz@JSv#%J5J2MIQFV1*nOz3hBv)14a{8sFmZg=g z)m{x7+A8*awtAiBTPIj(vE~hYhPzvr)X;=_mnvKQ{;gu5JLPU}x7|)mpO5frUyJv? zya$7FRTU6fdlZI*)KCq^`<{h{4w)pmo#if@baRC&S5EE-p8oh1=rNS(~Jdu+26 z0(4afYf)Y#+9Xs2qU-q;B_OX46CvXkWG6-oAs-z@gpG9(d8L6POCb5u1x}a3wxwI! z8kTCfT*EcZ`x;vX8)@F{ny+3EWM}j4C4$c?HD80~jVg)|4L4~EQE=-T4Y#L+MO*Vd z9cr^k^Z7L2@({QN0ez9?+e#I})W=Q6e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SU-WFI2SvV6prwXlOuZ*;jjE z^9_6*!oN7OHe~ZT!rRCyIMS+u%ts)*kE5jrvOjVsvd8#)2$y+RWMv#-1F|U`S>rT5 z5!nqK**C}*a%8*yz{P6BNlt4g@Mn(jo_uw>?%&{ zDXfYk+d;L`e#?>VM|hT_B>~yf9O3gG{Ci}joYpniQjQSxaD;>Z#SsF?e#Mb}hU|A7 z*+GQocpkFf@M*{%<$}3Yj+P8$f8w+j!U7!GzmOp(?*LYEWQP&{#50h&cpI|e9NBS% zqZ}wLLsrcv zA)Ct4auu@YIhj@1&MzQy@Jgayav~QCI{)CGBFo{(zDMTeX~^6h**gfIaIqluKO8On zk!|3}P9e+UImjk)gr&%`c|T-?#cl*INBC+MM@tuEOE|K>A}r@(mB`1lka;+=FOdC# zBTG-^2&<9(n$w~(tK>6~&Eh)|E^>tS?i?*y$X4^uk=@CWZ6&sSktXN@G9O2_7lCAC z*DtvEU8z5E1Vm=z2(`$HI9hH*wvi+I6xr1r;qX&@6tZjiDP-61`N(E+u{_23y$DD6 zQG^Q|E!~hk!;u|DSi_N7%K78Srg3Cvk^L7(HUQyyj<6NkgIt(}d$?FP{fHwiM`AUy cx@ri>d#ZYl8$HHpb6Ur`tfkUiCml)tKMF4NR{#J2 diff --git a/hw/darwin/bundle/Japanese.lproj/Makefile.am b/hw/darwin/bundle/Japanese.lproj/Makefile.am deleted file mode 100644 index 2cc524858..000000000 --- a/hw/darwin/bundle/Japanese.lproj/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -BINDIR = ${bindir} -include $(top_srcdir)/cpprules.in -XINITDIR = $(libdir)/X11/xinit -XDEFS = \ - -DX_VERSION="$(PLIST_VERSION_STRING)" \ - -DX_PRE_RELEASE="$(PRE)" \ - -DX_REL_DATE="$(XORG_DATE)" \ - -DX_VENDOR_NAME="$(VENDOR_STRING)" \ - -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" - - -resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources - -Japaneselprojdir = $(resourcesdir)/Japanese.lproj - -Japaneselproj_DATA = \ - XDarwinHelp.html \ - InfoPlist.strings \ - Credits.rtf Localizable.strings - -Japaneselprojnibdir = $(Japaneselprojdir)/MainMenu.nib -Japaneselprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib - -InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp diff --git a/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index 6653f5bea..000000000 --- a/hw/darwin/bundle/Japanese.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - -XDarwin Help - -
-

XDarwin X Server for Mac OS X

- X_VENDOR_NAME X_VERSION
- Release Date: X_REL_DATE -
-

Ìܼ¡

-
    -
  1. Ãí°Õ»ö¹à
  2. -
  3. »ÈÍÑË¡
  4. -
  5. ¥Ñ¥¹¤ÎÀßÄê
  6. -
  7. ´Ä¶­ÀßÄê
  8. -
  9. ¥é¥¤¥»¥ó¥¹
  10. -
-
-

Ãí°Õ»ö¹à

-
-
-#if X_PRE_RELEASE -¤³¤ì¤Ï¡¤XDarwin ¤Î¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Ç¤¢¤ê¡¤¤¤¤«¤Ê¤ë¾ì¹ç¤Ë¤ª¤¤¤Æ¤â¥µ¥Ý¡¼¥È¤µ¤ì¤Þ¤»¤ó¡£ -¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ -¥×¥ì¥ê¥ê¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¤Î¥Ð¥°¤òÊó¹ð¤¹¤ëÁ°¤Ë¡¤XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤Þ¤¿¤Ï X_VENDOR_LINK¤ÇºÇ¿·ÈǤΥÁ¥§¥Ã¥¯¤ò¤·¤Æ²¼¤µ¤¤¡£ -#else -¤â¤·¡¤¥µ¡¼¥Ð¡¼¤¬ 6 -12 ¥ö·î°Ê¾åÁ°¤Î¤â¤Î¤«¡¤¤Þ¤¿¤Ï¤¢¤Ê¤¿¤Î¥Ï¡¼¥É¥¦¥§¥¢¤¬¾åµ­¤ÎÆüÉÕ¤è¤ê¤â¿·¤·¤¤¤â¤Î¤Ê¤é¤Ð¡¤ÌäÂê¤òÊó¹ð¤¹¤ëÁ°¤Ë¤è¤ê¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤òõ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£ -¥Ð¥°¤ÎÊó¹ð¤ä¥Ñ¥Ã¥Á¤¬ SourceForge ¤Î XonX ¥×¥í¥¸¥§¥¯¥È¥Ú¡¼¥¸¤ËÄó½Ð¤µ¤ì¤Æ¤¤¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ -#endif -
-
-ËÜ¥½¥Õ¥È¥¦¥§¥¢¤Ï¡¤MIT X11/X Consortium License ¤Î¾ò·ï¤Ë´ð¤Å¤­¡¤ÌµÊݾڤǡ¤¡Ö¤½¤Î¤Þ¤Þ¡×¤Î·Á¤Ç¶¡µë¤µ¤ì¤Þ¤¹¡£ -¤´»ÈÍѤˤʤëÁ°¤Ë¡¤¥é¥¤¥»¥ó¥¹¾ò·ï¤ò¤ªÆÉ¤ß²¼¤µ¤¤¡£ -
- -

»ÈÍÑË¡

-

XDarwin ¤Ï¡¤ºÆÇÛÉÛ²Äǽ¤Ê¥ª¡¼¥×¥ó¥½¡¼¥¹¤Î X Window System ¤Î¤¿¤á¤Î X ¥µ¡¼¥Ð¡¼¤Î¼ÂÁõ¤Ç¤¹¡£¤³¤Î¥Ð¡¼¥¸¥ç¥ó¤Î XDarwin ¤Ï X_VENDOR_LINK ¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤Þ¤·¤¿¡£XDarwin ¤Ï¡¤Mac OS X ¾å¤Ç¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Çưºî¤·¤Þ¤¹¡£

- -

¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤¬¥¢¥¯¥Æ¥£¥Ö¤Ê»þ¡¤¤½¤ì¤ÏÁ´²èÌ̤òÀêÍ­¤·¤Þ¤¹¡£ -¤¢¤Ê¤¿¤Ï¡¤Command-Option-A ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤ØÀÚ¤êÂØ¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥­¡¼¤ÎÁȤ߹ç¤ï¤»¤Ï¡¤´Ä¶­ÀßÄê¤ÇÊѹ¹²Äǽ¤Ç¤¹¡£ -Mac OS X ¥Ç¥¹¥¯¥È¥Ã¥×¤«¤é X Window System ¤ØÀÚ¤êÂØ¤¨¤ë¾ì¹ç¤Ï¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ²¼¤µ¤¤¡£ -¡Ê´Ä¶­ÀßÄê¤Ç¡¤¥Õ¥í¡¼¥Æ¥£¥ó¥°¡¦¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤è¤¦¤ËÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë

- -

¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ï¡¤X Window System ¤È Aqua ¤Ï²èÌ̤ò¶¦Í­¤·¤Þ¤¹¡£ -X11 ¤¬É½¼¨¤¹¤ë¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï²èÌ̤Υµ¥¤¥º¤Ç¤¢¤ê¡¤Â¾¤ÎÁ´¤Æ¤Î¥¦¥£¥ó¥É¥¦¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£ -Aqua ¤¬¥Ç¥¹¥¯¥È¥Ã¥×¤ÎÇØ·Ê¤òÀ©¸æ¤¹¤ë¤Î¤Ç¡¤X11 ¤Î¥ë¡¼¥È¥¦¥£¥ó¥É¥¦¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Ç¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£

- -

Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó

-

¿¤¯¤Î X11 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¤3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤òɬÍפȤ·¤Þ¤¹¡£ -¤¢¤Ê¤¿¤Ï¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ÈƱ»þ¤Ë¤¤¤¯¤Ä¤«¤Î½¤¾þ¥­¡¼¤ò²¡¤¹¤³¤È¤Ë¤è¤Ã¤Æ¡¤°ì¤Ä¤Î¥Ü¥¿¥ó¤Ç 3 ¥Ü¥¿¥ó¥Þ¥¦¥¹¤ò¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ -¤³¤ì¤Ï¡¤´Ä¶­ÀßÄê¤Î¡Ö°ìÈÌÀßÄê¡×¤Î¡ÖÊ£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¡×¥»¥¯¥·¥ç¥ó¤ÇÀßÄꤷ¤Þ¤¹¡£ -¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤ÏÍ­¸ú¤Ç¡¤¥³¥Þ¥ó¥É¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 2 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£ -¥ª¥×¥·¥ç¥ó¥­¡¼¤ò²¡¤·¤Ê¤¬¤é¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤ÏÂè 3 ¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î¥¯¥ê¥Ã¥¯¤ËÁêÅö¤·¤Þ¤¹¡£ -¤¢¤Ê¤¿¤Ï¡¤´Ä¶­ÀßÄê¤Ç¥Ü¥¿¥ó 2 ¤È 3 ¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë½¤¾þ¥­¡¼¤ÎÁȹ礻¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ -Ãí¡§½¤¾þ¥­¡¼¤ò xmodmap ¤Ç¾¤Î¥­¡¼¤Ë³ä¤êÅö¤Æ¤Æ¤¤¤ë¾ì¹ç¤Ç¤â¡¤Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó¤Ç¤ÏËÜÍè¤Î¥³¥Þ¥ó¥É¥­¡¼¤ä¥ª¥×¥·¥ç¥ó¥­¡¼¤ò»È¤ï¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

- -

¥Ñ¥¹¤ÎÀßÄê

-

¥Ñ¥¹¤Ï¡¤ ¼Â¹Ô²Äǽ¤Ê¥³¥Þ¥ó¥É¤ò¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤Ç¤¹¡£ -X11 ¥Ð¥¤¥Ê¥ê¤Ï¡¤/usr/X11R6/bin ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤½¤ì¤ò¥Ñ¥¹¤Ë²Ã¤¨¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ -XDarwin ¤Ï¡¤¤³¤ì¤ò¥Ç¥Õ¥©¥ë¥È¤Ç¹Ô¤¤¤Þ¤¹¡£¤Þ¤¿¡¤¤¢¤Ê¤¿¤¬¥³¥Þ¥ó¥É¥é¥¤¥ó¡¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¥¤¥ó¥¹¥È¡¼¥ë¤·¤¿ÄɲäΥǥ£¥ì¥¯¥È¥ê¤ò²Ã¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

- -

·Ð¸³Ë­¤«¤Ê¥æ¡¼¥¶¡¼¤Ï¡¤¤¹¤Ç¤Ë¼«¤é¤Î¥·¥§¥ë¤Î¤¿¤á¤Ë½é´ü²½¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Æ¥Ñ¥¹¤òÀßÄꤷ¤Æ¤¤¤ë¤Ç¤·¤ç¤¦¡£ -¤³¤Î¾ì¹ç¡¤¤¢¤Ê¤¿¤Ï´Ä¶­ÀßÄê¤Ç XDarwin ¤¬¤¢¤Ê¤¿¤Î¥Ñ¥¹¤òÊѹ¹¤·¤Ê¤¤¤è¤¦¤ËÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ -XDarwin ¤Ï¡¤¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤ÇºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤ò³«»Ï¤·¤Þ¤¹¡£ -¡Ê´Ä¶­ÀßÄê¤ÇÂå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡Ë -¥Ñ¥¹¤òÀßÄꤹ¤ëÊýË¡¤Ï¡¤¤¢¤Ê¤¿¤¬»ÈÍѤ·¤Æ¤¤¤ë¥·¥§¥ë¤Ë°Í¸¤·¤Þ¤¹¡£ -¤³¤ì¤Ï¡¤¥·¥§¥ë¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¥É¥­¥å¥á¥ó¥È¤Ëµ­ºÜ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ - -

¤Þ¤¿¡¤¤¢¤Ê¤¿¤Ï¥É¥­¥å¥á¥ó¥È¤òõ¤·¤Æ¤¤¤ë»þ¡¤X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò¸¡º÷¤µ¤ì¤ë¥Ú¡¼¥¸¤Î¥ê¥¹¥È¤ËÄɲä·¤¿¤¤¤È»×¤¦¤«¤â¤·¤ì¤Þ¤»¤ó¡£ -X11 ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ï /usr/X11R6/man ¤ËÃÖ¤«¤ì¤Þ¤¹¡£¤½¤·¤Æ MANPATH ´Ä¶­ÊÑ¿ô¤Ï¸¡º÷¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£

- -

´Ä¶­ÀßÄê

-

¡ÖXDarwin¡×¥á¥Ë¥å¡¼¤Î¡Ö´Ä¶­ÀßÄê...¡×¥á¥Ë¥å¡¼¹àÌܤ«¤é¥¢¥¯¥»¥¹¤Ç¤­¤ë´Ä¶­ÀßÄê¥Ñ¥Í¥ë¤Ç¡¤¤¤¤¯¤Ä¤«¤Î¥ª¥×¥·¥ç¥ó¤òÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ -¡Öµ¯Æ°¥ª¥×¥·¥ç¥ó¡×¤ÎÆâÍÆ¤Ï¡¤XDarwin ¤òºÆµ¯Æ°¤¹¤ë¤Þ¤ÇÍ­¸ú¤È¤Ê¤ê¤Þ¤»¤ó¡£ -¾¤ÎÁ´¤Æ¤Î¥ª¥×¥·¥ç¥ó¤ÎÆâÍÆ¤Ï¡¤Ä¾¤Á¤ËÍ­¸ú¤È¤Ê¤ê¤Þ¤¹¡£ -°Ê²¼¡¤¤½¤ì¤¾¤ì¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹:

- -

°ìÈÌÀßÄê

-
    -
  • X11 ¤Ç¥·¥¹¥Æ¥à¤Î¥Ó¡¼¥×²»¤ò»ÈÍѤ¹¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤Mac OS X ¤Î¥Ó¡¼¥×²»¤¬ X11 ¤Î¥Ù¥ë¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£¥ª¥Õ¤Î¾ì¹ç¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡¤¥·¥ó¥×¥ë ¥È¡¼¥ó¤¬»È¤ï¤ì¤Þ¤¹¡£
  • -
  • X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤Ë¤¹¤ë: ɸ½àŪ¤Ê X Window System ¤Î¼ÂÁõ¤Ç¤Ï¡¤¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤Ï¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤òÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ - ¥Þ¥¦¥¹¤Î²Ã®ÅÙ¤Ë Mac OS X ¤Î¥·¥¹¥Æ¥à´Ä¶­ÀßÄê¤È X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤¬°Û¤Ê¤ëÃͤòÀßÄꤷ¤¿¾ì¹ç¡¤¤³¤ì¤Ïº®Íð¤ò¾·¤­¤Þ¤¹¡£ - ¤³¤ÎÌäÂê¤òÈò¤±¤ë¤¿¤á¡¤¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï X11 ¤Î¥Þ¥¦¥¹¥¢¥¯¥»¥é¥ì¡¼¥·¥ç¥ó¤òÍ­¸ú¤È¤·¤Þ¤»¤ó¡£
  • -
  • Ê£¿ô¥Ü¥¿¥ó¥Þ¥¦¥¹¤Î¥¨¥ß¥å¥ì¡¼¥·¥ç¥ó: »ÈÍÑË¡¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¥ª¥ó¤Î¾ì¹ç¡¤¥Þ¥¦¥¹¥Ü¥¿¥ó¤¬Âè 2 ¤Þ¤¿¤ÏÂè 3 ¤Î¥Þ¥¦¥¹¥Ü¥¿¥ó¤ò¥¨¥ß¥å¥ì¡¼¥È¤¹¤ë»þ¤Ë¡¤ÁªÂò¤·¤¿½¤¾þ¥­¡¼¤òƱ»þ¤Ë²¡¤·¤Þ¤¹¡£
  • -
- -

µ¯Æ°¥ª¥×¥·¥ç¥ó

-
    -
  • ²èÌ̥⡼¥É: ¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¡¤¤³¤³¤Ç»ØÄꤵ¤ì¤¿¥â¡¼¥É¤¬»È¤ï¤ì¤Þ¤¹¡£
  • -
  • µ¯Æ°»þ¤Ë¥â¡¼¥ÉÁªÂò¥Ñ¥Í¥ë¤òɽ¼¨¤¹¤ë: ¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤XDarwin ¤Îµ¯Æ°»þ¤Ë¥æ¡¼¥¶¡¼¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Þ¤¿¤Ï¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤òÁªÂò¤¹¤ë¥Ñ¥Í¥ë¤òɽ¼¨¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤¬¥ª¥Õ¤Î¾ì¹ç¡¤²èÌ̥⡼¥É¤Ç»ØÄꤷ¤¿¥â¡¼¥É¤Çµ¯Æ°¤·¤Þ¤¹¡£
  • -
  • X11 ¥Ç¥£¥¹¥×¥ì¥¤ÈÖ¹æ: X11¤Ï¡¤°ì¤Ä¤Î¥³¥ó¥Ô¥å¡¼¥¿¾å¤ÇÊÌ¡¹¤Î X ¥µ¡¼¥Ð¡¼¤¬´ÉÍý¤¹¤ëÊ£¿ô¤Î¥Ç¥£¥¹¥×¥ì¥¤¤¬Â¸ºß¤¹¤ë¤³¤È¤òµö¤·¤Þ¤¹¡£Ê£¿ô¤Î X ¥µ¡¼¥Ð¡¼¤¬Æ±»þ¤Ë¼Â¹Ô¤·¤Æ¤¤¤ë»þ¡¤XDarwin ¤¬»ÈÍѤ¹¤ë¥Ç¥£¥¹¥×¥ì¥¤¤ÎÈÖ¹æ¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • -
  • Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¥µ¥Ý¡¼¥È¤òÍ­¸ú¤Ë¤¹¤ë: XDarwin ¤Ï¡¤Xinerama ¥Þ¥ë¥Á¥â¥Ë¥¿¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£¤½¤ì¤ÏÁ´¤Æ¤Î¥â¥Ë¥¿¤ò°ì¤Ä¤ÎÂ礭¤Ê²èÌ̤ΰìÉô¤È¤ß¤Ê¤·¤Þ¤¹¡£¤¢¤Ê¤¿¤Ï¤³¤Î¥ª¥×¥·¥ç¥ó¤Ç Xinerama ¤ò̵¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¿¤À¤·¡¤¸½ºß XDarwin ¤Ï¤½¤ì̵¤·¤ÇÀµ¤·¤¯Ê£¿ô¤Î¥â¥Ë¥¿¤ò°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£¤â¤·¡¤¤¢¤Ê¤¿¤¬°ì¤Ä¤Î¥â¥Ë¥¿¤ò»È¤¦¤À¤±¤Ê¤é¤Ð¡¤Xinerama ¤Ï¼«Æ°Åª¤Ë̵¸ú¤È¤Ê¤ê¤Þ¤¹¡£
  • -
  • ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë: ¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ïµ¯Æ°»þ¤ËÆÉ¤ß¹þ¤Þ¤ì¡¤X11 ¥­¡¼¥Þ¥Ã¥×¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¡£Â¾¸À¸ì¤ËÂбþ¤·¤¿¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¥Õ¥¡¥¤¥ë¤Ï /System/Library/Keyboards ¤Ë¤¢¤ê¤Þ¤¹¡£¡ÊÌõÃí¡§¥­¡¼¥Þ¥Ã¥Ô¥ó¥°¤Ç Japanese ¤òÁªÂò¤¹¤ë¤È¡¤°ìÉô¤Î¥­¡¼¤¬¸ú¤«¤Ê¤¤Åù¤ÎÉÔ¶ñ¹ç¤¬È¯À¸¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ï USA ¤òÁªÂò¤·¤¿¾å¤Ç ~/.Xmodmap ¤òŬÍѤ·¤Æ²¼¤µ¤¤¡£¡Ë
  • -
  • ºÇ½é¤Î X11 ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°: XDarwin ¤¬ Finder¤«¤éµ¯Æ°¤¹¤ë»þ¡¤X ¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¡¼¤È X ¥¯¥é¥¤¥¢¥ó¥È¤Îµ¯Æ°¤Ï xinit ¤ò¼Â¹Ô¤·¤Þ¤¹¡£¡Ê¾ÜºÙ¤Ï "man xinit" ¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£¡ËXDarwin ¤Ï xinit ¤ò¼Â¹Ô¤¹¤ëÁ°¤Ë¡¤»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤ò¥æ¡¼¥¶¡¼¤Î¥Ñ¥¹¤ËÄɲä·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï /usr/X11R6/bin ¤À¤±¤òÄɲä·¤Þ¤¹¡£Â¾¤Î¥Ç¥£¥ì¥¯¥È¥ê¤òÄɲä·¤¿¤¤¾ì¹ç¤Ï¡¤¥³¥í¥ó¤Ç¶èÀڤäƻØÄꤷ¤Þ¤¹¡£¥æ¡¼¥¶¡¼¤Î¥·¥§¥ë½é´ü²½¥Õ¥¡¥¤¥ë¤òÆÉ¤ß¹þ¤à¤¿¤á¤Ë¡¤X ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥æ¡¼¥¶¡¼¤Î¥Ç¥Õ¥©¥ë¥È¥í¥°¥¤¥ó¥·¥§¥ë¤Çµ¯Æ°¤µ¤ì¤Þ¤¹¡£É¬ÍפǤ¢¤ì¤Ð¡¤Âå¤ï¤ê¤Î¥·¥§¥ë¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • -
- -

¥Õ¥ë¥¹¥¯¥ê¡¼¥ó

-
    -
  • ¥­¡¼ÀßÄê¥Ü¥¿¥ó: X11 ¤È Aqua ¤òÀÚ¤êÂØ¤¨¤ë¤¿¤á¤Ë»ÈÍѤ¹¤ë¥Ü¥¿¥ó¤ÎÁȤ߹ç¤ï¤»¤ò»ØÄꤷ¤Þ¤¹¡£ - ¥Ü¥¿¥ó¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¡¤Ç¤°Õ¤Î¿ô¤Î½¤¾þ¥­¡¼¤Ë³¤¤¤ÆÄ̾ï¤Î¥­¡¼¤ò²¡¤·¤Þ¤¹¡£
  • -
  • ¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤ËÌá¤ë: ¥ª¥ó¤Î¾ì¹ç¡¤¥É¥Ã¥¯¤Ëɽ¼¨¤µ¤ì¤¿ XDarwin ¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç X11 ¤Ø¤ÎÀڤ괹¤¨¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£Mac OS X ¤Î¤¤¤¯¤Ä¤«¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¤¥É¥Ã¥¯¤Î¥¢¥¤¥³¥ó¤Î¥¯¥ê¥Ã¥¯¤Ç Aqua ¤ËÌá¤Ã¤¿»þ¡¤¥«¡¼¥½¥ë¤¬¾Ã¼º¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
  • -
  • µ¯Æ°»þ¤Ë¥Ø¥ë¥×¤òɽ¼¨¤¹¤ë: XDarwin ¤¬¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Çµ¯Æ°¤¹¤ë»þ¡¤¥¹¥×¥é¥Ã¥·¥å¥¹¥¯¥ê¡¼¥ó¤òɽ¼¨¤·¤Þ¤¹¡£
  • -
  • ¿§¿¼ÅÙ: ¥Õ¥ë¥¹¥¯¥ê¡¼¥ó¥â¡¼¥É¤Ç¤Ï¡¤X11 ¥Ç¥£¥¹¥×¥ì¥¤¤¬ Aqua ¤È°Û¤Ê¤ë¿§¿¼ÅÙ¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¡ÖÊѹ¹¤Ê¤·¡×¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¤XDarwin ¤Ï Aqua ¤Ë¤è¤Ã¤Æ»ÈÍѤµ¤ì¤ë¿§¿¼ÅÙ¤ò»È¤¤¤Þ¤¹¡£¤³¤ì°Ê³°¤Ë 8¡¤15 ¤Þ¤¿¤Ï24 ¥Ó¥Ã¥È¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
  • -
- -

-¥é¥¤¥»¥ó¥¹ -

-XDarwin ¤Î¼çÍפʥ饤¥»¥ó¥¹¤ÏÅÁÅýŪ¤Ê MIT X11/X Consortium License ¤Ë´ð¤Å¤­¤Þ¤¹¡£ -¤½¤ì¤Ï½¤Àµ¤Þ¤¿¤ÏºÆÇÛÉÛ¤µ¤ì¤ë¥½¡¼¥¹¥³¡¼¥É¤Þ¤¿¤Ï¥Ð¥¤¥Ê¥ê¤Ë¡¤¤½¤ÎÃøºî¸¢/¥é¥¤¥»¥ó¥¹É½¼¨¤¬¤½¤Î¤Þ¤Þ»Ä¤µ¤ì¤ë¤³¤È¤òÍ׵᤹¤ë°Ê³°¤Î¾ò·ï¤ò¶¯À©¤·¤Þ¤»¤ó¡£ -¤è¤ê¿¤¯¤Î¾ðÊó¤È¡¤¥³¡¼¥É¤Î°ìÉô¤ò¥«¥Ð¡¼¤¹¤ëÄɲäÎÃøºî¸¢/¥é¥¤¥»¥ó¥¹É½¼¨¤Î¤¿¤á¤Ë¡¤¥½¡¼¥¹¥³¡¼¥É¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡£ -

- -X Consortium License

-

Copyright (C) 1996 X Consortium

-

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 X CONSORTIUM 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 X Consortium 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 X Consortium.

-

X Window System is a trademark of X Consortium, Inc.

- - diff --git a/hw/darwin/bundle/Makefile.am b/hw/darwin/bundle/Makefile.am deleted file mode 100644 index dee34fd83..000000000 --- a/hw/darwin/bundle/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -BINDIR = ${bindir} -include $(top_srcdir)/cpprules.in -XINITDIR = $(libdir)/X11/xinit -XDEFS = \ - -DX_VERSION="$(PLIST_VERSION_STRING)" \ - -DX_PRE_RELEASE="$(PRE)" \ - -DX_REL_DATE="$(XORG_DATE)" \ - -DX_VENDOR_NAME="$(VENDOR_STRING)" \ - -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" - -SUBDIRS = English.lproj Dutch.lproj French.lproj German.lproj Japanese.lproj \ - ko.lproj Portuguese.lproj Spanish.lproj Swedish.lproj - -bin_SCRIPTS = startXClients - -startXClients: $(srcdir)/startXClients.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) -DXINITDIR=$(XINITDIR) -DXBINDIR=$(BINDIR) $< | $(CPP_SED_MAGIC) > $@ - -chmod 755 startXClients - -contentsdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents -resourcesdir = $(contentsdir)/Resources - -contents_DATA = Info.plist -resources_DATA = XDarwin.icns startXClients - -install-data-hook: - chmod 755 $(DESTDIR)$(resourcesdir)/startXClients - echo "APPL????" > $(DESTDIR)$(contentsdir)/PkgInfo - touch $(DESTDIR)@APPLE_APPLICATIONS_DIR@/XDarwin.app - -uninstall-hook: - rm -rf $(DESTDIR)$(contentsdir)/PkgInfo - -CLEANFILES = startXClients - -EXTRA_DIST = \ - XDarwin.icns \ - Info.plist diff --git a/hw/darwin/bundle/Portuguese.lproj/Credits.rtf b/hw/darwin/bundle/Portuguese.lproj/Credits.rtf deleted file mode 100644 index 8dcddc2f7..000000000 --- a/hw/darwin/bundle/Portuguese.lproj/Credits.rtf +++ /dev/null @@ -1,171 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; -} -{\colortbl;\red255\green255\blue255;} -\vieww5140\viewh4980\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Contributors to Xorg Foundation Release: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Kaleb KEITHLEY\ - -\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\f1\b \cf0 Contributors to XFree86 4.4: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Harper\ - -\f2\i Rootless acceleration and Apple-WM extension -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Contribuidores do XonX ao XFree86 4.3: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Fabr\'92cio Luis de Castro -\f1\b \ - -\f2\i\b0 Localiza\'8d\'8bo para o Portugu\'90s\ - -\f0\i0 Michael Oland\ - -\f2\i New XDarwin icon -\f1\i0\b \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Contribuidores do XonX ao XFree86 4.2: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Suporte para o Darwin x86\ - -\f0\i0 Pablo Di Noto\ - -\f2\i Localiza\'8d\'8bo para o Espanhol -\f0\i0 \ -Paul Edens\ - -\f2\i Localiza\'8d\'8bo para o Holand\'90s -\f0\i0 \ -Kyunghwan Kim\ - -\f2\i Localiza\'8d\'8bo para o Coreano -\f0\i0 \ -Mario Klebsch\ - -\f2\i Suporte para teclados Non-US -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i L\'92der de Projeto -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Localiza\'8d\'8bo para o Alem\'8bo -\f0\i0 \ -Patrik Montgomery\ - -\f2\i Localiza\'8d\'8bo para o Sueco -\f0\i0 \ -Greg Parker\ - -\f2\i Suporte ao modo Compartilhado (Rootless) -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Localiza\'8d\'8bo para o Japon\'90s -\f0\i0 \ -Olivier Verdier\ - -\f2\i Localiza\'8d\'8bo para o Fran\'8d\'90s -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Agradecimentos Especiais: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Devin Poolman and Zero G Software, Inc.\ - -\f2\i Instalador -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Membros do Time XonX\ -Contribuindo com o XFree86 4.1: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Suporte ao Darwin x86\ - -\f0\i0 Torrey T. Lyons\ - -\f2\i L\'92der de Projeto -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Vers\'8bo Cocoa da interface XDarwin -\f0\i0 \ -Greg Parker\ - -\f2\i Implementa\'8d\'8bo Original -\f0\i0 -\f2\i ao Quartz \ - -\f0\i0 Christoph Pfisterer\ - -\f2\i Bibliotecas Din\'89micas Compartilhadas -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Localiza\'8d\'8bo para o Japon\'90s -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Agradecimento Especial: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Tiago Ribeiro\ - -\f2\i \'eacone do XDarwin -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Hist\'97rico: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Carmack\ - -\f2\i Suporte Original do XFree86 no Mac OS X Server -\f0\i0 \ -Dave Zarzycki\ - -\f2\i Suporte ao -\f0\i0 -\f2\i XFree86 4.0 no Darwin 1.0 -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Integra\'8d\'8bo dentro do Projeto XFree86 na vers\'8bo 4.0.2} \ No newline at end of file diff --git a/hw/darwin/bundle/Portuguese.lproj/Localizable.strings b/hw/darwin/bundle/Portuguese.lproj/Localizable.strings deleted file mode 100644 index c79b282f6460bd155a8b2de19f2e88b2ebbd0554..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1504 zcma)+-EPxB5QV?%KE*2PRYmP2l_)Ag2uisEwJ1g8cH?XkgJT%Le4PUkx}5OSW@9AaTpRZA}k3pKXA-3Jm4rOiOEPQF=Q+-lz0ka zQkJ?~X%2~)@rc2*(wrZ$L>O+FV3=Z9P-rfX!I3g2z;H&$NrUc`Deoz8I9~9aD-2sA zLUN5=QeatA5;E1gMT0YB#fFeMmV%Aq3z<=Aodie7jbfG_OI8FVP1di3eAr{aGSisg zpxb9WU>FfF#xQ2ckP#sx{f@cBFyxY}=6k_~G9sKySHjN?TXGDiyWZRG?}_nRx8+(C z5fy~797~EL*~Ja`M5Qq`zoKQ!$7=={USSw$-;tgPdxd5f9qZdMbHyh)Bf7w5{kQX4Y;-@-S{NBEgn#1o@x+DL(qkWHB?KorB)DYj!h}HShajjXu z7s1+Rzf-q2N>OI~)rv6^Z)co4R?8B`4phvmkE# z+amtVgf|3F-tTJvJ(Z3{^!Yi&RH~;u5vzka)lQiK*Q}Xy&Mi5fb8HXAQ)m5pZ>jKj zonhka?zL`o=A{^|E$?)><76LI&0B}(PUk|Yle9kTvm!G?&gvN~p0RrK9!Er?E7j=_ DTsrn} diff --git a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib deleted file mode 100644 index 77f345a4e..000000000 --- a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/classes.nib +++ /dev/null @@ -1,72 +0,0 @@ -{ - IBClasses = ( - { - ACTIONS = {showHelp = id; }; - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; - CLASS = Preferences; - LANGUAGE = ObjC; - OUTLETS = { - addToPathButton = id; - addToPathField = id; - button2ModifiersMatrix = id; - button3ModifiersMatrix = id; - depthButton = id; - displayField = id; - dockSwitchButton = id; - fakeButton = id; - keymapFileField = id; - modeMatrix = id; - modeWindowButton = id; - mouseAccelChangeButton = id; - startupHelpButton = id; - switchKeyButton = id; - systemBeepButton = id; - useDefaultShellMatrix = id; - useOtherShellField = id; - useXineramaButton = id; - window = id; - }; - SUPERCLASS = NSObject; - }, - { - CLASS = XApplication; - LANGUAGE = ObjC; - OUTLETS = {preferences = id; xserver = id; }; - SUPERCLASS = NSApplication; - }, - { - ACTIONS = { - bringAllToFront = id; - closeHelpAndShow = id; - itemSelected = id; - nextWindow = id; - previousWindow = id; - showAction = id; - showSwitchPanel = id; - startFullScreen = id; - startRootless = id; - }; - CLASS = XServer; - LANGUAGE = ObjC; - OUTLETS = { - dockMenu = NSMenu; - helpWindow = NSWindow; - modeWindow = NSWindow; - startFullScreenButton = NSButton; - startRootlessButton = NSButton; - startupHelpButton = NSButton; - startupModeButton = NSButton; - switchWindow = NSPanel; - windowMenu = NSMenu; - windowSeparator = NSMenuItem; - }; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/Portuguese.lproj/MainMenu.nib/objects.nib deleted file mode 100644 index 9cb67cf89bf22531cccc3ec52f70c9ca666cbca1..0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8ZK5p zKIa%X3)zDl*=NX*8_2%PZ$ow+$3PLXf9Hddg}F%Z+{+Pufb3@8fb4pXfih%wbA$x4 z`5Xg%kP#awcMApRn zBfFd<`yAO)-V@naekZb9`L)Pqab$au4d%#pA#CRee=p|qkj>`E{x3p;Q=Sa|%rS5d zvWGab-y+=4pF}vwyO5p3k^OQ3N7fsmlOw!I6g$#`Q&a)#IkJ}!Uf{^?Kb!AEb{6kI z=5Pv^U_ZYInZc1AMV8?8$gbkskPYLrk $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp diff --git a/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index 6800171d9..000000000 --- a/hw/darwin/bundle/Portuguese.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,209 +0,0 @@ - -XDarwin Help - - -
- -

XDarwin X Server para Mac OS X

- X_VENDOR_NAME X_VERSION
- Release Date: X_REL_DATE -
-

Índice

-
    -
  1. Notas importantes
  2. -
  3. Uso
  4. -
  5. Ajustando seu Path
  6. - -
  7. Preferências do usuário
  8. -
  9. Licença
  10. -
-
-

Notas importantes

-
-
-#if PRE_RELEASE - Essa é uma versão pré-lancamento - do XDarwin, e ela não é suportada de nenhuma forma. Bugs podem - ser reportados e correções podem ser enviadas para Página - do projeto XonX no SourceForge. Antes de informar bugs em versões - pré-lancamento, por favor verifique a þltima versão em XonX - or X_VENDOR_LINK. -#else -Se o servidor é mais velho que 6-12 semanas, ou seu hardware é - mais novo que a data acima, procure por uma nova versão antes de informar - problemas. Bugs podem ser reportados e correções podem ser enviadas - para a Página do projeto - XonX na SourceForge. -#endif -
-
Este software é distribuído sob os termos da licença - MIT X11 / X Consortium e é provido, sem nenhuma garantia. Por favor - leia a Licença antes de começar a usar - o programa.
- -

Uso

-

O XDarwin é uma X server "open-source" livremente - redistribuída do Sistema X Window. This version of XDarwin was produced by the X_VENDOR_LINK. - XDarwin roda sobre Mac OS X no modo Tela Cheia ou no modo Compartilhado.

-

No modo Tela Cheia, quando o sistema X window está ativo, ele ocupa - a tela toda. Você pode voltar ao desktop do Mac OS X clicando Command-Option-A. - Essa combinação de teclas pode ser mudada nas preferências. - Pelo desktop Mac OS X, clique no ícone XDarwin no Dock para voltar ao - sistema X window. (Você pode mudar esse comportamento nas preferências - daí você deverá clicar no ícone XDarwin na janela - flutuante que aparecerá.)

-

No modo Compartilhado, o sistema X window e Aqua dividem a mesma tela. A janela - raiz da tela X11 está do tamanho da tela (monitor) e contém todas - as outras janelas. A janela raiz do X11 no modo compartilhado não é - mostrada pois o Aqua controla o fundo de tela.

-

Emulação de Mouse Multi-Botões

-

Muitas aplicações X11 insistem em usar um mouse de 3 botões. - Você pode emular um mouse de 3 botões com um simples botão, - mantendo pressionando teclas modificadoras enquanto você clica no botão - do mouse. Isto é controlado pela configuração da "Emulação - de Mouse Multi-Botões" da preferência "Geral". Por - padrão, a emulação está habilitada e mantendo pressionada - a tecla Command e clicando no botão do mouse ele simulará o clique - no segundo botão do mouse. Mantendo pressionada a tecla Option e clicando - no botão do mouse ele simulará o terceiro botão. Você - pode mudar a combinação de teclas modificadoras para emular os - botões dois e três nas preferências. Nota, se a tecla modificadora - foi mapeada para alguma outra tecla no xmodmap, você ainda terá - que usar a tecla atual especificada nas preferências para a emulação - do mouse multi-botões.

-

Ajustando seu Path

-

Seu path é a lista de diretórios a serem procurados por arquivos - executáveis. O comando X11 está localizado em /usr/X11R6/bin, - que precisa ser adicionado ao seu path. XDarwin faz isso para você por - padrão e pode-se também adicionar diretórios onde você - instalou aplicações de linha de comando.

-

Usuários experientes já terão configurado corretamente - seu path usando arquivos de inicialização de seu shell. Neste - caso, você pode informar o XDarwin para não modificar seu path - nas preferências. O XDarwin inicia o cliente inicial X11 no shell padrão - do usuário corrente. (Um shell alternativo pode ser também expecificado - nas preferências.) O modo para ajustar o path depende do shell que você - está usando. Isto é descrito na man page do seu shell.

-

Você pode também querer adicionar as man pages do X11 para - a lista de páginas a serem procuradas quando você está procurando - por documentação. As man pages do X11 estão localizadas - em /usr/X11R6/man e a variável de ambiente MANPATH - contém a lista de diretórios a buscar.

-

Preferências do Usuário

-

Várias opções podem ser ajustadas nas preferências - do usuário, acessível pelo item "Preferências..." - no menu "XDarwin". As opções listadas como opções - de inicialização, não terão efeito até você - reiniciar o XDarwin. Todas as outras opções terão efeito - imediatamente. Várias das opções estão descritas - abaixo:

-

Geral

-
    -
  • Usar o Beep do Sistema para o X11: Quando habilitado som de alerta - padrão do Mac OS X será usado como alerta no X11. Quando desabilitado - (padrão) um tom simples será usado.
  • -
  • Permitir o X11 mudar a aceleração do mouse: Por implementação - padrão no sistema X window, o gerenciador de janelas pode mudar a aceleração - do mouse. Isso pode gerar uma confusão pois a aceleração - do mouse pode ser ajustada diferentemente nas preferências do Mac OS - X e nas preferências do X window. Por padrão, o X11 não - está habilitado a mudar a aceleração do mouse para evitar - este problema.
  • -
  • Emulação de Mouse de Multi-Botões: Esta opção - está escrita acima em Uso. Quando a emulação - está habilitada as teclas modificadoras selecionadas tem que estar - pressionadas quando o botão do mouse for pressionado, para emular o - segundo e terceiro botões.
  • -
-

Inicial

-
    -
  • Modo Padrão: Se o usuário não indicar qual modo - de exibição quer usar (Tela Cheia ou Compartilhado) o modo especificado - aqui será usado .
  • -
  • Mostrar o painel de escolha na inicialização: Por - padrão, uma painel é mostrado quando o XDarwin é - iniciado para permitir que o usuário escolha ente o modo tela cheia - ou modo compartilhado. Se esta opção estiver desligada, o modo - padrão será inicializado automaticamente.
  • -
  • Número do Monitor X11: O X11 permite ser administrado em multiplos - monitores por servidores X separados num mesmo computador. O usuário - pode indicar o número do monitor para o XDarwin usar se mais de um - servidor X se estiver rodando simultaneamente.
  • -
  • Habilitar suporte a múltiplos monitores pelo Xinerama: o XDarwin - suporta múltiplos monitores com o Xinerama, que trata todos os monitores - como parte de uma grande e retangular tela. Você pode desabilitar o - Xinerama com está opção, mas normalmente o XDarwin não - controla múltiplos monitores corretamente sem está opção. - Se você só tiver um monotor, Xinerama é automaticamente - desabilitado.
  • -
  • Arquivo de Mapa de Teclado: O mapa de teclado é lido na inicialização - e traduzido para um mapa de teclado X11. Arquivos de mapa de teclado, estão - disponíveis numa grande variedade de línguas e são encontradas - em /System/Library/Keyboards.
  • -
  • Iniciando Clientes X11 primeiro: Quando o XDrawin é inicializado - pelo Finder, ele irá rodar o xinit para abrir o controlador - X window e outros clientes X. (Veja o manual "man xinit" para - mais informações.) Antes do XDarwin rodar o xinit - ele irá adicionar específicos diretórios a seu path. - Por padrão somente o /usr/X11R6/bin é adicionado. - separado por um ponto-e-vírgula. Os clientes X são inicializados - no shell padrão do usuário e os arquivos de inicialização - do shell serão lidos. Se desejado, um shell alternativo pode ser especificado.
  • -
-

Tela Cheia

-
    -
  • Botão de Combinação de Teclas: Clique no botão - e pressione qualquer quantidade de teclas modificadoras seguidas por uma tecla - padrão para modificar a combinação quando se quer mudar - entre o Aqua e X11.
  • -
  • Clique no Ícone no Dock para mudar para o X11: Habilitando - esta opção você irá ativar a mudança para - o X11 clicando no ícone do XDarwin no Dock. Em algumas versões - do Mac OS X, mudando pelo clique no Dock pode causar o desaparecimento do - cursor quando retornar ao Aqua.
  • -
  • Mostrar a Ajuda na inicialização: Isto irá mostrar - uma tela introdutória quando o XDarwin for inicializado no modo Tela - Cheia.
  • -
  • Profundidade de Cores em bits: No modo Tela Cheia, a tela do X11 - pode usar uma profundiadde de cor diferente da usada no Aqua. Se a opção - "Atual" está especificada, a profundidade usada pelo Aqua - quando o XDarwin iniciar será a mesma. Além das opções - 8, 15 ou 24 bits que podem ser especificadas.
  • -
- -

Licença

-

A licença - principal nós por XDarwin baseada na licença tradicional MIT X11 - / X Consortium, que não impõe nenhuma condição sobre - modificações ou redistribuição do código-fonte - ou dos binários desde que o copyright/licença sejam mantidos intactos. - Para mais informações e notícias adicionais de copyright/licensing - em algumas seção do código, por favor refer to the source code.

-

Licença do X Consortium

-

Copyright (C) 1996 X Consortium

-

Permissões são em virtude garantidas, livre de mudanças, - para qualquer pessoa que possua uma cópia deste software e aos arquivos - de documentação associada (o "Software"), para lidar - com o software sem restrições, incluindo limitações - dos direitos de uso, cópia, modificação, inclusão, - publicação, distribuição, sub licença, e/ou - venda de cópias deste Software, e permitir pessoas to whom o Software - é fornecido para ser desta forma, verifique as seguintes condições:

-

O nota de copyright abaixo e a permissão deverão ser incluídas - em todas as cópias ou substanciais porções do Software.

-

O SOFTWARE 'E PROVIDO "COMO TAL", SEM GARANTIAS DE NENHUM TIPO, EXPLICITA - OU IMPLICITA, INCLUINDO MAS NÃO LIMITADO NOS AVISOS DE COMÉRCIO, - TAMANHO OU PARA PROPOSTAS PARTICULARES E NÃO INFRAÇÃO. - EM NENHUM ACONTECIMENTO O X CONSORTIUM SERÁ RESPONSAVÉL POR NENHUMA - RECLAMAÇÃO, DANOS OU OUTRAS RESPONSABILIDADES, SE NUMA AÇÃO - DE CONTRATO, OU OUTRA COISA, SURGINDO DE, FORA DE OU EM CONEXÃO COM O - SOFTWARE OU O USO OU OUTRO MODO DE LIDAR COM O SOFTWARE.

-

Exceto o contido nesta nota, o nome do X Consortium não pode ser usado - em propagandas ou outra forma de promoção de vendas, uso ou outro - modo de lidar com este Software sem ter recebido uma autorização - escrita pelo X Consortium.

-

O Sistema X Window é marca registrada do X Consortium, Inc.

- - - diff --git a/hw/darwin/bundle/Spanish.lproj/Credits.rtf b/hw/darwin/bundle/Spanish.lproj/Credits.rtf deleted file mode 100644 index 34408e78c..000000000 --- a/hw/darwin/bundle/Spanish.lproj/Credits.rtf +++ /dev/null @@ -1,168 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; -} -{\colortbl;\red255\green255\blue255;} -\vieww5160\viewh6300\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Contributors to Xorg Foundation Release: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Kaleb KEITHLEY\ - -\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\f1\b \cf0 Contributors to XFree86 4.4: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Harper\ - -\f2\i Rootless acceleration and Apple-WM extension -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Additional XonX Contributors to XFree86 4.3: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Fabr\'92cio Luis de Castro\ - -\f2\i Portuguese localization -\f0\i0 \ -Michael Oland\ - -\f2\i New XDarwin icon -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Contributors to XFree86 4.2: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Pablo Di Noto\ - -\f2\i Spanish localization -\f0\i0 \ -Paul Edens\ - -\f2\i Dutch localization -\f0\i0 \ -Kyunghwan Kim\ - -\f2\i Korean localization -\f0\i0 \ -Mario Klebsch\ - -\f2\i Non-US keyboard support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i German localization -\f0\i0 \ -Patrik Montgomery\ - -\f2\i Swedish localization -\f0\i0 \ -Greg Parker\ - -\f2\i Rootless support -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -Olivier Verdier\ - -\f2\i French localization -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Devin Poolman and Zero G Software, Inc.\ - -\f2\i Installer -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Team Members\ -Contributing to XFree86 4.1: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Cocoa version of XDarwin front end -\f0\i0 \ -Greg Parker\ - -\f2\i Original Quartz implementation -\f0\i0 \ -Christoph Pfisterer\ - -\f2\i Dynamic shared libraries -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Tiago Ribeiro\ - -\f2\i XDarwin icon -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 History: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Carmack\ - -\f2\i Original XFree86 port to Mac OS X Server -\f0\i0 \ -Dave Zarzycki\ - -\f2\i XFree86 4.0 port to Darwin 1.0 -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/hw/darwin/bundle/Spanish.lproj/Localizable.strings b/hw/darwin/bundle/Spanish.lproj/Localizable.strings deleted file mode 100644 index 5bf813f1ff88b2a756ed1d07a23016b26d049a6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1480 zcma)+&2G~`5XXP#JjE*NsiJn0B0f?f1SOn61qDQ|j=f1-oY<`GCh5!ZEW8My8QZZF zwStr7-JPBP*Us-h_?%;yk`b^WCTE2qAtfXrA?6-Sgy9a0BPS+hLyjS3fgz{B5wl^b zt0j3|F=vmVV1>o-k$@1x4O0v=3=5pzRba4ei109+6g_sc*f-=fjZ#0duYKPS`%- z4#NZm(r0R-Z2a#o`-7D|^ z7f(^=qfLYO-*gm|Mma>x@1|aN|LcQ zCtgQ~MujSS=|8j(?1Hqx<@kjm)C9}7R5gC60~Mp=j0PCy1l(#T;r}>pLD|*4^|g8( zt<$Zm4I6h-d#&1qCrRn9ws&+_<=q^kc!y;{KuMw*_>N`Int+V#;K+iw&TNDAD^uR! zJ$SzDJt40%osv9yx~s}5o?J6j5b6x;&ZTCm^tonD#058G6kHH=5InTk?e~_Ff}(a@ zGTpq+t-7&|kxgC=Vqd0io5FPIf0`V0UMkoeg07 z6Hl0(=VR5@u3?%8Eu!@WEU{7hp#?=!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vBfEqX%*w9g7?6 $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp diff --git a/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index a79e6f95f..000000000 --- a/hw/darwin/bundle/Spanish.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,109 +0,0 @@ - - -XDarwin Ayuda - - -
-

XDarwin X Server for Mac OS X

- X_VENDOR_NAME X_VERSION
- Fecha de release: X_REL_DATE -
-

Contenido

-
    -
  1. Aviso Importante
  2. -
  3. Modo de uso
  4. -
  5. Configurando su Path
  6. -
  7. Preferencias del Usuario
  8. -
  9. Licencia
  10. -
-
-

Aviso Importante

-
-
-#if PRE_RELEASE -Esta es una versión pre-release de XDarwin, y no tiene ningún soporte. Patches y reportes de error pueden ser enviados a la página del proyecto XonX en SourceForge. Antes de reportar errores en versiones pre-release, por favor verifique la ultima versión en XonX o bien el X_VENDOR_LINK. -#else -Si el server el más antiguo que 6 a 12 meses, o si su hardware es posterior a la fecha indicada más arriba, por favor verifique la última versión antes de reportar problemas. Patches y reportes de error pueden ser enviados a la página del proyecto XonX en SourceForge. -#endif -
-
-Este software es distribuido bajo los términos de la Licencia MIT X11 / X Consortium y es provisto sin garantía alguna y en el estado en que se encuentra. Por favor lea la Licencia antes de utilizarlo.
- -

Modo de uso

-

XDarwin es una X server open-source de distribución libre del X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin funciona en Mac OS X en modo pantalla completa o en modo rootless (integrado al escritorio).

-

En modo pantalla completa, el X window system toma control total de la pantalla mientras esta activo. Presionando Command-Option-A puede regresar al Escritorio de Mac OS X. Esta combinación de teclas puede cambiarse en las Preferencias de Usuario. Desde el Escritorio de Mac OS X, haga click en ícono de XDarwin en el Dock para volver al X window system. (Puede cambiar esta comportamiento en las Preferencias de Usuario y configurar que XDarwin vuelva al X window system haciendo click en la ventana flotante con el logo X.)

-

En modo rootless, el X window system comparte la pantalla con Aqua. La ventana root de X11 es del tamaño de la pantalla y contiene a todas las demás ventanas. La ventana root de X11 no se muestra en este modo, ya que Aqua maneja el fondo de pantalla.

-

Emulación de mouse multi-botón

-

Muchas aplicaciones X11 requieren del uso de un mouse de 3 botones. Es posible emular un mouse de 3 botones con un mouse de solo un botón presionando teclas modificadoras mientras hace click. Esto es controlado en de la seccion "Emulación mouse" dentro de la sección "General" de las Preferencias del Usuario. Por defecto, la emulación está activa y utiliza la tecla Command para simular el 2do botón y la tecla Option para simlar el 3er botón. La conbinación para simular el 2do y 3er botón pueden ser modificada por cualquier combinación de teclas modificadoras dentro de las Preferencias del Usuario. Tenga en cuenta que aunque las teclas modificadoras hayan sido mapeadas a otras teclas con xmodmap, las teclas configuradas en las Preferencias del Usuario seguirán siendo las utilizadas por la emulación de mouse multi-botón.

- -

Configurando su Path

-

El path es la lista de directorios donde se buscarán los comandos ejecutables. Los comandos de X11 se encuentran en /usr/X11R6/bin, y éste necesita estar dentro de su path. XDarwin hace ésto automáticamente por defecto, y puede además agregar directorios adicionales donde tenga otros comandos de línea.

-

Usuarios experimentados pueden tener su path correctamente configurado mediante los archivos de inicio de su interprete de comandos. En este caso, puede informarle a XDarwin en las Preferencias de Usuario para que no modifique su path. XDarwin arrancará los clientes X11 iniciales usando el intérprete de comandos del usuario, según su configuración de login. Un intérprete de comandos alternativo puede ser especificado en las Preferencias del Usuario. La manera de configurar el path de su intérprete de comandos depende de cual está usando, y es generalmente descripta en las páginas man del mismo.

-

Además, Ud. puede agregar las páginas man de X11 a la lista de páginas que son consultadas. Estas están ubicadas en /usr/X11R6/man y MANPATH es la variable de entorno que contiene los directorios que son consultados.

- -

Preferencias del Usuario

-

Ciertas opciones pueden definirse dentro de "Preferencias...", en el menú de XDarwin. Las opciones dentro de de "Inicio" no surtirán efecto hasta que la aplicación se reinicie. Las restantes opciones surten efecto inmediatamente. Las diferentes opciones se describen a continuación:

-

General

-
    -
  • Usar beep del sistema en X11: Cuando esta opción está activa, el sonido de alerta estándar de Mac OS X se usará como alerta de X11. Cuando está desactivada, un simple tono es utilizado (esta es la opción por defecto).
  • -
  • Permitir que X11 cambie la aceleración del mouse: En una implementación estándard de X11, el window manager puede cambiar la aceleración del mouse. Esto puede llevar a una gran confusión si la aceleración es diferente en XDarwin y en Mac OS X. Por defecto, no se le permite a X11 alterar la aceleración para evitar este inconveniente.
  • -
  • Emulación de mouse multi-botón: Esta opción es descripta más arriba bajo Modo de Uso. Cuando esta emulación está activa los modificadores seleccionados deben ser presionados cuando se hace click para emular el botón 2 o el botón 3.
  • -
-

Inicio

-
    -
  • Modo inicial: Si el usuario no indica si desea utilizar la Pantalla Completa o el modo Rootless, el modo especificado aquí será el usado.
  • -
  • Mostrar panel de selección al inicio: Por defecto, un diálogo permite al usuario elegir entre Pantalla Completa o Rootless al inicio. Si esta opción esta desactivada, XDarwin arrancará utilizando el modo por defecto sin consultar al usuario.
  • -
  • Número de display X11: X11 permite que existan múltiples pantallas manejadas por servidores X11 separados funcionando en una misma computadora. El usuario puede especificar aqui un número entero para indicar el número de pantalla (display) que XDarwin utilizará si más de un servidor X funciona en forma simultánea.
  • -
  • Habilitar soporte Xinerama para múltipes monitores: XDarwin suporta múltiple monitores con Xinerama, que maneja todos los monitores como si fueran parte de una gran pantalla rectangular. Puede deshabilitar Xinerama con esta opción, pero XDarwin no maneja múltiples monitores en forma correcta sin esta opción habilitada. Si tiene solo un monitor, Xinerama es automáticamente deshabilitado.
  • -
  • Archivo de mapa de teclado: Un archivo de mapa de teclas es leído al inicio y es traducido a un keymap X11 (un archivo estándard de X11 para especificar la función de cada tecla). Estos archivos, disponibles para una amplia variedad de lenguajes, pueden encontrarse en /System/Library/Keyboards.
  • -
  • Al iniciar clientes X11: Cuando XDarwin arranca desde el Finder, éste ejecutará xinit para a su vez arrancar el window manager y otros clientes. (Vea en "man xinit" para mayor información). Antes de ejecutar xinit XDarwin agregará los directorios especificados al path del usuario. Por defecto, solo /usr/X11R6/bin es agregado. Otros directorios adicionales puede agregarse separados por dos puntos (:). Los clientes X son ejecutados con el intérprete de comandos del usuario, por lo que los archivos de inicio de éste son leídos. Si se desea, un intérprete de comandos diferente puede ser especificado.
  • -
-

Pantalla Completa

-
    -
  • Botón para definir combinación de teclas: Haga click en este botón y luego presione cualquier combinación de modificadores seguidos de una tecla convencional para definir que combinación usará para intercambiar entre X11 y Aqua.
  • -
  • Click en el ícono del Dock cambia a X11: Habilite esta opción para volver a X11 al hacer click en ícono de XDarwin en el Dock. En algunas versiones de Mac OS X, al volver haciendo click en el Dock puede causar al desaparción del cursor al volver a Aqua.
  • -
  • Mostrar ayuda al inicio: Esta opción habilitada hará que una pantalla inicial de introducción aparezca cuando XDarwin es arrancado en modo Pantalla Completa.
  • -
  • Profundidad de color (bits): En modo Pantalla Completa, el display X11 puede utilizar una profundidad de color diferente de la utilizada por Aqua. Si se especifica "Actual", la misma profundidad de color que Aqua utiliza será adoptada por X11. Al contrario, puede especificar 8, 15, o 24 bits.
  • -
- -

Licencia

-La licencia principal de XDarwin es basada en la Licencia MIT X11 tradicional, que no impone condiciones a la modificación o redistribución del código fuente o de archivos binarios más allá de requerir que los mensajes de Licencia y Copyright se mantengan intactos. Para mayor información y para mensajes adicionales de Licencia y Copyright que cubren algunas secciones del código fuente, por favor consulte the source code. -

Licencia del X Consortium

-

Copyright (C) 1996 X Consortium

-

Se otorga aqui permiso, libre de costo, a toda persona que obtenga una copia de este Software y los archivos de documentación asociados (el "Software"), -para utilizar el Software sin restricciones, incluyendo sin límites los derechos de usar, copiar, modificar, integrar con otros productos, publicar, distribuir, sub-licenciar y/o comercializar copias del Software, y de permitir a las personas que lo reciben para hacer lo propio, sujeto a las siguientes condiciones:

-

El mensaje de Copyright indicado más arriba y este permiso será incluído en todas las copias o porciones sustanciales del 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 X CONSORTIUM 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.

-

Excepto lo indicado en este mensaje, el nombre del X Consortium no será utilizado en propaganda o como medio de promoción para la venta, utilización u otros manejos de este Software sin previa autorización escrita del X Consortium.

-

X Window System es una marca registrada de X Consortium, Inc.

-

X Consortium License (English)

-

Copyright (C) 1996 X Consortium

-

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 X CONSORTIUM 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 X Consortium 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 X Consortium.

-

X Window System is a trademark of X Consortium, Inc.

- - diff --git a/hw/darwin/bundle/Swedish.lproj/Credits.rtf b/hw/darwin/bundle/Swedish.lproj/Credits.rtf deleted file mode 100644 index 34408e78c..000000000 --- a/hw/darwin/bundle/Swedish.lproj/Credits.rtf +++ /dev/null @@ -1,168 +0,0 @@ -{\rtf1\mac\ansicpg10000\cocoartf102 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\fswiss\fcharset77 Helvetica-Oblique; -} -{\colortbl;\red255\green255\blue255;} -\vieww5160\viewh6300\viewkind0 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural - -\f0\fs24 \cf0 This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors. The following people contributed to Darwin/Mac OS X support.\ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Contributors to Xorg Foundation Release: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Kaleb KEITHLEY\ - -\f2\i Working left and right Ctrl, Alt (Option), Meta (Command) and Shift keys. -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\f1\b \cf0 Contributors to XFree86 4.4: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Harper\ - -\f2\i Rootless acceleration and Apple-WM extension -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Additional XonX Contributors to XFree86 4.3: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Fabr\'92cio Luis de Castro\ - -\f2\i Portuguese localization -\f0\i0 \ -Michael Oland\ - -\f2\i New XDarwin icon -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Contributors to XFree86 4.2: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Pablo Di Noto\ - -\f2\i Spanish localization -\f0\i0 \ -Paul Edens\ - -\f2\i Dutch localization -\f0\i0 \ -Kyunghwan Kim\ - -\f2\i Korean localization -\f0\i0 \ -Mario Klebsch\ - -\f2\i Non-US keyboard support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i German localization -\f0\i0 \ -Patrik Montgomery\ - -\f2\i Swedish localization -\f0\i0 \ -Greg Parker\ - -\f2\i Rootless support -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -Olivier Verdier\ - -\f2\i French localization -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Devin Poolman and Zero G Software, Inc.\ - -\f2\i Installer -\f0\i0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural - -\f1\b \cf0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc -\cf0 XonX Team Members\ -Contributing to XFree86 4.1: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Rob Braun\ - -\f2\i Darwin x86 support -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Project Lead -\f0\i0 \ -Andreas Monitzer\ - -\f2\i Cocoa version of XDarwin front end -\f0\i0 \ -Greg Parker\ - -\f2\i Original Quartz implementation -\f0\i0 \ -Christoph Pfisterer\ - -\f2\i Dynamic shared libraries -\f0\i0 \ -Toshimitsu Tanaka\ - -\f2\i Japanese localization -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 Special Thanks: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 Tiago Ribeiro\ - -\f2\i XDarwin icon -\f0\i0 \ -\ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\qc - -\f1\b \cf0 History: -\f0\b0 \ -\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\cf0 John Carmack\ - -\f2\i Original XFree86 port to Mac OS X Server -\f0\i0 \ -Dave Zarzycki\ - -\f2\i XFree86 4.0 port to Darwin 1.0 -\f0\i0 \ -Torrey T. Lyons\ - -\f2\i Integration into XFree86 Project for 4.0.2} \ No newline at end of file diff --git a/hw/darwin/bundle/Swedish.lproj/Localizable.strings b/hw/darwin/bundle/Swedish.lproj/Localizable.strings deleted file mode 100644 index 9709e546984181018ef1c651b22ebd732ede3e93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1464 zcma)+TaVIE6otR%`4uN*o+d(pcnijuanu(zXc!}}2U?)g7San0^LzarYR+n*EnyO0 znw*|}S$nN@_Mg9a++dinC%`8pV}&7N!yHRQ$fIryI|5QNLN+917&a_0WaOlTBrNr} zAgeNF95Cdp2rzubGRH7xf?;DcrgHpz(lJV>F){2)%VD?Q^cv@7~5h= z2#8L39lld2r{ve^aOC419Smt=b>G#{6SN_!O$& z1RRL5Y}uYPSrArkJ!1XAgj;$S zgG(xwcnxBOUiihdW|?x{TS9)5SIre7|W_x-9 zta}$L^z^&#x~q4DzKJV~XkZZ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=cgCoV0I7fCI+5h6`8;h))BRo*RDWU^!b7aF2-r@+q`#DGUGO|;+ z2=aW+Meyk+E+TKg;^-TJj97Xf0?F>MFkgghF@GJ|1$;ZQ@f_KE$bQZzAo~_awhv)1 zM^=llonMY@0Y_gcGMZ2S2bswcI#=-zkOlc1WQ{z9EX $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp diff --git a/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index ab940ec3d..000000000 --- a/hw/darwin/bundle/Swedish.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,101 +0,0 @@ - - -XDarwin Help - - -
-

XDarwin X Server for Mac OS X

- X_VENDOR_NAME X_VERSION
- Färdigställt: X_REL_DATE -
-

Innehåll

-
    -
  1. Viktigt!
  2. -
  3. Användande
  4. -
  5. Att ställa in sin sökväg
  6. -
  7. Inställningar
  8. -
  9. Licens
  10. -
-
-

Viktigt!

-
-
-#if PRE_RELEASE -Detta är en testversion av XDarwin, och du kan inte garranteras någon som helst support för den. Buggar och fel kan rapporteras och förslag till fixar kan skickas till XonX-projektets sida på SourceForge. Innan du rapporterar buggar i testversioner, var god pröva den senaste versionen från XonX eller i X_VENDOR_LINK. -#else -Om servern är äldre än 6-12 månader, eller om din hårdvara är nyare än datumet ovan, leta efter en nyare version innan du rapporterar fel. Buggar och fel kan rapporteras och förslag till fixar kan skickas till XonX-projektets sida på SourceForge. -#endif -
-
-Denna programvara distrubueras i enlighet med MIT X11 / X Consortium License och tilhandhålls som den är, helt utan garantier. Var god läs igenom licensdokumentet (engelska) innan du använder programmet.
- -

Användande

-

XDarwin är en fritt spridd X server av X Window-systemet. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin kan köras på Mac OS X i fullskärmsläge eller rotlöst läge.

-

I fullskärmsläge kommer X window-systemet att ta över hela skärmen när det är aktivt. Du kan byta tillbaka till Mac OS Xs skrivbord genom att trycka Kommando-Alt-A. Denna tangentkombination kan ändra i inställningarna. När du är på Mac OS Xs skrivbord kan du klicka på XDarwin-ikonen i dockan för att byta tillbaka till X Window-systemet. (Du kan förändra detta beteende i inställningarna så att du istället måste klicka i det fltande bytesfönstret istället.)

-

I rotlöstläge delar X11 och Aqua på din skärm. Rotfönstret på X11-skärmen är av samma storlek som hela skärmen och innehåller alla andra fönster - det fungerar som bakgrund. I rotlöstläge visas inte detta rotfönster, eftersom Aqua hanterar skrvbordbakgrunden.

- -

Emulering av flerknapparsmus

-

Många X11-program utnyttjar en treknapparsmus. Du kan emulera en treknapparsmus med en knapp genom att hålla ner olika knappar på tangentbordet medan du klickar med musens enda knapp. Denna funktion styrs av inställningarna i "Emulera flerknapparsmus" under fliken "Diverse" i inställningarna. Grundinställningen är att emulationen är aktiv och att ett kommando-klick (Håll ner kommando och klicka) simulerar den andra musknappen. Den tredje musknappen fås genom att hålla ner alt och klicka. Du kan ändra detta till någon annan kombination av de fem tangenterna kommando, alt, kontrol, skift och fn (Powerbook/iBook). Notera att om dessa knappar har flyttats med hjälp av kommandot xmodmap kommer denna förändring inte att påverka vilka knappar som används vid flerknappsemulationen.

- -

Att ställa in sin sökväg

-

Din sökväg är en lista av kataloger som söks igenom när terminalen letar efter kommandon att exekvera. Kommandon som hör till X11 ligger i /usr/X11R6/bin, en katalog som inte ligger i din sökväg från början. XDarwin lägger till denna katalog åt dig, och du kan också lägga till ytterligare kataloger i vilka du lagt program som skall köras från kommandoraden.

-

Mer erfarna användare har antagligen redan ställt in sin sökväg i skalets inställningsfiler. Om detta gäller dig kan ställa in XDarwin så att din sökväg inte modifieras. XDarwin startar de första X11-klienterna i användarens inloggningsskal (Vill du använda ett alternativt skall, kan du specificera detta i inställningarna). Hur du ställer in din sökväg beror på vilket skal du använder. Exakt hur beskrivs i skalets man-sidor.

- -

Utöver detta kan du också vilja lägga till X11s man-sidor (dokumentation) till listan äver sidor som som skall sökas när du vill läsa efter dokumentationen. X11s man-sidor ligger i /usr/X11R6/man och listan äver kataloger att söka bestämms av variabelnMANPATH.

- -

Inställningar

-

I inställningarna finns ett antal alternativ där du kan påverka hur XDarwin beter sig i vissa fall. Inställningarna kommer du till genom att välja "Inställningar..." i menyn "XDarwin". De alternativ som finns under fliken "Starta" träder inte i kraft förrän du startat om programmet. Alla andra alternativ träder i kraft omedelbart. De olika alternativen beskrivs nedan:

-

Diverse

-
    -
  • Använd Mac OS varningsljud i X11: När detta alternativ är valt används Mac OS vanliga varningsljud är X11s varningsljud (bell). När detta alternativ inte är valt (förvalt) används en vanlig ton.
  • -
  • Tillåt X11 att ändra musens acceleration: I ett vanligt X11-system kan fönsterhanteraren ändra musens acceleration. Detta kan vara förvirrande eftersom musens acceleration kan vara olika i Mac OS Xs System Preferences och i fönsterhanteraren i X11. Förvalet är att X11 inte kan ändra musens acceleration för att på detta sätt undvika detta problem.
  • -
  • Emulera flerknapparsmus: Detta beskrivs ovan under Användande. När emulationen är aktiv måste du hålla ner de valda knapparna för att emulera en andra eller tredje musknapp.
  • -
-

Starta

-
    -
  • Förvalt läge: Om användaren inte på annat sätt väljer vilket läge som skall användas kommer alternativet här att användas.
  • -
  • Visa val av skärmläge vid start: Förvalet är att visa ett fönster när XDarwin startar som låter användaren välja mellan fullskärmsläge och rotlöst läge. Om detta alternativ inte är aktivt kommer XDarwin automatiskt att startas i det läge som valts ovan.
  • -
  • Skärmnummer i X11: X11 tillåter att det finns flera skärmar styrda av varsin X-server på en och samma dator. Användaren kan ange vilket nummer XDarwin skall använda om mer än en X-server skall användas samtidigt.
  • -
  • Aktivera Xinerama (stöd för flera skärmar): XDarwin stödjer flera skärmar genom Xinerama, vilket hanterar alla skrämar som delar av en enda stor rektangulär skärm. Du kan använda detta alternativ för att stänga av Xinerama, men för närvarande kan inte XDarwin hantera flera skärmar utan det. Om du bara har en skärm kommer Xinerama automatiskt att deaktiveras.
  • -
  • Fil med tangentbordsuppsättning: En fil som anger tangentbordsuppsättning läses vid start och översätts till en tangentborsuppsättningsfil för X11. Filer med tangentbordsuppsättningar för ett stort antal språk finns i /System/Library/Keyboards.
  • -
  • Startar första X11-klienterna: När X11 startas från Finder kommer det att exekvera filen xinit för att starta fönsterhanteraren i X11 och andra program. (Se "man xinit" för mer information.) Innan XDarwin kör xinit kommer det att lägga till katalogern här till användarens sökväg. Förvalet är att endast lägga till katalogen /usr/X11R6/bin. Ytterligare kataloger kan läggas till - separera dem med kolon. X11-klienterna startas i användarens inloggningsskal så att användarens inställningsfiler i skalet läses. Om så önskas kan de startas i ett annat skal.
  • -
-

Fullskärm

-
    -
  • Tangentkombinationsknappen: Tryck på denna knapp och en tangentkombination för att ändra den tangentkombination som används för att byta mellan X11 och Aqua.
  • -
  • Klick på ikonen i dockan byter till X11: Aktivera detta alternativ för att byta till X11 genom att klicka på ikonen i dockan. I vissa versioner av Mac OS X kommer ett bte på detta sätt att gömma pekaren när du återvänder till Aqua.
  • -
  • Visa fullskärmshjälp vid start: Detta kommer att visa en informationsruta när XDarwin startas i fullskärmsläge.
  • -
  • Färgdjup: I fullskärmsläge kan X11 använda ett annat färgdjup än Aquas. Om du väjer "Nuvarande" kommer X11 att använda det färgdjup som Aqua har just då. Annars kan du välja 8, 15, eller 24 bitare färg.
  • -
- -

Licens (svenska)

-

Den huvudsakliga licens vi använder oss av är baserad på den traditionella MIT X11 / XConsortium-licensen, vilken inte på något sätt begränsar förändringar eller vidarespridning av vare sig källkod eller kompilerad programvara annat än genom att kräva att delarna som rör copyright och licensiering lämnas intakta. För mer information och ytterligare copyright/licensieringsinfromation rörande vissa speciella delar av koden, se the source code.

- -

Licence (english)

-

The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code.

- -

X Consortium License

-

Copyright (C) 1996 X Consortium

-

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 X CONSORTIUM 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 X Consortium 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 X Consortium.

-

X Window System is a trademark of X Consortium, Inc.

- - diff --git a/hw/darwin/bundle/XDarwin.icns b/hw/darwin/bundle/XDarwin.icns deleted file mode 100644 index 9c560846e6422f3ec6b1c19c5f7705fd77bd128a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69465 zcmeFacXSh1`aeAGa-oC-NFae^lWf|ybW#W@EStVbmh^1MrfiZ;UmM%l1dWO-V8EeQ z)0@?0OO|aF+j5sR9#u4m5#vF~V-yJ?JRn=#_uP>ov?RNK{LcHwcjshva#rK}-22qe zQ?By)M_=b6NfX}w{G;4k5d?Ym+vLLZ$8(;ze#W0Be30QwF=iMud^5u{&&)Zqc=UrO z5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9+b!HIHzdP54az$Ep9*M`G;I}91bsANy z3{(k*AI({LlWXHO;M%CDEc~TGpiU3wzkau_jU`KT#;jFzSqY8iq^IZ;G%AHWN-W@U z*i3V)Sl0$|lWW6YQ?%;I2z6Qs`jfkNZ6t`~T76m;>hXZ*8xnM20+U7x`8+-hL8AA< zu8q7KWg8nRy}wCWs7^=oQfEW9@gPSSt&C4j%gN44HRv?TSf`vXi-{D06IfJti*945 z%e3+#u_h@i^PwkZL$@Jc3c)1crdi)X4OXeeFB&xkg7FmFj=B!g;SkyOm*z&=PI+A*fq-~qKpIt6LC;wYJZ24ao4Da0Dd6vTlAoHFPe_uXLB z*p~I;^BK>5?^}=P9-f&|WAQaUW};E!D-;C570}mTn73)n+cf?^uxX%=y`Bd_Peyz+ zx9u!5x9y|3ef<3M=i@)8Z9e{U+vejxw{1TDbKBVbO~^A=pguXso~(` z@eG$b!a6PiAs$^iga}<42q6&x9vzyx+b2vSs%#)cv~Usb;!s0aWeuT%&>+yaA_SKX zbu5G#Yzm30X)4@ST`pI+L>Xa74V#|EHVJTO6Jk@*yg{PVro{l8It~E?)n`+suX%i2 zY?f8CsWGI5g`d3o1e=u;1RSawV@*_hfpvsAEanjADN$k$n-UAy%yT)}Epw51$}DhI zi5S*~w&AnPkRHNxTKl;A2Y5u9cg)&2Vq7r9dg_&npT-rrPhVqVzQ%_!kLwf>t|1f+ z``vS&UVMCx?7!UpcIb`v->&G5MGCp>E{DXj)x(mP{i4_V^|)~WZ?eE+zWuYFQSsJ=$j zXidz8@vknjM4LLZtkNT57AKeaw6lD^oAil@bY__D%6`W{XN;L#CbyYk&6LAQRWYkf T&prKzp-!&&EF*E+*&>BMXnOR8 diff --git a/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib b/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib deleted file mode 100644 index 77f345a4e..000000000 --- a/hw/darwin/bundle/ko.lproj/MainMenu.nib/classes.nib +++ /dev/null @@ -1,72 +0,0 @@ -{ - IBClasses = ( - { - ACTIONS = {showHelp = id; }; - CLASS = FirstResponder; - LANGUAGE = ObjC; - SUPERCLASS = NSObject; - }, - { - ACTIONS = {close = id; pickFile = id; saveChanges = id; setKey = id; }; - CLASS = Preferences; - LANGUAGE = ObjC; - OUTLETS = { - addToPathButton = id; - addToPathField = id; - button2ModifiersMatrix = id; - button3ModifiersMatrix = id; - depthButton = id; - displayField = id; - dockSwitchButton = id; - fakeButton = id; - keymapFileField = id; - modeMatrix = id; - modeWindowButton = id; - mouseAccelChangeButton = id; - startupHelpButton = id; - switchKeyButton = id; - systemBeepButton = id; - useDefaultShellMatrix = id; - useOtherShellField = id; - useXineramaButton = id; - window = id; - }; - SUPERCLASS = NSObject; - }, - { - CLASS = XApplication; - LANGUAGE = ObjC; - OUTLETS = {preferences = id; xserver = id; }; - SUPERCLASS = NSApplication; - }, - { - ACTIONS = { - bringAllToFront = id; - closeHelpAndShow = id; - itemSelected = id; - nextWindow = id; - previousWindow = id; - showAction = id; - showSwitchPanel = id; - startFullScreen = id; - startRootless = id; - }; - CLASS = XServer; - LANGUAGE = ObjC; - OUTLETS = { - dockMenu = NSMenu; - helpWindow = NSWindow; - modeWindow = NSWindow; - startFullScreenButton = NSButton; - startRootlessButton = NSButton; - startupHelpButton = NSButton; - startupModeButton = NSButton; - switchWindow = NSPanel; - windowMenu = NSMenu; - windowSeparator = NSMenuItem; - }; - SUPERCLASS = NSObject; - } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib b/hw/darwin/bundle/ko.lproj/MainMenu.nib/objects.nib deleted file mode 100644 index 8f9b5e01c5eb6919057b40feafff76af03e639ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21433 zcmeHvdwdi{w(zMT2{8$fCof;E>=h##Oz?Hly9Q7e7KupM3oP#9Bx%SCD$KT2Qxqkkpzz;q@}g`-NiHayF1som_7d3%H3T`npm4ln@eOOd${Mey4wRJq z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|6F{ur`S zjsz%_$?RVyX_p=QG^p5Evd+!;t0EwIYN6JM+$(QTuaEkK5 zOB~@i!nYjRy9mGI2p16AIa;nlww@#V9l~?G0ogVDB(ev%2r?l@_9e3a;1o_{GDmjB z!#o|?FF3MpWYwJFYtYF*M|MANM|LkqwjaUE0m0ADA#nZ(GUCiP5T4=4t|C^*LHIkr z8`-TKErXFg$B`XFmd=r7-ocT*itrR4f$S>YgRGX{i|qC~WX*NpRoZ;1lgCeR6g#XF Ooz`-Bk%L~M_J07I;i4=6 diff --git a/hw/darwin/bundle/ko.lproj/Makefile.am b/hw/darwin/bundle/ko.lproj/Makefile.am deleted file mode 100644 index 56dd6b310..000000000 --- a/hw/darwin/bundle/ko.lproj/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -BINDIR = ${bindir} -include $(top_srcdir)/cpprules.in -XINITDIR = $(libdir)/X11/xinit -XDEFS = \ - -DX_VERSION="$(PLIST_VERSION_STRING)" \ - -DX_PRE_RELEASE="$(PRE)" \ - -DX_REL_DATE="$(XORG_DATE)" \ - -DX_VENDOR_NAME="$(VENDOR_STRING)" \ - -DX_VENDOR_LINK="$(PLIST_VENDOR_WEB)" - - -resourcesdir = @APPLE_APPLICATIONS_DIR@/XDarwin.app/Contents/Resources - -kolprojdir = $(resourcesdir)/ko.lproj - -kolproj_DATA = \ - XDarwinHelp.html \ - InfoPlist.strings \ - Credits.rtf Localizable.strings - -kolprojnibdir = $(kolprojdir)/MainMenu.nib -kolprojnib_DATA = MainMenu.nib/classes.nib MainMenu.nib/objects.nib - -InfoPlist.strings: $(srcdir)/../English.lproj/InfoPlist.strings.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) | $(SED) -e's/__quote__/"/g' > $@ - -XDarwinHelp.html: XDarwinHelp.html.cpp - $(RAWCPP) $(RAWCPPFLAGS) $(XDEFS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@ - -CLEANFILES = XDarwinHelp.html InfoPlist.strings - -EXTRA_DIST = \ - Credits.rtf Localizable.strings \ - Localizable.strings \ - MainMenu.nib/classes.nib \ - MainMenu.nib/objects.nib \ - XDarwinHelp.html.cpp diff --git a/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp b/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp deleted file mode 100644 index db33670d9..000000000 --- a/hw/darwin/bundle/ko.lproj/XDarwinHelp.html.cpp +++ /dev/null @@ -1,94 +0,0 @@ - - -XDarwin Help - - -
-

XDarwin X Server for Mac OS X

- X_VENDOR_NAME X_VERSION
- Release Date: X_REL_DATE -
-

Contents

-
    -
  1. Important Notice
  2. -
  3. Usage
  4. -
  5. Setting Your Path
  6. -
  7. User Preferences
  8. -
  9. License
  10. -
-
-

Important Notice

-
-
-#if X_PRE_RELEASE -This is a pre-release version of XDarwin, and is not supported in any way. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. Before reporting bugs in pre-release versions, please check the latest version from XonX or the X_VENDOR_LINK. -#else -If the server is older than 6-12 months, or if your hardware is newer than the above date, look for a newer version before reporting problems. Bugs may be reported and patches may be submitted to the XonX project page at SourceForge. -#endif -
-
-This software is distributed under the terms of the MIT X11 / X Consortium License and is provided AS IS, with no warranty. Please read the License before using.
- -

Usage

-

XDarwin is a freely redistributable open-source X server for the X Window System. This version of XDarwin was produced by the X_VENDOR_LINK. XDarwin runs on Mac OS X in full screen or rootless modes.

-

In full screen mode, when the X window system is active, it takes over the entire screen. You can switch back to the Mac OS X desktop by holding down Command-Option-A. This key combination can be changed in the user preferences. From the Mac OS X desktop, click on the XDarwin icon in the Dock to switch back to the X window system. (You can change this behavior in the user preferences so that you must click the XDarwin icon in the floating switch window instead.)

-

In rootless mode, the X window system and Aqua share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Aqua handles the desktop background.

-

Multi-Button Mouse Emulation

-

Many X11 applications rely on the use of a 3-button mouse. You can emulate a 3-button mouse with a single button by holding down various modifier keys while you click the mouse button. This is controlled by settings in the "Multi-Button Mouse Emulation" section of the "General" preferences. By default, emulation is on and holding down the command key and clicking the mouse button will simulate clicking the second mouse button. Holding down the option key and clicking will simulate the third button. You can change to any combination of modifiers to emulate buttons two and three in the preferences. Note, even if the modifiers keys are mapped to some other key with xmodmap, you still must use the actual keys specified in the preferences for multi-button mouse emulation.

- -

Setting Your Path

-

Your path is the list of directories to be searched for executable commands. The X11 commands are located in /usr/X11R6/bin, which needs to be added to your path. XDarwin does this for you by default and can also add additional directories where you have installed command line applications.

-

More experienced users will have already set their path correctly using the initialization files for their shell. In this case, you can inform XDarwin not to modify your path in the preferences. XDarwin launches the initial X11 clients in the user's default login shell. (An alternate shell can also be specified in the preferences.) The way to set the path depends on the shell you are using. This is described in the man page documentation for the shell.

-

In addition you may also want to add the X11 man pages to the list of pages to be searched when you are looking for documentation. The X11 man pages are located in /usr/X11R6/man and the MANPATH environment variable contains the list of directories to search.

- -

User Preferences

-

A number of options may be set from the user preferences, accessible from the "Preferences..." menu item in the "XDarwin" menu. The options listed as start up options will not take effect until you have restarted XDarwin. All other options take effect immediately. The various options are described below:

-

General

-
    -
  • Use System beep for X11: When enabled the standard Mac OS X alert sound is used as the X11 bell. When disabled (default) a simple tone is used.
  • -
  • Allow X11 to change mouse acceleration: In a standard X window system implementation, the window manager can change the mouse acceleration. This can lead to confusion as the mouse acceleration may be set to different values by the Mac OS X System Preferences and the X window manager. By default, X11 is not allowed to change the mouse acceleration to avoid this problem.
  • -
  • Multi-Button Mouse Emulation: This is described above under Usage. When emulation is enabled the selected modifiers must be held down when the mouse button is pushed to emulate the second or third mouse buttons.
  • -
-

Start Up

-
    -
  • Default Mode: If the user does not indicate whether to run in full screen or rootless mode, the mode specified here will be used.
  • -
  • Show mode pick panel on startup: By default, a panel is displayed when XDarwin is started to allow the user to choose between full screen or rootless mode. If this option is turned off, the default mode will be started automatically.
  • -
  • X11 Display number: X11 allows there to be multiple displays managed by separate X servers on a single computer. The user may specify an integer display number for XDarwin to use if more than one X server is going to be run simultaneously.
  • -
  • Allow Xinerama multiple monitor support: XDarwin supports multiple monitors with Xinerama, which treats all monitors as being part of one large rectangular screen. You can disable Xinerama with this option, but currently XDarwin does not handle multiple monitors correctly without it. If you only have a single monitor, Xinerama is automatically disabled.
  • -
  • Keymapping File: A keymapping file is read at startup and translated to an X11 keymap. Keymapping files, available for a wide variety of languages, are found in /System/Library/Keyboards.
  • -
  • Starting First X11 Clients: When XDarwin is started from the Finder, it will run xinit to launch the X window manager and other X clients. (See "man xinit" for more information.) Before XDarwin runs xinit it will add the specified directories to the user's path. By default only /usr/X11R6/bin is added. Additional directories may added, separated by a colon. The X clients are started in the user's default login shell so that the user's shell initialization files are read. If desired, an alternate shell may be specified.
  • -
-

Full Screen

-
    -
  • Key combination button: Click this button and then press any number of modifiers followed by a standard key to change the key combination to switch between Aqua and X11.
  • -
  • Click on icon in Dock switches to X11: Enable this to activate switching to X11 by clicking on the XDarwin icon in the Dock. On some versions of Mac OS X, switching by clicking in the Dock can cause the cursor to disappear on returning to Aqua.
  • -
  • Show help on startup: This will show an introductory splash screen when XDarwin is started in full screen mode.
  • -
  • Color bit depth: In full screen mode, the X11 display can use a different color bit depth than is used by Aqua. If "Current" is specified, the depth used by Aqua when XDarwin starts will be used. Otherwise 8, 15, or 24 bits may be specified.
  • -
- -

License

-The main license for XDarwin is based on the traditional MIT X11 / X Consortium License, which does not impose any conditions on modification or redistribution of source code or binaries other than requiring that copyright/license notices are left intact. For more information and additional copyright/licensing notices covering some sections of the code, please refer to the source code. -

X Consortium License

-

Copyright (C) 1996 X Consortium

-

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 X CONSORTIUM 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 X Consortium 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 X Consortium.

-

X Window System is a trademark of X Consortium, Inc.

- - diff --git a/hw/darwin/bundle/startXClients.cpp b/hw/darwin/bundle/startXClients.cpp deleted file mode 100644 index f812dbfd8..000000000 --- a/hw/darwin/bundle/startXClients.cpp +++ /dev/null @@ -1,22 +0,0 @@ -XCOMM!/bin/sh - -XCOMM This script is used by XDarwin to start X clients when XDarwin is -XCOMM launched from the Finder. - -userclientrc=$HOME/.xinitrc -sysclientrc=XINITDIR/xinitrc -clientargs="" - -if [ -f $userclientrc ]; then - clientargs=$userclientrc -else if [ -f $sysclientrc ]; then - clientargs=$sysclientrc -fi -fi - -if [ "x$2" != "x" ]; then - PATH="$PATH:$2" - export PATH -fi - -exec xinit $clientargs -- XBINDIR/XDarwinStartup "$1" -idle diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index c32cd5461..22e133872 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -67,6 +67,11 @@ #include #include +#ifdef MITSHM +#define _XSHM_SERVER_ +#include +#endif + #include "darwin.h" #include "darwinClut8.h" @@ -180,7 +185,9 @@ static Bool DarwinAddScreen( // allocate space for private per screen storage dfb = xalloc(sizeof(DarwinFramebufferRec)); - SCREEN_PRIV(pScreen) = dfb; + + // SCREEN_PRIV(pScreen) = dfb; + pScreen->devPrivates[darwinScreenIndex].ptr = dfb; // setup hardware/mode specific details ret = DarwinModeAddScreen(foundIndex, pScreen); @@ -336,7 +343,7 @@ static int DarwinMouseProc( DeviceIntPtr pPointer, int what ) { - char map[6]; + CARD8 map[6]; switch (what) { @@ -677,10 +684,30 @@ void ddxInitGlobals(void) */ int ddxProcessArgument( int argc, char *argv[], int i ) { - int numDone; + if ( !strcmp( argv[i], "-fullscreen" ) ) { + ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" ); + return 1; + } - if ((numDone = DarwinModeProcessArgument( argc, argv, i ))) - return numDone; + if ( !strcmp( argv[i], "-rootless" ) ) { + ErrorF( "Running rootless inside Mac OS X window server.\n" ); + 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; + } if ( !strcmp( argv[i], "-fakebuttons" ) ) { darwinFakeButtons = TRUE; @@ -833,14 +860,11 @@ 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"); -#ifdef DARWIN_WITH_QUARTZ - ErrorF("Quartz modes:\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 : use default Mac OS X window server mode\n"); ErrorF("\n"); ErrorF("Options ignored in rootless mode:\n"); -#endif ErrorF("-size : use a screen resolution of x .\n"); ErrorF("-depth <8,15,24> : use this bit depth.\n"); ErrorF("-refresh : use a monitor refresh rate of Hz.\n"); diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index e63385882..587ba1cc6 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -27,6 +27,8 @@ #ifndef _DARWIN_H #define _DARWIN_H +#include "dix-config.h" + #include #include "inputstr.h" #include "scrnintstr.h" @@ -76,7 +78,6 @@ Bool DarwinModeAddScreen(int index, ScreenPtr pScreen); Bool DarwinModeSetupScreen(int index, ScreenPtr pScreen); void DarwinModeInitOutput(int argc,char **argv); void DarwinModeInitInput(int argc, char **argv); -int DarwinModeProcessArgument(int argc, char *argv[], int i); void DarwinModeProcessEvent(xEvent *xe); void DarwinModeGiveUp(void); void DarwinModeBell(int volume, DeviceIntPtr pDevice, pointer ctrl, int class); diff --git a/hw/darwin/iokit/Makefile.am b/hw/darwin/iokit/Makefile.am deleted file mode 100644 index 54464aec9..000000000 --- a/hw/darwin/iokit/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -noinst_LIBRARIES = libiokit.a - -AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@ -AM_DEFS = -if XQUARTZ -AM_DEFS += -DDARWIN_WITH_QUARTZ -DXFree86Server -XQUARTZ_SUBDIRS = bundle quartz -endif -DEFS = @DEFS@ $(AM_DEFS) - -libiokit_a_SOURCES = xfIOKit.c \ - xfIOKitCursor.c \ - xfIOKitStartup.c - -EXTRA_DIST = \ - xfIOKit.h diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c deleted file mode 100644 index 0feb8ccb0..000000000 --- a/hw/darwin/iokit/xfIOKit.c +++ /dev/null @@ -1,773 +0,0 @@ -/************************************************************** - * - * IOKit support for the Darwin X Server - * - * HISTORY: - * Original port to Mac OS X Server by John Carmack - * Port to Darwin 1.0 by Dave Zarzycki - * Significantly rewritten for XFree86 4.0.1 by Torrey Lyons - * - **************************************************************/ -/* - * 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. - */ - -#include - -#include -#include -#include "os.h" -#include "servermd.h" -#include "inputstr.h" -#include "scrnintstr.h" -#include "mi.h" -#include "mibstore.h" -#include "mipointer.h" -#include "micmap.h" -#include "shadow.h" - -#include -#include -#include -#include -#include -#include - -#include - -#define NO_CFPLUGIN -#include -#include -#include -#include - -// Define this to work around bugs in the display drivers for -// older PowerBook G3's. If the X server starts without this -// #define, you don't need it. -#undef OLD_POWERBOOK_G3 - -#include "darwin.h" -#include "xfIOKit.h" - -// Globals -int xfIOKitScreenIndex = 0; -io_connect_t xfIOKitInputConnect = 0; - -static pthread_t inputThread; -static EvGlobals * evg; -static mach_port_t masterPort; -static mach_port_t notificationPort; -static IONotificationPortRef NotificationPortRef; -static mach_port_t pmNotificationPort; -static io_iterator_t fbIter; - - -/* - * XFIOKitStoreColors - * This is a callback from X to change the hardware colormap - * when using PsuedoColor. - */ -static void XFIOKitStoreColors( - ColormapPtr pmap, - int numEntries, - xColorItem *pdefs) -{ - kern_return_t kr; - int i; - IOColorEntry *newColors; - ScreenPtr pScreen = pmap->pScreen; - XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); - - assert( newColors = (IOColorEntry *) - xalloc( numEntries*sizeof(IOColorEntry) )); - - // Convert xColorItem values to IOColorEntry - // assume the colormap is PsuedoColor - // as we do not support DirectColor - for (i = 0; i < numEntries; i++) { - newColors[i].index = pdefs[i].pixel; - newColors[i].red = pdefs[i].red; - newColors[i].green = pdefs[i].green; - newColors[i].blue = pdefs[i].blue; - } - - kr = IOFBSetCLUT( iokitScreen->fbService, 0, numEntries, - kSetCLUTByValue, newColors ); - kern_assert( kr ); - - xfree( newColors ); -} - - -/* - * DarwinModeBell - * FIXME - */ -void DarwinModeBell( - int loud, - DeviceIntPtr pDevice, - pointer ctrl, - int fbclass) -{ -} - - -/* - * DarwinModeGiveUp - * Closes the connections to IOKit services - */ -void DarwinModeGiveUp( void ) -{ - int i; - - // we must close the HID System first - // because it is a client of the framebuffer - NXCloseEventStatus( darwinParamConnect ); - IOServiceClose( xfIOKitInputConnect ); - for (i = 0; i < screenInfo.numScreens; i++) { - XFIOKitScreenPtr iokitScreen = - XFIOKIT_SCREEN_PRIV(screenInfo.screens[i]); - IOServiceClose( iokitScreen->fbService ); - } -} - - -/* - * ClearEvent - * Clear an event from the HID System event queue - */ -static void ClearEvent(NXEvent * ep) -{ - static NXEvent nullEvent = {NX_NULLEVENT, {0, 0 }, 0, -1, 0 }; - - *ep = nullEvent; - ep->data.compound.subType = ep->data.compound.misc.L[0] = - ep->data.compound.misc.L[1] = 0; -} - - -/* - * XFIOKitHIDThread - * Read the HID System event queue, translate it to an X event, - * and queue it for processing. - */ -static void *XFIOKitHIDThread(void *unused) -{ - for (;;) { - NXEQElement *oldHead; - mach_msg_return_t kr; - mach_msg_empty_rcv_t msg; - - kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0, - sizeof(msg), notificationPort, 0, MACH_PORT_NULL); - kern_assert(kr); - - while (evg->LLEHead != evg->LLETail) { - NXEvent ev; - xEvent xe; - - // Extract the next event from the kernel queue - oldHead = (NXEQElement*)&evg->lleq[evg->LLEHead]; - ev_lock(&oldHead->sema); - ev = oldHead->event; - ClearEvent(&oldHead->event); - evg->LLEHead = oldHead->next; - ev_unlock(&oldHead->sema); - - memset(&xe, 0, sizeof(xe)); - - // These fields should be filled in for every event - xe.u.keyButtonPointer.rootX = ev.location.x; - xe.u.keyButtonPointer.rootY = ev.location.y; - xe.u.keyButtonPointer.time = GetTimeInMillis(); - - switch( ev.type ) { - case NX_MOUSEMOVED: - xe.u.u.type = MotionNotify; - break; - - case NX_LMOUSEDOWN: - xe.u.u.type = ButtonPress; - xe.u.u.detail = 1; - break; - - case NX_LMOUSEUP: - xe.u.u.type = ButtonRelease; - xe.u.u.detail = 1; - break; - - // A newer kernel generates multi-button events with - // NX_SYSDEFINED. Button 2 isn't handled correctly by - // older kernels anyway. Just let NX_SYSDEFINED events - // handle these. -#if 0 - case NX_RMOUSEDOWN: - xe.u.u.type = ButtonPress; - xe.u.u.detail = 2; - break; - - case NX_RMOUSEUP: - xe.u.u.type = ButtonRelease; - xe.u.u.detail = 2; - break; -#endif - - case NX_KEYDOWN: - xe.u.u.type = KeyPress; - xe.u.u.detail = ev.data.key.keyCode; - break; - - case NX_KEYUP: - xe.u.u.type = KeyRelease; - xe.u.u.detail = ev.data.key.keyCode; - break; - - case NX_FLAGSCHANGED: - xe.u.u.type = kXDarwinUpdateModifiers; - xe.u.clientMessage.u.l.longs0 = ev.flags; - break; - - case NX_SYSDEFINED: - if (ev.data.compound.subType == 7) { - xe.u.u.type = kXDarwinUpdateButtons; - xe.u.clientMessage.u.l.longs0 = - ev.data.compound.misc.L[0]; - xe.u.clientMessage.u.l.longs1 = - ev.data.compound.misc.L[1]; - } else { - continue; - } - break; - - case NX_SCROLLWHEELMOVED: - xe.u.u.type = kXDarwinScrollWheel; - xe.u.clientMessage.u.s.shorts0 = - ev.data.scrollWheel.deltaAxis1; - break; - - default: - continue; - } - - DarwinEQEnqueue(&xe); - } - } - - return NULL; -} - - -/* - * XFIOKitPMThread - * Handle power state notifications - */ -static void *XFIOKitPMThread(void *arg) -{ - ScreenPtr pScreen = (ScreenPtr)arg; - XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); - - for (;;) { - mach_msg_return_t kr; - mach_msg_empty_rcv_t msg; - - kr = mach_msg((mach_msg_header_t*) &msg, MACH_RCV_MSG, 0, - sizeof(msg), pmNotificationPort, 0, MACH_PORT_NULL); - kern_assert(kr); - - // display is powering down - if (msg.header.msgh_id == 0) { - IOFBAcknowledgePM( iokitScreen->fbService ); - xf86SetRootClip(pScreen, FALSE); - } - // display just woke up - else if (msg.header.msgh_id == 1) { - xf86SetRootClip(pScreen, TRUE); - } - } - return NULL; -} - - -/* - * SetupFBandHID - * Setup an IOFramebuffer service and connect the HID system to it. - */ -static Bool SetupFBandHID( - int index, - DarwinFramebufferPtr dfb, - XFIOKitScreenPtr iokitScreen) -{ - kern_return_t kr; - io_service_t service; - io_connect_t fbService; - vm_address_t vram; - vm_size_t shmemSize; - int i; - UInt32 numModes; - IODisplayModeInformation modeInfo; - IODisplayModeID displayMode, *allModes; - IOIndex displayDepth; - IOFramebufferInformation fbInfo; - IOPixelInformation pixelInfo; - StdFBShmem_t *cshmem; - - // find and open the IOFrameBuffer service - service = IOIteratorNext(fbIter); - if (service == 0) - return FALSE; - - kr = IOServiceOpen( service, mach_task_self(), - kIOFBServerConnectType, &iokitScreen->fbService ); - IOObjectRelease( service ); - if (kr != KERN_SUCCESS) { - ErrorF("Failed to connect as window server to screen %i.\n", index); - return FALSE; - } - fbService = iokitScreen->fbService; - - // create the slice of shared memory containing cursor state data - kr = IOFBCreateSharedCursor( fbService, - kIOFBCurrentShmemVersion, - 32, 32 ); - if (kr != KERN_SUCCESS) - return FALSE; - - // Register for power management events for the framebuffer's device - kr = IOCreateReceivePort(kOSNotificationMessageID, &pmNotificationPort); - kern_assert(kr); - kr = IOConnectSetNotificationPort( fbService, 0, - pmNotificationPort, 0 ); - if (kr != KERN_SUCCESS) { - ErrorF("Power management registration failed.\n"); - } - - // SET THE SCREEN PARAMETERS - // get the current screen resolution, refresh rate and depth - kr = IOFBGetCurrentDisplayModeAndDepth( fbService, - &displayMode, - &displayDepth ); - if (kr != KERN_SUCCESS) - return FALSE; - - // use the current screen resolution if the user - // only wants to change the refresh rate - if (darwinDesiredRefresh != -1 && darwinDesiredWidth == 0) { - kr = IOFBGetDisplayModeInformation( fbService, - displayMode, - &modeInfo ); - if (kr != KERN_SUCCESS) - return FALSE; - darwinDesiredWidth = modeInfo.nominalWidth; - darwinDesiredHeight = modeInfo.nominalHeight; - } - - // use the current resolution and refresh rate - // if the user doesn't have a preference - if (darwinDesiredWidth == 0) { - - // change the pixel depth if desired - if (darwinDesiredDepth != -1) { - kr = IOFBGetDisplayModeInformation( fbService, - displayMode, - &modeInfo ); - if (kr != KERN_SUCCESS) - return FALSE; - if (modeInfo.maxDepthIndex < darwinDesiredDepth) { - ErrorF("Discarding screen %i:\n", index); - ErrorF("Current screen resolution does not support desired pixel depth.\n"); - return FALSE; - } - - displayDepth = darwinDesiredDepth; - kr = IOFBSetDisplayModeAndDepth( fbService, displayMode, - displayDepth ); - if (kr != KERN_SUCCESS) - return FALSE; - } - - // look for display mode with correct resolution and refresh rate - } else { - - // get an array of all supported display modes - kr = IOFBGetDisplayModeCount( fbService, &numModes ); - if (kr != KERN_SUCCESS) - return FALSE; - assert(allModes = (IODisplayModeID *) - xalloc( numModes * sizeof(IODisplayModeID) )); - kr = IOFBGetDisplayModes( fbService, numModes, allModes ); - if (kr != KERN_SUCCESS) - return FALSE; - - for (i = 0; i < numModes; i++) { - kr = IOFBGetDisplayModeInformation( fbService, allModes[i], - &modeInfo ); - if (kr != KERN_SUCCESS) - return FALSE; - - if (modeInfo.flags & kDisplayModeValidFlag && - modeInfo.nominalWidth == darwinDesiredWidth && - modeInfo.nominalHeight == darwinDesiredHeight) { - - if (darwinDesiredDepth == -1) - darwinDesiredDepth = modeInfo.maxDepthIndex; - if (modeInfo.maxDepthIndex < darwinDesiredDepth) { - ErrorF("Discarding screen %i:\n", index); - ErrorF("Desired screen resolution does not support desired pixel depth.\n"); - return FALSE; - } - - if ((darwinDesiredRefresh == -1 || - (darwinDesiredRefresh << 16) == modeInfo.refreshRate)) { - displayMode = allModes[i]; - displayDepth = darwinDesiredDepth; - kr = IOFBSetDisplayModeAndDepth(fbService, - displayMode, - displayDepth); - if (kr != KERN_SUCCESS) - return FALSE; - break; - } - } - } - - xfree( allModes ); - if (i >= numModes) { - ErrorF("Discarding screen %i:\n", index); - ErrorF("Desired screen resolution or refresh rate is not supported.\n"); - return FALSE; - } - } - - kr = IOFBGetPixelInformation( fbService, displayMode, displayDepth, - kIOFBSystemAperture, &pixelInfo ); - if (kr != KERN_SUCCESS) - return FALSE; - -#ifdef __i386__ - /* x86 in 8bit mode currently needs fixed color map... */ - if (pixelInfo.bitsPerComponent == 8 && - pixelInfo.componentCount == 1) - { - pixelInfo.pixelType = kIOFixedCLUTPixels; - } -#endif - -#ifdef OLD_POWERBOOK_G3 - if (pixelInfo.pixelType == kIOCLUTPixels) - pixelInfo.pixelType = kIOFixedCLUTPixels; -#endif - - kr = IOFBGetFramebufferInformationForAperture( fbService, - kIOFBSystemAperture, - &fbInfo ); - if (kr != KERN_SUCCESS) - return FALSE; - - // FIXME: 1x1 IOFramebuffers are sometimes used to indicate video - // outputs without a monitor connected to them. Since IOKit Xinerama - // does not really work, this often causes problems on PowerBooks. - // For now we explicitly check and ignore these screens. - if (fbInfo.activeWidth <= 1 || fbInfo.activeHeight <= 1) { - ErrorF("Discarding screen %i:\n", index); - ErrorF("Invalid width or height.\n"); - return FALSE; - } - - kr = IOConnectMapMemory( fbService, kIOFBCursorMemory, - mach_task_self(), (vm_address_t *) &cshmem, - &shmemSize, kIOMapAnywhere ); - if (kr != KERN_SUCCESS) - return FALSE; - iokitScreen->cursorShmem = cshmem; - - kr = IOConnectMapMemory( fbService, kIOFBSystemAperture, - mach_task_self(), &vram, &shmemSize, - kIOMapAnywhere ); - if (kr != KERN_SUCCESS) - return FALSE; - - iokitScreen->framebuffer = (void*)vram; - dfb->x = cshmem->screenBounds.minx; - dfb->y = cshmem->screenBounds.miny; - dfb->width = fbInfo.activeWidth; - dfb->height = fbInfo.activeHeight; - dfb->pitch = fbInfo.bytesPerRow; - dfb->bitsPerPixel = fbInfo.bitsPerPixel; - dfb->colorBitsPerPixel = pixelInfo.componentCount * - pixelInfo.bitsPerComponent; - dfb->bitsPerComponent = pixelInfo.bitsPerComponent; - - // allocate shadow framebuffer - iokitScreen->shadowPtr = xalloc(dfb->pitch * dfb->height); - dfb->framebuffer = iokitScreen->shadowPtr; - - // Note: Darwin kIORGBDirectPixels = X TrueColor, not DirectColor - if (pixelInfo.pixelType == kIORGBDirectPixels) { - dfb->colorType = TrueColor; - } else if (pixelInfo.pixelType == kIOCLUTPixels) { - dfb->colorType = PseudoColor; - } else if (pixelInfo.pixelType == kIOFixedCLUTPixels) { - dfb->colorType = StaticColor; - } - - // Inform the HID system that the framebuffer is also connected to it. - kr = IOConnectAddClient( xfIOKitInputConnect, fbService ); - kern_assert( kr ); - - // We have to have added at least one screen - // before we can enable the cursor. - kr = IOHIDSetCursorEnable(xfIOKitInputConnect, TRUE); - kern_assert( kr ); - - return TRUE; -} - - -/* - * DarwinModeAddScreen - * IOKit specific initialization for each screen. - */ -Bool DarwinModeAddScreen( - int index, - ScreenPtr pScreen) -{ - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - XFIOKitScreenPtr iokitScreen; - - // allocate space for private per screen storage - iokitScreen = xalloc(sizeof(XFIOKitScreenRec)); - XFIOKIT_SCREEN_PRIV(pScreen) = iokitScreen; - - // setup hardware framebuffer - iokitScreen->fbService = 0; - if (! SetupFBandHID(index, dfb, iokitScreen)) { - if (iokitScreen->fbService) { - IOServiceClose(iokitScreen->fbService); - } - return FALSE; - } - - return TRUE; -} - - -/* - * XFIOKitShadowUpdate - * Update the damaged regions of the shadow framebuffer on the screen. - */ -static void XFIOKitShadowUpdate(ScreenPtr pScreen, - shadowBufPtr pBuf) -{ - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_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; - - // 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 = iokitScreen->shadowPtr + offset; - dst = iokitScreen->framebuffer + offset; - - while (height--) { - memcpy(dst, src, width); - dst += pitch; - src += pitch; - } - - // Get the next box - pBox++; - } -} - - -/* - * DarwinModeSetupScreen - * Finalize IOKit specific initialization of each screen. - */ -Bool DarwinModeSetupScreen( - int index, - ScreenPtr pScreen) -{ - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - pthread_t pmThread; - - // initalize cursor support - if (! XFIOKitInitCursor(pScreen)) { - return FALSE; - } - - // initialize shadow framebuffer support - if (! shadowInit(pScreen, XFIOKitShadowUpdate, NULL)) { - ErrorF("Failed to initalize shadow framebuffer for screen %i.\n", - index); - return FALSE; - } - - // initialize colormap handling as needed - if (dfb->colorType == PseudoColor) { - pScreen->StoreColors = XFIOKitStoreColors; - } - - // initialize power manager handling - pthread_create( &pmThread, NULL, XFIOKitPMThread, - (void *) pScreen ); - - return TRUE; -} - - -/* - * DarwinModeInitOutput - * One-time initialization of IOKit output support. - */ -void DarwinModeInitOutput( - int argc, - char **argv) -{ - static unsigned long generation = 0; - kern_return_t kr; - io_iterator_t iter; - io_service_t service; - vm_address_t shmem; - vm_size_t shmemSize; - - ErrorF("Display mode: IOKit\n"); - - // Allocate private storage for each screen's IOKit specific info - if (generation != serverGeneration) { - xfIOKitScreenIndex = AllocateScreenPrivateIndex(); - generation = serverGeneration; - } - - kr = IOMasterPort(bootstrap_port, &masterPort); - kern_assert( kr ); - - // Find and open the HID System Service - // Do this now to be sure the Mac OS X window server is not running. - kr = IOServiceGetMatchingServices( masterPort, - IOServiceMatching( kIOHIDSystemClass ), - &iter ); - kern_assert( kr ); - - assert( service = IOIteratorNext( iter ) ); - - kr = IOServiceOpen( service, mach_task_self(), kIOHIDServerConnectType, - &xfIOKitInputConnect ); - if (kr != KERN_SUCCESS) { - ErrorF("Failed to connect to the HID System as the window server!\n"); -#ifdef DARWIN_WITH_QUARTZ - FatalError("Quit the Mac OS X window server or use the -quartz option.\n"); -#else - FatalError("Make sure you have quit the Mac OS X window server.\n"); -#endif - } - - IOObjectRelease( service ); - IOObjectRelease( iter ); - - // Setup the event queue in memory shared by the kernel and X server - kr = IOHIDCreateSharedMemory( xfIOKitInputConnect, - kIOHIDCurrentShmemVersion ); - kern_assert( kr ); - - kr = IOConnectMapMemory( xfIOKitInputConnect, kIOHIDGlobalMemory, - mach_task_self(), &shmem, &shmemSize, - kIOMapAnywhere ); - kern_assert( kr ); - - evg = (EvGlobals *)(shmem + ((EvOffsets *)shmem)->evGlobalsOffset); - - assert(sizeof(EvGlobals) == evg->structSize); - - NotificationPortRef = IONotificationPortCreate( masterPort ); - - notificationPort = IONotificationPortGetMachPort(NotificationPortRef); - - kr = IOConnectSetNotificationPort( xfIOKitInputConnect, - kIOHIDEventNotification, - notificationPort, 0 ); - kern_assert( kr ); - - evg->movedMask |= NX_MOUSEMOVEDMASK; - - // find number of framebuffers - kr = IOServiceGetMatchingServices( masterPort, - IOServiceMatching( IOFRAMEBUFFER_CONFORMSTO ), - &fbIter ); - kern_assert( kr ); - - darwinScreensFound = 0; - while ((service = IOIteratorNext(fbIter))) { - IOObjectRelease( service ); - darwinScreensFound++; - } - IOIteratorReset(fbIter); -} - - -/* - * DarwinModeInitInput - * One-time initialization of IOKit input support. - */ -void DarwinModeInitInput( - int argc, - char **argv) -{ - kern_return_t kr; - int fd[2]; - - kr = IOHIDSetEventsEnable(xfIOKitInputConnect, TRUE); - kern_assert( kr ); - - // Start event passing thread - assert( pipe(fd) == 0 ); - darwinEventReadFD = fd[0]; - darwinEventWriteFD = fd[1]; - fcntl(darwinEventReadFD, F_SETFL, O_NONBLOCK); - pthread_create(&inputThread, NULL, - XFIOKitHIDThread, NULL); - -} - - -/* - * DarwinModeProcessEvent - * Process IOKit specific events. - */ -void DarwinModeProcessEvent( - xEvent *xe) -{ - // No mode specific events - ErrorF("Unknown X event caught: %d\n", xe->u.u.type); -} diff --git a/hw/darwin/iokit/xfIOKit.h b/hw/darwin/iokit/xfIOKit.h deleted file mode 100644 index 27d27bc70..000000000 --- a/hw/darwin/iokit/xfIOKit.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - xfIOKit.h - - IOKit specific functions and definitions -*/ -/* - * Copyright (c) 2001-2002 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 _XFIOKIT_H -#define _XFIOKIT_H - -#include -#include -#include -#include "screenint.h" -#include "darwin.h" - -typedef struct { - io_connect_t fbService; - StdFBShmem_t *cursorShmem; - unsigned char *framebuffer; - unsigned char *shadowPtr; -} XFIOKitScreenRec, *XFIOKitScreenPtr; - -#define XFIOKIT_SCREEN_PRIV(pScreen) \ - ((XFIOKitScreenPtr)pScreen->devPrivates[xfIOKitScreenIndex].ptr) - -extern int xfIOKitScreenIndex; // index into pScreen.devPrivates -extern io_connect_t xfIOKitInputConnect; - -Bool XFIOKitInitCursor(ScreenPtr pScreen); - -#endif /* _XFIOKIT_H */ diff --git a/hw/darwin/iokit/xfIOKitCursor.c b/hw/darwin/iokit/xfIOKitCursor.c deleted file mode 100644 index e9c78c130..000000000 --- a/hw/darwin/iokit/xfIOKitCursor.c +++ /dev/null @@ -1,736 +0,0 @@ -/************************************************************** - * - * Cursor support for Darwin X Server - * - * Three different cursor modes are possible: - * X (0) - tracking via Darwin kernel, - * display via X machine independent - * Kernel (1) - tracking and display via Darwin kernel - * (not currently supported) - * Hardware (2) - tracking and display via hardware - * - * The X software cursor uses the Darwin software cursor - * routines in IOFramebuffer.cpp to track the cursor, but - * displays the cursor image using the X machine - * independent display cursor routines in midispcur.c. - * - * The kernel cursor uses IOFramebuffer.cpp routines to - * track and display the cursor. This gives better - * performance as the display calls don't have to cross - * the kernel boundary. Unfortunately, this mode has - * synchronization issues with the user land X server - * and isn't currently used. - * - * Hardware cursor support lets the hardware handle these - * details. - * - * Kernel and hardware cursor mode only work for cursors - * up to a certain size, currently 16x16 pixels. If a - * bigger cursor is set, we fallback to X cursor mode. - * - * HISTORY: - * 1.0 by Torrey T. Lyons, October 30, 2000 - * - **************************************************************/ -/* - * Copyright (c) 2001-2002 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. - */ - -#include - -#include "scrnintstr.h" -#include "cursorstr.h" -#include "mipointrst.h" -#include "micmap.h" -#define NO_CFPLUGIN -#include -#include -#include "darwin.h" -#include "xfIOKit.h" -#include -#define DUMP_DARWIN_CURSOR FALSE - -#define CURSOR_PRIV(pScreen) \ - ((XFIOKitCursorScreenPtr)pScreen->devPrivates[darwinCursorScreenIndex].ptr) - -// The cursors format are documented in IOFramebufferShared.h. -#define RGBto34WithGamma(red, green, blue) \ - ( 0x000F \ - | (((red) & 0xF) << 12) \ - | (((green) & 0xF) << 8) \ - | (((blue) & 0xF) << 4) ) -#define RGBto38WithGamma(red, green, blue) \ - ( 0xFF << 24 \ - | (((red) & 0xFF) << 16) \ - | (((green) & 0xFF) << 8) \ - | (((blue) & 0xFF)) ) -#define HighBitOf32 0x80000000 - -typedef struct { - Bool canHWCursor; - short cursorMode; - RecolorCursorProcPtr RecolorCursor; - InstallColormapProcPtr InstallColormap; - QueryBestSizeProcPtr QueryBestSize; - miPointerSpriteFuncPtr spriteFuncs; - ColormapPtr pInstalledMap; -} XFIOKitCursorScreenRec, *XFIOKitCursorScreenPtr; - -static int darwinCursorScreenIndex = -1; -static unsigned long darwinCursorGeneration = 0; - -/* -=========================================================================== - - Pointer sprite functions - -=========================================================================== -*/ - -/* - Realizing the Darwin hardware cursor (ie. converting from the - X representation to the IOKit representation) is complicated - by the fact that we have three different potential cursor - formats to go to, one for each bit depth (8, 15, or 24). - The IOKit formats are documented in IOFramebufferShared.h. - X cursors are represented as two pieces, a source and a mask. - The mask is a bitmap indicating which parts of the cursor are - transparent and which parts are drawn. The source is a bitmap - indicating which parts of the non-transparent portion of the the - cursor should be painted in the foreground color and which should - be painted in the background color. The bitmaps are given in - 32-bit format with least significant byte and bit first. - (This is opposite PowerPC Darwin.) -*/ - -typedef struct { - unsigned char image[CURSORWIDTH*CURSORHEIGHT]; - unsigned char mask[CURSORWIDTH*CURSORHEIGHT]; -} cursorPrivRec, *cursorPrivPtr; - -/* - * XFIOKitRealizeCursor8 - * Convert the X cursor representation to an 8-bit depth - * format for Darwin. This function assumes the maximum cursor - * width is a multiple of 8. - */ -static Bool -XFIOKitRealizeCursor8( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - cursorPrivPtr newCursor; - unsigned char *newSourceP, *newMaskP; - CARD32 *oldSourceP, *oldMaskP; - xColorItem fgColor, bgColor; - int index, x, y, rowPad; - int cursorWidth, cursorHeight; - ColormapPtr pmap; - - // check cursor size just to be sure - cursorWidth = pCursor->bits->width; - cursorHeight = pCursor->bits->height; - if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) - return FALSE; - - // get cursor colors in colormap - index = pScreen->myNum; - pmap = miInstalledMaps[index]; - if (!pmap) return FALSE; - - fgColor.red = pCursor->foreRed; - fgColor.green = pCursor->foreGreen; - fgColor.blue = pCursor->foreBlue; - FakeAllocColor(pmap, &fgColor); - bgColor.red = pCursor->backRed; - bgColor.green = pCursor->backGreen; - bgColor.blue = pCursor->backBlue; - FakeAllocColor(pmap, &bgColor); - FakeFreeColor(pmap, fgColor.pixel); - FakeFreeColor(pmap, bgColor.pixel); - - // allocate memory for new cursor image - newCursor = xalloc( sizeof(cursorPrivRec) ); - if (!newCursor) - return FALSE; - memset( newCursor->image, pScreen->blackPixel, CURSORWIDTH*CURSORHEIGHT ); - memset( newCursor->mask, 0, CURSORWIDTH*CURSORHEIGHT ); - - // convert to 8-bit Darwin cursor format - oldSourceP = (CARD32 *) pCursor->bits->source; - oldMaskP = (CARD32 *) pCursor->bits->mask; - newSourceP = newCursor->image; - newMaskP = newCursor->mask; - rowPad = CURSORWIDTH - cursorWidth; - - for (y = 0; y < cursorHeight; y++) { - for (x = 0; x < cursorWidth; x++) { - if (*oldSourceP & (HighBitOf32 >> x)) - *newSourceP = fgColor.pixel; - else - *newSourceP = bgColor.pixel; - if (*oldMaskP & (HighBitOf32 >> x)) - *newMaskP = 255; - else - *newSourceP = pScreen->blackPixel; - newSourceP++; newMaskP++; - } - oldSourceP++; oldMaskP++; - newSourceP += rowPad; newMaskP += rowPad; - } - - // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; - return TRUE; -} - - -/* - * XFIOKitRealizeCursor15 - * Convert the X cursor representation to an 15-bit depth - * format for Darwin. - */ -static Bool -XFIOKitRealizeCursor15( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - unsigned short *newCursor; - unsigned short fgPixel, bgPixel; - unsigned short *newSourceP; - CARD32 *oldSourceP, *oldMaskP; - int x, y, rowPad; - int cursorWidth, cursorHeight; - - // check cursor size just to be sure - cursorWidth = pCursor->bits->width; - cursorHeight = pCursor->bits->height; - if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) - return FALSE; - - // allocate memory for new cursor image - newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(short) ); - if (!newCursor) - return FALSE; - memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(short) ); - - // calculate pixel values - fgPixel = RGBto34WithGamma( pCursor->foreRed, pCursor->foreGreen, - pCursor->foreBlue ); - bgPixel = RGBto34WithGamma( pCursor->backRed, pCursor->backGreen, - pCursor->backBlue ); - - // convert to 15-bit Darwin cursor format - oldSourceP = (CARD32 *) pCursor->bits->source; - oldMaskP = (CARD32 *) pCursor->bits->mask; - newSourceP = newCursor; - rowPad = CURSORWIDTH - cursorWidth; - - for (y = 0; y < cursorHeight; y++) { - for (x = 0; x < cursorWidth; x++) { - if (*oldMaskP & (HighBitOf32 >> x)) { - if (*oldSourceP & (HighBitOf32 >> x)) - *newSourceP = fgPixel; - else - *newSourceP = bgPixel; - } else { - *newSourceP = 0; - } - newSourceP++; - } - oldSourceP++; oldMaskP++; - newSourceP += rowPad; - } - -#if DUMP_DARWIN_CURSOR - // Write out the cursor - ErrorF("Cursor: 0x%x\n", pCursor); - ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth, - cursorHeight, rowPad); - for (y = 0; y < cursorHeight; y++) { - newSourceP = newCursor + y*CURSORWIDTH; - for (x = 0; x < cursorWidth; x++) { - if (*newSourceP == fgPixel) - ErrorF("x"); - else if (*newSourceP == bgPixel) - ErrorF("o"); - else - ErrorF(" "); - newSourceP++; - } - ErrorF("\n"); - } -#endif - - // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; - return TRUE; -} - - -/* - * XFIOKitRealizeCursor24 - * Convert the X cursor representation to an 24-bit depth - * format for Darwin. This function assumes the maximum cursor - * width is a multiple of 8. - */ -static Bool -XFIOKitRealizeCursor24( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - unsigned int *newCursor; - unsigned int fgPixel, bgPixel; - unsigned int *newSourceP; - CARD32 *oldSourceP, *oldMaskP; - int x, y, rowPad; - int cursorWidth, cursorHeight; - - // check cursor size just to be sure - cursorWidth = pCursor->bits->width; - cursorHeight = pCursor->bits->height; - if (cursorHeight > CURSORHEIGHT || cursorWidth > CURSORWIDTH) - return FALSE; - - // allocate memory for new cursor image - newCursor = xalloc( CURSORWIDTH*CURSORHEIGHT*sizeof(int) ); - if (!newCursor) - return FALSE; - memset( newCursor, 0, CURSORWIDTH*CURSORHEIGHT*sizeof(int) ); - - // calculate pixel values - fgPixel = RGBto38WithGamma( pCursor->foreRed, pCursor->foreGreen, - pCursor->foreBlue ); - bgPixel = RGBto38WithGamma( pCursor->backRed, pCursor->backGreen, - pCursor->backBlue ); - - // convert to 24-bit Darwin cursor format - oldSourceP = (CARD32 *) pCursor->bits->source; - oldMaskP = (CARD32 *) pCursor->bits->mask; - newSourceP = newCursor; - rowPad = CURSORWIDTH - cursorWidth; - - for (y = 0; y < cursorHeight; y++) { - for (x = 0; x < cursorWidth; x++) { - if (*oldMaskP & (HighBitOf32 >> x)) { - if (*oldSourceP & (HighBitOf32 >> x)) - *newSourceP = fgPixel; - else - *newSourceP = bgPixel; - } else { - *newSourceP = 0; - } - newSourceP++; - } - oldSourceP++; oldMaskP++; - newSourceP += rowPad; - } - -#if DUMP_DARWIN_CURSOR - // Write out the cursor - ErrorF("Cursor: 0x%x\n", pCursor); - ErrorF("Width = %i, Height = %i, RowPad = %i\n", cursorWidth, - cursorHeight, rowPad); - for (y = 0; y < cursorHeight; y++) { - newSourceP = newCursor + y*CURSORWIDTH; - for (x = 0; x < cursorWidth; x++) { - if (*newSourceP == fgPixel) - ErrorF("x"); - else if (*newSourceP == bgPixel) - ErrorF("o"); - else - ErrorF(" "); - newSourceP++; - } - ErrorF("\n"); - } -#endif - - // save the result - pCursor->devPriv[pScreen->myNum] = (pointer) newCursor; - return TRUE; -} - - -/* - * XFIOKitRealizeCursor - * - */ -static Bool -XFIOKitRealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - Bool result; - XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - - if ((pCursor->bits->height > CURSORHEIGHT) || - (pCursor->bits->width > CURSORWIDTH) || - // FIXME: this condition is not needed after kernel cursor works - !ScreenPriv->canHWCursor) { - result = (*ScreenPriv->spriteFuncs->RealizeCursor)(pScreen, pCursor); - } else if (dfb->bitsPerPixel == 8) { - result = XFIOKitRealizeCursor8(pScreen, pCursor); - } else if (dfb->bitsPerPixel == 16) { - result = XFIOKitRealizeCursor15(pScreen, pCursor); - } else { - result = XFIOKitRealizeCursor24(pScreen, pCursor); - } - - return result; -} - - -/* - * XFIOKitUnrealizeCursor - * - */ -static Bool -XFIOKitUnrealizeCursor( - ScreenPtr pScreen, - CursorPtr pCursor) -{ - Bool result; - XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - if ((pCursor->bits->height > CURSORHEIGHT) || - (pCursor->bits->width > CURSORWIDTH) || - // FIXME: this condition is not needed after kernel cursor works - !ScreenPriv->canHWCursor) { - result = (*ScreenPriv->spriteFuncs->UnrealizeCursor)(pScreen, pCursor); - } else { - xfree( pCursor->devPriv[pScreen->myNum] ); - result = TRUE; - } - - return result; -} - - -/* - * XFIOKitSetCursor - * Set the cursor sprite and position - * Use hardware cursor if possible - */ -static void -XFIOKitSetCursor( - ScreenPtr pScreen, - CursorPtr pCursor, - int x, - int y) -{ - kern_return_t kr; - DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); - XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); - StdFBShmem_t *cshmem = iokitScreen->cursorShmem; - XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - // are we supposed to remove the cursor? - if (!pCursor) { - if (ScreenPriv->cursorMode == 0) - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); - else { - if (!cshmem->cursorShow) { - cshmem->cursorShow++; - if (cshmem->hardwareCursorActive) { - kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE); - kern_assert( kr ); - } - } - } - return; - } - - // can we use the kernel or hardware cursor? - if ((pCursor->bits->height <= CURSORHEIGHT) && - (pCursor->bits->width <= CURSORWIDTH) && - // FIXME: condition not needed when kernel cursor works - ScreenPriv->canHWCursor) { - - if (ScreenPriv->cursorMode == 0) // remove the X cursor - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, 0, x, y); - ScreenPriv->cursorMode = 1; // kernel cursor - - // change the cursor image in shared memory - if (dfb->bitsPerPixel == 8) { - cursorPrivPtr newCursor = - (cursorPrivPtr) pCursor->devPriv[pScreen->myNum]; - 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]; - memcpy(cshmem->cursor.rgb.image[0], newCursor, - 2*CURSORWIDTH*CURSORHEIGHT); - } else { - unsigned int *newCursor = - (unsigned int *) pCursor->devPriv[pScreen->myNum]; - memcpy(cshmem->cursor.rgb24.image[0], newCursor, - 4*CURSORWIDTH*CURSORHEIGHT); - } - - // FIXME: We always use a full size cursor, even if the image - // is smaller because I couldn't get the padding to come out - // right otherwise. - cshmem->cursorSize[0].width = CURSORWIDTH; - cshmem->cursorSize[0].height = CURSORHEIGHT; - cshmem->hotSpot[0].x = pCursor->bits->xhot; - cshmem->hotSpot[0].y = pCursor->bits->yhot; - - // try to use a hardware cursor - if (ScreenPriv->canHWCursor) { - kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0); - // FIXME: this is a fatal error without the kernel cursor - kern_assert( kr ); -#if 0 - if (kr != KERN_SUCCESS) { - ErrorF("Could not set new cursor with kernel return 0x%x.\n", kr); - ScreenPriv->canHWCursor = FALSE; - } -#endif - } - - // make the new cursor visible - if (cshmem->cursorShow) - cshmem->cursorShow--; - - if (!cshmem->cursorShow && ScreenPriv->canHWCursor) { - kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE); - // FIXME: this is a fatal error without the kernel cursor - kern_assert( kr ); -#if 0 - if (kr != KERN_SUCCESS) { - ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); - ScreenPriv->canHWCursor = FALSE; - } else -#endif - ScreenPriv->cursorMode = 2; // hardware cursor - } - - return; - } - - // otherwise we use a software cursor - if (ScreenPriv->cursorMode) { - /* remove the kernel or hardware cursor */ - XFIOKitSetCursor(pScreen, 0, x, y); - } - - ScreenPriv->cursorMode = 0; - (*ScreenPriv->spriteFuncs->SetCursor)(pScreen, pCursor, x, y); -} - - -/* - * XFIOKitMoveCursor - * Move the cursor. This is a noop for a kernel or hardware cursor. - */ -static void -XFIOKitMoveCursor( - ScreenPtr pScreen, - int x, - int y) -{ - XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - // only the X cursor needs to be explicitly moved - if (!ScreenPriv->cursorMode) - (*ScreenPriv->spriteFuncs->MoveCursor)(pScreen, x, y); -} - -static miPointerSpriteFuncRec darwinSpriteFuncsRec = { - XFIOKitRealizeCursor, - XFIOKitUnrealizeCursor, - XFIOKitSetCursor, - XFIOKitMoveCursor -}; - - -/* -=========================================================================== - - Pointer screen functions - -=========================================================================== -*/ - -/* - * XFIOKitCursorOffScreen - */ -static Bool XFIOKitCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) -{ return FALSE; -} - - -/* - * XFIOKitCrossScreen - */ -static void XFIOKitCrossScreen(ScreenPtr pScreen, Bool entering) -{ return; -} - - -/* - * XFIOKitWarpCursor - * Change the cursor position without generating an event or motion history - */ -static void -XFIOKitWarpCursor( - ScreenPtr pScreen, - int x, - int y) -{ - kern_return_t kr; - - kr = IOHIDSetMouseLocation( xfIOKitInputConnect, x, y ); - if (kr != KERN_SUCCESS) { - ErrorF("Could not set cursor position with kernel return 0x%x.\n", kr); - } - miPointerWarpCursor(pScreen, x, y); -} - -static miPointerScreenFuncRec darwinScreenFuncsRec = { - XFIOKitCursorOffScreen, - XFIOKitCrossScreen, - XFIOKitWarpCursor, - DarwinEQPointerPost, - DarwinEQSwitchScreen -}; - - -/* -=========================================================================== - - Other screen functions - -=========================================================================== -*/ - -/* - * XFIOKitCursorQueryBestSize - * Handle queries for best cursor size - */ -static void -XFIOKitCursorQueryBestSize( - int class, - unsigned short *width, - unsigned short *height, - ScreenPtr pScreen) -{ - XFIOKitCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - - if (class == CursorShape) { - *width = CURSORWIDTH; - *height = CURSORHEIGHT; - } else - (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); -} - - -/* - * XFIOKitInitCursor - * Initialize cursor support - */ -Bool -XFIOKitInitCursor( - ScreenPtr pScreen) -{ - XFIOKitScreenPtr iokitScreen = XFIOKIT_SCREEN_PRIV(pScreen); - XFIOKitCursorScreenPtr ScreenPriv; - miPointerScreenPtr PointPriv; - kern_return_t kr; - - // start with no cursor displayed - if (!iokitScreen->cursorShmem->cursorShow++) { - if (iokitScreen->cursorShmem->hardwareCursorActive) { - kr = IOFBSetCursorVisible(iokitScreen->fbService, FALSE); - kern_assert( kr ); - } - } - - // initialize software cursor handling (always needed as backup) - if (!miDCInitialize(pScreen, &darwinScreenFuncsRec)) { - 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; - - // check if a hardware cursor is supported - if (!iokitScreen->cursorShmem->hardwareCursorCapable) { - ScreenPriv->canHWCursor = FALSE; - ErrorF("Hardware cursor not supported.\n"); - } else { - // we need to make sure that the hardware cursor really works - ScreenPriv->canHWCursor = TRUE; - kr = IOFBSetNewCursor(iokitScreen->fbService, 0, 0, 0); - if (kr != KERN_SUCCESS) { - ErrorF("Could not set hardware cursor with kernel return 0x%x.\n", kr); - ScreenPriv->canHWCursor = FALSE; - } - kr = IOFBSetCursorVisible(iokitScreen->fbService, TRUE); - if (kr != KERN_SUCCESS) { - ErrorF("Couldn't set hardware cursor visible with kernel return 0x%x.\n", kr); - ScreenPriv->canHWCursor = FALSE; - } - IOFBSetCursorVisible(iokitScreen->fbService, FALSE); - } - - ScreenPriv->cursorMode = 0; - ScreenPriv->pInstalledMap = NULL; - - // override some screen procedures - ScreenPriv->QueryBestSize = pScreen->QueryBestSize; - pScreen->QueryBestSize = XFIOKitCursorQueryBestSize; -// ScreenPriv->ConstrainCursor = pScreen->ConstrainCursor; -// pScreen->ConstrainCursor = XFIOKitConstrainCursor; - - // initialize hardware cursor handling - PointPriv = (miPointerScreenPtr) - pScreen->devPrivates[miPointerScreenIndex].ptr; - - ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; - PointPriv->spriteFuncs = &darwinSpriteFuncsRec; - - /* Other routines that might be overridden */ -/* - CursorLimitsProcPtr CursorLimits; - RecolorCursorProcPtr RecolorCursor; -*/ - - return TRUE; -} diff --git a/hw/darwin/iokit/xfIOKitStartup.c b/hw/darwin/iokit/xfIOKitStartup.c deleted file mode 100644 index ad8e05b56..000000000 --- a/hw/darwin/iokit/xfIOKitStartup.c +++ /dev/null @@ -1,131 +0,0 @@ -/************************************************************** - * - * Startup code for the IOKit Darwin X Server - * - **************************************************************/ -/* - * 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. - */ - -#include - -#include "darwin.h" -#include "darwinKeyboard.h" -#include "micmap.h" - -void GlxExtensionInit(void); -void GlxWrapInitVisuals(miInitVisualsProcPtr *procPtr); - - -/* - * DarwinHandleGUI - * This function is called first from main(). - * It does nothing for the IOKit X server. - */ -void DarwinHandleGUI( - int argc, - char *argv[], - char *envp[] ) -{ -} - - -/* - * DarwinGlxExtensionInit - * Initialize the GLX extension. - * Mesa is linked into the IOKit mode X server so we just call directly. - */ -void DarwinGlxExtensionInit(void) -{ -#ifdef GLXEXT - GlxExtensionInit(); -#endif -} - - -/* - * DarwinGlxWrapInitVisuals - */ -void DarwinGlxWrapInitVisuals( - miInitVisualsProcPtr *procPtr) -{ -#ifdef GLXEXT - GlxWrapInitVisuals(procPtr); -#endif -} - - -/* - * DarwinModeProcessArgument - * Process IOKit specific command line arguments. - */ -int DarwinModeProcessArgument( - int argc, - char *argv[], - int i) -{ -#ifdef DARWIN_WITH_QUARTZ - // XDarwinStartup uses these arguments to indicate which X server - // should be started. Ignore them here. - if (!strcmp( argv[i], "-fullscreen" ) || - !strcmp( argv[i], "-rootless" ) || - !strcmp( argv[i], "-quartz" )) - { - return 1; - } -#else - if (!strcmp( argv[i], "-fullscreen" ) || - !strcmp( argv[i], "-rootless" ) || - !strcmp( argv[i], "-quartz" )) - { - FatalError("Command line option %s is not available without Quartz " - "support.\n", argv[i]); - } -#endif - - return 0; -} - - -/* - * DarwinModeSystemKeymapSeed - * Changes to NXKeyMapping are not tracked. - */ -unsigned int -DarwinModeSystemKeymapSeed(void) -{ - return 0; -} - - -/* - * DarwinModeReadSystemKeymap - * IOKit has no alternative to NXKeyMapping API. - */ -Bool DarwinModeReadSystemKeymap( - darwinKeyboardInfo *info) -{ - return FALSE; -} diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am index f8dc16765..54e6c30a7 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/darwin/quartz/Makefile.am @@ -1,54 +1,36 @@ noinst_LIBRARIES = libXQuartz.a -AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ -AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +AM_OBJCFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) \ + -DHAS_KL_API \ + -I$(srcdir) -I$(srcdir)/.. \ + -I$(top_srcdir)/miext/rootless -INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@ -AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API -if HAVE_XPLUGIN -AM_DEFS += -DBUILD_XPR -endif -DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\" +SUBDIRS = xpr libXQuartz_a_SOURCES = \ - Preferences.m \ - XApplication.m \ - XServer.m \ - applewm.c \ - keysym2ucs.c \ - quartz.c \ - quartzAudio.c \ - quartzCocoa.m \ - quartzPasteboard.c \ - quartzKeyboard.c \ - quartzStartup.c \ - pseudoramiX.c - -bin_PROGRAMS = XDarwinStartup - -XDarwinStartup_SOURCES = XDarwinStartup.c -XDarwinStartup_LDFLAGS = -Wl,-framework,CoreFoundation \ - -Wl,-framework,ApplicationServices -XDarwinStartupCFLAGS = -DXBINDIR="${bindir}" -XDARWINROOT = @APPLE_APPLICATIONS_DIR@ -BINDIR = $(bindir) -install-exec-local: - -(cd $(DESTDIR)$(BINDIR); rm X; $(LN_S) XDarwinStartup X) - -man1_MANS = XDarwinStartup.man + X11Application.m \ + X11Controller.m \ + applewm.c \ + keysym2ucs.c \ + pseudoramiX.c \ + quartz.c \ + quartzAudio.c \ + quartzCocoa.m \ + quartzKeyboard.c \ + quartzPasteboard.c \ + quartzStartup.c EXTRA_DIST = \ + X11Application.h \ + X11Controller.h \ applewmExt.h \ keysym2ucs.h \ - Preferences.h \ pseudoramiX.h \ quartzAudio.h \ quartzCommon.h \ quartzCursor.c \ quartzCursor.h \ quartz.h \ - quartzPasteboard.h \ - XApplication.h \ - XDarwin.pbproj/project.pbxproj \ - XServer.h \ - XDarwinStartup.man + quartzPasteboard.h diff --git a/hw/darwin/apple/X11Application.h b/hw/darwin/quartz/X11Application.h similarity index 100% rename from hw/darwin/apple/X11Application.h rename to hw/darwin/quartz/X11Application.h diff --git a/hw/darwin/apple/X11Application.m b/hw/darwin/quartz/X11Application.m similarity index 99% rename from hw/darwin/apple/X11Application.m rename to hw/darwin/quartz/X11Application.m index 461ca3926..6d079ee4a 100644 --- a/hw/darwin/apple/X11Application.m +++ b/hw/darwin/quartz/X11Application.m @@ -45,6 +45,10 @@ #include #include +#include "rootlessCommon.h" + +WindowPtr xprGetXWindowFromAppKit(int windowNumber); // xpr/xprFrame.c + #define DEFAULTS_FILE "/usr/X11/lib/X11/xserver/Xquartz.plist" int X11EnableKeyEquivalents = TRUE; @@ -514,7 +518,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { else if (CFGetTypeID (value) == CFBooleanGetTypeID ()) ret = CFBooleanGetValue (value); else if (CFGetTypeID (value) == CFStringGetTypeID ()) { - const char *tem = [(NSString *) value lossyCString]; + const char *tem = [(NSString *) value UTF8String]; if (strcasecmp (tem, "true") == 0 || strcasecmp (tem, "yes") == 0) ret = YES; else diff --git a/hw/darwin/apple/X11Controller.h b/hw/darwin/quartz/X11Controller.h similarity index 100% rename from hw/darwin/apple/X11Controller.h rename to hw/darwin/quartz/X11Controller.h diff --git a/hw/darwin/apple/X11Controller.m b/hw/darwin/quartz/X11Controller.m similarity index 100% rename from hw/darwin/apple/X11Controller.m rename to hw/darwin/quartz/X11Controller.m diff --git a/hw/darwin/quartz/XApplication.h b/hw/darwin/quartz/XApplication.h deleted file mode 100644 index 2f2b22389..000000000 --- a/hw/darwin/quartz/XApplication.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// XApplication.h -// -// Created by Andreas Monitzer on January 6, 2001. -// -/* - * Copyright (c) 2001 Andreas Monitzer. 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 - -#import "XServer.h" -#import "Preferences.h" - -@interface XApplication : NSApplication { - IBOutlet XServer *xserver; - IBOutlet Preferences *preferences; -} - -- (void)sendEvent:(NSEvent *)anEvent; - -@end diff --git a/hw/darwin/quartz/XApplication.m b/hw/darwin/quartz/XApplication.m deleted file mode 100644 index c18d9a570..000000000 --- a/hw/darwin/quartz/XApplication.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// XApplication.m -// -// Created by Andreas Monitzer on January 6, 2001. - -/* - * Copyright (c) 2001 Andreas Monitzer. 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 "XApplication.h" - - -@implementation XApplication - -- (void)sendEvent:(NSEvent *)anEvent { - if (![xserver translateEvent:anEvent]) { - if (![preferences sendEvent:anEvent]) - [super sendEvent:anEvent]; - } -} - -@end diff --git a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj b/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj deleted file mode 100644 index 0ad831423..000000000 --- a/hw/darwin/quartz/XDarwin.pbproj/project.pbxproj +++ /dev/null @@ -1,2519 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 39; - objects = { - 01279092000747AA0A000002 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = XServer.m; - refType = 4; - sourceTree = ""; - }; - 0127909600074AF60A000002 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = XApplication.m; - refType = 4; - sourceTree = ""; - }; - 0127909800074B1A0A000002 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = XApplication.h; - refType = 4; - sourceTree = ""; - }; - 015698ED003DF345CE6F79C2 = { - isa = PBXFileReference; - lastKnownFileType = image.icns; - path = XDarwin.icns; - refType = 4; - sourceTree = ""; - }; - 0157A37D002CF6D7CE6F79C2 = { - children = ( - F533214601A4B45401000001, - 0157A37E002CF6D7CE6F79C2, - F58D65DF018F79B101000001, - F533213D0193CBE001000001, - 43B962E200617B93416877C2, - F5ACD263C5BE031F01000001, - F51BF62E02026E3501000001, - F5ACD25CC5B5E96601000001, - F587E16401924C6901000001, - ); - isa = PBXVariantGroup; - name = Credits.rtf; - path = ""; - refType = 4; - sourceTree = ""; - }; - 0157A37E002CF6D7CE6F79C2 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = English; - path = English.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - 015EDCEA004203A8CE6F79C2 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = IOKit.framework; - path = /System/Library/Frameworks/IOKit.framework; - refType = 0; - sourceTree = ""; - }; - 018F40F2003E1902CE6F79C2 = { - children = ( - 018F40F3003E1916CE6F79C2, - 021D6BA9003E1BACCE6F79C2, - 3E74E03600863F047F000001, - F5A94EF10314BAC70100011B, - 018F40F6003E1974CE6F79C2, - 6E5F5F0005537A1A008FEAD7, - ); - isa = PBXGroup; - name = "X Server"; - path = ..; - refType = 4; - sourceTree = ""; - }; - 018F40F3003E1916CE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = darwin.c; - refType = 4; - sourceTree = ""; - }; - 018F40F6003E1974CE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = darwinKeyboard.c; - refType = 4; - sourceTree = ""; - }; - 018F40F8003E1979CE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = quartz.c; - refType = 4; - sourceTree = ""; - }; - 018F40FA003E197ECE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = quartz.h; - refType = 4; - sourceTree = ""; - }; - 018F40FC003E1983CE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = xfIOKit.c; - refType = 4; - sourceTree = ""; - }; - 018F40FE003E1988CE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = xfIOKit.h; - refType = 4; - sourceTree = ""; - }; - 018F4100003E19E4CE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = xfIOKitCursor.c; - refType = 4; - sourceTree = ""; - }; -//010 -//011 -//012 -//013 -//014 -//020 -//021 -//022 -//023 -//024 - 021D6BA9003E1BACCE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = darwin.h; - refType = 4; - sourceTree = ""; - }; - 02A1FEA6006D34BE416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = xfIOKitStartup.c; - refType = 4; - sourceTree = ""; - }; - 02A1FEA8006D38F0416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = quartzStartup.c; - refType = 4; - sourceTree = ""; - }; - 02E03CA000348209CE6F79C2 = { - children = ( - F533214701A4B48301000001, - 02E03CA100348209CE6F79C2, - F58D65E0018F79C001000001, - F533213E0193CBF401000001, - 43B962E300617B93416877C2, - F5ACD268C5BE046401000001, - F51BF62F02026E5C01000001, - F5ACD261C5B5EA2001000001, - F587E16501924C7401000001, - ); - isa = PBXVariantGroup; - name = XDarwinHelp.html; - path = ""; - refType = 4; - sourceTree = ""; - }; - 02E03CA100348209CE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = English; - path = English.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; -//020 -//021 -//022 -//023 -//024 -//030 -//031 -//032 -//033 -//034 - 0338412F0083BFE57F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = quartzCursor.h; - refType = 4; - sourceTree = ""; - }; -//030 -//031 -//032 -//033 -//034 -//040 -//041 -//042 -//043 -//044 - 04329610000763920A000002 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = Preferences.m; - refType = 4; - sourceTree = ""; - }; - 04329611000763920A000002 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = Preferences.h; - refType = 4; - sourceTree = ""; - }; -//040 -//041 -//042 -//043 -//044 -//080 -//081 -//082 -//083 -//084 - 080E96DDFE201D6D7F000001 = { - children = ( - 04329610000763920A000002, - 04329611000763920A000002, - 0127909600074AF60A000002, - 0127909800074B1A0A000002, - 01279092000747AA0A000002, - 1C4A3109004D8F24CE6F79C2, - ); - isa = PBXGroup; - name = Classes; - refType = 4; - sourceTree = ""; - }; - 089C165CFE840E0CC02AAC07 = { - children = ( - F533214301A4B3F001000001, - 089C165DFE840E0CC02AAC07, - F58D65DD018F798F01000001, - F533213A0193CBA201000001, - 43B962E100617B49416877C2, - F5ACD269C5BE049301000001, - F51BF62B02026DDA01000001, - F5ACD262C5B5EA4D01000001, - F587E16101924C2F01000001, - ); - isa = PBXVariantGroup; - name = InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - 089C165DFE840E0CC02AAC07 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = English; - path = English.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; -//080 -//081 -//082 -//083 -//084 -//0A0 -//0A1 -//0A2 -//0A3 -//0A4 - 0A79E19E004499A1CE6F79C2 = { - explicitFileType = wrapper.application; - isa = PBXFileReference; - path = XDarwin.app; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 0A79E19F004499A1CE6F79C2 = { - buildPhases = ( - 0A79E1A0004499A1CE6F79C2, - 0A79E1A1004499A1CE6F79C2, - 0A79E1A2004499A1CE6F79C2, - 0A79E1A3004499A1CE6F79C2, - 0A79E1A4004499A1CE6F79C2, - ); - buildSettings = { - INSTALL_PATH = /; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = XDarwin; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - WRAPPER_EXTENSION = app; - }; - dependencies = ( - 6EF065C903D4F0CA006877C2, - 6EF065C703D4EE19006877C2, - 6E11A986048BDFFB006877C2, - 6E7904110500F33B00EEC080, - ); - isa = PBXApplicationTarget; - name = XDarwin; - productInstallPath = /; - productName = XDarwin; - productReference = 0A79E19E004499A1CE6F79C2; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - x11app - - CFBundleTypeName - X11 Application - CFBundleTypeOSTypes - - **** - - CFBundleTypeRole - Viewer - - - CFBundleTypeExtensions - - tool - * - - CFBundleTypeName - UNIX Application - CFBundleTypeOSTypes - - **** - - CFBundleTypeRole - Viewer - - - CFBundleExecutable - XDarwin - CFBundleGetInfoString - XDarwin 1.4.0, X.Org Foundation - CFBundleIconFile - XDarwin.icns - CFBundleIdentifier - org.x.x11 - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - XDarwin - CFBundlePackageType - APPL - CFBundleShortVersionString - XDarwin 1.4.0 - CFBundleSignature - ???? - CFBundleVersion - - NSHelpFile - XDarwinHelp.html - NSMainNibFile - MainMenu - NSPrincipalClass - XApplication - - -"; - }; - 0A79E1A0004499A1CE6F79C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 0A79E1A1004499A1CE6F79C2 = { - buildActionMask = 2147483647; - files = ( - 0A79E1A600449EB2CE6F79C2, - 0A79E1A700449EB2CE6F79C2, - 0A79E1A800449EB2CE6F79C2, - 0A79E1A900449EB2CE6F79C2, - 0A79E1AA00449EB2CE6F79C2, - 1220774500712D2D416877C2, - F54BF6ED017D506E01000001, - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 0A79E1A2004499A1CE6F79C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 0A79E1A3004499A1CE6F79C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 0A79E1A4004499A1CE6F79C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 0A79E1A600449EB2CE6F79C2 = { - fileRef = 29B97318FDCFA39411CA2CEA; - isa = PBXBuildFile; - settings = { - }; - }; - 0A79E1A700449EB2CE6F79C2 = { - fileRef = 089C165CFE840E0CC02AAC07; - isa = PBXBuildFile; - settings = { - }; - }; - 0A79E1A800449EB2CE6F79C2 = { - fileRef = 0157A37D002CF6D7CE6F79C2; - isa = PBXBuildFile; - settings = { - }; - }; - 0A79E1A900449EB2CE6F79C2 = { - fileRef = 02E03CA000348209CE6F79C2; - isa = PBXBuildFile; - settings = { - }; - }; - 0A79E1AA00449EB2CE6F79C2 = { - fileRef = 015698ED003DF345CE6F79C2; - isa = PBXBuildFile; - settings = { - }; - }; -//0A0 -//0A1 -//0A2 -//0A3 -//0A4 -//100 -//101 -//102 -//103 -//104 - 1058C7A0FEA54F0111CA2CBB = { - children = ( - F53321400193CCF001000001, - 1BE4F84D0006C9890A000002, - 1058C7A1FEA54F0111CA2CBB, - F53321410193CCF001000001, - 015EDCEA004203A8CE6F79C2, - ); - isa = PBXGroup; - name = "Linked Frameworks"; - refType = 4; - sourceTree = ""; - }; - 1058C7A1FEA54F0111CA2CBB = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = Cocoa.framework; - path = /System/Library/Frameworks/Cocoa.framework; - refType = 0; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB = { - children = ( - 29B97325FDCFA39411CA2CEA, - 29B97324FDCFA39411CA2CEA, - ); - isa = PBXGroup; - name = "Other Frameworks"; - refType = 4; - sourceTree = ""; - }; -//100 -//101 -//102 -//103 -//104 -//120 -//121 -//122 -//123 -//124 - 1220774300712D2D416877C2 = { - children = ( - F533214501A4B42501000001, - 1220774400712D2D416877C2, - F58D65DE018F79A001000001, - F533213C0193CBC901000001, - 1220774600712D75416877C2, - F5ACD266C5BE03C501000001, - F51BF62D02026E1C01000001, - F5ACD25FC5B5E9AA01000001, - F587E16301924C5E01000001, - ); - isa = PBXVariantGroup; - name = Localizable.strings; - path = ""; - refType = 4; - sourceTree = ""; - }; - 1220774400712D2D416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = English; - path = English.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; - 1220774500712D2D416877C2 = { - fileRef = 1220774300712D2D416877C2; - isa = PBXBuildFile; - settings = { - }; - }; - 1220774600712D75416877C2 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Japanese; - path = Japanese.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; -//120 -//121 -//122 -//123 -//124 -//170 -//171 -//172 -//173 -//174 - 170DFAFF00729A35416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = XDarwinStartup.c; - refType = 4; - sourceTree = ""; - }; - 170DFB0000729C86416877C2 = { - children = ( - 018F40FC003E1983CE6F79C2, - 018F40FE003E1988CE6F79C2, - 018F4100003E19E4CE6F79C2, - 02A1FEA6006D34BE416877C2, - ); - isa = PBXGroup; - name = IOKit; - path = ../iokit; - refType = 4; - sourceTree = ""; - }; -//170 -//171 -//172 -//173 -//174 -//190 -//191 -//192 -//193 -//194 - 19C28FACFE9D520D11CA2CBB = { - children = ( - 0A79E19E004499A1CE6F79C2, - 6EF7C58703D3BC6D00000104, - 6EF065C603D4EE19006877C2, - 6E11A985048BDFEE006877C2, - 6E7904100500F05600EEC080, - ); - isa = PBXGroup; - name = Products; - refType = 4; - sourceTree = ""; - }; -//190 -//191 -//192 -//193 -//194 -//1B0 -//1B1 -//1B2 -//1B3 -//1B4 - 1BD8DE4200B8A3567F000001 = { - children = ( - F533214401A4B40F01000001, - 1BD8DE4300B8A3567F000001, - F58D65DC018F794D01000001, - F533213B0193CBB401000001, - 1BD8DE4700B8A3C77F000001, - F5ACD264C5BE035B01000001, - F51BF62C02026E0601000001, - F5ACD25DC5B5E97701000001, - F587E16201924C5301000001, - ); - isa = PBXVariantGroup; - name = InfoPlist.strings.cpp; - path = ""; - refType = 4; - sourceTree = ""; - }; - 1BD8DE4300B8A3567F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = English; - path = English.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - 1BD8DE4400B8A38E7F000001 = { - children = ( - F533214801A4B4D701000001, - 1BD8DE4500B8A38E7F000001, - F58D65E1018F79E001000001, - F533213F0193CC2501000001, - 1BD8DE4800B8A4167F000001, - F5ACD267C5BE03FC01000001, - F51BF63002026E8D01000001, - F5ACD260C5B5E9DF01000001, - F587E16601924C9D01000001, - ); - isa = PBXVariantGroup; - name = XDarwinHelp.html.cpp; - path = ""; - refType = 4; - sourceTree = ""; - }; - 1BD8DE4500B8A38E7F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = English; - path = English.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - 1BD8DE4700B8A3C77F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Japanese; - path = Japanese.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - 1BD8DE4800B8A4167F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Japanese; - path = Japanese.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - 1BE4F84D0006C9890A000002 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = Carbon.framework; - path = /System/Library/Frameworks/Carbon.framework; - refType = 0; - sourceTree = ""; - }; -//1B0 -//1B1 -//1B2 -//1B3 -//1B4 -//1C0 -//1C1 -//1C2 -//1C3 -//1C4 - 1C4A3109004D8F24CE6F79C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = XServer.h; - refType = 4; - sourceTree = ""; - }; -//1C0 -//1C1 -//1C2 -//1C3 -//1C4 -//230 -//231 -//232 -//233 -//234 - 237A34C10076E37E7F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = quartzAudio.c; - refType = 4; - sourceTree = ""; - }; - 237A34C20076E37E7F000001 = { - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - OPTIMIZATION_CFLAGS = "-O0"; - ZERO_LINK = YES; - }; - isa = PBXBuildStyle; - name = Development; - }; - 237A34C30076E37E7F000001 = { - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - ZERO_LINK = NO; - }; - isa = PBXBuildStyle; - name = Deployment; - }; - 237A34C40076F4F07F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = quartzAudio.h; - refType = 4; - sourceTree = ""; - }; -//230 -//231 -//232 -//233 -//234 -//290 -//291 -//292 -//293 -//294 - 29B97313FDCFA39411CA2CEA = { - buildSettings = { - }; - buildStyles = ( - 237A34C20076E37E7F000001, - 237A34C30076E37E7F000001, - ); - hasScannedForEncodings = 1; - isa = PBXProject; - knownRegions = ( - English, - Japanese, - French, - German, - Swedish, - Dutch, - Spanish, - ko, - Portuguese, - ); - mainGroup = 29B97314FDCFA39411CA2CEA; - projectDirPath = ""; - targets = ( - 0A79E19F004499A1CE6F79C2, - 6EF7C58603D3BC6D00000104, - 6E11A984048BDFEE006877C2, - 6EF065C503D4EE19006877C2, - 6E79040F0500F05600EEC080, - ); - }; - 29B97314FDCFA39411CA2CEA = { - children = ( - 080E96DDFE201D6D7F000001, - 018F40F2003E1902CE6F79C2, - 170DFB0000729C86416877C2, - 43B962CE00617089416877C2, - F5614B3D025112D901000114, - 6EC4A64C042A9597006877C2, - 32FEE13C00E07C3E7F000001, - 6EE1214104968658006877C2, - 6EC4A66D042A97FC006877C2, - 29B97315FDCFA39411CA2CEA, - 29B97317FDCFA39411CA2CEA, - 29B97323FDCFA39411CA2CEA, - 19C28FACFE9D520D11CA2CBB, - ); - isa = PBXGroup; - name = "Xmaster-Cocoa"; - path = ""; - refType = 4; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA = { - children = ( - 170DFAFF00729A35416877C2, - ); - isa = PBXGroup; - name = "Other Sources"; - path = ""; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 29B97317FDCFA39411CA2CEA = { - children = ( - 29B97318FDCFA39411CA2CEA, - 089C165CFE840E0CC02AAC07, - 1BD8DE4200B8A3567F000001, - 1220774300712D2D416877C2, - 0157A37D002CF6D7CE6F79C2, - 02E03CA000348209CE6F79C2, - 1BD8DE4400B8A38E7F000001, - 015698ED003DF345CE6F79C2, - F54BF6EA017D500901000001, - F54BF6EC017D506E01000001, - ); - isa = PBXGroup; - name = Resources; - path = ../bundle; - refType = 4; - sourceTree = ""; - }; - 29B97318FDCFA39411CA2CEA = { - children = ( - F533214201A4B3CE01000001, - 29B97319FDCFA39411CA2CEA, - F58D65DB018F793801000001, - F53321390193CB6A01000001, - 43B962E000617B49416877C2, - F5ACD265C5BE038601000001, - F51BF62A02026DAF01000001, - F5ACD25EC5B5E98D01000001, - F587E16001924C1D01000001, - ); - isa = PBXVariantGroup; - name = MainMenu.nib; - path = ""; - refType = 4; - sourceTree = ""; - }; - 29B97319FDCFA39411CA2CEA = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = English; - path = English.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA = { - children = ( - 1058C7A0FEA54F0111CA2CBB, - 1058C7A2FEA54F0111CA2CBB, - ); - isa = PBXGroup; - name = Frameworks; - path = ""; - refType = 4; - sourceTree = ""; - }; - 29B97324FDCFA39411CA2CEA = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = AppKit.framework; - path = /System/Library/Frameworks/AppKit.framework; - refType = 0; - sourceTree = ""; - }; - 29B97325FDCFA39411CA2CEA = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = Foundation.framework; - path = /System/Library/Frameworks/Foundation.framework; - refType = 0; - sourceTree = ""; - }; -//290 -//291 -//292 -//293 -//294 -//320 -//321 -//322 -//323 -//324 - 32FEE13C00E07C3E7F000001 = { - children = ( - F5269C2D01D5BC3501000001, - F5269C2E01D5BC3501000001, - ); - isa = PBXGroup; - name = "Old Cocoa Imp"; - path = ""; - refType = 4; - sourceTree = ""; - }; -//320 -//321 -//322 -//323 -//324 -//350 -//351 -//352 -//353 -//354 - 3576829A0077B8F17F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = quartzCursor.c; - refType = 4; - sourceTree = ""; - }; -//350 -//351 -//352 -//353 -//354 -//3E0 -//3E1 -//3E2 -//3E3 -//3E4 - 3E74E03600863F047F000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = darwinClut8.h; - refType = 4; - sourceTree = ""; - }; -//3E0 -//3E1 -//3E2 -//3E3 -//3E4 -//430 -//431 -//432 -//433 -//434 - 43B962CE00617089416877C2 = { - children = ( - 6EE9B21604E859C200CA7FEA, - 6E97A0F505079F9100B8294C, - 6E5F5F030553815A008FEAD7, - 6E5F5F040553815A008FEAD7, - 018F40F8003E1979CE6F79C2, - 018F40FA003E197ECE6F79C2, - 237A34C10076E37E7F000001, - 237A34C40076F4F07F000001, - 43B962CF00617089416877C2, - F5582948015DAD3B01000001, - 6E5F5F0105537A5F008FEAD7, - 43B962D000617089416877C2, - 43B962D100617089416877C2, - 02A1FEA8006D38F0416877C2, - ); - isa = PBXGroup; - name = Quartz; - path = ""; - refType = 4; - sourceTree = ""; - }; - 43B962CF00617089416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = quartzCocoa.m; - refType = 4; - sourceTree = ""; - }; - 43B962D000617089416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = quartzPasteboard.c; - refType = 4; - sourceTree = ""; - }; - 43B962D100617089416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = quartzPasteboard.h; - refType = 4; - sourceTree = ""; - }; - 43B962E000617B49416877C2 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = Japanese; - path = Japanese.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - 43B962E100617B49416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Japanese; - path = Japanese.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - 43B962E200617B93416877C2 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = Japanese; - path = Japanese.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - 43B962E300617B93416877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = Japanese; - path = Japanese.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; -//430 -//431 -//432 -//433 -//434 -//6E0 -//6E1 -//6E2 -//6E3 -//6E4 - 6E11A97F048BDFEE006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E11A980048BDFEE006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E11A981048BDFEE006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E11A982048BDFEE006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E11A983048BDFEE006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E11A984048BDFEE006877C2 = { - buildPhases = ( - 6E11A97F048BDFEE006877C2, - 6E11A980048BDFEE006877C2, - 6E11A981048BDFEE006877C2, - 6E11A982048BDFEE006877C2, - 6E11A983048BDFEE006877C2, - ); - buildSettings = { - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = glxCGL; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - WRAPPER_EXTENSION = bundle; - }; - dependencies = ( - ); - isa = PBXBundleTarget; - name = glxCGL; - productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; - productName = glxCGL; - productReference = 6E11A985048BDFEE006877C2; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - glxCGL - CFBundleGetInfoString - - CFBundleIconFile - - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - GLX bundle using Apple's OpenGL - CFBundlePackageType - BNDL - CFBundleShortVersionString - 0.1 - CFBundleSignature - ???? - CFBundleVersion - 0.1 - - -"; - }; - 6E11A985048BDFEE006877C2 = { - explicitFileType = wrapper.cfbundle; - isa = PBXFileReference; - path = glxCGL.bundle; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E11A986048BDFFB006877C2 = { - isa = PBXTargetDependency; - target = 6E11A984048BDFEE006877C2; - targetProxy = 6E4CAF650702464F001A7398; - }; - 6E4CAF630702464F001A7398 = { - containerPortal = 29B97313FDCFA39411CA2CEA; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = 6EF7C58603D3BC6D00000104; - remoteInfo = glxAGL; - }; - 6E4CAF640702464F001A7398 = { - containerPortal = 29B97313FDCFA39411CA2CEA; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = 6E79040F0500F05600EEC080; - remoteInfo = xpr; - }; - 6E4CAF650702464F001A7398 = { - containerPortal = 29B97313FDCFA39411CA2CEA; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = 6E11A984048BDFEE006877C2; - remoteInfo = glxCGL; - }; - 6E4CAF660702464F001A7398 = { - containerPortal = 29B97313FDCFA39411CA2CEA; - isa = PBXContainerItemProxy; - proxyType = 1; - remoteGlobalIDString = 6EF065C503D4EE19006877C2; - remoteInfo = glxMesa; - }; - 6E5F5F0005537A1A008FEAD7 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = darwinKeyboard.h; - refType = 4; - sourceTree = ""; - }; - 6E5F5F0105537A5F008FEAD7 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = quartzKeyboard.c; - refType = 4; - sourceTree = ""; - }; - 6E5F5F030553815A008FEAD7 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = keysym2ucs.c; - refType = 4; - sourceTree = ""; - }; - 6E5F5F040553815A008FEAD7 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = keysym2ucs.h; - refType = 4; - sourceTree = ""; - }; - 6E6656EC048832CF006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = "x-hook.c"; - refType = 4; - sourceTree = ""; - }; - 6E6656ED048832CF006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = "x-hook.h"; - refType = 4; - sourceTree = ""; - }; - 6E6656F0048832EC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = dri.c; - refType = 4; - sourceTree = ""; - }; - 6E6656F1048832EC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = dri.h; - refType = 4; - sourceTree = ""; - }; - 6E6656F2048832EC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = dristruct.h; - refType = 4; - sourceTree = ""; - }; - 6E6656F3048832F9006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = appledri.c; - refType = 4; - sourceTree = ""; - }; - 6E79040104FD5ED900EEC080 = { - children = ( - 6E79040204FD5EDA00EEC080, - 6E79040304FD5EDA00EEC080, - 6E79040404FD5EDA00EEC080, - ); - isa = PBXGroup; - name = "Safe Alpha"; - path = safeAlpha; - refType = 4; - sourceTree = ""; - }; - 6E79040204FD5EDA00EEC080 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = safeAlpha.h; - refType = 4; - sourceTree = ""; - }; - 6E79040304FD5EDA00EEC080 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = safeAlphaPicture.c; - refType = 4; - sourceTree = ""; - }; - 6E79040404FD5EDA00EEC080 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = safeAlphaWindow.c; - refType = 4; - sourceTree = ""; - }; - 6E79040A0500F05600EEC080 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E79040B0500F05600EEC080 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E79040C0500F05600EEC080 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E79040D0500F05600EEC080 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E79040E0500F05600EEC080 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6E79040F0500F05600EEC080 = { - buildPhases = ( - 6E79040A0500F05600EEC080, - 6E79040B0500F05600EEC080, - 6E79040C0500F05600EEC080, - 6E79040D0500F05600EEC080, - 6E79040E0500F05600EEC080, - ); - buildSettings = { - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = xpr; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - WRAPPER_EXTENSION = bundle; - }; - dependencies = ( - ); - isa = PBXBundleTarget; - name = xpr; - productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; - productName = xpr; - productReference = 6E7904100500F05600EEC080; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - xpr - CFBundleGetInfoString - - CFBundleIconFile - - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Xplugin rootless implementation - CFBundlePackageType - BNDL - CFBundleShortVersionString - 0.1 - CFBundleSignature - ???? - CFBundleVersion - 0.1 - - -"; - }; - 6E7904100500F05600EEC080 = { - explicitFileType = wrapper.cfbundle; - isa = PBXFileReference; - path = xpr.bundle; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6E7904110500F33B00EEC080 = { - isa = PBXTargetDependency; - target = 6E79040F0500F05600EEC080; - targetProxy = 6E4CAF640702464F001A7398; - }; - 6E97A0F2050798B100B8294C = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = xprAppleWM.c; - refType = 4; - sourceTree = ""; - }; - 6E97A0F305079B6500B8294C = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = crAppleWM.m; - refType = 4; - sourceTree = ""; - }; - 6E97A0F505079F9100B8294C = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = applewmExt.h; - refType = 4; - sourceTree = ""; - }; - 6EA0B3AF0544A9CC006877C2 = { - children = ( - 6EA0B3B00544A9CC006877C2, - 6EA0B3B10544A9CC006877C2, - 6EA0B3B20544A9CC006877C2, - 6EA0B3B30544A9CC006877C2, - 6EA0B3B40544A9CC006877C2, - 6EA0B3B50544A9CC006877C2, - 6EA0B3B60544A9CC006877C2, - 6EA0B3B70544A9CC006877C2, - ); - isa = PBXGroup; - name = Acceleration; - path = accel; - refType = 4; - sourceTree = ""; - }; - 6EA0B3B00544A9CC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = rlAccel.h; - refType = 4; - sourceTree = ""; - }; - 6EA0B3B10544A9CC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rlBlt.c; - refType = 4; - sourceTree = ""; - }; - 6EA0B3B20544A9CC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rlCopy.c; - refType = 4; - sourceTree = ""; - }; - 6EA0B3B30544A9CC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rlFill.c; - refType = 4; - sourceTree = ""; - }; - 6EA0B3B40544A9CC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rlFillRect.c; - refType = 4; - sourceTree = ""; - }; - 6EA0B3B50544A9CC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rlFillSpans.c; - refType = 4; - sourceTree = ""; - }; - 6EA0B3B60544A9CC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rlGlyph.c; - refType = 4; - sourceTree = ""; - }; - 6EA0B3B70544A9CC006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rlSolid.c; - refType = 4; - sourceTree = ""; - }; - 6EA8EEC80445E25C006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = rootlessConfig.h; - refType = 4; - sourceTree = ""; - }; - 6EC4A64C042A9597006877C2 = { - children = ( - 6EC4A65D042A9654006877C2, - 6EC4A65E042A9654006877C2, - 6EC4A65F042A9654006877C2, - 6EA8EEC80445E25C006877C2, - 6EC4A661042A9654006877C2, - 6EC4A662042A9654006877C2, - 6EC4A660042A9654006877C2, - 6EC4A663042A9654006877C2, - 6EC4A664042A9654006877C2, - 6EA0B3AF0544A9CC006877C2, - 6E79040104FD5ED900EEC080, - ); - isa = PBXGroup; - name = Rootless; - path = ../../../miext/rootless; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 6EC4A65D042A9654006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = rootless.h; - refType = 4; - sourceTree = ""; - }; - 6EC4A65E042A9654006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rootlessCommon.c; - refType = 4; - sourceTree = ""; - }; - 6EC4A65F042A9654006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = rootlessCommon.h; - refType = 4; - sourceTree = ""; - }; - 6EC4A660042A9654006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = rootlessWindow.h; - refType = 4; - sourceTree = ""; - }; - 6EC4A661042A9654006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rootlessScreen.c; - refType = 4; - sourceTree = ""; - }; - 6EC4A662042A9654006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rootlessWindow.c; - refType = 4; - sourceTree = ""; - }; - 6EC4A663042A9654006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rootlessGC.c; - refType = 4; - sourceTree = ""; - }; - 6EC4A664042A9654006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = rootlessValTree.c; - refType = 4; - sourceTree = ""; - }; - 6EC4A66D042A97FC006877C2 = { - children = ( - 6EF471A004478DE0006877C2, - 6E6656F3048832F9006877C2, - 6E6656F0048832EC006877C2, - 6E6656F1048832EC006877C2, - 6E6656F2048832EC006877C2, - 6ECF218404589E4D006877C2, - 6E97A0F2050798B100B8294C, - 6ECF218604589F40006877C2, - 6EF4719E04478B08006877C2, - 6EDDB2DF04508B2C006877C2, - 6EF471A204479263006877C2, - 6EF471A404479263006877C2, - 6E6656EC048832CF006877C2, - 6E6656ED048832CF006877C2, - 6EF471A504479263006877C2, - 6EF471A304479263006877C2, - ); - isa = PBXGroup; - path = xpr; - refType = 4; - sourceTree = ""; - }; - 6ECF218404589E4D006877C2 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = xpr.h; - refType = 4; - sourceTree = ""; - }; - 6ECF218604589F40006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = xprCursor.c; - refType = 4; - sourceTree = ""; - }; - 6EDDB2DF04508B2C006877C2 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = xprScreen.c; - refType = 4; - sourceTree = ""; - }; - 6EE1214104968658006877C2 = { - children = ( - 6EE1214304968692006877C2, - 6EE1214404968692006877C2, - 6EE1214204968692006877C2, - 6E97A0F305079B6500B8294C, - 6EE1214504968692006877C2, - 6EE1214604968692006877C2, - ); - isa = PBXGroup; - path = cr; - refType = 4; - sourceTree = ""; - }; - 6EE1214204968692006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = cr.h; - refType = 4; - sourceTree = ""; - }; - 6EE1214304968692006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = XView.m; - refType = 4; - sourceTree = ""; - }; - 6EE1214404968692006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = XView.h; - refType = 4; - sourceTree = ""; - }; - 6EE1214504968692006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = crFrame.m; - refType = 4; - sourceTree = ""; - }; - 6EE1214604968692006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = crScreen.m; - refType = 4; - sourceTree = ""; - }; - 6EE9B21604E859C200CA7FEA = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = applewm.c; - refType = 4; - sourceTree = ""; - }; - 6EF065C003D4EE19006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF065C103D4EE19006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF065C203D4EE19006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF065C303D4EE19006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF065C403D4EE19006877C2 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF065C503D4EE19006877C2 = { - buildPhases = ( - 6EF065C003D4EE19006877C2, - 6EF065C103D4EE19006877C2, - 6EF065C203D4EE19006877C2, - 6EF065C303D4EE19006877C2, - 6EF065C403D4EE19006877C2, - ); - buildSettings = { - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = glxMesa; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - WRAPPER_EXTENSION = bundle; - }; - dependencies = ( - ); - isa = PBXBundleTarget; - name = glxMesa; - productInstallPath = "$(USER_LIBRARY_DIR)/Bundles"; - productName = glxMesa; - productReference = 6EF065C603D4EE19006877C2; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - glxMesa - CFBundleGetInfoString - - CFBundleIconFile - - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - GLX bundle with Mesa - CFBundlePackageType - BNDL - CFBundleShortVersionString - 0.1 - CFBundleSignature - ???? - CFBundleVersion - 0.1 - - -"; - }; - 6EF065C603D4EE19006877C2 = { - explicitFileType = wrapper.cfbundle; - isa = PBXFileReference; - path = glxMesa.bundle; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 6EF065C703D4EE19006877C2 = { - isa = PBXTargetDependency; - target = 6EF065C503D4EE19006877C2; - targetProxy = 6E4CAF660702464F001A7398; - }; - 6EF065C903D4F0CA006877C2 = { - isa = PBXTargetDependency; - target = 6EF7C58603D3BC6D00000104; - targetProxy = 6E4CAF630702464F001A7398; - }; - 6EF4719E04478B08006877C2 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = xprFrame.c; - refType = 4; - sourceTree = ""; - }; - 6EF471A004478DE0006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = Xplugin.h; - refType = 4; - sourceTree = ""; - }; - 6EF471A204479263006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = "x-hash.c"; - refType = 4; - sourceTree = ""; - }; - 6EF471A304479263006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = "x-list.h"; - refType = 4; - sourceTree = ""; - }; - 6EF471A404479263006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = "x-hash.h"; - refType = 4; - sourceTree = ""; - }; - 6EF471A504479263006877C2 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = "x-list.c"; - refType = 4; - sourceTree = ""; - }; - 6EF7C58103D3BC6D00000104 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXHeadersBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF7C58203D3BC6D00000104 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF7C58303D3BC6D00000104 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF7C58403D3BC6D00000104 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF7C58503D3BC6D00000104 = { - buildActionMask = 2147483647; - files = ( - ); - isa = PBXRezBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6EF7C58603D3BC6D00000104 = { - buildPhases = ( - 6EF7C58103D3BC6D00000104, - 6EF7C58203D3BC6D00000104, - 6EF7C58303D3BC6D00000104, - 6EF7C58403D3BC6D00000104, - 6EF7C58503D3BC6D00000104, - ); - buildSettings = { - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; - OTHER_REZFLAGS = ""; - PRODUCT_NAME = glxAGL; - SECTORDER_FLAGS = ""; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; - WRAPPER_EXTENSION = bundle; - }; - dependencies = ( - ); - isa = PBXBundleTarget; - name = glxAGL; - productName = glxAGL; - productReference = 6EF7C58703D3BC6D00000104; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - glxAGL - CFBundleGetInfoString - - CFBundleIconFile - - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - GLX bundle using AGL framework - CFBundlePackageType - BNDL - CFBundleShortVersionString - 0.1 - CFBundleSignature - ???? - CFBundleVersion - 0.1 - - -"; - }; - 6EF7C58703D3BC6D00000104 = { - explicitFileType = wrapper.cfbundle; - isa = PBXFileReference; - path = glxAGL.bundle; - refType = 3; - sourceTree = BUILT_PRODUCTS_DIR; - }; -//6E0 -//6E1 -//6E2 -//6E3 -//6E4 -//F50 -//F51 -//F52 -//F53 -//F54 - F51BF62A02026DAF01000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = Portuguese; - path = Portuguese.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - F51BF62B02026DDA01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Portuguese; - path = Portuguese.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - F51BF62C02026E0601000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Portuguese; - path = Portuguese.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - F51BF62D02026E1C01000001 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Portuguese; - path = Portuguese.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; - F51BF62E02026E3501000001 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = Portuguese; - path = Portuguese.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - F51BF62F02026E5C01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = Portuguese; - path = Portuguese.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; - F51BF63002026E8D01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Portuguese; - path = Portuguese.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - F5269C2D01D5BC3501000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = pseudoramiX.c; - refType = 4; - sourceTree = ""; - }; - F5269C2E01D5BC3501000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = pseudoramiX.h; - refType = 4; - sourceTree = ""; - }; - F53321390193CB6A01000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = German; - path = German.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - F533213A0193CBA201000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = German; - path = German.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - F533213B0193CBB401000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = German; - path = German.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - F533213C0193CBC901000001 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = German; - path = German.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; - F533213D0193CBE001000001 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = German; - path = German.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - F533213E0193CBF401000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = German; - path = German.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; - F533213F0193CC2501000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = German; - path = German.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - F53321400193CCF001000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = ApplicationServices.framework; - path = /System/Library/Frameworks/ApplicationServices.framework; - refType = 0; - sourceTree = ""; - }; - F53321410193CCF001000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.framework; - name = CoreAudio.framework; - path = /System/Library/Frameworks/CoreAudio.framework; - refType = 0; - sourceTree = ""; - }; - F533214201A4B3CE01000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = Dutch; - path = Dutch.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - F533214301A4B3F001000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Dutch; - path = Dutch.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - F533214401A4B40F01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Dutch; - path = Dutch.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - F533214501A4B42501000001 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Dutch; - path = Dutch.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; - F533214601A4B45401000001 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = Dutch; - path = Dutch.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - F533214701A4B48301000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = Dutch; - path = Dutch.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; - F533214801A4B4D701000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Dutch; - path = Dutch.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - F54BF6EA017D500901000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - path = startXClients.cpp; - refType = 4; - sourceTree = ""; - }; - F54BF6EC017D506E01000001 = { - isa = PBXFileReference; - lastKnownFileType = text.script.sh; - path = startXClients; - refType = 4; - sourceTree = ""; - }; - F54BF6ED017D506E01000001 = { - fileRef = F54BF6EC017D506E01000001; - isa = PBXBuildFile; - settings = { - }; - }; - F5582948015DAD3B01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = quartzCommon.h; - refType = 4; - sourceTree = ""; - }; - F5614B3B0251124C01000114 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = fullscreen.c; - refType = 4; - sourceTree = ""; - }; - F5614B3D025112D901000114 = { - children = ( - F5614B3B0251124C01000114, - 3576829A0077B8F17F000001, - 0338412F0083BFE57F000001, - ); - isa = PBXGroup; - path = fullscreen; - refType = 4; - sourceTree = ""; - }; - F587E16001924C1D01000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = Swedish; - path = Swedish.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - F587E16101924C2F01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Swedish; - path = Swedish.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - F587E16201924C5301000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Swedish; - path = Swedish.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - F587E16301924C5E01000001 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Swedish; - path = Swedish.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; - F587E16401924C6901000001 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = Swedish; - path = Swedish.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - F587E16501924C7401000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = Swedish; - path = Swedish.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; - F587E16601924C9D01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Swedish; - path = Swedish.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - F58D65DB018F793801000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = French; - path = French.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - F58D65DC018F794D01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = French; - path = French.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - F58D65DD018F798F01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = French; - path = French.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - F58D65DE018F79A001000001 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = French; - path = French.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; - F58D65DF018F79B101000001 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = French; - path = French.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - F58D65E0018F79C001000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = French; - path = French.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; - F58D65E1018F79E001000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = French; - path = French.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - F5A94EF10314BAC70100011B = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.c; - path = darwinEvents.c; - refType = 4; - sourceTree = ""; - }; - F5ACD25CC5B5E96601000001 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = Spanish; - path = Spanish.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - F5ACD25DC5B5E97701000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Spanish; - path = Spanish.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - F5ACD25EC5B5E98D01000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = Spanish; - path = Spanish.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - F5ACD25FC5B5E9AA01000001 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Spanish; - path = Spanish.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; - F5ACD260C5B5E9DF01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = Spanish; - path = Spanish.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - F5ACD261C5B5EA2001000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = Spanish; - path = Spanish.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; - F5ACD262C5B5EA4D01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = Spanish; - path = Spanish.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - F5ACD263C5BE031F01000001 = { - isa = PBXFileReference; - lastKnownFileType = text.rtf; - name = ko; - path = ko.lproj/Credits.rtf; - refType = 4; - sourceTree = ""; - }; - F5ACD264C5BE035B01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = ko; - path = ko.lproj/InfoPlist.strings.cpp; - refType = 4; - sourceTree = ""; - }; - F5ACD265C5BE038601000001 = { - isa = PBXFileReference; - lastKnownFileType = wrapper.nib; - name = ko; - path = ko.lproj/MainMenu.nib; - refType = 4; - sourceTree = ""; - }; - F5ACD266C5BE03C501000001 = { - fileEncoding = 10; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = ko; - path = ko.lproj/Localizable.strings; - refType = 4; - sourceTree = ""; - }; - F5ACD267C5BE03FC01000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = sourcecode.cpp.cpp; - name = ko; - path = ko.lproj/XDarwinHelp.html.cpp; - refType = 4; - sourceTree = ""; - }; - F5ACD268C5BE046401000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.html; - name = ko; - path = ko.lproj/XDarwinHelp.html; - refType = 4; - sourceTree = ""; - }; - F5ACD269C5BE049301000001 = { - fileEncoding = 30; - isa = PBXFileReference; - lastKnownFileType = text.plist.strings; - name = ko; - path = ko.lproj/InfoPlist.strings; - refType = 4; - sourceTree = ""; - }; - }; - rootObject = 29B97313FDCFA39411CA2CEA; -} diff --git a/hw/darwin/quartz/XDarwinStartup.c b/hw/darwin/quartz/XDarwinStartup.c deleted file mode 100644 index 8041e32d5..000000000 --- a/hw/darwin/quartz/XDarwinStartup.c +++ /dev/null @@ -1,163 +0,0 @@ -/************************************************************** - * - * Startup program for Darwin X servers - * - * This program selects the appropriate X server to launch: - * XDarwin IOKit X server (default) - * XDarwinQuartz A soft link to the Quartz X server - * executable (-quartz etc. option) - * - * If told to idle, the program will simply pause and not - * launch any X server. This is to support startx being - * run by XDarwin.app. - * - **************************************************************/ -/* - * Copyright (c) 2001-2002 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 of Torrey T. Lyons shall not - * be used in advertising or otherwise to promote the sale, use or other - * dealings in this Software without prior written authorization from - * Torrey T. Lyons. - */ - -#include -#include -#include -#include -#include -#include - -// Macros to build the path name -#ifndef XBINDIR -#define XBINDIR /usr/X11/bin -#endif -#define STR(s) #s -#define XSTRPATH(s) STR(s) "/" -#define XPATH(file) XSTRPATH(XBINDIR) STR(file) - -int main( - int argc, - char *argv[] ) -{ - int i, j, quartzMode = -1; - char **newargv; - - // Check if we are going to run in Quartz mode or idle - // to support startx from the Quartz server. The last - // parameter in the list is the one used. - for (i = argc-1; i; i--) { - if (!strcmp(argv[i], "-idle")) { - pause(); - return 0; - - } else if (!strcmp(argv[i], "-quartz") || - !strcmp(argv[i], "-rootless") || - !strcmp(argv[i], "-fullscreen")) - { - quartzMode = 1; - break; - - } else if (!strcmp(argv[i], "-iokit")) { - quartzMode = 0; - break; - } - } - - if (quartzMode == -1) { -#ifdef HAS_CG_MACH_PORT - // Check if the CoreGraphics window server is running. - // Mike Paquette says this is the fastest way to determine if it is running. - CFMachPortRef cgMachPortRef = CGWindowServerCFMachPort(); - if (cgMachPortRef == NULL) - quartzMode = 0; - else - quartzMode = 1; -#else - // On older systems we assume IOKit mode. - quartzMode = 0; -#endif - } - - if (quartzMode) { - // Launch the X server for the quartz modes - - char quartzPath[PATH_MAX+1]; - int pathLength; - OSStatus theStatus; - CFURLRef appURL; - CFStringRef appPath; - Boolean success; - - // Build the new argument list - newargv = (char **) malloc((argc+2) * sizeof(char *)); - for (j = argc; j; j--) - newargv[j] = argv[j]; - newargv[argc] = "-nostartx"; - newargv[argc+1] = NULL; - - // Use the XDarwinQuartz soft link if it is valid - pathLength = readlink(XPATH(XDarwinQuartz), quartzPath, PATH_MAX); - if (pathLength != -1) { - quartzPath[pathLength] = '\0'; - newargv[0] = quartzPath; - execv(newargv[0], newargv); - } - - // Otherwise query LaunchServices for the location of the XDarwin application - theStatus = LSFindApplicationForInfo(kLSUnknownCreator, - CFSTR("org.x.x11"), - NULL, NULL, &appURL); - if (theStatus) { - fprintf(stderr, "Could not find the XDarwin application. (Error = 0x%lx)\n", theStatus); - fprintf(stderr, "Launch XDarwin once from the Finder.\n"); - return theStatus; - } - - appPath = CFURLCopyFileSystemPath (appURL, kCFURLPOSIXPathStyle); - success = CFStringGetCString(appPath, quartzPath, PATH_MAX, CFStringGetSystemEncoding()); - if (! success) { - fprintf(stderr, "Could not find path to XDarwin application.\n"); - return success; - } - - // Launch the XDarwin application - strncat(quartzPath, "/Contents/MacOS/XDarwin", PATH_MAX); - newargv[0] = quartzPath; - execv(newargv[0], newargv); - fprintf(stderr, "Could not start XDarwin application at %s.\n", newargv[0]); - return errno; - - } else { - - // Build the new argument list - newargv = (char **) malloc((argc+1) * sizeof(char *)); - for (j = argc; j; j--) - newargv[j] = argv[j]; - newargv[0] = "XDarwin"; - newargv[argc] = NULL; - - // Launch the IOKit X server - execvp(newargv[0], newargv); - fprintf(stderr, "Could not start XDarwin IOKit X server.\n"); - return errno; - } -} diff --git a/hw/darwin/quartz/XDarwinStartup.man b/hw/darwin/quartz/XDarwinStartup.man deleted file mode 100644 index 1ad3bbced..000000000 --- a/hw/darwin/quartz/XDarwinStartup.man +++ /dev/null @@ -1,74 +0,0 @@ -.TH XDarwinStartup 1 -.SH NAME -XDarwinStartup - Startup program for the XDarwin X window server -.SH SYNOPSIS -.B XDarwinStartup -[\fI-iokit\fP] -[\fI-fullscreen\fP] -[\fI-rootless\fP] -[\fI-quartz\fP] -[\fI-idle\fP] -[\fIoptions\fP] -.SH DESCRIPTION -The \fIXDarwin(1)\fP X window server can be run in a variety of different -modes and is actually two different executables. The IOKit X server, -XDarwin, is used when running from the console. It is most commonly -located in __XBinDir__. The Quartz X server, for running in parallel with -Aqua, is a full-fledged Mac OS X application that can be started from -the Finder. Its application bundle is XDarwin.app, which is typically -located in /Applications. -.I XDarwinStartup -allows easy switching between these X servers and auto-detection of the -appropriate one to use when launching from the command line. -When run without any arguments, -.I XDarwinStartup -will start the Quartz X server if the Core Graphics window server -is currently running. Otherwise it will start the IOKit X server. -.PP -To locate the Quartz X server, -.I XDarwinStartup -will try to read the soft link at __XBinDir__/XDarwinQuartz. -This is typically a soft link to the executable of the XDarwin.app -application. If this fails, -.I XDarwinStartup -will call Launch Services to locate XDarwin.app. -.PP -To start the IOKit X server, -.I XDarwinStartup -will run the XDarwin executable, which should be present in the -user's path. -.SH OPTIONS -.I XDarwinStartup -accepts and passes on all options to the X server it -launches. In addition the following options have specific effects: -.TP 8 -.B \-iokit -Launch the IOKit X server. -.TP 8 -.B \-fullscreen -Launch the Quartz X server to run in full screen mode. -.TP 8 -.B \-rootless -Launch the Quartz X server to run in rootless mode. -.TP 8 -.B \-quartz -Launch the Quartz X server. -.TP 8 -.B \-idle -Pause and do nothing. This option is used by XDarwin.app when it is -started from the Finder. -.SH FILES -.TP 30 -__XBinDir__/XDarwin -IOKit mode X server -.TP 30 -/Applications/XDarwin.app -Quartz mode X server -.TP 30 -__XBinDir__/XDarwinQuartz -Soft link to Quartz mode X server executable -.SH SEE ALSO -XDarwin(1) -.SH BUGS -The path to XDarwinQuartz should not be hard coded. - diff --git a/hw/darwin/quartz/XServer.h b/hw/darwin/quartz/XServer.h deleted file mode 100644 index 030ccb51f..000000000 --- a/hw/darwin/quartz/XServer.h +++ /dev/null @@ -1,136 +0,0 @@ -// -// XServer.h -// -/* - * Copyright (c) 2001 Andreas Monitzer. 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. - */ - -#define BOOL xBOOL -#include -#undef BOOL - -#import - -@interface XServer : NSObject { - // Server state - int serverState; - NSRecursiveLock *serverLock; - NSMutableArray *pendingClients; - BOOL serverVisible; - BOOL rootlessMenuBarVisible; - BOOL queueShowServer; - BOOL quitWithoutQuery; - BOOL pendingAppQuitReply; - UInt32 mouseState; - unsigned short swallowedKey; - BOOL sendServerEvents; - BOOL x11Active; - - // Aqua interface - IBOutlet NSWindow *modeWindow; - IBOutlet NSButton *startupModeButton; - IBOutlet NSButton *startFullScreenButton; - IBOutlet NSButton *startRootlessButton; - IBOutlet NSWindow *helpWindow; - IBOutlet NSButton *startupHelpButton; - IBOutlet NSPanel *switchWindow; - - // Menu elements setable by Apple-WM extension - IBOutlet NSMenu *windowMenu; - IBOutlet NSMenuItem *windowSeparator; - IBOutlet NSMenu *dockMenu; - int checkedWindowItem; -} - -- (id)init; - -- (BOOL)translateEvent:(NSEvent *)anEvent; -- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent; - -- (NSString *)makeSafePath:(NSString *)path; - -- (BOOL)loadDisplayBundle; -- (void)startX; -- (void)finishStartX; -- (BOOL)startXClients; -- (void)runClient:(NSString *)filename; -- (void)run; -- (void)toggle; -- (void)showServer:(BOOL)show; -- (void)forceShowServer:(BOOL)show; -- (void)setRootClip:(BOOL)enable; -- (void)readPasteboard; -- (void)writePasteboard; -- (void)quitServer; -- (void)sendXEvent:(xEvent *)xe; -- (void)sendShowHide:(BOOL)show; -- (void)clientProcessDone:(int)clientStatus; -- (void)activateX11:(BOOL)state; -- (void)windowBecameKey:(NSNotification *)notification; -- (void)setX11WindowList:(NSArray *)list; -- (void)setX11WindowCheck:(NSNumber *)nn; - -// Aqua interface actions -- (IBAction)startFullScreen:(id)sender; -- (IBAction)startRootless:(id)sender; -- (IBAction)closeHelpAndShow:(id)sender; -- (IBAction)showSwitchPanel:(id)sender; -- (IBAction)showAction:(id)sender; -- (IBAction)itemSelected:(id)sender; -- (IBAction)nextWindow:(id)sender; -- (IBAction)previousWindow:(id)sender; -- (IBAction)performClose:(id)sender; -- (IBAction)performMiniaturize:(id)sender; -- (IBAction)performZoom:(id)sender; -- (IBAction)bringAllToFront:(id)sender; -- (IBAction)copy:(id)sender; - -// NSApplication delegate -- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; -- (void)applicationWillTerminate:(NSNotification *)aNotification; -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification; -- (void)applicationDidHide:(NSNotification *)aNotification; -- (void)applicationDidUnhide:(NSNotification *)aNotification; -- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag; -- (void)applicationWillResignActive:(NSNotification *)aNotification; -- (void)applicationWillBecomeActive:(NSNotification *)aNotification; -- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename; - -// NSPort delegate -- (void)handlePortMessage:(NSPortMessage *)portMessage; - -@end - -// X server states -enum { - server_NotStarted, - server_Starting, - server_Running, - server_Quitting, - server_Done -}; diff --git a/hw/darwin/quartz/XServer.m b/hw/darwin/quartz/XServer.m deleted file mode 100644 index f8173cb7f..000000000 --- a/hw/darwin/quartz/XServer.m +++ /dev/null @@ -1,1538 +0,0 @@ -// -// XServer.m -// -// This class handles the interaction between the Cocoa front-end -// and the Darwin X server thread. -// -// Created by Andreas Monitzer on January 6, 2001. -// -/* - * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved. - * Copyright (c) 2002-2005 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. - */ - -#include -#include "quartzCommon.h" - -#define BOOL xBOOL -#include "X11/X.h" -#include "X11/Xproto.h" -#include "os.h" -#include "opaque.h" -#include "darwin.h" -#include "quartz.h" -#define _APPLEWM_SERVER_ -#include "X11/extensions/applewm.h" -#include "applewmExt.h" -#undef BOOL - -#import "XServer.h" -#import "Preferences.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -// For power management notifications -#import -#import -#import -#import -#import - -// Types of shells -enum { - shell_Unknown, - shell_Bourne, - shell_C -}; - -typedef struct { - char *name; - int type; -} shellList_t; - -static shellList_t const shellList[] = { - { "csh", shell_C }, // standard C shell - { "tcsh", shell_C }, // ... needs no introduction - { "sh", shell_Bourne }, // standard Bourne shell - { "zsh", shell_Bourne }, // Z shell - { "bash", shell_Bourne }, // GNU Bourne again shell - { NULL, shell_Unknown } -}; - -extern int argcGlobal; -extern char **argvGlobal; -extern char **envpGlobal; -extern int main(int argc, char *argv[], char *envp[]); -extern void HideMenuBar(void); -extern void ShowMenuBar(void); -static void childDone(int sig); -static void powerDidChange(void *x, io_service_t y, natural_t messageType, - void *messageArgument); - -static NSPort *signalPort; -static NSPort *returnPort; -static NSPortMessage *signalMessage; -static pid_t clientPID; -static XServer *oneXServer; -static NSRect aquaMenuBarBox; -static io_connect_t root_port; - - -@implementation XServer - -- (id)init -{ - self = [super init]; - oneXServer = self; - - serverState = server_NotStarted; - serverLock = [[NSRecursiveLock alloc] init]; - pendingClients = nil; - clientPID = 0; - sendServerEvents = NO; - x11Active = YES; - serverVisible = NO; - rootlessMenuBarVisible = YES; - queueShowServer = YES; - quartzServerQuitting = NO; - pendingAppQuitReply = NO; - mouseState = 0; - - // set up a port to safely send messages to main thread from server thread - signalPort = [[NSPort port] retain]; - returnPort = [[NSPort port] retain]; - signalMessage = [[NSPortMessage alloc] initWithSendPort:signalPort - receivePort:returnPort components:nil]; - - // set up receiving end - [signalPort setDelegate:self]; - [[NSRunLoop currentRunLoop] addPort:signalPort - forMode:NSDefaultRunLoopMode]; - [[NSRunLoop currentRunLoop] addPort:signalPort - forMode:NSModalPanelRunLoopMode]; - - return self; -} - -- (NSApplicationTerminateReply) - applicationShouldTerminate:(NSApplication *)sender -{ - // Quit if the X server is not running - if ([serverLock tryLock]) { - quartzServerQuitting = YES; - serverState = server_Done; - if (clientPID != 0) - kill(clientPID, SIGINT); - return NSTerminateNow; - } - - // Hide the X server and stop sending it events - [self showServer:NO]; - sendServerEvents = NO; - - if (!quitWithoutQuery && (clientPID != 0 || !quartzStartClients)) { - int but; - - but = NSRunAlertPanel(NSLocalizedString(@"Quit X server?",@""), - NSLocalizedString(@"Quitting the X server will terminate any running X Window System programs.",@""), - NSLocalizedString(@"Quit",@""), - NSLocalizedString(@"Cancel",@""), - nil); - - switch (but) { - case NSAlertDefaultReturn: // quit - break; - case NSAlertAlternateReturn: // cancel - if (serverState == server_Running) - sendServerEvents = YES; - return NSTerminateCancel; - } - } - - quartzServerQuitting = YES; - if (clientPID != 0) - kill(clientPID, SIGINT); - - // At this point the X server is either running or starting. - if (serverState == server_Starting) { - // Quit will be queued later when server is running - pendingAppQuitReply = YES; - return NSTerminateLater; - } else if (serverState == server_Running) { - [self quitServer]; - } - - return NSTerminateNow; -} - -// Ensure that everything has quit cleanly -- (void)applicationWillTerminate:(NSNotification *)aNotification -{ - // Make sure the client process has finished - if (clientPID != 0) { - NSLog(@"Waiting on client process..."); - sleep(2); - - // If the client process hasn't finished yet, kill it off - if (clientPID != 0) { - int clientStatus; - NSLog(@"Killing client process..."); - killpg(clientPID, SIGKILL); - waitpid(clientPID, &clientStatus, 0); - } - } - - // Wait until the X server thread quits - [serverLock lock]; -} - -// returns YES when event was handled -- (BOOL)translateEvent:(NSEvent *)anEvent -{ - xEvent xe; - static BOOL mouse1Pressed = NO; - NSEventType type; - unsigned int flags; - - if (!sendServerEvents) { - return NO; - } - - type = [anEvent type]; - flags = [anEvent modifierFlags]; - - if (!quartzRootless) { - // Check for switch keypress - if ((type == NSKeyDown) && (![anEvent isARepeat]) && - ([anEvent keyCode] == [Preferences keyCode])) - { - unsigned int switchFlags = [Preferences modifiers]; - - // Switch if all the switch modifiers are pressed, while none are - // pressed that should not be, except for caps lock. - if (((flags & switchFlags) == switchFlags) && - ((flags & ~(switchFlags | NSAlphaShiftKeyMask)) == 0)) - { - [self toggle]; - return YES; - } - } - - if (!serverVisible) - return NO; - } - - memset(&xe, 0, sizeof(xe)); - - switch (type) { - case NSLeftMouseUp: - if (quartzRootless && !mouse1Pressed) { - // MouseUp after MouseDown in menu - ignore - return NO; - } - mouse1Pressed = NO; - [self getMousePosition:&xe fromEvent:anEvent]; - xe.u.u.type = ButtonRelease; - xe.u.u.detail = 1; - break; - - case NSLeftMouseDown: - if (quartzRootless) { - // Check that event is in X11 window - if (!quartzProcs->IsX11Window([anEvent window], - [anEvent windowNumber])) - { - if (x11Active) - [self activateX11:NO]; - return NO; - } else { - if (!x11Active) - [self activateX11:YES]; - } - } - mouse1Pressed = YES; - [self getMousePosition:&xe fromEvent:anEvent]; - xe.u.u.type = ButtonPress; - xe.u.u.detail = 1; - break; - - case NSRightMouseUp: - [self getMousePosition:&xe fromEvent:anEvent]; - xe.u.u.type = ButtonRelease; - xe.u.u.detail = 3; - break; - - case NSRightMouseDown: - [self getMousePosition:&xe fromEvent:anEvent]; - xe.u.u.type = ButtonPress; - xe.u.u.detail = 3; - break; - - case NSOtherMouseUp: - { - int hwButton = [anEvent buttonNumber]; - - [self getMousePosition:&xe fromEvent:anEvent]; - xe.u.u.type = ButtonRelease; - xe.u.u.detail = (hwButton == 2) ? hwButton : hwButton + 1; - break; - } - - case NSOtherMouseDown: - { - int hwButton = [anEvent buttonNumber]; - - [self getMousePosition:&xe fromEvent:anEvent]; - xe.u.u.type = ButtonPress; - xe.u.u.detail = (hwButton == 2) ? hwButton : hwButton + 1; - break; - } - - case NSMouseMoved: - case NSLeftMouseDragged: - case NSRightMouseDragged: - case NSOtherMouseDragged: - [self getMousePosition:&xe fromEvent:anEvent]; - xe.u.u.type = MotionNotify; - break; - - case NSScrollWheel: - [self getMousePosition:&xe fromEvent:anEvent]; - xe.u.u.type = kXDarwinScrollWheel; - xe.u.clientMessage.u.s.shorts0 = [anEvent deltaX] + - [anEvent deltaY]; - break; - - case NSKeyDown: - case NSKeyUp: - if (!x11Active) { - swallowedKey = 0; - return NO; - } - - if (type == NSKeyDown) { - // If the mouse is not on the valid X display area, - // don't send the X server key events. - if (![self getMousePosition:&xe fromEvent:nil]) { - swallowedKey = [anEvent keyCode]; - return NO; - } - - // See if there are any global shortcuts for this key combo. - if (quartzEnableKeyEquivalents - && [[NSApp mainMenu] performKeyEquivalent:anEvent]) - { - swallowedKey = [anEvent keyCode]; - return YES; - } - } else { - // If the down key event was a valid key combo, - // don't pass the up event to X11. - if (swallowedKey != 0 && [anEvent keyCode] == swallowedKey) { - swallowedKey = 0; - return NO; - } - } - - xe.u.u.type = (type == NSKeyDown) ? KeyPress : KeyRelease; - xe.u.u.detail = [anEvent keyCode]; - break; - - case NSFlagsChanged: - if (!x11Active) - return NO; - xe.u.u.type = kXDarwinUpdateModifiers; - xe.u.clientMessage.u.l.longs0 = flags; - break; - - default: - return NO; - } - - [self sendXEvent:&xe]; - - // Rootless: Send first NSLeftMouseDown to Cocoa windows and views so - // window ordering can be suppressed. - // Don't pass further events - they (incorrectly?) bring the window - // forward no matter what. - if (quartzRootless && - (type == NSLeftMouseDown || type == NSLeftMouseUp) && - [anEvent clickCount] == 1 && [anEvent window]) - { - return NO; - } - - return YES; -} - -// Return mouse coordinates, inverting y coordinate. -// The coordinates are extracted from an event or the current mouse position. -// For rootless mode, the menu bar is treated as not part of the usable -// X display area and the cursor position is adjusted accordingly. -// Returns YES if the cursor is not in the menu bar. -- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent -{ - NSPoint pt; - - if (anEvent) { - NSWindow *eventWindow = [anEvent window]; - - if (eventWindow) { - pt = [anEvent locationInWindow]; - pt.x += [eventWindow frame].origin.x; - pt.y += [eventWindow frame].origin.y; - } else { - pt = [NSEvent mouseLocation]; - } - } else { - pt = [NSEvent mouseLocation]; - } - - xe->u.keyButtonPointer.rootX = (int)(pt.x); - - if (quartzRootless && NSMouseInRect(pt, aquaMenuBarBox, NO)) { - // mouse in menu bar - tell X11 that it's just below instead - xe->u.keyButtonPointer.rootY = aquaMenuBarHeight; - return NO; - } else { - xe->u.keyButtonPointer.rootY = - NSHeight([[NSScreen mainScreen] frame]) - (int)(pt.y); - return YES; - } -} - - -// Make a safe path -// -// Return the path in single quotes in case there are problematic characters in it. -// We still have to worry about there being single quotes in the path. So, replace -// all instances of the ' character in the path with '\''. -- (NSString *)makeSafePath:(NSString *)path -{ - NSMutableString *safePath = [NSMutableString stringWithString:path]; - NSRange aRange = NSMakeRange(0, [safePath length]); - - while (aRange.length) { - aRange = [safePath rangeOfString:@"'" options:0 range:aRange]; - if (!aRange.length) - break; - [safePath replaceCharactersInRange:aRange - withString:@"\'\\'\'"]; - aRange.location += 4; - aRange.length = [safePath length] - aRange.location; - } - - safePath = [NSMutableString stringWithFormat:@"'%@'", safePath]; - - return safePath; -} - - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification -{ - // Block SIGPIPE - // SIGPIPE repeatably killed the (rootless) server when closing a - // dozen xterms in rapid succession. Those SIGPIPEs should have been - // sent to the X server thread, which ignores them, but somehow they - // ended up in this thread instead. - { - sigset_t set; - sigemptyset(&set); - sigaddset(&set, SIGPIPE); - // pthread_sigmask not implemented yet - // pthread_sigmask(SIG_BLOCK, &set, NULL); - sigprocmask(SIG_BLOCK, &set, NULL); - } - - if (quartzRootless == -1) { - // The display mode was not set from the command line. - // Show mode pick panel? - if ([Preferences modeWindow]) { - if ([Preferences rootless]) - [startRootlessButton setKeyEquivalent:@"\r"]; - else - [startFullScreenButton setKeyEquivalent:@"\r"]; - [modeWindow makeKeyAndOrderFront:nil]; - } else { - // Otherwise use default mode - quartzRootless = [Preferences rootless]; - [self startX]; - } - } else { - [self startX]; - } -} - - -// Load the appropriate display mode bundle -- (BOOL)loadDisplayBundle -{ - if (quartzRootless) { - NSEnumerator *enumerator = [[Preferences displayModeBundles] - objectEnumerator]; - NSString *bundleName; - - while ((bundleName = [enumerator nextObject])) { - if (QuartzLoadDisplayBundle([bundleName cString])) - return YES; - } - - return NO; - } else { - return QuartzLoadDisplayBundle("fullscreen.bundle"); - } -} - - -// Start the X server thread and the client process -- (void)startX -{ - NSDictionary *appDictionary; - NSString *appVersion; - - [modeWindow close]; - - // Calculate the height of the menu bar so rootless mode can avoid it - if (quartzRootless) { - aquaMenuBarHeight = NSHeight([[NSScreen mainScreen] frame]) - - NSMaxY([[NSScreen mainScreen] visibleFrame]) - 1; - aquaMenuBarBox = - NSMakeRect(0, NSMaxY([[NSScreen mainScreen] visibleFrame]) + 1, - NSWidth([[NSScreen mainScreen] frame]), - aquaMenuBarHeight); - } - - // Write the XDarwin version to the console log - appDictionary = [[NSBundle mainBundle] infoDictionary]; - appVersion = [appDictionary objectForKey:@"CFBundleShortVersionString"]; - if (appVersion) - NSLog(@"\n%@", appVersion); - else - NSLog(@"No version"); - - if (![self loadDisplayBundle]) - [NSApp terminate:nil]; - - if (quartzRootless) { - // We need to track whether the key window is an X11 window - [[NSNotificationCenter defaultCenter] - addObserver:self - selector:@selector(windowBecameKey:) - name:NSWindowDidBecomeKeyNotification - object:nil]; - - // Request notification of screen layout changes even when this - // is not the active application - [[NSDistributedNotificationCenter defaultCenter] - addObserver:self - selector:@selector(applicationDidChangeScreenParameters:) - name:NSApplicationDidChangeScreenParametersNotification - object:nil]; - } - - // Start the X server thread - serverState = server_Starting; - [NSThread detachNewThreadSelector:@selector(run) toTarget:self - withObject:nil]; - - // Start the X clients if started from GUI - if (quartzStartClients) { - [self startXClients]; - } - - if (quartzRootless) { - // There is no help window for rootless; just start - [helpWindow close]; - helpWindow = nil; - } else { - IONotificationPortRef notify; - io_object_t anIterator; - - // Register for system power notifications - root_port = IORegisterForSystemPower(0, ¬ify, powerDidChange, - &anIterator); - if (root_port) { - CFRunLoopAddSource([[NSRunLoop currentRunLoop] getCFRunLoop], - IONotificationPortGetRunLoopSource(notify), - kCFRunLoopDefaultMode); - } else { - NSLog(@"Failed to register for system power notifications."); - } - - // Show the X switch window if not using dock icon switching - if (![Preferences dockSwitch]) - [switchWindow orderFront:nil]; - - if ([Preferences startupHelp]) { - // display the full screen mode help - [helpWindow makeKeyAndOrderFront:nil]; - queueShowServer = NO; - } else { - // start running full screen and make sure X is visible - ShowMenuBar(); - [self closeHelpAndShow:nil]; - } - } -} - -// Finish starting the X server thread -// This includes anything that must be done after the X server is -// ready to process events after the first or subsequent generations. -- (void)finishStartX -{ - sendServerEvents = YES; - serverState = server_Running; - - if (quartzRootless) { - [self forceShowServer:[NSApp isActive]]; - } else { - [self forceShowServer:queueShowServer]; - } - - if (quartzServerQuitting) { - [self quitServer]; - if (pendingAppQuitReply) - [NSApp replyToApplicationShouldTerminate:YES]; - return; - } - - if (pendingClients) { - NSEnumerator *enumerator = [pendingClients objectEnumerator]; - NSString *filename; - - while ((filename = [enumerator nextObject])) { - [self runClient:filename]; - } - - [pendingClients release]; - pendingClients = nil; - } -} - -// Start the first X clients in a separate process -- (BOOL)startXClients -{ - struct passwd *passwdUser; - NSString *shellPath, *dashShellName, *commandStr, *startXPath; - NSString *safeStartXPath; - NSBundle *thisBundle; - const char *shellPathStr, *newargv[3], *shellNameStr; - int fd[2], outFD, length, shellType, i; - - // Register to catch the signal when the client processs finishes - signal(SIGCHLD, childDone); - - // Get user's password database entry - passwdUser = getpwuid(getuid()); - - // Find the shell to use - if ([Preferences useDefaultShell]) - shellPath = [NSString stringWithCString:passwdUser->pw_shell]; - else - shellPath = [Preferences shellString]; - - dashShellName = [NSString stringWithFormat:@"-%@", - [shellPath lastPathComponent]]; - shellPathStr = [shellPath cString]; - shellNameStr = [[shellPath lastPathComponent] cString]; - - if (access(shellPathStr, X_OK)) { - NSLog(@"Shell %s is not valid!", shellPathStr); - return NO; - } - - // Find the type of shell - for (i = 0; shellList[i].name; i++) { - if (!strcmp(shellNameStr, shellList[i].name)) - break; - } - shellType = shellList[i].type; - - newargv[0] = [dashShellName cString]; - if (shellType == shell_Bourne) { - // Bourne shells need to be told they are interactive to make - // sure they read all their initialization files. - newargv[1] = "-i"; - newargv[2] = NULL; - } else { - newargv[1] = NULL; - } - - // Create a pipe to communicate with the X client process - NSAssert(pipe(fd) == 0, @"Could not create new pipe."); - - // Open a file descriptor for writing to stdout and stderr - outFD = open("/dev/console", O_WRONLY, 0); - if (outFD == -1) { - outFD = open("/dev/null", O_WRONLY, 0); - NSAssert(outFD != -1, @"Could not open shell output."); - } - - // Fork process to start X clients in user's default shell - // Sadly we can't use NSTask because we need to start a login shell. - // Login shells are started by passing "-" as the first character of - // argument 0. NSTask forces argument 0 to be the shell's name. - clientPID = vfork(); - if (clientPID == 0) { - - // Inside the new process: - if (fd[0] != STDIN_FILENO) { - dup2(fd[0], STDIN_FILENO); // Take stdin from pipe - close(fd[0]); - } - close(fd[1]); // Close write end of pipe - if (outFD == STDOUT_FILENO) { // Setup stdout and stderr - dup2(outFD, STDERR_FILENO); - } else if (outFD == STDERR_FILENO) { - dup2(outFD, STDOUT_FILENO); - } else { - dup2(outFD, STDERR_FILENO); - dup2(outFD, STDOUT_FILENO); - close(outFD); - } - - // Setup environment - setenv("HOME", passwdUser->pw_dir, 1); - setenv("SHELL", shellPathStr, 1); - setenv("LOGNAME", passwdUser->pw_name, 1); - setenv("USER", passwdUser->pw_name, 1); - setenv("TERM", "unknown", 1); - if (chdir(passwdUser->pw_dir)) // Change to user's home dir - NSLog(@"Could not change to user's home directory."); - - execv(shellPathStr, (char * const *)newargv); // Start user's shell - - NSLog(@"Could not start X client process with errno = %i.", errno); - _exit(127); - } - - // In parent process: - close(fd[0]); // Close read end of pipe - close(outFD); // Close output file descriptor - - thisBundle = [NSBundle bundleForClass:[self class]]; - startXPath = [thisBundle pathForResource:@"startXClients" ofType:nil]; - if (!startXPath) { - NSLog(@"Could not find startXClients in application bundle!"); - return NO; - } - - safeStartXPath = [self makeSafePath:startXPath]; - - if ([Preferences addToPath]) { - commandStr = [NSString stringWithFormat:@"%@ :%d %@\n", - safeStartXPath, [Preferences display], - [Preferences addToPathString]]; - } else { - commandStr = [NSString stringWithFormat:@"%@ :%d\n", - safeStartXPath, [Preferences display]]; - } - - length = [commandStr cStringLength]; - if (write(fd[1], [commandStr cString], length) != length) { - NSLog(@"Write to X client process failed."); - return NO; - } - - // Close the pipe so that shell will terminate when xinit quits - close(fd[1]); - - return YES; -} - -// Start the specified client in its own task -// FIXME: This should be unified with startXClients -- (void)runClient:(NSString *)filename -{ - const char *command = [[self makeSafePath:filename] UTF8String]; - const char *shell; - const char *argv[5]; - int child1, child2 = 0; - int status; - - shell = getenv("SHELL"); - if (shell == NULL) - shell = "/bin/bash"; - - /* At least [ba]sh, [t]csh and zsh all work with this syntax. We - need to use an interactive shell to force it to load the user's - environment. */ - - argv[0] = shell; - argv[1] = "-i"; - argv[2] = "-c"; - argv[3] = command; - argv[4] = NULL; - - /* Do the fork-twice trick to avoid having to reap zombies */ - - child1 = fork(); - - switch (child1) { - case -1: /* error */ - break; - - case 0: /* child1 */ - child2 = fork(); - - switch (child2) { - int max_files, i; - char buf[1024], *tem; - - case -1: /* error */ - _exit(1); - - case 0: /* child2 */ - /* close all open files except for standard streams */ - max_files = sysconf(_SC_OPEN_MAX); - for (i = 3; i < max_files; i++) - close(i); - - /* ensure stdin is on /dev/null */ - close(0); - open("/dev/null", O_RDONLY); - - /* cd $HOME */ - tem = getenv("HOME"); - if (tem != NULL) - chdir(tem); - - /* Setup environment */ -// snprintf(buf, sizeof(buf), ":%s", display); -// setenv("DISPLAY", buf, TRUE); - tem = getenv("PATH"); - if (tem != NULL && tem[0] != NULL) - snprintf(buf, sizeof(buf), "%s:/usr/X11/bin", tem); - else - snprintf(buf, sizeof(buf), "/bin:/usr/bin:/usr/X11/bin"); - setenv("PATH", buf, TRUE); - - execvp(argv[0], (char **const) argv); - - _exit(2); - - default: /* parent (child1) */ - _exit(0); - } - break; - - default: /* parent */ - waitpid(child1, &status, 0); - } -} - -// Run the X server thread -- (void)run -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - [serverLock lock]; - main(argcGlobal, argvGlobal, envpGlobal); - serverVisible = NO; - [pool release]; - [serverLock unlock]; - QuartzMessageMainThread(kQuartzServerDied, nil, 0); -} - -// Full screen mode was picked in the mode pick panel -- (IBAction)startFullScreen:(id)sender -{ - [Preferences setModeWindow:[startupModeButton intValue]]; - [Preferences saveToDisk]; - quartzRootless = FALSE; - [self startX]; -} - -// Rootless mode was picked in the mode pick panel -- (IBAction)startRootless:(id)sender -{ - [Preferences setModeWindow:[startupModeButton intValue]]; - [Preferences saveToDisk]; - quartzRootless = TRUE; - [self startX]; -} - -// Close the help splash screen and show the X server -- (IBAction)closeHelpAndShow:(id)sender -{ - if (sender) { - int helpVal = [startupHelpButton intValue]; - [Preferences setStartupHelp:helpVal]; - [Preferences saveToDisk]; - } - [helpWindow close]; - helpWindow = nil; - - [self forceShowServer:YES]; - [NSApp activateIgnoringOtherApps:YES]; -} - -// Show the Aqua-X11 switch panel useful for fullscreen mode -- (IBAction)showSwitchPanel:(id)sender -{ - [switchWindow orderFront:nil]; -} - -// Show the X server when sent message from GUI -- (IBAction)showAction:(id)sender -{ - [self forceShowServer:YES]; -} - -// Show or hide the X server or menu bar in rootless mode -- (void)toggle -{ - if (quartzRootless) { -#if 0 - // FIXME: Remove or add option to not dodge menubar - if (rootlessMenuBarVisible) - HideMenuBar(); - else - ShowMenuBar(); - rootlessMenuBarVisible = !rootlessMenuBarVisible; -#endif - } else { - [self showServer:!serverVisible]; - } -} - -// Show or hide the X server on screen -- (void)showServer:(BOOL)show -{ - // Do not show or hide multiple times in a row - if (serverVisible == show) - return; - - if (sendServerEvents) { - [self sendShowHide:show]; - } else if (serverState == server_Starting) { - queueShowServer = show; - } -} - -// Show or hide the X server irregardless of the current state -- (void)forceShowServer:(BOOL)show -{ - serverVisible = !show; - [self showServer:show]; -} - -// Tell the X server to show or hide itself. -// This ignores the current X server visible state. -// -// In full screen mode, the order we do things is important and must be -// preserved between the threads. X drawing operations have to be performed -// in the X server thread. It appears that we have the additional -// constraint that we must hide and show the menu bar in the main thread. -// -// To show the X server: -// 1. Capture the displays. (Main thread) -// 2. Hide the menu bar. (Must be in main thread) -// 3. Send event to X server thread to redraw X screen. -// 4. Redraw the X screen. (Must be in X server thread) -// -// To hide the X server: -// 1. Send event to X server thread to stop drawing. -// 2. Stop drawing to the X screen. (Must be in X server thread) -// 3. Message main thread that drawing is stopped. -// 4. If main thread still wants X server hidden: -// a. Release the displays. (Main thread) -// b. Unhide the menu bar. (Must be in main thread) -// Otherwise we have already queued an event to start drawing again. -// -- (void)sendShowHide:(BOOL)show -{ - xEvent xe; - - [self getMousePosition:&xe fromEvent:nil]; - - if (show) { - if (!quartzRootless) { - quartzProcs->CaptureScreens(); - HideMenuBar(); - } - [self activateX11:YES]; - - // the mouse location will have moved; track it - xe.u.u.type = MotionNotify; - [self sendXEvent:&xe]; - - // inform the X server of the current modifier state - xe.u.u.type = kXDarwinUpdateModifiers; - xe.u.clientMessage.u.l.longs0 = [[NSApp currentEvent] modifierFlags]; - [self sendXEvent:&xe]; - - // If there is no AppleWM-aware cut and paste manager, do what we can. - if ((AppleWMSelectedEvents() & AppleWMPasteboardNotifyMask) == 0) { - // put the pasteboard into the X cut buffer - [self readPasteboard]; - } - } else { - // If there is no AppleWM-aware cut and paste manager, do what we can. - if ((AppleWMSelectedEvents() & AppleWMPasteboardNotifyMask) == 0) { - // put the X cut buffer on the pasteboard - [self writePasteboard]; - } - - [self activateX11:NO]; - } - - serverVisible = show; -} - -// Enable or disable rendering to the X screen -- (void)setRootClip:(BOOL)enable -{ - xEvent xe; - - xe.u.u.type = kXDarwinSetRootClip; - xe.u.clientMessage.u.l.longs0 = enable; - [self sendXEvent:&xe]; -} - -// Tell the X server to read from the pasteboard into the X cut buffer -- (void)readPasteboard -{ - xEvent xe; - - xe.u.u.type = kXDarwinReadPasteboard; - [self sendXEvent:&xe]; -} - -// Tell the X server to write the X cut buffer into the pasteboard -- (void)writePasteboard -{ - xEvent xe; - - xe.u.u.type = kXDarwinWritePasteboard; - [self sendXEvent:&xe]; -} - -- (void)quitServer -{ - xEvent xe; - - xe.u.u.type = kXDarwinQuit; - [self sendXEvent:&xe]; - - // Revert to the Mac OS X arrow cursor. The main thread sets the cursor - // and it won't be responding to future requests to change it. - [[NSCursor arrowCursor] set]; - - serverState = server_Quitting; -} - -- (void)sendXEvent:(xEvent *)xe -{ - // This field should be filled in for every event - xe->u.keyButtonPointer.time = GetTimeInMillis(); - - DarwinEQEnqueue(xe); -} - -// Handle messages from the X server thread -- (void)handlePortMessage:(NSPortMessage *)portMessage -{ - unsigned msg = [portMessage msgid]; - - switch (msg) { - case kQuartzServerHidden: - // Make sure the X server wasn't queued to be shown again while - // the hide was pending. - if (!quartzRootless && !serverVisible) { - quartzProcs->ReleaseScreens(); - ShowMenuBar(); - } - break; - - case kQuartzServerStarted: - [self finishStartX]; - break; - - case kQuartzServerDied: - sendServerEvents = NO; - serverState = server_Done; - if (!quartzServerQuitting) { - [NSApp terminate:nil]; // quit if we aren't already - } - break; - - case kQuartzCursorUpdate: - if (quartzProcs->CursorUpdate) - quartzProcs->CursorUpdate(); - break; - - case kQuartzPostEvent: - { - const xEvent *xe = [[[portMessage components] lastObject] bytes]; - DarwinEQEnqueue(xe); - break; - } - - case kQuartzSetWindowMenu: - { - NSArray *list; - [[[portMessage components] lastObject] getBytes:&list]; - [self setX11WindowList:list]; - [list release]; - break; - } - - case kQuartzSetWindowMenuCheck: - { - int n; - [[[portMessage components] lastObject] getBytes:&n]; - [self setX11WindowCheck:[NSNumber numberWithInt:n]]; - break; - } - - case kQuartzSetFrontProcess: - [NSApp activateIgnoringOtherApps:YES]; - break; - - case kQuartzSetCanQuit: - { - int n; - [[[portMessage components] lastObject] getBytes:&n]; - quitWithoutQuery = (BOOL) n; - break; - } - - default: - NSLog(@"Unknown message from server thread."); - } -} - -// Quit the X server when the X client process finishes -- (void)clientProcessDone:(int)clientStatus -{ - if (WIFEXITED(clientStatus)) { - int exitStatus = WEXITSTATUS(clientStatus); - if (exitStatus != 0) - NSLog(@"X client process terminated with status %i.", exitStatus); - } else { - NSLog(@"X client process terminated abnormally."); - } - - if (!quartzServerQuitting) { - [NSApp terminate:nil]; // quit if we aren't already - } -} - -// User selected an X11 window from a menu -- (IBAction)itemSelected:(id)sender -{ - xEvent xe; - - [NSApp activateIgnoringOtherApps:YES]; - - // Notify the client of the change through the X server thread - xe.u.u.type = kXDarwinControllerNotify; - xe.u.clientMessage.u.l.longs0 = AppleWMWindowMenuItem; - xe.u.clientMessage.u.l.longs1 = [sender tag]; - [self sendXEvent:&xe]; -} - -// User selected Next from window menu -- (IBAction)nextWindow:(id)sender -{ - QuartzMessageServerThread(kXDarwinControllerNotify, 1, - AppleWMNextWindow); -} - -// User selected Previous from window menu -- (IBAction)previousWindow:(id)sender -{ - QuartzMessageServerThread(kXDarwinControllerNotify, 1, - AppleWMPreviousWindow); -} - -/* - * The XPR implementation handles close, minimize, and zoom actions for X11 - * windows here, while CR handles these in the NSWindow class. - */ - -// Handle Close from window menu for X11 window in XPR implementation -- (IBAction)performClose:(id)sender -{ - QuartzMessageServerThread(kXDarwinControllerNotify, 1, - AppleWMCloseWindow); -} - -// Handle Minimize from window menu for X11 window in XPR implementation -- (IBAction)performMiniaturize:(id)sender -{ - QuartzMessageServerThread(kXDarwinControllerNotify, 1, - AppleWMMinimizeWindow); -} - -// Handle Zoom from window menu for X11 window in XPR implementation -- (IBAction)performZoom:(id)sender -{ - QuartzMessageServerThread(kXDarwinControllerNotify, 1, - AppleWMZoomWindow); -} - -// Handle "Bring All to Front" from window menu -- (IBAction)bringAllToFront:(id)sender -{ - if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) { - QuartzMessageServerThread(kXDarwinControllerNotify, 1, - AppleWMBringAllToFront); - } else { - [NSApp arrangeInFront:nil]; - } -} - -// This ends up at the end of the responder chain. -- (IBAction)copy:(id)sender -{ - QuartzMessageServerThread(kXDarwinPasteboardNotify, 1, - AppleWMCopyToPasteboard); -} - -// Set whether or not X11 is active and should receive all key events -- (void)activateX11:(BOOL)state -{ - if (state) { - QuartzMessageServerThread(kXDarwinActivate, 0); - } - else { - QuartzMessageServerThread(kXDarwinDeactivate, 0); - } - - x11Active = state; -} - -// Some NSWindow became the key window -- (void)windowBecameKey:(NSNotification *)notification -{ - NSWindow *window = [notification object]; - - if (quartzProcs->IsX11Window(window, [window windowNumber])) { - if (!x11Active) - [self activateX11:YES]; - } else { - if (x11Active) - [self activateX11:NO]; - } -} - -// Set the Apple-WM specifiable part of the window menu -- (void)setX11WindowList:(NSArray *)list -{ - NSMenuItem *item; - int first, count, i; - xEvent xe; - - /* Work backwards so we don't mess up the indices */ - first = [windowMenu indexOfItem:windowSeparator] + 1; - if (first > 0) { - count = [windowMenu numberOfItems]; - for (i = count - 1; i >= first; i--) - [windowMenu removeItemAtIndex:i]; - } else { - windowSeparator = (NSMenuItem *)[windowMenu addItemWithTitle:@"" - action:nil - keyEquivalent:@""]; - } - - count = [dockMenu numberOfItems]; - for (i = 0; i < count; i++) - [dockMenu removeItemAtIndex:0]; - - count = [list count]; - - for (i = 0; i < count; i++) - { - NSString *name, *shortcut; - - name = [[list objectAtIndex:i] objectAtIndex:0]; - shortcut = [[list objectAtIndex:i] objectAtIndex:1]; - - item = (NSMenuItem *)[windowMenu addItemWithTitle:name - action:@selector(itemSelected:) - keyEquivalent:shortcut]; - [item setTarget:self]; - [item setTag:i]; - [item setEnabled:YES]; - - item = (NSMenuItem *)[dockMenu insertItemWithTitle:name - action:@selector(itemSelected:) - keyEquivalent:shortcut atIndex:i]; - [item setTarget:self]; - [item setTag:i]; - [item setEnabled:YES]; - } - - if (checkedWindowItem >= 0 && checkedWindowItem < count) - { - item = (NSMenuItem *)[windowMenu itemAtIndex:first + checkedWindowItem]; - [item setState:NSOnState]; - item = (NSMenuItem *)[dockMenu itemAtIndex:checkedWindowItem]; - [item setState:NSOnState]; - } - - // Notify the client of the change through the X server thread - xe.u.u.type = kXDarwinControllerNotify; - xe.u.clientMessage.u.l.longs0 = AppleWMWindowMenuNotify; - [self sendXEvent:&xe]; -} - -// Set the checked item on the Apple-WM specifiable window menu -- (void)setX11WindowCheck:(NSNumber *)nn -{ - NSMenuItem *item; - int first, count; - int n = [nn intValue]; - - first = [windowMenu indexOfItem:windowSeparator] + 1; - count = [windowMenu numberOfItems] - first; - - if (checkedWindowItem >= 0 && checkedWindowItem < count) - { - item = (NSMenuItem *)[windowMenu itemAtIndex:first + checkedWindowItem]; - [item setState:NSOffState]; - item = (NSMenuItem *)[dockMenu itemAtIndex:checkedWindowItem]; - [item setState:NSOffState]; - } - if (n >= 0 && n < count) - { - item = (NSMenuItem *)[windowMenu itemAtIndex:first + n]; - [item setState:NSOnState]; - item = (NSMenuItem *)[dockMenu itemAtIndex:n]; - [item setState:NSOnState]; - } - checkedWindowItem = n; -} - -// Return whether or not a menu item should be enabled -- (BOOL)validateMenuItem:(NSMenuItem *)item -{ - NSMenu *menu = [item menu]; - - if (menu == windowMenu && [item tag] == 30) { - // Mode switch panel is for fullscreen only - return !quartzRootless; - } - else if ((menu == windowMenu && [item tag] != 40) || menu == dockMenu) { - // The special window and dock menu items should not be active unless - // there is an AppleWM-aware window manager running. - return (AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0; - } - else { - return TRUE; - } -} - -/* - * Application Delegate Methods - */ - -- (void)applicationDidChangeScreenParameters:(NSNotification *)aNotification -{ - if (quartzProcs->ScreenChanged) - quartzProcs->ScreenChanged(); -} - -- (void)applicationDidHide:(NSNotification *)aNotification -{ - if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) { - QuartzMessageServerThread(kXDarwinControllerNotify, 1, - AppleWMHideAll); - } else { - if (quartzProcs->HideWindows) - quartzProcs->HideWindows(YES); - } -} - -- (void)applicationDidUnhide:(NSNotification *)aNotification -{ - if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0) { - QuartzMessageServerThread(kXDarwinControllerNotify, 1, - AppleWMShowAll); - } else { - if (quartzProcs->HideWindows) - quartzProcs->HideWindows(NO); - } -} - -// Called when the user clicks the application icon, -// but not when Cmd-Tab is used. -// Rootless: Don't switch until applicationWillBecomeActive. -- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication - hasVisibleWindows:(BOOL)flag -{ - if ([Preferences dockSwitch] && !quartzRootless) { - [self showServer:YES]; - } - return NO; -} - -- (void)applicationWillResignActive:(NSNotification *)aNotification -{ - [self showServer:NO]; -} - -- (void)applicationWillBecomeActive:(NSNotification *)aNotification -{ - if (quartzRootless) { - [self showServer:YES]; - - // If there is no AppleWM-aware window manager, we can't allow - // interleaving of Aqua and X11 windows. - if ((AppleWMSelectedEvents() & AppleWMControllerNotifyMask) == 0) { - [NSApp arrangeInFront:nil]; - } - } -} - -// Called when the user opens a document type that we claim (ie. an X11 executable). -- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename -{ - if (serverState == server_Running) { - [self runClient:filename]; - return YES; - } - else if (serverState == server_NotStarted || serverState == server_Starting) { - if ([filename UTF8String][0] != ':') { // Ignore display names - if (!pendingClients) { - pendingClients = [[NSMutableArray alloc] initWithCapacity:1]; - } - [pendingClients addObject:filename]; - return YES; // Assume it will launch successfully - } - return NO; - } - - // If the server is quitting or done, - // its too late to launch new clients this time. - return NO; -} - -@end - - -// Send a message to the main thread, which calls handlePortMessage in -// response. Must only be called from the X server thread because -// NSPort is not thread safe. -void QuartzMessageMainThread(unsigned msg, void *data, unsigned length) -{ - if (length > 0) { - NSData *eventData = [NSData dataWithBytes:data length:length]; - NSArray *eventArray = [NSArray arrayWithObject:eventData]; - NSPortMessage *newMessage = - [[NSPortMessage alloc] - initWithSendPort:signalPort - receivePort:returnPort components:eventArray]; - [newMessage setMsgid:msg]; - [newMessage sendBeforeDate:[NSDate distantPast]]; - [newMessage release]; - } else { - [signalMessage setMsgid:msg]; - [signalMessage sendBeforeDate:[NSDate distantPast]]; - } -} - -void -QuartzSetWindowMenu(int nitems, const char **items, - const char *shortcuts) -{ - NSMutableArray *array; - int i; - - array = [[NSMutableArray alloc] initWithCapacity:nitems]; - - for (i = 0; i < nitems; i++) { - NSMutableArray *subarray = [NSMutableArray arrayWithCapacity:2]; - NSString *string = [NSString stringWithUTF8String:items[i]]; - - [subarray addObject:string]; - - if (shortcuts[i] != 0) { - NSString *number = [NSString stringWithFormat:@"%d", - shortcuts[i]]; - [subarray addObject:number]; - } else - [subarray addObject:@""]; - - [array addObject:subarray]; - } - - /* Send the array of strings over to the main thread. */ - /* Will be released in main thread. */ - QuartzMessageMainThread(kQuartzSetWindowMenu, &array, sizeof(NSArray *)); -} - -// Handle SIGCHLD signals -static void childDone(int sig) -{ - int clientStatus; - - if (clientPID == 0) - return; - - // Make sure it was the client task that finished - if (waitpid(clientPID, &clientStatus, WNOHANG) == clientPID) { - if (WIFSTOPPED(clientStatus)) - return; - clientPID = 0; - [oneXServer clientProcessDone:clientStatus]; - } -} - -static void powerDidChange( - void *x, - io_service_t y, - natural_t messageType, - void *messageArgument) -{ - switch (messageType) { - case kIOMessageSystemWillSleep: - if (!quartzRootless) { - [oneXServer setRootClip:FALSE]; - } - IOAllowPowerChange(root_port, (long)messageArgument); - break; - case kIOMessageCanSystemSleep: - IOAllowPowerChange(root_port, (long)messageArgument); - break; - case kIOMessageSystemHasPoweredOn: - if (!quartzRootless) { - [oneXServer setRootClip:TRUE]; - } - break; - } - -} diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index 308c51074..20d1b4f82 100644 --- a/hw/darwin/quartz/applewm.c +++ b/hw/darwin/quartz/applewm.c @@ -47,6 +47,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define _APPLEWM_SERVER_ #include "X11/extensions/applewmstr.h" #include "applewmExt.h" +#include "X11Application.h" #define DEFINE_ATOM_HELPER(func,atom_name) \ static Atom func (void) { \ @@ -445,13 +446,7 @@ ProcAppleWMSetWindowMenu( break; } } - -#ifdef INXQUARTZ X11ApplicationSetWindowMenu (nitems, items, shortcuts); -#else - QuartzSetWindowMenu (nitems, items, shortcuts); -#endif - free(items); free(shortcuts); @@ -466,12 +461,7 @@ ProcAppleWMSetWindowMenuCheck( REQUEST(xAppleWMSetWindowMenuCheckReq); REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); -#ifdef INXQUARTZ X11ApplicationSetWindowMenuCheck(stuff->index); -#else - QuartzMessageMainThread(kQuartzSetWindowMenuCheck, &stuff->index, - sizeof(stuff->index)); -#endif return (client->noClientException); } @@ -481,11 +471,8 @@ ProcAppleWMSetFrontProcess( ) { REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq); -#ifdef INXQUARTZ + X11ApplicationSetFrontProcess(); -#else - QuartzMessageMainThread(kQuartzSetFrontProcess, NULL, 0); -#endif return (client->noClientException); } @@ -524,13 +511,8 @@ ProcAppleWMSetCanQuit( REQUEST(xAppleWMSetCanQuitReq); REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq); -#ifdef INXQUARTZ - X11ApplicationSetCanQuit(stuff->state); -#else - QuartzMessageMainThread(kQuartzSetCanQuit, &stuff->state, - sizeof(stuff->state)); -#endif + X11ApplicationSetCanQuit(stuff->state); return (client->noClientException); } diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 762a84b75..3374baaf8 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -39,11 +39,14 @@ #include "X11/extensions/applewm.h" #include "applewmExt.h" +#include "X11Application.h" + // X headers #include "scrnintstr.h" #include "windowstr.h" #include "colormapst.h" #include "globals.h" +#include "rootlessWindow.h" // System headers #include @@ -84,7 +87,9 @@ Bool DarwinModeAddScreen( { // allocate space for private per screen Quartz specific storage QuartzScreenPtr displayInfo = xcalloc(sizeof(QuartzScreenRec), 1); - QUARTZ_PRIV(pScreen) = displayInfo; + + // QUARTZ_PRIV(pScreen) = displayInfo; + pScreen->devPrivates[quartzScreenIndex].ptr = displayInfo; // do Quartz mode specific initialization return quartzProcs->AddScreen(index, pScreen); @@ -158,12 +163,7 @@ void DarwinModeInitInput( int argc, char **argv ) { -#ifdef INXQUARTZ - X11ApplicationServerReady(); -#else - QuartzMessageMainThread(kQuartzServerStarted, NULL, 0); -#endif - + X11ApplicationServerReady(); // Do final display mode specific initialization before handling events if (quartzProcs->InitInput) quartzProcs->InitInput(argc, argv); @@ -276,9 +276,6 @@ static void QuartzHide(void) } } quartzServerVisible = FALSE; -#ifndef INXQUARTZ - QuartzMessageMainThread(kQuartzServerHidden, NULL, 0); -#endif } @@ -386,7 +383,7 @@ void DarwinModeProcessEvent( case kXDarwinWindowMoved: // ErrorF("kXDarwinWindowMoved\n"); - RootlessNativeWindowMoved (xe->u.clientMessage.u.l.longs0); + RootlessNativeWindowMoved ((WindowPtr)xe->u.clientMessage.u.l.longs0); break; case kXDarwinToggleFullscreen: diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h index 172f3239b..e74a1082b 100644 --- a/hw/darwin/quartz/quartz.h +++ b/hw/darwin/quartz/quartz.h @@ -124,6 +124,4 @@ typedef struct _QuartzModeProcs { extern QuartzModeProcsPtr quartzProcs; extern int quartzHasRoot, quartzEnableRootless; -Bool QuartzLoadDisplayBundle(const char *dpyBundleName); - #endif diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m index 3987cd2c2..46a982849 100644 --- a/hw/darwin/quartz/quartzCocoa.m +++ b/hw/darwin/quartz/quartzCocoa.m @@ -42,63 +42,12 @@ #include -#ifndef INXQUARTZ -#import "Preferences.h" -#endif #include "pseudoramiX.h" extern void FatalError(const char *, ...); extern char *display; extern int noPanoramiXExtension; -#ifndef INXQUARTZ -/* - * QuartzReadPreferences - * Read the user preferences from the Cocoa front end. - */ -void QuartzReadPreferences(void) -{ - char *fileString; - - darwinFakeButtons = [Preferences fakeButtons]; - darwinFakeMouse2Mask = [Preferences button2Mask]; - darwinFakeMouse3Mask = [Preferences button3Mask]; - // darwinMouseAccelChange = [Preferences mouseAccelChange]; - quartzUseSysBeep = [Preferences systemBeep]; - quartzEnableKeyEquivalents = [Preferences enableKeyEquivalents]; - - // quartzRootless has already been set - if (quartzRootless) { - // Use PseudoramiX instead of Xinerama - noPanoramiXExtension = TRUE; - noPseudoramiXExtension = ![Preferences xinerama]; - - quartzUseAGL = [Preferences useAGL]; - } else { - noPanoramiXExtension = ![Preferences xinerama]; - noPseudoramiXExtension = TRUE; - - // Full screen can't use AGL for GLX - quartzUseAGL = FALSE; - } - - if ([Preferences useKeymapFile]) { - fileString = (char *) [[Preferences keymapFile] lossyCString]; - darwinKeymapFile = (char *) malloc(strlen(fileString)+1); - if (! darwinKeymapFile) - FatalError("malloc failed in QuartzReadPreferences()!\n"); - strcpy(darwinKeymapFile, fileString); - } - - display = (char *) malloc(8); - if (! display) - FatalError("malloc failed in QuartzReadPreferences()!\n"); - snprintf(display, 8, "%i", [Preferences display]); - - darwinDesiredDepth = [Preferences depth] - 1; -} -#endif - /* * QuartzWriteCocoaPasteboard * Write text to the Mac OS X pasteboard. @@ -162,19 +111,6 @@ char *QuartzReadCocoaPasteboard(void) int QuartzFSUseQDCursor( int depth) // screen depth { -#ifndef INXQUARTZ - switch ([Preferences useQDCursor]) { - case qdCursor_Always: - return TRUE; - case qdCursor_Never: - return FALSE; - case qdCursor_Not8Bit: - if (depth > 8) - return TRUE; - else - return FALSE; - } -#endif return TRUE; } @@ -184,9 +120,9 @@ int QuartzFSUseQDCursor( * Clean out any autoreleased objects. */ void QuartzBlockHandler( - void *blockData, - void *pTimeout, - void *pReadmask) + pointer blockData, + OSTimePtr pTimeout, + pointer pReadmask) { static NSAutoreleasePool *aPool = nil; @@ -199,9 +135,9 @@ void QuartzBlockHandler( * QuartzWakeupHandler */ void QuartzWakeupHandler( - void *blockData, + pointer blockData, int result, - void *pReadmask) + pointer pReadmask) { // nothing here } diff --git a/hw/darwin/quartz/quartzCommon.h b/hw/darwin/quartz/quartzCommon.h index f5dff662c..f0d5a7a08 100644 --- a/hw/darwin/quartz/quartzCommon.h +++ b/hw/darwin/quartz/quartzCommon.h @@ -46,6 +46,7 @@ #undef Cursor #undef WindowPtr #undef Picture +#include // Quartz specific per screen storage structure typedef struct { @@ -87,8 +88,8 @@ void QuartzSetWindowMenu(int nitems, const char **items, void QuartzFSCapture(void); void QuartzFSRelease(void); int QuartzFSUseQDCursor(int depth); -void QuartzBlockHandler(void *blockData, void *pTimeout, void *pReadmask); -void QuartzWakeupHandler(void *blockData, int result, void *pReadmask); +void QuartzBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask); +void QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask); // Messages that can be sent to the main thread. enum { diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c index 76392e44c..0381a9f6a 100644 --- a/hw/darwin/quartz/quartzStartup.c +++ b/hw/darwin/quartz/quartzStartup.c @@ -42,32 +42,13 @@ char **envpGlobal; // argcGlobal and argvGlobal // are from dix/globals.c -#ifdef INXQUARTZ + void X11ControllerMain(int argc, char *argv[], void (*server_thread) (void *), void *server_arg); -# ifdef GLXEXT -void GlxExtensionInit(void); -void GlxWrapInitVisuals(miInitVisualsProcPtr *); -# endif static void server_thread (void *arg) { - extern int main (int argc, char **argv, char **envp); + extern int main(int argc, char **argv, char **envp); exit (main (argcGlobal, argvGlobal, envpGlobal)); } -#else -int NSApplicationMain(int argc, char *argv[]); -typedef Bool (*QuartzModeBundleInitPtr)(void); - -# ifdef GLXEXT -// GLX bundle function pointers -typedef void (*GlxExtensionInitPtr)(void); -static GlxExtensionInitPtr GlxExtensionInit = NULL; -typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *); -static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL; -void * __DarwinglXMesaProvider = NULL; -typedef void (*GlxPushProviderPtr)(void *); -GlxPushProviderPtr GlxPushProvider = NULL; -# endif -#endif /* * DarwinHandleGUI @@ -83,13 +64,10 @@ void DarwinHandleGUI( char *envp[] ) { static Bool been_here = FALSE; - int main_exit, i; + int i; int fd[2]; if (been_here) { -#ifdef INXDARWINAPP - QuartzReadPreferences(); -#endif return; } been_here = TRUE; @@ -124,7 +102,7 @@ void DarwinHandleGUI( } } -#ifdef INXQUARTZ + /* 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 @@ -133,221 +111,10 @@ void DarwinHandleGUI( grr.. but doing that means that if the X thread gets scheduled before the main thread when we're _not_ prebound, things fail, so initialize by hand. */ + extern void _InitHLTB(void); - _InitHLTB(); - + _InitHLTB(); X11ControllerMain(argc, argv, server_thread, NULL); -#else - main_exit = NSApplicationMain(argc, argv); -#endif - exit(main_exit); -} - -#ifndef INXQUARTZ -/* - * QuartzLoadDisplayBundle - * Try to load the appropriate bundle containing the back end display code. - */ -Bool QuartzLoadDisplayBundle( - const char *dpyBundleName) -{ - CFBundleRef mainBundle; - CFStringRef bundleName; - CFURLRef bundleURL; - CFBundleRef dpyBundle; - QuartzModeBundleInitPtr bundleInit; - - // Get the main bundle for the application - mainBundle = CFBundleGetMainBundle(); - - // Make CFString from bundle name - bundleName = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, - dpyBundleName, - kCFStringEncodingASCII, - kCFAllocatorNull); - - // Look for the appropriate bundle in the main bundle - bundleURL = CFBundleCopyResourceURL(mainBundle, bundleName, - NULL, NULL); - if (!bundleURL) { - ErrorF("Could not find display mode bundle %s.\n", dpyBundleName); - return FALSE; - } - - // Make a bundle instance using the URLRef - dpyBundle = CFBundleCreate(kCFAllocatorDefault, bundleURL); - - if (!CFBundleLoadExecutable(dpyBundle)) { - ErrorF("Could not load display mode bundle %s.\n", dpyBundleName); - return FALSE; - } - - // Lookup the bundle initialization function - bundleInit = (void *) - CFBundleGetFunctionPointerForName(dpyBundle, - CFSTR("QuartzModeBundleInit")); - if (!bundleInit) { - ErrorF("Could not initialize display mode bundle %s.\n", - dpyBundleName); - return FALSE; - } - if (!bundleInit()) - return FALSE; - - // Release the CF objects - CFRelease(bundleName); - CFRelease(bundleURL); - - return TRUE; -} - -#ifdef GLXEXT -/* - * LoadGlxBundle - * The Quartz mode X server needs to dynamically load the appropriate - * bundle before initializing GLX. - */ -static void LoadGlxBundle(void) -{ - CFBundleRef mainBundle; - CFStringRef bundleName; - CFURLRef bundleURL; - CFBundleRef glxBundle; - - // Get the main bundle for the application - mainBundle = CFBundleGetMainBundle(); - - // Choose the bundle to load - ErrorF("Loading GLX bundle "); - if (/*quartzUseAGL*/0) { - bundleName = CFStringCreateWithCStringNoCopy(kCFAllocatorDefault, - quartzOpenGLBundle, - kCFStringEncodingASCII, - kCFAllocatorNull); - ErrorF("%s (using Apple's OpenGL)\n", quartzOpenGLBundle); - } else { - bundleName = CFSTR("glxMesa.bundle"); - CFRetain(bundleName); // so we can release later - ErrorF("glxMesa.bundle (using Mesa)\n"); - } - - // Look for the appropriate GLX bundle in the main bundle by name - bundleURL = CFBundleCopyResourceURL(mainBundle, bundleName, - NULL, NULL); - if (!bundleURL) { - FatalError("Could not find GLX bundle."); - } - - // Make a bundle instance using the URLRef - glxBundle = CFBundleCreate(kCFAllocatorDefault, bundleURL); - - if (!CFBundleLoadExecutable(glxBundle)) { - FatalError("Could not load GLX bundle."); - } - - // Find the GLX init functions - - - __DarwinglXMesaProvider = (void *) CFBundleGetDataPointerForName( - glxBundle, CFSTR("__glXMesaProvider")); - - GlxPushProvider = (void *) CFBundleGetFunctionPointerForName( - glxBundle, CFSTR("GlxPushProvider")); - - GlxExtensionInit = (void *) CFBundleGetFunctionPointerForName( - glxBundle, CFSTR("GlxExtensionInit")); - - GlxWrapInitVisuals = (void *) CFBundleGetFunctionPointerForName( - glxBundle, CFSTR("GlxWrapInitVisuals")); - - if (!GlxExtensionInit || !GlxWrapInitVisuals) { - FatalError("Could not initialize GLX bundle."); - } - - // Release the CF objects - CFRelease(bundleName); - CFRelease(bundleURL); -} -# endif -#else - -Bool QuartzLoadDisplayBundle(const char *dpyBundleName) -{ - return TRUE; - } - -#endif - -#ifdef GLXEXT -void DarwinGlxPushProvider(void *impl) -{ -#ifndef INXQUARTZ - if (!GlxExtensionInit) - LoadGlxBundle(); -#endif - - GlxPushProvider(impl); -} - -/* - * DarwinGlxExtensionInit - * Initialize the GLX extension. - */ -void DarwinGlxExtensionInit(void) -{ -#ifndef INXQUARTZ - if (!GlxExtensionInit) - LoadGlxBundle(); -#endif - GlxExtensionInit(); -} - - -/* - * DarwinGlxWrapInitVisuals - */ -void DarwinGlxWrapInitVisuals( - miInitVisualsProcPtr *procPtr) -{ -#ifndef INXQUARTZ - if (!GlxWrapInitVisuals) - LoadGlxBundle(); -#endif - GlxWrapInitVisuals(procPtr); -} -#endif - -int DarwinModeProcessArgument( int argc, char *argv[], int i ) -{ - // fullscreen: CoreGraphics full-screen mode - // rootless: Cocoa rootless mode - // quartz: Default, either fullscreen or rootless - - 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], "-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; - } - - return 0; + exit(0); } diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c index 70b740077..45d1a7e0e 100644 --- a/hw/darwin/quartz/xpr/appledri.c +++ b/hw/darwin/quartz/xpr/appledri.c @@ -174,7 +174,7 @@ ProcAppleDRIAuthConnection( rep.authenticated = 1; if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) { - ErrorF("Failed to authenticate %u\n", stuff->magic); + ErrorF("Failed to authenticate %u\n", (unsigned int)stuff->magic); rep.authenticated = 0; } WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep); diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/darwin/quartz/xpr/x-hook.c index 92c174e0b..e38d0edc5 100644 --- a/hw/darwin/quartz/xpr/x-hook.c +++ b/hw/darwin/quartz/xpr/x-hook.c @@ -65,6 +65,7 @@ X_PFX (hook_remove) (x_list *lst, x_hook_function *fun, void *data) } X_PFX (list_free) (to_delete); + return lst; } X_EXTERN void diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index 10d326444..9892bcddf 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -380,7 +380,8 @@ QuartzInitCursor(ScreenPtr pScreen) if (ScreenPriv == NULL) return FALSE; - CURSOR_PRIV(pScreen) = ScreenPriv; + /* CURSOR_PRIV(pScreen) = ScreenPriv; */ + pScreen->devPrivates[darwinCursorScreenIndex].ptr = ScreenPriv; /* override some screen procedures */ ScreenPriv->QueryBestSize = pScreen->QueryBestSize; diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 886ef343f..a625e62a4 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -41,6 +41,9 @@ #include "Xplugin.h" #include "quartz/applewmExt.h" +// From xprFrame.c +WindowPtr xprGetXWindow(xp_window_id wid); + #ifdef DAMAGE # include "damage.h" #endif @@ -84,13 +87,7 @@ eventHandler(unsigned int type, const void *arg, { xp_window_id id = * (xp_window_id *) arg; WindowPtr pWin = xprGetXWindow(id); - BoxRec box; - xp_error retval = xp_get_window_bounds(id, &box); - if (retval != Success) { - ErrorF("Unable to find new bounds for window\n"); - break; - } - QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1); + QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin); } break; diff --git a/hw/darwin/utils/Makefile.am b/hw/darwin/utils/Makefile.am index 11a26111e..911e14d53 100644 --- a/hw/darwin/utils/Makefile.am +++ b/hw/darwin/utils/Makefile.am @@ -7,5 +7,5 @@ dumpkeymap_LDFLAGS = -Wl,-framework,IOKit man1_MANS = dumpkeymap.man EXTRA_DIST = \ - README.txt \ - dumpkeymap.man + README.txt \ + dumpkeymap.man diff --git a/include/dix-config.h.in b/include/dix-config.h.in index d0333878f..6a3af4445 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -145,6 +145,9 @@ /* Define to 1 if you have version 2.2 (or newer) of the drm library */ #undef HAVE_LIBDRM_2_2 +/* Have Quartz */ +#undef XQUARTZ + /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM diff --git a/mi/miinitext.c b/mi/miinitext.c index 6fa180b2f..11e5bae07 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -338,17 +338,10 @@ extern void XFree86DGAExtensionInit(INITARGS); #endif #ifdef GLXEXT typedef struct __GLXprovider __GLXprovider; -#ifdef INXDARWINAPP -extern __GLXprovider* __DarwinglXMesaProvider; -extern void DarwinGlxPushProvider(__GLXprovider *impl); -extern void DarwinGlxExtensionInit(INITARGS); -extern void DarwinGlxWrapInitVisuals(miInitVisualsProcPtr *); -#else extern __GLXprovider __glXMesaProvider; extern void GlxPushProvider(__GLXprovider *impl); extern void GlxExtensionInit(INITARGS); -#endif // INXDARWINAPP -#endif // GLXEXT +#endif #ifdef XF86DRI extern void XFree86DRIExtensionInit(INITARGS); #endif @@ -631,10 +624,6 @@ InitExtensions(argc, argv) #endif #endif #ifdef XFIXES - /* must be before Render to layer DisplayCursor correctly */ - if (!noXFixesExtension) XFixesExtensionInit(); -#endif -#ifdef RENDER if (!noRenderExtension) RenderExtensionInit(); #endif #ifdef RANDR @@ -657,25 +646,15 @@ InitExtensions(argc, argv) #endif #ifdef GLXEXT -#ifdef INXDARWINAPP - DarwinGlxPushProvider(__DarwinglXMesaProvider); - if (!noGlxExtension) DarwinGlxExtensionInit(); -#else GlxPushProvider(&__glXMesaProvider); if (!noGlxExtension) GlxExtensionInit(); #endif -#endif } void InitVisualWrap() { miResetInitVisuals(); -#ifdef GLXEXT -#ifdef INXDARWINAPP - DarwinGlxWrapInitVisuals(&miInitVisualsProc); -#endif -#endif } #else /* XFree86LOADER */ diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 66b930d36..b7f11bd14 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -38,6 +38,10 @@ #include "rootless.h" #include "fb.h" +#ifdef SHAPE +#include "scrnintstr.h" +#endif /* SHAPE */ + #ifdef RENDER #include "picturestr.h" #endif diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h index 9573068b4..055589e79 100644 --- a/miext/rootless/rootlessWindow.h +++ b/miext/rootless/rootlessWindow.h @@ -36,6 +36,7 @@ #include "rootlessCommon.h" +#include Bool RootlessCreateWindow(WindowPtr pWin); Bool RootlessDestroyWindow(WindowPtr pWin); @@ -55,5 +56,7 @@ void RootlessResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib); void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent); void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width); +void RootlessNativeWindowMoved (WindowPtr pWin); +void RootlessNativeWindowStateChanged (xp_window_id id, unsigned int state); #endif From 7f2972d47a5d74fe92268c6d609b1eb6ad845824 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 21 Nov 2007 21:59:59 -0800 Subject: [PATCH 304/454] Darwin: Really add launcher this time --- hw/darwin/launcher/Info.plist | 30 ++ hw/darwin/launcher/X11.icns | Bin 0 -> 65908 bytes .../launcher/X11.xcodeproj/project.pbxproj | 290 ++++++++++++++++++ hw/darwin/launcher/bundle-main.c | 81 +++++ 4 files changed, 401 insertions(+) create mode 100644 hw/darwin/launcher/Info.plist create mode 100644 hw/darwin/launcher/X11.icns create mode 100644 hw/darwin/launcher/X11.xcodeproj/project.pbxproj create mode 100644 hw/darwin/launcher/bundle-main.c diff --git a/hw/darwin/launcher/Info.plist b/hw/darwin/launcher/Info.plist new file mode 100644 index 000000000..b5385b61a --- /dev/null +++ b/hw/darwin/launcher/Info.plist @@ -0,0 +1,30 @@ + + + + + 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/X11.icns b/hw/darwin/launcher/X11.icns new file mode 100644 index 0000000000000000000000000000000000000000..d770e617ddb455d8a499550e712f93a06a69f871 GIT binary patch literal 65908 zcmeFY1z1&E+crAaT6C8PN_Q+^5rTx2NGl;7N{L8Hih!_a79rgoA}xrND5cUNC8Z$U z-8s+2-tN75_xHW$I^XsG@BXiI4)--#jJVhHJY&ug&$GrHPfTqc0SLtDi6cKB06_g- zf)D^b5FkefK=9#YXHR!;Z+~y^*RIJ2An4xN88Cs}=?;QOu#{hE(;LLiuLHe7&9sp|omVbXSU-P&68sNXw{|o>9|FHh= z{8|7=?rUvtZEb69Yj17+nhXF$q=clTWW;2|gy$c?6YKM_h;jcTm(tlWdXAawnvtM9L3KM=j2n~gzj z-v@*~l0W>T*dIj8riD}cc!SVHwjX}K$N?a>EiIg>3Iy92-unMuSmJ+%3ohSgVHKI% z67m8;zcXMJ2>>Mlr`X^pHu&`r+j~c#|0%G71c2he6HG9H_O2J=Cm3)7ET1{RJ1!z;FfxLjve`0L&u+Am48fAFN{j4DKEt7&3Enw}HNUz#I|)@_cvEPRDs- zK;$mw>6kE_U1{~mXBU`70>EpZ9rXQuHItJ)?;T9AgcZT~>}=P22bejp^WH|^IdTNUT%X#9t`GY70D+(n0QtB-cLdr0=mYqJ zJ^)a;v=3DJ0Dho10I}a#+JAWS#AXye^uyWjL z0uZvbhFpg%o29*Fr#NLWOa%klUkB^rdT$s5>g5reI-`!0DF(+>@b8<4stX-refzV=F4iqPZ$}17X zJk+7(=7+j5FEDAVor2oR%;{@fCm^b3r15c-jc z0|kfBID~_kW4x?zID_)`MMee)2|8~sCvAQhh`FoA0Ee@2f6KTaBLjpUXwswLP&UL! zD2U;4ZU}8(8z#@7$iVI2;00y36gF^^* zE^bEET`=7=P*(uo1&CbQeps@#@UXZt&bBcC$YDUK$#6`%#*$tkaf}4s=TwH7d-@#X> z!0xX`?7ljMfwQ8lC@y>^g-!4bbfo3t;$(aW=3e0Bp2EOdCe9!(d~RCDQ!tzE+$?|a z>~EYiFn|`tg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0)6R!Q_(6GVV1^xnDFI;iRVIazC=@b}M#&jUv4ckzkq>j9Mvmp$ftn6gJVSH0IKz#`HmDj)Ng}=#hR50F&IqUI;)N>*fH;T6RL_Xzfvsg1m}8 zuJYjecm1Z;{zm&6To-cDc)# zBn4`qwMZ-D)?=M09zwnxnzq>Wp+C~v4u_f(!vrl_rq88`b;ca16yr=c!fy(CL zH6ri&zGB_81CF?ZOJ)CR(GtGoAn@Kk4QO^6HsdSO2s|0j)1bb7%*obee<&=5(d3^#;f`wnGNI|v$2!e)gQa43MgO2yj z2Dt~nQy5|giqq5kpkn#Zr`fA7f3-C9ilN-}s@9YKz=5`7wKrS>VLrxswnEqHKdOG? z2CWxDHmqcI&X=kq6y1{Kh*+v!!48PiuQdZ zxhXKh3+Ljj8)vhsL4e1`nKmo?Yu4;SMkA!oravTKTEY=cua~A5MHehaJudWZ?LIL% z`oe^VWbWNZDUSz`g3(8RUby0J9%wtk9>dC?G}`=m!}NC(=mak@f9cU#B6?E2Pp38P zipfFfU03fk;*L+giSg61$ik{~-7wEgECcFSiEtvN)m&mkvWzj$19VZSy|V5eIrqZP zjCK~mfbKMO&A^S~_D&NY!{924b!!%MTuNSeoaMH|l +#include +#include + +#include + +#define DEFAULT_APP "/usr/X11/bin/xterm" + +int 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; +} From 4c18ef4331aaee268431a3ba50991f0312b82870 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 31 Oct 2007 03:22:18 -0700 Subject: [PATCH 305/454] Darwin: Workaround for a bug where the holding down Command to make a "fake" button 2 click would actually result in a Command-2 chord. (I.e. it wasn't releasing Command before clicking the fake button.) (cherry picked from commit 0d5dd5dffa4c5ce3f54dfe53720a39d524dc8e37) --- hw/darwin/darwinEvents.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 3d7f268ca..bc3a041a5 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -166,6 +166,9 @@ static void DarwinSimulateMouseClick( int modifierMask) // modifiers used for the fake click { // first fool X into forgetting about the keys + // for some reason, it's not enough to tell X we released the Command key -- + // it has to be the *left* Command key. + if (modifierMask & NX_COMMANDMASK) modifierMask |=NX_DEVICELCMDKEYMASK ; DarwinUpdateModifiers(KeyRelease, modifierMask); // push the mouse button From 606a8dc73d91a198d72d249934dc027a23f4c338 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 31 Oct 2007 03:39:47 -0700 Subject: [PATCH 306/454] Darwin: Trap Deactivate messages and release modifiers to avoid "stuck shift lock" (etc) bugs (cherry picked from commit 2b189a99330eb465fa0d17020fb1db1e38829151) --- hw/darwin/darwinEvents.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index bc3a041a5..06c4cc7dd 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -147,6 +147,16 @@ static void DarwinUpdateModifiers( } } +/* + * DarwinReleaseModifiers + * This hacky function releases all modifier keys. It should be called when X11.app + * is deactivated (kXDarwinDeactivate) to prevent modifiers from getting stuck if they + * are held down during a "context" switch -- otherwise, we would miss the KeyUp. + */ +static void DarwinReleaseModifiers(void) { + xEvent e; + DarwinUpdateModifiers(&e, KeyRelease, COMMAND_MASK(-1) | CONTROL_MASK(-1) | ALTERNATE_MASK(-1) | SHIFT_MASK(-1)); +} /* * DarwinSimulateMouseClick @@ -347,6 +357,9 @@ void ProcessInputEvents(void) { ErrorF("Unexpected XDarwinScrollWheel event in DarwinProcessInputEvents\n"); break; + case kXDarwinDeactivate: + DarwinReleaseModifiers(); + // fall through default: // Check for mode specific event DarwinModeProcessEvent(&xe); From b39edc01a6588697b65f831e8ab1dbb24cbe7b24 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 31 Oct 2007 23:46:50 -0700 Subject: [PATCH 307/454] Darwin: Swap modifier keys for buttons 2 and 3 -- now Option-click is the middle click (cherry picked from commit 0aa61293b62aeb69a93b2035d0aef8644343eed3) --- hw/darwin/darwin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index 22e133872..a4ec002e8 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -99,8 +99,8 @@ int darwinSyncKeymap = FALSE; int darwinSwapAltMeta = FALSE; // modifier masks for faking mouse buttons -int darwinFakeMouse2Mask = NX_COMMANDMASK; -int darwinFakeMouse3Mask = NX_ALTERNATEMASK; +int darwinFakeMouse2Mask = NX_ALTERNATEMASK; +int darwinFakeMouse3Mask = NX_COMMANDMASK; // devices DeviceIntPtr darwinPointer = NULL; From 01b70afaac0990b41d1fb6fadbfd64df1486b669 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sat, 3 Nov 2007 05:34:19 -0700 Subject: [PATCH 308/454] Darwin: Initial support for Spaces -- if you use Expose to drag an X11 window to another Space, it will work correctly (as opposed to just leaving a ghost window). We accomplish this by listening for the notification from Xplugin that our window has been moved, and then we ask X11 to move the window to the new location. (cherry picked from commit 2d50ea8013e7c1639d570e227b53b037fb567565) --- hw/darwin/quartz/quartz.c | 12 ++++++++++++ hw/darwin/quartz/xpr/xprScreen.c | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 3374baaf8..0bbbada1f 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -426,6 +426,18 @@ void DarwinModeProcessEvent( RootlessOrderAllWindows(); break; + case kXDarwinWindowState: + ErrorF("kXDarwinWindowState\n"); + break; + case kXDarwinWindowMoved: { + WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0; + short x = xe->u.clientMessage.u.l.longs1, + y = xe->u.clientMessage.u.l.longs2; + ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y); + RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove); + } + break; + default: ErrorF("Unknown application defined event type %d.\n", xe->u.u.type); } diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index a625e62a4..674a268ad 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -87,7 +87,13 @@ eventHandler(unsigned int type, const void *arg, { xp_window_id id = * (xp_window_id *) arg; WindowPtr pWin = xprGetXWindow(id); - QuartzMessageServerThread(kXDarwinWindowMoved, 1, pWin); + BoxRec box; + xp_error retval = xp_get_window_bounds(id, &box); + if (retval != Success) { + ErrorF("Unable to find new bounds for window\n"); + break; + } + QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1); } break; From 28e73e99a9a59223963312c5dd43ce5566d1db9d Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 8 Nov 2007 22:12:41 -0800 Subject: [PATCH 309/454] Darwin: Adding "fake RandR" support from old X11.app (cherry picked from commit 633490c4e8dab30af7ecbe1bef076c22ad5f5da9) --- hw/darwin/quartz/quartz.c | 83 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 3 deletions(-) diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 0bbbada1f..ac1c347d1 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -54,6 +54,8 @@ #include #include +#define FAKE_RANDR 1 + // Shared global variables for Quartz modes int quartzEventWriteFD = -1; int quartzStartClients = 1; @@ -69,6 +71,30 @@ int noPseudoramiXExtension = FALSE; QuartzModeProcsPtr quartzProcs = NULL; const char *quartzOpenGLBundle = NULL; +#if defined(RANDR) && !defined(FAKE_RANDR) +Bool DarwinModeRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) { + return FALSE; +} + +Bool DarwinModeRandRSetConfig (ScreenPtr pScreen, + Rotation randr, + int rate, + RRScreenSizePtr pSize) { + return FALSE; +} + +Bool DarwinModeRandRInit (ScreenPtr pScreen) { + rrScrPrivPtr pScrPriv; + + if (!RRScreenInit (pScreen)) return FALSE; + + pScrPriv = rrGetScrPriv(pScreen); + pScrPriv->rrGetInfo = DarwinModeRandRGetInfo; + pScrPriv->rrSetConfig = DarwinModeRandRSetConfig; + return TRUE; +} +#endif + /* =========================================================================== @@ -170,6 +196,51 @@ void DarwinModeInitInput( } +#ifdef FAKE_RANDR +extern char *ConnectionInfo; + +static int padlength[4] = {0, 3, 2, 1}; + +static void +RREditConnectionInfo (ScreenPtr pScreen) +{ + xConnSetup *connSetup; + char *vendor; + xPixmapFormat *formats; + xWindowRoot *root; + xDepth *depth; + xVisualType *visual; + int screen = 0; + int d; + + connSetup = (xConnSetup *) ConnectionInfo; + vendor = (char *) connSetup + sizeof (xConnSetup); + formats = (xPixmapFormat *) ((char *) vendor + + connSetup->nbytesVendor + + padlength[connSetup->nbytesVendor & 3]); + root = (xWindowRoot *) ((char *) formats + + sizeof (xPixmapFormat) * screenInfo.numPixmapFormats); + while (screen != pScreen->myNum) + { + depth = (xDepth *) ((char *) root + + sizeof (xWindowRoot)); + for (d = 0; d < root->nDepths; d++) + { + visual = (xVisualType *) ((char *) depth + + sizeof (xDepth)); + depth = (xDepth *) ((char *) visual + + depth->nVisuals * sizeof (xVisualType)); + } + root = (xWindowRoot *) ((char *) depth); + screen++; + } + root->pixWidth = pScreen->width; + root->pixHeight = pScreen->height; + root->mmWidth = pScreen->mmWidth; + root->mmHeight = pScreen->mmHeight; +} +#endif + /* * QuartzUpdateScreens * Adjust for screen arrangement changes. @@ -181,6 +252,7 @@ static void QuartzUpdateScreens(void) int x, y, width, height, sx, sy; xEvent e; + ErrorF("QuartzUpdateScreens()\n"); if (noPseudoramiXExtension || screenInfo.numScreens != 1) { /* FIXME: if not using Xinerama, we have multiple screens, and @@ -202,8 +274,11 @@ static void QuartzUpdateScreens(void) pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height); pScreen->width = width; pScreen->height = height; - - /* FIXME: should probably do something with RandR here. */ + +#ifndef FAKE_RANDR + if(!DarwinModeRandRInit(pScreen)) + FatalError("Failed to init RandR extension.\n"); +#endif DarwinAdjustScreenOrigins(&screenInfo); quartzProcs->UpdateScreen(pScreen); @@ -231,7 +306,9 @@ static void QuartzUpdateScreens(void) e.u.configureNotify.override = pRoot->overrideRedirect; DeliverEvents(pRoot, &e, 1, NullWindow); - /* FIXME: Should we use RREditConnectionInfo(pScreen)? */ +#ifdef FAKE_RANDR + RREditConnectionInfo(pScreen); +#endif } From 512dee90878e552ad1b2bb5b27366707f6464f28 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 8 Nov 2007 22:17:38 -0800 Subject: [PATCH 310/454] Darwin: fix for spurious "Are you sure you want to quit?" message (cherry picked from commit 30cbfc786e4fedda3fe070bacceabe1d9212d00b) --- hw/darwin/quartz/quartz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index ac1c347d1..8565e347e 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -189,6 +189,7 @@ void DarwinModeInitInput( int argc, char **argv ) { + X11ApplicationSetCanQuit(1); X11ApplicationServerReady(); // Do final display mode specific initialization before handling events if (quartzProcs->InitInput) From 8358334180a4f8c1e73fc5647a62bcd3539dee45 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sun, 11 Nov 2007 04:30:00 -0800 Subject: [PATCH 311/454] Darwin: Fixed the call to xp_init so that we now receive Motion notifications even if X is not the active application. fixes xeyes dead until window activation (cherry picked from commit c7573379a85a1480cc51650075078e41dafe56af) --- hw/darwin/quartz/xpr/xprScreen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 674a268ad..2db249f45 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -231,7 +231,8 @@ xprDisplayInit(void) else darwinScreensFound = 1; - if (xp_init(XP_IN_BACKGROUND | XP_NO_DEFERRED_UPDATES) != Success) + if (xp_init(XP_BACKGROUND_EVENTS | XP_NO_DEFERRED_UPDATES) != Success) + { FatalError("Could not initialize the Xplugin library."); xp_select_events(XP_EVENT_DISPLAY_CHANGED From f5f833b80609f1f98c93113183bd2b1bab3bfec9 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sun, 11 Nov 2007 04:30:34 -0800 Subject: [PATCH 312/454] Darwin: These changes are necessary, yet not sufficient, to get 8-bit indexed color mode working in Xquartz. (cherry picked from commit a415f62f5289fae99ea9b0038d21fad7695b1336) --- miext/rootless/rootlessCommon.c | 36 ++++++++ miext/rootless/rootlessCommon.h | 18 ++++ miext/rootless/rootlessScreen.c | 65 ++++++++++++++ miext/rootless/rootlessWindow.c | 146 +++++++++++++++++++++++++++++--- 4 files changed, 251 insertions(+), 14 deletions(-) diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c index 9cbb7fa1b..03842e4be 100644 --- a/miext/rootless/rootlessCommon.c +++ b/miext/rootless/rootlessCommon.c @@ -37,6 +37,7 @@ #include /* For CHAR_BIT */ #include "rootlessCommon.h" +#include "colormapst.h" unsigned int rootless_CopyBytes_threshold = 0; unsigned int rootless_FillBytes_threshold = 0; @@ -98,6 +99,41 @@ IsFramedWindow(WindowPtr pWin) return (top && WINREC(top)); } +Bool +RootlessResolveColormap (ScreenPtr pScreen, int first_color, + int n_colors, uint32_t *colors) +{ + int last, i; + ColormapPtr map; + + map = RootlessGetColormap (pScreen); + if (map == NULL || map->class != PseudoColor) return FALSE; + + last = MIN (map->pVisual->ColormapEntries, first_color + n_colors); + for (i = MAX (0, first_color); i < last; i++) { + Entry *ent = map->red + i; + uint16_t red, green, blue; + + if (!ent->refcnt) continue; + if (ent->fShared) { + red = ent->co.shco.red->color; + green = ent->co.shco.green->color; + blue = ent->co.shco.blue->color; + } else { + red = ent->co.local.red; + green = ent->co.local.green; + blue = ent->co.local.blue; + } + + colors[i - first_color] = (0xFF000000UL + | ((uint32_t) red & 0xff00) << 8 + | (green & 0xff00) + | (blue >> 8)); + } + + return TRUE; +} + /* * RootlessStartDrawing diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index b7f11bd14..d6a0161ce 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -32,6 +32,7 @@ #include #endif +#include #ifndef _ROOTLESSCOMMON_H #define _ROOTLESSCOMMON_H @@ -106,13 +107,20 @@ typedef struct _RootlessScreenRec { GlyphsProcPtr Glyphs; #endif + InstallColormapProcPtr InstallColormap; + UninstallColormapProcPtr UninstallColormap; + StoreColorsProcPtr StoreColors; + void *pixmap_data; unsigned int pixmap_data_size; + ColormapPtr colormap; + void *redisplay_timer; unsigned int redisplay_timer_set :1; unsigned int redisplay_queued :1; unsigned int redisplay_expired :1; + unsigned int colormap_changed :1; } RootlessScreenRec, *RootlessScreenPtr; @@ -253,6 +261,16 @@ void RootlessRedisplayScreen(ScreenPtr pScreen); void RootlessQueueRedisplay(ScreenPtr pScreen); +/* Return the colormap currently installed on the given screen. */ +ColormapPtr RootlessGetColormap (ScreenPtr pScreen); + +/* Convert colormap to ARGB. */ +Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color, + int n_colors, uint32_t *colors); + +void RootlessFlushWindowColormap (WindowPtr pWin); +void RootlessFlushScreenColormaps (ScreenPtr pScreen); + // Move a window to its proper location on the screen. void RootlessRepositionWindow(WindowPtr pWin); diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index 489d3fb23..6b54042a8 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -42,6 +42,7 @@ #include "propertyst.h" #include "mivalidate.h" #include "picturestr.h" +#include "colormapst.h" #include #include @@ -469,6 +470,67 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, return result; } +ColormapPtr +RootlessGetColormap (ScreenPtr pScreen) +{ + RootlessScreenRec *s = SCREENREC (pScreen); + + return s->colormap; +} + +static void +RootlessInstallColormap (ColormapPtr pMap) +{ + ScreenPtr pScreen = pMap->pScreen; + RootlessScreenRec *s = SCREENREC (pScreen); + + SCREEN_UNWRAP(pScreen, InstallColormap); + + if (s->colormap != pMap) { + s->colormap = pMap; + s->colormap_changed = TRUE; + RootlessQueueRedisplay (pScreen); + } + + pScreen->InstallColormap (pMap); + + SCREEN_WRAP (pScreen, InstallColormap); +} + +static void +RootlessUninstallColormap (ColormapPtr pMap) +{ + ScreenPtr pScreen = pMap->pScreen; + RootlessScreenRec *s = SCREENREC (pScreen); + + SCREEN_UNWRAP(pScreen, UninstallColormap); + + if (s->colormap == pMap) + s->colormap = NULL; + + pScreen->UninstallColormap (pMap); + + SCREEN_WRAP(pScreen, UninstallColormap); +} + +static void +RootlessStoreColors (ColormapPtr pMap, int ndef, xColorItem *pdef) +{ + ScreenPtr pScreen = pMap->pScreen; + RootlessScreenRec *s = SCREENREC (pScreen); + + SCREEN_UNWRAP(pScreen, StoreColors); + + if (s->colormap == pMap && ndef > 0) { + s->colormap_changed = TRUE; + RootlessQueueRedisplay (pScreen); + } + + pScreen->StoreColors (pMap, ndef, pdef); + + SCREEN_WRAP(pScreen, StoreColors); +} + static CARD32 RootlessRedisplayCallback(OsTimerPtr timer, CARD32 time, void *arg) @@ -614,6 +676,9 @@ RootlessWrap(ScreenPtr pScreen) WRAP(MarkOverlappedWindows); WRAP(ValidateTree); WRAP(ChangeWindowAttributes); + WRAP(InstallColormap); + WRAP(UninstallColormap); + WRAP(StoreColors); #ifdef SHAPE WRAP(SetShape); diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 89c02f8c7..3074a3fc5 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -445,6 +445,12 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec) } +Bool +RootlessColormapCallback (void *data, int first_color, int n_colors, uint32_t *colors) +{ + return RootlessResolveColormap (data, first_color, n_colors, colors); +} + /* * RootlessEnsureFrame * Make sure the given window is framed. If the window doesn't have a @@ -503,6 +509,9 @@ RootlessEnsureFrame(WindowPtr pWin) return NULL; } + if (pWin->drawable.depth == 8) + RootlessFlushWindowColormap(pWin); + #ifdef SHAPE if (pShape != NULL) REGION_UNINIT(pScreen, &shape); @@ -1455,6 +1464,115 @@ out: } } + +void +RootlessFlushWindowColormap (WindowPtr pWin) +{ + RootlessWindowRec *winRec = WINREC (pWin); + xp_window_changes wc; + + if (winRec == NULL) + return; + + RootlessStopDrawing (pWin, FALSE); + + /* This is how we tell xp that the colormap may have changed. */ + + wc.colormap = RootlessColormapCallback; + wc.colormap_data = pWin->drawable.pScreen; + + configure_window (winRec->wid, XP_COLORMAP, &wc); +} + +/* + * SetPixmapOfAncestors + * Set the Pixmaps on all ParentRelative windows up the ancestor chain. + */ +static void +SetPixmapOfAncestors(WindowPtr pWin) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr topWin = TopLevelParent(pWin); + RootlessWindowRec *topWinRec = WINREC(topWin); + + while (pWin->backgroundState == ParentRelative) { + if (pWin == topWin) { + // disallow ParentRelative background state on top level + XID pixel = 0; + ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); + RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin); + break; + } + + pWin = pWin->parent; + pScreen->SetWindowPixmap(pWin, topWinRec->pixmap); + } +} + + +/* + * RootlessPaintWindowBackground + */ +void +RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + if (IsRoot(pWin)) + return; + + RL_DEBUG_MSG("paintwindowbackground start (win 0x%x, framed %i) ", + pWin, IsFramedWindow(pWin)); + + if (IsFramedWindow(pWin)) { + RootlessStartDrawing(pWin); + RootlessDamageRegion(pWin, pRegion); + + // For ParentRelative windows, we have to make sure the window + // pixmap is set correctly all the way up the ancestor chain. + if (pWin->backgroundState == ParentRelative) { + SetPixmapOfAncestors(pWin); + } + } + + SCREEN_UNWRAP(pScreen, PaintWindowBackground); + pScreen->PaintWindowBackground(pWin, pRegion, what); + SCREEN_WRAP(pScreen, PaintWindowBackground); + + RL_DEBUG_MSG("paintwindowbackground end\n"); +} + + +/* + * RootlessPaintWindowBorder + */ +void +RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) +{ + RL_DEBUG_MSG("paintwindowborder start (win 0x%x) ", pWin); + + if (IsFramedWindow(pWin)) { + RootlessStartDrawing(pWin); + RootlessDamageRegion(pWin, pRegion); + + // For ParentRelative windows with tiled borders, we have to make + // sure the window pixmap is set correctly all the way up the + // ancestor chain. + if (!pWin->borderIsPixel && + pWin->backgroundState == ParentRelative) + { + SetPixmapOfAncestors(pWin); + } + } + + SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder); + pWin->drawable.pScreen->PaintWindowBorder(pWin, pRegion, what); + SCREEN_WRAP(pWin->drawable.pScreen, PaintWindowBorder); + + RL_DEBUG_MSG("paintwindowborder end\n"); +} + + /* * RootlessChangeBorderWidth * FIXME: untested! @@ -1516,20 +1634,20 @@ RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) void RootlessOrderAllWindows (void) { - int i; - WindowPtr pWin; - - RL_DEBUG_MSG("RootlessOrderAllWindows() "); - for (i = 0; i < screenInfo.numScreens; i++) { - if (screenInfo.screens[i] == NULL) continue; - pWin = WindowTable[i]; - if (pWin == NULL) continue; + int i; + WindowPtr pWin; + + RL_DEBUG_MSG("RootlessOrderAllWindows() "); + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i] == NULL) continue; + pWin = WindowTable[i]; + if (pWin == NULL) continue; - for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { - if (!pWin->realized) continue; - if (RootlessEnsureFrame(pWin) == NULL) continue; - RootlessReorderWindow (pWin); + for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { + if (!pWin->realized) continue; + if (RootlessEnsureFrame(pWin) == NULL) continue; + RootlessReorderWindow (pWin); + } } - } - RL_DEBUG_MSG("RootlessOrderAllWindows() done"); + RL_DEBUG_MSG("RootlessOrderAllWindows() done"); } From 74214a9f42b931f99d83ddb4efb3720881a2de16 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 15 Nov 2007 00:56:54 -0800 Subject: [PATCH 313/454] Darwin: Patch to avert (some) damage / rootless crashes, courtesy of Ken Thomases (cherry picked from commit 148a87ff20aa5e7a6d839610aa14fa1a31505c4a) --- miext/rootless/rootless.h | 1 - miext/rootless/rootlessCommon.c | 45 ++++++++++++++++++++++++++++++--- miext/rootless/rootlessCommon.h | 1 + miext/rootless/rootlessScreen.c | 5 ++++ miext/rootless/rootlessWindow.c | 1 + 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h index b4a5b2a3d..5224dca2b 100644 --- a/miext/rootless/rootless.h +++ b/miext/rootless/rootless.h @@ -66,7 +66,6 @@ typedef struct _RootlessWindowRec { int bytesPerRow; PixmapPtr pixmap; - PixmapPtr oldPixmap; #ifdef ROOTLESS_TRACK_DAMAGE RegionRec damage; diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c index 03842e4be..562f65577 100644 --- a/miext/rootless/rootlessCommon.c +++ b/miext/rootless/rootlessCommon.c @@ -172,8 +172,24 @@ void RootlessStartDrawing(WindowPtr pWindow) winRec->is_drawing = TRUE; } - winRec->oldPixmap = pScreen->GetWindowPixmap(pWindow); - pScreen->SetWindowPixmap(pWindow, winRec->pixmap); + PixmapPtr curPixmap = pScreen->GetWindowPixmap(pWindow); + if (curPixmap == winRec->pixmap) + { + RL_DEBUG_MSG("Window %p already has winRec->pixmap %p; not pushing\n", pWindow, winRec->pixmap); + } + else + { + PixmapPtr oldPixmap = pWindow->devPrivates[rootlessWindowOldPixmapPrivateIndex].ptr; + if (oldPixmap != NULL) + { + if (oldPixmap == curPixmap) + RL_DEBUG_MSG("Window %p's curPixmap %p is the same as its oldPixmap; strange\n", pWindow, curPixmap); + else + RL_DEBUG_MSG("Window %p's existing oldPixmap %p being lost!\n", pWindow, oldPixmap); + } + pWindow->devPrivates[rootlessWindowOldPixmapPrivateIndex].ptr = curPixmap; + pScreen->SetWindowPixmap(pWindow, winRec->pixmap); + } } @@ -182,6 +198,29 @@ void RootlessStartDrawing(WindowPtr pWindow) * Stop drawing to a window's backing buffer. If flush is true, * damaged regions are flushed to the screen. */ +static int RestorePreDrawingPixmapVisitor(WindowPtr pWindow, pointer data) +{ + RootlessWindowRec *winRec = (RootlessWindowRec*)data; + ScreenPtr pScreen = pWindow->drawable.pScreen; + PixmapPtr exPixmap = pScreen->GetWindowPixmap(pWindow); + PixmapPtr oldPixmap = pWindow->devPrivates[rootlessWindowOldPixmapPrivateIndex].ptr; + if (oldPixmap == NULL) + { + if (exPixmap == winRec->pixmap) + RL_DEBUG_MSG("Window %p appears to be in drawing mode (ex-pixmap %p equals winRec->pixmap, which is being freed) but has no oldPixmap!\n", pWindow, exPixmap); + } + else + { + if (exPixmap != winRec->pixmap) + RL_DEBUG_MSG("Window %p appears to be in drawing mode (oldPixmap %p) but ex-pixmap %p not winRec->pixmap %p!\n", pWindow, oldPixmap, exPixmap, winRec->pixmap); + if (oldPixmap == winRec->pixmap) + RL_DEBUG_MSG("Window %p's oldPixmap %p is winRec->pixmap, which has just been freed!\n", pWindow, oldPixmap); + pScreen->SetWindowPixmap(pWindow, oldPixmap); + pWindow->devPrivates[rootlessWindowOldPixmapPrivateIndex].ptr = NULL; + } + return WT_WALKCHILDREN; +} + void RootlessStopDrawing(WindowPtr pWindow, Bool flush) { ScreenPtr pScreen = pWindow->drawable.pScreen; @@ -198,7 +237,7 @@ void RootlessStopDrawing(WindowPtr pWindow, Bool flush) SCREENREC(pScreen)->imp->StopDrawing(winRec->wid, flush); FreeScratchPixmapHeader(winRec->pixmap); - pScreen->SetWindowPixmap(pWindow, winRec->oldPixmap); + TraverseTree(top, RestorePreDrawingPixmapVisitor, (pointer)winRec); winRec->pixmap = NULL; winRec->is_drawing = FALSE; diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index d6a0161ce..fd8725a0c 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -60,6 +60,7 @@ extern int rootlessGCPrivateIndex; extern int rootlessScreenPrivateIndex; extern int rootlessWindowPrivateIndex; +extern int rootlessWindowOldPixmapPrivateIndex; // RootlessGCRec: private per-gc data diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index 6b54042a8..538b698c8 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -65,6 +65,7 @@ extern Bool RootlessCreateGC(GCPtr pGC); int rootlessGCPrivateIndex = -1; int rootlessScreenPrivateIndex = -1; int rootlessWindowPrivateIndex = -1; +int rootlessWindowOldPixmapPrivateIndex = -1; /* @@ -618,6 +619,8 @@ RootlessAllocatePrivates(ScreenPtr pScreen) if (rootlessGCPrivateIndex == -1) return FALSE; rootlessWindowPrivateIndex = AllocateWindowPrivateIndex(); if (rootlessWindowPrivateIndex == -1) return FALSE; + rootlessWindowOldPixmapPrivateIndex = AllocateWindowPrivateIndex(); + if (rootlessWindowOldPixmapPrivateIndex == -1) return FALSE; rootlessGeneration = serverGeneration; } @@ -627,6 +630,8 @@ RootlessAllocatePrivates(ScreenPtr pScreen) return FALSE; if (!AllocateWindowPrivate(pScreen, rootlessWindowPrivateIndex, 0)) return FALSE; + if (!AllocateWindowPrivate(pScreen, rootlessWindowOldPixmapPrivateIndex, 0)) + return FALSE; s = xalloc(sizeof(RootlessScreenRec)); if (! s) return FALSE; diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 3074a3fc5..14bc67452 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -198,6 +198,7 @@ RootlessCreateWindow(WindowPtr pWin) RegionRec saveRoot; WINREC(pWin) = NULL; + pWin->devPrivates[rootlessWindowOldPixmapPrivateIndex].ptr = NULL; SCREEN_UNWRAP(pWin->drawable.pScreen, CreateWindow); From 8486f8af91b477c7bcb8438a0e9a72d0c11d1d63 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Thu, 15 Nov 2007 02:25:50 -0800 Subject: [PATCH 314/454] Darwin: Added a lightweight debugging facility to support troubleshooting (for example) the stuck modifier key issue (cherry picked from commit 0e0b452d10c0af55497c3299b5f3db45d5b381cb) --- hw/darwin/darwin.c | 18 ++++++++++++++++++ hw/darwin/darwin.h | 10 ++++++++++ 2 files changed, 28 insertions(+) diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index a4ec002e8..a772218fe 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -75,6 +75,10 @@ #include "darwin.h" #include "darwinClut8.h" +#ifdef ENABLE_DEBUG_LOG +FILE *debug_log_fp = NULL; +#endif + /* * X server shared global variables */ @@ -652,6 +656,20 @@ void OsVendorInit(void) { if (serverGeneration == 1) { DarwinPrintBanner(); +#ifdef ENABLE_DEBUG_LOG + { + char *home_dir=NULL, *log_file_path=NULL; + home_dir = getenv("HOME"); + if (home_dir) asprintf(&log_file_path, "%s/%s", home_dir, DEBUG_LOG_NAME); + if (log_file_path) { + if (!access(log_file_path, F_OK)) { + debug_log_fp = fopen(log_file_path, "a"); + if (debug_log_fp) ErrorF("Debug logging enabled to %s\n", log_file_path); + } + free(log_file_path); + } + } +#endif } // Find the full path to the keymapping file. diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index 587ba1cc6..646bb2488 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -157,4 +157,14 @@ enum { kXDarwinWindowMoved // window has moved on screen }; +#define ENABLE_DEBUG_LOG 1 + +#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 ) +#else +#define DEBUG_LOG(msg, args...) +#endif + #endif /* _DARWIN_H */ From 829b6641bd64c352e1e8a7c619f84dedbdb07a09 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sun, 18 Nov 2007 17:43:40 -0800 Subject: [PATCH 315/454] Darwin: Disabled ALT_IS_MODE_SWITCH (cherry picked from commit fd181254f85543558190140787dc7b41f6cf90db) --- hw/darwin/darwinKeyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index 4e7a136d6..932cdd56f 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -61,7 +61,7 @@ #undef DUMP_DARWIN_KEYMAP /* Define this to use Alt for Mode_switch. */ -#define ALT_IS_MODE_SWITCH 1 +//#define ALT_IS_MODE_SWITCH 1 #include #include From 13666e287c347aab2a5e9d8ee5f6bb29b9b85171 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sun, 18 Nov 2007 17:44:12 -0800 Subject: [PATCH 316/454] Darwin: Added some DEBUG_LOG sauce to the XP_EVENT handling code (cherry picked from commit ec84a4cef66a2b46ed71f9758c434ea629d2f270) --- hw/darwin/quartz/xpr/xprScreen.c | 53 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 2db249f45..57a60a20b 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -63,26 +63,24 @@ static void eventHandler(unsigned int type, const void *arg, unsigned int arg_size, void *data) { - switch (type) - { + switch (type) { case XP_EVENT_DISPLAY_CHANGED: - // ErrorF("XP_EVENT_DISPLAY_MOVED\n"); - QuartzMessageServerThread(kXDarwinDisplayChanged, 0); - break; + DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n"); + QuartzMessageServerThread(kXDarwinDisplayChanged, 0); + break; case XP_EVENT_WINDOW_STATE_CHANGED: - // ErrorF("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; + 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: - // ErrorF("XP_EVENT_WINDOW_MOVED\n"); + DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n"); if (arg_size == sizeof(xp_window_id)) { xp_window_id id = * (xp_window_id *) arg; @@ -98,20 +96,23 @@ eventHandler(unsigned int type, const void *arg, break; case XP_EVENT_SURFACE_DESTROYED: + DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n"); case XP_EVENT_SURFACE_CHANGED: - // ErrorF("XP_EVENT_SURFACE_MOVED\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); + 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 602de4f70b6f4aab93b514f3a01917bd5d4ad640 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 21 Nov 2007 16:53:10 -0800 Subject: [PATCH 317/454] Darwin: Use UTF8String since lossyCString is deprecated (cherry picked from commit 1786f9464af51ff606a612aec6fe420fa9688a28) --- hw/darwin/quartz/quartzCocoa.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m index 46a982849..48cadc60c 100644 --- a/hw/darwin/quartz/quartzCocoa.m +++ b/hw/darwin/quartz/quartzCocoa.m @@ -94,7 +94,7 @@ char *QuartzReadCocoaPasteboard(void) char *buffer; if (! string) return NULL; - buffer = (char *) [string lossyCString]; + buffer = (char *) [string UTF8String]; text = (char *) malloc(strlen(buffer)+1); if (text) strcpy(text, buffer); From 3a2f714eea475a13cde65921e24c7ee3f70ffc3c Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 21 Nov 2007 23:30:37 -0800 Subject: [PATCH 318/454] Darwin: Removed .svn dir --- .../apple/English.lproj/main.nib/.svn/entries | 65 ---- .../apple/English.lproj/main.nib/.svn/format | 1 - .../.svn/prop-base/keyedobjects.nib.svn-base | 5 - .../.svn/text-base/classes.nib.svn-base | 318 ------------------ .../main.nib/.svn/text-base/info.nib.svn-base | 18 - .../.svn/text-base/keyedobjects.nib.svn-base | Bin 30865 -> 0 bytes 6 files changed, 407 deletions(-) delete mode 100644 hw/darwin/apple/English.lproj/main.nib/.svn/entries delete mode 100644 hw/darwin/apple/English.lproj/main.nib/.svn/format delete mode 100644 hw/darwin/apple/English.lproj/main.nib/.svn/prop-base/keyedobjects.nib.svn-base delete mode 100644 hw/darwin/apple/English.lproj/main.nib/.svn/text-base/classes.nib.svn-base delete mode 100644 hw/darwin/apple/English.lproj/main.nib/.svn/text-base/info.nib.svn-base delete mode 100644 hw/darwin/apple/English.lproj/main.nib/.svn/text-base/keyedobjects.nib.svn-base diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/entries b/hw/darwin/apple/English.lproj/main.nib/.svn/entries deleted file mode 100644 index 95a15f220..000000000 --- a/hw/darwin/apple/English.lproj/main.nib/.svn/entries +++ /dev/null @@ -1,65 +0,0 @@ -8 - -dir -29110 -svn+ssh://src.apple.com/svn/BSD/X11server/trunk/darwin/apple/English.lproj/main.nib -svn+ssh://src.apple.com/svn/BSD - - - -2007-02-03T03:06:20.842932Z -28761 -bbyer - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -e92bca22-270c-0410-9cea-e3f1106b6a1c - -info.nib -file - - - - -2007-02-27T01:00:07.000000Z -456347804c516786b1d1339ce2ef50a2 -2007-02-03T03:06:20.842932Z -28761 -bbyer - -keyedobjects.nib -file - - - - -2007-02-27T01:00:07.000000Z -eb3010372b09768c846df0d996cfdd8d -2007-02-03T03:06:20.842932Z -28761 -bbyer -has-props - -classes.nib -file - - - - -2007-02-27T01:00:07.000000Z -0ae2660c3afabbd5aa02fc34712c96e6 -2007-02-03T03:06:20.842932Z -28761 -bbyer - diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/format b/hw/darwin/apple/English.lproj/main.nib/.svn/format deleted file mode 100644 index 45a4fb75d..000000000 --- a/hw/darwin/apple/English.lproj/main.nib/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/prop-base/keyedobjects.nib.svn-base b/hw/darwin/apple/English.lproj/main.nib/.svn/prop-base/keyedobjects.nib.svn-base deleted file mode 100644 index 5e9587e65..000000000 --- a/hw/darwin/apple/English.lproj/main.nib/.svn/prop-base/keyedobjects.nib.svn-base +++ /dev/null @@ -1,5 +0,0 @@ -K 13 -svn:mime-type -V 24 -application/octet-stream -END diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/classes.nib.svn-base b/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/classes.nib.svn-base deleted file mode 100644 index a82159bd5..000000000 --- a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/classes.nib.svn-base +++ /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/darwin/apple/English.lproj/main.nib/.svn/text-base/info.nib.svn-base b/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/info.nib.svn-base deleted file mode 100644 index 88bc6260d..000000000 --- a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/info.nib.svn-base +++ /dev/null @@ -1,18 +0,0 @@ - - - - - IBFramework Version - 588 - IBOpenObjects - - 244 - 29 - 423 - - IBSystem Version - 9A356 - targetFramework - IBCocoaFramework - - diff --git a/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/keyedobjects.nib.svn-base b/hw/darwin/apple/English.lproj/main.nib/.svn/text-base/keyedobjects.nib.svn-base deleted file mode 100644 index 8b31450ff5c9a6357f70baf56268899dee194109..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30865 zcmd?R33wF6_BUKrz0CAnF*N*TSTi6aR~x0 z2&l*oBA_Co;DR8ih#(>&i;CjD?}!`lKGi*wOd{NS-}^n^|M|Z6MR}O%>8?8G)TvYF z{C-v4(B9hOaAsw_10XETI9lws+Bm1ZeSDm?qp`VVrrc2%XK$D$ zH#!}D04`i}9B6=c(y*!w^c5?BT+;dO8*906?)QKZak!Z{Tn6BK!;f z4X+@87^FqMC;$bbNEC&lQ5;G|X($inqe3(g6{8AdM1#={XauT8W;6j=(2b}WzK>dv z4RxZKXcn4{=Ai}XHgq?9A1y}rAq#pCtwZb42DAk|iFTl;&`$I$+KXO7`_O*$3Oa(0 zqBqeo^bUFteF%O=AED3Cx9B_cJ^BH@kA6jeFpxov$apb6j4uV@6SJGy$LwcbW!_-kWZq>?F{hdL zm=BrHnXj1dnID*+m|vMoEW@&_j`e3l*)TSmHLyu+8k^1Lu=#8;Tf&yJMz)e2!j538 z*^z85JD#1uTG(l}TwE?Dy<%>_zr>_7Z!UL!7|rI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kQn55<$0 z1Sv|Sp){OE&?p*BDKw78(?ps~88nr?pqZ3K*_1=`DVG-0GFnOB&>C7t8)-9bqaE~b z+DkvsemY2nbeM|hIGv1in{=D*(gS)-W%PnxQKenYe#iE=1MEP% zuHC?HWH+{(+0E?_>{fOgJJfDxhua2H^getvHaeE8P?XD|E<4ft=5 From 5e950123daa167c9ffe289b3bd89e3bd288da0e3 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 21 Nov 2007 23:32:00 -0800 Subject: [PATCH 319/454] Darwin: Removed cvs tags from Xquartz man page --- hw/darwin/Xquartz.man | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/darwin/Xquartz.man b/hw/darwin/Xquartz.man index edac30ee9..37a7f1a26 100644 --- a/hw/darwin/Xquartz.man +++ b/hw/darwin/Xquartz.man @@ -1,5 +1,3 @@ -.\" $XFree86: xc/programs/Xserver/hw/darwin/XDarwin.man,v 1.4 2002/01/09 18:01:58 torrey Exp $ -.\" .TH XQUARTZ 1 __vendorversion__ .SH NAME Xquartz \- X window system server for Quartz operating system From 4d9cef197b12548e0716dab3557e48311519e325 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 00:35:09 -0800 Subject: [PATCH 320/454] Darwin: Misc cleanups to line up with xorg-server-1.2-apple --- hw/darwin/apple/X11.xcodeproj/project.pbxproj | 18 +- hw/darwin/darwinKeyboard.c | 58 +- hw/darwin/quartz/Preferences.h | 137 ---- hw/darwin/quartz/Preferences.m | 598 ------------------ hw/darwin/quartz/X11Application.m | 4 +- hw/darwin/quartz/X11Controller.h | 2 +- hw/darwin/quartz/X11Controller.m | 8 +- hw/darwin/quartz/cr/cr.h | 3 +- hw/darwin/quartz/fullscreen/quartzCursor.c | 2 - hw/darwin/quartz/quartz.c | 12 - hw/darwin/quartz/quartzCursor.c | 4 - hw/darwin/quartz/quartzKeyboard.c | 3 +- hw/darwin/quartz/quartzPasteboard.c | 1 + hw/darwin/quartz/quartzStartup.c | 2 - hw/darwin/quartz/xpr/dri.c | 5 + hw/darwin/quartz/xpr/xpr.h | 3 +- hw/darwin/quartz/xpr/xprAppleWM.c | 3 +- hw/darwin/quartz/xpr/xprScreen.c | 6 +- hw/darwin/utils/README.txt | 4 - hw/darwin/utils/dumpkeymap.man | 2 - 20 files changed, 90 insertions(+), 785 deletions(-) delete mode 100644 hw/darwin/quartz/Preferences.h delete mode 100644 hw/darwin/quartz/Preferences.m diff --git a/hw/darwin/apple/X11.xcodeproj/project.pbxproj b/hw/darwin/apple/X11.xcodeproj/project.pbxproj index 27cab8d06..217f07e52 100644 --- a/hw/darwin/apple/X11.xcodeproj/project.pbxproj +++ b/hw/darwin/apple/X11.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ 527F241F0B5D938C007840A7 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50F4F0A7039D6ACA0E82C0CB /* CoreFoundation.framework */; }; 527F24200B5D938C007840A7 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570C5748047186C400ACF82F /* SystemConfiguration.framework */; }; 527F24370B5D9D89007840A7 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527F24260B5D938C007840A7 /* Info.plist */; }; + 52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -24,6 +25,7 @@ 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; }; + 52D9C0EC0BCDDF6B00CD2AFC /* English */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; 570C5748047186C400ACF82F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = ""; }; /* End PBXFileReference section */ @@ -71,6 +73,7 @@ 20286C2CFDCF999611CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */, 50459C5F038587C60ECA21EC /* X11.icns */, 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */, 02345980000FD03B11CA0E72 /* main.nib */, @@ -146,6 +149,7 @@ 527F24190B5D938C007840A7 /* InfoPlist.strings in Resources */, 527F241A0B5D938C007840A7 /* main.nib in Resources */, 527F241B0B5D938C007840A7 /* X11.icns in Resources */, + 52D9C0ED0BCDDF6B00CD2AFC /* Localizable.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -189,6 +193,14 @@ name = InfoPlist.strings; sourceTree = ""; }; + 52D9C0EB0BCDDF6B00CD2AFC /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 52D9C0EC0BCDDF6B00CD2AFC /* English */, + ); + name = Localizable.strings; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -219,7 +231,7 @@ COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ""; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ""; + HEADER_SEARCH_PATHS = /usr/X11/include; INFOPLIST_FILE = Info.plist; INSTALL_PATH = /usr/X11; LIBRARY_SEARCH_PATHS = /usr/X11/lib; @@ -247,7 +259,7 @@ COPY_PHASE_STRIP = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ""; + HEADER_SEARCH_PATHS = /usr/X11/include; INFOPLIST_FILE = Info.plist; INSTALL_PATH = /usr/X11; LIBRARY_SEARCH_PATHS = /usr/X11/lib; @@ -274,7 +286,7 @@ buildSettings = { FRAMEWORK_SEARCH_PATHS = ""; GCC_SYMBOLS_PRIVATE_EXTERN = NO; - HEADER_SEARCH_PATHS = ""; + HEADER_SEARCH_PATHS = /usr/X11/include; INFOPLIST_FILE = Info.plist; INSTALL_PATH = /usr/X11; LIBRARY_SEARCH_PATHS = /usr/X11/lib; diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index 932cdd56f..efa12b7b7 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -217,7 +217,7 @@ static void DarwinChangeKeyboardControl( DeviceIntPtr device, KeybdCtrl *ctrl ) // keyclick, bell volume / pitch, autorepead, LED's } -static darwinKeyboardInfo keyInfo; +darwinKeyboardInfo keyInfo; static FILE *fref = NULL; static char *inBuffer = NULL; @@ -816,7 +816,7 @@ void DarwinKeyboardInit( assert( darwinParamConnect = NXOpenEventStatus() ); DarwinLoadKeyboardMapping(&keySyms); - + // DarwinKeyboardReload(pDev); /* Initialize the seed, so we don't reload the keymap unnecessarily (and possibly overwrite xinitrc changes) */ DarwinModeSystemKeymapSeed(); @@ -835,6 +835,7 @@ InitModMap(register KeyClassPtr keyc) CARD8 keysPerModifier[8]; CARD8 mask; + // darwinKeyc = keyc; if (keyc->modifierKeyMap != NULL) xfree (keyc->modifierKeyMap); @@ -886,7 +887,7 @@ DarwinKeyboardReload(DeviceIntPtr pDev) memmove(pDev->key->modifierMap, keyInfo.modMap, MAP_LENGTH); InitModMap(pDev->key); - } + } else DEBUG_LOG("SetKeySymsMap=0\n"); SendMappingNotify(MappingKeyboard, MIN_KEYCODE, NUM_KEYCODES, 0); SendMappingNotify(MappingModifier, 0, 0, 0); @@ -935,6 +936,32 @@ int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) return key; } +/* + * DarwinModifierNXMaskToNXKeyCode + * Returns 0 if mask is not a known modifier mask. + */ +int DarwinModifierNXMaskToNXKeyCode(int mask) +{ + switch (mask) { + case NX_ALPHASHIFTMASK: return XK_Caps_Lock; + case NX_SHIFTMASK: ErrorF("Warning: Received NX_SHIFTMASK, treating as NX_DEVICELSHIFTKEYMASK\n"); + case NX_DEVICELSHIFTKEYMASK: return NX_MODIFIERKEY_SHIFT; //XK_Shift_L; + case NX_DEVICERSHIFTKEYMASK: return NX_MODIFIERKEY_RSHIFT; //XK_Shift_R; + case NX_CONTROLMASK: ErrorF("Warning: Received NX_CONTROLMASK, treating as NX_DEVICELCTLKEYMASK\n"); + case NX_DEVICELCTLKEYMASK: return XK_Control_L; + case NX_DEVICERCTLKEYMASK: return XK_Control_R; + case NX_ALTERNATEMASK: ErrorF("Warning: Received NX_ALTERNATEMASK, treating as NX_DEVICELALTKEYMASK\n"); + case NX_DEVICELALTKEYMASK: return XK_Alt_L; + case NX_DEVICERALTKEYMASK: return XK_Alt_R; + case NX_COMMANDMASK: ErrorF("Warning: Received NX_COMMANDMASK, treating as NX_DEVICELCMDKEYMASK\n"); + case NX_DEVICELCMDKEYMASK: return XK_Meta_L; + case NX_DEVICERCMDKEYMASK: return XK_Meta_R; + case NX_NUMERICPADMASK: return XK_Num_Lock; + case NX_HELPMASK: return XK_Help; + case NX_SECONDARYFNMASK: return XK_Control_L; // this seems very wrong, but is what the old code did + } +} + /* * DarwinModifierNXMaskToNXKey * Returns -1 if mask is not a known modifier mask. @@ -970,6 +997,29 @@ int DarwinModifierNXMaskToNXKey(int mask) return -1; } +char * DarwinModifierNXMaskTostring(int mask) +{ + switch (mask) { + case NX_ALPHASHIFTMASK: return "NX_ALPHASHIFTMASK"; + case NX_SHIFTMASK: return "NX_SHIFTMASK"; + case NX_DEVICELSHIFTKEYMASK: return "NX_DEVICELSHIFTKEYMASK"; + case NX_DEVICERSHIFTKEYMASK: return "NX_DEVICERSHIFTKEYMASK"; + case NX_CONTROLMASK: return "NX_CONTROLMASK"; + case NX_DEVICELCTLKEYMASK: return "NX_DEVICELCTLKEYMASK"; + case NX_DEVICERCTLKEYMASK: return "NX_DEVICERCTLKEYMASK"; + case NX_ALTERNATEMASK: return "NX_ALTERNATEMASK"; + case NX_DEVICELALTKEYMASK: return "NX_DEVICELALTKEYMASK"; + case NX_DEVICERALTKEYMASK: return "NX_DEVICERALTKEYMASK"; + case NX_COMMANDMASK: return "NX_COMMANDMASK"; + case NX_DEVICELCMDKEYMASK: return "NX_DEVICELCMDKEYMASK"; + case NX_DEVICERCMDKEYMASK: return "NX_DEVICERCMDKEYMASK"; + case NX_NUMERICPADMASK: return "NX_NUMERICPADMASK"; + case NX_HELPMASK: return "NX_HELPMASK"; + case NX_SECONDARYFNMASK: return "NX_SECONDARYFNMASK"; + } + return "unknown mask"; +} + /* * DarwinModifierNXKeyToNXMask * Returns 0 if key is not a known modifier key. @@ -1020,7 +1070,7 @@ int DarwinModifierStringToNXKey(const char *str) * This allows the ddx layer to prevent some keys from being remapped * as modifier keys. */ -Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) +Bool LegalModifier(unsigned int key, DevicePtr pDev) { return 1; } diff --git a/hw/darwin/quartz/Preferences.h b/hw/darwin/quartz/Preferences.h deleted file mode 100644 index cf43758e7..000000000 --- a/hw/darwin/quartz/Preferences.h +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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. - */ - -#import - -@interface Preferences : NSObject -{ - IBOutlet NSPanel *window; - IBOutlet id displayField; - IBOutlet id dockSwitchButton; - IBOutlet id fakeButton; - IBOutlet id button2ModifiersMatrix; - IBOutlet id button3ModifiersMatrix; - IBOutlet id switchKeyButton; - IBOutlet id keymapFileField; - IBOutlet id modeMatrix; - IBOutlet id modeWindowButton; - IBOutlet id startupHelpButton; - IBOutlet id systemBeepButton; - IBOutlet id mouseAccelChangeButton; - IBOutlet id useXineramaButton; - IBOutlet id addToPathButton; - IBOutlet id addToPathField; - IBOutlet id useDefaultShellMatrix; - IBOutlet id useOtherShellField; - IBOutlet id depthButton; - - BOOL isGettingKeyCode; - int keyCode; - int modifiers; - NSMutableString *switchString; -} - -- (IBAction)close:(id)sender; -- (IBAction)pickFile:(id)sender; -- (IBAction)saveChanges:(id)sender; -- (IBAction)setKey:(id)sender; - -- (BOOL)sendEvent:(NSEvent *)anEvent; - -- (void)awakeFromNib; -- (void)windowWillClose:(NSNotification *)aNotification; - -+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile; -+ (void)setKeymapFile:(NSString *)newFile; -+ (void)setSwitchString:(NSString *)newString; -+ (void)setKeyCode:(int)newKeyCode; -+ (void)setModifiers:(int)newModifiers; -+ (void)setDisplay:(int)newDisplay; -+ (void)setDockSwitch:(BOOL)newDockSwitch; -+ (void)setFakeButtons:(BOOL)newFakeButtons; -+ (void)setButton2Mask:(int)newFakeMask; -+ (void)setButton3Mask:(int)newFakeMask; -+ (void)setMouseAccelChange:(BOOL)newMouseAccelChange; -+ (void)setUseQDCursor:(int)newUseQDCursor; -+ (void)setRootless:(BOOL)newRootless; -+ (void)setUseAGL:(BOOL)newUseAGL; -+ (void)setModeWindow:(BOOL)newModeWindow; -+ (void)setStartupHelp:(BOOL)newStartupHelp; -+ (void)setSystemBeep:(BOOL)newSystemBeep; -+ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs; -+ (void)setXinerama:(BOOL)newXinerama; -+ (void)setAddToPath:(BOOL)newAddToPath; -+ (void)setAddToPathString:(NSString *)newAddToPathString; -+ (void)setUseDefaultShell:(BOOL)newUseDefaultShell; -+ (void)setShellString:(NSString *)newShellString; -+ (void)setDepth:(int)newDepth; -+ (void)setDisplayModeBundles:(NSArray *)newBundles; -+ (void)saveToDisk; - -+ (BOOL)useKeymapFile; -+ (NSString *)keymapFile; -+ (NSString *)switchString; -+ (unsigned int)keyCode; -+ (unsigned int)modifiers; -+ (int)display; -+ (BOOL)dockSwitch; -+ (BOOL)fakeButtons; -+ (int)button2Mask; -+ (int)button3Mask; -+ (BOOL)mouseAccelChange; -+ (int)useQDCursor; -+ (BOOL)rootless; -+ (BOOL)useAGL; -+ (BOOL)modeWindow; -+ (BOOL)startupHelp; -+ (BOOL)systemBeep; -+ (BOOL)enableKeyEquivalents; -+ (BOOL)xinerama; -+ (BOOL)addToPath; -+ (NSString *)addToPathString; -+ (BOOL)useDefaultShell; -+ (NSString *)shellString; -+ (int)depth; -+ (NSArray *)displayModeBundles; - -@end - -// Possible settings for useQDCursor -enum { - qdCursor_Never, // never use QuickDraw cursor - qdCursor_Not8Bit, // don't try to use QuickDraw with 8-bit depth - qdCursor_Always // always try to use QuickDraw cursor -}; - -// Possible settings for depth -enum { - depth_Current, - depth_8Bit, - depth_15Bit, - depth_24Bit -}; diff --git a/hw/darwin/quartz/Preferences.m b/hw/darwin/quartz/Preferences.m deleted file mode 100644 index 0425392ae..000000000 --- a/hw/darwin/quartz/Preferences.m +++ /dev/null @@ -1,598 +0,0 @@ -// -// Preferences.m -// -// This class keeps track of the user preferences. -// -/* - * 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. - */ - -#include - -#import "quartzCommon.h" - -#define BOOL xBOOL -#include "darwin.h" -#undef BOOL - -#import "Preferences.h" - -#include // for modifier masks - -// Macros to build the path name -#ifndef XBINDIR -#define XBINDIR /usr/X11/bin -#endif -#define STR(s) #s -#define XSTRPATH(s) STR(s) - -// Keys for user defaults dictionary -static NSString *X11EnableKeyEquivalentsKey = @"EnableKeyEquivalents"; - - -@implementation Preferences - -+ (void)initialize -{ - // Provide user defaults if needed - NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInt:0], @"Display", - @"YES", @"FakeButtons", - [NSNumber numberWithInt:NX_COMMANDMASK], @"Button2Mask", - [NSNumber numberWithInt:NX_ALTERNATEMASK], @"Button3Mask", - NSLocalizedString(@"USA.keymapping",@""), @"KeymappingFile", - @"YES", @"UseKeymappingFile", - NSLocalizedString(@"Cmd-Opt-a",@""), @"SwitchString", - @"YES", @"UseRootlessMode", - @"YES", @"UseAGLforGLX", - @"YES", @"ShowModePickWindow", - @"YES", @"ShowStartupHelp", - [NSNumber numberWithInt:0], @"SwitchKeyCode", - [NSNumber numberWithInt:(NSCommandKeyMask | NSAlternateKeyMask)], - @"SwitchModifiers", @"NO", @"UseSystemBeep", - @"YES", X11EnableKeyEquivalentsKey, - @"YES", @"DockSwitch", - @"NO", @"AllowMouseAccelChange", - [NSNumber numberWithInt:qdCursor_Not8Bit], @"UseQDCursor", - @"YES", @"Xinerama", - @"YES", @"AddToPath", - [NSString stringWithCString:XSTRPATH(XBINDIR)], @"AddToPathString", - @"YES", @"UseDefaultShell", - @"/bin/tcsh", @"Shell", - [NSNumber numberWithInt:depth_Current], @"Depth", -#ifdef BUILD_XPR - [NSArray arrayWithObjects:@"xpr.bundle", @"cr.bundle", nil], -#else - [NSArray arrayWithObjects:@"cr.bundle", nil], -#endif - @"DisplayModeBundles", nil]; - - [super initialize]; - [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; -} - -// Initialize internal state info of switch key button -- (void)initSwitchKey -{ - keyCode = [Preferences keyCode]; - modifiers = [Preferences modifiers]; - [switchString setString:[Preferences switchString]]; -} - -- (id)init -{ - self = [super init]; - - isGettingKeyCode=NO; - switchString=[[NSMutableString alloc] init]; - [self initSwitchKey]; - - return self; -} - -// Set a modifiers checkbox matrix to match a modifier mask -- (void)resetMatrix:(NSMatrix *)aMatrix withMask:(int)aMask -{ - [aMatrix setState:(aMask & NX_SHIFTMASK) atRow:0 column:0]; - [aMatrix setState:(aMask & NX_CONTROLMASK) atRow:1 column:0]; - [aMatrix setState:(aMask & NX_COMMANDMASK) atRow:2 column:0]; - [aMatrix setState:(aMask & NX_ALTERNATEMASK) atRow:3 column:0]; - [aMatrix setState:(aMask & NX_SECONDARYFNMASK) atRow:4 column:0]; -} - -// Generate a modifiers mask from a modifiers checkbox matrix -- (int)getMaskFromMatrix:(NSMatrix *)aMatrix -{ - int theMask = 0; - - if ([[aMatrix cellAtRow:0 column:0] state]) - theMask |= NX_SHIFTMASK; - if ([[aMatrix cellAtRow:1 column:0] state]) - theMask |= NX_CONTROLMASK; - if ([[aMatrix cellAtRow:2 column:0] state]) - theMask |= NX_COMMANDMASK; - if ([[aMatrix cellAtRow:3 column:0] state]) - theMask |= NX_ALTERNATEMASK; - if ([[aMatrix cellAtRow:4 column:0] state]) - theMask |= NX_SECONDARYFNMASK; - - return theMask; -} - -// Set the window controls to the state in user defaults -- (void)resetWindow -{ - if ([Preferences keymapFile] == nil) - [keymapFileField setStringValue:@" "]; - else - [keymapFileField setStringValue:[Preferences keymapFile]]; - - if ([Preferences switchString] == nil) - [switchKeyButton setTitle:@"--"]; - else - [switchKeyButton setTitle:[Preferences switchString]]; - - [displayField setIntValue:[Preferences display]]; - [dockSwitchButton setIntValue:[Preferences dockSwitch]]; - [fakeButton setIntValue:[Preferences fakeButtons]]; - [self resetMatrix:button2ModifiersMatrix - withMask:[Preferences button2Mask]]; - [self resetMatrix:button3ModifiersMatrix - withMask:[Preferences button3Mask]]; - [modeMatrix setState:[Preferences rootless] atRow:0 column:1]; - [startupHelpButton setIntValue:[Preferences startupHelp]]; - [modeWindowButton setIntValue:[Preferences modeWindow]]; - [systemBeepButton setIntValue:[Preferences systemBeep]]; - [mouseAccelChangeButton setIntValue:[Preferences mouseAccelChange]]; - [useXineramaButton setIntValue:[Preferences xinerama]]; - [addToPathButton setIntValue:[Preferences addToPath]]; - [addToPathField setStringValue:[Preferences addToPathString]]; - [useDefaultShellMatrix setState:![Preferences useDefaultShell] - atRow:1 column:0]; - [useOtherShellField setStringValue:[Preferences shellString]]; - [depthButton selectItemAtIndex:[Preferences depth]]; -} - -- (void)awakeFromNib -{ - [self resetWindow]; -} - -// Preference window delegate -- (void)windowWillClose:(NSNotification *)aNotification -{ - [self resetWindow]; - [self initSwitchKey]; -} - -// User cancelled the changes -- (IBAction)close:(id)sender -{ - [window orderOut:nil]; - [self resetWindow]; // reset window controls - [self initSwitchKey]; // reset switch key state -} - -// Pick keymapping file -- (IBAction)pickFile:(id)sender -{ - int result; - NSArray *fileTypes = [NSArray arrayWithObject:@"keymapping"]; - NSOpenPanel *oPanel = [NSOpenPanel openPanel]; - - [oPanel setAllowsMultipleSelection:NO]; - result = [oPanel runModalForDirectory:@"/System/Library/Keyboards" - file:nil types:fileTypes]; - if (result == NSOKButton) { - [keymapFileField setStringValue:[oPanel filename]]; - } -} - -// User saved changes -- (IBAction)saveChanges:(id)sender -{ - [Preferences setKeyCode:keyCode]; - [Preferences setModifiers:modifiers]; - [Preferences setSwitchString:switchString]; - [Preferences setKeymapFile:[keymapFileField stringValue]]; - [Preferences setUseKeymapFile:YES]; - [Preferences setDisplay:[displayField intValue]]; - [Preferences setDockSwitch:[dockSwitchButton intValue]]; - [Preferences setFakeButtons:[fakeButton intValue]]; - [Preferences setButton2Mask: - [self getMaskFromMatrix:button2ModifiersMatrix]]; - [Preferences setButton3Mask: - [self getMaskFromMatrix:button3ModifiersMatrix]]; - [Preferences setRootless:[[modeMatrix cellAtRow:0 column:1] state]]; - [Preferences setModeWindow:[modeWindowButton intValue]]; - [Preferences setStartupHelp:[startupHelpButton intValue]]; - [Preferences setSystemBeep:[systemBeepButton intValue]]; - [Preferences setMouseAccelChange:[mouseAccelChangeButton intValue]]; - [Preferences setXinerama:[useXineramaButton intValue]]; - [Preferences setAddToPath:[addToPathButton intValue]]; - [Preferences setAddToPathString:[addToPathField stringValue]]; - [Preferences setUseDefaultShell: - [[useDefaultShellMatrix cellAtRow:0 column:0] state]]; - [Preferences setShellString:[useOtherShellField stringValue]]; - [Preferences setDepth:[depthButton indexOfSelectedItem]]; - [Preferences saveToDisk]; - - [window orderOut:nil]; -} - -- (IBAction)setKey:(id)sender -{ - [switchKeyButton setTitle:NSLocalizedString(@"Press key",@"")]; - isGettingKeyCode=YES; - [switchString setString:@""]; -} - -- (BOOL)sendEvent:(NSEvent *)anEvent -{ - if(isGettingKeyCode) { - if([anEvent type]==NSKeyDown) // wait for keyup - return YES; - if([anEvent type]!=NSKeyUp) - return NO; - - if([anEvent modifierFlags] & NSCommandKeyMask) - [switchString appendString:@"Cmd-"]; - if([anEvent modifierFlags] & NSControlKeyMask) - [switchString appendString:@"Ctrl-"]; - if([anEvent modifierFlags] & NSAlternateKeyMask) - [switchString appendString:@"Opt-"]; - if([anEvent modifierFlags] & NSNumericPadKeyMask) // doesn't work - [switchString appendString:@"Num-"]; - if([anEvent modifierFlags] & NSHelpKeyMask) - [switchString appendString:@"Help-"]; - if([anEvent modifierFlags] & NSFunctionKeyMask) // powerbooks only - [switchString appendString:@"Fn-"]; - - [switchString appendString:[anEvent charactersIgnoringModifiers]]; - [switchKeyButton setTitle:switchString]; - - keyCode = [anEvent keyCode]; - modifiers = [anEvent modifierFlags]; - isGettingKeyCode=NO; - - return YES; - } - return NO; -} - -+ (void)setKeymapFile:(NSString *)newFile -{ - [[NSUserDefaults standardUserDefaults] setObject:newFile - forKey:@"KeymappingFile"]; -} - -+ (void)setUseKeymapFile:(BOOL)newUseKeymapFile -{ - [[NSUserDefaults standardUserDefaults] setBool:newUseKeymapFile - forKey:@"UseKeymappingFile"]; -} - -+ (void)setSwitchString:(NSString *)newString -{ - [[NSUserDefaults standardUserDefaults] setObject:newString - forKey:@"SwitchString"]; -} - -+ (void)setKeyCode:(int)newKeyCode -{ - [[NSUserDefaults standardUserDefaults] setInteger:newKeyCode - forKey:@"SwitchKeyCode"]; -} - -+ (void)setModifiers:(int)newModifiers -{ - [[NSUserDefaults standardUserDefaults] setInteger:newModifiers - forKey:@"SwitchModifiers"]; -} - -+ (void)setDisplay:(int)newDisplay -{ - [[NSUserDefaults standardUserDefaults] setInteger:newDisplay - forKey:@"Display"]; -} - -+ (void)setDockSwitch:(BOOL)newDockSwitch -{ - [[NSUserDefaults standardUserDefaults] setBool:newDockSwitch - forKey:@"DockSwitch"]; -} - -+ (void)setFakeButtons:(BOOL)newFakeButtons -{ - [[NSUserDefaults standardUserDefaults] setBool:newFakeButtons - forKey:@"FakeButtons"]; - // Update the setting used by the X server thread - darwinFakeButtons = newFakeButtons; -} - -+ (void)setButton2Mask:(int)newFakeMask -{ - [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask - forKey:@"Button2Mask"]; - // Update the setting used by the X server thread - darwinFakeMouse2Mask = newFakeMask; -} - -+ (void)setButton3Mask:(int)newFakeMask -{ - [[NSUserDefaults standardUserDefaults] setInteger:newFakeMask - forKey:@"Button3Mask"]; - // Update the setting used by the X server thread - darwinFakeMouse3Mask = newFakeMask; -} - -+ (void)setMouseAccelChange:(BOOL)newMouseAccelChange -{ - [[NSUserDefaults standardUserDefaults] setBool:newMouseAccelChange - forKey:@"AllowMouseAccelChange"]; - // Update the setting used by the X server thread - // darwinMouseAccelChange = newMouseAccelChange; -} - -+ (void)setUseQDCursor:(int)newUseQDCursor -{ - [[NSUserDefaults standardUserDefaults] setInteger:newUseQDCursor - forKey:@"UseQDCursor"]; -} - -+ (void)setModeWindow:(BOOL)newModeWindow -{ - [[NSUserDefaults standardUserDefaults] setBool:newModeWindow - forKey:@"ShowModePickWindow"]; -} - -+ (void)setRootless:(BOOL)newRootless -{ - [[NSUserDefaults standardUserDefaults] setBool:newRootless - forKey:@"UseRootlessMode"]; -} - -+ (void)setUseAGL:(BOOL)newUseAGL -{ - [[NSUserDefaults standardUserDefaults] setBool:newUseAGL - forKey:@"UseAGLforGLX"]; -} - -+ (void)setStartupHelp:(BOOL)newStartupHelp -{ - [[NSUserDefaults standardUserDefaults] setBool:newStartupHelp - forKey:@"ShowStartupHelp"]; -} - -+ (void)setSystemBeep:(BOOL)newSystemBeep -{ - [[NSUserDefaults standardUserDefaults] setBool:newSystemBeep - forKey:@"UseSystemBeep"]; - // Update the setting used by the X server thread - quartzUseSysBeep = newSystemBeep; -} - -+ (void)setEnableKeyEquivalents:(BOOL)newKeyEquivs -{ - [[NSUserDefaults standardUserDefaults] setBool:newKeyEquivs - forKey:X11EnableKeyEquivalentsKey]; - // Update the setting used by the X server thread - quartzEnableKeyEquivalents = newKeyEquivs; -} - -+ (void)setXinerama:(BOOL)newXinerama -{ - [[NSUserDefaults standardUserDefaults] setBool:newXinerama - forKey:@"Xinerama"]; -} - -+ (void)setAddToPath:(BOOL)newAddToPath -{ - [[NSUserDefaults standardUserDefaults] setBool:newAddToPath - forKey:@"AddToPath"]; -} - -+ (void)setAddToPathString:(NSString *)newAddToPathString -{ - [[NSUserDefaults standardUserDefaults] setObject:newAddToPathString - forKey:@"AddToPathString"]; -} - -+ (void)setUseDefaultShell:(BOOL)newUseDefaultShell -{ - [[NSUserDefaults standardUserDefaults] setBool:newUseDefaultShell - forKey:@"UseDefaultShell"]; -} - -+ (void)setShellString:(NSString *)newShellString -{ - [[NSUserDefaults standardUserDefaults] setObject:newShellString - forKey:@"Shell"]; -} - -+ (void)setDepth:(int)newDepth -{ - [[NSUserDefaults standardUserDefaults] setInteger:newDepth - forKey:@"Depth"]; -} - -+ (void)setDisplayModeBundles:(NSArray *)newBundles -{ - [[NSUserDefaults standardUserDefaults] setObject:newBundles - forKey:@"DisplayModeBundles"]; -} - -+ (void)saveToDisk -{ - [[NSUserDefaults standardUserDefaults] synchronize]; -} - -+ (BOOL)useKeymapFile -{ - return [[NSUserDefaults standardUserDefaults] - boolForKey:@"UseKeymappingFile"]; -} - -+ (NSString *)keymapFile -{ - return [[NSUserDefaults standardUserDefaults] - stringForKey:@"KeymappingFile"]; -} - -+ (NSString *)switchString -{ - return [[NSUserDefaults standardUserDefaults] - stringForKey:@"SwitchString"]; -} - -+ (unsigned int)keyCode -{ - return [[NSUserDefaults standardUserDefaults] - integerForKey:@"SwitchKeyCode"]; -} - -+ (unsigned int)modifiers -{ - return [[NSUserDefaults standardUserDefaults] - integerForKey:@"SwitchModifiers"]; -} - -+ (int)display -{ - return [[NSUserDefaults standardUserDefaults] - integerForKey:@"Display"]; -} - -+ (BOOL)dockSwitch -{ - return [[NSUserDefaults standardUserDefaults] boolForKey:@"DockSwitch"]; -} - -+ (BOOL)fakeButtons -{ - return [[NSUserDefaults standardUserDefaults] boolForKey:@"FakeButtons"]; -} - -+ (int)button2Mask -{ - return [[NSUserDefaults standardUserDefaults] - integerForKey:@"Button2Mask"]; -} - -+ (int)button3Mask -{ - return [[NSUserDefaults standardUserDefaults] - integerForKey:@"Button3Mask"]; -} - -+ (BOOL)mouseAccelChange -{ - return [[NSUserDefaults standardUserDefaults] - boolForKey:@"AllowMouseAccelChange"]; -} - -+ (int)useQDCursor -{ - return [[NSUserDefaults standardUserDefaults] - integerForKey:@"UseQDCursor"]; -} - -+ (BOOL)rootless -{ - return [[NSUserDefaults standardUserDefaults] - boolForKey:@"UseRootlessMode"]; -} - -+ (BOOL)useAGL -{ - return [[NSUserDefaults standardUserDefaults] - boolForKey:@"UseAGLforGLX"]; -} - -+ (BOOL)modeWindow -{ - return [[NSUserDefaults standardUserDefaults] - boolForKey:@"ShowModePickWindow"]; -} - -+ (BOOL)startupHelp -{ - return [[NSUserDefaults standardUserDefaults] - boolForKey:@"ShowStartupHelp"]; -} - -+ (BOOL)systemBeep -{ - return [[NSUserDefaults standardUserDefaults] boolForKey:@"UseSystemBeep"]; -} - -+ (BOOL)enableKeyEquivalents -{ - return [[NSUserDefaults standardUserDefaults] boolForKey:X11EnableKeyEquivalentsKey]; -} - -+ (BOOL)xinerama -{ - return [[NSUserDefaults standardUserDefaults] boolForKey:@"Xinerama"]; -} - -+ (BOOL)addToPath -{ - return [[NSUserDefaults standardUserDefaults] boolForKey:@"AddToPath"]; -} - -+ (NSString *)addToPathString -{ - return [[NSUserDefaults standardUserDefaults] - stringForKey:@"AddToPathString"]; -} - -+ (BOOL)useDefaultShell -{ - return [[NSUserDefaults standardUserDefaults] - boolForKey:@"UseDefaultShell"]; -} - -+ (NSString *)shellString -{ - return [[NSUserDefaults standardUserDefaults] - stringForKey:@"Shell"]; -} - -+ (int)depth -{ - return [[NSUserDefaults standardUserDefaults] - integerForKey:@"Depth"]; -} - -+ (NSArray *)displayModeBundles -{ - return [[NSUserDefaults standardUserDefaults] - objectForKey:@"DisplayModeBundles"]; -} - -@end diff --git a/hw/darwin/quartz/X11Application.m b/hw/darwin/quartz/X11Application.m index 6d079ee4a..60d11c5ed 100644 --- a/hw/darwin/quartz/X11Application.m +++ b/hw/darwin/quartz/X11Application.m @@ -27,7 +27,7 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ -#include "../quartz/quartzCommon.h" +#include "quartzCommon.h" #import "X11Application.h" #include @@ -35,7 +35,7 @@ /* ouch! */ #define BOOL X_BOOL # include "darwin.h" -# include "../quartz/quartz.h" +# include "quartz.h" # define _APPLEWM_SERVER_ # include "X11/extensions/applewm.h" # include "micmap.h" diff --git a/hw/darwin/quartz/X11Controller.h b/hw/darwin/quartz/X11Controller.h index 8d17fd9c3..f1399dc49 100644 --- a/hw/darwin/quartz/X11Controller.h +++ b/hw/darwin/quartz/X11Controller.h @@ -33,7 +33,7 @@ #if __OBJC__ #import -#include "../quartz/xpr/x-list.h" +#include "xpr/x-list.h" @interface X11Controller : NSObject { diff --git a/hw/darwin/quartz/X11Controller.m b/hw/darwin/quartz/X11Controller.m index fbc9c7402..6929566f7 100644 --- a/hw/darwin/quartz/X11Controller.m +++ b/hw/darwin/quartz/X11Controller.m @@ -29,7 +29,7 @@ #define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin" -#include "../quartz/quartzCommon.h" +#include "quartzCommon.h" #import "X11Controller.h" #import "X11Application.h" @@ -39,10 +39,10 @@ #define BOOL X_BOOL #include "opaque.h" # include "darwin.h" -# include "../quartz/quartz.h" +# include "quartz.h" # define _APPLEWM_SERVER_ # include "X11/extensions/applewm.h" -# include "../quartz/applewmExt.h" +# include "applewmExt.h" #undef BOOL #include @@ -51,8 +51,6 @@ #include #include -#define TRACE() fprintf (stderr, "%s\n", __FUNCTION__) - @implementation X11Controller - (void) awakeFromNib diff --git a/hw/darwin/quartz/cr/cr.h b/hw/darwin/quartz/cr/cr.h index d6779ae7d..0ebad5da0 100644 --- a/hw/darwin/quartz/cr/cr.h +++ b/hw/darwin/quartz/cr/cr.h @@ -1,7 +1,6 @@ /* * 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 diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index a97a36d88..52477817e 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -2,8 +2,6 @@ * * Support for using the Quartz Window Manager cursor * - **************************************************************/ -/* * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker. * All Rights Reserved. * diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 8565e347e..23707a071 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -504,18 +504,6 @@ void DarwinModeProcessEvent( RootlessOrderAllWindows(); break; - case kXDarwinWindowState: - ErrorF("kXDarwinWindowState\n"); - break; - case kXDarwinWindowMoved: { - WindowPtr pWin = (WindowPtr)xe->u.clientMessage.u.l.longs0; - short x = xe->u.clientMessage.u.l.longs1, - y = xe->u.clientMessage.u.l.longs2; - ErrorF("kXDarwinWindowMoved(%p, %hd, %hd)\n", pWin, x, y); - RootlessMoveWindow(pWin, x, y, pWin->nextSib, VTMove); - } - break; - default: ErrorF("Unknown application defined event type %d.\n", xe->u.u.type); } diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c index 0fa04e677..15f555302 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -2,8 +2,6 @@ * * Support for using the Quartz Window Manager cursor * - **************************************************************/ -/* * Copyright (c) 2001-2003 Torrey T. Lyons and Greg Parker. * All Rights Reserved. * @@ -92,9 +90,7 @@ static pthread_cond_t cursorCondition; /* Acquire lock and tell the main thread to change cursor */ \ pthread_mutex_lock(&cursorMutex); \ currentCursor = (CCrsrHandle) (cursorH); \ -#ifndef INXQUARTZ QuartzMessageMainThread(kQuartzCursorUpdate, NULL, 0); \ -#endif \ /* Wait for the main thread to change the cursor */ \ pthread_cond_wait(&cursorCondition, &cursorMutex); \ diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index b40d81e21..49c5bfdcd 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -3,7 +3,7 @@ Code to build a keymap using the Carbon Keyboard Layout API. - Copyright (c) 2003, 2007 Apple Inc. + Copyright (c) 2003-2007 Apple Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files @@ -34,6 +34,7 @@ #include #include "quartzCommon.h" + #include #include diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c index af25fc892..213019747 100644 --- a/hw/darwin/quartz/quartzPasteboard.c +++ b/hw/darwin/quartz/quartzPasteboard.c @@ -33,6 +33,7 @@ #include #include "quartzPasteboard.h" + #include #include "windowstr.h" #include "propertyst.h" diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c index 0381a9f6a..6f45949be 100644 --- a/hw/darwin/quartz/quartzStartup.c +++ b/hw/darwin/quartz/quartzStartup.c @@ -2,8 +2,6 @@ * * Startup code for the Quartz Darwin X Server * - **************************************************************/ -/* * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index fd0bff1a9..4ade24916 100644 --- a/hw/darwin/quartz/xpr/dri.c +++ b/hw/darwin/quartz/xpr/dri.c @@ -36,8 +36,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include +#ifdef XFree86LOADER +#include "xf86.h" +#include "xf86_ansic.h" +#else #include #include +#endif #define NEED_REPLIES #define NEED_EVENTS diff --git a/hw/darwin/quartz/xpr/xpr.h b/hw/darwin/quartz/xpr/xpr.h index bd8e63e61..ddc6d0cb1 100644 --- a/hw/darwin/quartz/xpr/xpr.h +++ b/hw/darwin/quartz/xpr/xpr.h @@ -1,7 +1,6 @@ /* * Xplugin rootless implementation - */ -/* + * * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/darwin/quartz/xpr/xprAppleWM.c index 1573d215b..f639b55fe 100644 --- a/hw/darwin/quartz/xpr/xprAppleWM.c +++ b/hw/darwin/quartz/xpr/xprAppleWM.c @@ -1,7 +1,6 @@ /* * Xplugin rootless implementation functions for AppleWM extension - */ -/* + * * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 57a60a20b..aff190155 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -117,7 +117,7 @@ eventHandler(unsigned int type, const void *arg, } /* - * displayScreenBounds + * displayAtIndex * Return the display ID for a particular display index. */ static CGDirectDisplayID @@ -233,7 +233,6 @@ xprDisplayInit(void) darwinScreensFound = 1; if (xp_init(XP_BACKGROUND_EVENTS | XP_NO_DEFERRED_UPDATES) != Success) - { FatalError("Could not initialize the Xplugin library."); xp_select_events(XP_EVENT_DISPLAY_CHANGED @@ -324,6 +323,9 @@ static Bool xprSetupScreen(int index, ScreenPtr pScreen) { // Add alpha protecting replacements for fb screen functions + pScreen->PaintWindowBackground = SafeAlphaPaintWindow; + pScreen->PaintWindowBorder = SafeAlphaPaintWindow; + #ifdef RENDER { PictureScreenPtr ps = GetPictureScreen(pScreen); diff --git a/hw/darwin/utils/README.txt b/hw/darwin/utils/README.txt index fb6d4399e..1dd64794e 100644 --- a/hw/darwin/utils/README.txt +++ b/hw/darwin/utils/README.txt @@ -105,7 +105,3 @@ 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. - - - -$XFree86: xc/programs/Xserver/hw/darwin/utils/README.txt,v 1.1 2000/12/01 19:47:39 dawes Exp $ diff --git a/hw/darwin/utils/dumpkeymap.man b/hw/darwin/utils/dumpkeymap.man index 90a2cd051..02b09e6ca 100644 --- a/hw/darwin/utils/dumpkeymap.man +++ b/hw/darwin/utils/dumpkeymap.man @@ -30,8 +30,6 @@ // //============================================================================= // -// $XFree86$ -// .. .ig //----------------------------------------------------------------------------- From ed9524d36e42a310bb128284f2b507f76b8c40d9 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 01:07:02 -0800 Subject: [PATCH 321/454] Darwin: Copied over missing file (Localizable.strings) from xorg-server-1.2-apple --- .../apple/English.lproj/Localizable.strings | Bin 0 -> 1094 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 hw/darwin/apple/English.lproj/Localizable.strings diff --git a/hw/darwin/apple/English.lproj/Localizable.strings b/hw/darwin/apple/English.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..c83b085365171a36c82d1c426108afa9ecb7e09a GIT binary patch literal 1094 zcmeH{KTpFj5XFCUKEVaN z-t*m4KEGHpM|i-J;s_K79a{_@;e!@SLxaWZ*_LhM!{Tu2IQl9P zEIW1>a_vHc!KqsGpHDc)yRlQXzCYGPXBk^v7nn025#4L0Cule79?4lSL%2cy`}t@6 zye1*(Q~j*D%Lx5^k7+Ea2<)-sI&)#86O4&3G$#f_#R3`9ey_95G#TT}&e6*#Kar9l XtW~?5sQ*5>jDwf{A27aqL{#w`f{nOJ literal 0 HcmV?d00001 From 4e18c626350c7c2e0fb540aa64a98957699f3abe Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 12:21:59 -0800 Subject: [PATCH 322/454] Rootless: Pulled in changes from fb{Blt,Fill} into rl{Blt,Fill} (cherry picked from commit 3f857e129df7ce492191e0c51b8e53eaf6179366) (cherry picked from commit 70374a58937d7a6f01c210bd6ac66cafb63e895a) --- miext/rootless/accel/rlBlt.c | 44 ++++++++++++++++++++++++++++++++--- miext/rootless/accel/rlFill.c | 6 ++--- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/miext/rootless/accel/rlBlt.c b/miext/rootless/accel/rlBlt.c index 2cf72eb22..b5fe74085 100644 --- a/miext/rootless/accel/rlBlt.c +++ b/miext/rootless/accel/rlBlt.c @@ -32,10 +32,22 @@ #endif #include /* For NULL */ +#include #include "fb.h" #include "rootlessCommon.h" #include "rlAccel.h" +#define InitializeShifts(sx,dx,ls,rs) { \ + if (sx != dx) { \ + if (sx > dx) { \ + ls = sx - dx; \ + rs = FB_UNIT - ls; \ + } else { \ + rs = dx - sx; \ + ls = FB_UNIT - rs; \ + } \ + } \ +} void rlBlt (FbBits *srcLine, @@ -74,6 +86,29 @@ rlBlt (FbBits *srcLine, return; } #endif + + if (alu == GXcopy && pm == FB_ALLONES && !reverse && + !(srcX & 7) && !(dstX & 7) && !(width & 7)) { + int i; + CARD8 *src = (CARD8 *) srcLine; + CARD8 *dst = (CARD8 *) dstLine; + + srcStride *= sizeof(FbBits); + dstStride *= sizeof(FbBits); + width >>= 3; + src += (srcX >> 3); + dst += (dstX >> 3); + + if (!upsidedown) + for (i = 0; i < height; i++) + memcpy(dst + i * dstStride, src + i * srcStride, width); + else + for (i = height - 1; i >= 0; i--) + memcpy(dst + i * dstStride, src + i * srcStride, width); + + return; + } + FbInitializeMergeRop(alu, pm); destInvarient = FbDestInvarientMergeRop(); if (upsidedown) @@ -325,9 +360,12 @@ rlBlt (FbBits *srcLine, bits1 = *src++; if (startmask) { - bits = FbScrLeft(bits1, leftShift); - bits1 = *src++; - bits |= FbScrRight(bits1, rightShift); + bits = FbScrLeft(bits1, leftShift); + if (FbScrLeft(startmask, rightShift)) + { + bits1 = *src++; + bits |= FbScrRight(bits1, rightShift); + } FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask); dst++; } diff --git a/miext/rootless/accel/rlFill.c b/miext/rootless/accel/rlFill.c index 0d0d01251..a80c7769f 100644 --- a/miext/rootless/accel/rlFill.c +++ b/miext/rootless/accel/rlFill.c @@ -89,7 +89,7 @@ rlFill (DrawablePtr pDrawable, dstBpp, (pGC->patOrg.x + pDrawable->x + dstXoff), - pGC->patOrg.y + pDrawable->y + dstYoff - y); + pGC->patOrg.y + pDrawable->y - y); } else { @@ -126,7 +126,7 @@ rlFill (DrawablePtr pDrawable, fgand, fgxor, bgand, bgxor, pGC->patOrg.x + pDrawable->x + dstXoff, - pGC->patOrg.y + pDrawable->y + dstYoff - y); + pGC->patOrg.y + pDrawable->y - y); } break; } @@ -154,7 +154,7 @@ rlFill (DrawablePtr pDrawable, pPriv->pm, dstBpp, (pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp, - pGC->patOrg.y + pDrawable->y + dstYoff - y); + pGC->patOrg.y + pDrawable->y - y); break; } } From 23596291c30a85e38c00aef2c01b46d561e2916e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 13:17:44 -0800 Subject: [PATCH 323/454] Darwin: More syncing witn xorg-server-1.2-apple --- hw/darwin/darwin.c | 31 ++++++++++++++++++++++++++++++- hw/darwin/quartz/quartz.c | 19 +++++++++++-------- hw/darwin/quartz/xpr/xprScreen.c | 23 ++++++++--------------- 3 files changed, 49 insertions(+), 24 deletions(-) diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index a772218fe..b08770c10 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -671,6 +671,7 @@ void OsVendorInit(void) } #endif } + // DEBUG_LOG("Xquartz started at %s\n", ctime(time(NULL))); // Find the full path to the keymapping file. if ( darwinKeymapFile ) { @@ -959,7 +960,7 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable) WindowPtr pChild; Bool WasViewable = (Bool)(pWin->viewable); Bool anyMarked = TRUE; - RegionPtr pOldClip = NULL; + RegionPtr pOldClip = NULL, bsExposed; #ifdef DO_SAVE_UNDERS Bool dosave = FALSE; #endif @@ -1015,6 +1016,12 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable) if (WasViewable) { + if (pWin->backStorage) + { + pOldClip = REGION_CREATE(pScreen, NullBox, 1); + REGION_COPY(pScreen, pOldClip, &pWin->clipList); + } + if (pWin->firstChild) { anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild, @@ -1038,6 +1045,28 @@ xf86SetRootClip (ScreenPtr pScreen, BOOL enable) (*pScreen->ValidateTree)(pWin, NullWindow, VTOther); } + if (pWin->backStorage && + ((pWin->backingStore == Always) || WasViewable)) + { + if (!WasViewable) + pOldClip = &pWin->clipList; /* a convenient empty region */ + bsExposed = (*pScreen->TranslateBackingStore) + (pWin, 0, 0, pOldClip, + pWin->drawable.x, pWin->drawable.y); + if (WasViewable) + REGION_DESTROY(pScreen, pOldClip); + if (bsExposed) + { + RegionPtr valExposed = NullRegion; + + if (pWin->valdata) + valExposed = &pWin->valdata->after.exposed; + (*pScreen->WindowExposures) (pWin, valExposed, bsExposed); + if (valExposed) + REGION_EMPTY(pScreen, valExposed); + REGION_DESTROY(pScreen, bsExposed); + } + } if (WasViewable) { if (anyMarked) diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 23707a071..c95880ceb 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -253,7 +253,7 @@ static void QuartzUpdateScreens(void) int x, y, width, height, sx, sy; xEvent e; - ErrorF("QuartzUpdateScreens()\n"); + DEBUG_LOG("QuartzUpdateScreens()\n"); if (noPseudoramiXExtension || screenInfo.numScreens != 1) { /* FIXME: if not using Xinerama, we have multiple screens, and @@ -418,6 +418,7 @@ void DarwinModeProcessEvent( { switch (xe->u.u.type) { case kXDarwinControllerNotify: + DEBUG_LOG("kXDarwinControllerNotify\n"); AppleWMSendEvent(AppleWMControllerNotify, AppleWMControllerNotifyMask, xe->u.clientMessage.u.l.longs0, @@ -425,6 +426,7 @@ void DarwinModeProcessEvent( break; case kXDarwinPasteboardNotify: + DEBUG_LOG("kXDarwinPasteboardNotify\n"); AppleWMSendEvent(AppleWMPasteboardNotify, AppleWMPasteboardNotifyMask, xe->u.clientMessage.u.l.longs0, @@ -432,7 +434,7 @@ void DarwinModeProcessEvent( break; case kXDarwinActivate: - // ErrorF("kXDarwinActivate\n"); + DEBUG_LOG("kXDarwinActivate\n"); QuartzShow(xe->u.keyButtonPointer.rootX, xe->u.keyButtonPointer.rootY); AppleWMSendEvent(AppleWMActivationNotify, @@ -441,7 +443,7 @@ void DarwinModeProcessEvent( break; case kXDarwinDeactivate: - // ErrorF("kXDarwinDeactivate\n"); + DEBUG_LOG("kXDarwinDeactivate\n"); AppleWMSendEvent(AppleWMActivationNotify, AppleWMActivationNotifyMask, AppleWMIsInactive, 0); @@ -449,22 +451,23 @@ void DarwinModeProcessEvent( break; case kXDarwinDisplayChanged: - // ErrorF("kXDarwinDisplayChanged\n"); + DEBUG_LOG("kXDarwinDisplayChanged\n"); QuartzUpdateScreens(); break; case kXDarwinWindowState: - // ErrorF("kXDarwinWindowState\n"); + DEBUG_LOG("kXDarwinWindowState\n"); RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0, xe->u.clientMessage.u.l.longs1); break; case kXDarwinWindowMoved: - // ErrorF("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"); #ifdef DARWIN_DDX_MISSING if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot); else if (quartzHasRoot) QuartzHide(); @@ -500,7 +503,7 @@ void DarwinModeProcessEvent( break; case kXDarwinBringAllToFront: - // ErrorF("kXDarwinBringAllToFront\n"); + DEBUG_LOG("kXDarwinBringAllToFront\n"); RootlessOrderAllWindows(); break; diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index aff190155..1b6addc49 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -80,21 +80,14 @@ eventHandler(unsigned int type, const void *arg, 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); - BoxRec box; - xp_error retval = xp_get_window_bounds(id, &box); - if (retval != Success) { - ErrorF("Unable to find new bounds for window\n"); - break; - } - QuartzMessageServerThread(kXDarwinWindowMoved, 3, pWin, box.x1, box.y1); - } - break; - + 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: From 59c7ca6586e7c20e28ad407ca9a0883c4d621d64 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 13:29:15 -0800 Subject: [PATCH 324/454] Darwin: Added missing Makefile.am --- hw/darwin/quartz/xpr/Makefile.am | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 hw/darwin/quartz/xpr/Makefile.am diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/darwin/quartz/xpr/Makefile.am new file mode 100644 index 000000000..4fe6e23b6 --- /dev/null +++ b/hw/darwin/quartz/xpr/Makefile.am @@ -0,0 +1,30 @@ +noinst_LIBRARIES = libxpr.a +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) \ + -DHAVE_XORG_CONFIG_H \ + -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ + -I$(top_srcdir)/miext \ + -I$(top_srcdir)/miext/rootless \ + -I$(top_srcdir)/miext/rootless/safeAlpha + +libxpr_a_SOURCES = \ + appledri.c \ + dri.c \ + xprAppleWM.c \ + xprCursor.c \ + xprFrame.c \ + xprScreen.c \ + x-hash.c \ + x-hook.c \ + x-list.c + +EXTRA_DIST = \ + dri.h \ + dristruct.h \ + appledri.h \ + appledristr.h \ + x-hash.h \ + x-hook.h \ + x-list.h \ + Xplugin.h \ + xpr.h From a751bc12bee1d4d2ed35e3a0c64d9c8c9bf30a82 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 13:53:00 -0800 Subject: [PATCH 325/454] Rootless: Imported changes made in xorg-server-1.2-apple branch --- miext/rootless/rootlessValTree.c | 12 +++ miext/rootless/safeAlpha/safeAlphaPicture.c | 109 +++++++++++--------- 2 files changed, 72 insertions(+), 49 deletions(-) diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c index 9fab7866b..4f16530cc 100644 --- a/miext/rootless/rootlessValTree.c +++ b/miext/rootless/rootlessValTree.c @@ -482,6 +482,18 @@ RootlessComputeClips (pParent, pScreen, universe, kind, exposed) universe, &pParent->clipList); } + /* + * One last thing: backing storage. We have to try to save what parts of + * the window are about to be obscured. We can just subtract the universe + * from the old clipList and get the areas that were in the old but aren't + * in the new and, hence, are about to be obscured. + */ + if (pParent->backStorage && !resized) + { + REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); + (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); + } + /* HACK ALERT - copying contents of regions, instead of regions */ { RegionRec tmp; diff --git a/miext/rootless/safeAlpha/safeAlphaPicture.c b/miext/rootless/safeAlpha/safeAlphaPicture.c index 57f1ae187..8f6631531 100644 --- a/miext/rootless/safeAlpha/safeAlphaPicture.c +++ b/miext/rootless/safeAlpha/safeAlphaPicture.c @@ -46,6 +46,7 @@ #include "fbpict.h" #include "safeAlpha.h" #include "rootlessCommon.h" +# define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) /* Optimized version of fbCompositeSolidMask_nx8x8888 */ void @@ -133,68 +134,78 @@ SafeAlphaCompositeSolidMask_nx8x8888( void SafeAlphaComposite (CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, - INT16 yDst, - CARD16 width, - CARD16 height) + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) { - int oldDepth = pDst->pDrawable->depth; - int oldFormat = pDst->format; + if (!pSrc) { + ErrorF("SafeAlphaComposite: pSrc must not be null!\n"); + return; + } + + if (!pDst) { + ErrorF("SafeAlphaComposite: pDst must not be null!\n"); + return; + } + + int oldDepth = pDst->pDrawable->depth; + int oldFormat = pDst->format; - /* - * We can use the more optimized fbpict code, but it sets bits above - * the depth to zero. Temporarily adjust destination depth if needed. - */ - if (pDst->pDrawable->type == DRAWABLE_WINDOW - && pDst->pDrawable->depth == 24 - && pDst->pDrawable->bitsPerPixel == 32) + /* + * We can use the more optimized fbpict code, but it sets bits above + * the depth to zero. Temporarily adjust destination depth if needed. + */ + if (pDst->pDrawable->type == DRAWABLE_WINDOW + && pDst->pDrawable->depth == 24 + && pDst->pDrawable->bitsPerPixel == 32) { - pDst->pDrawable->depth = 32; + pDst->pDrawable->depth = 32; } - /* For rootless preserve the alpha in x8r8g8b8 which really is - * a8r8g8b8 - */ - if (oldFormat == PICT_x8r8g8b8) + /* For rootless preserve the alpha in x8r8g8b8 which really is + * a8r8g8b8 + */ + if (oldFormat == PICT_x8r8g8b8) { - pDst->format = PICT_a8r8g8b8; + pDst->format = PICT_a8r8g8b8; } - if (pSrc && pMask && pSrc->pDrawable && pMask->pDrawable && - !pSrc->transform && !pMask->transform && - !pSrc->alphaMap && !pMask->alphaMap && - !pMask->repeat && !pMask->componentAlpha && !pDst->alphaMap && - pMask->format == PICT_a8 && - pSrc->repeatType == RepeatNormal && - pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1 && - (pDst->format == PICT_a8r8g8b8 || - pDst->format == PICT_x8r8g8b8 || - pDst->format == PICT_a8b8g8r8 || - pDst->format == PICT_x8b8g8r8)) + if (pSrc->pDrawable && pMask && pMask->pDrawable && + !pSrc->transform && !pMask->transform && + !pSrc->alphaMap && !pMask->alphaMap && + !pMask->repeat && !pMask->componentAlpha && !pDst->alphaMap && + pMask->format == PICT_a8 && + pSrc->repeatType == RepeatNormal && + pSrc->pDrawable->width == 1 && + pSrc->pDrawable->height == 1 && + (pDst->format == PICT_a8r8g8b8 || + pDst->format == PICT_x8r8g8b8 || + pDst->format == PICT_a8b8g8r8 || + pDst->format == PICT_x8b8g8r8)) { - fbWalkCompositeRegion (op, pSrc, pMask, pDst, - xSrc, ySrc, xMask, yMask, xDst, yDst, - width, height, - TRUE /* srcRepeat */, - FALSE /* maskRepeat */, - SafeAlphaCompositeSolidMask_nx8x8888); + fbWalkCompositeRegion (op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, + width, height, + TRUE /* srcRepeat */, + FALSE /* maskRepeat */, + SafeAlphaCompositeSolidMask_nx8x8888); } - else + else { - fbComposite (op, pSrc, pMask, pDst, - xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); + fbComposite (op, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); } - pDst->pDrawable->depth = oldDepth; - pDst->format = oldFormat; + pDst->pDrawable->depth = oldDepth; + pDst->format = oldFormat; } #endif /* RENDER */ From 2082e7aa878fe1221fd50895a9de1f408b3157a8 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 17:18:48 -0800 Subject: [PATCH 326/454] Rootless: Remove the PaintWindow optimization which snuck back in. --- miext/rootless/rootlessWindow.c | 89 --------------------------------- 1 file changed, 89 deletions(-) diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index 14bc67452..bb5ba4828 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -1485,95 +1485,6 @@ RootlessFlushWindowColormap (WindowPtr pWin) configure_window (winRec->wid, XP_COLORMAP, &wc); } -/* - * SetPixmapOfAncestors - * Set the Pixmaps on all ParentRelative windows up the ancestor chain. - */ -static void -SetPixmapOfAncestors(WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - WindowPtr topWin = TopLevelParent(pWin); - RootlessWindowRec *topWinRec = WINREC(topWin); - - while (pWin->backgroundState == ParentRelative) { - if (pWin == topWin) { - // disallow ParentRelative background state on top level - XID pixel = 0; - ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); - RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin); - break; - } - - pWin = pWin->parent; - pScreen->SetWindowPixmap(pWin, topWinRec->pixmap); - } -} - - -/* - * RootlessPaintWindowBackground - */ -void -RootlessPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - - if (IsRoot(pWin)) - return; - - RL_DEBUG_MSG("paintwindowbackground start (win 0x%x, framed %i) ", - pWin, IsFramedWindow(pWin)); - - if (IsFramedWindow(pWin)) { - RootlessStartDrawing(pWin); - RootlessDamageRegion(pWin, pRegion); - - // For ParentRelative windows, we have to make sure the window - // pixmap is set correctly all the way up the ancestor chain. - if (pWin->backgroundState == ParentRelative) { - SetPixmapOfAncestors(pWin); - } - } - - SCREEN_UNWRAP(pScreen, PaintWindowBackground); - pScreen->PaintWindowBackground(pWin, pRegion, what); - SCREEN_WRAP(pScreen, PaintWindowBackground); - - RL_DEBUG_MSG("paintwindowbackground end\n"); -} - - -/* - * RootlessPaintWindowBorder - */ -void -RootlessPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) -{ - RL_DEBUG_MSG("paintwindowborder start (win 0x%x) ", pWin); - - if (IsFramedWindow(pWin)) { - RootlessStartDrawing(pWin); - RootlessDamageRegion(pWin, pRegion); - - // For ParentRelative windows with tiled borders, we have to make - // sure the window pixmap is set correctly all the way up the - // ancestor chain. - if (!pWin->borderIsPixel && - pWin->backgroundState == ParentRelative) - { - SetPixmapOfAncestors(pWin); - } - } - - SCREEN_UNWRAP(pWin->drawable.pScreen, PaintWindowBorder); - pWin->drawable.pScreen->PaintWindowBorder(pWin, pRegion, what); - SCREEN_WRAP(pWin->drawable.pScreen, PaintWindowBorder); - - RL_DEBUG_MSG("paintwindowborder end\n"); -} - - /* * RootlessChangeBorderWidth * FIXME: untested! From bf4ef4da759c01e6794ed28ba4988a2c8ee049bf Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 17:45:15 -0800 Subject: [PATCH 327/454] Darwin: Remove the PaintWindow optimization which snuck back in. --- hw/darwin/quartz/xpr/xprScreen.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index 1b6addc49..b5f382ee5 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -316,8 +316,6 @@ static Bool xprSetupScreen(int index, ScreenPtr pScreen) { // Add alpha protecting replacements for fb screen functions - pScreen->PaintWindowBackground = SafeAlphaPaintWindow; - pScreen->PaintWindowBorder = SafeAlphaPaintWindow; #ifdef RENDER { From 63351df0eec320aa3ce27d4d2ee6bcdb58aa2d92 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 22 Nov 2007 18:02:07 -0800 Subject: [PATCH 328/454] Darwin: Fix compilation/linking problems --- hw/darwin/Makefile.am | 2 +- hw/darwin/darwinEvents.c | 3 +-- hw/darwin/darwinKeyboard.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index cd3f7f47b..62cbecf1d 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -48,7 +48,7 @@ Xquartz_LDADD = \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ $(top_builddir)/miext/rootless/accel/librlAccel.la \ - $(DARWIN_LIBS) $(XSERVER_LIBS) -lXplugin + $(DARWIN_LIBS) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) -lXplugin Xquartz_LDFLAGS = \ -XCClinker -Objc \ diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 06c4cc7dd..629fb2c9d 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -154,8 +154,7 @@ static void DarwinUpdateModifiers( * are held down during a "context" switch -- otherwise, we would miss the KeyUp. */ static void DarwinReleaseModifiers(void) { - xEvent e; - DarwinUpdateModifiers(&e, KeyRelease, COMMAND_MASK(-1) | CONTROL_MASK(-1) | ALTERNATE_MASK(-1) | SHIFT_MASK(-1)); + DarwinUpdateModifiers(KeyRelease, COMMAND_MASK(-1) | CONTROL_MASK(-1) | ALTERNATE_MASK(-1) | SHIFT_MASK(-1)); } /* diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index efa12b7b7..47acb65c5 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -1070,7 +1070,7 @@ int DarwinModifierStringToNXKey(const char *str) * This allows the ddx layer to prevent some keys from being remapped * as modifier keys. */ -Bool LegalModifier(unsigned int key, DevicePtr pDev) +Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) { return 1; } From a80e64f1503a4d8b11c4a6608d296422c69e3e8b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Sat, 17 Nov 2007 22:50:07 +0100 Subject: [PATCH 329/454] XKB: Generate correct key repeat events (bug #13114) Make sure we send the correct event for the type of device when we're sending key repeat events, which stops repeats being sent to incorrect windows. --- xkb/xkbAccessX.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c index 4c6e3d45b..43b82e162 100644 --- a/xkb/xkbAccessX.c +++ b/xkb/xkbAccessX.c @@ -308,14 +308,19 @@ xkbControlsNotify cn; static CARD32 AccessXRepeatKeyExpire(OsTimerPtr timer,CARD32 now,pointer arg) { -XkbSrvInfoPtr xkbi= ((DeviceIntPtr)arg)->key->xkbInfo; +DeviceIntPtr dev = (DeviceIntPtr) arg; +XkbSrvInfoPtr xkbi = dev->key->xkbInfo; KeyCode key; +BOOL is_core; - if (xkbi->repeatKey==0) + if (xkbi->repeatKey == 0) return 0; - key= xkbi->repeatKey; - AccessXKeyboardEvent((DeviceIntPtr)arg,KeyRelease,key,True); - AccessXKeyboardEvent((DeviceIntPtr)arg,KeyPress,key,True); + + is_core = (dev == inputInfo.keyboard); + key = xkbi->repeatKey; + AccessXKeyboardEvent(dev, is_core ? KeyRelease : DeviceKeyRelease, key, + True); + AccessXKeyboardEvent(dev, is_core ? KeyPress : DeviceKeyPress, key, True); return xkbi->desc->ctrls->repeat_interval; } From 184e571957f697f2a125dc9c9da0c7dfb92c2cd9 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Tue, 20 Nov 2007 13:05:26 +0100 Subject: [PATCH 330/454] Adjust offsets of modes that do not fit virtual screen size. Fixes memory corruption if a too small "Virtual" was specified in xorg.conf for the selected multi-monitor configuration. --- hw/xfree86/modes/xf86Crtc.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 653042c85..760a4989f 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -260,6 +260,30 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, crtc->y = y; crtc->rotation = rotation; + /* Shift offsets that move us out of virtual size */ + if (x + mode->HDisplay > xf86_config->maxWidth || + y + mode->VDisplay > xf86_config->maxHeight) + { + if (x + mode->HDisplay > xf86_config->maxWidth) + crtc->x = xf86_config->maxWidth - mode->HDisplay; + if (y + mode->VDisplay > xf86_config->maxHeight) + crtc->y = xf86_config->maxHeight - mode->VDisplay; + if (crtc->x < 0 || crtc->y < 0) + { + xf86DrvMsg (scrn->scrnIndex, X_ERROR, + "Mode %dx%d does not fit virtual size %dx%d - " + "internal error\n", mode->HDisplay, mode->VDisplay, + xf86_config->maxWidth, xf86_config->maxHeight); + goto done; + } + xf86DrvMsg (scrn->scrnIndex, X_ERROR, + "Mode %dx%d+%d+%d does not fit virtual size %dx%d - " + "offset updated to +%d+%d\n", + mode->HDisplay, mode->VDisplay, x, y, + xf86_config->maxWidth, xf86_config->maxHeight, + crtc->x, crtc->y); + } + /* XXX short-circuit changes to base location only */ /* Pass our mode to the outputs and the CRTC to give them a chance to @@ -301,7 +325,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, /* Set up the DPLL and any output state that needs to adjust or depend * on the DPLL. */ - crtc->funcs->mode_set(crtc, mode, adjusted_mode, x, y); + crtc->funcs->mode_set(crtc, mode, adjusted_mode, crtc->x, crtc->y); for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; From fa19e84714aa84a2f2e817e363d6440349d0b619 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Tue, 20 Nov 2007 16:54:50 +0100 Subject: [PATCH 331/454] Fix initial placement of LeftOf and Above. --- 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 760a4989f..5a1ed8c47 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1094,10 +1094,10 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes) output->initial_x += xf86ModeWidth (modes[or], relative->initial_rotation); break; case OPTION_ABOVE: - output->initial_y -= xf86ModeHeight (modes[or], relative->initial_rotation); + output->initial_y -= xf86ModeHeight (modes[o], relative->initial_rotation); break; case OPTION_LEFT_OF: - output->initial_x -= xf86ModeWidth (modes[or], relative->initial_rotation); + output->initial_x -= xf86ModeWidth (modes[o], relative->initial_rotation); break; default: break; From f6401f944d327cc5d9a7ee0bbdf4f7fc8eaa31e8 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Fri, 23 Nov 2007 16:12:49 +0100 Subject: [PATCH 332/454] Don't segfault if referring to a relative output where no modes survived. --- hw/xfree86/modes/xf86Crtc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 5a1ed8c47..8595d960c 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1079,6 +1079,16 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes) any_set = TRUE; continue; } + if (!modes[or]) + { + xf86DrvMsg (scrn->scrnIndex, X_ERROR, + "Cannot position output %s relative to output %s without modes\n", + output->name, relative_name); + output->initial_x = 0; + output->initial_y = 0; + any_set = TRUE; + continue; + } if (relative->initial_x == POSITION_UNSET) { keep_going = TRUE; From 33b94da6327d3423b4ebc1a58d5894c9904e67c9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 23 Nov 2007 16:01:11 -0800 Subject: [PATCH 333/454] Re-add call to XFixesExtensionInit for static servers. This reverts a portion of bcbaf2a0ce34b6c5e41d2831b8b87dbd0617a89b which removed the call to XFixesExtensionInit and some cpp lines. --- mi/miinitext.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mi/miinitext.c b/mi/miinitext.c index 11e5bae07..f5654f6bc 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -624,6 +624,10 @@ InitExtensions(argc, argv) #endif #endif #ifdef XFIXES + /* must be before Render to layer DisplayCursor correctly */ + if (!noXFixesExtension) XFixesExtensionInit(); +#endif +#ifdef RENDER if (!noRenderExtension) RenderExtensionInit(); #endif #ifdef RANDR From c6c284e64b1f537a3243856cf78cf3f2324e4c2b Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Mon, 26 Nov 2007 15:38:20 +0100 Subject: [PATCH 334/454] Initialize Mode with 0 in xf86RandRModeConvert. Asking for trouble if non-initialized values contain random data. --- hw/xfree86/modes/xf86RandR12.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index c1a06b296..61a7db3bd 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -683,11 +683,8 @@ xf86RandRModeConvert (ScrnInfoPtr scrn, RRModePtr randr_mode, DisplayModePtr mode) { - mode->prev = NULL; - mode->next = NULL; - mode->name = NULL; + memset(mode, 0, sizeof(DisplayModeRec)); mode->status = MODE_OK; - mode->type = 0; mode->Clock = randr_mode->mode.dotClock / 1000; From a344920ae86c1970e4cc34ee91e2f2008d490c49 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 26 Nov 2007 11:53:08 -0500 Subject: [PATCH 335/454] Allow Virtual to be specified globally in the Screen section. The Display subsections are optional, and it's confusing to need to create them just to set a Virtual size. --- hw/xfree86/common/xf86Config.c | 12 ++++++++++++ hw/xfree86/parser/Screen.c | 13 +++++++++++++ hw/xfree86/parser/xf86Parser.h | 1 + 3 files changed, 26 insertions(+) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index f58e2a70f..622c31850 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -1958,6 +1958,18 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, } screenp->displays = xnfalloc((count) * sizeof(DispRec)); screenp->numdisplays = count; + + /* Fill in the default Virtual size, if any */ + if (conf_screen->scrn_virtualX && conf_screen->scrn_virtualY) { + for (count = 0, dispptr = conf_screen->scrn_display_lst; + dispptr; + dispptr = (XF86ConfDisplayPtr)dispptr->list.next, count++) { + screenp->displays[count].virtualX = conf_screen->scrn_virtualX; + screenp->displays[count].virtualY = conf_screen->scrn_virtualY; + } + } + + /* Now do the per-Display Virtual sizes */ count = 0; dispptr = conf_screen->scrn_display_lst; while(dispptr) { diff --git a/hw/xfree86/parser/Screen.c b/hw/xfree86/parser/Screen.c index 4524f17f6..ad08c1382 100644 --- a/hw/xfree86/parser/Screen.c +++ b/hw/xfree86/parser/Screen.c @@ -214,6 +214,7 @@ static xf86ConfigSymTabRec ScreenTab[] = {DEFAULTDEPTH, "defaultdepth"}, {DEFAULTBPP, "defaultbpp"}, {DEFAULTFBBPP, "defaultfbbpp"}, + {VIRTUAL, "virtual"}, {OPTION, "option"}, {-1, ""}, }; @@ -299,6 +300,14 @@ xf86parseScreenSection (void) } } break; + case VIRTUAL: + if (xf86getSubToken (&(ptr->scrn_comment)) != NUMBER) + Error (VIRTUAL_MSG, NULL); + ptr->scrn_virtualX = val.num; + if (xf86getSubToken (&(ptr->scrn_comment)) != NUMBER) + Error (VIRTUAL_MSG, NULL); + ptr->scrn_virtualY = val.num; + break; case OPTION: ptr->scrn_option_lst = xf86parseOption(ptr->scrn_option_lst); break; @@ -364,6 +373,10 @@ xf86printScreenSection (FILE * cf, XF86ConfScreenPtr ptr) { fprintf (cf, "\tVideoAdaptor \"%s\"\n", aptr->al_adaptor_str); } + if (ptr->scrn_virtualX && ptr->scrn_virtualY) + fprintf (cf, "\tVirtual %d %d\n", + ptr->scrn_virtualX, + ptr->scrn_virtualY); for (dptr = ptr->scrn_display_lst; dptr; dptr = dptr->list.next) { fprintf (cf, "\tSubSection \"Display\"\n"); diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h index a078361d3..fd6cc530b 100644 --- a/hw/xfree86/parser/xf86Parser.h +++ b/hw/xfree86/parser/xf86Parser.h @@ -307,6 +307,7 @@ typedef struct XF86ConfDisplayPtr scrn_display_lst; XF86OptionPtr scrn_option_lst; char *scrn_comment; + int scrn_virtualX, scrn_virtualY; } XF86ConfScreenRec, *XF86ConfScreenPtr; From c0f9e204baf0218466973868c5ea6ed0f78e6b8b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Mon, 26 Nov 2007 15:24:15 -0500 Subject: [PATCH 336/454] 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 337/454] 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 338/454] 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 339/454] 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 340/454] 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 341/454] 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 601307615e4955be23fd86a057285074242ad83e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 26 Nov 2007 13:04:57 -0800 Subject: [PATCH 342/454] Darwin,Rootless: Makefile cleanup (cherry picked from commit 9c6d8a035b712b219833653ac637b89703a9b0c3) --- GL/apple/Makefile.am | 5 ++- configure.ac | 2 ++ hw/darwin/Makefile.am | 53 +++++----------------------- hw/darwin/apple/Makefile.am | 23 ++++++++++++ hw/darwin/darwin.h | 3 +- hw/darwin/launcher/Makefile.am | 18 ++++++++++ hw/darwin/quartz/Makefile.am | 6 ++-- hw/darwin/quartz/xpr/Makefile.am | 20 +++++------ miext/rootless/Makefile.am | 19 +++++----- miext/rootless/accel/Makefile.am | 25 ++++++------- miext/rootless/safeAlpha/Makefile.am | 8 ++--- 11 files changed, 92 insertions(+), 90 deletions(-) create mode 100644 hw/darwin/apple/Makefile.am create mode 100644 hw/darwin/launcher/Makefile.am diff --git a/GL/apple/Makefile.am b/GL/apple/Makefile.am index 6f0b68d5f..d3c05ccc7 100644 --- a/GL/apple/Makefile.am +++ b/GL/apple/Makefile.am @@ -1,9 +1,12 @@ +AM_CFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = \ -I$(top_srcdir) \ -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/darwin/quartz/cr \ + -I$(top_srcdir)/miext/damage if HAVE_AGL_FRAMEWORK noinst_LIBRARIES = libAGLcore.a diff --git a/configure.ac b/configure.ac index b81d786f0..5150c1828 100644 --- a/configure.ac +++ b/configure.ac @@ -2164,6 +2164,8 @@ hw/xgl/glxext/module/Makefile 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 62cbecf1d..1faedcbef 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -1,11 +1,16 @@ -AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) -AM_CPPFLAGS = $(XORG_INCS) \ +AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) +AM_CPPFLAGS = \ -DINXQUARTZ \ -DUSE_NEW_CLUT \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless -SUBDIRS = quartz utils +if X11APP +X11APP_SUBDIRS = apple launcher +endif + +SUBDIRS = quartz utils $(X11APP_SUBDIRS) +DIST_SUBDIRS = quartz utils apple launcher bin_PROGRAMS = Xquartz man1_MANS = Xquartz.man @@ -26,7 +31,6 @@ Xquartz_LDADD = \ ./quartz/libXquartz.a \ ./quartz/xpr/libxpr.a \ $(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 \ @@ -60,47 +64,8 @@ Xquartz_LDFLAGS = \ -Wl,-framework,CoreAudio \ -Wl,-framework,IOKit -if X11APP -bin_SCRIPTS = x11app x11launcher - -x11app: - cd apple && xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)" - -x11launcher: - cd launcher && xcodebuild CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ARCHS="$(X11APP_ARCHS)" - -x11app-install: - cd apple && xcodebuild install DSTROOT=$(DESTDIR) INSTALL_PATH=$(prefix) DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" - -x11launcher-install: - cd launcher && xcodebuild install DSTROOT=$(DESTDIR) INSTALL_PATH=$(APPLE_APPLICATIONS_DIR) DEPLOYMENT_LOCATION=YES SKIP_INSTALL=NO ARCHS="$(X11APP_ARCHS)" - -x11app-clean: - rm -rf apple/build - -x11launcher-clean: - rm -rf launcher/build - -install-data-hook: x11app-install x11launcher-install -clean-local: x11app-clean x11launcher-clean - -endif - EXTRA_DIST = \ Xquartz.man \ darwinClut8.h \ darwin.h \ - darwinKeyboard.h \ - apple/Info.plist \ - apple/X11.icns \ - apple/bundle-main.c \ - apple/English.lproj/InfoPlist.strings \ - apple/English.lproj/Localizable.strings \ - apple/English.lproj/main.nib/classes.nib \ - apple/English.lproj/main.nib/info.nib \ - apple/English.lproj/main.nib/keyedobjects.nib \ - apple/X11.xcodeproj/project.pbxproj \ - launcher/bundle-main.c \ - launcher/Info.plist \ - launcher/X11.icns \ - launcher/X11.xcodeproj/project.pbxproj + darwinKeyboard.h diff --git a/hw/darwin/apple/Makefile.am b/hw/darwin/apple/Makefile.am new file mode 100644 index 000000000..02a2c25b1 --- /dev/null +++ b/hw/darwin/apple/Makefile.am @@ -0,0 +1,23 @@ +bin_SCRIPTS = x11app + +.PHONY: x11app + +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)" + +clean-local: + rm -rf build + +EXTRA_DIST = \ + Info.plist \ + X11.icns \ + bundle-main.c \ + English.lproj/InfoPlist.strings \ + English.lproj/Localizable.strings \ + English.lproj/main.nib/classes.nib \ + English.lproj/main.nib/info.nib \ + English.lproj/main.nib/keyedobjects.nib \ + X11.xcodeproj/project.pbxproj diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index 646bb2488..e2e482955 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -27,7 +27,8 @@ #ifndef _DARWIN_H #define _DARWIN_H -#include "dix-config.h" +// #include "dix-config.h" // This makes us crash for some reason... +#define SHAPE #include #include "inputstr.h" diff --git a/hw/darwin/launcher/Makefile.am b/hw/darwin/launcher/Makefile.am new file mode 100644 index 000000000..c291731d1 --- /dev/null +++ b/hw/darwin/launcher/Makefile.am @@ -0,0 +1,18 @@ +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/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am index 54e6c30a7..fe6642983 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/darwin/quartz/Makefile.am @@ -1,8 +1,8 @@ noinst_LIBRARIES = libXQuartz.a -AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) -AM_OBJCFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) -AM_CPPFLAGS = $(XORG_INCS) \ +AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) +AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) +AM_CPPFLAGS = \ -DHAS_KL_API \ -I$(srcdir) -I$(srcdir)/.. \ -I$(top_srcdir)/miext/rootless diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/darwin/quartz/xpr/Makefile.am index 4fe6e23b6..8f482f1dc 100644 --- a/hw/darwin/quartz/xpr/Makefile.am +++ b/hw/darwin/quartz/xpr/Makefile.am @@ -1,6 +1,6 @@ noinst_LIBRARIES = libxpr.a -AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) -AM_CPPFLAGS = $(XORG_INCS) \ +AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) +AM_CPPFLAGS = \ -DHAVE_XORG_CONFIG_H \ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ -I$(top_srcdir)/miext \ @@ -9,14 +9,14 @@ AM_CPPFLAGS = $(XORG_INCS) \ libxpr_a_SOURCES = \ appledri.c \ - dri.c \ - xprAppleWM.c \ - xprCursor.c \ - xprFrame.c \ - xprScreen.c \ - x-hash.c \ - x-hook.c \ - x-list.c + dri.c \ + xprAppleWM.c \ + xprCursor.c \ + xprFrame.c \ + xprScreen.c \ + x-hash.c \ + x-hook.c \ + x-list.c EXTRA_DIST = \ dri.h \ diff --git a/miext/rootless/Makefile.am b/miext/rootless/Makefile.am index 8dae6d237..aa8528e6a 100644 --- a/miext/rootless/Makefile.am +++ b/miext/rootless/Makefile.am @@ -1,22 +1,19 @@ -AM_CFLAGS = \ - $(DIX_CFLAGS) \ - $(XORG_CFLAGS) - -INCLUDES = -I$(top_srcdir)/hw/xfree86/os-support +AM_CFLAGS = $(DIX_CFLAGS) $(XSERVER_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/hw/xfree86/os-support SUBDIRS = safeAlpha accel noinst_LTLIBRARIES = librootless.la librootless_la_SOURCES = \ rootlessCommon.c \ - rootlessCommon.h \ - rootlessConfig.h \ rootlessGC.c \ - rootless.h \ rootlessScreen.c \ rootlessValTree.c \ - rootlessWindow.c \ - rootlessWindow.h + rootlessWindow.c EXTRA_DIST = \ - README.txt + README.txt \ + rootless.h \ + rootlessCommon.h \ + rootlessConfig.h \ + rootlessWindow.h diff --git a/miext/rootless/accel/Makefile.am b/miext/rootless/accel/Makefile.am index c49d5fb47..ca41653b7 100644 --- a/miext/rootless/accel/Makefile.am +++ b/miext/rootless/accel/Makefile.am @@ -1,18 +1,15 @@ -AM_CFLAGS = \ - $(DIX_CFLAGS) \ - $(XORG_CFLAGS) - -INCLUDES = -I$(srcdir)/.. -I$(top_srcdir)/hw/xfree86/os-support - +AM_CFLAGS = $(DIX_CFLAGS) $(XSERVER_CFLAGS) +AM_CPPFLAGS = -I$(srcdir)/.. -I$(top_srcdir)/hw/xfree86/os-support noinst_LTLIBRARIES = librlAccel.la -librlAccel_la_SOURCES = rlAccel.c \ - rlBlt.c \ - rlCopy.c \ - rlFill.c \ - rlFillRect.c \ - rlFillSpans.c \ - rlGlyph.c \ - rlSolid.c +librlAccel_la_SOURCES = \ + rlAccel.c \ + rlBlt.c \ + rlCopy.c \ + rlFill.c \ + rlFillRect.c \ + rlFillSpans.c \ + rlGlyph.c \ + rlSolid.c EXTRA_DIST = rlAccel.h diff --git a/miext/rootless/safeAlpha/Makefile.am b/miext/rootless/safeAlpha/Makefile.am index 823fb777d..a22afb6a2 100644 --- a/miext/rootless/safeAlpha/Makefile.am +++ b/miext/rootless/safeAlpha/Makefile.am @@ -1,9 +1,5 @@ -AM_CFLAGS = \ - $(DIX_CFLAGS) \ - $(XORG_CFLAGS) - -INCLUDES = -I$(srcdir)/.. -I$(top_srcdir)/hw/xfree86/os-support - +AM_CFLAGS = $(DIX_CFLAGS) $(XSERVER_CFLAGS) +AM_CPPFLAGS = -I$(srcdir)/.. -I$(top_srcdir)/hw/xfree86/os-support noinst_LTLIBRARIES = libsafeAlpha.la libsafeAlpha_la_SOURCES = safeAlphaPicture.c From edebe76cfdb31072d18a6fcd3ee8f1d95006855f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 27 Nov 2007 10:22:44 +1030 Subject: [PATCH 343/454] Xi: set DeviceXXXState's length fields to the correct size of the struct. Setting it to the size of a pointer is an interesting but equally wrong approach. Luckily Xlib never used this field anyway so nobody got hurt so far. Spotted by Simon Thum. (cherry picked from commit 0f2398d06ce591724e388b3270800c5e22b3de2d) --- Xi/getdctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Xi/getdctl.c b/Xi/getdctl.c index 8a84e91bc..7175dc253 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -128,7 +128,7 @@ static void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts, xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf; calib->control = DEVICE_ABS_CALIB; - calib->length = sizeof(calib); + calib->length = sizeof(xDeviceAbsCalibState); calib->min_x = dts->min_x; calib->max_x = dts->max_x; calib->min_y = dts->min_y; @@ -159,7 +159,7 @@ static void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts, xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf; area->control = DEVICE_ABS_AREA; - area->length = sizeof(area); + area->length = sizeof(xDeviceAbsAreaState); area->offset_x = dts->offset_x; area->offset_y = dts->offset_y; area->width = dts->width; @@ -185,7 +185,7 @@ static void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf) xDeviceCoreState *c = (xDeviceCoreState *) buf; c->control = DEVICE_CORE; - c->length = sizeof(c); + c->length = sizeof(xDeviceCoreState); c->status = dev->coreEvents; c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer); @@ -202,7 +202,7 @@ static void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf) xDeviceEnableState *e = (xDeviceEnableState *) buf; e->control = DEVICE_ENABLE; - e->length = sizeof(e); + e->length = sizeof(xDeviceEnableState); e->enable = dev->enabled; if (client->swapped) { From 23b8ca8a373d919225de9739af7b064f650eceec Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 27 Nov 2007 13:20:40 -0500 Subject: [PATCH 344/454] RANDR 1.2: Only enable unknown outputs if there are no connected outputs. Otherwise you end up with a confusing initial geometry, and xscreensaver and friends get very angry. --- hw/xfree86/modes/xf86Crtc.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 8595d960c..fc80f5202 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -463,7 +463,7 @@ xf86OutputSetMonitor (xf86OutputPtr output) } static Bool -xf86OutputEnabled (xf86OutputPtr output) +xf86OutputEnabled (xf86OutputPtr output, Bool strict) { Bool enable, disable; @@ -481,8 +481,16 @@ xf86OutputEnabled (xf86OutputPtr output) "Output %s disabled by config file\n", output->name); return FALSE; } - /* otherwise, enable if it is not disconnected */ - enable = output->status != XF86OutputStatusDisconnected; + + /* If not, try to only light up the ones we know are connected */ + if (strict) { + enable = output->status == XF86OutputStatusConnected; + } + /* But if that fails, try to light up even outputs we're unsure of */ + else { + enable = output->status != XF86OutputStatusDisconnected; + } + xf86DrvMsg (output->scrn->scrnIndex, X_INFO, "Output %s %sconnected\n", output->name, enable ? "" : "dis"); return enable; @@ -1571,7 +1579,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) Rotation target_rotation = RR_Rotate_0; xf86CrtcPtr *crtcs; DisplayModePtr *modes; - Bool *enabled; + Bool *enabled, any_enabled = FALSE; int width; int height; @@ -1604,9 +1612,23 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) xf86OutputPtr output = config->output[o]; modes[o] = NULL; - enabled[o] = xf86OutputEnabled (output); + any_enabled |= (enabled[o] = xf86OutputEnabled (output, TRUE)); } + if (!any_enabled) + { + xf86DrvMsg (scrn->scrnIndex, X_WARNING, + "No outputs definitely connected, trying again...\n"); + + for (o = 0; o < config->num_output; o++) + { + xf86OutputPtr output = config->output[o]; + + modes[o] = NULL; + enabled[o] = xf86OutputEnabled (output, FALSE); + } + } + /* * User preferred > preferred > other modes */ From 725710fd0bc990b2c35e4c76128ef1c668013299 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 29 Nov 2007 19:40:53 +1100 Subject: [PATCH 345/454] randr: make randr code not segfault when xinerama set --- hw/xfree86/modes/xf86RandR12.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index 61a7db3bd..8fbb877b1 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -538,7 +538,11 @@ xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; int c; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); +#endif + if (!xf86RandR12Index) + return; +#if RANDR_12_INTERFACE for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; @@ -1062,12 +1066,15 @@ static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen) { int c; + XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + if (!xf86RandR12Index) + return TRUE; + for (c = 0; c < config->num_crtc; c++) - xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc); - + xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc); RRScreenSetSizeRange (pScreen, config->minWidth, config->minHeight, config->maxWidth, config->maxHeight); @@ -1087,7 +1094,7 @@ xf86RandR12TellChanged (ScreenPtr pScreen) XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); int c; - if (!randrp) + if (!xf86RandR12Index) return; xf86RandR12SetInfo12 (pScreen); for (c = 0; c < config->num_crtc; c++) From 89c3dfe41e3a17a4f27b20e23623dc5777670feb Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 29 Nov 2007 19:57:24 +1100 Subject: [PATCH 346/454] modes: use xf86RandR12Index to stop illegal access xf86RandR12Index set to -1, and if initialised it gets 0 or higher. This allows the server to start with xinerama turned on with only one head --- hw/xfree86/modes/xf86RandR12.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index 8fbb877b1..bb7f94581 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -59,7 +59,7 @@ static Bool xf86RandR12Init12 (ScreenPtr pScreen); static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen); #endif -static int xf86RandR12Index; +static int xf86RandR12Index = -1; static int xf86RandR12Generation; #define XF86RANDRINFO(p) \ @@ -340,10 +340,12 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen, PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen); Bool ret = FALSE; - if (randrp->virtualX == -1 || randrp->virtualY == -1) - { - randrp->virtualX = pScrn->virtualX; - randrp->virtualY = pScrn->virtualY; + if (xf86RandR12Index != -1) { + if (randrp->virtualX == -1 || randrp->virtualY == -1) + { + randrp->virtualX = pScrn->virtualX; + randrp->virtualY = pScrn->virtualY; + } } if (pRoot && pScrn->vtSema) (*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE); @@ -366,7 +368,7 @@ finish: if (pRoot && pScrn->vtSema) (*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE); #if RANDR_12_INTERFACE - if (WindowTable[pScreen->myNum] && ret) + if ((xf86RandR12Index != -1) && WindowTable[pScreen->myNum] && ret) RRScreenSizeNotify (pScreen); #endif return ret; @@ -466,6 +468,9 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) mmHeight); } + if (xf86RandR12Index == -1) + return TRUE; + if (randrp->virtualX == -1 || randrp->virtualY == -1) { randrp->virtualX = pScrn->virtualX; @@ -533,15 +538,17 @@ xf86RandR12Init (ScreenPtr pScreen) _X_EXPORT void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) { - XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + XF86RandRInfoPtr randrp; #if RANDR_12_INTERFACE ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; int c; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); #endif - if (!xf86RandR12Index) + + if (xf86RandR12Index == -1) return; + randrp = XF86RANDRINFO(pScreen); #if RANDR_12_INTERFACE for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; @@ -1066,11 +1073,10 @@ static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen) { int c; - XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); - if (!xf86RandR12Index) + if (xf86RandR12Index == -1) return TRUE; for (c = 0; c < config->num_crtc; c++) @@ -1091,11 +1097,11 @@ xf86RandR12TellChanged (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); - XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); int c; - if (!xf86RandR12Index) + if (xf86RandR12Index == -1) return; + xf86RandR12SetInfo12 (pScreen); for (c = 0; c < config->num_crtc; c++) xf86RandR12CrtcNotify (config->crtc[c]->randr_crtc); From 38397560612424b5b348f34c1a0bea8c47a574be Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 28 Nov 2007 23:07:41 -0800 Subject: [PATCH 347/454] Darwin: Removed support for darwinSwapAltMeta (cherry picked from commit 3d153c8fa40986d194b7701f5eafa0080e32399a) --- hw/darwin/darwin.c | 6 -- hw/darwin/darwin.h | 3 +- hw/darwin/darwinKeyboard.c | 123 +++++++++--------------------- hw/darwin/quartz/X11Application.m | 3 - 4 files changed, 35 insertions(+), 100 deletions(-) diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index b08770c10..87edd9a71 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -100,7 +100,6 @@ int darwinDesiredDepth = -1; int darwinDesiredRefresh = -1; char *darwinKeymapFile = "USA.keymapping"; int darwinSyncKeymap = FALSE; -int darwinSwapAltMeta = FALSE; // modifier masks for faking mouse buttons int darwinFakeMouse2Mask = NX_ALTERNATEMASK; @@ -766,11 +765,6 @@ int ddxProcessArgument( int argc, char *argv[], int i ) return 2; } - if ( !strcmp( argv[i], "-swapAltMeta" ) ) { - darwinSwapAltMeta = 1; - return 1; - } - if ( !strcmp( argv[i], "-keymap" ) ) { if ( i == argc-1 ) { FatalError( "-keymap must be followed by a filename\n" ); diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index e2e482955..4f118470f 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -27,7 +27,7 @@ #ifndef _DARWIN_H #define _DARWIN_H -// #include "dix-config.h" // This makes us crash for some reason... +//#include "dix-config.h" // This crashes us for some reason... #define SHAPE #include @@ -113,7 +113,6 @@ extern int darwinMouseAccelChange; extern int darwinFakeButtons; extern int darwinFakeMouse2Mask; extern int darwinFakeMouse3Mask; -extern int darwinSwapAltMeta; extern char *darwinKeymapFile; extern int darwinSyncKeymap; extern unsigned int darwinDesiredWidth, darwinDesiredHeight; diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index 47acb65c5..b51e2da5b 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -58,10 +58,7 @@ // Define this to get a diagnostic output to stderr which is helpful // in determining how the X server is interpreting the Darwin keymap. -#undef DUMP_DARWIN_KEYMAP - -/* Define this to use Alt for Mode_switch. */ -//#define ALT_IS_MODE_SWITCH 1 +#define DUMP_DARWIN_KEYMAP #include #include @@ -77,9 +74,6 @@ #define MetaMask Mod2Mask #define FunctionMask Mod3Mask -// FIXME: It would be nice to support some of the extra keys in XF86keysym.h, -// at least the volume controls that now ship on every Apple keyboard. - #define UK(a) NoSymbol // unknown symbol static KeySym const next_to_x[256] = { @@ -513,7 +507,7 @@ Bool DarwinParseNXKeyMapping( break; case NX_MODIFIERKEY_ALTERNATE: info->keyMap[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Mode_switch : XK_Alt_R); + (left ? XK_Alt_L : XK_Alt_R); break; case NX_MODIFIERKEY_COMMAND: info->keyMap[keyCode * GLYPHS_PER_KEY] = @@ -638,27 +632,23 @@ Bool DarwinParseNXKeyMapping( return TRUE; } - /* * DarwinBuildModifierMaps * Use the keyMap field of keyboard info structure to populate * the modMap and modifierKeycodes fields. */ static void -DarwinBuildModifierMaps( - darwinKeyboardInfo *info) -{ +DarwinBuildModifierMaps(darwinKeyboardInfo *info) { int i; KeySym *k; memset(info->modMap, NoSymbol, sizeof(info->modMap)); memset(info->modifierKeycodes, 0, sizeof(info->modifierKeycodes)); - for (i = 0; i < NUM_KEYCODES; i++) - { + for (i = 0; i < NUM_KEYCODES; i++) { k = info->keyMap + i * GLYPHS_PER_KEY; - switch (k[0]) { + switch (*k) { case XK_Shift_L: info->modifierKeycodes[NX_MODIFIERKEY_SHIFT][0] = i; info->modMap[MIN_KEYCODE + i] = ShiftMask; @@ -728,34 +718,9 @@ DarwinBuildModifierMaps( info->modMap[MIN_KEYCODE + i] = Mod3Mask; break; } - - if (darwinSwapAltMeta) - { - switch (k[0]) - { - case XK_Alt_L: - k[0] = XK_Meta_L; - break; - case XK_Alt_R: - k[0] = XK_Meta_R; - break; - case XK_Meta_L: - k[0] = XK_Alt_L; - break; - case XK_Meta_R: - k[0] = XK_Alt_R; - break; - } - } - -#if ALT_IS_MODE_SWITCH - if (k[0] == XK_Alt_L) - k[0] = XK_Mode_switch; -#endif } } - /* * DarwinLoadKeyboardMapping * Load the keyboard map from a file or system and convert @@ -764,9 +729,17 @@ DarwinBuildModifierMaps( static void DarwinLoadKeyboardMapping(KeySymsRec *keySyms) { + int i; + KeySym *k; + memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap)); + /* TODO: Clean this up + * DarwinModeReadSystemKeymap is in quartz/quartzKeyboard.c + * DarwinParseNXKeyMapping is here + */ if (!DarwinParseNXKeyMapping(&keyInfo)) { + DEBUG_LOG("DarwinParseNXKeyMapping returned 0... running DarwinModeReadSystemKeymap().\n"); if (!DarwinModeReadSystemKeymap(&keyInfo)) { FatalError("Could not build a valid keymap."); } @@ -775,20 +748,18 @@ DarwinLoadKeyboardMapping(KeySymsRec *keySyms) DarwinBuildModifierMaps(&keyInfo); #ifdef DUMP_DARWIN_KEYMAP - ErrorF("Darwin -> X converted keyboard map\n"); - for (i = 0, k = info->keyMap; i < NX_NUMKEYCODES; + DEBUG_LOG("Darwin -> X converted keyboard map\n"); + for (i = 0, k = keyInfo.keyMap; i < NX_NUMKEYCODES; i++, k += GLYPHS_PER_KEY) { int j; - ErrorF("0x%02x:", i); for (j = 0; j < GLYPHS_PER_KEY; j++) { if (k[j] == NoSymbol) { - ErrorF("\tNoSym"); + DEBUG_LOG("0x%02x:\tNoSym\n", i); } else { - ErrorF("\t0x%x", k[j]); + DEBUG_LOG("0x%02x:\t0x%lx\n", i, k[j]); } } - ErrorF("\n"); } #endif @@ -936,32 +907,6 @@ int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) return key; } -/* - * DarwinModifierNXMaskToNXKeyCode - * Returns 0 if mask is not a known modifier mask. - */ -int DarwinModifierNXMaskToNXKeyCode(int mask) -{ - switch (mask) { - case NX_ALPHASHIFTMASK: return XK_Caps_Lock; - case NX_SHIFTMASK: ErrorF("Warning: Received NX_SHIFTMASK, treating as NX_DEVICELSHIFTKEYMASK\n"); - case NX_DEVICELSHIFTKEYMASK: return NX_MODIFIERKEY_SHIFT; //XK_Shift_L; - case NX_DEVICERSHIFTKEYMASK: return NX_MODIFIERKEY_RSHIFT; //XK_Shift_R; - case NX_CONTROLMASK: ErrorF("Warning: Received NX_CONTROLMASK, treating as NX_DEVICELCTLKEYMASK\n"); - case NX_DEVICELCTLKEYMASK: return XK_Control_L; - case NX_DEVICERCTLKEYMASK: return XK_Control_R; - case NX_ALTERNATEMASK: ErrorF("Warning: Received NX_ALTERNATEMASK, treating as NX_DEVICELALTKEYMASK\n"); - case NX_DEVICELALTKEYMASK: return XK_Alt_L; - case NX_DEVICERALTKEYMASK: return XK_Alt_R; - case NX_COMMANDMASK: ErrorF("Warning: Received NX_COMMANDMASK, treating as NX_DEVICELCMDKEYMASK\n"); - case NX_DEVICELCMDKEYMASK: return XK_Meta_L; - case NX_DEVICERCMDKEYMASK: return XK_Meta_R; - case NX_NUMERICPADMASK: return XK_Num_Lock; - case NX_HELPMASK: return XK_Help; - case NX_SECONDARYFNMASK: return XK_Control_L; // this seems very wrong, but is what the old code did - } -} - /* * DarwinModifierNXMaskToNXKey * Returns -1 if mask is not a known modifier mask. @@ -997,25 +942,25 @@ int DarwinModifierNXMaskToNXKey(int mask) return -1; } -char * DarwinModifierNXMaskTostring(int mask) +const char *DarwinModifierNXMaskTostring(int mask) { switch (mask) { - case NX_ALPHASHIFTMASK: return "NX_ALPHASHIFTMASK"; - case NX_SHIFTMASK: return "NX_SHIFTMASK"; - case NX_DEVICELSHIFTKEYMASK: return "NX_DEVICELSHIFTKEYMASK"; - case NX_DEVICERSHIFTKEYMASK: return "NX_DEVICERSHIFTKEYMASK"; - case NX_CONTROLMASK: return "NX_CONTROLMASK"; - case NX_DEVICELCTLKEYMASK: return "NX_DEVICELCTLKEYMASK"; - case NX_DEVICERCTLKEYMASK: return "NX_DEVICERCTLKEYMASK"; - case NX_ALTERNATEMASK: return "NX_ALTERNATEMASK"; - case NX_DEVICELALTKEYMASK: return "NX_DEVICELALTKEYMASK"; - case NX_DEVICERALTKEYMASK: return "NX_DEVICERALTKEYMASK"; - case NX_COMMANDMASK: return "NX_COMMANDMASK"; - case NX_DEVICELCMDKEYMASK: return "NX_DEVICELCMDKEYMASK"; - case NX_DEVICERCMDKEYMASK: return "NX_DEVICERCMDKEYMASK"; - case NX_NUMERICPADMASK: return "NX_NUMERICPADMASK"; - case NX_HELPMASK: return "NX_HELPMASK"; - case NX_SECONDARYFNMASK: return "NX_SECONDARYFNMASK"; + case NX_ALPHASHIFTMASK: return "NX_ALPHASHIFTMASK"; + case NX_SHIFTMASK: return "NX_SHIFTMASK"; + case NX_DEVICELSHIFTKEYMASK: return "NX_DEVICELSHIFTKEYMASK"; + case NX_DEVICERSHIFTKEYMASK: return "NX_DEVICERSHIFTKEYMASK"; + case NX_CONTROLMASK: return "NX_CONTROLMASK"; + case NX_DEVICELCTLKEYMASK: return "NX_DEVICELCTLKEYMASK"; + case NX_DEVICERCTLKEYMASK: return "NX_DEVICERCTLKEYMASK"; + case NX_ALTERNATEMASK: return "NX_ALTERNATEMASK"; + case NX_DEVICELALTKEYMASK: return "NX_DEVICELALTKEYMASK"; + case NX_DEVICERALTKEYMASK: return "NX_DEVICERALTKEYMASK"; + case NX_COMMANDMASK: return "NX_COMMANDMASK"; + case NX_DEVICELCMDKEYMASK: return "NX_DEVICELCMDKEYMASK"; + case NX_DEVICERCMDKEYMASK: return "NX_DEVICERCMDKEYMASK"; + case NX_NUMERICPADMASK: return "NX_NUMERICPADMASK"; + case NX_HELPMASK: return "NX_HELPMASK"; + case NX_SECONDARYFNMASK: return "NX_SECONDARYFNMASK"; } return "unknown mask"; } diff --git a/hw/darwin/quartz/X11Application.m b/hw/darwin/quartz/X11Application.m index 60d11c5ed..a43d536d3 100644 --- a/hw/darwin/quartz/X11Application.m +++ b/hw/darwin/quartz/X11Application.m @@ -612,9 +612,6 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { quartzXpluginOptions = [self prefs_get_integer:@PREFS_XP_OPTIONS default:quartzXpluginOptions]; #endif - - darwinSwapAltMeta = [self prefs_get_boolean:@PREFS_SWAP_ALT_META - default:darwinSwapAltMeta]; darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS default:darwinFakeButtons]; if (darwinFakeButtons) { From 8a079be0dd0f2ce37868988cde4ac8895522b088 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 29 Nov 2007 02:19:22 -0800 Subject: [PATCH 348/454] Darwin: #ifdefs around dix-config.h include and NDEBUG/assert.h workaround. (cherry picked from commit d2b768890f0878ae4e3fec8f7219e82b79256133) --- hw/darwin/darwin.c | 2 ++ hw/darwin/darwin.h | 3 --- hw/darwin/darwinKeyboard.c | 14 +++++++++++++- hw/darwin/darwinXinput.c | 4 ++++ hw/darwin/quartz/X11Application.m | 4 ++++ hw/darwin/quartz/X11Controller.m | 4 ++++ hw/darwin/quartz/applewm.c | 2 ++ hw/darwin/quartz/cr/XView.m | 3 +++ hw/darwin/quartz/cr/crAppleWM.m | 2 ++ hw/darwin/quartz/cr/crFrame.m | 2 ++ hw/darwin/quartz/cr/crScreen.m | 2 ++ hw/darwin/quartz/fullscreen/fullscreen.c | 2 ++ hw/darwin/quartz/fullscreen/quartzCursor.c | 2 ++ hw/darwin/quartz/pseudoramiX.c | 5 +++-- hw/darwin/quartz/quartz.c | 2 ++ hw/darwin/quartz/quartzAudio.c | 2 ++ hw/darwin/quartz/quartzCocoa.m | 2 ++ hw/darwin/quartz/quartzCursor.c | 2 ++ hw/darwin/quartz/quartzKeyboard.c | 2 ++ hw/darwin/quartz/quartzPasteboard.c | 2 ++ hw/darwin/quartz/quartzStartup.c | 11 +++++++++++ hw/darwin/quartz/xpr/Makefile.am | 1 - hw/darwin/quartz/xpr/appledri.c | 2 ++ hw/darwin/quartz/xpr/dri.c | 2 ++ hw/darwin/quartz/xpr/x-hash.c | 2 ++ hw/darwin/quartz/xpr/x-hook.c | 2 ++ hw/darwin/quartz/xpr/x-list.c | 2 ++ hw/darwin/quartz/xpr/xprAppleWM.c | 2 ++ hw/darwin/quartz/xpr/xprCursor.c | 2 ++ hw/darwin/quartz/xpr/xprFrame.c | 2 ++ hw/darwin/quartz/xpr/xprScreen.c | 2 ++ 31 files changed, 86 insertions(+), 7 deletions(-) diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index 87edd9a71..b46b7687e 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -29,7 +29,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include #include diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index 4f118470f..d7d2af44f 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -27,9 +27,6 @@ #ifndef _DARWIN_H #define _DARWIN_H -//#include "dix-config.h" // This crashes us for some reason... -#define SHAPE - #include #include "inputstr.h" #include "scrnintstr.h" diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index b51e2da5b..7f7b7c74a 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -56,9 +56,13 @@ =========================================================================== */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + // Define this to get a diagnostic output to stderr which is helpful // in determining how the X server is interpreting the Darwin keymap. -#define DUMP_DARWIN_KEYMAP +// #define DUMP_DARWIN_KEYMAP #include #include @@ -69,7 +73,15 @@ #include // For the NXSwap* #include "darwin.h" #include "darwinKeyboard.h" + +#ifdef NDEBUG +#undef NDEBUG #include +#define NDEBUG 1 +#else +#include +#endif + #define AltMask Mod1Mask #define MetaMask Mod2Mask #define FunctionMask Mod3Mask diff --git a/hw/darwin/darwinXinput.c b/hw/darwin/darwinXinput.c index 260d72af7..ee456a43a 100644 --- a/hw/darwin/darwinXinput.c +++ b/hw/darwin/darwinXinput.c @@ -52,6 +52,10 @@ SOFTWARE. ********************************************************/ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #define NEED_EVENTS #include #include diff --git a/hw/darwin/quartz/X11Application.m b/hw/darwin/quartz/X11Application.m index a43d536d3..514bc4995 100644 --- a/hw/darwin/quartz/X11Application.m +++ b/hw/darwin/quartz/X11Application.m @@ -27,6 +27,10 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #include "quartzCommon.h" #import "X11Application.h" diff --git a/hw/darwin/quartz/X11Controller.m b/hw/darwin/quartz/X11Controller.m index 6929566f7..0f64e4571 100644 --- a/hw/darwin/quartz/X11Controller.m +++ b/hw/darwin/quartz/X11Controller.m @@ -27,6 +27,10 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #define DEFAULT_PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin" #include "quartzCommon.h" diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index 20d1b4f82..72dca28e7 100644 --- a/hw/darwin/quartz/applewm.c +++ b/hw/darwin/quartz/applewm.c @@ -25,7 +25,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartzCommon.h" diff --git a/hw/darwin/quartz/cr/XView.m b/hw/darwin/quartz/cr/XView.m index 8379f9476..130b15f59 100644 --- a/hw/darwin/quartz/cr/XView.m +++ b/hw/darwin/quartz/cr/XView.m @@ -30,10 +30,13 @@ * 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 diff --git a/hw/darwin/quartz/cr/crAppleWM.m b/hw/darwin/quartz/cr/crAppleWM.m index a0259c3f8..246f52170 100644 --- a/hw/darwin/quartz/cr/crAppleWM.m +++ b/hw/darwin/quartz/cr/crAppleWM.m @@ -26,7 +26,9 @@ * 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" diff --git a/hw/darwin/quartz/cr/crFrame.m b/hw/darwin/quartz/cr/crFrame.m index 79697fbac..86c75d2e4 100644 --- a/hw/darwin/quartz/cr/crFrame.m +++ b/hw/darwin/quartz/cr/crFrame.m @@ -27,7 +27,9 @@ * 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" diff --git a/hw/darwin/quartz/cr/crScreen.m b/hw/darwin/quartz/cr/crScreen.m index 504e7b37a..cc82afbd1 100644 --- a/hw/darwin/quartz/cr/crScreen.m +++ b/hw/darwin/quartz/cr/crScreen.m @@ -27,7 +27,9 @@ * 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" diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c index 2021ea2d3..c4a049f8f 100644 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ b/hw/darwin/quartz/fullscreen/fullscreen.c @@ -26,7 +26,9 @@ * 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" diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index 52477817e..3ffa1c3d8 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -28,7 +28,9 @@ * 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" diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index 787601b5d..b19c6050f 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -33,10 +33,11 @@ dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ -#include "pseudoramiX.h" - +#ifdef HAVE_DIX_CONFIG_H #include +#endif +#include "pseudoramiX.h" #include "extnsionst.h" #include "dixstruct.h" #include "window.h" diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index c95880ceb..2483d12d7 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -28,7 +28,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartzCommon.h" #include "quartz.h" diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c index 8a337daba..1eb099ba6 100644 --- a/hw/darwin/quartz/quartzAudio.c +++ b/hw/darwin/quartz/quartzAudio.c @@ -36,7 +36,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartzCommon.h" #include "quartzAudio.h" diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m index 48cadc60c..0086c5ca4 100644 --- a/hw/darwin/quartz/quartzCocoa.m +++ b/hw/darwin/quartz/quartzCocoa.m @@ -32,7 +32,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartzCommon.h" diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c index 15f555302..6e86acbc4 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -28,7 +28,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartzCommon.h" #include "quartzCursor.h" diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index 49c5bfdcd..b87249f33 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -31,7 +31,9 @@ prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartzCommon.h" diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c index 213019747..0cecff54a 100644 --- a/hw/darwin/quartz/quartzPasteboard.c +++ b/hw/darwin/quartz/quartzPasteboard.c @@ -30,7 +30,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartzPasteboard.h" diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c index 6f45949be..e20c16b7a 100644 --- a/hw/darwin/quartz/quartzStartup.c +++ b/hw/darwin/quartz/quartzStartup.c @@ -27,6 +27,10 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + #include #include #include @@ -35,7 +39,14 @@ #include "quartz.h" #include "opaque.h" #include "micmap.h" + +#ifdef NDEBUG +#undef NDEBUG #include +#define NDEBUG 1 +#else +#include +#endif char **envpGlobal; // argcGlobal and argvGlobal // are from dix/globals.c diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/darwin/quartz/xpr/Makefile.am index 8f482f1dc..8980ad7d3 100644 --- a/hw/darwin/quartz/xpr/Makefile.am +++ b/hw/darwin/quartz/xpr/Makefile.am @@ -1,7 +1,6 @@ noinst_LIBRARIES = libxpr.a AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ - -DHAVE_XORG_CONFIG_H \ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ -I$(top_srcdir)/miext \ -I$(top_srcdir)/miext/rootless \ diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c index 45d1a7e0e..95a443976 100644 --- a/hw/darwin/quartz/xpr/appledri.c +++ b/hw/darwin/quartz/xpr/appledri.c @@ -35,7 +35,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #define NEED_REPLIES #define NEED_EVENTS diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index 4ade24916..e5591abcb 100644 --- a/hw/darwin/quartz/xpr/dri.c +++ b/hw/darwin/quartz/xpr/dri.c @@ -34,7 +34,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #ifdef XFree86LOADER #include "xf86.h" diff --git a/hw/darwin/quartz/xpr/x-hash.c b/hw/darwin/quartz/xpr/x-hash.c index d24e05c1f..55d28bacd 100644 --- a/hw/darwin/quartz/xpr/x-hash.c +++ b/hw/darwin/quartz/xpr/x-hash.c @@ -27,7 +27,9 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "x-hash.h" #include "x-list.h" diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/darwin/quartz/xpr/x-hook.c index e38d0edc5..bb873bbfb 100644 --- a/hw/darwin/quartz/xpr/x-hook.c +++ b/hw/darwin/quartz/xpr/x-hook.c @@ -27,7 +27,9 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "x-hook.h" #include diff --git a/hw/darwin/quartz/xpr/x-list.c b/hw/darwin/quartz/xpr/x-list.c index 356bb79a4..3596dd355 100644 --- a/hw/darwin/quartz/xpr/x-list.c +++ b/hw/darwin/quartz/xpr/x-list.c @@ -27,7 +27,9 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "x-list.h" #include diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/darwin/quartz/xpr/xprAppleWM.c index f639b55fe..5539c51cc 100644 --- a/hw/darwin/quartz/xpr/xprAppleWM.c +++ b/hw/darwin/quartz/xpr/xprAppleWM.c @@ -27,7 +27,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "xpr.h" #include "quartz/applewmExt.h" diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index 9892bcddf..160b5d908 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -29,7 +29,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartz/quartzCommon.h" #include "xpr.h" diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index ddb6d2dda..1b0ba9102 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -27,7 +27,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "xpr.h" #include "rootlessCommon.h" diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index b5f382ee5..28ed159fe 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -27,7 +27,9 @@ * use or other dealings in this Software without prior written authorization. */ +#ifdef HAVE_DIX_CONFIG_H #include +#endif #include "quartz/quartzCommon.h" #include "quartz/quartz.h" From f30abe30c5fea10e680aa12f3fe37ee8ce1a0201 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 30 Nov 2007 13:52:06 +1000 Subject: [PATCH 349/454] edid quirk for MAX 0x77e monitor From RH bugzilla 306441 --- hw/xfree86/modes/xf86EdidModes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c index 2f26a6450..777ef7e44 100644 --- a/hw/xfree86/modes/xf86EdidModes.c +++ b/hw/xfree86/modes/xf86EdidModes.c @@ -72,7 +72,8 @@ static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC) { /* Belinea 10 15 55 */ if (memcmp (DDC->vendor.name, "MAX", 4) == 0 && - DDC->vendor.prod_id == 1516) + ((DDC->vendor.prod_id == 1516) || + (DDC->vendor.prod_id == 0x77e))) return TRUE; /* Acer AL1706 */ From f54b28eeba119c42d0fcccfbe295306dd670221a Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 30 Nov 2007 16:09:23 -0800 Subject: [PATCH 350/454] Darwin: Undo focus-hack which didn't work right. --- hw/darwin/quartz/X11Application.m | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/darwin/quartz/X11Application.m b/hw/darwin/quartz/X11Application.m index 514bc4995..aef06990d 100644 --- a/hw/darwin/quartz/X11Application.m +++ b/hw/darwin/quartz/X11Application.m @@ -313,9 +313,6 @@ static void message_kit_thread (SEL selector, NSObject *arg) { } - (void) set_front_process:unused { - [NSApp activateIgnoringOtherApps:YES]; - - if ([self modalWindow] == nil) [self activateX:YES]; QuartzMessageServerThread(kXDarwinBringAllToFront, 0); } From f83d758dcc4878849a851c8466f6fa16b2b7cd8e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 30 Nov 2007 16:11:15 -0800 Subject: [PATCH 351/454] Darwin: properly implemented xcb check for stale sockets (cherry picked from commit f543cb8fbb3d9213cb03396f4252ab9821319993) --- hw/darwin/apple/bundle-main.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/hw/darwin/apple/bundle-main.c b/hw/darwin/apple/bundle-main.c index 452da768a..d46e7b2e8 100644 --- a/hw/darwin/apple/bundle-main.c +++ b/hw/darwin/apple/bundle-main.c @@ -70,9 +70,8 @@ #include #include -#ifdef USE_XCB #include -#endif + #include #include @@ -597,25 +596,28 @@ static Boolean display_exists_p (int number) { char buf[64]; -#ifdef USE_XCB xcb_connection_t *conn; -#endif - + 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; - -#ifdef USE_XCB + if (access (buf, F_OK) != 0) + return FALSE; + sprintf (buf, ":%d", number); - conn = xcb_connect(buf, NULL); - if (conn == NULL) return FALSE; + if (xcb_connection_has_error(conn)) return FALSE; + xcb_disconnect(conn); -#endif - return TRUE; } From 9ad4560b3cbd42e647d6227746d4d037616d57cf Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 1 Dec 2007 16:23:23 -0800 Subject: [PATCH 352/454] Darwin: Alt is Mode_switch Switching to Mode_switch to maintain compatibility with Tiger X11. (cherry picked from commit 8a76c99c0ebbaf7375f3a9c75c4f7921a79024da) --- hw/darwin/darwinKeyboard.c | 9 +++++++-- hw/darwin/quartz/Makefile.am | 1 - hw/darwin/quartz/quartzKeyboard.c | 22 ++-------------------- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index 7f7b7c74a..851a10f11 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -518,8 +518,8 @@ Bool DarwinParseNXKeyMapping( (left ? XK_Control_L : XK_Control_R); break; case NX_MODIFIERKEY_ALTERNATE: - info->keyMap[keyCode * GLYPHS_PER_KEY] = - (left ? XK_Alt_L : XK_Alt_R); + info->keyMap[keyCode * GLYPHS_PER_KEY] = XK_Mode_switch; + // (left ? XK_Alt_L : XK_Alt_R); break; case NX_MODIFIERKEY_COMMAND: info->keyMap[keyCode * GLYPHS_PER_KEY] = @@ -709,6 +709,11 @@ DarwinBuildModifierMaps(darwinKeyboardInfo *info) { 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; diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am index fe6642983..f5199dfa2 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/darwin/quartz/Makefile.am @@ -3,7 +3,6 @@ noinst_LIBRARIES = libXQuartz.a AM_CFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_OBJCFLAGS = $(XSERVER_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = \ - -DHAS_KL_API \ -I$(srcdir) -I$(srcdir)/.. \ -I$(top_srcdir)/miext/rootless diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index b87249f33..ee485b8c5 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -44,8 +44,6 @@ #include "X11/keysym.h" #include "keysym2ucs.h" -#ifdef HAS_KL_API - #define HACK_MISSING 1 #define HACK_KEYPAD 1 @@ -68,11 +66,11 @@ const static struct { {55, XK_Meta_L}, {56, XK_Shift_L}, {57, XK_Caps_Lock}, - {58, XK_Alt_L}, + {58, XK_Mode_switch}, {59, XK_Control_L}, {60, XK_Shift_R}, - {61, XK_Alt_R}, + {61, XK_Mode_switch}, {62, XK_Control_R}, {63, XK_Meta_R}, @@ -332,19 +330,3 @@ DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) return TRUE; } - -#else /* !HAS_KL_API */ - -unsigned int -DarwinModeSystemKeymapSeed (void) -{ - return 0; -} - -Bool -DarwinModeReadSystemKeymap (darwinKeyboardInfo *info) -{ - return FALSE; -} - -#endif /* HAS_KL_API */ From 83ba1e167c1473ac7d85239a6ee5ed629353cb16 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Sat, 1 Dec 2007 18:28:19 -0800 Subject: [PATCH 353/454] added missing call to xcb_connect() (cherry picked from commit dc2fb323ee11f081d447605be151024f9e2487f9) --- hw/darwin/apple/bundle-main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/darwin/apple/bundle-main.c b/hw/darwin/apple/bundle-main.c index d46e7b2e8..10d2f2041 100644 --- a/hw/darwin/apple/bundle-main.c +++ b/hw/darwin/apple/bundle-main.c @@ -613,8 +613,9 @@ display_exists_p (int number) 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); From fa47910045c3700d8d668b5e214e5ffc1e8dc3e7 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 2 Dec 2007 12:39:05 -0500 Subject: [PATCH 354/454] Clean up many #if 0. --- Xext/EVI.c | 13 ----- Xext/bigreq.c | 13 ----- Xext/cup.c | 20 ------- Xext/dpms.c | 12 ---- Xext/fontcache.c | 7 --- Xext/mbuf.c | 6 -- Xext/mitmisc.c | 13 ----- Xext/panoramiX.c | 7 --- Xext/panoramiXSwap.c | 4 -- Xext/panoramiXprocs.c | 10 ---- Xext/saver.c | 6 -- Xext/shape.c | 6 -- Xext/xcmisc.c | 13 ----- Xext/xf86bigfont.c | 17 ------ Xext/xprint.c | 19 ------- Xext/xtest.c | 13 ----- cfb/Makefile.am | 1 - cfb/cfbcppl.c | 4 +- cfb/cfbmap.h | 126 ------------------------------------------ cfb/cfbmskbits.h | 37 ------------- cfb/cfbtab.h | 14 ----- dbe/dbe.c | 20 ------- dix/window.c | 7 --- fb/fbblt.c | 3 - include/dixevents.h | 22 -------- include/swapreq.h | 11 ---- mi/midispcur.c | 3 - miext/damage/damage.c | 3 - os/WaitFor.c | 15 ----- os/io.c | 5 +- os/osinit.c | 4 -- render/picturestr.h | 6 -- render/render.c | 118 --------------------------------------- 33 files changed, 3 insertions(+), 575 deletions(-) delete mode 100644 cfb/cfbtab.h diff --git a/Xext/EVI.c b/Xext/EVI.c index 8fe3481d4..4bd050ca7 100644 --- a/Xext/EVI.c +++ b/Xext/EVI.c @@ -35,9 +35,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "EVIstruct.h" #include "modinit.h" -#if 0 -static unsigned char XEVIReqCode = 0; -#endif static EviPrivPtr eviPriv; static int @@ -182,19 +179,9 @@ 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(); } } diff --git a/Xext/bigreq.c b/Xext/bigreq.c index fcd848aec..e7d410250 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -41,10 +41,6 @@ from The Open Group. #include "opaque.h" #include "modinit.h" -#if 0 -static unsigned char XBigReqCode; -#endif - static void BigReqResetProc( ExtensionEntry * /* extEntry */ ); @@ -54,18 +50,9 @@ 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 DeclareExtensionSecurity(XBigReqExtensionName, TRUE); } diff --git a/Xext/cup.c b/Xext/cup.c index 6bfa27837..0a83855e5 100644 --- a/Xext/cup.c +++ b/Xext/cup.c @@ -51,11 +51,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,20 +123,6 @@ 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, @@ -149,7 +130,6 @@ XcupExtensionInit (INITARGS) SProcDispatch, ResetProc, StandardMinorOpcode); -#endif /* PC servers initialize the desktop colors (citems) here! */ } diff --git a/Xext/dpms.c b/Xext/dpms.c index aced40639..b062b53aa 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -50,9 +50,6 @@ Equipment Corporation. #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 +73,9 @@ 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 } /*ARGSUSED*/ diff --git a/Xext/fontcache.c b/Xext/fontcache.c index c54340b61..0338d4a0f 100644 --- a/Xext/fontcache.c +++ b/Xext/fontcache.c @@ -67,10 +67,6 @@ static DISPATCH_PROC(SProcFontCacheGetCacheStatistics); static DISPATCH_PROC(SProcFontCacheQueryVersion); static DISPATCH_PROC(SProcFontCacheChangeCacheSettings); -#if 0 -static unsigned char FontCacheReqCode = 0; -#endif - void FontCacheExtensionInit(INITARGS) { @@ -84,9 +80,6 @@ FontCacheExtensionInit(INITARGS) SProcFontCacheDispatch, FontCacheResetProc, StandardMinorOpcode))) { -#if 0 - FontCacheReqCode = (unsigned char)extEntry->base; -#endif miscErrorBase = extEntry->errorBase; } } diff --git a/Xext/mbuf.c b/Xext/mbuf.c index 729656048..e646a7daa 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -59,9 +59,6 @@ in this Software without prior written authorization from The Open Group. #define ValidEventMasks (ExposureMask|MultibufferClobberNotifyMask|MultibufferUpdateNotifyMask) -#if 0 -static unsigned char MultibufferReqCode; -#endif static int MultibufferEventBase; static int MultibufferErrorBase; int MultibufferScreenIndex = -1; @@ -247,9 +244,6 @@ MultibufferExtensionInit() ProcMultibufferDispatch, SProcMultibufferDispatch, MultibufferResetProc, StandardMinorOpcode))) { -#if 0 - MultibufferReqCode = (unsigned char)extEntry->base; -#endif MultibufferEventBase = extEntry->eventBase; MultibufferErrorBase = extEntry->errorBase; EventSwapVector[MultibufferEventBase + MultibufferClobberNotify] = (EventSwapPtr) SClobberNotifyEvent; diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c index 924b88063..f89ee0c2b 100644 --- a/Xext/mitmisc.c +++ b/Xext/mitmisc.c @@ -42,10 +42,6 @@ in this Software without prior written authorization from The Open Group. #include #include "modinit.h" -#if 0 -static unsigned char MITReqCode; -#endif - static void MITResetProc( ExtensionEntry * /* extEntry */ ); @@ -60,18 +56,9 @@ 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 } /*ARGSUSED*/ diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 95df04320..d054cf8f1 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -65,9 +65,6 @@ extern VisualPtr glxMatchVisual(ScreenPtr pScreen, ScreenPtr pMatchScreen); #endif -#if 0 -static unsigned char PanoramiXReqCode = 0; -#endif /* * PanoramiX data declarations */ @@ -471,10 +468,6 @@ void PanoramiXExtensionInit(int argc, char *argv[]) break; } -#if 0 - PanoramiXReqCode = (unsigned char)extEntry->base; -#endif - /* * First make sure all the basic allocations succeed. If not, * run in non-PanoramiXeen mode. diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c index da445ffe1..cc9f61442 100644 --- a/Xext/panoramiXSwap.c +++ b/Xext/panoramiXSwap.c @@ -41,10 +41,6 @@ Equipment Corporation. #include "window.h" #include "windowstr.h" #include "pixmapstr.h" -#if 0 -#include -#include -#endif #include "panoramiX.h" #include #include "panoramiXsrv.h" diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index f51f65663..4bd525727 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -54,16 +54,6 @@ Equipment Corporation. #define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ CWDontPropagate | CWOverrideRedirect | CWCursor ) -#if 0 -extern void (* EventSwapVector[128]) (fsError *, fsError *); - -extern void Swap32Write(); -extern void SLHostsExtend(); -extern void SQColorsExtend(); -WriteSConnectionInfo(); -extern void WriteSConnSetupPrefix(); -#endif - /* Various of the DIX function interfaces were not designed to allow * the client->errorValue to be set on BadValue and other errors. * Rather than changing interfaces and breaking untold code we introduce diff --git a/Xext/saver.c b/Xext/saver.c index a590583df..44689fc53 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -61,9 +61,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); @@ -272,9 +269,6 @@ ScreenSaverExtensionInit(INITARGS) ProcScreenSaverDispatch, SProcScreenSaverDispatch, ScreenSaverResetProc, StandardMinorOpcode))) { -#if 0 - ScreenSaverReqCode = (unsigned char)extEntry->base; -#endif ScreenSaverEventBase = extEntry->eventBase; EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent; } diff --git a/Xext/shape.c b/Xext/shape.c index 6515a10d7..9c765f22e 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -111,9 +111,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,9 +151,6 @@ ShapeExtensionInit(void) ProcShapeDispatch, SProcShapeDispatch, ShapeResetProc, StandardMinorOpcode))) { -#if 0 - ShapeReqCode = (unsigned char)extEntry->base; -#endif ShapeEventBase = extEntry->eventBase; EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent; } diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 8c7a86e6a..a3d40e3ce 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -48,10 +48,6 @@ from The Open Group. #define UINT32_MAX 0xffffffffU #endif -#if 0 -static unsigned char XCMiscCode; -#endif - static void XCMiscResetProc( ExtensionEntry * /* extEntry */ ); @@ -68,18 +64,9 @@ static DISPATCH_PROC(SProcXCMiscGetXIDRange); void XCMiscExtensionInit(INITARGS) { -#if 0 - ExtensionEntry *extEntry; - - 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 DeclareExtensionSecurity(XCMiscExtensionName, TRUE); } diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index b20e82d6e..f26605eb9 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -86,10 +86,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,18 +145,6 @@ CheckForShmSyscall(void) void XFree86BigfontExtensionInit() { -#if 0 - ExtensionEntry* extEntry; - - if ((extEntry = AddExtension(XF86BIGFONTNAME, - XF86BigfontNumberEvents, - XF86BigfontNumberErrors, - ProcXF86BigfontDispatch, - SProcXF86BigfontDispatch, - XF86BigfontResetProc, - StandardMinorOpcode))) { - XF86BigfontReqCode = (unsigned char) extEntry->base; -#else if (AddExtension(XF86BIGFONTNAME, XF86BigfontNumberEvents, XF86BigfontNumberErrors, @@ -168,7 +152,6 @@ XFree86BigfontExtensionInit() SProcXF86BigfontDispatch, XF86BigfontResetProc, StandardMinorOpcode)) { -#endif #ifdef HAS_SHM #ifdef MUST_CHECK_FOR_SHM_SYSCALL /* diff --git a/Xext/xprint.c b/Xext/xprint.c index 4ac13e6d1..42c6e6a2a 100644 --- a/Xext/xprint.c +++ b/Xext/xprint.c @@ -389,25 +389,6 @@ XpCloseScreen(int index, ScreenPtr pScreen) return (*CloseScreen)(index, pScreen); } -#if 0 /* NOT USED */ -static void -FreeScreenEntry(XpScreenPtr pScreenEntry) -{ - XpDriverPtr pDriver; - - pDriver = pScreenEntry->drivers; - while(pDriver != (XpDriverPtr)NULL) - { - XpDriverPtr tmp; - - tmp = pDriver->next; - xfree(pDriver); - pDriver = tmp; - } - xfree(pScreenEntry); -} -#endif - /* * XpRegisterInitFunc tells the print extension which screens * are printers as opposed to displays, and what drivers are diff --git a/Xext/xtest.c b/Xext/xtest.c index 94d8974b6..96ae18225 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -54,10 +54,6 @@ from The Open Group. #include "modinit.h" -#if 0 -static unsigned char XTestReqCode; -#endif - #ifdef XINPUT extern int DeviceValuator; #endif /* XINPUT */ @@ -89,18 +85,9 @@ 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 } /*ARGSUSED*/ diff --git a/cfb/Makefile.am b/cfb/Makefile.am index d24f027e7..901fc95ae 100644 --- a/cfb/Makefile.am +++ b/cfb/Makefile.am @@ -16,7 +16,6 @@ INCLUDES = $(CFB_INCLUDES) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir EXTRA_DIST = cfbline.c cfbfillarc.c cfbzerarc.c cfbblt.c cfbsolid.c \ cfbtileodd.c cfbtile32.c cfb8line.c cfbply1rct.c cfbglblt8.c \ cfb16.h cfb24.h cfb32.h cfb8bit.h cfbrrop.h \ - cfbtab.h \ stip68kgnu.h stipmips.s stipsparc.s stipsprc32.s sdk_HEADERS = cfb.h cfb32.h cfb16.h cfbmap.h cfbunmap.h cfbmskbits.h diff --git a/cfb/cfbcppl.c b/cfb/cfbcppl.c index c13baf143..00714cbc4 100644 --- a/cfb/cfbcppl.c +++ b/cfb/cfbcppl.c @@ -42,9 +42,7 @@ in this Software without prior written authorization from The Open Group. #include "maskbits.h" #define PSZ 8 #include "mergerop.h" -#else /* PSZ==8 */ -#include "cfbtab.h" /* provides starttab, endttab, partmasks */ -#endif /* PSZ==8 */ +#endif void diff --git a/cfb/cfbmap.h b/cfb/cfbmap.h index 2e709b19d..d6d447555 100644 --- a/cfb/cfbmap.h +++ b/cfb/cfbmap.h @@ -30,132 +30,6 @@ in this Software without prior written authorization from The Open Group. * Map names around so that multiple depths can be supported simultaneously */ -#if 0 -#undef QuartetBitsTable -#undef QuartetPixelMaskTable -#undef cfb8ClippedLineCopy -#undef cfb8ClippedLineGeneral -#undef cfb8ClippedLineXor -#undef cfb8LineSS1Rect -#undef cfb8LineSS1RectCopy -#undef cfb8LineSS1RectGeneral -#undef cfb8LineSS1RectPreviousCopy -#undef cfb8LineSS1RectXor -#undef cfb8SegmentSS1Rect -#undef cfb8SegmentSS1RectCopy -#undef cfb8SegmentSS1RectGeneral -#undef cfb8SegmentSS1RectShiftCopy -#undef cfb8SegmentSS1RectXor -#undef cfbAllocatePrivates -#undef cfbBSFuncRec -#undef cfbBitBlt -#undef cfbBresD -#undef cfbBresS -#undef cfbChangeWindowAttributes -#undef cfbCloseScreen -#undef cfbCopyArea -#undef cfbCopyImagePlane -#undef cfbCopyPixmap -#undef cfbCopyPlane -#undef cfbCopyPlaneReduce -#undef cfbCopyRotatePixmap -#undef cfbCopyWindow -#undef cfbCreateGC -#undef cfbCreatePixmap -#undef cfbCreateScreenResources -#undef cfbCreateWindow -#undef cfbDestroyPixmap -#undef cfbDestroyWindow -#undef cfbDoBitblt -#undef cfbDoBitbltCopy -#undef cfbDoBitbltGeneral -#undef cfbDoBitbltOr -#undef cfbDoBitbltXor -#undef cfbFillBoxTile32sCopy -#undef cfbFillBoxTile32sGeneral -#undef cfbFillBoxTileOdd -#undef cfbFillBoxTileOddCopy -#undef cfbFillBoxTileOddGeneral -#undef cfbFillPoly1RectCopy -#undef cfbFillPoly1RectGeneral -#undef cfbFillRectSolidCopy -#undef cfbFillRectSolidGeneral -#undef cfbFillRectSolidXor -#undef cfbFillRectTile32Copy -#undef cfbFillRectTile32General -#undef cfbFillRectTileOdd -#undef cfbFillSpanTile32sCopy -#undef cfbFillSpanTile32sGeneral -#undef cfbFillSpanTileOddCopy -#undef cfbFillSpanTileOddGeneral -#undef cfbFinishScreenInit -#undef cfbGCFuncs -#undef cfbGCPrivateIndex -#undef cfbGetImage -#undef cfbGetScreenPixmap -#undef cfbGetSpans -#undef cfbHorzS -#undef cfbImageGlyphBlt8 -#undef cfbInitializeColormap -#undef cfbInstallColormap -#undef cfbLineSD -#undef cfbLineSS -#undef cfbListInstalledColormaps -#undef cfbMapWindow -#undef cfbMatchCommon -#undef cfbNonTEOps -#undef cfbNonTEOps1Rect -#undef cfbPadPixmap -#undef cfbPolyFillArcSolidCopy -#undef cfbPolyFillArcSolidGeneral -#undef cfbPolyFillRect -#undef cfbPolyGlyphBlt8 -#undef cfbPolyGlyphRop8 -#undef cfbPolyPoint -#undef cfbPositionWindow -#undef cfbPutImage -#undef cfbReduceRasterOp -#undef cfbResolveColor -#undef cfbRestoreAreas -#undef cfbSaveAreas -#undef cfbScreenInit -#undef cfbScreenPrivateIndex -#undef cfbSegmentSD -#undef cfbSegmentSS -#undef cfbSetScanline -#undef cfbSetScreenPixmap -#undef cfbSetSpans -#undef cfbSetupScreen -#undef cfbSolidSpansCopy -#undef cfbSolidSpansGeneral -#undef cfbSolidSpansXor -#undef cfbStippleStack -#undef cfbStippleStackTE -#undef cfbTEGlyphBlt -#undef cfbTEOps -#undef cfbTEOps1Rect -#undef cfbTile32FSCopy -#undef cfbTile32FSGeneral -#undef cfbUninstallColormap -#undef cfbUnmapWindow -#undef cfbUnnaturalStippleFS -#undef cfbUnnaturalTileFS -#undef cfbValidateGC -#undef cfbVertS -#undef cfbWindowPrivateIndex -#undef cfbXRotatePixmap -#undef cfbYRotatePixmap -#undef cfbZeroPolyArcSS8Copy -#undef cfbZeroPolyArcSS8General -#undef cfbZeroPolyArcSS8Xor -#undef cfbendpartial -#undef cfbendtab -#undef cfbmask -#undef cfbrmask -#undef cfbstartpartial -#undef cfbstarttab -#endif - /* a losing vendor cpp dumps core if we define CFBNAME in terms of CATNAME */ #if PSZ != 8 diff --git a/cfb/cfbmskbits.h b/cfb/cfbmskbits.h index 6076269b3..5ee9125dd 100644 --- a/cfb/cfbmskbits.h +++ b/cfb/cfbmskbits.h @@ -831,42 +831,6 @@ if ((x) + (w) <= PPW) {\ *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ } #if PSZ == 24 -# if 0 -#define getstipplepixels24(psrcstip,xt,w,ones,psrcpix,destpix,stipindex,srcindex,dstindex) \ -{ \ - PixelGroup q; \ - CfbBits src; \ - register unsigned int sidx; \ - register unsigned int didx; \ - sidx = ((srcindex) & 3)<<1; \ - didx = ((dstindex) & 3)<<1; \ - q = *(psrcstip) >> (xt); \ -/* if((srcindex)!=0)*/ \ -/* src = (((*(psrcpix)) << cfb24Shift[sidx]) & (cfbmask[sidx])) |*/ \ -/* (((*((psrcpix)+1)) << cfb24Shift[sidx+1]) & (cfbmask[sidx+1])); */\ -/* else */\ - src = (*(psrcpix))&0xFFFFFF; \ - if ( ((xt)+(w)) > PGSZ ) \ - q |= (*((psrcstip)+1)) << (PGSZ -(xt)); \ - q = QuartetBitsTable[(w)] & ((ones) ? q : ~q); \ - src &= QuartetPixelMaskTable[q]; \ - *(destpix) &= cfbrmask[didx]; \ - switch(didx) {\ - case 0: \ - *(destpix) |= (src &cfbmask[didx]); \ - break; \ - case 2: \ - case 4: \ - destpix++;didx++; \ - *(destpix) = ((*(destpix)) & (cfbrmask[didx]))| \ - (BitLeft(src, cfb24Shift[didx]) & (cfbmask[didx])); \ - destpix--; didx--;\ - case 6: \ - *(destpix) |= (BitRight(src, cfb24Shift[didx]) & cfbmask[didx]); \ - break; \ - }; \ -} -# else #define getstipplepixels24(psrcstip,xt,ones,psrcpix,destpix,stipindex) \ { \ PixelGroup q; \ @@ -874,7 +838,6 @@ if ((x) + (w) <= PPW) {\ q = ((ones) ? q : ~q) & 1; \ *(destpix) = (*(psrcpix)) & QuartetPixelMaskTable[q]; \ } -# endif #endif /* PSZ == 24 */ #endif diff --git a/cfb/cfbtab.h b/cfb/cfbtab.h deleted file mode 100644 index 60d203f90..000000000 --- a/cfb/cfbtab.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _CFBTAB_H_ -#define _CFBTAB_H_ - -/* prototypes */ -#if 0 -extern int starttab[32], endtab[32]; -extern unsigned int partmasks[32][32]; -#endif - -#endif /* _CFBTAB_H_ */ diff --git a/dbe/dbe.c b/dbe/dbe.c index d63620d4f..cded2bd10 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -160,26 +160,6 @@ DbeAllocWinPriv(ScreenPtr pScreen) } /* 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 - /****************************************************************************** * diff --git a/dix/window.c b/dix/window.c index f65fb848f..129ebc679 100644 --- a/dix/window.c +++ b/dix/window.c @@ -145,13 +145,6 @@ _X_EXPORT int screenIsSaved = SCREEN_SAVER_OFF; _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; -#if 0 -extern void DeleteWindowFromAnyEvents(); -extern Mask EventMaskForClient(); -extern void WindowHasNewCursor(); -extern void RecalculateDeliverableEvents(); -#endif - static Bool TileScreenSaver(int i, int kind); diff --git a/fb/fbblt.c b/fb/fbblt.c index 837c3a239..38271c0c9 100644 --- a/fb/fbblt.c +++ b/fb/fbblt.c @@ -825,9 +825,6 @@ fbBltOdd24 (FbBits *srcLine, even = TRUE; } } -#if 0 - fprintf (stderr, "\n"); -#endif } #endif diff --git a/include/dixevents.h b/include/dixevents.h index 62c867277..77b37c85e 100644 --- a/include/dixevents.h +++ b/include/dixevents.h @@ -41,28 +41,6 @@ extern int MaybeDeliverEventsToClient( extern int ProcWarpPointer(ClientPtr /* client */); -#if 0 -extern void -#ifdef XKB -CoreProcessKeyboardEvent ( -#else -ProcessKeyboardEvent ( -#endif - xEvent * /* xE */, - DeviceIntPtr /* keybd */, - int /* count */); - -extern void -#ifdef XKB -CoreProcessPointerEvent ( -#else -ProcessPointerEvent ( -#endif - xEvent * /* xE */, - DeviceIntPtr /* mouse */, - int /* count */); -#endif - extern int EventSelectForWindow( WindowPtr /* pWin */, ClientPtr /* client */, diff --git a/include/swapreq.h b/include/swapreq.h index 9c785fe62..83e524bab 100644 --- a/include/swapreq.h +++ b/include/swapreq.h @@ -26,17 +26,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef SWAPREQ_H #define SWAPREQ_H 1 -/* The first two are in misc.h */ -#if 0 -extern void SwapLongs ( - CARD32 * /* list */, - unsigned long /* count */); - -extern void SwapShorts ( - short * /* list */, - unsigned long /* count */); -#endif - extern void SwapColorItem( xColorItem * /* pItem */); diff --git a/mi/midispcur.c b/mi/midispcur.c index 7b203f71f..918e401a5 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -182,9 +182,6 @@ miDCCloseScreen (index, pScreen) tossPix (pScreenPriv->pSave); tossPix (pScreenPriv->pTemp); #ifdef ARGB_CURSOR -#if 0 /* This has been free()d before */ - tossPict (pScreenPriv->pRootPicture); -#endif tossPict (pScreenPriv->pTempPicture); #endif xfree ((pointer) pScreenPriv); diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 17425aeb2..8f1e3b741 100755 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -243,9 +243,6 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, if (pDamage->pDrawable->type == DRAWABLE_WINDOW && !((WindowPtr) (pDamage->pDrawable))->realized) { -#if 0 - DAMAGE_DEBUG (("damage while window unrealized\n")); -#endif continue; } diff --git a/os/WaitFor.c b/os/WaitFor.c index 7683477e6..71ca53438 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -410,21 +410,6 @@ WaitForSomething(int *pClientsReady) return nready; } -#if 0 -/* - * This is not always a macro. - */ -ANYSET(FdMask *src) -{ - int i; - - for (i=0; i #endif -#if 0 -#define DEBUG_COMMUNICATION -#endif +#undef DEBUG_COMMUNICATION + #ifdef WIN32 #include #endif diff --git a/os/osinit.c b/os/osinit.c index 1f09f068e..1bc8624dc 100644 --- a/os/osinit.c +++ b/os/osinit.c @@ -194,10 +194,6 @@ OsInit(void) rlim.rlim_cur = limitNoFile; else rlim.rlim_cur = rlim.rlim_max; -#if 0 - if (rlim.rlim_cur > MAXSOCKS) - rlim.rlim_cur = MAXSOCKS; -#endif (void)setrlimit(RLIMIT_NOFILE, &rlim); } } diff --git a/render/picturestr.h b/render/picturestr.h index b2e180f11..ba165a411 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -504,12 +504,6 @@ SetPictureToDefaults (PicturePtr pPicture); PicturePtr AllocatePicture (ScreenPtr pScreen); -#if 0 -Bool -miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats); -#endif - - PicturePtr CreatePicture (Picture pid, DrawablePtr pDrawable, diff --git a/render/render.c b/render/render.c index ca6e62f50..b432406f7 100644 --- a/render/render.c +++ b/render/render.c @@ -212,9 +212,6 @@ int (*SProcRenderVector[RenderNumberRequests])(ClientPtr) = { static void RenderResetProc (ExtensionEntry *extEntry); -#if 0 -static CARD8 RenderReqCode; -#endif int RenderErrBase; int RenderClientPrivateIndex; @@ -259,9 +256,6 @@ RenderExtensionInit (void) RenderResetProc, StandardMinorOpcode); if (!extEntry) return; -#if 0 - RenderReqCode = (CARD8) extEntry->base; -#endif RenderErrBase = extEntry->errorBase; } @@ -299,26 +293,6 @@ ProcRenderQueryVersion (ClientPtr client) return (client->noClientException); } -#if 0 -static int -VisualDepth (ScreenPtr pScreen, VisualPtr pVisual) -{ - DepthPtr pDepth; - int d, v; - - for (d = 0; d < pScreen->numDepths; d++) - { - pDepth = pScreen->allowedDepths + d; - for (v = 0; v < pDepth->numVids; v++) - { - if (pDepth->vids[v] == pVisual->vid) - return pDepth->depth; - } - } - return 0; -} -#endif - static VisualPtr findVisual (ScreenPtr pScreen, VisualID vid) { @@ -3225,98 +3199,6 @@ PanoramiXRenderTriFan(ClientPtr client) return result; } -#if 0 /* Not implemented yet */ - -static int -PanoramiXRenderColorTrapezoids(ClientPtr client) -{ - PanoramiXRes *src, *dst; - int result = Success, j; - REQUEST(xRenderColorTrapezoidsReq); - char *extra; - int extra_len; - - REQUEST_AT_LEAST_SIZE (xRenderColorTrapezoidsReq); - - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); - - extra_len = (client->req_len << 2) - sizeof (xRenderColorTrapezoidsReq); - - if (extra_len && - (extra = (char *) xalloc (extra_len))) { - memcpy (extra, stuff + 1, extra_len); - - FOR_NSCREENS_FORWARD(j) { - if (j) memcpy (stuff + 1, extra, extra_len); - if (dst->u.pict.root) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; - - if(x_off || y_off) { - ....; - } - } - - stuff->dst = dst->info[j].id; - result = - (*PanoramiXSaveRenderVector[X_RenderColorTrapezoids]) (client); - - if(result != Success) break; - } - - xfree(extra); - } - - return result; -} - -static int -PanoramiXRenderColorTriangles(ClientPtr client) -{ - PanoramiXRes *src, *dst; - int result = Success, j; - REQUEST(xRenderColorTrianglesReq); - char *extra; - int extra_len; - - REQUEST_AT_LEAST_SIZE (xRenderColorTrianglesReq); - - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); - - extra_len = (client->req_len << 2) - sizeof (xRenderColorTrianglesReq); - - if (extra_len && - (extra = (char *) xalloc (extra_len))) { - memcpy (extra, stuff + 1, extra_len); - - FOR_NSCREENS_FORWARD(j) { - if (j) memcpy (stuff + 1, extra, extra_len); - if (dst->u.pict.root) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; - - if(x_off || y_off) { - ....; - } - } - - stuff->dst = dst->info[j].id; - result = - (*PanoramiXSaveRenderVector[X_RenderColorTriangles]) (client); - - if(result != Success) break; - } - - xfree(extra); - } - - return result; -} - -#endif - static int PanoramiXRenderAddTraps (ClientPtr client) { From 0fff01f5660fb3bb9284f97c45dc76154435d02b Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Sun, 2 Dec 2007 14:15:36 -0500 Subject: [PATCH 355/454] Fix swapped Xv dispatch under Xinerama. Same-endian dispatch was properly calling through the Xinerama wrapping, but other-endian dispatch wasn't. --- Xext/xvdisp.c | 910 +++++++++++++++++++++----------------------------- Xext/xvdisp.h | 1 + Xext/xvmain.c | 4 +- 3 files changed, 379 insertions(+), 536 deletions(-) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 21d00aa7f..ee2e051d4 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -19,33 +19,8 @@ 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. - ******************************************************************/ -/* -** File: -** -** xvdisp.c --- Xv server extension dispatch module. -** -** Author: -** -** David Carver (Digital Workstation Engineering/Project Athena) -** -** Revisions: -** -** 11.06.91 Carver -** - changed SetPortControl to SetPortAttribute -** - changed GetPortControl to GetPortAttribute -** - changed QueryBestSize -** -** 15.05.91 Carver -** - version 2.0 upgrade -** -** 24.01.91 Carver -** - version 1.4 upgrade -** -*/ - #ifdef HAVE_DIX_CONFIG_H #include #endif @@ -78,81 +53,246 @@ SOFTWARE. #include "panoramiXsrv.h" unsigned long XvXRTPort; - -#ifdef MITSHM -static int XineramaXvShmPutImage(ClientPtr); -#endif -static int XineramaXvPutImage(ClientPtr); -static int XineramaXvPutVideo(ClientPtr); -static int XineramaXvPutStill(ClientPtr); -static int XineramaXvSetPortAttribute(ClientPtr); -static int XineramaXvStopVideo(ClientPtr); #endif -/* INTERNAL */ +static int +SWriteQueryExtensionReply( + ClientPtr client, + xvQueryExtensionReply *rep +){ + char n; -static int ProcXvQueryExtension(ClientPtr); -static int ProcXvQueryAdaptors(ClientPtr); -static int ProcXvQueryEncodings(ClientPtr); -static int ProcXvPutVideo(ClientPtr); -static int ProcXvPutStill(ClientPtr); -static int ProcXvGetVideo(ClientPtr); -static int ProcXvGetStill(ClientPtr); -static int ProcXvGrabPort(ClientPtr); -static int ProcXvUngrabPort(ClientPtr); -static int ProcXvSelectVideoNotify(ClientPtr); -static int ProcXvSelectPortNotify(ClientPtr); -static int ProcXvStopVideo(ClientPtr); -static int ProcXvSetPortAttribute(ClientPtr); -static int ProcXvGetPortAttribute(ClientPtr); -static int ProcXvQueryBestSize(ClientPtr); -static int ProcXvQueryPortAttributes(ClientPtr); -static int ProcXvPutImage(ClientPtr); -#ifdef MITSHM -static int ProcXvShmPutImage(ClientPtr); -#endif -static int ProcXvQueryImageAttributes(ClientPtr); -static int ProcXvListImageFormats(ClientPtr); + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->version, n); + swaps(&rep->revision, n); + + (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep); -static int SProcXvQueryExtension(ClientPtr); -static int SProcXvQueryAdaptors(ClientPtr); -static int SProcXvQueryEncodings(ClientPtr); -static int SProcXvPutVideo(ClientPtr); -static int SProcXvPutStill(ClientPtr); -static int SProcXvGetVideo(ClientPtr); -static int SProcXvGetStill(ClientPtr); -static int SProcXvGrabPort(ClientPtr); -static int SProcXvUngrabPort(ClientPtr); -static int SProcXvSelectVideoNotify(ClientPtr); -static int SProcXvSelectPortNotify(ClientPtr); -static int SProcXvStopVideo(ClientPtr); -static int SProcXvSetPortAttribute(ClientPtr); -static int SProcXvGetPortAttribute(ClientPtr); -static int SProcXvQueryBestSize(ClientPtr); -static int SProcXvQueryPortAttributes(ClientPtr); -static int SProcXvPutImage(ClientPtr); -#ifdef MITSHM -static int SProcXvShmPutImage(ClientPtr); -#endif -static int SProcXvQueryImageAttributes(ClientPtr); -static int SProcXvListImageFormats(ClientPtr); + return Success; +} -static int SWriteQueryAdaptorsReply(ClientPtr, xvQueryAdaptorsReply *); -static int SWriteQueryExtensionReply(ClientPtr, xvQueryExtensionReply *); -static int SWriteQueryEncodingsReply(ClientPtr, xvQueryEncodingsReply *); -static int SWriteAdaptorInfo(ClientPtr, xvAdaptorInfo *); -static int SWriteEncodingInfo(ClientPtr, xvEncodingInfo *); -static int SWriteFormat(ClientPtr, xvFormat *); -static int SWriteAttributeInfo(ClientPtr, xvAttributeInfo *); -static int SWriteGrabPortReply(ClientPtr, xvGrabPortReply *); -static int SWriteGetPortAttributeReply(ClientPtr, xvGetPortAttributeReply *); -static int SWriteQueryBestSizeReply(ClientPtr, xvQueryBestSizeReply *); -static int SWriteQueryPortAttributesReply( - ClientPtr, xvQueryPortAttributesReply *); -static int SWriteQueryImageAttributesReply( - ClientPtr, xvQueryImageAttributesReply*); -static int SWriteListImageFormatsReply(ClientPtr, xvListImageFormatsReply*); -static int SWriteImageFormatInfo(ClientPtr, xvImageFormatInfo*); +static int +SWriteQueryAdaptorsReply( + ClientPtr client, + xvQueryAdaptorsReply *rep +){ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_adaptors, n); + + (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryEncodingsReply( + ClientPtr client, + xvQueryEncodingsReply *rep +){ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->num_encodings, n); + + (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep); + + return Success; +} + +static int +SWriteAdaptorInfo( + ClientPtr client, + xvAdaptorInfo *pAdaptor +){ + char n; + + swapl(&pAdaptor->base_id, n); + swaps(&pAdaptor->name_size, n); + swaps(&pAdaptor->num_ports, n); + swaps(&pAdaptor->num_formats, n); + + (void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor); + + return Success; +} + +static int +SWriteEncodingInfo( + ClientPtr client, + xvEncodingInfo *pEncoding +){ + char n; + + swapl(&pEncoding->encoding, n); + swaps(&pEncoding->name_size, n); + swaps(&pEncoding->width, n); + swaps(&pEncoding->height, n); + swapl(&pEncoding->rate.numerator, n); + swapl(&pEncoding->rate.denominator, n); + (void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding); + + return Success; +} + +static int +SWriteFormat( + ClientPtr client, + xvFormat *pFormat +){ + char n; + + swapl(&pFormat->visual, n); + (void)WriteToClient(client, sz_xvFormat, (char *)pFormat); + + return Success; +} + +static int +SWriteAttributeInfo( + ClientPtr client, + xvAttributeInfo *pAtt +){ + char n; + + swapl(&pAtt->flags, n); + swapl(&pAtt->size, n); + swapl(&pAtt->min, n); + swapl(&pAtt->max, n); + (void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt); + + return Success; +} + +static int +SWriteImageFormatInfo( + ClientPtr client, + xvImageFormatInfo *pImage +){ + char n; + + swapl(&pImage->id, n); + swapl(&pImage->red_mask, n); + swapl(&pImage->green_mask, n); + swapl(&pImage->blue_mask, n); + swapl(&pImage->y_sample_bits, n); + swapl(&pImage->u_sample_bits, n); + swapl(&pImage->v_sample_bits, n); + swapl(&pImage->horz_y_period, n); + swapl(&pImage->horz_u_period, n); + swapl(&pImage->horz_v_period, n); + swapl(&pImage->vert_y_period, n); + swapl(&pImage->vert_u_period, n); + swapl(&pImage->vert_v_period, n); + + (void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage); + + return Success; +} + +static int +SWriteGrabPortReply( + ClientPtr client, + xvGrabPortReply *rep +){ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + + (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep); + + return Success; +} + +static int +SWriteGetPortAttributeReply( + ClientPtr client, + xvGetPortAttributeReply *rep +){ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->value, n); + + (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryBestSizeReply( + ClientPtr client, + xvQueryBestSizeReply *rep +){ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swaps(&rep->actual_width, n); + swaps(&rep->actual_height, n); + + (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryPortAttributesReply( + ClientPtr client, + xvQueryPortAttributesReply *rep +){ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->num_attributes, n); + swapl(&rep->text_size, n); + + (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep); + + return Success; +} + +static int +SWriteQueryImageAttributesReply( + ClientPtr client, + xvQueryImageAttributesReply *rep +){ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->num_planes, n); + swapl(&rep->data_size, n); + swaps(&rep->width, n); + swaps(&rep->height, n); + + (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep); + + return Success; +} + +static int +SWriteListImageFormatsReply( + ClientPtr client, + xvListImageFormatsReply *rep +){ + char n; + + swaps(&rep->sequenceNumber, n); + swapl(&rep->length, n); + swapl(&rep->num_formats, n); + + (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep); + + return Success; +} #define _WriteQueryAdaptorsReply(_c,_d) \ if ((_c)->swapped) SWriteQueryAdaptorsReply(_c, _d); \ @@ -213,141 +353,6 @@ static int SWriteImageFormatInfo(ClientPtr, xvImageFormatInfo*); #define _AllocatePort(_i,_p) \ ((_p)->id != _i) ? (* (_p)->pAdaptor->ddAllocatePort)(_i,_p,&_p) : Success -/* -** ProcXvDispatch -** -** -** -*/ - -int -ProcXvDispatch(ClientPtr client) -{ - REQUEST(xReq); - - UpdateCurrentTime(); - - switch (stuff->data) - { - case xv_QueryExtension: return(ProcXvQueryExtension(client)); - case xv_QueryAdaptors: return(ProcXvQueryAdaptors(client)); - case xv_QueryEncodings: return(ProcXvQueryEncodings(client)); - case xv_PutVideo: -#ifdef PANORAMIX - if(!noPanoramiXExtension) - return(XineramaXvPutVideo(client)); - else -#endif - return(ProcXvPutVideo(client)); - case xv_PutStill: -#ifdef PANORAMIX - if(!noPanoramiXExtension) - return(XineramaXvPutStill(client)); - else -#endif - return(ProcXvPutStill(client)); - case xv_GetVideo: return(ProcXvGetVideo(client)); - case xv_GetStill: return(ProcXvGetStill(client)); - case xv_GrabPort: return(ProcXvGrabPort(client)); - case xv_UngrabPort: return(ProcXvUngrabPort(client)); - case xv_SelectVideoNotify: return(ProcXvSelectVideoNotify(client)); - case xv_SelectPortNotify: return(ProcXvSelectPortNotify(client)); - case xv_StopVideo: -#ifdef PANORAMIX - if(!noPanoramiXExtension) - return(XineramaXvStopVideo(client)); - else -#endif - return(ProcXvStopVideo(client)); - case xv_SetPortAttribute: -#ifdef PANORAMIX - if(!noPanoramiXExtension) - return(XineramaXvSetPortAttribute(client)); - else -#endif - return(ProcXvSetPortAttribute(client)); - case xv_GetPortAttribute: return(ProcXvGetPortAttribute(client)); - case xv_QueryBestSize: return(ProcXvQueryBestSize(client)); - case xv_QueryPortAttributes: return(ProcXvQueryPortAttributes(client)); - case xv_PutImage: -#ifdef PANORAMIX - if(!noPanoramiXExtension) - return(XineramaXvPutImage(client)); - else -#endif - return(ProcXvPutImage(client)); -#ifdef MITSHM - case xv_ShmPutImage: -#ifdef PANORAMIX - if(!noPanoramiXExtension) - return(XineramaXvShmPutImage(client)); - else -#endif - return(ProcXvShmPutImage(client)); -#endif - case xv_QueryImageAttributes: return(ProcXvQueryImageAttributes(client)); - case xv_ListImageFormats: return(ProcXvListImageFormats(client)); - default: - if (stuff->data < xvNumRequests) - { - SendErrorToClient(client, XvReqCode, stuff->data, 0, - BadImplementation); - return(BadImplementation); - } - else - { - SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); - return(BadRequest); - } - } -} - -int -SProcXvDispatch(ClientPtr client) -{ - REQUEST(xReq); - - UpdateCurrentTime(); - - switch (stuff->data) - { - case xv_QueryExtension: return(SProcXvQueryExtension(client)); - case xv_QueryAdaptors: return(SProcXvQueryAdaptors(client)); - case xv_QueryEncodings: return(SProcXvQueryEncodings(client)); - case xv_PutVideo: return(SProcXvPutVideo(client)); - case xv_PutStill: return(SProcXvPutStill(client)); - case xv_GetVideo: return(SProcXvGetVideo(client)); - case xv_GetStill: return(SProcXvGetStill(client)); - case xv_GrabPort: return(SProcXvGrabPort(client)); - case xv_UngrabPort: return(SProcXvUngrabPort(client)); - case xv_SelectVideoNotify: return(SProcXvSelectVideoNotify(client)); - case xv_SelectPortNotify: return(SProcXvSelectPortNotify(client)); - case xv_StopVideo: return(SProcXvStopVideo(client)); - case xv_SetPortAttribute: return(SProcXvSetPortAttribute(client)); - case xv_GetPortAttribute: return(SProcXvGetPortAttribute(client)); - case xv_QueryBestSize: return(SProcXvQueryBestSize(client)); - case xv_QueryPortAttributes: return(SProcXvQueryPortAttributes(client)); - case xv_PutImage: return(SProcXvPutImage(client)); -#ifdef MITSHM - case xv_ShmPutImage: return(SProcXvShmPutImage(client)); -#endif - case xv_QueryImageAttributes: return(SProcXvQueryImageAttributes(client)); - case xv_ListImageFormats: return(SProcXvListImageFormats(client)); - default: - if (stuff->data < xvNumRequests) - { - SendErrorToClient(client, XvReqCode, stuff->data, 0, - BadImplementation); - return(BadImplementation); - } - else - { - SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); - return(BadRequest); - } - } -} - static int ProcXvQueryExtension(ClientPtr client) { @@ -364,7 +369,6 @@ ProcXvQueryExtension(ClientPtr client) _WriteQueryExtensionReply(client, &rep); return Success; - } static int @@ -457,7 +461,6 @@ ProcXvQueryAdaptors(ClientPtr client) } return (client->noClientException); - } static int @@ -521,7 +524,6 @@ ProcXvQueryEncodings(ClientPtr client) } return (client->noClientException); - } static int @@ -567,7 +569,6 @@ ProcXvPutVideo(ClientPtr client) stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h); - } static int @@ -613,10 +614,8 @@ ProcXvPutStill(ClientPtr client) stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h); - } - static int ProcXvGetVideo(ClientPtr client) { @@ -660,10 +659,8 @@ ProcXvGetVideo(ClientPtr client) stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h); - } - static int ProcXvGetStill(ClientPtr client) { @@ -707,7 +704,6 @@ ProcXvGetStill(ClientPtr client) stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h); - } static int @@ -723,7 +719,6 @@ ProcXvSelectVideoNotify(ClientPtr client) return rc; return XVCALL(diSelectVideoNotify)(client, pDraw, stuff->onoff); - } static int @@ -747,7 +742,6 @@ ProcXvSelectPortNotify(ClientPtr client) } return XVCALL(diSelectPortNotify)(client, pPort, stuff->onoff); - } static int @@ -786,7 +780,6 @@ ProcXvGrabPort(ClientPtr client) _WriteGrabPortReply(client, &rep); return Success; - } static int @@ -810,10 +803,8 @@ ProcXvUngrabPort(ClientPtr client) } return XVCALL(diUngrabPort)(client, pPort, stuff->time); - } - static int ProcXvStopVideo(ClientPtr client) { @@ -840,7 +831,6 @@ ProcXvStopVideo(ClientPtr client) return rc; return XVCALL(diStopVideo)(client, pPort, pDraw); - } static int @@ -1021,8 +1011,6 @@ ProcXvQueryPortAttributes(ClientPtr client) return Success; } - - static int ProcXvPutImage(ClientPtr client) { @@ -1200,6 +1188,13 @@ ProcXvShmPutImage(ClientPtr client) return status; } +#else /* !MITSHM */ +static int +ProcXvShmPutImage(ClientPtr client) +{ + SendErrorToClient(client, XvReqCode, xv_ShmPutImage, 0, BadImplementation); + return(BadImplementation); +} #endif #ifdef XvMCExtension @@ -1327,65 +1322,101 @@ ProcXvListImageFormats(ClientPtr client) return Success; } +static int (*XvProcVector[xvNumRequests])(ClientPtr) = { + ProcXvQueryExtension, + ProcXvQueryAdaptors, + ProcXvQueryEncodings, + ProcXvGrabPort, + ProcXvUngrabPort, + ProcXvPutVideo, + ProcXvPutStill, + ProcXvGetVideo, + ProcXvGetStill, + ProcXvStopVideo, + ProcXvSelectVideoNotify, + ProcXvSelectPortNotify, + ProcXvQueryBestSize, + ProcXvSetPortAttribute, + ProcXvGetPortAttribute, + ProcXvQueryPortAttributes, + ProcXvListImageFormats, + ProcXvQueryImageAttributes, + ProcXvPutImage, + ProcXvShmPutImage, +}; +int +ProcXvDispatch(ClientPtr client) +{ + REQUEST(xReq); + + UpdateCurrentTime(); + + if (stuff->data > xvNumRequests) { + SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); + return(BadRequest); + } + + return XvProcVector[stuff->data](client); +} /* Swapped Procs */ static int SProcXvQueryExtension(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryExtensionReq); swaps(&stuff->length, n); - return ProcXvQueryExtension(client); + return XvProcVector[xv_QueryExtension](client); } static int SProcXvQueryAdaptors(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryAdaptorsReq); swaps(&stuff->length, n); swapl(&stuff->window, n); - return ProcXvQueryAdaptors(client); + return XvProcVector[xv_QueryAdaptors](client); } static int SProcXvQueryEncodings(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryEncodingsReq); swaps(&stuff->length, n); swapl(&stuff->port, n); - return ProcXvQueryEncodings(client); + return XvProcVector[xv_QueryEncodings](client); } static int SProcXvGrabPort(ClientPtr client) { - register char n; + char n; REQUEST(xvGrabPortReq); swaps(&stuff->length, n); swapl(&stuff->port, n); swapl(&stuff->time, n); - return ProcXvGrabPort(client); + return XvProcVector[xv_GrabPort](client); } static int SProcXvUngrabPort(ClientPtr client) { - register char n; + char n; REQUEST(xvUngrabPortReq); swaps(&stuff->length, n); swapl(&stuff->port, n); swapl(&stuff->time, n); - return ProcXvUngrabPort(client); + return XvProcVector[xv_UngrabPort](client); } static int SProcXvPutVideo(ClientPtr client) { - register char n; + char n; REQUEST(xvPutVideoReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1399,13 +1430,13 @@ SProcXvPutVideo(ClientPtr client) swaps(&stuff->drw_y, n); swaps(&stuff->drw_w, n); swaps(&stuff->drw_h, n); - return ProcXvPutVideo(client); + return XvProcVector[xv_PutVideo](client); } static int SProcXvPutStill(ClientPtr client) { - register char n; + char n; REQUEST(xvPutStillReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1419,13 +1450,13 @@ SProcXvPutStill(ClientPtr client) swaps(&stuff->drw_y, n); swaps(&stuff->drw_w, n); swaps(&stuff->drw_h, n); - return ProcXvPutStill(client); + return XvProcVector[xv_PutStill](client); } static int SProcXvGetVideo(ClientPtr client) { - register char n; + char n; REQUEST(xvGetVideoReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1439,13 +1470,13 @@ SProcXvGetVideo(ClientPtr client) swaps(&stuff->drw_y, n); swaps(&stuff->drw_w, n); swaps(&stuff->drw_h, n); - return ProcXvGetVideo(client); + return XvProcVector[xv_GetVideo](client); } static int SProcXvGetStill(ClientPtr client) { - register char n; + char n; REQUEST(xvGetStillReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1459,13 +1490,13 @@ SProcXvGetStill(ClientPtr client) swaps(&stuff->drw_y, n); swaps(&stuff->drw_w, n); swaps(&stuff->drw_h, n); - return ProcXvGetStill(client); + return XvProcVector[xv_GetStill](client); } static int SProcXvPutImage(ClientPtr client) { - register char n; + char n; REQUEST(xvPutImageReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1482,14 +1513,14 @@ SProcXvPutImage(ClientPtr client) swaps(&stuff->drw_h, n); swaps(&stuff->width, n); swaps(&stuff->height, n); - return ProcXvPutImage(client); + return XvProcVector[xv_PutImage](client); } #ifdef MITSHM static int SProcXvShmPutImage(ClientPtr client) { - register char n; + char n; REQUEST(xvShmPutImageReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1508,68 +1539,69 @@ SProcXvShmPutImage(ClientPtr client) swaps(&stuff->offset, n); swaps(&stuff->width, n); swaps(&stuff->height, n); - return ProcXvShmPutImage(client); + return XvProcVector[xv_ShmPutImage](client); } +#else /* MITSHM */ +#define SProcXvShmPutImage ProcXvShmPutImage #endif - static int SProcXvSelectVideoNotify(ClientPtr client) { - register char n; + char n; REQUEST(xvSelectVideoNotifyReq); swaps(&stuff->length, n); swapl(&stuff->drawable, n); - return ProcXvSelectVideoNotify(client); + return XvProcVector[xv_SelectVideoNotify](client); } static int SProcXvSelectPortNotify(ClientPtr client) { - register char n; + char n; REQUEST(xvSelectPortNotifyReq); swaps(&stuff->length, n); swapl(&stuff->port, n); - return ProcXvSelectPortNotify(client); + return XvProcVector[xv_SelectPortNotify](client); } static int SProcXvStopVideo(ClientPtr client) { - register char n; + char n; REQUEST(xvStopVideoReq); swaps(&stuff->length, n); swapl(&stuff->port, n); swapl(&stuff->drawable, n); - return ProcXvStopVideo(client); + return XvProcVector[xv_StopVideo](client); } static int SProcXvSetPortAttribute(ClientPtr client) { - register char n; + char n; REQUEST(xvSetPortAttributeReq); swaps(&stuff->length, n); swapl(&stuff->port, n); swapl(&stuff->attribute, n); - return ProcXvSetPortAttribute(client); + return XvProcVector[xv_SetPortAttribute](client); } static int SProcXvGetPortAttribute(ClientPtr client) { - register char n; + char n; REQUEST(xvGetPortAttributeReq); swaps(&stuff->length, n); swapl(&stuff->port, n); swapl(&stuff->attribute, n); - return ProcXvGetPortAttribute(client); + return XvProcVector[xv_GetPortAttribute](client); } static int SProcXvQueryBestSize(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryBestSizeReq); swaps(&stuff->length, n); swapl(&stuff->port, n); @@ -1577,290 +1609,80 @@ SProcXvQueryBestSize(ClientPtr client) swaps(&stuff->vid_h, n); swaps(&stuff->drw_w, n); swaps(&stuff->drw_h, n); - return ProcXvQueryBestSize(client); + return XvProcVector[xv_QueryBestSize](client); } static int SProcXvQueryPortAttributes(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryPortAttributesReq); swaps(&stuff->length, n); swapl(&stuff->port, n); - return ProcXvQueryPortAttributes(client); + return XvProcVector[xv_QueryPortAttributes](client); } static int SProcXvQueryImageAttributes(ClientPtr client) { - register char n; + char n; REQUEST(xvQueryImageAttributesReq); swaps(&stuff->length, n); swapl(&stuff->id, n); swaps(&stuff->width, n); swaps(&stuff->width, n); - return ProcXvQueryImageAttributes(client); + return XvProcVector[xv_QueryImageAttributes](client); } static int SProcXvListImageFormats(ClientPtr client) { - register char n; + char n; REQUEST(xvListImageFormatsReq); swaps(&stuff->length, n); swapl(&stuff->port, n); - return ProcXvListImageFormats(client); + return XvProcVector[xv_ListImageFormats](client); } +static int (*SXvProcVector[xvNumRequests])(ClientPtr) = { + SProcXvQueryExtension, + SProcXvQueryAdaptors, + SProcXvQueryEncodings, + SProcXvGrabPort, + SProcXvUngrabPort, + SProcXvPutVideo, + SProcXvPutStill, + SProcXvGetVideo, + SProcXvGetStill, + SProcXvStopVideo, + SProcXvSelectVideoNotify, + SProcXvSelectPortNotify, + SProcXvQueryBestSize, + SProcXvSetPortAttribute, + SProcXvGetPortAttribute, + SProcXvQueryPortAttributes, + SProcXvListImageFormats, + SProcXvQueryImageAttributes, + SProcXvPutImage, + SProcXvShmPutImage, +}; -static int -SWriteQueryExtensionReply( - ClientPtr client, - xvQueryExtensionReply *rep -){ - register char n; +int +SProcXvDispatch(ClientPtr client) +{ + REQUEST(xReq); - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->version, n); - swaps(&rep->revision, n); - - (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)&rep); + UpdateCurrentTime(); - return Success; + if (stuff->data > xvNumRequests) { + SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); + return(BadRequest); + } + + return SXvProcVector[stuff->data](client); } -static int -SWriteQueryAdaptorsReply( - ClientPtr client, - xvQueryAdaptorsReply *rep -){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->num_adaptors, n); - - (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)&rep); - - return Success; -} - -static int -SWriteQueryEncodingsReply( - ClientPtr client, - xvQueryEncodingsReply *rep -){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->num_encodings, n); - - (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)&rep); - - return Success; -} - -static int -SWriteAdaptorInfo( - ClientPtr client, - xvAdaptorInfo *pAdaptor -){ - register char n; - - swapl(&pAdaptor->base_id, n); - swaps(&pAdaptor->name_size, n); - swaps(&pAdaptor->num_ports, n); - swaps(&pAdaptor->num_formats, n); - - (void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor); - - return Success; -} - -static int -SWriteEncodingInfo( - ClientPtr client, - xvEncodingInfo *pEncoding -){ - register char n; - - swapl(&pEncoding->encoding, n); - swaps(&pEncoding->name_size, n); - swaps(&pEncoding->width, n); - swaps(&pEncoding->height, n); - swapl(&pEncoding->rate.numerator, n); - swapl(&pEncoding->rate.denominator, n); - (void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding); - - return Success; -} - -static int -SWriteFormat( - ClientPtr client, - xvFormat *pFormat -){ - register char n; - - swapl(&pFormat->visual, n); - (void)WriteToClient(client, sz_xvFormat, (char *)pFormat); - - return Success; -} - -static int -SWriteAttributeInfo( - ClientPtr client, - xvAttributeInfo *pAtt -){ - register char n; - - swapl(&pAtt->flags, n); - swapl(&pAtt->size, n); - swapl(&pAtt->min, n); - swapl(&pAtt->max, n); - (void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt); - - return Success; -} - -static int -SWriteImageFormatInfo( - ClientPtr client, - xvImageFormatInfo *pImage -){ - register char n; - - swapl(&pImage->id, n); - swapl(&pImage->red_mask, n); - swapl(&pImage->green_mask, n); - swapl(&pImage->blue_mask, n); - swapl(&pImage->y_sample_bits, n); - swapl(&pImage->u_sample_bits, n); - swapl(&pImage->v_sample_bits, n); - swapl(&pImage->horz_y_period, n); - swapl(&pImage->horz_u_period, n); - swapl(&pImage->horz_v_period, n); - swapl(&pImage->vert_y_period, n); - swapl(&pImage->vert_u_period, n); - swapl(&pImage->vert_v_period, n); - - (void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage); - - return Success; -} - - - -static int -SWriteGrabPortReply( - ClientPtr client, - xvGrabPortReply *rep -){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - - (void)WriteToClient(client, sz_xvGrabPortReply, (char *)&rep); - - return Success; -} - -static int -SWriteGetPortAttributeReply( - ClientPtr client, - xvGetPortAttributeReply *rep -){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->value, n); - - (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)&rep); - - return Success; -} - -static int -SWriteQueryBestSizeReply( - ClientPtr client, - xvQueryBestSizeReply *rep -){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->actual_width, n); - swaps(&rep->actual_height, n); - - (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)&rep); - - return Success; -} - -static int -SWriteQueryPortAttributesReply( - ClientPtr client, - xvQueryPortAttributesReply *rep -){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_attributes, n); - swapl(&rep->text_size, n); - - (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)&rep); - - return Success; -} - -static int -SWriteQueryImageAttributesReply( - ClientPtr client, - xvQueryImageAttributesReply *rep -){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_planes, n); - swapl(&rep->data_size, n); - swaps(&rep->width, n); - swaps(&rep->height, n); - - (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)&rep); - - return Success; -} - - -static int -SWriteListImageFormatsReply( - ClientPtr client, - xvListImageFormatsReply *rep -){ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_formats, n); - - (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)&rep); - - return Success; -} - - #ifdef PANORAMIX - - - - static int XineramaXvStopVideo(ClientPtr client) { @@ -1910,7 +1732,6 @@ XineramaXvSetPortAttribute(ClientPtr client) return result; } - #ifdef MITSHM static int XineramaXvShmPutImage(ClientPtr client) @@ -1958,6 +1779,8 @@ XineramaXvShmPutImage(ClientPtr client) } return result; } +#else +#define XineramaXvShmPutImage ProcXvShmPutImage #endif static int @@ -2095,7 +1918,6 @@ XineramaXvPutStill(ClientPtr client) return result; } - void XineramifyXv(void) { ScreenPtr pScreen, screen0 = screenInfo.screens[0]; @@ -2201,6 +2023,26 @@ void XineramifyXv(void) } } } -} + /* munge the dispatch vector */ + XvProcVector[xv_PutVideo] = XineramaXvPutVideo; + XvProcVector[xv_PutStill] = XineramaXvPutStill; + XvProcVector[xv_StopVideo] = XineramaXvStopVideo; + XvProcVector[xv_SetPortAttribute] = XineramaXvSetPortAttribute; + XvProcVector[xv_PutImage] = XineramaXvPutImage; + XvProcVector[xv_ShmPutImage] = XineramaXvShmPutImage; +} +#endif /* PANORAMIX */ + +void +XvResetProcVector(void) +{ +#ifdef PANORAMIX + XvProcVector[xv_PutVideo] = ProcXvPutVideo; + XvProcVector[xv_PutStill] = ProcXvPutStill; + XvProcVector[xv_StopVideo] = ProcXvStopVideo; + XvProcVector[xv_SetPortAttribute] = ProcXvSetPortAttribute; + XvProcVector[xv_PutImage] = ProcXvPutImage; + XvProcVector[xv_ShmPutImage] = ProcXvShmPutImage; #endif +} diff --git a/Xext/xvdisp.h b/Xext/xvdisp.h index 75cacddcc..298d39560 100644 --- a/Xext/xvdisp.h +++ b/Xext/xvdisp.h @@ -1 +1,2 @@ extern void XineramifyXv(void); +extern void XvResetProcVector(void); diff --git a/Xext/xvmain.c b/Xext/xvmain.c index ddf3d1d6b..1b80bc8da 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -102,8 +102,8 @@ SOFTWARE. #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" -#include "xvdisp.h" #endif +#include "xvdisp.h" int XvScreenIndex = -1; unsigned long XvExtensionGeneration = 0; @@ -326,12 +326,12 @@ XvCloseScreen( pScreen->devPrivates[XvScreenIndex].ptr = (pointer)NULL; return (*pScreen->CloseScreen)(ii, pScreen); - } static void XvResetProc(ExtensionEntry* extEntry) { + XvResetProcVector(); } _X_EXPORT int From f4dc521b38560c8f93b614316a3a5511941a93a9 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sun, 2 Dec 2007 18:21:40 -0800 Subject: [PATCH 356/454] Darwin: Added {/,/System/}Library/Fonts to DEFAULT_FONT_PATH (cherry picked from commit b0069b04dddaa2df6d4cdf86f96fd8a2a257e47e) --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 5150c1828..bea49a720 100644 --- a/configure.ac +++ b/configure.ac @@ -456,6 +456,9 @@ AC_ARG_WITH(fontdir, AS_HELP_STRING([--with-fontdir=FONTDIR], [Path to t [ FONTDIR="$withval" ], [ FONTDIR="${libdir}/X11/fonts" ]) DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/" +case $host_os in + darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; +esac AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]), [ FONTPATH="$withval" ], [ FONTPATH="${DEFAULT_FONT_PATH}" ]) From 1faba797cbfe1a4804b7ea6b47e1ca9d4e4324e4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 3 Dec 2007 14:12:58 -0500 Subject: [PATCH 357/454] Death to libcwrapper. This has been deprecated since 1.1. Since we're breaking ABI again anyway, remove it entirely. --- configure.ac | 15 +- hw/xfree86/common/xf86Init.c | 2 - hw/xfree86/ddc/ddcProperty.c | 1 - hw/xfree86/loader/xf86sym.c | 191 -- hw/xfree86/os-support/Makefile.am | 2 +- hw/xfree86/os-support/bsd/Makefile.am | 1 - hw/xfree86/os-support/hurd/Makefile.am | 1 - hw/xfree86/os-support/linux/Makefile.am | 1 - hw/xfree86/os-support/misc/Delay.c | 2 +- hw/xfree86/os-support/shared/bios_mmap.c | 2 +- hw/xfree86/os-support/shared/libc_wrapper.c | 2123 ------------------- hw/xfree86/os-support/solaris/Makefile.am | 1 - hw/xfree86/os-support/xf86_OSlib.h | 15 - hw/xfree86/os-support/xf86_ansic.h | 314 --- hw/xfree86/os-support/xf86_libc.h | 721 ------- hw/xfree86/utils/xorgcfg/Makefile.am | 1 - os/Makefile.am | 9 +- 17 files changed, 11 insertions(+), 3391 deletions(-) delete mode 100644 hw/xfree86/os-support/shared/libc_wrapper.c delete mode 100644 hw/xfree86/os-support/xf86_ansic.h delete mode 100644 hw/xfree86/os-support/xf86_libc.h diff --git a/configure.ac b/configure.ac index bea49a720..52f1ef64d 100644 --- a/configure.ac +++ b/configure.ac @@ -1064,7 +1064,6 @@ else DIX_LIB='$(top_builddir)/dix/libdix.la' OS_LIB='$(top_builddir)/os/libos.la' fi -CWRAP_LIB='$(top_builddir)/os/libcwrapper.la' MI_LIB='$(top_builddir)/mi/libmi.la' MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' MI_INC='-I$(top_srcdir)/mi' @@ -1166,7 +1165,7 @@ AC_MSG_RESULT([$XVFB]) AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) if test "x$XVFB" = xyes; then - XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB" + XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB" XVFB_SYS_LIBS="$XVFBMODULES_LIBS" AC_SUBST([XVFB_LIBS]) AC_SUBST([XVFB_SYS_LIBS]) @@ -1184,7 +1183,7 @@ AC_MSG_RESULT([$XNEST]) AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) if test "x$XNEST" = xyes; then - XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $DIX_LIB $OS_LIB $CONFIG_LIB" + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $DIX_LIB $OS_LIB $CONFIG_LIB" XNEST_SYS_LIBS="$XNESTMODULES_LIBS" AC_SUBST([XNEST_LIBS]) AC_SUBST([XNEST_SYS_LIBS]) @@ -1214,7 +1213,7 @@ AC_MSG_RESULT([$XGL]) AM_CONDITIONAL(XGL, [test "x$XGL" = xyes]) if test "x$XGL" = xyes; then - XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB" + XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" XGL_SYS_LIBS="$XGLMODULES_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS" AC_SUBST([XGL_LIBS]) AC_SUBST([XGL_SYS_LIBS]) @@ -1236,7 +1235,7 @@ AC_MSG_RESULT([$XEGL]) AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes]) if test "x$XEGL" = xyes; then - XEGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB" + XEGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" XEGL_SYS_LIBS = "$XEGL_SYS_LIBS $XEGLMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XEGL_LIBS]) AC_SUBST([XEGL_SYS_LIBS]) @@ -1253,7 +1252,7 @@ AC_MSG_RESULT([$XGLX]) AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes]) if test "x$XGLX" = xyes; then - XGLX_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB" + XGLX_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" XGLX_SYS_LIBS="$XGLX_SYS_LIBS $XGLXMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XGLX_LIBS]) AC_SUBST([XGLX_SYS_LIBS]) @@ -1546,7 +1545,7 @@ AC_MSG_RESULT([$XPRINT]) if test "x$XPRINT" = xyes; then PKG_CHECK_MODULES([XPRINTMODULES], [printproto x11 xfont $XDMCP_MODULES xau]) XPRINT_CFLAGS="$XPRINTMODULES_CFLAGS" - XPRINT_LIBS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $CWRAP_LIBS $XKB_LIB $XKB_STUB_LIB" + XPRINT_LIBS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB" XPRINT_SYS_LIBS="$XPRINTMODULES_LIBS" xpconfigdir=$libdir/X11/xserver @@ -1787,7 +1786,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_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB" + 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]) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index b5ee21d19..c72fe30e8 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1203,8 +1203,6 @@ OsVendorInit() { static Bool beenHere = FALSE; - xf86WrapperInit(); - #ifdef SIGCHLD signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */ #endif diff --git a/hw/xfree86/ddc/ddcProperty.c b/hw/xfree86/ddc/ddcProperty.c index 67351d3dc..02125dff7 100644 --- a/hw/xfree86/ddc/ddcProperty.c +++ b/hw/xfree86/ddc/ddcProperty.c @@ -31,7 +31,6 @@ #include "property.h" #include "propertyst.h" #include "xf86DDC.h" -#include "xf86_ansic.h" #define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA" #define EDID2_ATOM_NAME "XFree86_DDC_EDID2_RAWDATA" diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 7c46e0266..050b873fb 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -79,8 +79,6 @@ #include "vidmodeproc.h" #include "xf86miscproc.h" #include "loader.h" -#define DONT_DEFINE_WRAPPERS -#include "xf86_ansic.h" #include "xisb.h" #include "vbe.h" #ifndef __OpenBSD__ @@ -269,7 +267,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86ReadSerial) SYMFUNC(xf86WriteSerial) SYMFUNC(xf86CloseSerial) - SYMFUNC(xf86GetErrno) SYMFUNC(xf86WaitForInput) SYMFUNC(xf86SerialSendBreak) SYMFUNC(xf86FlushInput) @@ -724,186 +721,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(LoaderGetOS) SYMFUNC(LoaderGetABIVersion) - /* - * These are our own interfaces to libc functions. - */ - SYMFUNC(xf86abort) - SYMFUNC(xf86abs) - SYMFUNC(xf86acos) - SYMFUNC(xf86asin) - SYMFUNC(xf86atan) - SYMFUNC(xf86atan2) - SYMFUNC(xf86atof) - SYMFUNC(xf86atoi) - SYMFUNC(xf86atol) - SYMFUNC(xf86bsearch) - SYMFUNC(xf86ceil) - SYMFUNC(xf86calloc) - SYMFUNC(xf86clearerr) - SYMFUNC(xf86close) - SYMFUNC(xf86cos) - SYMFUNC(xf86exit) - SYMFUNC(xf86exp) - SYMFUNC(xf86fabs) - SYMFUNC(xf86fclose) - SYMFUNC(xf86feof) - SYMFUNC(xf86ferror) - SYMFUNC(xf86fflush) - SYMFUNC(xf86fgetc) - SYMFUNC(xf86fgetpos) - SYMFUNC(xf86fgets) - SYMFUNC(xf86finite) - SYMFUNC(xf86floor) - SYMFUNC(xf86fmod) - SYMFUNC(xf86fopen) - SYMFUNC(xf86fprintf) - SYMFUNC(xf86fputc) - SYMFUNC(xf86fputs) - SYMFUNC(xf86fread) - SYMFUNC(xf86free) - SYMFUNC(xf86freopen) - SYMFUNC(xf86frexp) - SYMFUNC(xf86fscanf) - SYMFUNC(xf86fseek) - SYMFUNC(xf86fsetpos) - SYMFUNC(xf86ftell) - SYMFUNC(xf86fwrite) - SYMFUNC(xf86getc) - SYMFUNC(xf86getenv) - SYMFUNC(xf86getpagesize) - SYMFUNC(xf86hypot) - SYMFUNC(xf86ioctl) - SYMFUNC(xf86isalnum) - SYMFUNC(xf86isalpha) - SYMFUNC(xf86iscntrl) - SYMFUNC(xf86isdigit) - SYMFUNC(xf86isgraph) - SYMFUNC(xf86islower) - SYMFUNC(xf86isprint) - SYMFUNC(xf86ispunct) - SYMFUNC(xf86isspace) - SYMFUNC(xf86isupper) - SYMFUNC(xf86isxdigit) - SYMFUNC(xf86labs) - SYMFUNC(xf86ldexp) - SYMFUNC(xf86log) - SYMFUNC(xf86log10) - SYMFUNC(xf86lseek) - SYMFUNC(xf86malloc) - SYMFUNC(xf86memchr) - SYMFUNC(xf86memcmp) - SYMFUNC(xf86memcpy) - /* - * Some compilers generate calls to memcpy to handle structure copies - * or run-time initializations. - */ - SYMFUNCALIAS("memcpy", xf86memcpy) - SYMFUNC(xf86memset) - /* - * Some compilers generate calls to memset to handle aggregate - * initializations. - */ - SYMFUNCALIAS("memset", xf86memset) - SYMFUNC(xf86memmove) - SYMFUNC(xf86mmap) - SYMFUNC(xf86modf) - SYMFUNC(xf86munmap) - SYMFUNC(xf86open) - SYMFUNC(xf86perror) - SYMFUNC(xf86pow) - SYMFUNC(xf86printf) - SYMFUNC(xf86qsort) - SYMFUNC(xf86read) - SYMFUNC(xf86realloc) - SYMFUNC(xf86remove) - SYMFUNC(xf86rename) - SYMFUNC(xf86rewind) - SYMFUNC(xf86setbuf) - SYMFUNC(xf86setvbuf) - SYMFUNC(xf86sin) - SYMFUNC(xf86snprintf) - SYMFUNC(xf86sprintf) - SYMFUNC(xf86sqrt) - SYMFUNC(xf86sscanf) - SYMFUNC(xf86strcat) - SYMFUNC(xf86strcmp) - SYMFUNC(xf86strcasecmp) - SYMFUNC(xf86strcpy) - SYMFUNC(xf86strcspn) - SYMFUNC(xf86strerror) - SYMFUNC(xf86strlcat) - SYMFUNC(xf86strlcpy) - SYMFUNC(xf86strlen) - SYMFUNC(xf86strncasecmp) - SYMFUNC(xf86strncat) - SYMFUNC(xf86strncmp) - SYMFUNC(xf86strncpy) - SYMFUNC(xf86strpbrk) - SYMFUNC(xf86strchr) - SYMFUNC(xf86strrchr) - SYMFUNC(xf86strspn) - SYMFUNC(xf86strstr) - SYMFUNC(xf86strtod) - SYMFUNC(xf86strtok) - SYMFUNC(xf86strtol) - SYMFUNC(xf86strtoul) - SYMFUNC(xf86tan) - SYMFUNC(xf86tmpfile) - SYMFUNC(xf86tolower) - SYMFUNC(xf86toupper) - SYMFUNC(xf86ungetc) - SYMFUNC(xf86vfprintf) - SYMFUNC(xf86vsnprintf) - SYMFUNC(xf86vsprintf) - SYMFUNC(xf86write) - - /* non-ANSI C functions */ - SYMFUNC(xf86opendir) - SYMFUNC(xf86closedir) - SYMFUNC(xf86readdir) - SYMFUNC(xf86rewinddir) - SYMFUNC(xf86ffs) - SYMFUNC(xf86strdup) - SYMFUNC(xf86bzero) - SYMFUNC(xf86usleep) - SYMFUNC(xf86execl) - - SYMFUNC(xf86getsecs) - SYMFUNC(xf86fpossize) /* for returning sizeof(fpos_t) */ - - /* Some of these were added for DRI support. */ - SYMFUNC(xf86stat) - SYMFUNC(xf86fstat) - SYMFUNC(xf86access) - SYMFUNC(xf86geteuid) - SYMFUNC(xf86getegid) - SYMFUNC(xf86getpid) - SYMFUNC(xf86mknod) - SYMFUNC(xf86chmod) - SYMFUNC(xf86chown) - SYMFUNC(xf86sleep) - SYMFUNC(xf86mkdir) - SYMFUNC(xf86shmget) - SYMFUNC(xf86shmat) - SYMFUNC(xf86shmdt) - SYMFUNC(xf86shmctl) -#ifdef HAS_GLIBC_SIGSETJMP - SYMFUNC(xf86setjmp) - SYMFUNC(xf86setjmp0) -#if defined(__GLIBC__) && (__GLIBC__ >= 2) - SYMFUNCALIAS("xf86setjmp1", __sigsetjmp) -#else - SYMFUNC(xf86setjmp1) /* For libc5 */ -#endif -#else - SYMFUNCALIAS("xf86setjmp", setjmp) - SYMFUNC(xf86setjmp0) - SYMFUNC(xf86setjmp1) -#endif - SYMFUNCALIAS("xf86longjmp", longjmp) - SYMFUNC(xf86getjmptype) - SYMFUNC(xf86setjmp1_arg2) - SYMFUNC(xf86setjmperror) #ifdef XF86DRI /* * These may have more general uses, but for now, they are only used @@ -1088,14 +905,6 @@ _X_HIDDEN void *xfree86LookupTab[] = { #endif #endif - /* Some variables. */ - - SYMVAR(xf86stdin) - SYMVAR(xf86stdout) - SYMVAR(xf86stderr) - SYMVAR(xf86errno) - SYMVAR(xf86HUGE_VAL) - /* General variables (from xf86.h) */ SYMVAR(xf86ScreenIndex) SYMVAR(xf86PixmapIndex) diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am index e5a71c00a..f9a82c68d 100644 --- a/hw/xfree86/os-support/Makefile.am +++ b/hw/xfree86/os-support/Makefile.am @@ -1,7 +1,7 @@ SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS) DIST_SUBDIRS = bsd bus misc linux lynxos solaris sysv sco usl hurd -sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h xf86_ansic.h xf86_libc.h \ +sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h \ assyntax.h xf86OSmouse.h EXTRA_DIST = int10Defines.h xf86OSpriv.h README.OS-lib diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am index 446b69ee2..4fc270aa9 100644 --- a/hw/xfree86/os-support/bsd/Makefile.am +++ b/hw/xfree86/os-support/bsd/Makefile.am @@ -54,7 +54,6 @@ AM_CFLAGS = -DUSESTDRES $(XORG_CFLAGS) $(DIX_CFLAGS) INCLUDES = $(XORG_INCS) libbsd_la_SOURCES = \ - $(srcdir)/../shared/libc_wrapper.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ diff --git a/hw/xfree86/os-support/hurd/Makefile.am b/hw/xfree86/os-support/hurd/Makefile.am index e6543e133..2214b1c2d 100644 --- a/hw/xfree86/os-support/hurd/Makefile.am +++ b/hw/xfree86/os-support/hurd/Makefile.am @@ -4,7 +4,6 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ hurd_mouse.c hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ - $(srcdir)/../shared/libc_wrapper.c \ $(srcdir)/../shared/stdResource.c \ $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/pm_noop.c \ diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am index 5bb252be3..5a52ffdd4 100644 --- a/hw/xfree86/os-support/linux/Makefile.am +++ b/hw/xfree86/os-support/linux/Makefile.am @@ -34,7 +34,6 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_mouse.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/stdResource.c \ - $(srcdir)/../shared/libc_wrapper.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ $(PLATFORM_PCI_SUPPORT) diff --git a/hw/xfree86/os-support/misc/Delay.c b/hw/xfree86/os-support/misc/Delay.c index e3e93faa4..b18789a3a 100644 --- a/hw/xfree86/os-support/misc/Delay.c +++ b/hw/xfree86/os-support/misc/Delay.c @@ -18,7 +18,7 @@ xf86UDelay(long usec) int sigio; sigio = xf86BlockSIGIO(); - xf86usleep(usec); + usleep(usec); xf86UnblockSIGIO(sigio); #endif diff --git a/hw/xfree86/os-support/shared/bios_mmap.c b/hw/xfree86/os-support/shared/bios_mmap.c index cccf86a04..51d429948 100644 --- a/hw/xfree86/os-support/shared/bios_mmap.c +++ b/hw/xfree86/os-support/shared/bios_mmap.c @@ -55,7 +55,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, DEV_MEM, strerror(errno)); 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/shared/libc_wrapper.c b/hw/xfree86/os-support/shared/libc_wrapper.c deleted file mode 100644 index 959424110..000000000 --- a/hw/xfree86/os-support/shared/libc_wrapper.c +++ /dev/null @@ -1,2123 +0,0 @@ -/* - * Copyright 1997-2003 by The XFree86 Project, 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 names of Orest Zborowski and David Wexelblat - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. Orest Zborowski - * and David Wexelblat make no representations about the suitability of this - * software for any purpose. It is provided "as is" without express or - * implied warranty. - * - * THE XFREE86 PROJECT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT 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_XORG_CONFIG_H -#include -#endif - -#if defined(linux) && !defined(__GLIBC__) -#undef __STRICT_ANSI__ -#endif -#include -#include -#include -#include -#include -#if defined(__bsdi__) -#undef _POSIX_SOURCE -#undef _ANSI_SOURCE -#endif -#include -#include -#ifdef sun -#include -#endif -#include -#include -#include -#include "os.h" -#include -#include -#include -#include -#include -#include -#ifdef HAS_SVR3_MMAPDRV -#define NO_MMAP -#ifdef SELF_CONTAINED_WRAPPER -#include -#include -#include -#if !defined(_NEED_SYSI86) -# include -# include -#endif -#include -struct kd_memloc MapDSC; -int mmapFd = -2; -#else -extern struct kd_memloc MapDSC; -extern int mmapFd; -#endif -#endif -#ifndef NO_MMAP -#include -#ifndef MAP_FAILED -#define MAP_FAILED ((caddr_t)-1) -#endif -#endif -#if !defined(ISC) -#include -#endif - -#define NEED_XF86_TYPES 1 -#define NEED_XF86_PROTOTYPES 1 -#define DONT_DEFINE_WRAPPERS -#include "xf86_ansic.h" - -#ifndef SELF_CONTAINED_WRAPPER -#include "xf86.h" -#include "xf86Priv.h" -#define NO_OSLIB_PROTOTYPES -#define XF86_OS_PRIVS -#define HAVE_WRAPPER_DECLS -#include "xf86_OSlib.h" -#else -void xf86WrapperInit(void); -#endif - - -#ifndef X_NOT_POSIX -#include -#else -#ifdef SYSV -#include -#else -#ifdef USG -#include -#else -#include -#ifndef dirent -#define dirent direct -#endif -#endif -#endif -#endif -typedef struct dirent DIRENTRY; - -#ifdef ISC202 -#include -#define WIFEXITED(a) ((a & 0x00ff) == 0) /* LSB will be 0 */ -#define WEXITSTATUS(a) ((a & 0xff00) >> 8) -#define WIFSIGNALED(a) ((a & 0xff00) == 0) /* MSB will be 0 */ -#define WTERMSIG(a) (a & 0x00ff) -#else -#if defined(ISC) && !defined(_POSIX_SOURCE) -#define _POSIX_SOURCE -#include -#include -#undef _POSIX_SOURCE -#else -#if (defined(ISC) && defined(_POSIX_SOURCE)) || defined(Lynx) || (defined (__alpha__) && defined(linux)) -#include -#endif -#include -#endif -#endif -#ifdef Lynx -#if !defined(S_IFIFO) && defined(S_IFFIFO) -#define S_IFIFO S_IFFIFO -#endif -#endif - -/* For xf86getpagesize() */ -#if defined(linux) -#define HAS_SC_PAGESIZE -#define HAS_GETPAGESIZE -#elif defined(CSRG_BASED) -#define HAS_GETPAGESIZE -#elif defined(DGUX) -#define HAS_GETPAGESIZE -#elif defined(sun) && !defined(SVR4) -#define HAS_GETPAGESIZE -#endif -#ifdef XNO_SYSCONF -#undef _SC_PAGESIZE -#endif -#ifdef HAVE_SYSV_IPC -#include -#include -#endif -#include - -#if defined(setjmp) && defined(__GNU_LIBRARY__) && \ - (!defined(__GLIBC__) || (__GLIBC__ < 2) || \ - ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 3))) -#define HAS_GLIBC_SIGSETJMP 1 -#endif - -#if 0 -#define SETBUF_RETURNS_INT -#endif - -_X_EXPORT double xf86HUGE_VAL; - -#ifndef SELF_CONTAINED_WRAPPERS -extern void xf86DisableIO(void); -#endif - -/* - * This file contains the XFree86 wrappers for libc functions that can be - * called by loadable modules - */ - -_X_EXPORT double -xf86hypot(double x, double y) -{ - return(hypot(x,y)); -} - -_X_EXPORT void -xf86qsort(void *base, xf86size_t nmemb, xf86size_t size, - int (*comp)(const void *, const void *)) -{ - qsort(base, nmemb, size, comp); -} - -/* string functions */ - -_X_EXPORT char* -xf86strcat(char* dest, const char* src) -{ - return(strcat(dest,src)); -} - -_X_EXPORT char* -xf86strchr(const char* s, int c) -{ - return strchr(s,c); -} - -_X_EXPORT int -xf86strcmp(const char* s1, const char* s2) -{ - return strcmp(s1,s2); -} - -/* Just like the BSD version. It assumes that tolower() is ANSI-compliant */ -_X_EXPORT int -xf86strcasecmp(const char* s1, const char* s2) -{ - const unsigned char *us1 = (const unsigned char *)s1; - const unsigned char *us2 = (const unsigned char *)s2; - - while (tolower(*us1) == tolower(*us2++)) - if (*us1++ == '\0') - return 0; - - return tolower(*us1) - tolower(*--us2); -} - -_X_EXPORT char* -xf86strcpy(char* dest, const char* src) -{ - return strcpy(dest,src); -} - -_X_EXPORT xf86size_t -xf86strcspn(const char* s1, const char* s2) -{ - return (xf86size_t)strcspn(s1,s2); -} - -_X_EXPORT xf86size_t -xf86strlen(const char* s) -{ - return (xf86size_t)strlen(s); -} - -_X_EXPORT xf86size_t -xf86strlcat(char *dest, const char *src, xf86size_t size) -{ - return(strlcat(dest, src, size)); -} - -_X_EXPORT xf86size_t -xf86strlcpy(char *dest, const char *src, xf86size_t size) -{ - return strlcpy(dest, src, size); -} - -_X_EXPORT char* -xf86strncat(char* dest, const char* src, xf86size_t n) -{ - return strncat(dest,src,(size_t)n); -} - -_X_EXPORT int -xf86strncmp(const char* s1, const char* s2, xf86size_t n) -{ - return strncmp(s1,s2,(size_t)n); -} - -/* Just like the BSD version. It assumes that tolower() is ANSI-compliant */ -_X_EXPORT int -xf86strncasecmp(const char* s1, const char* s2, xf86size_t n) -{ - if (n != 0) { - const unsigned char *us1 = (const unsigned char *)s1; - const unsigned char *us2 = (const unsigned char *)s2; - - do { - if (tolower(*us1) != tolower(*us2++)) - return tolower(*us1) - tolower(*--us2); - if (*us1++ == '\0') - break; - } while (--n != 0); - } - return 0; -} - -_X_EXPORT char* -xf86strncpy(char* dest, const char* src, xf86size_t n) -{ - return strncpy(dest,src,(size_t)n); -} - -_X_EXPORT char* -xf86strpbrk(const char* s1, const char* s2) -{ - return strpbrk(s1,s2); -} - -_X_EXPORT char* -xf86strrchr(const char* s, int c) -{ - return strrchr(s,c); -} - -_X_EXPORT xf86size_t -xf86strspn(const char* s1, const char* s2) -{ - return strspn(s1,s2); -} - -_X_EXPORT char* -xf86strstr(const char* s1, const char* s2) -{ - return strstr(s1,s2); -} - -_X_EXPORT char* -xf86strtok(char* s1, const char* s2) -{ - return strtok(s1,s2); -} - -_X_EXPORT char* -xf86strdup(const char* s) -{ - return xstrdup(s); -} - -_X_EXPORT int -xf86sprintf(char *s, const char *format, ...) -{ - int ret; - va_list args; - va_start(args, format); - ret = vsprintf(s, format, args); - va_end(args); - return ret; -} - -_X_EXPORT int -xf86snprintf(char *s, xf86size_t len, const char *format, ...) -{ - int ret; - va_list args; - va_start(args, format); - ret = vsnprintf(s, (size_t)len, format, args); - va_end(args); - return ret; -} - -_X_EXPORT void -xf86bzero(void* s, unsigned int n) -{ - memset(s, 0, n); -} - -#ifdef HAVE_VSSCANF -_X_EXPORT int -xf86sscanf(char *s, const char *format, ...) -#else -_X_EXPORT int -xf86sscanf(char *s, const char *format, char *a0, char *a1, char *a2, - char *a3, char *a4, char *a5, char *a6, char *a7, char *a8, - char *a9) /* limit of ten args */ -#endif -{ -#ifdef HAVE_VSSCANF - int ret; - va_list args; - va_start(args, format); - - ret = vsscanf(s,format,args); - va_end(args); - return ret; -#else - return sscanf(s, format, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); -#endif -} - -/* Basic I/O */ - -_X_EXPORT int xf86errno; - -/* XXX This is not complete */ - -static int -xfToOsOpenFlags(int xfflags) -{ - int flags = 0; - - /* XXX This assumes O_RDONLY is 0 */ - if (xfflags & XF86_O_WRONLY) - flags |= O_WRONLY; - if (xfflags & XF86_O_RDWR) - flags |= O_RDWR; - if (xfflags & XF86_O_CREAT) - flags |= O_CREAT; - - return flags; -} - -_X_EXPORT int -xf86open(const char *path, int flags, ...) -{ - int fd; - va_list ap; - - va_start(ap, flags); - flags = xfToOsOpenFlags(flags); - if (flags & O_CREAT) { - /* can't request a mode_t directly on systems where mode_t - is an unsigned short */ - mode_t mode = (mode_t)va_arg(ap, unsigned int); - fd = open(path, flags, mode); - } else { - fd = open(path, flags); - } - va_end(ap); - xf86errno = xf86GetErrno(); - - return fd; -} - -_X_EXPORT int -xf86close(int fd) -{ - int status = close(fd); - - xf86errno = xf86GetErrno(); - return status; -} - -_X_EXPORT long -xf86lseek(int fd, long offset, int whence) -{ - switch (whence) { - case XF86_SEEK_SET: - whence = SEEK_SET; - break; - case XF86_SEEK_CUR: - whence = SEEK_CUR; - break; - case XF86_SEEK_END: - whence = SEEK_END; - break; - } - return (long)lseek(fd, (off_t)offset, whence); -} - -_X_EXPORT int -xf86ioctl(int fd, unsigned long request, pointer argp) -{ - int status = ioctl(fd, request, argp); - - xf86errno = xf86GetErrno(); - return status; -} - -_X_EXPORT xf86ssize_t -xf86read(int fd, void *buf, xf86size_t nbytes) -{ - xf86ssize_t n = read(fd, buf, (size_t)nbytes); - - xf86errno = xf86GetErrno(); - return n; -} - -_X_EXPORT xf86ssize_t -xf86write(int fd, const void *buf, xf86size_t nbytes) -{ - xf86ssize_t n = write(fd, buf, (size_t)nbytes); - - xf86errno = xf86GetErrno(); - return n; -} - -_X_EXPORT void* -xf86mmap(void *start, xf86size_t length, int prot, - int flags, int fd, xf86size_t /* off_t */ offset) -{ -#ifndef NO_MMAP - int p=0, f=0; - void *rc; - - if (flags & XF86_MAP_FIXED) f |= MAP_FIXED; - if (flags & XF86_MAP_SHARED) f |= MAP_SHARED; - if (flags & XF86_MAP_PRIVATE) f |= MAP_PRIVATE; -#if defined(__amd64__) && defined(linux) - if (flags & XF86_MAP_32BIT) f |= MAP_32BIT; -#endif - if (prot & XF86_PROT_EXEC) p |= PROT_EXEC; - if (prot & XF86_PROT_READ) p |= PROT_READ; - if (prot & XF86_PROT_WRITE) p |= PROT_WRITE; - if (prot & XF86_PROT_NONE) p |= PROT_NONE; - - rc = mmap(start,(size_t)length,p,f,fd,(off_t)offset); - - xf86errno = xf86GetErrno(); - if (rc == MAP_FAILED) - return XF86_MAP_FAILED; - else - return rc; -#else -#ifdef HAS_SVR3_MMAPDRV - void *rc; -#ifdef SELF_CONTAINED_WRAPPER - if(mmapFd < 0) { - if ((mmapFd = open("/dev/mmap", O_RDWR)) == -1) { - ErrorF("Warning: failed to open /dev/mmap \n"); - xf86errno = xf86_ENOSYS; - return XF86_MAP_FAILED; - } - } -#endif - MapDSC.vaddr = (char *)start; - MapDSC.physaddr = (char *)offset; - MapDSC.length = length; - MapDSC.ioflg = 1; - - rc = (pointer)ioctl(mmapFd, MAP, &MapDSC); - xf86errno = xf86GetErrno(); - if (rc == NULL) - return XF86_MAP_FAILED; - else - return rc; -#else - ErrorF("Warning: mmap() is not supported on this platform\n"); - xf86errno = xf86_ENOSYS; - return XF86_MAP_FAILED; -#endif -#endif -} - -_X_EXPORT int -xf86munmap(void *start, xf86size_t length) -{ -#ifndef NO_MMAP - int rc = munmap(start,(size_t)length); - - xf86errno = xf86GetErrno(); - return rc; -#else -#ifdef HAS_SVR3_MMAPDRV - int rc = ioctl(mmapFd, UNMAPRM , start); - - xf86errno = xf86GetErrno(); - return rc; -#else - ErrorF("Warning: munmap() is not supported on this platform\n"); - xf86errno = xf86_ENOSYS; - return -1; -#endif -#endif -} - -_X_EXPORT int -xf86stat(const char *file_name, struct xf86stat *xfst) -{ - int rc; - struct stat st; - - rc = stat(file_name, &st); - xf86errno = xf86GetErrno(); - xfst->st_rdev = st.st_rdev; /* Not much is currently supported */ - return rc; -} - -_X_EXPORT int -xf86fstat(int fd, struct xf86stat *xfst) -{ - int rc; - struct stat st; - - rc = fstat(fd, &st); - xf86errno = xf86GetErrno(); - xfst->st_rdev = st.st_rdev; /* Not much is currently supported */ - return rc; -} - -static int -xfToOsAccessMode(int xfmode) -{ - switch(xfmode) { - case XF86_R_OK: return R_OK; - case XF86_W_OK: return W_OK; - case XF86_X_OK: return X_OK; - case XF86_F_OK: return F_OK; - } - return 0; -} - -_X_EXPORT int -xf86access(const char *pathname, int mode) -{ - int rc; - - mode = xfToOsAccessMode(mode); - rc = access(pathname, mode); - xf86errno = xf86GetErrno(); - return rc; -} - - - -/* limited stdio support */ - -#define XF86FILE_magic 0x58464856 /* "XFHV" */ - -typedef struct _xf86_file_ { - INT32 fileno; - INT32 magic; - FILE* filehnd; - char* fname; -} XF86FILE_priv; - -static XF86FILE_priv stdhnd[3] = { - { 0, XF86FILE_magic, NULL, "$stdinp$" }, - { 0, XF86FILE_magic, NULL, "$stdout$" }, - { 0, XF86FILE_magic, NULL, "$stderr$" } -}; - -_X_EXPORT XF86FILE* xf86stdin = (XF86FILE*)&stdhnd[0]; -_X_EXPORT XF86FILE* xf86stdout = (XF86FILE*)&stdhnd[1]; -_X_EXPORT XF86FILE* xf86stderr = (XF86FILE*)&stdhnd[2]; - -void -xf86WrapperInit() -{ - if (stdhnd[0].filehnd == NULL) - stdhnd[0].filehnd = stdin; - if (stdhnd[1].filehnd == NULL) - stdhnd[1].filehnd = stdout; - if (stdhnd[2].filehnd == NULL) - stdhnd[2].filehnd = stderr; - xf86HUGE_VAL = HUGE_VAL; -} - -_X_EXPORT XF86FILE* -xf86fopen(const char* fn, const char* mode) -{ - XF86FILE_priv* fp; - FILE *f = fopen(fn,mode); - xf86errno = xf86GetErrno(); - if (!f) return 0; - - fp = xalloc(sizeof(XF86FILE_priv)); - fp->magic = XF86FILE_magic; - fp->filehnd = f; - fp->fileno = fileno(f); - fp->fname = xf86strdup(fn); -#ifdef DEBUG - ErrorF("xf86fopen(%s,%s) yields FILE %p XF86FILE %p\n", - fn,mode,f,fp); -#endif - return (XF86FILE*)fp; -} - -static void _xf86checkhndl(XF86FILE_priv* f,const char *func) -{ - if (!f || f->magic != XF86FILE_magic || - !f->filehnd || !f->fname) { - FatalError("libc_wrapper error: passed invalid FILE handle to %s", - func); - exit(42); - } -} - -_X_EXPORT int -xf86fclose(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - int ret; - - _xf86checkhndl(fp,"xf86fclose"); - - /* somewhat bad check */ - if (fp->fileno < 3 && fp->fname[0]=='$') { - /* assume this is stdin/out/err, don't dispose */ - ret = fclose(fp->filehnd); - } else { - ret = fclose(fp->filehnd); - fp->magic = 0; /* invalidate */ - xfree(fp->fname); - xfree(fp); - } - return ret ? -1 : 0; -} - -_X_EXPORT int -xf86printf(const char *format, ...) -{ - int ret; - va_list args; - va_start(args, format); - - ret = printf(format,args); - va_end(args); - return ret; -} - -_X_EXPORT int -xf86fprintf(XF86FILE* f, const char *format, ...) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - int ret; - va_list args; - va_start(args, format); - -#ifdef DEBUG - ErrorF("xf86fprintf for XF86FILE %p\n", fp); -#endif - _xf86checkhndl(fp,"xf86fprintf"); - - ret = vfprintf(fp->filehnd,format,args); - va_end(args); - return ret; -} - -_X_EXPORT int -xf86vfprintf(XF86FILE* f, const char *format, va_list ap) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - -#ifdef DEBUG - ErrorF("xf86vfprintf for XF86FILE %p\n", fp); -#endif - _xf86checkhndl(fp,"xf86vfprintf"); - - return vfprintf(fp->filehnd,format,ap); -} - -_X_EXPORT int -xf86vsprintf(char *s, const char *format, va_list ap) -{ - return vsprintf(s, format, ap); -} - -_X_EXPORT int -xf86vsnprintf(char *s, xf86size_t len, const char *format, va_list ap) -{ - return vsnprintf(s, (size_t)len, format, ap); -} - -#ifdef HAVE_VFSCANF -_X_EXPORT int -xf86fscanf(XF86FILE* f, const char *format, ...) -#else -_X_EXPORT int -xf86fscanf(XF86FILE* f, const char *format, char *a0, char *a1, char *a2, - char *a3, char *a4, char *a5, char *a6, char *a7, char *a8, - char *a9) /* limit of ten args */ -#endif -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - -#ifdef HAVE_VFSCANF - int ret; - va_list args; - va_start(args, format); - - _xf86checkhndl(fp,"xf86fscanf"); - - ret = vfscanf(fp->filehnd,format,args); - va_end(args); - return ret; -#else - _xf86checkhndl(fp,"xf86fscanf"); - return fscanf(fp->filehnd, format, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); -#endif -} - -_X_EXPORT char * -xf86fgets(char *buf, INT32 n, XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fgets"); - return fgets(buf,(int)n,fp->filehnd); -} - -_X_EXPORT int -xf86fputs(const char *buf, XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fputs"); - return fputs(buf,fp->filehnd); -} - -_X_EXPORT int -xf86getc(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86getc"); - return getc(fp->filehnd); -} - -_X_EXPORT int -xf86fgetc(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fgetc"); - return fgetc(fp->filehnd); -} - -_X_EXPORT int -xf86fputc(int c,XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fputc"); - return fputc(c,fp->filehnd); -} - -_X_EXPORT int -xf86fflush(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fflush"); - return fflush(fp->filehnd); -} - -_X_EXPORT xf86size_t -xf86fread(void* buf, xf86size_t sz, xf86size_t cnt, XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - -#ifdef DEBUG - ErrorF("xf86fread for XF86FILE %p\n", fp); -#endif - _xf86checkhndl(fp,"xf86fread"); - return fread(buf,(size_t)sz,(size_t)cnt,fp->filehnd); -} - -_X_EXPORT xf86size_t -xf86fwrite(const void* buf, xf86size_t sz, xf86size_t cnt, XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fwrite"); - return fwrite(buf,(size_t)sz,(size_t)cnt,fp->filehnd); -} - -_X_EXPORT int -xf86fseek(XF86FILE* f, long offset, int whence) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fseek"); - switch (whence) { - case XF86_SEEK_SET: - whence = SEEK_SET; - break; - case XF86_SEEK_CUR: - whence = SEEK_CUR; - break; - case XF86_SEEK_END: - whence = SEEK_END; - break; - } - return fseek(fp->filehnd,offset,whence); -} - -_X_EXPORT long -xf86ftell(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86ftell"); - return ftell(fp->filehnd); -} - -#define mapnum(e) case (xf86_##e): err = e; break; - -_X_EXPORT char* -xf86strerror(int n) -{ - int err; - - switch (n) - { - case 0: err = 0; break; - mapnum (EACCES); - mapnum (EAGAIN); - mapnum (EBADF); - mapnum (EEXIST); - mapnum (EFAULT); - mapnum (EINTR); - mapnum (EINVAL); - mapnum (EISDIR); - mapnum (ELOOP); /* not POSIX 1 */ - mapnum (EMFILE); - mapnum (ENAMETOOLONG); - mapnum (ENFILE); - mapnum (ENOENT); - mapnum (ENOMEM); - mapnum (ENOSPC); - mapnum (ENOTDIR); - mapnum (EPIPE); - mapnum (EROFS); - mapnum (ETXTBSY); /* not POSIX 1 */ - mapnum (ENOTTY); -#ifdef ENOSYS - mapnum (ENOSYS); -#endif - mapnum (EBUSY); - mapnum (ENODEV); - mapnum (EIO); -#ifdef ESRCH - mapnum (ESRCH); -#endif -#ifdef ENXIO - mapnum (ENXIO); -#endif -#ifdef E2BIG - mapnum (E2BIG); -#endif -#ifdef ENOEXEC - mapnum (ENOEXEC); -#endif -#ifdef ECHILD - mapnum (ECHILD); -#endif -#ifdef ENOTBLK - mapnum (ENOTBLK); -#endif -#ifdef EXDEV - mapnum (EXDEV); -#endif -#ifdef EFBIG - mapnum (EFBIG); -#endif -#ifdef ESPIPE - mapnum (ESPIPE); -#endif -#ifdef EMLINK - mapnum (EMLINK); -#endif -#ifdef EDOM - mapnum (EDOM); -#endif -#ifdef ERANGE - mapnum (ERANGE); -#endif - - default: - err = 999; - } - return strerror(err); -} - -#undef mapnum - - -/* required for portable fgetpos/fsetpos, - * use as - * XF86fpos_t* pos = xalloc(xf86fpossize()); - */ -_X_EXPORT long -xf86fpossize() -{ - return sizeof(fpos_t); -} - -_X_EXPORT int -xf86fgetpos(XF86FILE* f,XF86fpos_t* pos) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - fpos_t *ppos = (fpos_t*)pos; - - _xf86checkhndl(fp,"xf86fgetpos"); -#ifndef ISC - return fgetpos(fp->filehnd,ppos); -#else - *ppos = ftell(fp->filehnd); - if (*ppos < 0L) - return(-1); - return(0); -#endif -} - -_X_EXPORT int -xf86fsetpos(XF86FILE* f,const XF86fpos_t* pos) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - fpos_t *ppos = (fpos_t*)pos; - - /* XXX need to handle xf86errno here */ - _xf86checkhndl(fp,"xf86fsetpos"); -#ifndef ISC - return fsetpos(fp->filehnd,ppos); -#else - if (ppos == NULL) - { - errno = EINVAL; - return EOF; - } - return fseek(fp->filehnd, *ppos, SEEK_SET); -#endif -} - -_X_EXPORT void -xf86perror(const char *s) -{ - perror(s); -} - -_X_EXPORT int -xf86remove(const char *s) -{ -#ifdef _POSIX_SOURCE - return remove(s); -#else - return unlink(s); -#endif -} - -_X_EXPORT int -xf86rename(const char *old, const char *new) -{ -#ifdef _POSIX_SOURCE - return rename(old,new); -#else - int ret = link(old,new); - if (!ret) { - ret = unlink(old); - if (ret) unlink(new); - } else - ret = unlink(new); - return ret; -#endif -} - -_X_EXPORT void -xf86rewind(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fsetpos"); - rewind(fp->filehnd); -} - -_X_EXPORT void -xf86clearerr(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86clearerr"); - clearerr(fp->filehnd); -} - -_X_EXPORT int -xf86feof(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86feof"); - return feof(fp->filehnd); -} - -_X_EXPORT int -xf86ferror(XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86ferror"); - return ferror(fp->filehnd); -} - -_X_EXPORT XF86FILE* -xf86freopen(const char* fname,const char* mode,XF86FILE* fold) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)fold; - FILE *fnew; - - _xf86checkhndl(fp,"xf86freopen"); - fnew = freopen(fname,mode,fp->filehnd); - xf86errno = xf86GetErrno(); - if (!fnew) { - xf86fclose(fold); /* discard old XF86FILE structure */ - return 0; - } - /* recycle the old XF86FILE structure */ - fp->magic = XF86FILE_magic; - fp->filehnd = fnew; - fp->fileno = fileno(fnew); - fp->fname = xf86strdup(fname); -#ifdef DEBUG - ErrorF("xf86freopen(%s,%s,%p) yields FILE %p XF86FILE %p\n", - fname,mode,fold,fnew,fp); -#endif - return (XF86FILE*)fp; -} - -_X_EXPORT int -xf86setbuf(XF86FILE* f, char *buf) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86fsetbuf"); -#ifdef SETBUF_RETURNS_INT - return setbuf(fp->filehnd, buf); -#else - setbuf(fp->filehnd, buf); - return 0; -#endif -} - -_X_EXPORT int -xf86setvbuf(XF86FILE* f, char *buf, int mode, xf86size_t size) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - int vbufmode; - - _xf86checkhndl(fp,"xf86fsetvbuf"); - - switch (mode) { - case XF86_IONBF: - vbufmode = _IONBF; - break; - case XF86_IOLBF: - vbufmode = _IOFBF; - break; - case XF86_IOFBF: - vbufmode = _IOLBF; - break; - default: - FatalError("libc_wrapper error: mode in setvbuf incorrect"); - exit(42); - } - - return setvbuf(fp->filehnd,buf,vbufmode,(size_t)size); -} - -_X_EXPORT XF86FILE* -xf86tmpfile(void) -{ -#ifdef NEED_TMPFILE - return xf86fopen(tmpnam((char*)0),"w+"); -#else - XF86FILE_priv* fp; - FILE *f = tmpfile(); - xf86errno = xf86GetErrno(); - if (!f) return 0; - - fp = xalloc(sizeof(XF86FILE_priv)); - fp->magic = XF86FILE_magic; - fp->filehnd = f; - fp->fileno = fileno(f); - fp->fname = xf86strdup("*tmpfile*"); /* so that it can be xfree()'d */ -#ifdef DEBUG - ErrorF("xf86tmpfile() yields FILE %p XF86FILE %p\n",f,fp); -#endif - return (XF86FILE*)fp; -} -#endif /* HAS_TMPFILE */ - - -_X_EXPORT int -xf86ungetc(int c,XF86FILE* f) -{ - XF86FILE_priv* fp = (XF86FILE_priv*)f; - - _xf86checkhndl(fp,"xf86ungetc"); - return ungetc(c,fp->filehnd); -} - -/* Misc functions. Some are ANSI C, some are not. */ - -_X_EXPORT void -xf86usleep(usec) - unsigned long usec; -{ -#if (defined(SYSV) || defined(SVR4)) && !defined(sun) - syscall(3112, (usec) / 1000 + 1); -#else - usleep(usec); -#endif -} - -_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; -} - -_X_EXPORT int -xf86ffs(int mask) -{ - int n; - if (mask == 0) return 0; - for (n = 1; (mask & 1)==0; n++) - mask >>= 1; - return n; -} - -_X_EXPORT char * -xf86getenv(const char * a) -{ - /* Only allow this when the real and effective uids are the same */ - if (getuid() != geteuid()) - return NULL; - else - return(getenv(a)); -} - -_X_EXPORT void * -xf86bsearch(const void *key, const void *base, xf86size_t nmemb, - xf86size_t size, int (*compar)(const void *, const void *)) -{ - return bsearch(key, base, (size_t)nmemb, (size_t)size, compar); -} - -_X_EXPORT int -xf86execl(const char *pathname, const char *arg, ...) -{ - int i; - pid_t pid; - int exit_status; - char *arglist[5]; - va_list args; - va_start(args, arg); - arglist[0] = (char*)&args; - i = 1; - while (i < 5 && (arglist[i++] = va_arg(args, char *)) != NULL) - ; - va_end(args); - - if ((pid = fork()) < 0) { - ErrorF("Fork failed (%s)\n", strerror(errno)); - return -1; - } else if (pid == 0) { /* child */ - /* - * Make sure that the child doesn't inherit any I/O permissions it - * shouldn't have. It's better to put constraints on the development - * of a clock program than to give I/O permissions to a bogus program - * in someone's XF86Config file - */ -#ifndef SELF_CONTAINED_WRAPPER - xf86DisableIO(); -#endif - if (setuid(getuid()) == -1) { - ErrorF("xf86Execl: setuid() failed: %s\n", strerror(errno)); - exit(255); - } -#if !defined(SELF_CONTAINED_WRAPPER) - /* set stdin, stdout to the consoleFD, and leave stderr alone */ - for (i = 0; i < 2; i++) - { - if (xf86Info.consoleFd != i) - { - close(i); - dup(xf86Info.consoleFd); - } - } -#endif - - execv(pathname, arglist); - ErrorF("Exec failed for command \"%s\" (%s)\n", - pathname, strerror(errno)); - exit(255); - } - - /* parent */ - wait(&exit_status); - if (WIFEXITED(exit_status)) - { - switch (WEXITSTATUS(exit_status)) - { - case 0: /* OK */ - return 0; - case 255: /* exec() failed */ - return(255); - default: /* bad exit status */ - ErrorF("Program \"%s\" had bad exit status %d\n", - pathname, WEXITSTATUS(exit_status)); - return(WEXITSTATUS(exit_status)); - } - } - else if (WIFSIGNALED(exit_status)) - { - ErrorF("Program \"%s\" died on signal %d\n", - pathname, WTERMSIG(exit_status)); - return(WTERMSIG(exit_status)); - } -#ifdef WIFSTOPPED - else if (WIFSTOPPED(exit_status)) - { - ErrorF("Program \"%s\" stopped by signal %d\n", - pathname, WSTOPSIG(exit_status)); - return(WSTOPSIG(exit_status)); - } -#endif - else /* should never get to this point */ - { - ErrorF("Program \"%s\" has unknown exit condition\n", - pathname); - return(1); - } -} - -_X_EXPORT void -xf86abort(void) -{ - ErrorF("Module called abort() function\n"); - abort(); -} - -_X_EXPORT void -xf86exit(int ex) -{ - ErrorF("Module called exit() function with value=%d\n",ex); - exit(ex); -} - -/* directory handling functions */ -#define XF86DIR_magic 0x78666876 /* "xfhv" */ - -typedef struct _xf86_dir_ { - DIR *dir; - INT32 magic; - XF86DIRENT *dirent; -} XF86DIR_priv; - -static void -_xf86checkdirhndl(XF86DIR_priv* f,const char *func) -{ - if (!f || f->magic != XF86DIR_magic || !f->dir || !f->dirent) { - FatalError("libc_wrapper error: passed invalid DIR handle to %s", - func); - exit(42); - } -} - -_X_EXPORT XF86DIR * -xf86opendir(const char *name) -{ - XF86DIR_priv *dp; - DIR *dirp; - - dirp = opendir(name); - if (!dirp) - return (XF86DIR*)0; - - dp = xalloc(sizeof(XF86DIR_priv)); - dp->magic = XF86DIR_magic; /* This time I have this, Dirk! :-) */ - dp->dir = dirp; - dp->dirent = xalloc(sizeof(struct _xf86dirent)); - - return (XF86DIR*)dp; -} - -_X_EXPORT XF86DIRENT* -xf86readdir(XF86DIR* dirp) -{ - XF86DIR_priv* dp = (XF86DIR_priv*)dirp; - DIRENTRY *de; - XF86DIRENT* xde; - int sz; - - _xf86checkdirhndl(dp,"xf86readdir"); - - de = readdir(dp->dir); - if (!de) - return (XF86DIRENT*)0; - xde = dp->dirent; - sz = strlen(de->d_name); - strncpy(xde->d_name,de->d_name, sz>_XF86NAMELEN ? (_XF86NAMELEN+1) : (sz+1)); - xde->d_name[_XF86NAMELEN] = '\0'; /* be sure to have a 0 byte */ - return xde; -} - -_X_EXPORT void -xf86rewinddir(XF86DIR* dirp) -{ - XF86DIR_priv* dp = (XF86DIR_priv*)dirp; - - _xf86checkdirhndl(dp,"xf86readdir"); - rewinddir(dp->dir); -} - -_X_EXPORT int -xf86closedir(XF86DIR* dir) -{ - XF86DIR_priv* dp = (XF86DIR_priv*)dir; - int n; - - _xf86checkdirhndl(dp,"xf86readdir"); - - n = closedir(dp->dir); - dp->magic = 0; - xfree(dp->dirent); - xfree(dp); - - return n; -} - -static mode_t -xfToOsChmodMode(xf86mode_t xfmode) -{ - mode_t mode = 0; - - if (xfmode & XF86_S_ISUID) mode |= S_ISUID; - if (xfmode & XF86_S_ISGID) mode |= S_ISGID; - if (xfmode & XF86_S_ISVTX) mode |= S_ISVTX; - if (xfmode & XF86_S_IRUSR) mode |= S_IRUSR; - if (xfmode & XF86_S_IWUSR) mode |= S_IWUSR; - if (xfmode & XF86_S_IXUSR) mode |= S_IXUSR; - if (xfmode & XF86_S_IRGRP) mode |= S_IRGRP; - if (xfmode & XF86_S_IWGRP) mode |= S_IWGRP; - if (xfmode & XF86_S_IXGRP) mode |= S_IXGRP; - if (xfmode & XF86_S_IROTH) mode |= S_IROTH; - if (xfmode & XF86_S_IWOTH) mode |= S_IWOTH; - if (xfmode & XF86_S_IXOTH) mode |= S_IXOTH; - - return mode; -} - -_X_EXPORT int -xf86chmod(const char *path, xf86mode_t xfmode) -{ - mode_t mode = xfToOsChmodMode(xfmode); - int rc = chmod(path, mode); - - xf86errno = xf86GetErrno(); - return rc; -} - -_X_EXPORT int -xf86chown(const char *path, xf86uid_t owner, xf86gid_t group) -{ - int rc = chown(path, owner, group); - xf86errno = xf86GetErrno(); - return rc; -} - -_X_EXPORT xf86uid_t -xf86geteuid(void) -{ - return geteuid(); -} - -_X_EXPORT xf86gid_t -xf86getegid(void) -{ - return getegid(); -} - -_X_EXPORT int -xf86getpid(void) -{ - return getpid(); -} - -static mode_t -xfToOsMknodMode(xf86mode_t xfmode) -{ - mode_t mode = xfToOsChmodMode(xfmode); - - if (xfmode & XF86_S_IFREG) mode |= S_IFREG; - if (xfmode & XF86_S_IFCHR) mode |= S_IFCHR; - if (xfmode & XF86_S_IFBLK) mode |= S_IFBLK; - if (xfmode & XF86_S_IFIFO) mode |= S_IFIFO; - - return mode; -} - -_X_EXPORT int xf86mknod(const char *pathname, xf86mode_t xfmode, xf86dev_t dev) -{ - mode_t mode = xfToOsMknodMode(xfmode); - int rc = mknod(pathname, mode, dev); - xf86errno = xf86GetErrno(); - return rc; -} - -_X_EXPORT unsigned int xf86sleep(unsigned int seconds) -{ - return sleep(seconds); -} - -_X_EXPORT int xf86mkdir(const char *pathname, xf86mode_t xfmode) -{ - mode_t mode = xfToOsChmodMode(xfmode); - int rc = mkdir(pathname, mode); - - xf86errno = xf86GetErrno(); - return rc; -} - - -/* Several math functions */ - -_X_EXPORT int -xf86abs(int x) -{ - return abs(x); -} - -_X_EXPORT double -xf86acos(double x) -{ - return acos(x); -} - -_X_EXPORT double -xf86asin(double x) -{ - return asin(x); -} - -_X_EXPORT double -xf86atan(double x) -{ - return atan(x); -} - -_X_EXPORT double -xf86atan2(double x,double y) -{ - return atan2(x,y); -} - -_X_EXPORT double -xf86atof(const char* s) -{ - return atof(s); -} - -_X_EXPORT int -xf86atoi(const char* s) -{ - return atoi(s); -} - -_X_EXPORT long -xf86atol(const char* s) -{ - return atol(s); -} - -_X_EXPORT double -xf86ceil(double x) -{ - return ceil(x); -} - -_X_EXPORT double -xf86cos(double x) -{ - return(cos(x)); -} - -_X_EXPORT double -xf86exp(double x) -{ - return(exp(x)); -} - -_X_EXPORT double -xf86fabs(double x) -{ - return(fabs(x)); -} - -_X_EXPORT int -xf86finite(double x) -{ -#ifndef QNX4 - return(finite(x)); -#else - /* XXX Replace this with something that really works. */ - return 1; -#endif -} - -_X_EXPORT double -xf86floor(double x) -{ - return floor(x); -} - -_X_EXPORT double -xf86fmod(double x,double y) -{ - return fmod(x,y); -} - -_X_EXPORT long -xf86labs(long x) -{ - return labs(x); -} - -_X_EXPORT double -xf86ldexp(double x, int exp) -{ - return ldexp(x, exp); -} - -_X_EXPORT double -xf86log(double x) -{ - return(log(x)); -} - -_X_EXPORT double -xf86log10(double x) -{ - return(log10(x)); -} - -_X_EXPORT double -xf86modf(double x,double* y) -{ - return modf(x,y); -} - -_X_EXPORT double -xf86pow(double x, double y) -{ - return(pow(x,y)); -} - -_X_EXPORT double -xf86sin(double x) -{ - return sin(x); -} - -_X_EXPORT double -xf86sqrt(double x) -{ - return(sqrt(x)); -} - -_X_EXPORT double -xf86strtod(const char *s, char **end) -{ - return strtod(s,end); -} - -_X_EXPORT long -xf86strtol(const char *s, char **end, int radix) -{ - return strtol(s,end,radix); -} - -_X_EXPORT unsigned long -xf86strtoul(const char *s, char **end,int radix) -{ - return strtoul(s,end,radix); -} - -_X_EXPORT double -xf86tan(double x) -{ - return tan(x); -} - -/* memory functions */ -_X_EXPORT void* -xf86memchr(const void* s, int c, xf86size_t n) -{ - return memchr(s,c,(size_t)n); -} - -_X_EXPORT int -xf86memcmp(const void* s1, const void* s2, xf86size_t n) -{ - return(memcmp(s1,s2,(size_t)n)); -} - -_X_EXPORT void* -xf86memcpy(void* dest, const void* src, xf86size_t n) -{ - return(memcpy(dest,src,(size_t)n)); -} - -_X_EXPORT void* -xf86memmove(void* dest, const void* src, xf86size_t n) -{ - return(memmove(dest,src,(size_t)n)); -} - -_X_EXPORT void* -xf86memset(void* s, int c, xf86size_t n) -{ - return(memset(s,c,(size_t)n)); -} - -/* ctype functions */ - -_X_EXPORT int -xf86isalnum(int c) -{ - return isalnum(c) ? 1 : 0; -} - -_X_EXPORT int -xf86isalpha(int c) -{ - return isalpha(c) ? 1 : 0; -} - -_X_EXPORT int -xf86iscntrl(int c) -{ - return iscntrl(c) ? 1 : 0; -} - -_X_EXPORT int -xf86isdigit(int c) -{ - return isdigit(c) ? 1 : 0; -} - -_X_EXPORT int -xf86isgraph(int c) -{ - return isgraph(c) ? 1 : 0; -} - -_X_EXPORT int -xf86islower(int c) -{ - return islower(c) ? 1 : 0; -} - -_X_EXPORT int -xf86isprint(int c) -{ - return isprint(c) ? 1 : 0; -} - -_X_EXPORT int -xf86ispunct(int c) -{ - return ispunct(c) ? 1 : 0; -} - -_X_EXPORT int -xf86isspace(int c) -{ - return isspace(c) ? 1 : 0; -} - -_X_EXPORT int -xf86isupper(int c) -{ - return isupper(c) ? 1 : 0; -} - -_X_EXPORT int -xf86isxdigit(int c) -{ - return isxdigit(c) ? 1 : 0; -} - -_X_EXPORT int -xf86tolower(int c) -{ - return tolower(c); -} - -_X_EXPORT int -xf86toupper(int c) -{ - return toupper(c); -} - -/* memory allocation functions */ -_X_EXPORT void* -xf86calloc(xf86size_t sz,xf86size_t n) -{ - return xcalloc(sz, n); -} - -_X_EXPORT void -xf86free(void* p) -{ - xfree(p); -} - -_X_EXPORT double -xf86frexp(double x, int *exp) -{ - return frexp(x, exp); -} - -_X_EXPORT void* -xf86malloc(xf86size_t n) -{ - return xalloc(n); -} - -_X_EXPORT void* -xf86realloc(void* p, xf86size_t n) -{ - return xrealloc(p,n); -} - -/* - * XXX This probably doesn't belong here. - */ -_X_EXPORT int -xf86getpagesize() -{ - static int pagesize = -1; - - if (pagesize != -1) - return pagesize; - -#if defined(_SC_PAGESIZE) || defined(HAS_SC_PAGESIZE) - pagesize = sysconf(_SC_PAGESIZE); -#endif -#ifdef _SC_PAGE_SIZE - if (pagesize == -1) - pagesize = sysconf(_SC_PAGE_SIZE); -#endif -#ifdef HAS_GETPAGESIZE - if (pagesize == -1) - pagesize = getpagesize(); -#endif -#ifdef PAGE_SIZE - if (pagesize == -1) - pagesize = PAGE_SIZE; -#endif - if (pagesize == -1) - FatalError("xf86getpagesize: Cannot determine page size"); - - return pagesize; -} - - -#define mapnum(e) case (e): return (xf86_##e) - -_X_EXPORT int -xf86GetErrno () -{ - switch (errno) - { - case 0: return 0; - mapnum (EACCES); - mapnum (EAGAIN); - mapnum (EBADF); - mapnum (EEXIST); - mapnum (EFAULT); - mapnum (EINTR); - mapnum (EINVAL); - mapnum (EISDIR); - mapnum (ELOOP); /* not POSIX 1 */ - mapnum (EMFILE); - mapnum (ENAMETOOLONG); - mapnum (ENFILE); - mapnum (ENOENT); - mapnum (ENOMEM); - mapnum (ENOSPC); - mapnum (ENOTDIR); - mapnum (EPIPE); - mapnum (EROFS); - mapnum (ETXTBSY); /* not POSIX 1 */ - mapnum (ENOTTY); -#ifdef ENOSYS - mapnum (ENOSYS); -#endif - mapnum (EBUSY); - mapnum (ENODEV); - mapnum (EIO); -#ifdef ESRCH - mapnum (ESRCH); -#endif -#ifdef ENXIO - mapnum (ENXIO); -#endif -#ifdef E2BIG - mapnum (E2BIG); -#endif -#ifdef ENOEXEC - mapnum (ENOEXEC); -#endif -#ifdef ECHILD - mapnum (ECHILD); -#endif -#ifdef ENOTBLK - mapnum (ENOTBLK); -#endif -#ifdef EXDEV - mapnum (EXDEV); -#endif -#ifdef EFBIG - mapnum (EFBIG); -#endif -#ifdef ESPIPE - mapnum (ESPIPE); -#endif -#ifdef EMLINK - mapnum (EMLINK); -#endif -#ifdef EDOM - mapnum (EDOM); -#endif -#ifdef ERANGE - mapnum (ERANGE); -#endif - default: - return (xf86_UNKNOWN); - } -} - -#undef mapnum - - - -#ifdef HAVE_SYSV_IPC - -_X_EXPORT int -xf86shmget(xf86key_t key, int size, int xf86shmflg) -{ - int shmflg; - int ret; - - /* This copies the permissions (SHM_R, SHM_W for u, g, o). */ - shmflg = xf86shmflg & 0777; - - if (key == XF86IPC_PRIVATE) key = IPC_PRIVATE; - - if (xf86shmflg & XF86IPC_CREAT) shmflg |= IPC_CREAT; - if (xf86shmflg & XF86IPC_EXCL) shmflg |= IPC_EXCL; - if (xf86shmflg & XF86IPC_NOWAIT) shmflg |= IPC_NOWAIT; - ret = shmget((key_t) key, size, shmflg); - - if (ret == -1) - xf86errno = xf86GetErrno(); - - return ret; -} - -_X_EXPORT char * -xf86shmat(int id, char *addr, int xf86shmflg) -{ - int shmflg = 0; - pointer ret; - -#ifdef SHM_RDONLY - if (xf86shmflg & XF86SHM_RDONLY) shmflg |= SHM_RDONLY; -#endif -#ifdef SHM_RND - if (xf86shmflg & XF86SHM_RND) shmflg |= SHM_RND; -#endif -#ifdef SHM_REMAP - if (xf86shmflg & XF86SHM_REMAP) shmflg |= SHM_REMAP; -#endif - - ret = shmat(id,addr,shmflg); - - if (ret == (pointer) -1) - xf86errno = xf86GetErrno(); - - return ret; -} - -_X_EXPORT int -xf86shmdt(char *addr) -{ - int ret; - - ret = shmdt(addr); - - if (ret == -1) - xf86errno = xf86GetErrno(); - - return ret; -} - -/* - * for now only implement the rmid command. - */ -_X_EXPORT int -xf86shmctl(int id, int xf86cmd, pointer buf) -{ - int cmd; - int ret; - - switch (xf86cmd) { - case XF86IPC_RMID: - cmd = IPC_RMID; - break; - default: - return 0; - } - - ret = shmctl(id, cmd, buf); - - if (ret == -1) - xf86errno = xf86GetErrno(); - - return ret; -} -#else - -int -xf86shmget(xf86key_t key, int size, int xf86shmflg) -{ - xf86errno = ENOSYS; - - return -1; -} - -char * -xf86shmat(int id, char *addr, int xf86shmflg) -{ - xf86errno = ENOSYS; - - return (char *)-1; -} - -int -xf86shmctl(int id, int xf86cmd, pointer buf) -{ - xf86errno = ENOSYS; - - return -1; -} - -int -xf86shmdt(char *addr) -{ - xf86errno = ENOSYS; - - return -1; -} -#endif /* HAVE_SYSV_IPC */ - -_X_EXPORT int -xf86getjmptype() -{ -#ifdef HAS_GLIBC_SIGSETJMP - return 1; -#else - return 0; -#endif -} - -#ifdef HAS_GLIBC_SIGSETJMP - -_X_EXPORT int -xf86setjmp(xf86jmp_buf env) -{ -#if defined(__GLIBC__) && (__GLIBC__ >= 2) - return __sigsetjmp((void *)env, xf86setjmp1_arg2()); -#else - return xf86setjmp1(env, xf86setjmp1_arg2()); -#endif -} - -_X_EXPORT int -xf86setjmp0(xf86jmp_buf env) -{ - FatalError("setjmp: type 0 called instead of type %d", xf86getjmptype()); -} - -#if !defined(__GLIBC__) || (__GLIBC__ < 2) /* libc5 */ - -_X_EXPORT int -xf86setjmp1(xf86jmp_buf env, int arg2) -{ - __sigjmp_save((void *)env, arg2); - return __setjmp((void *)env); -} - -#endif - -#else /* HAS_GLIBC_SIGSETJMP */ - -int -xf86setjmp1(xf86jmp_buf env, int arg2) -{ - FatalError("setjmp: type 1 called instead of type %d", xf86getjmptype()); -} - -int -xf86setjmp0(xf86jmp_buf env) -{ - return setjmp((void *)env); -} - -#endif /* HAS_GLIBC_SIGSETJMP */ - -_X_EXPORT int -xf86setjmp1_arg2() -{ - return 1; -} - -_X_EXPORT int -xf86setjmperror(xf86jmp_buf env) -{ - FatalError("setjmp: don't know how to handle setjmp() type %d", - xf86getjmptype()); -} - -long -xf86random() -{ - return random(); -} diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am index 5ed60bc55..68f6b4cd0 100644 --- a/hw/xfree86/os-support/solaris/Makefile.am +++ b/hw/xfree86/os-support/solaris/Makefile.am @@ -20,7 +20,6 @@ solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S noinst_LTLIBRARIES = libsolaris.la libsolaris_la_SOURCES = sun_bios.c sun_init.c \ sun_mouse.c sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ - $(srcdir)/../shared/libc_wrapper.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/stdResource.c \ diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h index 77f2253e9..aba47581f 100644 --- a/hw/xfree86/os-support/xf86_OSlib.h +++ b/hw/xfree86/os-support/xf86_OSlib.h @@ -76,21 +76,6 @@ #include #include -/* - * Define some things from the "ANSI" C wrappers that are needed in the - * the core server. - */ -#ifndef HAVE_WRAPPER_DECLS -#define HAVE_WRAPPER_DECLS -#undef usleep -#define usleep(a) xf86usleep(a) -extern void xf86usleep(unsigned long); -extern int xf86getpagesize(void); -extern int xf86GetErrno(void); -typedef unsigned long xf86size_t; -typedef signed long xf86ssize_t; -#endif - #include #include #include diff --git a/hw/xfree86/os-support/xf86_ansic.h b/hw/xfree86/os-support/xf86_ansic.h deleted file mode 100644 index 0afd96744..000000000 --- a/hw/xfree86/os-support/xf86_ansic.h +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright 1997-2003 by The XFree86 Project, 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 names of the above listed copyright holders - * not be used in advertising or publicity pertaining to distribution of - * the software without specific, written prior permission. The above listed - * copyright holders make no representations about the suitability of this - * software for any purpose. It is provided "as is" without express or - * implied warranty. - * - * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS 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 _XF86_ANSIC_H -#define _XF86_ANSIC_H - -#include - -/* - * The first set of definitions are required both for modules and - * libc_wrapper.c. - */ - -#if !defined(SYSV) && !defined(SVR4) && !defined(Lynx) || \ - defined(__SCO__) || defined(__UNIXWARE__) -#define HAVE_VSSCANF -#define HAVE_VFSCANF -#endif - -#ifndef NULL -#if (defined(SVR4) || defined(SYSV)) && !defined(__GNUC__) -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif -#ifndef EOF -#define EOF (-1) -#endif - -#ifndef PATH_MAX -#define PATH_MAX 1024 -#endif - -/* stuff */ -#define x_BITSPERBYTE 8 -#define x_BITS(type) (x_BITSPERBYTE * (int)sizeof(type)) -#define x_SHORTBITS x_BITS(short) -#define x_INTBITS x_BITS(int) -#define x_LONGBITS x_BITS(long) -#ifndef SHRT_MIN -#define SHRT_MIN ((short)(1 << (x_SHORTBITS - 1))) -#endif - -#ifndef FONTMODULE -#include "misc.h" -#endif -#include "xf86_libc.h" -#ifndef SHRT_MAX -#define SHRT_MAX ((short)~SHRT_MIN) -#endif -#ifndef USHRT_MAX -#define USHRT_MAX ((unsigned short)~0) -#endif -#ifndef MINSHORT -#define MINSHORT SHRT_MIN -#endif -#ifndef MAXSHORT -#define MAXSHORT SHRT_MAX -#endif -#ifndef INT_MIN -#define INT_MIN (1 << (x_INTBITS - 1)) -#endif -#ifndef INT_MAX -#define INT_MAX (~INT_MIN) -#endif -#ifndef UINT_MAX -#define UINT_MAX (~0) -#endif -#ifndef MININT -#define MININT INT_MIN -#endif -#ifndef MAXINT -#define MAXINT INT_MAX -#endif -#ifndef LONG_MIN -#define LONG_MIN ((long)(1 << (x_LONGBITS - 1))) -#endif -#ifndef LONG_MAX -#define LONG_MAX ((long)~LONG_MIN) -#endif -#ifndef ULONG_MAX -#define ULONG_MAX ((unsigned long)~0UL) -#endif -#ifndef MINLONG -#define MINLONG LONG_MIN -#endif -#ifndef MAXLONG -#define MAXLONG LONG_MAX -#endif - -/* - * ANSI C compilers only. - */ - -/* ANSI C emulation library */ - -extern void xf86abort(void); -extern int xf86abs(int); -extern double xf86acos(double); -extern double xf86asin(double); -extern double xf86atan(double); -extern double xf86atan2(double,double); -extern double xf86atof(const char*); -extern int xf86atoi(const char*); -extern long xf86atol(const char*); -extern void *xf86bsearch(const void *, const void *, xf86size_t, xf86size_t, - int (*)(const void *, const void *)); -extern double xf86ceil(double); -extern void* xf86calloc(xf86size_t,xf86size_t); -extern void xf86clearerr(XF86FILE*); -extern double xf86cos(double); -extern void xf86exit(int); -extern double xf86exp(double); -extern double xf86fabs(double); -extern int xf86fclose(XF86FILE*); -extern int xf86feof(XF86FILE*); -extern int xf86ferror(XF86FILE*); -extern int xf86fflush(XF86FILE*); -extern int xf86fgetc(XF86FILE*); -extern int xf86getc(XF86FILE*); -extern int xf86fgetpos(XF86FILE*,XF86fpos_t*); -extern char* xf86fgets(char*,INT32,XF86FILE*); -extern int xf86finite(double); -extern double xf86floor(double); -extern double xf86fmod(double,double); -extern XF86FILE* xf86fopen(const char*,const char*); -extern double xf86frexp(double, int*); -extern int xf86printf(const char*,...); -extern int xf86fprintf(XF86FILE*,const char*,...); -extern int xf86fputc(int,XF86FILE*); -extern int xf86fputs(const char*,XF86FILE*); -extern xf86size_t xf86fread(void*,xf86size_t,xf86size_t,XF86FILE*); -extern void xf86free(void*); -extern XF86FILE* xf86freopen(const char*,const char*,XF86FILE*); -#if defined(HAVE_VFSCANF) || !defined(NEED_XF86_PROTOTYPES) -extern int xf86fscanf(XF86FILE*,const char*,...); -#else -extern int xf86fscanf(/*XF86FILE*,const char*,char *,char *,char *,char *, - char *,char *,char *,char *,char *,char * */); -#endif -extern int xf86fseek(XF86FILE*,long,int); -extern int xf86fsetpos(XF86FILE*,const XF86fpos_t*); -extern long xf86ftell(XF86FILE*); -extern xf86size_t xf86fwrite(const void*,xf86size_t,xf86size_t,XF86FILE*); -extern char* xf86getenv(const char*); -extern int xf86isalnum(int); -extern int xf86isalpha(int); -extern int xf86iscntrl(int); -extern int xf86isdigit(int); -extern int xf86isgraph(int); -extern int xf86islower(int); -extern int xf86isprint(int); -extern int xf86ispunct(int); -extern int xf86isspace(int); -extern int xf86isupper(int); -extern int xf86isxdigit(int); -extern long xf86labs(long); -extern double xf86ldexp(double,int); -extern double xf86log(double); -extern double xf86log10(double); -extern void* xf86malloc(xf86size_t); -extern void* xf86memchr(const void*,int,xf86size_t); -extern int xf86memcmp(const void*,const void*,xf86size_t); -extern void* xf86memcpy(void*,const void*,xf86size_t); -extern void* xf86memmove(void*,const void*,xf86size_t); -extern void* xf86memset(void*,int,xf86size_t); -extern double xf86modf(double,double*); -extern void xf86perror(const char*); -extern double xf86pow(double,double); -extern void xf86qsort(void*, xf86size_t, xf86size_t, - int(*)(const void*, const void*)); -extern void* xf86realloc(void*,xf86size_t); -extern long xf86random(void); -extern int xf86remove(const char*); -extern int xf86rename(const char*,const char*); -extern void xf86rewind(XF86FILE*); -extern int xf86setbuf(XF86FILE*,char*); -extern int xf86setvbuf(XF86FILE*,char*,int,xf86size_t); -extern double xf86sin(double); -extern int xf86sprintf(char*,const char*,...); -extern int xf86snprintf(char*,xf86size_t,const char*,...); -extern double xf86sqrt(double); -#if defined(HAVE_VSSCANF) || !defined(NEED_XF86_PROTOTYPES) -extern int xf86sscanf(char*,const char*,...); -#else -extern int xf86sscanf(/*char*,const char*,char *,char *,char *,char *, - char *,char *,char *,char *,char *,char * */); -#endif -extern char* xf86strcat(char*,const char*); -extern char* xf86strchr(const char*, int c); -extern int xf86strcmp(const char*,const char*); -extern int xf86strcasecmp(const char*,const char*); -extern char* xf86strcpy(char*,const char*); -extern xf86size_t xf86strcspn(const char*,const char*); -extern char* xf86strerror(int); -extern xf86size_t xf86strlcat(char*,const char*,xf86size_t); -extern xf86size_t xf86strlcpy(char*,const char*,xf86size_t); -extern xf86size_t xf86strlen(const char*); -extern char* xf86strncat(char *, const char *, xf86size_t); -extern int xf86strncmp(const char*,const char*,xf86size_t); -extern int xf86strncasecmp(const char*,const char*,xf86size_t); -extern char* xf86strncpy(char*,const char*,xf86size_t); -extern char* xf86strpbrk(const char*,const char*); -extern char* xf86strrchr(const char*,int); -extern xf86size_t xf86strspn(const char*,const char*); -extern char* xf86strstr(const char*,const char*); -extern double xf86strtod(const char*,char**); -extern char* xf86strtok(char*,const char*); -extern long xf86strtol(const char*,char**,int); -extern unsigned long xf86strtoul(const char*,char**,int); -extern double xf86tan(double); -extern XF86FILE* xf86tmpfile(void); -extern char* xf86tmpnam(char*); -extern int xf86tolower(int); -extern int xf86toupper(int); -extern int xf86ungetc(int,XF86FILE*); -extern int xf86vfprintf(XF86FILE*,const char*,va_list); -extern int xf86vsprintf(char*,const char*,va_list); -extern int xf86vsnprintf(char*,xf86size_t,const char*,va_list); - -extern int xf86open(const char*, int,...); -extern int xf86close(int); -extern long xf86lseek(int, long, int); -extern int xf86ioctl(int, unsigned long, pointer); -extern xf86ssize_t xf86read(int, void *, xf86size_t); -extern xf86ssize_t xf86write(int, const void *, xf86size_t); -extern void* xf86mmap(void*, xf86size_t, int, int, int, xf86size_t /* off_t */); -extern int xf86munmap(void*, xf86size_t); -extern int xf86stat(const char *, struct xf86stat *); -extern int xf86fstat(int, struct xf86stat *); -extern int xf86access(const char *, int); -extern int xf86errno; -extern int xf86GetErrno(void); - -extern double xf86HUGE_VAL; - -extern double xf86hypot(double,double); - -/* non-ANSI C functions */ -extern XF86DIR* xf86opendir(const char*); -extern int xf86closedir(XF86DIR*); -extern XF86DIRENT* xf86readdir(XF86DIR*); -extern void xf86rewinddir(XF86DIR*); -extern void xf86bcopy(const void*,void*,xf86size_t); -extern int xf86ffs(int); -extern char* xf86strdup(const char*); -extern void xf86bzero(void*,unsigned int); -extern int xf86execl(const char *, const char *, ...); -extern long xf86fpossize(void); -extern int xf86chmod(const char *, xf86mode_t); -extern int xf86chown(const char *, xf86uid_t, xf86gid_t); -extern xf86uid_t xf86geteuid(void); -extern xf86gid_t xf86getegid(void); -extern int xf86getpid(void); -extern int xf86mknod(const char *, xf86mode_t, xf86dev_t); -extern int xf86mkdir(const char *, xf86mode_t); -unsigned int xf86sleep(unsigned int seconds); -/* sysv IPC */ -extern int xf86shmget(xf86key_t key, int size, int xf86shmflg); -extern char * xf86shmat(int id, char *addr, int xf86shmflg); -extern int xf86shmdt(char *addr); -extern int xf86shmctl(int id, int xf86cmd, pointer buf); - -extern int xf86setjmp(xf86jmp_buf env); -extern int xf86setjmp0(xf86jmp_buf env); -extern int xf86setjmp1(xf86jmp_buf env, int); -extern int xf86setjmp1_arg2(void); -extern int xf86setjmperror(xf86jmp_buf env); -extern int xf86getjmptype(void); -extern void xf86longjmp(xf86jmp_buf env, int val); -#define xf86setjmp_macro(env) \ - (xf86getjmptype() == 0 ? xf86setjmp0((env)) : \ - (xf86getjmptype() == 1 ? xf86setjmp1((env), xf86setjmp1_arg2()) : \ - xf86setjmperror((env)))) - -/* - * These things are always required by drivers (but not by libc_wrapper.c), - * even for a static server because some OSs don't provide them. - */ - -extern int xf86getpagesize(void); -extern void xf86usleep(unsigned long); -extern void xf86getsecs(long *, long *); -#ifndef DONT_DEFINE_WRAPPERS -#undef getpagesize -#define getpagesize() xf86getpagesize() -#undef usleep -#define usleep(ul) xf86usleep(ul) -#undef getsecs -#define getsecs(a, b) xf86getsecs(a, b) -#endif -#endif /* _XF86_ANSIC_H */ diff --git a/hw/xfree86/os-support/xf86_libc.h b/hw/xfree86/os-support/xf86_libc.h deleted file mode 100644 index 199fcd6b9..000000000 --- a/hw/xfree86/os-support/xf86_libc.h +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Copyright (c) 1997-2003 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). - */ - -/* - * This file is an attempt to make developing code for the new loadable module - * architecure simpler. It tries to use macros to hide all libc wrappers so - * that all that is needed to "port" a module to this architecture is to - * include this one header file - * - * Revision history: - * - * - * 0.4 Apr 12 1997 add the ANSI defines - * 0.3 Feb 24 1997 handle getenv - * 0.2 Feb 24 1997 hide few FILE functions - * 0.1 Feb 24 1997 hide the trivial functions mem* str* - */ - -#ifndef XF86_LIBC_H -#define XF86_LIBC_H 1 - -#include -#include - -/* - * The first set of definitions are required both for modules and - * libc_wrapper.c. - */ - -/* - * First, the new data types - * - * note: if some pointer is declared "opaque" here, pass it between - * xf86* functions only, and don't rely on it having a whatever internal - * structure, even if some source file might reveal the existence of - * such a structure. - */ -typedef void XF86FILE; /* opaque FILE replacement */ -extern XF86FILE* xf86stdin; -extern XF86FILE* xf86stdout; -extern XF86FILE* xf86stderr; - -typedef void XF86fpos_t; /* opaque fpos_t replacement */ - -#define _XF86NAMELEN 263 /* enough for a larger filename */ - /* (divisble by 8) */ -typedef void XF86DIR; /* opaque DIR replacement */ - -/* Note: the following is POSIX! POSIX only requires the d_name member. - * Normal Unix has often a number of other members, but don't rely on that - */ -struct _xf86dirent { /* types in struct dirent/direct: */ - char d_name[_XF86NAMELEN+1]; /* char [MAXNAMLEN]; might be smaller or unaligned */ -}; -typedef struct _xf86dirent XF86DIRENT; - -typedef unsigned long xf86size_t; -typedef signed long xf86ssize_t; -typedef unsigned long xf86dev_t; -typedef unsigned int xf86mode_t; -typedef unsigned int xf86uid_t; -typedef unsigned int xf86gid_t; - -struct xf86stat { - xf86dev_t st_rdev; /* This is incomplete, and makes assumptions */ -}; - -/* sysv IPC */ -typedef int xf86key_t; - -/* setjmp/longjmp */ -#if defined(__ia64__) -typedef int xf86jmp_buf[1024] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */ -#else -typedef int xf86jmp_buf[1024]; -#endif - -/* for setvbuf */ -#define XF86_IONBF 1 -#define XF86_IOFBF 2 -#define XF86_IOLBF 3 - -/* for open (XXX not complete) */ -#define XF86_O_RDONLY 0x0000 -#define XF86_O_WRONLY 0x0001 -#define XF86_O_RDWR 0x0002 -#define XF86_O_CREAT 0x0200 - -/* for mmap */ -#define XF86_PROT_EXEC 0x0001 -#define XF86_PROT_READ 0x0002 -#define XF86_PROT_WRITE 0x0004 -#define XF86_PROT_NONE 0x0008 -#define XF86_MAP_FIXED 0x0001 -#define XF86_MAP_SHARED 0x0002 -#define XF86_MAP_PRIVATE 0x0004 -#define XF86_MAP_32BIT 0x0040 -#define XF86_MAP_FAILED ((void *)-1) - -/* for fseek */ -#define XF86_SEEK_SET 0 -#define XF86_SEEK_CUR 1 -#define XF86_SEEK_END 2 - -/* for access */ -#define XF86_R_OK 0 -#define XF86_W_OK 1 -#define XF86_X_OK 2 -#define XF86_F_OK 3 - -/* for chmod */ -#define XF86_S_ISUID 04000 /* set user ID on execution */ -#define XF86_S_ISGID 02000 /* set group ID on execution */ -#define XF86_S_ISVTX 01000 /* sticky bit */ -#define XF86_S_IRUSR 00400 /* read by owner */ -#define XF86_S_IWUSR 00200 /* write by owner */ -#define XF86_S_IXUSR 00100 /* execute/search by owner */ -#define XF86_S_IRGRP 00040 /* read by group */ -#define XF86_S_IWGRP 00020 /* write by group */ -#define XF86_S_IXGRP 00010 /* execute/search by group */ -#define XF86_S_IROTH 00004 /* read by others */ -#define XF86_S_IWOTH 00002 /* write by others */ -#define XF86_S_IXOTH 00001 /* execute/search by others */ - -/* for mknod */ -#define XF86_S_IFREG 0010000 -#define XF86_S_IFCHR 0020000 -#define XF86_S_IFBLK 0040000 -#define XF86_S_IFIFO 0100000 - -/* - * errno values - * They start at 1000 just so they don't match real errnos at all - */ -#define xf86_UNKNOWN 1000 -#define xf86_EACCES 1001 -#define xf86_EAGAIN 1002 -#define xf86_EBADF 1003 -#define xf86_EEXIST 1004 -#define xf86_EFAULT 1005 -#define xf86_EINTR 1006 -#define xf86_EINVAL 1007 -#define xf86_EISDIR 1008 -#define xf86_ELOOP 1009 -#define xf86_EMFILE 1010 -#define xf86_ENAMETOOLONG 1011 -#define xf86_ENFILE 1012 -#define xf86_ENOENT 1013 -#define xf86_ENOMEM 1014 -#define xf86_ENOSPC 1015 -#define xf86_ENOTDIR 1016 -#define xf86_EPIPE 1017 -#define xf86_EROFS 1018 -#define xf86_ETXTBSY 1019 -#define xf86_ENOTTY 1020 -#define xf86_ENOSYS 1021 -#define xf86_EBUSY 1022 -#define xf86_ENODEV 1023 -#define xf86_EIO 1024 - -#define xf86_ESRCH 1025 -#define xf86_ENXIO 1026 -#define xf86_E2BIG 1027 -#define xf86_ENOEXEC 1028 -#define xf86_ECHILD 1029 -#define xf86_ENOTBLK 1030 -#define xf86_EXDEV 1031 -#define xf86_EFBIG 1032 -#define xf86_ESPIPE 1033 -#define xf86_EMLINK 1034 -#define xf86_EDOM 1035 -#define xf86_ERANGE 1036 - - -/* sysv IPV */ -/* xf86shmget() */ -#define XF86IPC_CREAT 01000 -#define XF86IPC_EXCL 02000 -#define XF86IPC_NOWAIT 04000 -#define XF86SHM_R 0400 -#define XF86SHM_W 0200 -#define XF86IPC_PRIVATE ((xf86key_t)0) -/* xf86shmat() */ -#define XF86SHM_RDONLY 010000 /* attach read-only else read-write */ -#define XF86SHM_RND 020000 /* round attach address to SHMLBA */ -#define XF86SHM_REMAP 040000 /* take-over region on attach */ -/* xf86shmclt() */ -#define XF86IPC_RMID 0 - -/* - * the rest of this file should only be included for code that is supposed - * to go into modules - */ - -#if !defined(DONT_DEFINE_WRAPPERS) - -#undef abort -#define abort() xf86abort() -#undef abs -#define abs(i) xf86abs(i) -#undef acos -#define acos(d) xf86acos(d) -#undef asin -#define asin(d) xf86asin(d) -#undef atan -#define atan(d) xf86atan(d) -#undef atan2 -#define atan2(d1,d2) xf86atan2(d1,d2) -#undef atof -#define atof(ccp) xf86atof(ccp) -#undef atoi -#define atoi(ccp) xf86atoi(ccp) -#undef atol -#define atol(ccp) xf86atol(ccp) -#undef bsearch -#define bsearch(a,b,c,d,e) xf86bsearch(a,b,c,d,e) -#undef ceil -#define ceil(d) xf86ceil(d) -#undef calloc -#define calloc(I1,I2) xf86calloc(I1,I2) -#undef clearerr -#define clearerr(FP) xf86clearerr(FP) -#undef cos -#define cos(d) xf86cos(d) -#undef exit -#define exit(i) xf86exit(i) -#undef exp -#define exp(d) xf86exp(d) -#undef fabs -#define fabs(d) xf86fabs(d) -#undef fclose -#define fclose(FP) xf86fclose(FP) -#undef feof -#define feof(FP) xf86feof(FP) -#undef ferror -#define ferror(FP) xf86ferror(FP) -#undef fflush -#define fflush(FP) xf86fflush(FP) -#undef fgetc -#define fgetc(FP) xf86fgetc(FP) -#undef getc -#define getc(FP) xf86getc(FP) -#undef fgetpos -#define fgetpos(FP,fpp) xf86fgetpos(FP,fpp) -#undef fgets -#define fgets(cp,i,FP) xf86fgets(cp,i,FP) -#undef finite -#define finite(d) xf86finite(d) -#undef floor -#define floor(d) xf86floor(d) -#undef fmod -#define fmod(d1,d2) xf86fmod(d1,d2) -#undef fopen -#define fopen(ccp1,ccp2) xf86fopen(ccp1,ccp2) -#undef printf -#define printf xf86printf -#undef fprintf -#define fprintf xf86fprintf -#undef fputc -#define fputc(i,FP) xf86fputc(i,FP) -#undef fputs -#define fputs(ccp,FP) xf86fputs(ccp,FP) -#undef fread -#define fread(vp,I1,I2,FP) xf86fread(vp,I1,I2,FP) -#undef free -#define free(vp) xf86free(vp) -#undef freopen -#define freopen(ccp1,ccp2,FP) xf86freopen(ccp1,ccp2,FP) -#undef frexp -#define frexp(x,exp) xf86frexp(x,exp) -#undef fscanf -#define fscanf xf86fscanf -#undef fseek -#define fseek(FP,l,i) xf86fseek(FP,l,i) -#undef fsetpos -#define fsetpos(FP,cfpp) xf86fsetpos(FP,cfpp) -#undef ftell -#define ftell(FP) xf86ftell(FP) -#undef fwrite -#define fwrite(cvp,I1,I2,FP) xf86fwrite(cvp,I1,I2,FP) -#undef getenv -#define getenv(ccp) xf86getenv(ccp) -#undef isalnum -#define isalnum(i) xf86isalnum(i) -#undef isalpha -#define isalpha(i) xf86isalpha(i) -#undef iscntrl -#define iscntrl(i) xf86iscntrl(i) -#undef isdigit -#define isdigit(i) xf86isdigit(i) -#undef isgraph -#define isgraph(i) xf86isgraph(i) -#undef islower -#define islower(i) xf86islower(i) -#undef isprint -#define isprint(i) xf86isprint(i) -#undef ispunct -#define ispunct(i) xf86ispunct(i) -#undef isspace -#define isspace(i) xf86isspace(i) -#undef isupper -#define isupper(i) xf86isupper(i) -#undef isxdigit -#define isxdigit(i) xf86isxdigit(i) -#undef labs -#define labs(l) xf86labs(l) -#undef ldexp -#define ldexp(x, exp) xf86ldexp(x, exp) -#undef log -#define log(d) xf86log(d) -#undef log10 -#define log10(d) xf86log10(d) -#undef malloc -#define malloc(I) xf86malloc(I) -#undef memchr -#define memchr(cvp,i,I) xf86memchr(cvp,i,I) -#undef memcmp -#define memcmp(cvp1,cvp2,I) xf86memcmp(cvp1,cvp2,I) -#undef memcpy -#define memcpy(vp,cvp,I) xf86memcpy(vp,cvp,I) -#undef memmove -#define memmove(vp,cvp,I) xf86memmove(vp,cvp,I) -#undef memset -#define memset(vp,int,I) xf86memset(vp,int,I) -#undef modf -#define modf(d,dp) xf86modf(d,dp) -#undef perror -#define perror(ccp) xf86perror(ccp) -#undef pow -#define pow(d1,d2) xf86pow(d1,d2) -#undef random -#define random() xf86random() -#undef realloc -#define realloc(vp,I) xf86realloc(vp,I) -#undef remove -#define remove(ccp) xf86remove(ccp) -#undef rename -#define rename(ccp1,ccp2) xf86rename(ccp1,ccp2) -#undef rewind -#define rewind(FP) xf86rewind(FP) -#undef setbuf -#define setbuf(FP,cp) xf86setbuf(FP,cp) -#undef setvbuf -#define setvbuf(FP,cp,i,I) xf86setvbuf(FP,cp,i,I) -#undef sin -#define sin(d) xf86sin(d) -#undef snprintf -#define snprintf xf86snprintf -#undef sprintf -#define sprintf xf86sprintf -#undef sqrt -#define sqrt(d) xf86sqrt(d) -#undef sscanf -#define sscanf xf86sscanf -#undef strcat -#define strcat(cp,ccp) xf86strcat(cp,ccp) -#undef strcmp -#define strcmp(ccp1,ccp2) xf86strcmp(ccp1,ccp2) -#undef strcasecmp -#define strcasecmp(ccp1,ccp2) xf86strcasecmp(ccp1,ccp2) -#undef strcpy -#define strcpy(cp,ccp) xf86strcpy(cp,ccp) -#undef strcspn -#define strcspn(ccp1,ccp2) xf86strcspn(ccp1,ccp2) -#undef strerror -#define strerror(i) xf86strerror(i) -#undef strlcat -#define strlcat(cp,ccp,I) xf86strlcat(cp,ccp,I) -#undef strlcpy -#define strlcpy(cp,ccp,I) xf86strlcpy(cp,ccp,I) -#undef strlen -#define strlen(ccp) xf86strlen(ccp) -#undef strncmp -#define strncmp(ccp1,ccp2,I) xf86strncmp(ccp1,ccp2,I) -#undef strncasecmp -#define strncasecmp(ccp1,ccp2,I) xf86strncasecmp(ccp1,ccp2,I) -#undef strncpy -#define strncpy(cp,ccp,I) xf86strncpy(cp,ccp,I) -#undef strpbrk -#define strpbrk(ccp1,ccp2) xf86strpbrk(ccp1,ccp2) -#undef strchr -#define strchr(ccp,i) xf86strchr(ccp,i) -#undef strrchr -#define strrchr(ccp,i) xf86strrchr(ccp,i) -#undef strspn -#define strspn(ccp1,ccp2) xf86strspn(ccp1,ccp2) -#undef strstr -#define strstr(ccp1,ccp2) xf86strstr(ccp1,ccp2) -#undef srttod -#define strtod(ccp,cpp) xf86strtod(ccp,cpp) -#undef strtok -#define strtok(cp,ccp) xf86strtok(cp,ccp) -#undef strtol -#define strtol(ccp,cpp,i) xf86strtol(ccp,cpp,i) -#undef strtoul -#define strtoul(ccp,cpp,i) xf86strtoul(ccp,cpp,i) -#undef tan -#define tan(d) xf86tan(d) -#undef tmpfile -#define tmpfile() xf86tmpfile() -#undef tolower -#define tolower(i) xf86tolower(i) -#undef toupper -#define toupper(i) xf86toupper(i) -#undef ungetc -#define ungetc(i,FP) xf86ungetc(i,FP) -#undef vfprintf -#define vfprintf(p,f,a) xf86vfprintf(p,f,a) -#undef vsnprintf -#define vsnprintf(s,n,f,a) xf86vsnprintf(s,n,f,a) -#undef vsprintf -#define vsprintf(s,f,a) xf86vsprintf(s,f,a) -/* XXX Disable assert as if NDEBUG was defined */ -/* Some X headers defined this away too */ -#undef assert -#define assert(a) ((void)0) -#undef HUGE_VAL -#define HUGE_VAL xf86HUGE_VAL - -#undef hypot -#define hypot(x,y) xf86hypot(x,y) - -#undef qsort -#define qsort(b, n, s, f) xf86qsort(b, n, s, f) - -/* non-ANSI C functions */ -#undef opendir -#define opendir(cp) xf86opendir(cp) -#undef closedir -#define closedir(DP) xf86closedir(DP) -#undef readdir -#define readdir(DP) xf86readdir(DP) -#undef rewinddir -#define rewinddir(DP) xf86rewinddir(DP) -#undef bcopy -#define bcopy(vp,cvp,I) xf86memmove(cvp,vp,I) -#undef ffs -#define ffs(i) xf86ffs(i) -#undef strdup -#define strdup(ccp) xf86strdup(ccp) -#undef bzero -#define bzero(vp,ui) xf86bzero(vp,ui) -#undef execl -#define execl xf86execl -#undef chmod -#define chmod(a,b) xf86chmod(a,b) -#undef chown -#define chown(a,b,c) xf86chown(a,b,c) -#undef geteuid -#define geteuid xf86geteuid -#undef getegid -#define getegid xf86getegid -#undef getpid -#define getpid xf86getpid -#undef mknod -#define mknod(a,b,c) xf86mknod(a,b,c) -#undef sleep -#define sleep(a) xf86sleep(a) -#undef mkdir -#define mkdir(a,b) xf86mkdir(a,b) -#undef getpagesize -#define getpagesize xf86getpagesize -#undef shmget -#define shmget(a,b,c) xf86shmget(a,b,c) -#undef shmat -#define shmat(a,b,c) xf86shmat(a,b,c) -#undef shmdt -#define shmdt(a) xf86shmdt(a) -#undef shmctl -#define shmctl(a,b,c) xf86shmctl(a,b,c) - -#undef S_ISUID -#define S_ISUID XF86_S_ISUID -#undef S_ISGID -#define S_ISGID XF86_S_ISGID -#undef S_ISVTX -#define S_ISVTX XF86_S_ISVTX -#undef S_IRUSR -#define S_IRUSR XF86_S_IRUSR -#undef S_IWUSR -#define S_IWUSR XF86_S_IWUSR -#undef S_IXUSR -#define S_IXUSR XF86_S_IXUSR -#undef S_IRGRP -#define S_IRGRP XF86_S_IRGRP -#undef S_IWGRP -#define S_IWGRP XF86_S_IWGRP -#undef S_IXGRP -#define S_IXGRP XF86_S_IXGRP -#undef S_IROTH -#define S_IROTH XF86_S_IROTH -#undef S_IWOTH -#define S_IWOTH XF86_S_IWOTH -#undef S_IXOTH -#define S_IXOTH XF86_S_IXOTH -#undef S_IFREG -#define S_IFREG XF86_S_IFREG -#undef S_IFCHR -#define S_IFCHR XF86_S_IFCHR -#undef S_IFBLK -#define S_IFBLK XF86_S_IFBLK -#undef S_IFIFO -#define S_IFIFO XF86_S_IFIFO - -/* some types */ -#undef FILE -#define FILE XF86FILE -#undef fpos_t -#define fpos_t XF86fpos_t -#undef DIR -#define DIR XF86DIR -#undef DIRENT -#define DIRENT XF86DIRENT -#undef size_t -#define size_t xf86size_t -#undef ssize_t -#define ssize_t xf86ssize_t -#undef dev_t -#define dev_t xf86dev_t -#undef mode_t -#define mode_t xf86mode_t -#undef uid_t -#define uid_t xf86uid_t -#undef gid_t -#define gid_t xf86gid_t -#undef stat_t -#define stat_t struct xf86stat - -#undef ulong -#define ulong unsigned long - -/* - * There should be no need to #undef any of these. If they are already - * defined it is because some illegal header has been included. - */ - -/* some vars */ -#undef stdin -#define stdin xf86stdin -#undef stdout -#define stdout xf86stdout -#undef stderr -#define stderr xf86stderr - -#undef SEEK_SET -#define SEEK_SET XF86_SEEK_SET -#undef SEEK_CUR -#define SEEK_CUR XF86_SEEK_CUR -#undef SEEK_END -#define SEEK_END XF86_SEEK_END - -/* - * XXX Basic I/O functions BAD,BAD,BAD! - */ -#define open xf86open -#define close(a) xf86close(a) -#define lseek(a,b,c) xf86lseek(a,b,c) -#if !defined(__DragonFly__) -#define ioctl(a,b,c) xf86ioctl(a,b,c) -#endif -#define read(a,b,c) xf86read(a,b,c) -#define write(a,b,c) xf86write(a,b,c) -#define mmap(a,b,c,d,e,f) xf86mmap(a,b,c,d,e,f) -#define munmap(a,b) xf86munmap(a,b) -#define stat(a,b) xf86stat(a,b) -#define fstat(a,b) xf86fstat(a,b) -#define access(a,b) xf86access(a,b) -#undef O_RDONLY -#define O_RDONLY XF86_O_RDONLY -#undef O_WRONLY -#define O_WRONLY XF86_O_WRONLY -#undef O_RDWR -#define O_RDWR XF86_O_RDWR -#undef O_CREAT -#define O_CREAT XF86_O_CREAT -#undef PROT_EXEC -#define PROT_EXEC XF86_PROT_EXEC -#undef PROT_READ -#define PROT_READ XF86_PROT_READ -#undef PROT_WRITE -#define PROT_WRITE XF86_PROT_WRITE -#undef PROT_NONE -#define PROT_NONE XF86_PROT_NONE -#undef MAP_FIXED -#define MAP_FIXED XF86_MAP_FIXED -#undef MAP_SHARED -#define MAP_SHARED XF86_MAP_SHARED -#undef MAP_PRIVATE -#define MAP_PRIVATE XF86_MAP_PRIVATE -#undef MAP_FAILED -#define MAP_FAILED XF86_MAP_FAILED -#undef R_OK -#define R_OK XF86_R_OK -#undef W_OK -#define W_OK XF86_W_OK -#undef X_OK -#define X_OK XF86_X_OK -#undef F_OK -#define F_OK XF86_F_OK -#undef errno -#define errno xf86errno -#undef putchar -#define putchar(i) xf86fputc(i, xf86stdout) -#undef puts -#define puts(s) xf86fputs(s, xf86stdout) - -#undef EACCES -#define EACCES xf86_EACCES -#undef EAGAIN -#define EAGAIN xf86_EAGAIN -#undef EBADF -#define EBADF xf86_EBADF -#undef EEXIST -#define EEXIST xf86_EEXIST -#undef EFAULT -#define EFAULT xf86_EFAULT -#undef EINTR -#define EINTR xf86_EINTR -#undef EINVAL -#define EINVAL xf86_EINVAL -#undef EISDIR -#define EISDIR xf86_EISDIR -#undef ELOOP -#define ELOOP xf86_ELOOP -#undef EMFILE -#define EMFILE xf86_EMFILE -#undef ENAMETOOLONG -#define ENAMETOOLONG xf86_ENAMETOOLONG -#undef ENFILE -#define ENFILE xf86_ENFILE -#undef ENOENT -#define ENOENT xf86_ENOENT -#undef ENOMEM -#define ENOMEM xf86_ENOMEM -#undef ENOSPC -#define ENOSPC xf86_ENOSPC -#undef ENOTDIR -#define ENOTDIR xf86_ENOTDIR -#undef EPIPE -#define EPIPE xf86_EPIPE -#undef EROFS -#define EROFS xf86_EROFS -#undef ETXTBSY -#define ETXTBSY xf86_ETXTBSY -#undef ENOTTY -#define ENOTTY xf86_ENOTTY -#undef ENOSYS -#define ENOSYS xf86_ENOSYS -#undef EBUSY -#define EBUSY xf86_EBUSY -#undef ENODEV -#define ENODEV xf86_ENODEV -#undef EIO -#define EIO xf86_EIO - -/* IPC stuff */ -#undef SHM_RDONLY -#define SHM_RDONLY XF86SHM_RDONLY -#undef SHM_RND -#define SHM_RND XF86SHM_RND -#undef SHM_REMAP -#define SHM_REMAP XF86SHM_REMAP -#undef IPC_RMID -#define IPC_RMID XF86IPC_RMID -#undef IPC_CREAT -#define IPC_CREAT XF86IPC_CREAT -#undef IPC_EXCL -#define IPC_EXCL XF86IPC_EXCL -#undef PC_NOWAIT -#define IPC_NOWAIT XF86IPC_NOWAIT -#undef SHM_R -#define SHM_R XF86SHM_R -#undef SHM_W -#define SHM_W XF86SHM_W -#undef IPC_PRIVATE -#define IPC_PRIVATE XF86IPC_PRIVATE - -/* Some ANSI macros */ -#undef FILENAME_MAX -#define FILENAME_MAX 1024 - -#if (defined(sun) && defined(__SVR4)) -# define _FILEDEFED /* Already have FILE defined, don't redefine it */ -#endif - -#endif /* !DONT_DEFINE_WRAPPERS */ - -#if (!defined(DONT_DEFINE_WRAPPERS) || defined(DEFINE_SETJMP_WRAPPERS)) -#undef setjmp -#define setjmp(a) xf86setjmp_macro(a) -#undef longjmp -#define longjmp(a,b) xf86longjmp(a,b) -#undef jmp_buf -#define jmp_buf xf86jmp_buf -#endif - -#endif /* XF86_LIBC_H */ diff --git a/hw/xfree86/utils/xorgcfg/Makefile.am b/hw/xfree86/utils/xorgcfg/Makefile.am index e7113035f..31d1b3f00 100644 --- a/hw/xfree86/utils/xorgcfg/Makefile.am +++ b/hw/xfree86/utils/xorgcfg/Makefile.am @@ -42,7 +42,6 @@ xorgcfg_LDADD = $(XORGCFG_DEP_LIBS) ../../parser/libxf86config.a $(LOADERLIB) \ #if DoLoadableServer LDSRCS = \ - $(top_srcdir)/hw/xfree86/os-support/shared/libc_wrapper.c \ loader.c loadmod.c LOADERLIB = ../../loader/libloader.a #endif diff --git a/os/Makefile.am b/os/Makefile.am index 8ed12e47a..16070f5b8 100644 --- a/os/Makefile.am +++ b/os/Makefile.am @@ -1,4 +1,4 @@ -noinst_LTLIBRARIES = libos.la libcwrapper.la +noinst_LTLIBRARIES = libos.la AM_CFLAGS = $(DIX_CFLAGS) @@ -41,13 +41,6 @@ if NEED_STRLCAT libos_la_SOURCES += $(STRLCAT_SRCS) endif -libcwrapper_la_SOURCES = \ - $(top_srcdir)/hw/xfree86/os-support/shared/libc_wrapper.c -libcwrapper_la_CFLAGS = \ - -DSELF_CONTAINED_WRAPPER \ - -I$(top_srcdir)/hw/xfree86/os-support \ - $(AM_CFLAGS) - EXTRA_DIST = $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \ $(XCSECURITY_SRCS) $(XDMCP_SRCS) $(STRLCAT_SRCS) From b77ca7cc9c23184c4ab367baf1b3ed0acf27c269 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 3 Dec 2007 11:29:54 -0800 Subject: [PATCH 358/454] Use _X_EXPORT instead of __attribute__((visibility("default"))) --- hw/xfree86/parser/Flags.c | 3 ++- hw/xfree86/parser/scan.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c index 730ea0cab..19b9d1477 100644 --- a/hw/xfree86/parser/Flags.c +++ b/hw/xfree86/parser/Flags.c @@ -63,6 +63,7 @@ #include "xf86tokens.h" #include "Configint.h" #include +#include extern LexRec val; @@ -330,7 +331,7 @@ xf86findOption (XF86OptionPtr list, const char *name) * returned. If the option is not found, a NULL is returned. */ -__attribute__((visibility("default"))) char * +_X_EXPORT char * xf86findOptionValue (XF86OptionPtr list, const char *name) { XF86OptionPtr p = xf86findOption (list, name); diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c index 36061c889..9706d483b 100644 --- a/hw/xfree86/parser/scan.c +++ b/hw/xfree86/parser/scan.c @@ -64,6 +64,7 @@ #include #include #include +#include #if !defined(X_NOT_POSIX) #if defined(_POSIX_SOURCE) @@ -939,7 +940,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab) * Compare two names. The characters '_', ' ', and '\t' are ignored * in the comparison. */ -__attribute__((visibility("default"))) int +_X_EXPORT int xf86nameCompare (const char *s1, const char *s2) { char c1, c2; From 60086d90168265795e07a60939e9e2fe95c6e15c Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 3 Dec 2007 11:30:58 -0800 Subject: [PATCH 359/454] Use pkg-config to get -I, -L & -R flags needed for OpenSSL Still just uses -lcrypto instead of the full library list from --libs --- configure.ac | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 52f1ef64d..618a9c4ed 100644 --- a/configure.ac +++ b/configure.ac @@ -1077,6 +1077,11 @@ CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS]) PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) +# OpenSSL used for SHA1 hashing in render/glyph.c, but we don't need all of +# the OpenSSL libraries, just libcrypto +PKG_CHECK_MODULES([OPENSSL], [openssl], [OPENSSL_LIB_FLAGS=`$PKG_CONFIG --libs-only-L --libs-only-other openssl`]) +LIBCRYPTO="$OPENSSL_LIB_FLAGS -lcrypto" + # Autotools has some unfortunate issues with library handling. In order to # get a server to rebuild when a dependency in the tree is changed, it must # be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be @@ -1092,9 +1097,9 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) # XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers # require. # -XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}" +XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${OPENSSL_CFLAGS}" XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB" -XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} -lcrypto" +XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${LIBCRYPTO}" AC_SUBST([XSERVER_LIBS]) AC_SUBST([XSERVER_SYS_LIBS]) From aa0dfb3f42f19bb351ca7f1a9507ff5ec4590e96 Mon Sep 17 00:00:00 2001 From: James Cloos Date: Mon, 3 Dec 2007 16:57:58 -0500 Subject: [PATCH 360/454] =?UTF-8?q?Remove=20Perl=20dependency=20from=20the?= =?UTF-8?q?=20build=20From=20bugzilla=20bug=2013467=C2=B9:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The modeline2c script is the only part of the Xorg server that requires Perl. [This] is a simpler replacement that works with any normal AWK. 1] http://bugs.freedesktop.org/show_bug.cgi?id=13467 Bug was posted by Joerg Sonnenberger . --- hw/xfree86/common/Makefile.am | 4 +- hw/xfree86/common/modeline2c.awk | 97 ++++++++++++++++++++++++++++ hw/xfree86/common/modeline2c.pl | 107 ------------------------------- 3 files changed, 99 insertions(+), 109 deletions(-) create mode 100644 hw/xfree86/common/modeline2c.awk delete mode 100644 hw/xfree86/common/modeline2c.pl diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index db726fea1..5499b694e 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -23,8 +23,8 @@ BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES) MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes -xf86DefModeSet.c: $(srcdir)/modeline2c.pl $(MODEDEFSOURCES) - cat $(MODEDEFSOURCES) | $(PERL) $(srcdir)/modeline2c.pl > $@ +xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) + cat $(MODEDEFSOURCES) | $(AWK) -f $(srcdir)/modeline2c.awk > $@ BUILT_SOURCES = xf86DefModeSet.c diff --git a/hw/xfree86/common/modeline2c.awk b/hw/xfree86/common/modeline2c.awk new file mode 100644 index 000000000..7a893300c --- /dev/null +++ b/hw/xfree86/common/modeline2c.awk @@ -0,0 +1,97 @@ +#!/usr/bin/awk -f +# +# Copyright (c) 2007 Joerg Sonnenberger . +# All rights reserved. +# +# Based on Perl script by Dirk Hohndel. +# +# 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. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# ``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 +# COPYRIGHT HOLDERS OR CONTRIBUTORS 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. +# +# Usage: modeline2c.awk < modefile > xf86DefModes.c +# + +BEGIN { + flagsdict[""] = "0" + + flagsdict["+hsync +vsync"] = "V_PHSYNC | V_PVSYNC" + flagsdict["+hsync -vsync"] = "V_PHSYNC | V_NVSYNC" + flagsdict["-hsync +vsync"] = "V_NHSYNC | V_PVSYNC" + flagsdict["-hsync -vsync"] = "V_NHSYNC | V_NVSYNC" + flagsdict["+hsync +vsync interlace"] = "V_PHSYNC | V_PVSYNC | V_INTERLACE" + flagsdict["+hsync -vsync interlace"] = "V_PHSYNC | V_NVSYNC | V_INTERLACE" + flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE" + flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE" + + print "/* $" "XFree86$ */" + print + print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at" + print " * modeline2c.awk */" + print "" + print "/*" + print " * Author: Joerg Sonnenberger " + print " * Based on Perl script from Dirk Hohndel " + print " */" + print "" + print "#ifdef HAVE_XORG_CONFIG_H" + print "#include " + print "#endif" + print "" + print "#ifdef __UNIXOS2__" + print "#define I_NEED_OS2_H" + print "#endif" + print "#include \"xf86.h\"" + print "#include \"xf86Config.h\"" + print "#include \"xf86Priv.h\"" + print "#include \"xf86_OSlib.h\"" + print "" + print "#include \"globals.h\"" + print "" + print "#define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT" + print "#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" + print "" + print "DisplayModeRec xf86DefaultModes [] = {" + + modeline = "\t{MODEPREFIX(\"%dx%d\"),%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n" + modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+" +} + +/^[mM][oO][dD][eE][lL][iI][nN][eE]/ { + flags = $0 + gsub(modeline_data, "", flags) + flags = tolower(flags) + printf(modeline, $4, $8, $3 * 1000, $4, $5, $6, $7, + $8, $9, $10, $11, flagsdict[flags]) + # Half-width double scanned modes + printf(modeline, $4/2, $8/2, $3 * 500, $4/2, $5/2, $6/2, $7/2, + $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN") +} + +/^#/ { + print "/*" substr($0, 2) " */" +} + +END { + printf("\t{MODEPREFIX(NULL),0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}\n};\n") +} diff --git a/hw/xfree86/common/modeline2c.pl b/hw/xfree86/common/modeline2c.pl deleted file mode 100644 index 88e380de4..000000000 --- a/hw/xfree86/common/modeline2c.pl +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/perl - -# automatically generate the xf86DefModeSet.c file from a normal -# XF86Config style file of Modelines -# -# run as -# -# perl /modeline2c.pl < [modesfile] > xf86DefModes.c -# -# hackish perl - author Dirk Hohndel -# -# Copyright 1999-2003 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). -# -# $XFree86: xc/programs/Xserver/hw/xfree86/common/modeline2c.pl,v 1.10tsi Exp $ - -#my %flagshash; -$flagshash{""} = "0"; -# $flagshash{"Interlace"} = "V_INTERLACE"; -# $flagshash{"+hsync"} = "V_PHSYNC"; -# $flagshash{"-hsync"} = "V_NHSYNC"; -# $flagshash{"+vsync"} = "V_PVSYNC"; -# $flagshash{"-vsync"} = "V_NVSYNC"; -# XXX I'm definitely not a perl guru... -- tsi -$flagshash{"+hsync +vsync"} = "V_PHSYNC | V_PVSYNC"; -$flagshash{"+hsync -vsync"} = "V_PHSYNC | V_NVSYNC"; -$flagshash{"-hsync +vsync"} = "V_NHSYNC | V_PVSYNC"; -$flagshash{"-hsync -vsync"} = "V_NHSYNC | V_NVSYNC"; -$flagshash{"+hsync +vsync interlace"} = "V_PHSYNC | V_PVSYNC | V_INTERLACE"; -$flagshash{"+hsync -vsync interlace"} = "V_PHSYNC | V_NVSYNC | V_INTERLACE"; -$flagshash{"-hsync +vsync interlace"} = "V_NHSYNC | V_PVSYNC | V_INTERLACE"; -$flagshash{"-hsync -vsync interlace"} = "V_NHSYNC | V_NVSYNC | V_INTERLACE"; - -# stop CVS from expanding the XFree86 Id here... - -$proj = "XFree86"; -printf("/* \$$proj\$ */ - -/* 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 [] = { -"); -while (<>) { - if (/^\#/) { - s/^\#//; - chop; - print "/*" . $_ . " */\n"; - } - if (/^ModeLine\s+(\S+)\s+([\d.\s]+)(.*)/i) { - $name = $1; - $values = $2; - $flags = $3; - $flags =~ y/A-Z/a-z/; - $values =~ /([\d.]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/; - printf("\t{MODEPREFIX(%s),%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n", - $name,$1*1000,$2,$3,$4,$5,$6,$7,$8,$9,$flagshash{$flags}); -# Also generate half-width doublescanned modes - printf("\t{MODEPREFIX(\"%dx%d\"),%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s | V_DBLSCAN, MODESUFFIX},\n", - $2/2,$6/2,$1*500,$2/2,$3/2,$4/2,$5/2,$6/2,$7/2,$8/2,$9/2,$flagshash{$flags}); - } - - -} -printf("\t{MODEPREFIX(NULL),0,0,0,0,0,0,0,0,0,0,0,0,MODESUFFIX}\n};\n"); From b84f2833a681585162b8dabfb02ff62e7e0ef4d6 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 3 Dec 2007 14:52:17 -0800 Subject: [PATCH 361/454] 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 362/454] 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 363/454] 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 364/454] 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 365/454] 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 zcmeFY1z1&E+crAaT6C8PN_Q+^5rTx2NGl;7N{L8Hih!_a79rgoA}xrND5cUNC8Z$U z-8s+2-tN75_xHW$I^XsG@BXiI4)--#jJVhHJY&ug&$GrHPfTqc0SLtDi6cKB06_g- zf)D^b5FkefK=9#YXHR!;Z+~y^*RIJ2An4xN88Cs}=?;QOu#{hE(;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*obee<&=5(d3^#;f`wnGNI|v$2!e)gQa43MgO2yj z2Dt~nQy5|giqq5kpkn#Zr`fA7f3-C9ilN-}s@9YKz=5`7wKrS>VLrxswnEqHKdOG? z2CWxDHmqcI&X=kq6y1{Kh*+v!!48PiuQdZ zxhXKh3+Ljj8)vhsL4e1`nKmo?Yu4;SMkA!oravTKTEY=cua~A5MHehaJudWZ?LIL% z`oe^VWbWNZDUSz`g3(8RUby0J9%wtk9>dC?G}`=m!}NC(=mak@f9cU#B6?E2Pp38P zipfFfU03fk;*L+giSg61$ik{~-7wEgECcFSiEtvN)m&mkvWzj$19VZSy|V5eIrqZP zjCK~mfbKMO&A^S~_D&NY!{924b!!%MTuNSeoaMH|l Date: Tue, 4 Dec 2007 17:36:21 -0500 Subject: [PATCH 366/454] 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 367/454] 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 368/454] 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 369/454] 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 370/454] 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 371/454] 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 372/454] 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 373/454] 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 374/454] 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 375/454] 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 376/454] 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 377/454] =?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 378/454] 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 379/454] 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 380/454] .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 381/454] 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 382/454] 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 383/454] 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 384/454] 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 385/454] 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 386/454] 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 387/454] 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 388/454] 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 389/454] 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 390/454] 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 391/454] 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 392/454] 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 393/454] 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 394/454] 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 395/454] 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 396/454] .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 397/454] 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 398/454] 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 399/454] 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 400/454] 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 401/454] 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 402/454] 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 403/454] 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 404/454] 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 405/454] 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 406/454] 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 407/454] 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 408/454] 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 409/454] 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 410/454] 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 411/454] 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 412/454] 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 413/454] 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 414/454] 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 415/454] 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 416/454] 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 417/454] 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 418/454] 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 419/454] 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 420/454] 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 421/454] 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 422/454] 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 423/454] 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 424/454] 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 425/454] 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 426/454] 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 427/454] 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 428/454] 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 429/454] 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 430/454] 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 431/454] 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 432/454] 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 433/454] 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 434/454] 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 435/454] 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 436/454] 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 437/454] 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 438/454] 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 439/454] 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 440/454] 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 441/454] 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 442/454] 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 443/454] 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 444/454] 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 445/454] 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 446/454] 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 zcmZwCK}!Nr7)Ie|?XS4Flo&@hEuuvVMG$V>v=zPDpw1nfDbOEZGB=2b_UC->`98ml zjRY@}wUvX)MYIuoh)!CSq}B?Ot>9U0D=9RYZ*_vb=$xsMv4MfPM>Fqg8wb(C%25>D z3x-}zObp%q!#;_+pQWYFNu{>?WB;z~FHaRpH-fpOan9b(TW*{xm2L$Onq1#I{Xc8P GcgYo}!z{Z1 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 zcmcJO%}(4v5QM+;K1FLUkx&3}j-qHq4&)G|D2L?0#n{8*V8+Hjtl;4RbVGK_R$0`t)8N)6iI?>MuPTfJ`yfAR3@qi#l8sWIeA#R+SS z&lqcd5ePbWHJ=IG5$G{0ZD^_|<=i3P!nGap7M&bBXu6>h4@aB3=DVXb-O@iEr~rNupS zK54%{JX5pH&ZTZwvX}ZkCrZIjtXSn7Un*%OZFV%}FY$e(7P>onEzcYw;k))dC)hsU t=VDnZ3kR1r%F;xWJJ#piNs!o9=Y)mJK3d1j;B7()Lw254uD8l0|Iot*^eYg79+*KfCKX(f=;2Y(AVfERFBT0pV6-jU>JsFbW9i%!z7`_Ofr+nWHE(I zF;l|SGIh*I<`QN!V`U~X)0vr!jcH+KGwqCr@iGfhJ#z)q#azW;hA@kmtC_{jwaj(Q za^@yx4Ra^6mbr^r$K1%mL;IbBy_b`H(rzoM28d z-!MNiXP94@KbSvR#D=huY!n;KCb0cjBb&}&13V~BDRvPVyoF2b_hF?9m`H+ zC$aVHWVV5AWSiJ#R%RV+J9|0nVZH1;_9_;$gk8ekz~0QRWLL4bvA479*!$S~*=_6- z>{IO1>`Uy+?Cb1)_6Yj{`yu-gdxHI%{f7OP{h2+-{>uKwp639^ae6L<3+2MN zNG^fv$Mxq@xLVG_jpN31Q#d=<$jRIs?n>?|ZV`7KcL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w) z>^b|By&b zI~?<9?&onlk*Dx}T<`&WFdxQ8^3nV=K7mi>Y5Yt66`#p7_&okKU&t5nrF;cn&DZhu zd=uZoxA7nNE}qNx@t^o%{xkoTAK}ONNq&Z(=NI{9evRMcCHx+L$e-|M{3Ui7?Sjv=rf@t!OVgiOwQIM2a4wx9BTe!Yx!`2wOM;i)i5& zaUxM93o5vfVxSl-hKk`LRg4ki#6&S!q=|GfP0SFpM246vGDVii7K_DFu|ljC>qL&& zC^n0&V!QZ3>=LbU5CRfTe@>{t< oekXUzU2?ZPDDz~#JStDflk%dx`maM%rp&*u`hRKcf62%H1q7=@1^@s6 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 zcmZwCK}!Nr6o%nv?XNhvlo&@hEuuvUMG$S;v=zPDpv@heDX<@3;SE|y`}gBK=j+?l zM0k{~EbTQuC2QeBa?opJtzO7B!h_aER_RLL8-$(YSgMJsk&%Tvx8AkZ_L3({Z<25= zjJ=qd8N2$Yy_XDsm!1s{8m;Zw`dk_2Dzyt?A?qB=a_hAy=W4Y};YL^dC(r4lmFm~> E0}i$=GXMYp literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/French.lproj/Localizable.strings b/hw/xquartz/bundle/French.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..2770dfb8c234ca06dbeaccfab1657418ae4d6a12 GIT binary patch literal 1168 zcmcJPJx;?w5QV=wrx>M-_)%(vPy_`OAR!tG8e==jO3vE&Cs8;J=iw%~1fZF<9VZfH zib(eC&U4sT}@E*UXqMoEgWC8t5CXpSly zB0M!hO+LU9UYRoGhBv(Z9+(f1I?nFi8DdD=zM}611sRT*$kgR{ssT#Wswrvk_+I}8 zM@D9fRab%FSg|4{F&Ao5GGkNy$pCZTt4>umzur-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$;Pk< z=3p)cn8Gv$8DcRkjwP^Umc}wz7MslcjI(Sujm=;=Y!=I7`D`I8U`yF@wu%+9BK9TQ zz&5eXY%AN&irFr74vTN)HyUp&gzu6=9 zls#iL>=k><19%`0;*EF{-ki7OZFqa$iFe^$c_{D6d-E{fpAY08@F9FS59g!!ST1lU zcX7aF?%`f;a*N0C@jRX<@l>A9CvqProbf4qCeP(__&mOVFXl`5GQN_p;cNLizMgO3 zoA_qFm2c-e`7XYP@8bt}2|vh>@Z-Fcm+@1)g8$CX@(cVj|C3+iH~AfYpFiYJ_%r^3 zzvQoZtsP(o+Cg?hJJ@b!x3F8=ZS4;ByLO1(%?`DD+I{RWyT3ii9%2u-!|hS_7<-%@ qX-CRY|BoxQ|wgRXA|3RPqSzK`w*#H_g{k}|Mmabi~k1!$%bbD literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/German.lproj/InfoPlist.strings b/hw/xquartz/bundle/German.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..aa37e755573dcd4141d4044dad25870ae3210b24 GIT binary patch literal 276 zcmZwCK}!Nr6o%nv?XNhvlo&@hEuuvUMG$R*Xe)ZPA)7lmQ(!;7!W#rd`}gBK=i}4V zM7Wi$EbTPjC2QeLve#>5tzO7B!j0BOR_RLL8-!=cp;Qx7BO?n}F1>24?Id@WUL@gM z7<)7`Gj{e*do3A$F5MgKHCo$0>+tYP8Rjar6Ja6i9LjR*sVL`awNv3jSNuoM@uQXM G+wuhjmMs$i literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/German.lproj/Localizable.strings b/hw/xquartz/bundle/German.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..a5489ab5cef0b82c86831a2eab039d1a4d01659c GIT binary patch literal 1096 zcmcJOy-veG5QM)vPjO0#_z^Wih@S!q5QqW_8pm;x6Xt9#4iWFiGf@KCIXiX`ErsKF zy*E2EJO2JUUQz8Y9cPdsmmaKkN)?@@4 z91Ya~%kjt|hn(<4&~?RZfYiXQECY^{pE8#E6vS8)Yr0YWbxE*5dt!msVpl(bf!iu56f>k$v1I;pf_Ct~B&}I%UE{ qyc4^?_@Cxqlab@N6oY!eA-&n-Qdyo+{2Pb6_WSSkpKYbC)BXeI$GUw0 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/German.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..19532a9c2bda4d9bd186b9baf2e553b5f19ffaf9 GIT binary patch literal 34995 zcmeFa2YeL8`#(N2yL)?kdr5ZFdoDefo=XSmMQSLahH_q#B{{g`MO{!&)Eo6dRcHtribkUG zXabsutf&r6MpKXjH6b^eiDseM=w?LFlV}rq9=(8GMsK2>Xg7Kf9YbHDljs}t2g5QP zV_-sKTQZ%uHcgm|4s%3}$X) z?qKd_?qTj@mM}}1hnOdrCz%z@O6DnMBl9e?iFuCM%Dl*IXLd7hGw(1TGM_OAnJ<{5 z%t_`fbB_6*`GvX2{L1{sTxNMzU=3^-8_veCiEI*^#^$jVY$e-??Z$Rz`>=!A;ixw| zf}OxlWUXvH>tLO%i=DyFWM{E++4=14>>cc#>^{9j-_Hp(J_DOaP`!xGJ`vSX} z-NL@izRB)l-(nB5U$Dp6Z`tqJ^Xw1okL+(8%W+%?CvmY{9GAqUa2Z@4m(LY&gQ+}+$g+!F3VZWH$$ z_dNFkx0Tz$z0Q5i?dOhhXSi>x1E?$?YOVVZPvUEkd zVqJ;u23;3jS6z2q58aKrp}K0_cwN12lCDAL(lzU5=w|6=>u%G{)7`DRSGP#_pstJV zA>G5eM|G=oPwCd`HtM$OT6M4KUe~>?dq?-NZlCT`-4Wdvy03Mob!T)x=(^}G08#fJ z-A_Q&{jB>%cTsmq_p9y?-Jd+-4ZM*L;v@J-KAMl=6Zs52lh5MKd_G^ym++N*cfJST zlfRMg#}DGG`4Rj`emlRD-^0JnzsK+AKjRPbhxjA>*ZgVz4F4T}j{ly&!2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LzdOhcxq=H^#ns)xZca>c%$S&|F)Lzzh^dZk9LvRu zu|s1g#?Fjg9a|iGKK5B$gShT-ed9uL*>QPsOXAkXRmR;2nX;4Si&c+0&{y_Mc-Z=JW^EA%#co4sw`4sW+tnIwvMeR{X)ERX}-BB;p2lYb(&_EPGK@>&;5|NBFWFiN-C>F(| z1eAzUP%6qmnFt|_D9T3fqZ~8}jX`74cr+1BMpMuyXa<^%^3goB5G_W_Pyt$jR-<+3 zbF=|%LR-*wv)l5NN>`Y^d|#J zfV@X|A`+Qs#3T-hA@O7gNhYZzgJhB6gpv^?hm0b*WIUNf^2k&&oy;P0$vm=X43`VwtMThLatHI1h2Xb0MvcBS2EPx=n+M+ZHzSX>=I%=x|Eu2%1Aj(Of!?PN0+MWIBaTqciConosA^g>*4pN(<;p zx`wW!pVN(W3*An4(LJSEDSggrvO26TdyzF_jagF`#hSAgtQBj`qFFoEfpubCSU1*#^=5rpe>RW> z*n2F@B1~cm)0oK|7Q^CL0!w5mER79gS!_6?Yy`_;+o&t^W=HV&eNm7^$l z6b!wam>7EahkX%sf1j2*Czaan#=foWuTK?9cY?X3anA0}NA8>|mF@*kn!KQQ`b}%a GZ_O2PS1p(T literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Italian.lproj/Localizable.strings b/hw/xquartz/bundle/Italian.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..d05d73d4449adbdbc554a16180b78a8bf11b2655 GIT binary patch literal 1146 zcmcJPPfy!G5XFDze2P(yr~+|DRfSq4IDmwD>7kdcZIYFoweg=sFc4JL7^CYp&_2FkWaFF?z;#l>>pq zfHBZ4u#8_^a>+M-ll*tb(*o(0^R@2_=14E6ivG8>)I`tyeBjSf}!-kE6JjXqaO&RJu8 z#aQ!`is-5|lf0B?Qe^CDsHx~MMtTZjo~|UET$%k8mbngf3T5t+n**coR9(V-@8^-| ze(K$6SJQmz>=_7tA`E#MIdaTiNwcQy=)9ttKl&ToZDm7*-bVOe0-kk|9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nLs9!G%}S;C+Q@EWRlrr9$7#Z zlP}3vWF=WmvdB8Jk>rqE@;%8T`D7c}L3We9q>vmShe#1ACdbH0a+;harQ`y+M6Qx+ z!eFx`Xbfd+9#9pB|z` z^awphPta4egr23Pw2WS&SLt87z~{Ve{D{wv;VrE7@w6#n!QnEQf7od2B1& z!FIC(_9HvUir5i$oSkB4*w3ttU1C?+bym)9v%Bm8d&K@^PuXAWA6|u5<286~UXM56 z!Mq87jkn~jc^lrIcjWKz_jp&{gZJkB`1?GRYaDQsI~;P4NAPGK%j5Y_p2CN5!AI~9 z_!#~XAI~T9Px(|ngMY?9=d<}dzK}2B%lHbuim&C_d;|ZM=khH)pKs^8_+DPf5Aegh zm>=UOc?mzq&-07?3ctp0@>~2jexE<&75oW*&R_6KQB_nIHANi}BpQlf(L}r^T8h@9 zjc6x2h_}VNB1Ci*Jw$KOR}2t?gerW(FD&5*C_E7^qQqb^L?nnL@xKkU5F^AWF10_K1CAzc?t0#1U~! zoD?PEtSA*1#AR_+To*URuj012D;|i4qCz|o&&3PzQdW`GWOZ3n)|Pc;ec4Dhmd#`f z`MPW^+sO8^qkKocC%ee*vX|^D`^$k+k-GFtOS%$DB*SHt94zBxf=rS`GAZN;IZBR} zAIgv9csWsiDyPWlGF{G+nR1StFBi$Ba=Bb7SIaE9PHvW4WS-nD3*-uW+if!BEe 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 zcmZwCF-ikb7)9Z)&MJOV2ARC1u@DOlD1zA7*oNdK4v8~EW)$MeT!y=F0k)!&5iG?1 z9PYWFU&cnlwc5hmR_R%`6rN-|tx~Ph3bmDRrLs~hG(F$ygpF+9QzK&o12Y%SJ*q5i zWjE#?WZ_g8x-&5`bn*{-DeHchZgqA_mGvJx(rfxiFX=743sZ&UNSLWL_Pw=s-xp3L S$+2*z>Dv!2hc^qwPscYb?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 zcmcJOv2N2)6o$XDk(b~qV+HM>86gB@01*OAsnts0CQf4N+9q)tWq^SJRf4J#FM!0( zz{J3Vl!b`_iH>DN6x~zX4eT8(U7vG&{{MdG_|GZptm0@B6OxcI!ZBw|M2h1%Ghzw~ zVp7YkvQC30x0n#&SdcNpF=h5&WKKv*fukT>>gCv=MT?tkk=k>Q;Zmncv#Ps_vrdaT z;@@*}5@Py<<}M>;y3{2s-AtH~lGgs`#3Ur<*!#+H#O$(5#K0&NL?ou>{STIUo`35} zP3``^#yjgXw)2SSA0IxtXO$_L(U_Kz0c$jI+`!Q+nK-?Bal89kJq`6r`#MlhZH*M@ z{^^yP*BQU6HqaZ5wX*qsztg=YKea0VK}Y(jPx`IT`k@nb^h8e;YUk0`&bE45dH8K} z!?fCZrgm_7_)8rHT4)%wbf~v_sX&)#a-9Z^a#y-G%|2O4?QF(56EgOQ85l{&wsG-$ zG&1@T5fj#M^$y)JVtwOXlh8+f*NML9_`-A_5YoqS*Oc>f?JA?MI@ZyJ=|3+2s`}1; H=9SuCki@W9 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/Japanese.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..523fd08569ed38da1e38253b669925374536f0fe GIT binary patch literal 33095 zcmdSC2Y6J)*9SZ^_wL@kdpF6w={=jWAw4&}C-fo^2n&RS5|(5Mkt7?E4IyG+29*|y zfOJ8niK2p{bOccmu%n0+K@jO;0UMxv&)nT43nc!1%lAF+M|ns#b7#(+^E+kEIdd6P zQ&~}GmE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#&H z-q5GsTHY{kCvPt=^yYfkcn^3>z2(EQQ=6nlruI)wNX<`Ombx?bTv}jSXxfwX#_5si zOVU@TA5FiR{vxAxMtH_RUx2T-kM|AtIleq!p>L1xS6@|TgUqPR4w=0()y&~pX<2p_ z&0<+OS>v+CXXR$iuzs-)TgR;9)=BHMb=JCIU9>J+SFPWzn^w7X$GT_zY5m7~Z2fIj zTF!np~y~VX~01m`KI2ecEP#lIE<8a&zx4^A&TO5Vk;r6&A?u@(P9=I3ogZtrF zJP32xjRh=W1$!{UCLW9v@DQAWy*L$T;7n{`8&mAZqwpAYQ}WIOm;<&SmGCbHn+=x#Qe-9y*Vmzn!N}mGjDZ zLu!$CNgYy`)FbstL(+(Zljfuqi6Bv=9cfQGk*?$;(u?#V{YWesL^uM7L{tKaK?ajV zl1#iLjSMGQ#3q!CAfrh(8A~RRNn{F{MrM*(WDc267Lldo8&W_DNfB8`Hj*u58`(j2 zlf7g=DJCW42q`5e$Z2wp{6;R3tK>SlMQ)RO_)fxpVAFDdMt#6vM|<| zHDxVWD;B{bSu~4b9a$IFjrCx?SRdAxeaZ$h7jrX#$xLH9Gg&-KWXa6S(pUz|WS9}= zXQSBXEQgI{6WEt*GMmb#vpkm1=CJu}5nIZ>VFhd@Tg}$84QvzJ%C@r|Y&YA>_OoJE z!j7;~c7mN|XW4mnkzHa}*>!e{-DdaL1NMkjuqW&pt75O%8-E>tkiV|Kp}vA?yy atv}M=(f>cAIUwL4AF^KTKmULJ0sjSc^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 zcmZwCK}!Nr6o%nv?XNhvlo&@hEuuvUMG$S;v=zPDpv@heDX<@3;SE|y`}gBK=j+?l zM0k{~EbTQuC2QeBa?opJtzO7B!h_aER_RLL8-$(YSgMJsk&%Tvx8AkZ_L3({Z<25= zjJ=qd8N2$Yy_XDsm!1s{8m;Zw`dk_2Dzyt?A?qB=a_hAy=W4Y};YL^dC(r4lmFm~> E0}i$=GXMYp literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/da.lproj/Localizable.strings b/hw/xquartz/bundle/da.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..9608a2e6b91daf976b16e342d8cff6cca1cd93e2 GIT binary patch literal 1090 zcmcJO%}&BV6otPvPcdO>RKnUAW7Gr}niw}O+|;&0ZJE~oNO)j)3^n(3fXdzl3Cx_i z_uTIuzJHi-g5#Eqh=P(ijui`1JdRH~GFn5UN9W_y)RqJK4fAOwvx!ze%PbWp6DbqQ&B3g%S*nHN#cek6_iJAGc9p+@>XK8Dt zp0m+yOT-(kC|)pP6teuNw8fOcXP?2|zi~4sw$(T7&2m1MpHzO%ar=zlXrr<6aM;wf s^3(-FHRFHk{y;>GW2XMqz(Id=#)1#F6uSE#0#D)pf0+I`WGGDi3-folhX4Qo 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<{x>``=j0?OCvDH^-qIzd#nQb=_kCfvQkJlkHH7w1Ler!qDXYa9R9rw2 z6#*65K?KDWL_~34!0QGmAR^)hiYSV^@_y!=q)nlCz4v+E|NHqo?}OJ%o6MQ>o8S7K zneU8K+Z=X}H#henfB*pous{Pizyp0l$}HLKvAdk3QoOFVaVa);<8=Eh+1-%hnmR*n z^m;-8T(tIGpar@~Lu#|t51VXW8-`Xfq~1~|&y|~Md=KrA&~HEh24DgOpafKdexN@X z46Xr-!0q4xunBAiTflbkFn9z!2A%>t!EW#@*bANmFM`*=zrcIoeQ*#Q0Y|}c@G1BM z{0aU77a@WMD8dxj7iPm^*dGprL*Ui03Chp`TcHbjpci`J95^3d2XBP8!KLsHct2bX z*Te1bVfYAq96kwm!)M@LxDUPr_rtf~zu@QaH2fO=3j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/xquartz/bundle/fi.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..e8420fbaa583bd0560a910ba37af49f0ac587930 GIT binary patch literal 1102 zcmcJPzfR*o5XOIXo??{}0TJyXgb)+~?oPVy3Yx_+$zpr$i|s_bZ=QkjK=Z}19eN5| z>)Dz4{>;e#KbUcXc@@qh5}`TyViPPeeWUyo@>>Fb{dBICXmKBlcZUkrPPpVpkHWM_qi!W=%^Z_WZX5 za&j>?UKNf&K|#twE;OX%LNor0QO}{)oT{bYa*SERO6Mi%5f6)Qlo=`IM%_ggoHNC7 zg=5NG{rG&L~;& zD*c9QRi<>nG)@-Xu#@|?8SfPAdXDC)`Dy#o$Pv@)c-7lnj#98wpJNs_rNE-wJ*&1! zS%sbVjI95GTR}^!NTz8ta`ci3lWwnn%gIDFdu(H0v8H6xVcCSAHA6#Mig`-PnsZ#g x@3+#D$eUqmkF*q&c&6Wk`wLHkV=m-sguTBRW@dZwT`c}||A9gI&wej@?VsHVzP|tf literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/fi.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..b5039fd44faa2f45ae58ac1b194d3abcd28de61b GIT binary patch literal 34765 zcmeFa2XqwG+dqEqotd4TolP>6-m~ewYB`AD1Ry|w0W9Ev1_(e`n=swl>a;nUMDJcT1jpoQ);gEd zAHex*4gel#Ck(30QopRXxGWf&CBGWeVCyVveTDm_?K1ikh(HgFpa7JBa!>{Ofg8Y0 zU_Q79JPaNOYr#731lSCo1Y5yQ@HE&1o&hg_SHXwi6L1Wi0H1;1!0!-31UaaITBwKq zFbD?25Eu!QVFt{EIj{isfmN_S8~{yl1gwQ)U@e>gCqWCG0-NB?uoXJt40s#79b!n} zJa`Yh7v2XK!w2BQ@Nu{nu7gj&?Ql2T1D}Dg(C--92+!|(_^4!?q@;Medp zJO_V-Kf#~jFYpfp5r;HLME)oM1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ZhzcwgS159CAmyIkffH@L+i$9x2j z;;}rQ2Y4b+;XbEa@G<;7{sAAy$MbAHg@44S^I3cjpT`&SMSKbWoG<6A_!_>Bf5kWQ zZ}=9T%eV8L{0F{|@8|ja5I@R~@j`x*pW)~ECH@Qlm6!1A{06_tZ}YqS9)HN6@MpY& zzZ7Ajst6Y~L~T(|G!(Cj*FVz!to=8J`5k@!q36D!0QVy##& zHi(U4v)CeX#dfh%>=p;aVNoECi$ZZqoDt{5MNuS*MTxj3ZirHGOFR&d#AER?EiA2a eTJ5xYY4y{ZrnUTsI|&Q>=e7Uubp5ZiuKxvf{7+{9 literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/ko.lproj/InfoPlist.strings b/hw/xquartz/bundle/ko.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..4c738f8b2cede8838240e77dd9579e4ff9cea110 GIT binary patch literal 266 zcmZwCF-ikb6o%1LSY;KLltCtwG!|l^frubBHnt&oiG#_!Au|fGc3CdKRjFhI3$g!x z?zx{|#zw-eY-wSu@+w&gFOt1hC9AbUwia&G*0Ms=_pMHNk{tSKWNctyX70+f+R9dP zXJID^7sAkkiHV`}f7)wF_j~DHXRlJ*{8`8Q+sBD8RVbYbGg;%%_ZyGBZK_l{6D~Eq N`lvYmu~hsBz5#YHEI9xG literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/ko.lproj/Localizable.strings b/hw/xquartz/bundle/ko.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..56a335859cf822e078add171aa9d280a8d1182fd GIT binary patch literal 916 zcmcJOu}<4i6o$W{Q?_m$kFtR(5Oak}Rfe{rmDn<{7{>%lj_oE6DG$&AiHBf80x9i~ zrfP^lN+ZCD1QLrkh7K8cgidXB54Pj7GhE5{+;h+W-|rm%`O6~n2&=eQcm&iC+HB+C zBYdQVOGJc=uV?ctQliW&8aN2M1hf#Ev>rs-SolN;5kaArP+^HBUb2C&>n&S_N||Ps z_Z-nmyLrUy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nY)e~hn5Xr9n6VNgO+ zLT1ALgo=cRiGGPMCw5FU5_w{3Vs_$piIs_ulR72!N~%bzOKz6jFF7jNn|vg>#_Q+p z=I!Sl;2r24>J9S(ujR$=0(Y^y)LrhbbTi#G?pk-fo9%9J^V|Zr$ldII?QU~R-7^^m$xi9ET zv=MDe185*^PFvDev<-cozDYaMw`dpoF6}{k)4nu_4xoc*2pvL)(hn%0DmAD@F?DDJ zjiSS898I7})JuJoQ%OhBF?2kgK+|akokFM48FUu?h|Z%6=@Pn(uAr-ECjFGIrR!-H z&7rw8k8Yxcw3u$C+h{2*qdVzt`aRuG57NW*C;BrzPEXL2^b9>uFVai&D!oB((p$8e z*3ep7Pan`n^eO$@*TCoJYvgO<^Y^{tYwm05Ywhdc>&)Up2^qnbv%pb@Qr*EFXY91E8oVyq zCa>am_#gaFexE<$Px;@XfoLe2h?hm6cvbvMv=Oh1H$_MBmgpk7iJqd5=qCnj6rl@`u!SQcMYI?p;zg413ZD>Sq(~KGMVd$#8DffX8R)|$1 zQ>+o|#OLA*kt_1Wm!e2)7F)$O@vYb{c8NV=uQ(tMiC@I8;*>ZmE{Na7WpPbZh+E>e zxGQQ!y?7uVi6`Qjcp?2{BiU32$Y!#IY$e;ucCx+fB;S@@@EAs{xVpG$WS>< z0;xz{n$nV3Ix9R-~4oEVfQ~SueWpn 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 zcmeEv33L?2`fpWrPxtinBtrVz`x*iyKp-sRkThY)WG2i^fQV?73obzr zW%Vk^s-l9s;tuYJiYUsWq9|@4h#=s~JJmgtOdxo@_r3GZdH?e`D#=WB)mPtM-|wq- zMw{K{_T=V%1Ry|w0W8n}4hTRuDS58!a@(Aa@yQ-%+vH@ct8tcXuI!qW?3^)MZuG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EKjFg1)A2 zSQraum049*gVkpBSbg>(Ys8{hW7dQ__$!JH(E%pV=w)3p>lsvrFuEc8&eP{$wTW4!h6F*dz9Y zJ!ci{HGAuZx$nA_-KuU4x3*i)t?x#<4c#cWvD?&b?zVEH-F9w_+tKafc6WQaeO%rZ nUCA|F+jZPzH`NWe)XjAJxx?Kt|K8auRr=SO{J;J`cl!STbB_^> 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 zcmZwCF-yZ>6o%0=_g7px7D>}C4&tB%MGzMk*U)~gsWk~rRO*jc>8Ch|`}1+trY+^U4RLg_?UXmt*GxAB;bbEVR$aG}fkqvrU} IQt>VM0;feRxc~qF 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 zcmcJPPjAye5XFBvA>~tya;&OWJtKsw_E3c1Df&HapBy9 z6=!z#&3kWN^7{|xoFH5ia8x9=2qO=8BEnAw0zEx}XlEy!vu493EgoS{VnFB^{;7;O zB0WM+T3`uZxZr~Kd?(uTf%^s0^UUYIQ^b(=b49;5G*ko%oUuzpx&?~MY+42)appe~ zsHlvw@@fzQH8q~nTvw$#I-BA!S zx6wY8Y0qxPReaU1KBt^5&EFx<(JiQ-Z&|a>slK(`6{be_JEd__^F*MuoeMuqrJips zCmv7B88WB+$~fy5s>RMOi40T>JiglGPo`P8vDwXH`km=Y6iDvU->7D~v(&wo7oYQg N!ZEvFUt}`R{RhE{&eg60UZ=VO+B4O9+ts!I2aCr*TWHTBpd<9!11sKTHrKT4;|1AXTdgz zA%P3wQg|D@9o_-g!F%9(xEVeGcfbeXL+~-U8$JW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O5Q8G}pi Y8RezrtmoqJA^%+tr{L|;Ugyq#0g}DW-2eap 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 zcmeFad3Y1m|1W;dnaNBhleUxYEnU)mU(*$&3uP53OMpUw#?THWk|rfd%VzZ)Ktw7c zxS=cxh^Q!n2=1bS8!jv&2#5$G?kl)2{GKzDv?&xnen0n*dw`85pq)BwK(2bR$?CCUXpw?y&BNuna#OYUp~nsAFCYRvC;-Kv98`fCFc1s{ zBfw&CD_93Mfd|26@F;i;Yz5oFPOu9+1D*#jfEU3l;C1jecn2H;C&5SH3-BfQ3Va7H zfWIIMHBf*e)WaYc3j4r#XoLwc6_&wjSOW(G5e|WkunEqDcIbp|=z(rH2hN8#z#HLW z*a=s{yWuK$54;!N2Oor+;Y08-xC=fHUxd5iTkvi8F5C|f!xQjBcoKdDKY?Gt@8Mwh zBm4vY3I9S6X^|cUpg=r=XfV1OjX`6P8I41e zkQGfwGms6rkQ>cG1T931&@yx@T8{2OYtRg|4sAvcp~uixv;#eho zh|Z(m8HQmQp3yT#CV@$2GMWC&AZ9Q#oEgoSnaRu)W-4sZDVdgUPnd_OG zm}ShZ%w5cV%qHeRW()Huvx|9-d5L+M*~`4i>|@?x_A>{V_n9Niapp90hWUg!%Y4E7 z$ed>`Fh4QBv4DjvVi{J;2C))rV8hrLHkOTJ|}NdYh|xxXR@vA682_xDci~3%HGM|!#>15%I;!!voEu+uy3(%vj^Ej?ECCT z?8oeB_Gk7t_74rG(P>1DUK6AV*BCVknk-GWrbJV!>8GjC4ABhJT&)?aF>9u18Z;J7 zvu1{7md35|Xs*+AXs*{_4bj}BxlMDsW{u_n&4ZfFn#VQUG*4@u)jX%!quHx@Tl21F zzvif>L-T>=nC3&xCz^Ab&otj?e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w*%|dgBxyvjv_nQ07gXSUghTS#7>FUzvZJHRe03mQ}|Ju-GBC@b0;W5rp1 zi^73$2n>hAp$qa*gfdj28(I)S9~=os!!a-pCcB_ zUWV7;4R{OQh4V&$YZm0+P9Q8&0 z(I7Mw4MQ#@Ab?clMixRS0!5){6pIp2GQxi4SqqxycMps8Sj2;oaA$n)@?=f{_y2cd8oQt^~^Kwk1*o@e$*t4;f zv9IHT@+tX@^dfyoKQfREAzzXageMYFh)zu6AwDva zj3#49JV_!paR?*h$V4)Qq>~wB7ReyrkOgEhSxT0ZO!5O+Lw+XfNH)nOd1MROMs|?h zWG~rI{zZ|++p znz9zG6>G!Vv5u@W3uE0`Pu81#!3MBFYzX_3jbJ>Jn8I{sG7s~z2o}Xgvlte~5?Knv zj4;N=vI%T5OJnJ5I-AM9W^>p)wva7h-?8N^ll{Qfu%FpFmd$e6CYH|%SRvcVir7AO zfE{8-*>QG)on|HMEW5xivuo@oyUohj16Ize*mG9RYS=sWKJ}y2hN*$6%~D(aech;2 O=Whdzzx{uy-TnuLN)1r} 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 zcmZwCF-ikb6o%1LXBC%}K_-(l7Gj|RMGzYs+mO7(!8mWoj6&S5`%uXf6vY1fx#xa- znwki=vX!Ns#+zg3f6lBsr97Vrpb$;mV~Kt+k!x&eF3a zoC{+QW@g6D{%Nlz!_TFAgS|#;`)B>De3yl}O6^2g$U29z+j=aZrI(>(Q^Q?ASx(| z1qA}4v7nC)K|!pbQk0^Ah>8VJKtWL~@LgwSH`ze&^?Bawy}tkT|6UZ$&d!{3pSz#? z{+-E`=0>~Qlb5$2K!5-PSfB$O5P)H9@(ji0wmTgolReJnamhAUZG(M=;u@RmoN}X5 z>v0DGxOnwPfCu_X1FLeii*+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)Q*Sp#7Mt8Hj&CPLh-Cgca?mjoqEpQ9nL+%mxxO>Vy?VfWl zxR=}#x75Ar-f(|&Z@G8ed+r1GvHQe*>OON{xUbwd?mM@FR3=qP4N{ZTCUr>=X+Rp0 zrldJ(McR-r$d{xe=|Z}ZU=l)llHQ~r89)Y+Aw(t~q7#$Y#7`U&Muw6|5=~-B0vS$H zh)YHhMg$p6#*#ELflMY-$#gP{q>~IXm&_vzNETT_mXVcYHCap6k!-SwY$4mo4)O!p zNp_PxWFN^R`Q#UJkQ^b$$O%$JPLp%wBDqXT$u)A5l#$!y9=T5*l5+Bt{7L>Ie~#_H5p*Oal+my0SUR3gqEqP%I-7n&=hAs}Aze(D z(Uo*HT}#)~4RkZzMsw&+x|{B$d9;8Ypoi%(dXg5?v-ASJOiSrCdXwIwcj4Pb+r%sfnI zCi5}G!q_kt#bQ|k8_rUg%P13U3`=7Z*%UUN&0^_n4$EWu*(SD? z?O?g=N4AIUXZfs<9b!k>30B0;u=DH^`;}c~H&_|F!+vKESvh;kp0O9~6?@A*@JhTY zufc2bKwgi3!awCr_-DK&Z_hjOF1#xb<{`W%@5B4^L0sYr_i&w?+~$xwJe)`HC?3lb z_;8-WQ#s*`3qFRY@d8MAPU6+aZ(hE)1pLN5m&_>@!+4Gf91;mSX=tX|0n+bAKWk2)c^nh literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/ru.lproj/InfoPlist.strings b/hw/xquartz/bundle/ru.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..7f722e4b628764cddad52da2150429794eb0b00d GIT binary patch literal 274 zcmZwCK}!Nr07c<%@mBtdhf9fZ9Ebu5GNA}U7j4>#K5fWm24@QF$5%K(i)eoi_uS7f zVG@VCdXXG^YGiC+VD8q9H6H PnWnEl)tvsUWj`g~TJkHj 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 0000000000000000000000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Loy$JH}43e0G|hV}-1U6|)j{nf<}8vIJmV5E`{0;8SyKo=go%iB>ct1Xn`|=@tI3LMJ^Rav!pU5ZkX*__>;Ip}j zTey`=T;>{gaLhw_1fS2Nc`Q%h$=tEP+;>E!9*>E-F|8RQx28Rqf#Oz=$f1bY6*RJLpPuk6)n&cFYE G9`(OXT+aOf literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/sv.lproj/InfoPlist.strings b/hw/xquartz/bundle/sv.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..655d5ff63d6981c332fe77f5be9ae84ae9a64fb0 GIT binary patch literal 260 zcmZwCK}!Nr7)Ie|?XUQ7DKU<2T11Ny5+T~OX)AiQA)7lmQ(!;7!W*=R_UGlC_w&ot zM7Wo2tQ|ByBwOKKa@1>NtzO7>!b)o=t8|6$4Z@4$RH%umk&%Tvx8Ah24w46Juaa;r zj6Io|8N2$2T}p;u)1$#rqqYCD4s(^-g|LuyPKDfiE>&~2+NE%#E4^p``N2l@9%UA=wD$#3kB3$_)|rx-8l|scQ!J)9j$LOA=}-T%%8`>@(};R=-!#jy?!0GOvJEH3vy& z+9f%KC8NOEywduGz4gZ|IQVp^7s|7brM@VFDy-Vh%^mH_Ot&tk>YCfRvu;IE7Ygs7 z`YMK~zwdlgm>bGXr>mw{3>f%iKUwyIX2WA5j~l6udPhB;n~R$Ig&{?z{}^c!e{22* swn6LLj16-Nc2s9We#8+V+#7b@L2pk!*pt}VdA5J?UxNPTZT7tCe_=1bZU6uP literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib b/hw/xquartz/bundle/sv.lproj/main.nib/keyedobjects.nib new file mode 100644 index 0000000000000000000000000000000000000000..bd01c2dacfdec10b0031d3470bf548d00b0e99b1 GIT binary patch literal 35017 zcmeFacYGAp*FS#lotfR8oh6w~@7eU;cGE~gNkED~C<#5VZjvPlB)egELouTFq9PC# zEFh>L0%F0g*c*Zc5Kt+Ch!yM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z6@a*g58$bj~k{`QUP`=^R6Qvyi6-OZ%;ay9^OK8{_ae zcYkn;+%@ix?s|8FTjp+Yx4S#tUGC5BKKFoo$UWj7b5FXb-3s@td)~d|UUh$SZ@9PI zJMKOAq5FsXr~BM}>ArT~kgB9QsX=Oy08*DUAdN^MX-0xca}q*Yk+!5g=|sAa?xZIP zBfUu<(vJv4CMq$AMIdoVB#9z}Ni2yc2_%W65+5PNBa93uBgts;1sO{+$ape|OeSBE zX(XHEkeOsQnM=MWd1N73OqP;-vYf0SE6FOdmXwfEvXPXLtz-xJiR>nO$bM2z4wGZ# zBsong$XRlMTqf7Z4RVv*A$Q4r@`yYkf0Dn*3-Xe@_P^z?>aXU1$6wQ5%U{P|*I(b? z$RFqr@(25y`$PO4{GGj2&-FZydn3HjUb>gzP4F_kDc;v!wwL40^5%H+y*zJ`x6~`} zR(M6;8t+GMy|>ZZ>}~UQdb_>7-Y?!k?}&HYJLOe)=e&#F74J9icki}$*L&bS_MUow zdH?bL_TJE{v^uRxYt#2=ecFfy(q{An`XOya+tT*56YWB~)1EYp_NIMle=1TyHEL2w z9XgN>qOo)cO{6K*NBxx1;dB)Jf{vr(=_Hy(r_$+k2AxS~(|I(PE~HCnJ}smx>1tX` z*U=5MjBcen=q|d4?x*GSFg-?3(lhidy+AM1YxD-aMJwrj`iMTE&*%&KivGi@uxhLZ ztHlCXJ=TylVL>dIwO}n-8}>9hlZm~*spFLtv*faK=y=1T18(x)H z=QVjPUWeD^4R~YTl)ulL^AO&ex8ognCmzbX@gBS<598tdGyXXrz(o$Y#!Vi<5yw1= z59V=v2v6iG+{gW#@!@fz_r@fW-c3QQxfV2kxS|L@d P{`)%r^MC$dTF8F^t^g>m 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 zcmZwCF>At507c<%mi~x`qeF}?9i&4mv%MZTP+srMC5>|?cRq5}RH<|?c+}+H-rql1D}LQS DU~wx# literal 0 HcmV?d00001 diff --git a/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings b/hw/xquartz/bundle/zh_CN.lproj/Localizable.strings new file mode 100644 index 0000000000000000000000000000000000000000..f88a6da4b901dfe0524ef5acf4ac410033e283ec GIT binary patch literal 884 zcmcJOKX21e6vcmHs6^<9#F!^fRa7NpL%S{%R8YLdM#sU!LNVb26Bor55jG(q zHm>9<)F`3xnlUDdDIO7ufaqRif{sgwBE&0TDcaPj^O7#EoI}nFNNdh@-9Ac?rg7JaHq)B15WZC|;n@`pKjm&u_1nw0>>+eD`EkUc1!!WPRx; z#r$fwpIjOr_7>l7j^cUa_sRRs%iiZ`Z}zCSSpMnm%)Xrk&FehD^=C%iQ@tOP?_wF*ZYSOfiuD(|xhTWfPMz xRaCw!Z^Rixe9b#P`!TxN8sjlK28sjW^f#>QOs{(Sb!+Uc?61jtm8oU!{sVN_s#5>} 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 zcmd43cYGAZ|35x6ySI0Hdr5ZFdoI0~%cZvqO+n-!9GyT+Ig&t<3(19IL}ma1AxcLC z6r_m)QbeRkQ;8tO0w^k?2q+yyM8(4QF?)9@lJI$d-oMWuKOPFn-R#V3p06^mc|B*g zq_(QE-kOwj3P6AW16ZH{9N>X^NZ2@YU45mcWtx-HNo~_S+TVk!y?heXzFdAXfEqwe`vFW?gIg6fDWXBOpp({f$pFu zcoIwpFM@esK3E0b02{ztU^6%hj)7C)G&lpk1?Rwb;0JIH{0OdqtKcTM3w{NEfPbJf zbcY_$6Z%3w7zDL26o$b_7z_0<9cI8xm<0{6Cp5x-umFy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E(!{V4YDNc*C;+(i3 zeiBvUs<9}pAs#LWgg@&AcN{sR1Qpu7M8 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 zcmZwCu}Z^G0EOXi?o(Vk7D>}C4&tB%TR~i0TuXbK25W9eqEH`RC0B3|w=?{Q^PkTz zb2Gt%WM}K7_95B}-bI~WEotWc4f+|2nB97x23&(cjAAv|6S~1Wr zF!wJ=`zP=pph|4;AFwhZu{G5@9LKOTJjw6w-re^;cmCIBiV})t91L81Y!n?1u<%fP zA;uvh!od??i75&cS)`4H;uxP8MM(V2(!szZLJ{HTaw&EwQ)Zqjo}3k$xlDtagSd|< z$#k4q^gSTJ#lgf7bv_X%pk&W%@ffxVWNN>k3dfv}j?`5DF0%u2j?d8@Zgr zx0+Na{p%R5%;Z46ZLB9cv^9}P4_|16sinarMHF)=inZR+#on(U-@b0x`@=pzU-ica zl)m5AdU!x-3VinggFj0Jxn!&K@z;iZQ`Tg@x^Zkn{*i8SOtY4X4 GO87q?8>@2w 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 zcmd3O2Y3`!_xHVbW_NaWHpxs9NKZDsC!5|Iy~u{JbOJGD2@7d#3N?5yRUk+a5Gm3{ zq@$=55ky2RbU`ViAP9(}B4X!z?(A-|fyCGM|CQ(C(I?67%)O`IbAIQ{l+;w1YU^~m za{vMa7{CGrPy!yP2M0A6&9$cLs{TQB)ipzcip`~?Obtf!;GpV~(Zw@Q;g-qvf{d842wi3y`i^pg0U>mdeaUG{RRY}0dXJ+q=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`bP?S|w0K#(B4R|Wcul+^`iVr5EZz~4P=qcFVG5VX5FX(bc|wQ*Vvraj zhKmtmlz2~!69wV}F+ofcQ$?ZpR7@A2i`inHSRno>7K^2#Oq7cXv0AJZ8^mU@P3#c6 zM3vYp_KRv!BaVn#aZ;QXb>f`(QCtw0#AR_+{3d=Ex5OQBPdpTj;xF;U336IEt(;IN z%z4IX=RE6law455r?b=5dC7@!Vx2xtf|KOD?Z}Si=#JaT{<{tz9Q?Q2{{Lz6Kb&{} E3%VJYKL7v# literal 0 HcmV?d00001 From f3042a63be0748bb60567144276d2c61b75ba0b7 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 21 Dec 2007 01:24:06 -0800 Subject: [PATCH 447/454] 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 448/454] 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 449/454] 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 450/454] 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 451/454] 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 452/454] 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 453/454] 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 454/454] [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;