mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-10 05:50:18 +01:00
Merge commit 'origin/server-1.6-branch' into xorg-server-1.6-apple
This commit is contained in:
commit
1bec11c732
28 changed files with 223 additions and 132 deletions
|
|
@ -1054,7 +1054,7 @@ ScreenSaverSetAttributes (ClientPtr client)
|
|||
}
|
||||
else
|
||||
{
|
||||
ret = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP,
|
||||
ret = dixLookupResourceByType((pointer *)&pPixmap, pixID, RT_PIXMAP,
|
||||
client, DixReadAccess);
|
||||
if (ret == Success)
|
||||
{
|
||||
|
|
@ -1092,7 +1092,7 @@ ScreenSaverSetAttributes (ClientPtr client)
|
|||
}
|
||||
else
|
||||
{
|
||||
ret = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP,
|
||||
ret = dixLookupResourceByType((pointer *)&pPixmap, pixID, RT_PIXMAP,
|
||||
client, DixReadAccess);
|
||||
if (ret == Success)
|
||||
{
|
||||
|
|
@ -1186,7 +1186,7 @@ ScreenSaverSetAttributes (ClientPtr client)
|
|||
break;
|
||||
case CWColormap:
|
||||
cmap = (Colormap) *pVlist;
|
||||
ret = dixLookupResource((pointer *)&pCmap, cmap, RT_COLORMAP,
|
||||
ret = dixLookupResourceByType((pointer *)&pCmap, cmap, RT_COLORMAP,
|
||||
client, DixUseAccess);
|
||||
if (ret != Success)
|
||||
{
|
||||
|
|
@ -1210,7 +1210,7 @@ ScreenSaverSetAttributes (ClientPtr client)
|
|||
}
|
||||
else
|
||||
{
|
||||
ret = dixLookupResource((pointer *)&pCursor, cursorID,
|
||||
ret = dixLookupResourceByType((pointer *)&pCursor, cursorID,
|
||||
RT_CURSOR, client, DixUseAccess);
|
||||
if (ret != Success)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1023,7 +1023,7 @@ SecurityClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
|
||||
case ClientStateRunning:
|
||||
state->authId = AuthorizationIDOfClient(pci->client);
|
||||
rc = dixLookupResource((pointer *)&pAuth, state->authId,
|
||||
rc = dixLookupResourceByType((pointer *)&pAuth, state->authId,
|
||||
SecurityAuthorizationResType, serverClient,
|
||||
DixGetAttrAccess);
|
||||
if (rc == Success) {
|
||||
|
|
@ -1038,7 +1038,7 @@ SecurityClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
|
||||
case ClientStateGone:
|
||||
case ClientStateRetained:
|
||||
rc = dixLookupResource((pointer *)&pAuth, state->authId,
|
||||
rc = dixLookupResourceByType((pointer *)&pAuth, state->authId,
|
||||
SecurityAuthorizationResType, serverClient,
|
||||
DixGetAttrAccess);
|
||||
if (rc == Success) {
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ ProcShapeMask (client)
|
|||
if (stuff->src == None)
|
||||
srcRgn = 0;
|
||||
else {
|
||||
rc = dixLookupResource((pointer *)&pPixmap, stuff->src, RT_PIXMAP,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, stuff->src, RT_PIXMAP,
|
||||
client, DixReadAccess);
|
||||
if (rc != Success)
|
||||
return (rc == BadValue) ? BadPixmap : rc;
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ SyncInitTrigger(client, pTrigger, counter, changes)
|
|||
{
|
||||
if (counter == None)
|
||||
pCounter = NULL;
|
||||
else if (Success != (rc = dixLookupResource((pointer *)&pCounter,
|
||||
else if (Success != (rc = dixLookupResourceByType ((pointer *)&pCounter,
|
||||
counter, RTCounter, client, DixReadAccess)))
|
||||
{
|
||||
client->errorValue = counter;
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ SELinuxLabelInitial(void)
|
|||
SELinuxScreen(NULL, NULL, &srec);
|
||||
|
||||
/* Do the default colormap */
|
||||
dixLookupResource(&unused, screenInfo.screens[i]->defColormap,
|
||||
dixLookupResourceByType(&unused, screenInfo.screens[i]->defColormap,
|
||||
RT_COLORMAP, serverClient, DixCreateAccess);
|
||||
}
|
||||
}
|
||||
|
|
@ -1989,6 +1989,10 @@ SELinuxExtensionInit(INITARGS)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Don't init unless there's something to do */
|
||||
if (!security_get_boolean_active("xserver_object_manager"))
|
||||
return;
|
||||
|
||||
/* Check SELinux mode in configuration file */
|
||||
switch(selinuxEnforcingState) {
|
||||
case SELINUX_MODE_DISABLED:
|
||||
|
|
|
|||
|
|
@ -124,8 +124,8 @@ ProcXTestCompareCursor(client)
|
|||
else if (stuff->cursor == XTestCurrentCursor)
|
||||
pCursor = GetSpriteCursor(ptr);
|
||||
else {
|
||||
rc = dixLookupResource((pointer *)&pCursor, stuff->cursor, RT_CURSOR,
|
||||
client, DixReadAccess);
|
||||
rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor, RT_CURSOR,
|
||||
client, DixReadAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
client->errorValue = stuff->cursor;
|
||||
|
|
@ -158,7 +158,7 @@ ProcXTestFakeInput(client)
|
|||
int numValuators = 0;
|
||||
int firstValuator = 0;
|
||||
EventListPtr events;
|
||||
int nevents;
|
||||
int nevents = 0;
|
||||
int i;
|
||||
int base = 0;
|
||||
int flags = 0;
|
||||
|
|
|
|||
|
|
@ -1349,7 +1349,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
|
|||
if (rcursor == None)
|
||||
cursor = NullCursor;
|
||||
else {
|
||||
rc = dixLookupResource((pointer *)&cursor, rcursor, RT_CURSOR,
|
||||
rc = dixLookupResourceByType((pointer *)&cursor, rcursor, RT_CURSOR,
|
||||
client, DixUseAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ ProcCompositeRedirectWindow (ClientPtr client)
|
|||
REQUEST(xCompositeRedirectWindowReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
|
||||
rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
DixSetAttrAccess|DixManageAccess|DixBlendAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -162,7 +162,7 @@ ProcCompositeRedirectSubwindows (ClientPtr client)
|
|||
REQUEST(xCompositeRedirectSubwindowsReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
|
||||
rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
DixSetAttrAccess|DixManageAccess|DixBlendAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -214,7 +214,7 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client)
|
|||
REQUEST(xCompositeCreateRegionFromBorderClipReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq);
|
||||
rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -250,7 +250,7 @@ ProcCompositeNameWindowPixmap (ClientPtr client)
|
|||
REQUEST(xCompositeNameWindowPixmapReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
|
||||
rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -298,7 +298,7 @@ ProcCompositeGetOverlayWindow (ClientPtr client)
|
|||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
|
||||
rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client,
|
||||
DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
|
|||
37
config/hal.c
37
config/hal.c
|
|
@ -474,13 +474,13 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
|
|||
char **devices;
|
||||
int num_devices, i;
|
||||
|
||||
if (info->hal_ctx)
|
||||
return TRUE; /* already registered, pretend we did something */
|
||||
|
||||
info->system_bus = connection;
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
if (info->hal_ctx)
|
||||
return TRUE; /* already registered, pretend we did something */
|
||||
|
||||
info->hal_ctx = libhal_ctx_new();
|
||||
if (!info->hal_ctx) {
|
||||
LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n");
|
||||
|
|
@ -493,13 +493,15 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
|
|||
}
|
||||
if (!libhal_ctx_init(info->hal_ctx, &error)) {
|
||||
LogMessage(X_ERROR, "config/hal: couldn't initialise context: %s (%s)\n",
|
||||
error.name, error.message);
|
||||
error.name ? error.name : "unknown error",
|
||||
error.message ? error.message : "null");
|
||||
goto out_ctx;
|
||||
}
|
||||
if (!libhal_device_property_watch_all(info->hal_ctx, &error)) {
|
||||
LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n",
|
||||
error.name, error.message);
|
||||
goto out_ctx2;
|
||||
error.name ? error.name : "unknown error",
|
||||
error.message ? error.message : "null");
|
||||
goto out_ctx;
|
||||
}
|
||||
libhal_ctx_set_device_added(info->hal_ctx, device_added);
|
||||
libhal_ctx_set_device_removed(info->hal_ctx, device_removed);
|
||||
|
|
@ -507,6 +509,12 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
|
|||
devices = libhal_find_device_by_capability(info->hal_ctx, "input",
|
||||
&num_devices, &error);
|
||||
/* FIXME: Get default devices if error is set. */
|
||||
if (dbus_error_is_set(&error)) {
|
||||
LogMessage(X_ERROR, "config/hal: couldn't find input device: %s (%s)\n",
|
||||
error.name ? error.name : "unknown error",
|
||||
error.message ? error.message : "null");
|
||||
goto out_ctx;
|
||||
}
|
||||
for (i = 0; i < num_devices; i++)
|
||||
device_added(info->hal_ctx, devices[i]);
|
||||
libhal_free_string_array(devices);
|
||||
|
|
@ -515,12 +523,19 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
|
|||
|
||||
return TRUE;
|
||||
|
||||
out_ctx2:
|
||||
if (!libhal_ctx_shutdown(info->hal_ctx, &error))
|
||||
LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
|
||||
error.name, error.message);
|
||||
out_ctx:
|
||||
libhal_ctx_free(info->hal_ctx);
|
||||
dbus_error_free(&error);
|
||||
|
||||
if (info->hal_ctx) {
|
||||
if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
|
||||
LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
|
||||
error.name ? error.name : "unknown error",
|
||||
error.message ? error.message : "null");
|
||||
dbus_error_free(&error);
|
||||
}
|
||||
libhal_ctx_free(info->hal_ctx);
|
||||
}
|
||||
|
||||
out_err:
|
||||
dbus_error_free(&error);
|
||||
|
||||
|
|
|
|||
12
configure.ac
12
configure.ac
|
|
@ -26,12 +26,12 @@ dnl
|
|||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT([xorg-server], 1.6.2-apple1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
|
||||
AC_INIT([xorg-server], 1.6.3, [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
|
||||
|
||||
RELEASE_DATE="2009-7-25"
|
||||
RELEASE_DATE="2009-7-31"
|
||||
|
||||
dnl this gets generated by autoheader, and thus contains all the defines. we
|
||||
dnl don't ever actually use it, internally.
|
||||
|
|
@ -874,7 +874,7 @@ case "$DRI2,$HAVE_DRI2PROTO" in
|
|||
DRI2=yes
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(DRI2, test "x$DRI2" == xyes)
|
||||
AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
|
||||
|
||||
if test "x$DRI" = xyes || test "x$DRI2" = xyes; then
|
||||
PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.0])
|
||||
|
|
@ -884,7 +884,7 @@ fi
|
|||
|
||||
if test "x$DRI2" = xyes; then
|
||||
save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS -Wall"
|
||||
CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <GL/gl.h>
|
||||
#include <GL/internal/dri_interface.h>
|
||||
#ifndef __DRI_DRI2
|
||||
|
|
@ -901,14 +901,14 @@ if test "x$DRI2" = xyes; then
|
|||
DRI2_AIGLX=no
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(DRI2_AIGLX, test "x$DRI2_AIGLX" == xyes)
|
||||
AM_CONDITIONAL(DRI2_AIGLX, test "x$DRI2_AIGLX" = xyes)
|
||||
|
||||
|
||||
AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
|
||||
if test "x$XINERAMA" = xyes; then
|
||||
AC_DEFINE(XINERAMA, 1, [Support Xinerama extension])
|
||||
AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama])
|
||||
REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto xinerama"
|
||||
REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])
|
||||
|
|
|
|||
|
|
@ -298,15 +298,15 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
|||
GlyphSharePtr pShare;
|
||||
DeviceIntPtr pDev;
|
||||
|
||||
rc = dixLookupResource((pointer *)&sourcefont, source, RT_FONT, client,
|
||||
DixUseAccess);
|
||||
rc = dixLookupResourceByType((pointer *)&sourcefont, source, RT_FONT, client,
|
||||
DixUseAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
client->errorValue = source;
|
||||
return (rc == BadValue) ? BadFont : rc;
|
||||
}
|
||||
rc = dixLookupResource((pointer *)&maskfont, mask, RT_FONT, client,
|
||||
DixUseAccess);
|
||||
rc = dixLookupResourceByType((pointer *)&maskfont, mask, RT_FONT, client,
|
||||
DixUseAccess);
|
||||
if (rc != Success && mask != None)
|
||||
{
|
||||
client->errorValue = mask;
|
||||
|
|
|
|||
|
|
@ -115,48 +115,66 @@ LookupClient(XID id, ClientPtr client)
|
|||
return (i == Success) ? pClient : NULL;
|
||||
}
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByType */
|
||||
_X_EXPORT pointer
|
||||
SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype,
|
||||
Mask access_mode)
|
||||
{
|
||||
pointer retval;
|
||||
int i = dixLookupResource(&retval, id, rtype, client, access_mode);
|
||||
int i = dixLookupResourceByType(&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");
|
||||
"to use dixLookupResourceByType().\n");
|
||||
return (i == Success) ? retval : NULL;
|
||||
}
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByClass */
|
||||
_X_EXPORT pointer
|
||||
SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes,
|
||||
Mask access_mode)
|
||||
{
|
||||
pointer retval;
|
||||
int i = dixLookupResource(&retval, id, classes, client, access_mode);
|
||||
int i = dixLookupResourceByClass(&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");
|
||||
"to use dixLookupResourceByClass().\n");
|
||||
return (i == Success) ? retval : NULL;
|
||||
}
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByType */
|
||||
_X_EXPORT pointer
|
||||
LookupIDByType(XID id, RESTYPE rtype)
|
||||
{
|
||||
return SecurityLookupIDByType(NullClient, id, rtype, DixUnknownAccess);
|
||||
}
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByClass */
|
||||
_X_EXPORT pointer
|
||||
LookupIDByClass(XID id, RESTYPE classes)
|
||||
{
|
||||
return SecurityLookupIDByClass(NullClient, id, classes, DixUnknownAccess);
|
||||
}
|
||||
|
||||
/* replaced by dixLookupResourceBy{Type,Class} */
|
||||
_X_EXPORT int
|
||||
dixLookupResource (pointer *result, XID id, RESTYPE rtype,
|
||||
ClientPtr client, Mask mode)
|
||||
{
|
||||
Bool istype = ((rtype & TypeMask) && (rtype != RC_ANY)) || (rtype == RT_NONE);
|
||||
|
||||
static int warn = 1;
|
||||
if (warn > 0 && --warn)
|
||||
ErrorF("Warning: dixLookupResource() "
|
||||
"is deprecated. Please convert your driver/module "
|
||||
"to use dixLookupResourceByType/dixLookupResourceByClass().\n");
|
||||
if (istype)
|
||||
return dixLookupResourceByType (result, id, rtype, client, mode);
|
||||
else
|
||||
return dixLookupResourceByClass (result, id, rtype, client, mode);
|
||||
}
|
||||
|
||||
/* end deprecated functions */
|
||||
|
|
|
|||
|
|
@ -1119,11 +1119,11 @@ ProcQueryFont(ClientPtr client)
|
|||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
|
||||
client->errorValue = stuff->id; /* EITHER font or gc */
|
||||
rc = dixLookupResource((pointer *)&pFont, stuff->id, RT_FONT, client,
|
||||
DixGetAttrAccess);
|
||||
rc = dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT, client,
|
||||
DixGetAttrAccess);
|
||||
if (rc == BadValue) {
|
||||
rc = dixLookupResource((pointer *)&pGC, stuff->id, RT_GC, client,
|
||||
DixGetAttrAccess);
|
||||
rc = dixLookupResourceByType((pointer *)&pGC, stuff->id, RT_GC, client,
|
||||
DixGetAttrAccess);
|
||||
if (rc == Success)
|
||||
pFont = pGC->font;
|
||||
}
|
||||
|
|
@ -1177,10 +1177,10 @@ ProcQueryTextExtents(ClientPtr client)
|
|||
REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq);
|
||||
|
||||
client->errorValue = stuff->fid; /* EITHER font or gc */
|
||||
rc = dixLookupResource((pointer *)&pFont, stuff->fid, RT_FONT, client,
|
||||
DixGetAttrAccess);
|
||||
rc = dixLookupResourceByType((pointer *)&pFont, stuff->fid, RT_FONT, client,
|
||||
DixGetAttrAccess);
|
||||
if (rc == BadValue) {
|
||||
rc = dixLookupResource((pointer *)&pGC, stuff->fid, RT_GC, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pGC, stuff->fid, RT_GC, client,
|
||||
DixGetAttrAccess);
|
||||
if (rc == Success)
|
||||
pFont = pGC->font;
|
||||
|
|
@ -1325,7 +1325,7 @@ ProcFreePixmap(ClientPtr client)
|
|||
REQUEST(xResourceReq);
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
|
||||
rc = dixLookupResource((pointer *)&pMap, stuff->id, RT_PIXMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pMap, stuff->id, RT_PIXMAP, client,
|
||||
DixDestroyAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2271,7 +2271,7 @@ ProcFreeColormap(ClientPtr client)
|
|||
REQUEST(xResourceReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
rc = dixLookupResource((pointer *)&pmap, stuff->id, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pmap, stuff->id, RT_COLORMAP, client,
|
||||
DixDestroyAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2299,7 +2299,7 @@ ProcCopyColormapAndFree(ClientPtr client)
|
|||
REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq);
|
||||
mid = stuff->mid;
|
||||
LEGAL_NEW_RESOURCE(mid, client);
|
||||
rc = dixLookupResource((pointer *)&pSrcMap, stuff->srcCmap, RT_COLORMAP,
|
||||
rc = dixLookupResourceByType((pointer *)&pSrcMap, stuff->srcCmap, RT_COLORMAP,
|
||||
client, DixReadAccess|DixRemoveAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2324,7 +2324,7 @@ ProcInstallColormap(ClientPtr client)
|
|||
REQUEST(xResourceReq);
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->id, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, client,
|
||||
DixInstallAccess);
|
||||
if (rc != Success)
|
||||
goto out;
|
||||
|
|
@ -2349,7 +2349,7 @@ ProcUninstallColormap(ClientPtr client)
|
|||
REQUEST(xResourceReq);
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->id, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, client,
|
||||
DixUninstallAccess);
|
||||
if (rc != Success)
|
||||
goto out;
|
||||
|
|
@ -2416,7 +2416,7 @@ ProcAllocColor (ClientPtr client)
|
|||
REQUEST(xAllocColorReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xAllocColorReq);
|
||||
rc = dixLookupResource((pointer *)&pmap, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pmap, stuff->cmap, RT_COLORMAP, client,
|
||||
DixAddAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2457,7 +2457,7 @@ ProcAllocNamedColor (ClientPtr client)
|
|||
REQUEST(xAllocNamedColorReq);
|
||||
|
||||
REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes);
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
DixAddAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2508,7 +2508,7 @@ ProcAllocColorCells (ClientPtr client)
|
|||
REQUEST(xAllocColorCellsReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xAllocColorCellsReq);
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
DixAddAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2575,7 +2575,7 @@ ProcAllocColorPlanes(ClientPtr client)
|
|||
REQUEST(xAllocColorPlanesReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xAllocColorPlanesReq);
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
DixAddAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2640,7 +2640,7 @@ ProcFreeColors(ClientPtr client)
|
|||
REQUEST(xFreeColorsReq);
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xFreeColorsReq);
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
DixRemoveAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2675,7 +2675,7 @@ ProcStoreColors (ClientPtr client)
|
|||
REQUEST(xStoreColorsReq);
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xStoreColorsReq);
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
DixWriteAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2709,7 +2709,7 @@ ProcStoreNamedColor (ClientPtr client)
|
|||
REQUEST(xStoreNamedColorReq);
|
||||
|
||||
REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes);
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
DixWriteAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2743,7 +2743,7 @@ ProcQueryColors(ClientPtr client)
|
|||
REQUEST(xQueryColorsReq);
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xQueryColorsReq);
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
DixReadAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2795,7 +2795,7 @@ ProcLookupColor(ClientPtr client)
|
|||
REQUEST(xLookupColorReq);
|
||||
|
||||
REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes);
|
||||
rc = dixLookupResource((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pcmp, stuff->cmap, RT_COLORMAP, client,
|
||||
DixReadAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -2844,14 +2844,14 @@ ProcCreateCursor (ClientPtr client)
|
|||
REQUEST_SIZE_MATCH(xCreateCursorReq);
|
||||
LEGAL_NEW_RESOURCE(stuff->cid, client);
|
||||
|
||||
rc = dixLookupResource((pointer *)&src, stuff->source, RT_PIXMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&src, stuff->source, RT_PIXMAP, client,
|
||||
DixReadAccess);
|
||||
if (rc != Success) {
|
||||
client->errorValue = stuff->source;
|
||||
return (rc == BadValue) ? BadPixmap : rc;
|
||||
}
|
||||
|
||||
rc = dixLookupResource((pointer *)&msk, stuff->mask, RT_PIXMAP, client,
|
||||
rc = dixLookupResourceByType((pointer *)&msk, stuff->mask, RT_PIXMAP, client,
|
||||
DixReadAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -2949,7 +2949,7 @@ ProcFreeCursor (ClientPtr client)
|
|||
REQUEST(xResourceReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
rc = dixLookupResource((pointer *)&pCursor, stuff->id, RT_CURSOR, client,
|
||||
rc = dixLookupResourceByType((pointer *)&pCursor, stuff->id, RT_CURSOR, client,
|
||||
DixDestroyAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
|
|||
if (id == INVALID)
|
||||
return BadDrawable;
|
||||
|
||||
rc = dixLookupResource((pointer *)&pTmp, id, RC_DRAWABLE, client, access);
|
||||
rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access);
|
||||
|
||||
if (rc == BadValue)
|
||||
return BadDrawable;
|
||||
|
|
@ -259,7 +259,7 @@ dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
|
|||
if (!clientIndex || !clients[clientIndex] || (rid & SERVER_BIT))
|
||||
goto bad;
|
||||
|
||||
rc = dixLookupResource(&pRes, rid, RC_ANY, client, DixGetAttrAccess);
|
||||
rc = dixLookupResourceByClass(&pRes, rid, RC_ANY, client, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
goto bad;
|
||||
|
||||
|
|
|
|||
12
dix/events.c
12
dix/events.c
|
|
@ -1161,7 +1161,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
|
|||
#ifdef XKB
|
||||
/* Fix for key repeating bug. */
|
||||
if (device->key != NULL && device->key->xkbInfo != NULL &&
|
||||
xE->u.u.type == KeyRelease)
|
||||
(xE->u.u.type == KeyRelease || xE->u.u.type == DeviceKeyRelease))
|
||||
AccessXCancelRepeatKey(device->key->xkbInfo, xE->u.u.detail);
|
||||
#endif
|
||||
|
||||
|
|
@ -4445,7 +4445,7 @@ ProcGrabPointer(ClientPtr client)
|
|||
cursor = NullCursor;
|
||||
else
|
||||
{
|
||||
rc = dixLookupResource((pointer *)&cursor, stuff->cursor, RT_CURSOR,
|
||||
rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor, RT_CURSOR,
|
||||
client, DixUseAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -4545,8 +4545,8 @@ ProcChangeActivePointerGrab(ClientPtr client)
|
|||
newCursor = NullCursor;
|
||||
else
|
||||
{
|
||||
int rc = dixLookupResource((pointer *)&newCursor, stuff->cursor,
|
||||
RT_CURSOR, client, DixUseAccess);
|
||||
int rc = dixLookupResourceByType((pointer *)&newCursor, stuff->cursor,
|
||||
RT_CURSOR, client, DixUseAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
client->errorValue = stuff->cursor;
|
||||
|
|
@ -5146,7 +5146,7 @@ ProcGrabButton(ClientPtr client)
|
|||
cursor = NullCursor;
|
||||
else
|
||||
{
|
||||
rc = dixLookupResource((pointer *)&cursor, stuff->cursor, RT_CURSOR,
|
||||
rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor, RT_CURSOR,
|
||||
client, DixUseAccess);
|
||||
if (rc != Success)
|
||||
if (!cursor)
|
||||
|
|
@ -5396,7 +5396,7 @@ ProcRecolorCursor(ClientPtr client)
|
|||
REQUEST(xRecolorCursorReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xRecolorCursorReq);
|
||||
rc = dixLookupResource((pointer *)&pCursor, stuff->cursor, RT_CURSOR,
|
||||
rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor, RT_CURSOR,
|
||||
client, DixWriteAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
|
|||
8
dix/gc.c
8
dix/gc.c
|
|
@ -273,7 +273,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
else
|
||||
{
|
||||
NEXTVAL(XID, newpix);
|
||||
rc = dixLookupResource((pointer *)&pPixmap, newpix,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, newpix,
|
||||
RT_PIXMAP, client, DixReadAccess);
|
||||
}
|
||||
if (rc == Success)
|
||||
|
|
@ -310,7 +310,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
else
|
||||
{
|
||||
NEXTVAL(XID, newstipple)
|
||||
rc = dixLookupResource((pointer *)&pPixmap, newstipple,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, newstipple,
|
||||
RT_PIXMAP, client, DixReadAccess);
|
||||
}
|
||||
if (rc == Success)
|
||||
|
|
@ -353,7 +353,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
else
|
||||
{
|
||||
NEXTVAL(XID, newfont)
|
||||
rc = dixLookupResource((pointer *)&pFont, newfont,
|
||||
rc = dixLookupResourceByType((pointer *)&pFont, newfont,
|
||||
RT_FONT, client, DixUseAccess);
|
||||
}
|
||||
if (rc == Success)
|
||||
|
|
@ -420,7 +420,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr
|
|||
pPixmap = NullPixmap;
|
||||
}
|
||||
else {
|
||||
rc = dixLookupResource((pointer *)&pPixmap, pid,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, pid,
|
||||
RT_PIXMAP, client,
|
||||
DixReadAccess);
|
||||
if (rc != Success) {
|
||||
|
|
|
|||
|
|
@ -846,11 +846,10 @@ LegalNewID(XID id, ClientPtr client)
|
|||
}
|
||||
|
||||
_X_EXPORT int
|
||||
dixLookupResource(pointer *result, XID id, RESTYPE rtype,
|
||||
ClientPtr client, Mask mode)
|
||||
dixLookupResourceByType(pointer *result, XID id, RESTYPE rtype,
|
||||
ClientPtr client, Mask mode)
|
||||
{
|
||||
int cid = CLIENT_ID(id);
|
||||
int istype = (rtype & TypeMask) && (rtype != RC_ANY);
|
||||
ResourcePtr res = NULL;
|
||||
|
||||
*result = NULL;
|
||||
|
|
@ -859,8 +858,38 @@ dixLookupResource(pointer *result, XID id, RESTYPE rtype,
|
|||
res = clientTable[cid].resources[Hash(cid, id)];
|
||||
|
||||
for (; res; res = res->next)
|
||||
if ((res->id == id) && ((istype && res->type == rtype) ||
|
||||
(!istype && res->type & rtype)))
|
||||
if (res->id == id && res->type == rtype)
|
||||
break;
|
||||
}
|
||||
if (!res)
|
||||
return BadValue;
|
||||
|
||||
if (client) {
|
||||
client->errorValue = id;
|
||||
cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type,
|
||||
res->value, RT_NONE, NULL, mode);
|
||||
if (cid != Success)
|
||||
return cid;
|
||||
}
|
||||
|
||||
*result = res->value;
|
||||
return Success;
|
||||
}
|
||||
|
||||
_X_EXPORT int
|
||||
dixLookupResourceByClass(pointer *result, XID id, RESTYPE rclass,
|
||||
ClientPtr client, Mask mode)
|
||||
{
|
||||
int cid = CLIENT_ID(id);
|
||||
ResourcePtr res = NULL;
|
||||
|
||||
*result = NULL;
|
||||
|
||||
if ((cid < MAXCLIENTS) && clientTable[cid].buckets) {
|
||||
res = clientTable[cid].resources[Hash(cid, id)];
|
||||
|
||||
for (; res; res = res->next)
|
||||
if (res->id == id && (res->type & rclass))
|
||||
break;
|
||||
}
|
||||
if (!res)
|
||||
|
|
|
|||
|
|
@ -1068,7 +1068,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
|||
}
|
||||
else
|
||||
{
|
||||
rc = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, pixID, RT_PIXMAP,
|
||||
client, DixReadAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -1128,7 +1128,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
|||
pixID = pWin->parent->border.pixmap->drawable.id;
|
||||
}
|
||||
}
|
||||
rc = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, pixID, RT_PIXMAP,
|
||||
client, DixReadAccess);
|
||||
if (rc == Success)
|
||||
{
|
||||
|
|
@ -1290,7 +1290,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
|||
error = BadMatch;
|
||||
goto PatchUp;
|
||||
}
|
||||
rc = dixLookupResource((pointer *)&pCmap, cmap, RT_COLORMAP,
|
||||
rc = dixLookupResourceByType((pointer *)&pCmap, cmap, RT_COLORMAP,
|
||||
client, DixUseAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -1366,7 +1366,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
|||
}
|
||||
else
|
||||
{
|
||||
rc = dixLookupResource((pointer *)&pCursor, cursorID,
|
||||
rc = dixLookupResourceByType((pointer *)&pCursor, cursorID,
|
||||
RT_CURSOR, client, DixUseAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -415,6 +415,7 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
|||
|
||||
if (rects) {
|
||||
int i;
|
||||
int ordering;
|
||||
|
||||
for (i = 0; i < nbox; i++) {
|
||||
rects[i].x = pbox[i].x1 + dx + src_off_x;
|
||||
|
|
@ -423,7 +424,16 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
|||
rects[i].height = pbox[i].y2 - pbox[i].y1;
|
||||
}
|
||||
|
||||
srcregion = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED);
|
||||
/* This must match the miRegionCopy() logic for reversing rect order */
|
||||
if (nbox == 1 || (dx > 0 && dy > 0) ||
|
||||
(pDstDrawable != pSrcDrawable &&
|
||||
(pDstDrawable->type != DRAWABLE_WINDOW ||
|
||||
pSrcDrawable->type != DRAWABLE_WINDOW)))
|
||||
ordering = CT_YXBANDED;
|
||||
else
|
||||
ordering = CT_UNSORTED;
|
||||
|
||||
srcregion = RECTS_TO_REGION(pScreen, nbox, rects, ordering);
|
||||
xfree(rects);
|
||||
|
||||
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
|
||||
|
|
|
|||
|
|
@ -255,9 +255,6 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
|
|||
RRTransformRec saved_transform;
|
||||
Bool saved_transform_present;
|
||||
|
||||
if (crtc->funcs->set_mode_major)
|
||||
return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y);
|
||||
|
||||
crtc->enabled = xf86CrtcInUse (crtc);
|
||||
|
||||
if (!crtc->enabled)
|
||||
|
|
@ -268,7 +265,6 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
|
|||
|
||||
adjusted_mode = xf86DuplicateMode(mode);
|
||||
|
||||
didLock = crtc->funcs->lock (crtc);
|
||||
|
||||
saved_mode = crtc->mode;
|
||||
saved_x = crtc->x;
|
||||
|
|
@ -293,19 +289,12 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
|
|||
} else
|
||||
crtc->transformPresent = FALSE;
|
||||
|
||||
if (crtc->funcs->set_origin &&
|
||||
memcmp (mode, &saved_mode, sizeof(saved_mode)) == 0 &&
|
||||
saved_rotation == rotation &&
|
||||
saved_transform_present == crtc->transformPresent &&
|
||||
(!crtc->transformPresent || RRTransformEqual(&saved_transform, &crtc->transform)))
|
||||
{
|
||||
if (!xf86CrtcRotate (crtc))
|
||||
goto done;
|
||||
crtc->funcs->set_origin (crtc, crtc->x, crtc->y);
|
||||
ret = TRUE;
|
||||
if (crtc->funcs->set_mode_major) {
|
||||
ret = crtc->funcs->set_mode_major(crtc, mode, rotation, x, y);
|
||||
goto done;
|
||||
}
|
||||
|
||||
didLock = crtc->funcs->lock (crtc);
|
||||
/* Pass our mode to the outputs and the CRTC to give them a chance to
|
||||
* adjust it according to limitations or output properties, and also
|
||||
* a chance to reject the mode entirely.
|
||||
|
|
|
|||
|
|
@ -205,6 +205,11 @@ static Bool quirk_first_detailed_preferred (int scrnIndex, xf86MonPtr DDC)
|
|||
DDC->vendor.prod_id == 2423)
|
||||
return TRUE;
|
||||
|
||||
/* Peacock Ergovision 19. See rh#492359 */
|
||||
if (memcmp (DDC->vendor.name, "PEA", 4) == 0 &&
|
||||
DDC->vendor.prod_id == 9003)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -218,13 +218,20 @@ extern pointer LookupClientResourceComplex(
|
|||
FindComplexResType func,
|
||||
pointer cdata);
|
||||
|
||||
extern int dixLookupResource(
|
||||
extern int dixLookupResourceByType(
|
||||
pointer *result,
|
||||
XID id,
|
||||
RESTYPE rtype,
|
||||
ClientPtr client,
|
||||
Mask access_mode);
|
||||
|
||||
extern int dixLookupResourceByClass(
|
||||
pointer *result,
|
||||
XID id,
|
||||
RESTYPE rclass,
|
||||
ClientPtr client,
|
||||
Mask access_mode);
|
||||
|
||||
extern void GetXIDRange(
|
||||
int /*client*/,
|
||||
Bool /*server*/,
|
||||
|
|
@ -244,29 +251,42 @@ extern RESTYPE TypeMask;
|
|||
* Please use the noted replacements instead.
|
||||
*/
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
#ifdef __GNUC__
|
||||
#define X_DEPRECATED __attribute__((deprecated))
|
||||
#else
|
||||
#define X_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* replaced by dixLookupResourceByType or dixLookupResourceByClass */
|
||||
extern int dixLookupResource(
|
||||
pointer *result,
|
||||
XID id,
|
||||
RESTYPE rtype,
|
||||
ClientPtr client,
|
||||
Mask access_mode) X_DEPRECATED;
|
||||
|
||||
extern pointer SecurityLookupIDByType(
|
||||
ClientPtr client,
|
||||
XID id,
|
||||
RESTYPE rtype,
|
||||
Mask access_mode);
|
||||
Mask access_mode) X_DEPRECATED;
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByClass */
|
||||
extern pointer SecurityLookupIDByClass(
|
||||
ClientPtr client,
|
||||
XID id,
|
||||
RESTYPE classes,
|
||||
Mask access_mode);
|
||||
Mask access_mode) X_DEPRECATED;
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByType */
|
||||
extern pointer LookupIDByType(
|
||||
XID id,
|
||||
RESTYPE rtype);
|
||||
RESTYPE rtype) X_DEPRECATED;
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByClass */
|
||||
extern pointer LookupIDByClass(
|
||||
XID id,
|
||||
RESTYPE classes);
|
||||
RESTYPE classes) X_DEPRECATED;
|
||||
|
||||
#endif /* RESOURCE_H */
|
||||
|
||||
|
|
|
|||
|
|
@ -664,8 +664,9 @@ ProcRRGetScreenInfo (ClientPtr client)
|
|||
rep.sizeID = pData->size;
|
||||
rep.rate = pData->refresh;
|
||||
|
||||
extraLen = (rep.nSizes * sizeof (xScreenSizes) +
|
||||
rep.nrateEnts * sizeof (CARD16));
|
||||
extraLen = rep.nSizes * sizeof (xScreenSizes);
|
||||
if (has_rate)
|
||||
extraLen += rep.nrateEnts * sizeof (CARD16);
|
||||
|
||||
if (extraLen)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -251,10 +251,10 @@ RRTransformCompute (int x,
|
|||
#ifdef RANDR_12_INTERFACE
|
||||
if (rr_transform)
|
||||
{
|
||||
if (!pixman_transform_multiply (transform, transform, &rr_transform->transform))
|
||||
if (!pixman_transform_multiply (transform, &rr_transform->transform, transform))
|
||||
overflow = TRUE;
|
||||
pixman_f_transform_multiply (f_transform, f_transform, &rr_transform->f_transform);
|
||||
pixman_f_transform_multiply (f_inverse, &rr_transform->f_inverse, f_inverse);
|
||||
pixman_f_transform_multiply (f_transform, &rr_transform->f_transform, f_transform);
|
||||
pixman_f_transform_multiply (f_inverse, f_inverse, &rr_transform->f_inverse);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1070,7 +1070,7 @@ ChangePicture (PicturePtr pPicture,
|
|||
pAlpha = 0;
|
||||
else
|
||||
{
|
||||
error = dixLookupResource((pointer *)&pAlpha, pid,
|
||||
error = dixLookupResourceByType((pointer *)&pAlpha, pid,
|
||||
PictureType, client,
|
||||
DixReadAccess);
|
||||
if (error != Success)
|
||||
|
|
@ -1131,7 +1131,7 @@ ChangePicture (PicturePtr pPicture,
|
|||
else
|
||||
{
|
||||
clipType = CT_PIXMAP;
|
||||
error = dixLookupResource((pointer *)&pPixmap, pid,
|
||||
error = dixLookupResourceByType((pointer *)&pPixmap, pid,
|
||||
RT_PIXMAP, client,
|
||||
DixReadAccess);
|
||||
if (error != Success)
|
||||
|
|
|
|||
|
|
@ -1009,7 +1009,7 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
|
|||
|
||||
LEGAL_NEW_RESOURCE(stuff->gsid, client);
|
||||
|
||||
rc = dixLookupResource((pointer *)&glyphSet, stuff->existing, GlyphSetType,
|
||||
rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->existing, GlyphSetType,
|
||||
client, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -1033,7 +1033,7 @@ ProcRenderFreeGlyphSet (ClientPtr client)
|
|||
REQUEST(xRenderFreeGlyphSetReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
|
||||
rc = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
|
||||
rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
|
||||
client, DixDestroyAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -1072,7 +1072,7 @@ ProcRenderAddGlyphs (ClientPtr client)
|
|||
CARD32 component_alpha;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq);
|
||||
err = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
|
||||
err = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
|
||||
client, DixAddAccess);
|
||||
if (err != Success)
|
||||
{
|
||||
|
|
@ -1262,7 +1262,7 @@ ProcRenderFreeGlyphs (ClientPtr client)
|
|||
CARD32 glyph;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
|
||||
rc = dixLookupResource((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
|
||||
rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType,
|
||||
client, DixRemoveAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -863,7 +863,7 @@ ProcXFixesHideCursor (ClientPtr client)
|
|||
|
||||
REQUEST_SIZE_MATCH (xXFixesHideCursorReq);
|
||||
|
||||
ret = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW,
|
||||
ret = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW,
|
||||
client, DixGetAttrAccess);
|
||||
if (ret != Success) {
|
||||
client->errorValue = stuff->window;
|
||||
|
|
@ -921,7 +921,7 @@ ProcXFixesShowCursor (ClientPtr client)
|
|||
|
||||
REQUEST_SIZE_MATCH (xXFixesShowCursorReq);
|
||||
|
||||
rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW,
|
||||
rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW,
|
||||
client, DixGetAttrAccess);
|
||||
if (rc != Success) {
|
||||
client->errorValue = stuff->window;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client)
|
|||
REQUEST_SIZE_MATCH (xXFixesCreateRegionFromBitmapReq);
|
||||
LEGAL_NEW_RESOURCE (stuff->region, client);
|
||||
|
||||
rc = dixLookupResource((pointer *)&pPixmap, stuff->bitmap, RT_PIXMAP,
|
||||
rc = dixLookupResourceByType((pointer *)&pPixmap, stuff->bitmap, RT_PIXMAP,
|
||||
client, DixReadAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -160,7 +160,7 @@ ProcXFixesCreateRegionFromWindow (ClientPtr client)
|
|||
|
||||
REQUEST_SIZE_MATCH (xXFixesCreateRegionFromWindowReq);
|
||||
LEGAL_NEW_RESOURCE (stuff->region, client);
|
||||
rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW,
|
||||
rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW,
|
||||
client, DixGetAttrAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
@ -682,7 +682,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
|
|||
REQUEST(xXFixesSetWindowShapeRegionReq);
|
||||
|
||||
REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq);
|
||||
rc = dixLookupResource((pointer *)&pWin, stuff->dest, RT_WINDOW,
|
||||
rc = dixLookupResourceByType((pointer *)&pWin, stuff->dest, RT_WINDOW,
|
||||
client, DixSetAttrAccess);
|
||||
if (rc != Success)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue